Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | merge with trunk |
---|---|
Timelines: | family | ancestors | descendants | both | wtf-8-experiment |
Files: | files | file ages | folders |
SHA1: |
7d0a22785fefc4662d0e5dec62daae63 |
User & Date: | chw 2020-01-02 07:19:18.821 |
Context
2020-01-02
| ||
19:21 | merge with trunk check-in: 45f4940cdd user: chw tags: wtf-8-experiment | |
07:19 | merge with trunk check-in: 7d0a22785f user: chw tags: wtf-8-experiment | |
07:11 | add Rtcl package to vanilla-/undroidwish check-in: 4cb5533b8a user: chw tags: trunk | |
2019-12-30
| ||
05:39 | merge with trunk check-in: 913904ba68 user: chw tags: wtf-8-experiment | |
Changes
Changes to assets/flexmenu1/flexmenu.tcl.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #!/usr/bin/tclsh # # Copyright 2018 Brad Lanam Walnut Creek CA # Copyright 2019 Brad Lanam Pleasant Hill CA # # Version history: # 1.35 2019-10-17 # Fixed close check handling. # Fixed combobox click completely outside of menu window. # Added -clicktoopen option. # 1.34 2019-10-17 # Fixed mouse handling issues with overlapping menus. # 1.33 2019-10-15 | > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/usr/bin/tclsh # # Copyright 2018 Brad Lanam Walnut Creek CA # Copyright 2019 Brad Lanam Pleasant Hill CA # # Version history: # 1.38 2019-12-25 # Fixed a bug in the delete() method. # Fixed a typo bug in _unpostMenu. # Fixed a bug in invokeitem setting the wrong state. # 1.37 2019-12-3 # Add appearance/isdark call back in using a temporary toplevel. # 1.36 2019-10-31 # Remove appearance/isdark call. Only works on existing windows. # 1.35 2019-10-17 # Fixed close check handling. # Fixed combobox click completely outside of menu window. # Added -clicktoopen option. # 1.34 2019-10-17 # Fixed mouse handling issues with overlapping menus. # 1.33 2019-10-15 |
︙ | ︙ | |||
246 247 248 249 250 251 252 | # Accelerator.Flexmenu.TLabel # Flexmenu.TRadiobutton # Flexmenu.TCheckbutton # Flexmenu.Horizontal.TSeparator # Flexmenu.Vertical.TSeparator # | | > > > > > > > > | | < < < < < < < < < < < < < < | < < < < < < | < | | | | > | < < < < < | < > > | | > | | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | # Accelerator.Flexmenu.TLabel # Flexmenu.TRadiobutton # Flexmenu.TCheckbutton # Flexmenu.Horizontal.TSeparator # Flexmenu.Vertical.TSeparator # package provide flexmenu 1.38 proc ::flexmenu { nm args } { ::flexmenuobj new $nm {*}$args return $nm } namespace eval ::flexmenucmd { variable vars # duplicate this from colorutils in order to keep flexmenu a # stand-alone package. proc rgbToHexStr { rgblist } { set fmt #%04x%04x%04x set t [format $fmt {*}$rgblist] return $t } proc handler { nm o args } { $o {*}$args } proc init { } { variable vars set vars(darwin.appearance) #0079ff set vars(darwin.darkmode) false set vars(darwin.version) 0.0 if { $::tcl_platform(os) eq "Darwin" } { set vars(darwin.version) [exec sw_vers -productVersion] if { [info exists ::sysvars::v(darwin.appearance)] } { set vars(darwin.appearance) \ [rgbToHexStr $::sysvars::v(darwin.appearance)] set vars(darwin.darkmode) $::sysvars::v(darwin.darkmode) } else { set tw .txyz toplevel $tw wm withdraw $tw update ; # the window must exist to get the information from it. set vars(darwin.appearance) \ [rgbToHexStr [winfo rgb $tw systemControlAccentColor]] # sierra and high sierra dark mode only apply to the top menu bar. if { $::flexmenucmd::vars(darwin.version) >= 10.14 } { set tdm [tk::unsupported::MacWindowStyle isdark $tw] if { $tdm } { set vars(darwin.darkmode) true } } destroy $tw } } } proc initStyling { } { variable vars |
︙ | ︙ | |||
360 361 362 363 364 365 366 | } } set afg [ttk::style lookup TEntry -selectforeground focus] if { $afg ne {} } { $tm configure -selectcolor $afg $tm configure -activeforeground $afg } | | < | < < | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | } } set afg [ttk::style lookup TEntry -selectforeground focus] if { $afg ne {} } { $tm configure -selectcolor $afg $tm configure -activeforeground $afg } set abg [ttk::style lookup TEntry -selectbackground focus] if { $abg ne {} } { $tm configure -activebackground $abg } set c [ttk::style lookup TEntry -foreground disabled] if { $c ne {} } { $tm configure -disabledforeground $c } } } foreach {k} {-activebackground -activeforeground -background -foreground -font -disabledforeground -cursor -activeborderwidth -takefocus} { set c [$tm cget $k] if { $::tcl_platform(os) eq "Darwin" } { # there does not appear to be a way to retrieve the # main menubar color at this time. switch -exact -- $c { systemMenuActive { set c $::flexmenucmd::vars(darwin.appearance) } systemMenuActiveText { # as the background color cannot be set on mac os # for ttk widgets, change the text color to be highlighted. set c #0872e5 ; # blue if { $::flexmenucmd::vars(darwin.darkmode) } { set c #ffa600 ; # yellow |
︙ | ︙ | |||
1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 | } } else { set dictkey $vars(active.dictkey) set itemno $vars(active.itemno) if { ! $vars(-keepopen) } { # need to close the menu before invoking. # invokeItem will work on a non-active menu. if { $type eq "submenu" } { my _deactivateItem my _deactivateMenu my _unpostMenu if { $vars(parent) ne {} } { $vars(parent) close } | > > | 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 | } } else { set dictkey $vars(active.dictkey) set itemno $vars(active.itemno) if { ! $vars(-keepopen) } { # need to close the menu before invoking. # invokeItem will work on a non-active menu. # this makes things messy due to # active.dictkey and active.itemno if { $type eq "submenu" } { my _deactivateItem my _deactivateMenu my _unpostMenu if { $vars(parent) ne {} } { $vars(parent) close } |
︙ | ︙ | |||
1323 1324 1325 1326 1327 1328 1329 | method _invokeItem { dictkey itemno } { my variable vars set reset false if { $dictkey eq {} } { set dictkey $vars(active.dictkey) | < < < < | 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 | method _invokeItem { dictkey itemno } { my variable vars set reset false if { $dictkey eq {} } { set dictkey $vars(active.dictkey) } if { $dictkey != -1 } { set type [dict get $vars(items) $dictkey type] switch -exact -- $type { cascade { my postcascade $itemno |
︙ | ︙ | |||
2039 2040 2041 2042 2043 2044 2045 | if { $vars(parent) ne {} } { $vars(parent) unpostcascade } # leave parent set set vars(menu.posted) false set vars(menu.active) false set vars(dictkey.prior) -1 | | | 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 | if { $vars(parent) ne {} } { $vars(parent) unpostcascade } # leave parent set set vars(menu.posted) false set vars(menu.active) false set vars(dictkey.prior) -1 set vars(active.dictkey) -1 set vars(active.itemno) -1 set vars(itemno.prior) -1 set vars(isconfigured) 0 } else { set vars(cascade.posted) [lrange $vars(cascade.posted) 1 end] } } |
︙ | ︙ | |||
3817 3818 3819 3820 3821 3822 3823 | } } } dict unset vars(items) $dictkey } set nlist [list] | > | | | | > | 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 | } } } dict unset vars(items) $dictkey } set nlist [list] set itemno 0 foreach {dictkey} $ilist { if { $dictkey ne {} } { lappend nlist $dictkey if { $itemno >= $first } { dict set vars(items) $dictkey changed true } } incr itemno } set vars(item.map) $nlist set vars(item.count) [llength $vars(item.map)] set vars(confchanged) true set vars(active.dictkey) -1 |
︙ | ︙ |
Changes to assets/flexmenu1/pkgIndex.tcl.
|
| | | 1 2 | package ifneeded flexmenu 1.38 \ [list source [file join $dir flexmenu.tcl]] |
Changes to jni/src/README.txt.
1 2 3 4 5 6 7 8 9 10 11 | Native AndroWish modules ======================== This directory constitutes the Tcl/Tk interface to the Android world: tkBorg.[ch] - implementation of the "borg" command tclRfcomm.[ch] - Bluetooth SPP channels tclBLE.[ch] - Bluetooth Low Energy interface tclUsbserial.[ch] - serial channels through USB to serial converters tclMuzic.[ch] - interface to EAS synthesizer library (midi music) tkAppInit.c - AndroWish specific Tcl/Tk application initializer | > | 1 2 3 4 5 6 7 8 9 10 11 12 | Native AndroWish modules ======================== This directory constitutes the Tcl/Tk interface to the Android world: tkBorg.[ch] - implementation of the "borg" command tclRfcomm.[ch] - Bluetooth SPP channels tclBLE.[ch] - Bluetooth Low Energy interface tclUsbserial.[ch] - serial channels through USB to serial converters tclMuzic.[ch] - interface to EAS synthesizer library (midi music) tkAppInit.c - AndroWish specific Tcl/Tk application initializer doc/*.n - man pages (nroff format) |
Added jni/src/doc/muzic.n.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | '\" '\" Copyright (c) 1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" Copyright (c) 2019 Christian Werner <chw at ch minus werner dot de> '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH muzic n 8.6 Tcl "Tcl Extension Commands" .\" ---- man.macros begin ---- .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .\" ---- man.macros end ---- .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME \fBMuzic\fR \- a MIDI sound package for AndroWish, compatible with Muzic from https:https://wiki.tcl-lang.org/page/Muzic .SH SYNOPSIS \fBpackage require Muzic\fR .br \fBmuzic::\fIsubcommand\fR ... .BE .SH DESCRIPTION .PP \fBmuzic\fR is a Tcl music interface to the Sonivox MIDI rendering software synthesis) library on Android. The original package was developed by Steve Landers and is Copyright (c) 2005 Eolas Technologies Inc. It is released under a Tcl/BSD style license. .sp 1 To use Muzic, no special provisions are needed, since it is fully integrated in AndroWish. .sp 1 The Muzic API contains just five procedures: .TP \fBmuzic::init\fR . Must be called once to initialize audio playback. .TP \fBmuzic::soundfont\fR ?\fIfile\fR? . This command exists for compatibility with the original package. It can be called with no arguments or with the file name \fBbuiltin\fR. Everything else throws an error since the Android software synthesizer has no support for SoundFont files. .TP \fBmuzic::channel \fIchannel instrument\fR . Assigns an instrument to a channel. \fIchannel\fR is an integer from 0 to 15 identifying the MIDI channel. \fIinstrument\fR is the instrument number, typically a MIDI instrument number from 0 to 127. .TP \fBmuzic::playnote \fIchannel pitch volume\fR ?\fIduration\fR . Plays a note on specified \fIchannel\fR, at specified \fIpitch\fR and \fIvolume\fR. The \fIpitch\fR is the raw MIDI pitch, as per the general MIDI standard, where middle C is 60 (see the table of MIDI pitch values in http://www.mozart.co.uk/information/articles/midinote.htm). \fIvolume\fR is a number between 0 and 100. \fIduration\fR is optional and defaults to 500 (i.e. 500 ms). If a negative \fIduration\fR is given, the note is played continuously. If a \fIvolume\fR of zero is given, playback of the note ends. .TP \fBmuzic::close\fR . To be called when MIDI audio playback shall be stopped in order to conserve battery power. .SH KEYWORDS audio, software synthesizer, MIDI '\" Local Variables: '\" mode: nroff '\" fill-column: 78 '\" End: |
Added jni/src/doc/rfcomm.n.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | '\" '\" Copyright (c) 1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" Copyright (c) 2019 Christian Werner <chw at ch minus werner dot de> '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH rfcomm n 8.6 Tcl "Tcl Extension Commands" .\" ---- man.macros begin ---- .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .\" ---- man.macros end ---- .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME \fBrfcomm\fR \- transfer data over Bluetooth serial port profile in AndroWish; akin to the Tcl \fBsocket\fR command. .SH SYNOPSIS \fBpackage require Rfcomm\fR .br \fBrfcomm\fR ?\fB\-myaddr\fR \fIaddr\fR? ?\fB\-myport\fR \fIport\fR? ?\fB\-async\fR? \fIhost port\fR .br \fBrfcomm\fR \fB\-server\fR \fIcommand\fR ?\fB\-myaddr\fR \fIaddr\fR? \fIport\fR .BE .SH DESCRIPTION .PP This command is used to obtain a channel which is able to transfer data over Bluetooth's serial port profile (SPP or SP). The arguments are nearly identical to the Tcl \fBsocket\fR command. It returns a client or server channel handle. Client channels may be used with \fBgets\fR, \fBread\fR, \fBputs\fR, \fBfconfigure\fR, and \fBclose\fR. Server channels return a new client channel in the \fIcommand\fR callback when an incoming connection was established. .sp 1 For client channels (first command form), the \fIhost\fR parameter must be given as a one- or two-element list: the first element is the Bluetooth address of the remote device, and the (optional) second element is the UUID of the remote service. If omitted the standard Bluetooth UUID for the Serial Port Profile 00001101-0000-1000-8000-00805F9B34FB is used. The non-blocking connection mode (\fB\-async\fR specified) uses readability of the channel to indicate connection state. This is different to normal socket channels, where writability provides this information. On Android, the local address of the client socket specified in the optional \fB\-myaddr\fR \fIaddr\fR parameter is ignored. .sp 1 For server channels, the first element of the \fIaddr\fR parameter is the UUID for the local SDP (Service Discovery Protocol) record, i.e. the application identifier, and the optional second element is the friendly name of the service as advertised over SDP. On some Android versions the friendly name may not be an empty string, otherwise incoming connection requests are not fulfilled. The \fIport\fR parameter is usually ignored and should be specified as 0. .SH KEYWORDS Bluetooth, socket, serial port profile '\" Local Variables: '\" mode: nroff '\" fill-column: 78 '\" End: |
Added jni/src/doc/usbserial.n.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | '\" '\" Copyright (c) 1993 The Regents of the University of California. '\" Copyright (c) 1994-1996 Sun Microsystems, Inc. '\" Copyright (c) 2019 Christian Werner <chw at ch minus werner dot de> '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" .TH usbserial n 8.6 Tcl "Tcl Extension Commands" .\" ---- man.macros begin ---- .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .\" ---- man.macros end ---- .BS '\" Note: do not modify the .SH NAME line immediately below! .SH NAME \fBusbserial\fR \- transfer data over USB-serial converters in AndroWish .SH SYNOPSIS \fBpackage require Usbserial\fR .br \fBusbserial\fR ?\fIdevicename\fR? .BE .SH DESCRIPTION .PP This command is used to transfer data over supported USB-serial converters (FTDI, CDC, Prolific, etc.), see the reference on https://github.com/mik3y/usb-serial-for-android. .sp 1 When no further argument is given to the \fBusbserial\fR command, a list of supported USB device names in the form of zero or more \fI/dev/bus/usb/MMM/NNN\fR device special file names is returned. .sp 1 When the USB device name of a supported USB-serial converter is given as \fIdevicename\fR argument, \fBusbserial\fR opens that USB device and returns a Tcl channel handle for it. This handle may be used with the Tcl commands \fBfconfigure\fR, \fBgets\fR, \fBread\fR, \fBputs\fR, and \fBclose\fR. The options \fB\-mode\fR, \fB\-ttycontrol\fR, and \fB\-ttystatus\fR to \fBfconfigure\fR are supported by the channel. However, support for getting and/or setting control lines varies between different USB-serial converter chips. Note, that similar to a normal POSIX tty device an USB device name can be opened more than once simultaneously. .SH LIST OF SUPPORTED DEVICES .PP .DS .ta 0c 3c 6c \fBVendor-ID\fR \fBProduct\fR \fBRemarks\fR 0x10c4 0xea60 CP2102 0x10c4 0xea70 CP2105 0x10c4 0xea71 CP2108 0x10c4 0xea80 CP2110 0x067b 0x2303 Prolific PL2303 0x0403 0x0601 FTDI FT232R 0x0403 0x6015 FTDI FT231X 0x2341 0x0001 Arduino UNO 0x2341 0x0010 Arduino Mega 2560 0x2341 0x003b Arduino Serial Adapter 0x2341 0x003f Arduino Mega ADK 0x2341 0x0042 Arduino Mega 2560 R3 0x2341 0x0043 Arduino UNO R3 0x2341 0x0044 Arduino Mega ADK R3 0x2341 0x8036 Arduino Leonardo 0x16c0 0x0483 TeensyDuino 0x03eb 0x2044 ATMEL LUFA CDC Demo Application 0x1eaf 0x0004 Leaflabs Maple 0x1a86 0x7523 CH 34x 0x1a86 0x5523 CH 34x 0x4348 0x5523 CH 34x .DE .SH KEYWORDS USB, serial line '\" Local Variables: '\" mode: nroff '\" fill-column: 78 '\" End: |
Added undroid/Rtcl/ChangeLog.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | 2020-01-01 Christian Werner <undroidwish@gmail.com> reworked everything to use runtime linking libR.so et.al. 2018-05-13 Matt Adams <matt.adams@stuffbymatt.ca> * rtcl.c: New Rtcl 1.1 version adds optional -verbose switch to all Rtcl commands. Presence of -verbose causes embedded R interpreter to print the results of R expressions to stdout as they are evaluated. This may be used to debug the results of R expressions as Rtcl commands are run. This was the default in 1.0 however it causes huge log files. Change based on patch and suggestion provided by Luc Moulinier <luc.moulinier@unistra.fr>. * doc/Rtcl.n: Updated nroff man page for -verbose switch * doc/Rtcl.tmml: Updated doctools man page for -verbose switch 2018-04-13 Matt Adams <matt.adams@radicaldynamic.com> * rtcl.c: New Rtcl 1.0 version compatible with Tcl 8.6.8 and R 3.4.4 based on previous work by Neil McKay. Introduces ::rtcl namespace, new "source" command, renames "getval" command to "getvalue", renames "type" command to "gettype". Embeds R as per current R manual "Writing R Extensions" and handles error in same Tcl interpreter vs. static interp used in previous versions. Includes Tcl unit tests. See LICENSE for copyright & permission notice. |
Added undroid/Rtcl/LICENSE.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 | This software is copyrighted by the Neil McKay, Matt Adams, and other parties. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, the Government shall have only "Restricted Rights" in the software and related documentation as defined in the Federal Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the Department of Defense, the software shall be classified as "Commercial Computer Software" and the Government shall have only "Restricted Rights" as defined in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. |
Added undroid/Rtcl/Makefile.in.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | # Makefile.in -- # # This file is a Makefile for Sample TEA Extension. If it has the name # "Makefile.in" then it is a template for a Makefile; to generate the # actual Makefile, run "./configure", which is a configuration script # generated by the "autoconf" program (constructs like "@foo@" will get # replaced in the actual Makefile. # # Copyright (c) 1999 Scriptics Corporation. # 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. #======================================================================== # Add additional lines to handle any additional AC_SUBST cases that # have been added in a customized configure script. #======================================================================== #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@ #======================================================================== # Nothing of the variables below this line should need to be changed. # Please check the TARGETS section below to make sure the make targets # are correct. #======================================================================== #======================================================================== # The names of the source files is defined in the configure script. # The object files are used for linking into the final library. # This will be used when a dist target is added to the Makefile. # It is not important to specify the directory, as long as it is the # $(srcdir) or in the generic, win or unix subdirectory. #======================================================================== PKG_SOURCES = @PKG_SOURCES@ PKG_OBJECTS = @PKG_OBJECTS@ PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ #======================================================================== # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with # this package that need to be installed, if any. #======================================================================== PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ #======================================================================== # This is a list of public header files to be installed, if any. #======================================================================== PKG_HEADERS = @PKG_HEADERS@ #======================================================================== # "PKG_LIB_FILE" refers to the library (dynamic or static as per # configuration options) composed of the named objects. #======================================================================== PKG_LIB_FILE = @PKG_LIB_FILE@ PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ lib_BINARIES = $(PKG_LIB_FILE) BINARIES = $(lib_BINARIES) SHELL = @SHELL@ srcdir = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ libdir = @libdir@ includedir = @includedir@ datarootdir = @datarootdir@ datadir = @datadir@ mandir = @mandir@ DESTDIR = PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) pkgdatadir = $(datadir)/$(PKG_DIR) pkglibdir = $(libdir)/$(PKG_DIR) pkgincludedir = $(includedir)/$(PKG_DIR) top_builddir = . INSTALL_OPTIONS = INSTALL = @INSTALL@ $(INSTALL_OPTIONS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ CC = @CC@ CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ CFLAGS_WARNING = @CFLAGS_WARNING@ EXEEXT = @EXEEXT@ LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ MAKE_LIB = @MAKE_LIB@ MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ MAKE_STUB_LIB = @MAKE_STUB_LIB@ OBJEXT = @OBJEXT@ RANLIB = @RANLIB@ RANLIB_STUB = @RANLIB_STUB@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_LD = @SHLIB_LD@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ STLIB_LD = @STLIB_LD@ #TCL_DEFS = @TCL_DEFS@ TCL_BIN_DIR = @TCL_BIN_DIR@ TCL_SRC_DIR = @TCL_SRC_DIR@ # Not used, but retained for reference of what libs Tcl required #TCL_LIBS = @TCL_LIBS@ #======================================================================== # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our # package without installing. The other environment variables allow us # to test against an uninstalled Tcl. Add special env vars that you # require for testing here (like TCLX_LIBRARY). #======================================================================== EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) TCLLIBPATH = $(top_builddir) TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ PATH="$(EXTRA_PATH):$(PATH)" \ TCLLIBPATH="$(TCLLIBPATH)" TCLSH_PROG = @TCLSH_PROG@ TCLSH = $(PKG_ENV) $(TCLSH_ENV) $(TCLSH_PROG) SHARED_BUILD = @SHARED_BUILD@ INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ PKG_CFLAGS = @PKG_CFLAGS@ # TCL_DEFS is not strictly need here, but if you remove it, then you # must make sure that configure.ac checks for the necessary components # that your library may use. TCL_DEFS can actually be a problem if # you do not compile with a similar machine setup as the Tcl core was # compiled with. #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) DEFS = @DEFS@ $(PKG_CFLAGS) # Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl CLEANFILES = @CLEANFILES@ CPPFLAGS = @CPPFLAGS@ LIBS = @PKG_LIBS@ @LIBS@ AR = @AR@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) .SUFFIXES: .c .$(OBJEXT) #======================================================================== # Start of user-definable TARGETS section #======================================================================== #======================================================================== # TEA TARGETS. Please note that the "libraries:" target refers to platform # independent files, and the "binaries:" target includes executable programs and # platform-dependent libraries. Modify these targets so that they install # the various pieces of your package. The make and install rules # for the BINARIES that you specified above have already been done. #======================================================================== all: binaries libraries doc #======================================================================== # The binaries target builds executable programs, Windows .dll's, unix # shared/static libraries, and any other platform-dependent files. # The list of targets to build for "binaries:" is specified at the top # of the Makefile, in the "BINARIES" variable. #======================================================================== binaries: $(BINARIES) libraries: #======================================================================== # Your doc target should differentiate from doc builds (by the developer) # and doc installs (see install-doc), which just install the docs on the # end user machine when building from source. #======================================================================== doc: # @echo "If you have documentation to create, place the commands to" # @echo "build the docs in the 'doc:' target. For example:" # @echo " xml2nroff sample.xml > sample.n" # @echo " xml2html sample.xml > sample.html" install: all install-binaries install-libraries install-doc install-binaries: binaries install-lib-binaries install-bin-binaries #======================================================================== # This rule installs platform-independent files, such as header files. #======================================================================== install-libraries: libraries #======================================================================== # Install documentation. Unix manpages should go in the $(mandir) # directory. #======================================================================== install-doc: doc @mkdir -p $(DESTDIR)$(mandir)/mann @echo "Installing documentation in $(DESTDIR)$(mandir)" @list='$(srcdir)/doc/*.n'; for i in $$list; do \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ done test: binaries libraries $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) \ -load "package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \ [list load `@CYGPATH@ $(PKG_LIB_FILE)` $(PACKAGE_NAME)]" shell: binaries libraries @$(TCLSH) $(SCRIPT) gdb: $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) VALGRINDARGS = --tool=memcheck --num-callers=8 --leak-resolution=high \ --leak-check=yes --show-reachable=yes -v valgrind: binaries libraries $(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) \ `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) valgrindshell: binaries libraries $(TCLSH_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) $(SCRIPT) depend: #======================================================================== # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable # mentioned above. That will ensure that this target is built when you # run "make binaries". # # The $(PKG_OBJECTS) objects are created and linked into the final # library. In most cases these object files will correspond to the # source files above. #======================================================================== $(PKG_LIB_FILE): $(PKG_OBJECTS) -rm -f $(PKG_LIB_FILE) ${MAKE_LIB} $(RANLIB) $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) -rm -f $(PKG_STUB_LIB_FILE) ${MAKE_STUB_LIB} $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) #======================================================================== # We need to enumerate the list of .c to .o lines here. # # In the following lines, $(srcdir) refers to the toplevel directory # containing your extension. If your sources are in a subdirectory, # you will have to modify the paths to reflect this: # # sample.$(OBJEXT): $(srcdir)/generic/sample.c # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ # # Setting the VPATH variable to a list of paths will cause the makefile # to look into these paths when resolving .c to .obj dependencies. # As necessary, add $(srcdir):$(srcdir)/compat:.... #======================================================================== VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win:$(srcdir)/macosx .c.@OBJEXT@: $(COMPILE) -c `@CYGPATH@ $<` -o $@ #======================================================================== # Distribution creation # You may need to tweak this target to make it work correctly. #======================================================================== #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar COMPRESS = tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) DIST_ROOT = /tmp/dist DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) DIST_INSTALL_DATA = CPPROG='cp -p' $(INSTALL) -m 644 DIST_INSTALL_SCRIPT = CPPROG='cp -p' $(INSTALL) -m 755 dist-clean: rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* dist: dist-clean mkdir -p $(DIST_DIR) $(DIST_INSTALL_DATA) $(srcdir)/license.terms \ $(srcdir)/ChangeLog $(srcdir)/README \ $(srcdir)/aclocal.m4 $(srcdir)/configure.ac \ $(srcdir)/Makefile.in $(srcdir)/pkgIndex.tcl.in \ $(srcdir)/README.sha \ $(DIST_DIR)/ $(DIST_INSTALL_SCRIPT) $(srcdir)/configure $(DIST_DIR)/ mkdir -p $(DIST_DIR)/tclconfig $(DIST_INSTALL_DATA) $(srcdir)/tclconfig/README.txt \ $(srcdir)/tclconfig/tcl.m4 $(srcdir)/tclconfig/install-sh \ $(DIST_DIR)/tclconfig/ list='demos doc generic library mac tests unix win'; \ for p in $$list; do \ if test -d $(srcdir)/$$p ; then \ mkdir -p $(DIST_DIR)/$$p; \ $(DIST_INSTALL_DATA) $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \ fi; \ done (cd $(DIST_ROOT); $(COMPRESS);) #======================================================================== # End of user-definable section #======================================================================== #======================================================================== # Don't modify the file to clean here. Instead, set the "CLEANFILES" # variable in configure.ac #======================================================================== clean: -test -z "$(BINARIES)" || rm -f $(BINARIES) -rm -f *.$(OBJEXT) core *.core -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean: clean -rm -f *.tab.c -rm -f $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log config.status #======================================================================== # Install binary object libraries. On Windows this includes both .dll and # .lib files. Because the .lib files are not explicitly listed anywhere, # we need to deduce their existence from the .dll file of the same name. # Library files go into the lib directory. # In addition, this will generate the pkgIndex.tcl # file in the install location (assuming it can find a usable tclsh shell) # # You should not have to modify this target. #======================================================================== install-lib-binaries: binaries mkdir -p $(DESTDIR)$(pkglibdir) @list='$(lib_BINARIES)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ if test "x$$stub" = "xstub"; then \ echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ else \ echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ fi; \ ext=`echo $$p|sed -e "s/.*\.//"`; \ if test "x$$ext" = "xdll"; then \ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ if test -f $$lib; then \ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ fi; \ fi; \ fi; \ done @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ if test -f $(srcdir)/$$p; then \ destp=`basename $$p`; \ echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ fi; \ done @if test "x$(SHARED_BUILD)" = "x1"; then \ echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ fi #======================================================================== # Install binary executables (e.g. .exe files and dependent .dll files) # This is for files that must go in the bin directory (located next to # wish and tclsh), like dependent .dll files on Windows. # # You should not have to modify this target, except to define bin_BINARIES # above if necessary. #======================================================================== install-bin-binaries: binaries @mkdir -p $(DESTDIR)$(bindir) @list='$(bin_BINARIES)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ fi; \ done Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status uninstall-binaries: list='$(lib_BINARIES)'; for p in $$list; do \ rm -f $(DESTDIR)$(pkglibdir)/$$p; \ done list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ p=`basename $$p`; \ rm -f $(DESTDIR)$(pkglibdir)/$$p; \ done list='$(bin_BINARIES)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/$$p; \ done .PHONY: all binaries clean depend distclean doc install libraries test # 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: |
Added undroid/Rtcl/README.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | Rtcl - A Tcl Extension for Embedding the R Statistical Language --------------------------------------------------------------- DESCRIPTION =========== The Rtcl extension embeds an interpreter for the R programming language (see http://www.r-project.org) inside a Tcl interpreter. It provides commands for evaluating R expressions, for importing their values into Tcl, and for determining their type. REQUIREMENTS ============ Rtcl requires the following software packages to be installed: 1. Tcl, version 8.6 or newer 2. R, version 3.4 or newer, built with shared libraries 3. Typical R install with include files INSTALLATION ============ Installation of Rtcl follows Tcl's usual configure/make/make install pattern. A typical installation on Unix will look like: % tar xvzf Rtcl1.1.tar.gz % cd Rtcl1.1 % ./configure % make % make test % su password: # make install # ^D % The configure script accepts a number of options, including: --with-tcl=tclDir Directory containing "tclConfig.sh" USING IT ======== Fire up your tclsh: tclsh8.6 % package require Rtcl 1.1 Use `man Rtcl` for further details. HISTORY ======= Versions 0.1 through 0.3 were initially developed and released by Neil McKay on Redhat Linux 8. Versions 1.0 and later were revised and packaged by Matt Adams on FreeBSD 11. See ChangeLog for detailed notes. VERSION NUMBERS =============== New releases require version number changes in the following files: README configure.ac (line 22) doc/Rtcl.tmml doc/Rtcl.n tests/rtcl.test (line 27) |
Added undroid/Rtcl/aclocal.m4.
> > > > > > > > > | 1 2 3 4 5 6 7 8 9 | # # Include the TEA standard macro set # builtin(include,tclconfig/tcl.m4) # # Add here whatever m4 macros you want to define for your package # |
Added undroid/Rtcl/compat/R/R.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2000-2016 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ #ifndef R_R_H #define R_R_H #ifndef USING_R # define USING_R #endif #ifndef NO_C_HEADERS /* same as Rmath.h: needed for cospi etc */ # ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 # endif /* The C++ headers in Solaris Studio are strict C++98, and many packages fail because of not using e.g. std::round or using C99 functions such as snprintf. */ # ifdef __SUNPRO_CC # define DO_NOT_USE_CXX_HEADERS # endif # if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS) # include <cstdlib> # include <cstdio> # include <climits> # include <cmath> # else # include <stdlib.h> /* Not used by R itself, but widely assumed in packages */ # include <stdio.h> /* Used by ca 200 packages, but not in R itself */ # include <limits.h> /* for INT_MAX */ # include <math.h> # endif /* math.h is also included by R_ext/Arith.h, except in C++ code stddef.h (or cstddef) is included by R_ext/Memory.h string.h (or cstring) is included by R_ext/RS.h */ # if defined(__sun) /* Solaris' stdlib.h includes a header which defines these (and more) */ # undef CS # undef DO # undef DS # undef ES # undef FS # undef GS # undef SO # undef SS # endif #else #warning "use of NO_C_HEADERS is deprecated" #endif #include <Rconfig.h> #include <R_ext/Arith.h> /* R_FINITE, ISNAN, ... */ #include <R_ext/Boolean.h> /* Rboolean type */ #include <R_ext/Complex.h> /* Rcomplex type */ #include <R_ext/Constants.h> /* PI, DOUBLE_EPS, etc */ #include <R_ext/Error.h> /* error and warning */ #include <R_ext/Memory.h> /* R_alloc and S_alloc */ #include <R_ext/Print.h> /* Rprintf etc */ #include <R_ext/Random.h> /* RNG interface */ #include <R_ext/Utils.h> /* sort routines et al */ #include <R_ext/RS.h> /* for PROBLEM ... Calloc, Realloc, Free, Memcpy, F77_xxxx */ typedef double Sfloat; typedef int Sint; #define SINT_MAX INT_MAX #define SINT_MIN INT_MIN #ifdef __cplusplus extern "C" { #endif void R_FlushConsole(void); /* always declared, but only usable under Win32 and Aqua */ void R_ProcessEvents(void); #ifdef Win32 void R_WaitEvent(void); #endif #ifdef __cplusplus } #endif #endif /* !R_R_H */ |
Added undroid/Rtcl/compat/R/R_ext/Applic.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1998-2015 The R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ * * * Application Routines, typically implemented in ../appl/ * ---------------------------------------------- ======== */ /* This header file contains routines which are in the R API and ones which are not. Those which are not can be used only at the user's risk and may change or disappear in a future release of R. */ #ifndef R_APPLIC_H_ #define R_APPLIC_H_ #include <R_ext/Boolean.h> #include <R_ext/RS.h> /* F77_... */ #include <R_ext/BLAS.h> #ifdef __cplusplus extern "C" { #endif /* Entry points in the R API */ /* ../../appl/integrate.c */ typedef void integr_fn(double *x, int n, void *ex); /* vectorizing function f(x[1:n], ...) -> x[] {overwriting x[]}. */ void Rdqags(integr_fn f, void *ex, double *a, double *b, double *epsabs, double *epsrel, double *result, double *abserr, int *neval, int *ier, int *limit, int *lenw, int *last, int *iwork, double *work); void Rdqagi(integr_fn f, void *ex, double *bound, int *inf, double *epsabs, double *epsrel, double *result, double *abserr, int *neval, int *ier, int *limit, int *lenw, int *last, int *iwork, double *work); /* main/optim.c */ typedef double optimfn(int, double *, void *); typedef void optimgr(int, double *, double *, void *); void vmmin(int n, double *b, double *Fmin, optimfn fn, optimgr gr, int maxit, int trace, int *mask, double abstol, double reltol, int nREPORT, void *ex, int *fncount, int *grcount, int *fail); void nmmin(int n, double *Bvec, double *X, double *Fmin, optimfn fn, int *fail, double abstol, double intol, void *ex, double alpha, double bet, double gamm, int trace, int *fncount, int maxit); void cgmin(int n, double *Bvec, double *X, double *Fmin, optimfn fn, optimgr gr, int *fail, double abstol, double intol, void *ex, int type, int trace, int *fncount, int *grcount, int maxit); void lbfgsb(int n, int m, double *x, double *l, double *u, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT); void samin(int n, double *pb, double *yb, optimfn fn, int maxit, int tmax, double ti, int trace, void *ex); /* appl/interv.c: Also in Utils.h, used in package eco */ int findInterval(double *xt, int n, double x, Rboolean rightmost_closed, Rboolean all_inside, int ilo, int *mflag); // findInterval2() is only in Utils.h (and hence Rinternals.h) /* ------------------ Entry points NOT in the R API --------------- */ /* The following are registered for use in .C/.Fortran */ /* appl/dqrutl.f: interfaces to dqrsl */ void F77_NAME(dqrqty)(double *x, int *n, int *k, double *qraux, double *y, int *ny, double *qty); void F77_NAME(dqrqy)(double *x, int *n, int *k, double *qraux, double *y, int *ny, double *qy); void F77_NAME(dqrcf)(double *x, int *n, int *k, double *qraux, double *y, int *ny, double *b, int *info); void F77_NAME(dqrrsd)(double *x, int *n, int *k, double *qraux, double *y, int *ny, double *rsd); void F77_NAME(dqrxb)(double *x, int *n, int *k, double *qraux, double *y, int *ny, double *xb); /* end of registered */ /* hidden, for use in R.bin/R.dll/libR.so */ /* appl/pretty.c: for use in engine.c and util.c */ double R_pretty(double *lo, double *up, int *ndiv, int min_n, double shrink_sml, double high_u_fact[], int eps_correction, int return_bounds); /* For use in package stats */ /* appl/uncmin.c : */ /* type of pointer to the target and gradient functions */ typedef void (*fcn_p)(int, double *, double *, void *); /* type of pointer to the hessian functions */ typedef void (*d2fcn_p)(int, int, double *, double *, void *); void fdhess(int n, double *x, double fval, fcn_p fun, void *state, double *h, int nfd, double *step, double *f, int ndigit, double *typx); /* Also used in packages nlme, pcaPP */ void optif9(int nr, int n, double *x, fcn_p fcn, fcn_p d1fcn, d2fcn_p d2fcn, void *state, double *typsiz, double fscale, int method, int iexp, int *msg, int ndigit, int itnlim, int iagflg, int iahflg, double dlt, double gradtl, double stepmx, double steptl, double *xpls, double *fpls, double *gpls, int *itrmcd, double *a, double *wrk, int *itncnt); /* find qr decomposition, dqrdc2() is basis of R's qr(), also used by nlme and many other packages. */ void F77_NAME(dqrdc2)(double *x, int *ldx, int *n, int *p, double *tol, int *rank, double *qraux, int *pivot, double *work); void F77_NAME(dqrls)(double *x, int *n, int *p, double *y, int *ny, double *tol, double *b, double *rsd, double *qty, int *k, int *jpvt, double *qraux, double *work); #ifdef __cplusplus } #endif #endif /* R_APPLIC_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/Arith.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (C) 1998--2016 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Included by R.h: API */ #ifndef R_ARITH_H_ #define R_ARITH_H_ /* This used to define _BSD_SOURCE to make declarations of isfinite and isnan visible in glibc. But that was deprecated in glibc 2.20, and --std=c99 suffices nowadays. */ #include <R_ext/libextern.h> #ifdef __cplusplus extern "C" { #elif !defined(NO_C_HEADERS) /* needed for isnan and isfinite, neither of which are used under C++ */ # include <math.h> #else #warning "use of NO_C_HEADERS is deprecated" #endif /* implementation of these : ../../main/arithmetic.c */ LibExtern double R_NaN; /* IEEE NaN */ LibExtern double R_PosInf; /* IEEE Inf */ LibExtern double R_NegInf; /* IEEE -Inf */ LibExtern double R_NaReal; /* NA_REAL: IEEE */ LibExtern int R_NaInt; /* NA_INTEGER:= INT_MIN currently */ #ifdef __MAIN__ #undef extern #undef LibExtern #endif #define NA_LOGICAL R_NaInt #define NA_INTEGER R_NaInt /* #define NA_FACTOR R_NaInt unused */ #define NA_REAL R_NaReal /* NA_STRING is a SEXP, so defined in Rinternals.h */ int R_IsNA(double); /* True for R's NA only */ int R_IsNaN(double); /* True for special NaN, *not* for NA */ int R_finite(double); /* True if none of NA, NaN, +/-Inf */ #define ISNA(x) R_IsNA(x) /* ISNAN(): True for *both* NA and NaN. NOTE: some systems do not return 1 for TRUE. Also note that C++ math headers specifically undefine isnan if it is a macro (it is on macOS and in C99), hence the workaround. This code also appears in Rmath.h */ #ifdef __cplusplus int R_isnancpp(double); /* in arithmetic.c */ # define ISNAN(x) R_isnancpp(x) #else # define ISNAN(x) (isnan(x)!=0) #endif /* The following is only defined inside R */ #ifdef HAVE_WORKING_ISFINITE /* isfinite is defined in <math.h> according to C99 */ # define R_FINITE(x) isfinite(x) #else # define R_FINITE(x) R_finite(x) #endif #ifdef __cplusplus } #endif #endif /* R_ARITH_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/BLAS.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2003-12 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* C declarations of BLAS Fortran subroutines always available in R. Part of the API. R packages that use these should have PKG_LIBS in src/Makevars include $(BLAS_LIBS) $(FLIBS) */ /* Part of the API */ #ifndef R_BLAS_H #define R_BLAS_H #include <R_ext/RS.h> /* for F77_... */ #include <R_ext/Complex.h> /* for Rcomplex */ #ifdef __cplusplus extern "C" { #endif // never defined in R itself. #ifndef BLAS_extern #define BLAS_extern extern #endif /* Double Precision Level 1 BLAS */ BLAS_extern double /* DASUM - sum of absolute values of a one-dimensional array */ F77_NAME(dasum)(const int *n, const double *dx, const int *incx); BLAS_extern void /* DAXPY - replace y by alpha*x + y */ F77_NAME(daxpy)(const int *n, const double *alpha, const double *dx, const int *incx, double *dy, const int *incy); BLAS_extern void /* DCOPY - copy x to y */ F77_NAME(dcopy)(const int *n, const double *dx, const int *incx, double *dy, const int *incy); BLAS_extern double /* DDOT - inner product of x and y */ F77_NAME(ddot)(const int *n, const double *dx, const int *incx, const double *dy, const int *incy); BLAS_extern double /* DNRM2 - 2-norm of a vector */ F77_NAME(dnrm2)(const int *n, const double *dx, const int *incx); BLAS_extern void /* DROT - apply a Given's rotation */ F77_NAME(drot)(const int *n, double *dx, const int *incx, double *dy, const int *incy, const double *c, const double *s); BLAS_extern void /* DROTG - generate a Given's rotation */ F77_NAME(drotg)(const double *a, const double *b, double *c, double *s); BLAS_extern void /* DROTM - apply a modified Given's rotation */ F77_NAME(drotm)(const int *n, double *dx, const int *incx, double *dy, const int *incy, const double *dparam); BLAS_extern void /* DROTMG - generate a modified Given's rotation */ F77_NAME(drotmg)(const double *dd1, const double *dd2, const double *dx1, const double *dy1, double *param); BLAS_extern void /* DSCAL - scale a one-dimensional array */ F77_NAME(dscal)(const int *n, const double *alpha, double *dx, const int *incx); BLAS_extern void /* DSWAP - interchange one-dimensional arrays */ F77_NAME(dswap)(const int *n, double *dx, const int *incx, double *dy, const int *incy); BLAS_extern int /* IDAMAX - return the index of the element with max abs value */ F77_NAME(idamax)(const int *n, const double *dx, const int *incx); /* Double Precision Level 2 BLAS */ /* DGBMV - perform one of the matrix-vector operations */ /* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, */ BLAS_extern void F77_NAME(dgbmv)(const char *trans, const int *m, const int *n, const int *kl,const int *ku, const double *alpha, const double *a, const int *lda, const double *x, const int *incx, const double *beta, double *y, const int *incy); /* DGEMV - perform one of the matrix-vector operations */ /* y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, */ BLAS_extern void F77_NAME(dgemv)(const char *trans, const int *m, const int *n, const double *alpha, const double *a, const int *lda, const double *x, const int *incx, const double *beta, double *y, const int *incy); /* DSBMV - perform the matrix-vector operation */ /* y := alpha*A*x + beta*y, */ BLAS_extern void F77_NAME(dsbmv)(const char *uplo, const int *n, const int *k, const double *alpha, const double *a, const int *lda, const double *x, const int *incx, const double *beta, double *y, const int *incy); /* DSPMV - perform the matrix-vector operation */ /* y := alpha*A*x + beta*y, */ BLAS_extern void F77_NAME(dspmv)(const char *uplo, const int *n, const double *alpha, const double *ap, const double *x, const int *incx, const double *beta, double *y, const int *incy); /* DSYMV - perform the matrix-vector operation */ /* y := alpha*A*x + beta*y, */ BLAS_extern void F77_NAME(dsymv)(const char *uplo, const int *n, const double *alpha, const double *a, const int *lda, const double *x, const int *incx, const double *beta, double *y, const int *incy); /* DTBMV - perform one of the matrix-vector operations */ /* x := A*x, or x := A'*x, */ BLAS_extern void F77_NAME(dtbmv)(const char *uplo, const char *trans, const char *diag, const int *n, const int *k, const double *a, const int *lda, double *x, const int *incx); /* DTPMV - perform one of the matrix-vector operations */ /* x := A*x, or x := A'*x, */ BLAS_extern void F77_NAME(dtpmv)(const char *uplo, const char *trans, const char *diag, const int *n, const double *ap, double *x, const int *incx); /* DTRMV - perform one of the matrix-vector operations */ /* x := A*x, or x := A'*x, */ BLAS_extern void F77_NAME(dtrmv)(const char *uplo, const char *trans, const char *diag, const int *n, const double *a, const int *lda, double *x, const int *incx); /* DTBSV - solve one of the systems of equations */ /* A*x = b, or A'*x = b, */ BLAS_extern void F77_NAME(dtbsv)(const char *uplo, const char *trans, const char *diag, const int *n, const int *k, const double *a, const int *lda, double *x, const int *incx); /* DTPSV - solve one of the systems of equations */ /* A*x = b, or A'*x = b, */ BLAS_extern void F77_NAME(dtpsv)(const char *uplo, const char *trans, const char *diag, const int *n, const double *ap, double *x, const int *incx); /* DTRSV - solve one of the systems of equations */ /* A*x = b, or A'*x = b, */ BLAS_extern void F77_NAME(dtrsv)(const char *uplo, const char *trans, const char *diag, const int *n, const double *a, const int *lda, double *x, const int *incx); /* DGER - perform the rank 1 operation A := alpha*x*y' + A */ BLAS_extern void F77_NAME(dger)(const int *m, const int *n, const double *alpha, const double *x, const int *incx, const double *y, const int *incy, double *a, const int *lda); /* DSYR - perform the symmetric rank 1 operation A := alpha*x*x' + A */ BLAS_extern void F77_NAME(dsyr)(const char *uplo, const int *n, const double *alpha, const double *x, const int *incx, double *a, const int *lda); /* DSPR - perform the symmetric rank 1 operation A := alpha*x*x' + A */ BLAS_extern void F77_NAME(dspr)(const char *uplo, const int *n, const double *alpha, const double *x, const int *incx, double *ap); /* DSYR2 - perform the symmetric rank 2 operation */ /* A := alpha*x*y' + alpha*y*x' + A, */ BLAS_extern void F77_NAME(dsyr2)(const char *uplo, const int *n, const double *alpha, const double *x, const int *incx, const double *y, const int *incy, double *a, const int *lda); /* DSPR2 - perform the symmetric rank 2 operation */ /* A := alpha*x*y' + alpha*y*x' + A, */ BLAS_extern void F77_NAME(dspr2)(const char *uplo, const int *n, const double *alpha, const double *x, const int *incx, const double *y, const int *incy, double *ap); /* Double Precision Level 3 BLAS */ /* DGEMM - perform one of the matrix-matrix operations */ /* C := alpha*op( A )*op( B ) + beta*C */ BLAS_extern void F77_NAME(dgemm)(const char *transa, const char *transb, const int *m, const int *n, const int *k, const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, const double *beta, double *c, const int *ldc); /* DTRSM - solve one of the matrix equations */ /* op(A)*X = alpha*B, or X*op(A) = alpha*B */ BLAS_extern void F77_NAME(dtrsm)(const char *side, const char *uplo, const char *transa, const char *diag, const int *m, const int *n, const double *alpha, const double *a, const int *lda, double *b, const int *ldb); /* DTRMM - perform one of the matrix-matrix operations */ /* B := alpha*op( A )*B, or B := alpha*B*op( A ) */ BLAS_extern void F77_NAME(dtrmm)(const char *side, const char *uplo, const char *transa, const char *diag, const int *m, const int *n, const double *alpha, const double *a, const int *lda, double *b, const int *ldb); /* DSYMM - perform one of the matrix-matrix operations */ /* C := alpha*A*B + beta*C, */ BLAS_extern void F77_NAME(dsymm)(const char *side, const char *uplo, const int *m, const int *n, const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, const double *beta, double *c, const int *ldc); /* DSYRK - perform one of the symmetric rank k operations */ /* C := alpha*A*A' + beta*C or C := alpha*A'*A + beta*C */ BLAS_extern void F77_NAME(dsyrk)(const char *uplo, const char *trans, const int *n, const int *k, const double *alpha, const double *a, const int *lda, const double *beta, double *c, const int *ldc); /* DSYR2K - perform one of the symmetric rank 2k operations */ /* C := alpha*A*B' + alpha*B*A' + beta*C or */ /* C := alpha*A'*B + alpha*B'*A + beta*C */ BLAS_extern void F77_NAME(dsyr2k)(const char *uplo, const char *trans, const int *n, const int *k, const double *alpha, const double *a, const int *lda, const double *b, const int *ldb, const double *beta, double *c, const int *ldc); /* LSAME is a LAPACK support routine, not part of BLAS */ /* Double complex BLAS routines added for 2.3.0 */ /* #ifdef HAVE_FORTRAN_DOUBLE_COMPLEX */ BLAS_extern double F77_NAME(dcabs1)(double *z); BLAS_extern double F77_NAME(dzasum)(int *n, Rcomplex *zx, int *incx); BLAS_extern double F77_NAME(dznrm2)(int *n, Rcomplex *x, int *incx); BLAS_extern int F77_NAME(izamax)(int *n, Rcomplex *zx, int *incx); BLAS_extern void F77_NAME(zaxpy)(int *n, Rcomplex *za, Rcomplex *zx, int *incx, Rcomplex *zy, int *incy); BLAS_extern void F77_NAME(zcopy)(int *n, Rcomplex *zx, int *incx, Rcomplex *zy, int *incy); /* WARNING! The next two return a value that may not be compatible between C and Fortran, and even if it is, this might not be the right translation to C. Only use after configure-testing with your compilers. */ BLAS_extern Rcomplex F77_NAME(zdotc)(int *n, Rcomplex *zx, int *incx, Rcomplex *zy, int *incy); BLAS_extern Rcomplex F77_NAME(zdotu)(int *n, Rcomplex *zx, int *incx, Rcomplex *zy, int *incy); BLAS_extern void F77_NAME(zdrot)(int *n, Rcomplex *zx, int *incx, Rcomplex *zy, int *incy, double *c, double *s); BLAS_extern void F77_NAME(zdscal)(int *n, double *da, Rcomplex *zx, int *incx); BLAS_extern void F77_NAME(zgbmv)(char *trans, int *m, int *n, int *kl, int *ku, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *x, int *incx, Rcomplex *beta, Rcomplex *y, int *incy); BLAS_extern void F77_NAME(zgemm)(const char *transa, const char *transb, const int *m, const int *n, const int *k, const Rcomplex *alpha, const Rcomplex *a, const int *lda, const Rcomplex *b, const int *ldb, const Rcomplex *beta, Rcomplex *c, const int *ldc); BLAS_extern void F77_NAME(zgemv)(char *trans, int *m, int *n, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *x, int *incx, Rcomplex *beta, Rcomplex *y, int * incy); BLAS_extern void F77_NAME(zgerc)(int *m, int *n, Rcomplex *alpha, Rcomplex *x, int *incx, Rcomplex *y, int *incy, Rcomplex *a, int *lda); BLAS_extern void F77_NAME(zgeru)(int *m, int *n, Rcomplex *alpha, Rcomplex *x, int *incx, Rcomplex *y, int *incy, Rcomplex *a, int *lda); BLAS_extern void F77_NAME(zhbmv)(char *uplo, int *n, int *k, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *x, int *incx, Rcomplex *beta, Rcomplex *y, int *incy); BLAS_extern void F77_NAME(zhemm)(char *side, char *uplo, int *m, int *n, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b, int *ldb, Rcomplex *beta, Rcomplex *c, int *ldc); BLAS_extern void F77_NAME(zhemv)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *x, int *incx, Rcomplex *beta, Rcomplex *y, int *incy); BLAS_extern void F77_NAME(zher)(char *uplo, int *n, double *alpha, Rcomplex *x, int *incx, Rcomplex *a, int *lda); BLAS_extern void F77_NAME(zher2)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *x, int *incx, Rcomplex *y, int *incy, Rcomplex *a, int *lda); BLAS_extern void F77_NAME(zher2k)(char *uplo, char *trans, int *n, int *k, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b, int *ldb, double *beta, Rcomplex *c, int *ldc); BLAS_extern void F77_NAME(zherk)(char *uplo, char *trans, int *n, int *k, double *alpha, Rcomplex *a, int *lda, double *beta, Rcomplex *c, int *ldc); BLAS_extern void F77_NAME(zhpmv)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *ap, Rcomplex *x, int *incx, Rcomplex * beta, Rcomplex *y, int *incy); BLAS_extern void F77_NAME(zhpr)(char *uplo, int *n, double *alpha, Rcomplex *x, int *incx, Rcomplex *ap); BLAS_extern void F77_NAME(zhpr2)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *x, int *incx, Rcomplex *y, int *incy, Rcomplex *ap); BLAS_extern void F77_NAME(zrotg)(Rcomplex *ca, Rcomplex *cb, double *c, Rcomplex *s); BLAS_extern void F77_NAME(zscal)(int *n, Rcomplex *za, Rcomplex *zx, int *incx); BLAS_extern void F77_NAME(zswap)(int *n, Rcomplex *zx, int *incx, Rcomplex *zy, int *incy); BLAS_extern void F77_NAME(zsymm)(char *side, char *uplo, int *m, int *n, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b, int *ldb, Rcomplex *beta, Rcomplex *c, int *ldc); BLAS_extern void F77_NAME(zsyr2k)(char *uplo, char *trans, int *n, int *k, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b, int *ldb, Rcomplex *beta, Rcomplex *c, int *ldc); BLAS_extern void F77_NAME(zsyrk)(char *uplo, char *trans, int *n, int *k, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *beta, Rcomplex *c, int *ldc); BLAS_extern void F77_NAME(ztbmv)(char *uplo, char *trans, char *diag, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *x, int *incx); BLAS_extern void F77_NAME(ztbsv)(char *uplo, char *trans, char *diag, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *x, int *incx); BLAS_extern void F77_NAME(ztpmv)(char *uplo, char *trans, char *diag, int *n, Rcomplex *ap, Rcomplex *x, int *incx); BLAS_extern void F77_NAME(ztpsv)(char *uplo, char *trans, char *diag, int *n, Rcomplex *ap, Rcomplex *x, int *incx); BLAS_extern void F77_NAME(ztrmm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b, int *ldb); BLAS_extern void F77_NAME(ztrmv)(char *uplo, char *trans, char *diag, int *n, Rcomplex *a, int *lda, Rcomplex *x, int *incx); BLAS_extern void F77_NAME(ztrsm)(char *side, char *uplo, char *transa, char *diag, int *m, int *n, Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b, int *ldb); BLAS_extern void F77_NAME(ztrsv)(char *uplo, char *trans, char *diag, int *n, Rcomplex *a, int *lda, Rcomplex *x, int *incx); /* #endif */ #ifdef __cplusplus } #endif #endif /* R_BLAS_H */ |
Added undroid/Rtcl/compat/R/R_ext/Boolean.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2000, 2001 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Included by R.h: API */ #ifndef R_EXT_BOOLEAN_H_ #define R_EXT_BOOLEAN_H_ #undef FALSE #undef TRUE #ifdef __cplusplus extern "C" { #endif typedef enum { FALSE = 0, TRUE /*, MAYBE */ } Rboolean; #ifdef __cplusplus } #endif #endif /* R_EXT_BOOLEAN_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/Callbacks.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2001-2016 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Not part of the API, subject to change at any time. */ #ifndef R_CALLBACKS_H #define R_CALLBACKS_H /** These structures are for C (and R function) top-level task handlers. Such routines are called at the end of every (successful) top-level task in the regular REPL. */ #include <Rinternals.h> /** The signature of the C routine that a callback must implement. expr - the expression for the top-level task that was evaluated. value - the result of the top-level task, i.e. evaluating expr. succeeded - a logical value indicating whether the task completed propertly. visible - a logical value indicating whether the result was printed to the R ``console''/stdout. data - user-level data passed to the registration routine. */ typedef Rboolean (*R_ToplevelCallback)(SEXP expr, SEXP value, Rboolean succeeded, Rboolean visible, void *); typedef struct _ToplevelCallback R_ToplevelCallbackEl; /** Linked list element for storing the top-level task callbacks. */ struct _ToplevelCallback { R_ToplevelCallback cb; /* the C routine to call. */ void *data; /* the user-level data to pass to the call to cb() */ void (*finalizer)(void *data); /* Called when the callback is removed. */ char *name; /* a name by which to identify this element. */ R_ToplevelCallbackEl *next; /* the next element in the linked list. */ }; #ifdef __cplusplus extern "C" { #endif Rboolean Rf_removeTaskCallbackByIndex(int id); Rboolean Rf_removeTaskCallbackByName(const char *name); SEXP R_removeTaskCallback(SEXP which); R_ToplevelCallbackEl* Rf_addTaskCallback(R_ToplevelCallback cb, void *data, void (*finalizer)(void *), const char *name, int *pos); /* The following definitions are for callbacks to R functions and methods related to user-level tables. This was implemented in a separate package on Omegahat and these declarations allow the package to interface to the internal R code. See https://developer.r-project.org/RObjectTables.pdf, http://www.omegahat.net/RObjectTables/ */ typedef struct _R_ObjectTable R_ObjectTable; /* Do we actually need the exists() since it is never called but R uses get to see if the symbol is bound to anything? */ typedef Rboolean (*Rdb_exists)(const char * const name, Rboolean *canCache, R_ObjectTable *); typedef SEXP (*Rdb_get)(const char * const name, Rboolean *canCache, R_ObjectTable *); typedef int (*Rdb_remove)(const char * const name, R_ObjectTable *); typedef SEXP (*Rdb_assign)(const char * const name, SEXP value, R_ObjectTable *); typedef SEXP (*Rdb_objects)(R_ObjectTable *); typedef Rboolean (*Rdb_canCache)(const char * const name, R_ObjectTable *); typedef void (*Rdb_onDetach)(R_ObjectTable *); typedef void (*Rdb_onAttach)(R_ObjectTable *); struct _R_ObjectTable{ int type; char **cachedNames; Rboolean active; Rdb_exists exists; Rdb_get get; Rdb_remove remove; Rdb_assign assign; Rdb_objects objects; Rdb_canCache canCache; Rdb_onDetach onDetach; Rdb_onAttach onAttach; void *privateData; }; #ifdef __cplusplus } #endif #endif /* R_CALLBACKS_H */ |
Added undroid/Rtcl/compat/R/R_ext/Complex.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1998-2001 The R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Included by R.h: API */ #ifndef R_COMPLEX_H #define R_COMPLEX_H #ifdef __cplusplus extern "C" { #endif typedef struct { double r; double i; } Rcomplex; #ifdef __cplusplus } #endif #endif /* R_COMPLEX_H */ |
Added undroid/Rtcl/compat/R/R_ext/Connections.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2000-2016 The R Core Team. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ #ifndef R_EXT_CONNECTIONS_H_ #define R_EXT_CONNECTIONS_H_ #include <R_ext/Boolean.h> #ifndef NO_C_HEADERS # if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS) # include <cstddef> # include <cstdarg> # else # include <stddef.h> /* for size_t */ # include <stdarg.h> /* for va_list */ # endif #else #warning "use of NO_C_HEADERS is deprecated" #endif /* IMPORTANT: we do not expect future connection APIs to be backward-compatible so if you use this, you *must* check the version and proceed only if it matches what you expect We explicitly reserve the right to change the connection implementation without a compatibility layer. */ #define R_CONNECTIONS_VERSION 1 /* this allows the opaque pointer definition to be made available in Rinternals.h */ #ifndef HAVE_RCONNECTION_TYPEDEF typedef struct Rconn *Rconnection; #endif struct Rconn { char* class; char* description; int enc; /* the encoding of 'description' */ char mode[5]; Rboolean text, isopen, incomplete, canread, canwrite, canseek, blocking, isGzcon; Rboolean (*open)(struct Rconn *); void (*close)(struct Rconn *); /* routine closing after auto open */ void (*destroy)(struct Rconn *); /* when closing connection */ int (*vfprintf)(struct Rconn *, const char *, va_list); int (*fgetc)(struct Rconn *); int (*fgetc_internal)(struct Rconn *); double (*seek)(struct Rconn *, double, int, int); void (*truncate)(struct Rconn *); int (*fflush)(struct Rconn *); size_t (*read)(void *, size_t, size_t, struct Rconn *); size_t (*write)(const void *, size_t, size_t, struct Rconn *); int nPushBack, posPushBack; /* number of lines, position on top line */ char **PushBack; int save, save2; char encname[101]; /* will be iconv_t, which is a pointer. NULL if not in use */ void *inconv, *outconv; /* The idea here is that no MBCS char will ever not fit */ char iconvbuff[25], oconvbuff[50], *next, init_out[25]; short navail, inavail; Rboolean EOF_signalled; Rboolean UTF8out; void *id; void *ex_ptr; void *private; int status; /* for pipes etc */ }; #ifdef __cplusplus extern "C" { #endif SEXP R_new_custom_connection(const char *description, const char *mode, const char *class_name, Rconnection *ptr); size_t R_ReadConnection(Rconnection con, void *buf, size_t n); size_t R_WriteConnection(Rconnection con, void *buf, size_t n); Rconnection R_GetConnection(SEXP sConn); #ifdef __cplusplus } #endif #endif |
Added undroid/Rtcl/compat/R/R_ext/Constants.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (C) 1998-2012 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Included by R.h: API */ #ifndef R_EXT_CONSTANTS_H_ #define R_EXT_CONSTANTS_H_ /* usually in math.h, but not with strict C99 compliance */ #ifndef M_PI #define M_PI 3.141592653589793238462643383279502884197169399375 #endif #ifndef STRICT_R_HEADERS #define PI M_PI #include <float.h> /* Defines the rest, at least in C99 */ #define SINGLE_EPS FLT_EPSILON #define SINGLE_BASE FLT_RADIX #define SINGLE_XMIN FLT_MIN #define SINGLE_XMAX FLT_MAX #define DOUBLE_DIGITS DBL_MANT_DIG #define DOUBLE_EPS DBL_EPSILON #define DOUBLE_XMAX DBL_MAX #define DOUBLE_XMIN DBL_MIN #endif #endif /* R_EXT_CONSTANTS_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/Error.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1998-2005 The R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Included by R.h: API */ #ifndef R_ERROR_H_ #define R_ERROR_H_ #ifdef __cplusplus extern "C" { #endif #if defined(__GNUC__) && __GNUC__ >= 3 #define NORET __attribute__((noreturn)) #else #define NORET #endif void NORET Rf_error(const char *, ...); void NORET UNIMPLEMENTED(const char *); void NORET WrongArgCount(const char *); void Rf_warning(const char *, ...); void R_ShowMessage(const char *s); #ifdef __cplusplus } #endif #ifndef R_NO_REMAP #define error Rf_error #define warning Rf_warning #endif #endif /* R_ERROR_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/GetX11Image.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2003 R Core Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ #ifndef GETX11IMAGE_H_ #define GETX11IMAGE_H_ #ifdef __cplusplus extern "C" { #endif /* used by package tkrplot */ Rboolean R_GetX11Image(int d, void *pximage, int *pwidth, int *pheight); /* pximage is really (XImage **) */ #ifdef __cplusplus } #endif #endif |
Added undroid/Rtcl/compat/R/R_ext/GraphicsDevice.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2001-11 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Used by third-party graphics devices. * * This defines DevDesc, whereas GraphicsEngine.h defines GEDevDesc. * Also contains entry points from gevents.c */ #ifndef R_GRAPHICSDEVICE_H_ #define R_GRAPHICSDEVICE_H_ /* ideally we would use prototypes in DevDesc. Some devices have taken to passing pointers to their own structure instead of DevDesc* , defining R_USE_PROTOTYPES 0 allows them to opt out. */ #ifndef R_USE_PROTOTYPES # define R_USE_PROTOTYPES 1 # ifndef R_GRAPHICSENGINE_H_ # error R_ext/GraphicsEngine.h must be included first, and includes this header # endif #endif #include <R_ext/Boolean.h> #ifdef __cplusplus extern "C" { #endif /* --------- New (in 1.4.0) device driver structure --------- * NOTES: * 1. All locations and dimensions are in device coordinates. * 2. I found this comment in the doc for dev_Open -- looks nasty * Any known instances of such a thing happening? Should be * replaced by a function to query the device for preferred gpars * settings? (to be called when the device is initialised) * * NOTE that it is perfectly acceptable for this * function to set generic graphics parameters too * (i.e., override the generic parameter settings * which GInit sets up) all at the author's own risk * of course :) * * 3. Do we really need dev_StrWidth as well as dev_MetricInfo? * I can see the difference between the two -- its just a * question of whether dev_MetricInfo should just return * what dev_StrWidth would give if font metric information is * not available. I guess having both allows the developer * to decide when to ask for which sort of value, and to decide * what to do when font metric information is not available. * And why not a dev_StrHeight? * 4. Should "ipr", "asp", and "cra" be in the device description? * If not, then where? * I guess they don't need to be if no device makes use of them. * On the other hand, they would need to be replaced by a device * call that R base graphics could use to get enough information * to figure them out. (e.g., some sort of dpi() function to * complement the size() function.) */ typedef struct _DevDesc DevDesc; typedef DevDesc* pDevDesc; struct _DevDesc { /******************************************************** * Device physical characteristics ********************************************************/ double left; /* left raster coordinate */ double right; /* right raster coordinate */ double bottom; /* bottom raster coordinate */ double top; /* top raster coordinate */ /* R only has the notion of a rectangular clipping region */ double clipLeft; double clipRight; double clipBottom; double clipTop; /* I hate these next three -- they seem like a real fudge * BUT I'm not sure what to replace them with so they stay for now. */ double xCharOffset; /* x character addressing offset - unused */ double yCharOffset; /* y character addressing offset */ double yLineBias; /* 1/2 interline space as frac of line height */ double ipr[2]; /* Inches per raster; [0]=x, [1]=y */ /* I hate this guy too -- seems to assume that a device can only * have one font size during its lifetime * BUT removing/replacing it would take quite a lot of work * to design and insert a good replacement so it stays for now. */ double cra[2]; /* Character size in rasters; [0]=x, [1]=y */ double gamma; /* (initial) Device Gamma Correction */ /******************************************************** * Device capabilities ********************************************************/ Rboolean canClip; /* Device-level clipping */ Rboolean canChangeGamma; /* can the gamma factor be modified? */ int canHAdj; /* Can do at least some horiz adjust of text 0 = none, 1 = {0,0.5,1}, 2 = [0,1] */ /******************************************************** * Device initial settings ********************************************************/ /* These are things that the device must set up when it is created. * The graphics system can modify them and track current values, */ double startps; int startcol; /* sets par("fg"), par("col") and gpar("col") */ int startfill; /* sets par("bg") and gpar("fill") */ int startlty; int startfont; double startgamma; /******************************************************** * Device specific information ********************************************************/ void *deviceSpecific; /* pointer to device specific parameters */ /******************************************************** * Device display list ********************************************************/ Rboolean displayListOn; /* toggle for initial display list status */ /******************************************************** * Event handling entries ********************************************************/ /* Used in do_setGraphicsEventEnv */ Rboolean canGenMouseDown; /* can the device generate mousedown events */ Rboolean canGenMouseMove; /* can the device generate mousemove events */ Rboolean canGenMouseUp; /* can the device generate mouseup events */ Rboolean canGenKeybd; /* can the device generate keyboard events */ Rboolean gettingEvent; /* This is set while getGraphicsEvent is actively looking for events */ /******************************************************** * Device procedures. ********************************************************/ /* * --------------------------------------- * GENERAL COMMENT ON GRAPHICS PARAMETERS: * --------------------------------------- * Graphical parameters are now passed in a pointer to a * graphics context structure (pGEcontext) rather than individually. * Each device action should extract the parameters it needs * and ignore the others. Thought should be given to which * parameters are relevant in each case -- the graphics engine * does not REQUIRE that each parameter is honoured, but if * a parameter is NOT honoured, it might be a good idea to * issue a warning when a parameter is not honoured (or at * the very least document which parameters are not honoured * in the user-level documentation for the device). [An example * of a parameter that may not be honoured by many devices is * transparency.] */ /* * device_Activate is called when a device becomes the * active device. For example, it can be used to change the * title of a window to indicate the active status of * the device to the user. Not all device types will * do anything. * The only parameter is a device driver structure. * An example is ... * * static void X11_Activate(pDevDesc dd); * * As from R 2.14.0 this can be omitted or set to NULL. */ #if R_USE_PROTOTYPES void (*activate)(const pDevDesc ); #else void (*activate)(); #endif /* * device_Circle should have the side-effect that a * circle is drawn, centred at the given location, with * the given radius. * (If the device has non-square pixels, 'radius' should * be interpreted in the units of the x direction.) * The border of the circle should be * drawn in the given "col", and the circle should be * filled with the given "fill" colour. * If "col" is NA_INTEGER then no border should be drawn * If "fill" is NA_INTEGER then the circle should not * be filled. * An example is ... * * static void X11_Circle(double x, double y, double r, * pGEcontext gc, * pDevDesc dd); * * R_GE_gcontext parameters that should be honoured (if possible): * col, fill, gamma, lty, lwd */ #if R_USE_PROTOTYPES void (*circle)(double x, double y, double r, const pGEcontext gc, pDevDesc dd); #else void (*circle)(); #endif /* * device_Clip is given the left, right, bottom, and * top of a rectangle (in DEVICE coordinates). * It should have the side-effect that subsequent output * is clipped to the given rectangle. * NOTE that R's graphics engine already clips to the * extent of the device. * NOTE also that this will probably only be called if * the flag canClip is true. * An example is ... * * static void X11_Clip(double x0, double x1, double y0, double y1, * pDevDesc dd) */ #if R_USE_PROTOTYPES void (*clip)(double x0, double x1, double y0, double y1, pDevDesc dd); #else void (*clip)(); #endif /* * device_Close is called when the device is killed. * This function is responsible for destroying any * device-specific resources that were created in * device_Open and for FREEing the device-specific * parameters structure. * An example is ... * * static void X11_Close(pDevDesc dd) * */ #if R_USE_PROTOTYPES void (*close)(pDevDesc dd); #else void (*close)(); #endif /* * device_Deactivate is called when a device becomes * inactive. * This allows the device to undo anything it did in * dev_Activate. * Not all device types will do anything. * An example is ... * * static void X11_Deactivate(pDevDesc dd) * * As from R 2.14.0 this can be omitted or set to NULL. */ #if R_USE_PROTOTYPES void (*deactivate)(pDevDesc ); #else void (*deactivate)(); #endif /* * device_Locator should return the location of the next * mouse click (in DEVICE coordinates) * Not all devices will do anything (e.g., postscript) * An example is ... * * static Rboolean X11_Locator(double *x, double *y, pDevDesc dd) * * As from R 2.14.0 this can be omitted or set to NULL. */ #if R_USE_PROTOTYPES Rboolean (*locator)(double *x, double *y, pDevDesc dd); #else Rboolean (*locator)(); #endif /* * device_Line should have the side-effect that a single * line is drawn (from x1,y1 to x2,y2) * An example is ... * * static void X11_Line(double x1, double y1, double x2, double y2, * const pGEcontext gc, * pDevDesc dd); * * R_GE_gcontext parameters that should be honoured (if possible): * col, gamma, lty, lwd */ #if R_USE_PROTOTYPES void (*line)(double x1, double y1, double x2, double y2, const pGEcontext gc, pDevDesc dd); #else void (*line)(); #endif /* * device_MetricInfo should return height, depth, and * width information for the given character in DEVICE * units. * Note: in an 8-bit locale, c is 'char'. * In an mbcslocale, it is wchar_t, and at least some * of code assumes that is UCS-2 (Windows, true) or UCS-4. * This is used for formatting mathematical expressions * and for exact centering of text (see GText) * If the device cannot provide metric information then * it MUST return 0.0 for ascent, descent, and width. * An example is ... * * static void X11_MetricInfo(int c, * const pGEcontext gc, * double* ascent, double* descent, * double* width, pDevDesc dd); * * R_GE_gcontext parameters that should be honoured (if possible): * font, cex, ps */ #if R_USE_PROTOTYPES void (*metricInfo)(int c, const pGEcontext gc, double* ascent, double* descent, double* width, pDevDesc dd); #else void (*metricInfo)(); #endif /* * device_Mode is called whenever the graphics engine * starts drawing (mode=1) or stops drawing (mode=0) * GMode (in graphics.c) also says that * mode = 2 (graphical input on) exists. * The device is not required to do anything * An example is ... * * static void X11_Mode(int mode, pDevDesc dd); * * As from R 2.14.0 this can be omitted or set to NULL. */ #if R_USE_PROTOTYPES void (*mode)(int mode, pDevDesc dd); #else void (*mode)(); #endif /* * device_NewPage is called whenever a new plot requires * a new page. * A new page might mean just clearing the * device (e.g., X11) or moving to a new page * (e.g., postscript) * An example is ... * * * static void X11_NewPage(const pGEcontext gc, * pDevDesc dd); * */ #if R_USE_PROTOTYPES void (*newPage)(const pGEcontext gc, pDevDesc dd); #else void (*newPage)(); #endif /* * device_Polygon should have the side-effect that a * polygon is drawn using the given x and y values * the polygon border should be drawn in the "col" * colour and filled with the "fill" colour. * If "col" is NA_INTEGER don't draw the border * If "fill" is NA_INTEGER don't fill the polygon * An example is ... * * static void X11_Polygon(int n, double *x, double *y, * const pGEcontext gc, * pDevDesc dd); * * R_GE_gcontext parameters that should be honoured (if possible): * col, fill, gamma, lty, lwd */ #if R_USE_PROTOTYPES void (*polygon)(int n, double *x, double *y, const pGEcontext gc, pDevDesc dd); #else void (*polygon)(); #endif /* * device_Polyline should have the side-effect that a * series of line segments are drawn using the given x * and y values. * An example is ... * * static void X11_Polyline(int n, double *x, double *y, * const pGEcontext gc, * pDevDesc dd); * * R_GE_gcontext parameters that should be honoured (if possible): * col, gamma, lty, lwd */ #if R_USE_PROTOTYPES void (*polyline)(int n, double *x, double *y, const pGEcontext gc, pDevDesc dd); #else void (*polyline)(); #endif /* * device_Rect should have the side-effect that a * rectangle is drawn with the given locations for its * opposite corners. The border of the rectangle * should be in the given "col" colour and the rectangle * should be filled with the given "fill" colour. * If "col" is NA_INTEGER then no border should be drawn * If "fill" is NA_INTEGER then the rectangle should not * be filled. * An example is ... * * static void X11_Rect(double x0, double y0, double x1, double y1, * const pGEcontext gc, * pDevDesc dd); * */ #if R_USE_PROTOTYPES void (*rect)(double x0, double y0, double x1, double y1, const pGEcontext gc, pDevDesc dd); #else void (*rect)(); #endif /* * device_Path should draw one or more sets of points * as a single path * * 'x' and 'y' give the points * * 'npoly' gives the number of polygons in the path * MUST be at least 1 * * 'nper' gives the number of points in each polygon * each value MUST be at least 2 * * 'winding' says whether to fill using the nonzero * winding rule or the even-odd rule * * Added 2010-06-27 * * As from R 2.13.2 this can be left unimplemented as NULL. */ #if R_USE_PROTOTYPES void (*path)(double *x, double *y, int npoly, int *nper, Rboolean winding, const pGEcontext gc, pDevDesc dd); #else void (*path)(); #endif /* * device_Raster should draw a raster image justified * at the given location, * size, and rotation (not all devices may be able to rotate?) * * 'raster' gives the image data BY ROW, with every four bytes * giving one R colour (ABGR). * * 'x and 'y' give the bottom-left corner. * * 'rot' is in degrees (as per device_Text), with positive * rotation anticlockwise from the positive x-axis. * * As from R 2.13.2 this can be left unimplemented as NULL. */ #if R_USE_PROTOTYPES void (*raster)(unsigned int *raster, int w, int h, double x, double y, double width, double height, double rot, Rboolean interpolate, const pGEcontext gc, pDevDesc dd); #else void (*raster)(); #endif /* * device_Cap should return an integer matrix (R colors) * representing the current contents of the device display. * * The result is expected to be ROW FIRST. * * This will only make sense for raster devices and can * probably only be implemented for screen devices. * * added 2010-06-27 * * As from R 2.13.2 this can be left unimplemented as NULL. * For earlier versions of R it should return R_NilValue. */ #if R_USE_PROTOTYPES SEXP (*cap)(pDevDesc dd); #else SEXP (*cap)(); #endif /* * device_Size is called whenever the device is * resized. * The function returns (left, right, bottom, and top) for the * new device size. * This is not usually called directly by the graphics * engine because the detection of device resizes * (e.g., a window resize) are usually detected by * device-specific code. * An example is ... * * static void X11_Size(double *left, double *right, * double *bottom, double *top, * pDevDesc dd); * * R_GE_gcontext parameters that should be honoured (if possible): * col, fill, gamma, lty, lwd * * As from R 2.13.2 this can be left unimplemented as NULL. */ #if R_USE_PROTOTYPES void (*size)(double *left, double *right, double *bottom, double *top, pDevDesc dd); #else void (*size)(); #endif /* * device_StrWidth should return the width of the given * string in DEVICE units. * An example is ... * * static double X11_StrWidth(const char *str, * const pGEcontext gc, * pDevDesc dd) * * R_GE_gcontext parameters that should be honoured (if possible): * font, cex, ps */ #if R_USE_PROTOTYPES double (*strWidth)(const char *str, const pGEcontext gc, pDevDesc dd); #else double (*strWidth)(); #endif /* * device_Text should have the side-effect that the * given text is drawn at the given location. * The text should be rotated according to rot (degrees) * An example is ... * * static void X11_Text(double x, double y, const char *str, * double rot, double hadj, * const pGEcontext gc, * pDevDesc dd); * * R_GE_gcontext parameters that should be honoured (if possible): * font, cex, ps, col, gamma */ #if R_USE_PROTOTYPES void (*text)(double x, double y, const char *str, double rot, double hadj, const pGEcontext gc, pDevDesc dd); #else void (*text)(); #endif /* * device_onExit is called by GEonExit when the user has aborted * some operation, and so an R_ProcessEvents call may not return normally. * It need not be set to any value; if null, it will not be called. * * An example is ... * * static void GA_onExit(pDevDesc dd); */ #if R_USE_PROTOTYPES void (*onExit)(pDevDesc dd); #else void (*onExit)(); #endif /* * device_getEvent is no longer used, but the slot is kept for back * compatibility of the structure. */ SEXP (*getEvent)(SEXP, const char *); /* --------- Optional features introduced in 2.7.0 --------- */ /* Does the device have a device-specific way to confirm a new frame (for e.g. par(ask=TRUE))? This should be NULL if it does not. If it does, it returns TRUE if the device handled this, and FALSE if it wants the engine to do so. There is an example in the windows() device. Can be left unimplemented as NULL. */ #if R_USE_PROTOTYPES Rboolean (*newFrameConfirm)(pDevDesc dd); #else Rboolean (*newFrameConfirm)(); #endif /* Some devices can plot UTF-8 text directly without converting to the native encoding, e.g. windows(), quartz() .... If this flag is true, all text *not in the symbol font* is sent in UTF8 to the textUTF8/strWidthUTF8 entry points. If the flag is TRUE, the metricInfo entry point should accept negative values for 'c' and treat them as indicating Unicode points (as well as positive values in a MBCS locale). */ Rboolean hasTextUTF8; /* and strWidthUTF8 */ #if R_USE_PROTOTYPES void (*textUTF8)(double x, double y, const char *str, double rot, double hadj, const pGEcontext gc, pDevDesc dd); double (*strWidthUTF8)(const char *str, const pGEcontext gc, pDevDesc dd); #else void (*textUTF8)(); double (*strWidthUTF8)(); #endif Rboolean wantSymbolUTF8; /* Is rotated text good enough to be preferable to Hershey in contour labels? Old default was FALSE. */ Rboolean useRotatedTextInContour; /* --------- Post-2.7.0 features --------- */ /* Added in 2.12.0: Changed graphics event handling. */ SEXP eventEnv; /* This is an environment holding event handlers. */ /* * eventHelper(dd, 1) is called by do_getGraphicsEvent before looking for a * graphics event. It will then call R_ProcessEvents() and eventHelper(dd, 2) * until this or another device returns sets a non-null result value in eventEnv, * at which time eventHelper(dd, 0) will be called. * * An example is ... * * static SEXP GA_eventHelper(pDevDesc dd, int code); * Can be left unimplemented as NULL */ #if R_USE_PROTOTYPES void (*eventHelper)(pDevDesc dd, int code); #else void (*eventHelper)(); #endif /* added in 2.14.0, only used by screen devices. Allows graphics devices to have multiple levels of suspension: when this reaches zero output is flushed. Can be left unimplemented as NULL. */ #if R_USE_PROTOTYPES int (*holdflush)(pDevDesc dd, int level); #else int (*holdflush)(); #endif /* added in 2.14.0, for dev.capabilities. In all cases 0 means NA (unset). */ int haveTransparency; /* 1 = no, 2 = yes */ int haveTransparentBg; /* 1 = no, 2 = fully, 3 = semi */ int haveRaster; /* 1 = no, 2 = yes, 3 = except for missing values */ int haveCapture, haveLocator; /* 1 = no, 2 = yes */ /* Area for future expansion. By zeroing this, devices are more likely to work if loaded into a later version of R than that they were compiled under. */ char reserved[64]; }; /********************************************************/ /* the device-driver entry point is given a device */ /* description structure that it must set up. this */ /* involves several important jobs ... */ /* (1) it must ALLOCATE a new device-specific parameters*/ /* structure and FREE that structure if anything goes */ /* wrong (i.e., it won't report a successful setup to */ /* the graphics engine (the graphics engine is NOT */ /* responsible for allocating or freeing device-specific*/ /* resources or parameters) */ /* (2) it must initialise the device-specific resources */ /* and parameters (mostly done by calling device_Open) */ /* (3) it must initialise the generic graphical */ /* parameters that are not initialised by GInit (because*/ /* only the device knows what values they should have) */ /* see Graphics.h for the official list of these */ /* (4) it may reset generic graphics parameters that */ /* have already been initialised by GInit (although you */ /* should know what you are doing if you do this) */ /* (5) it must attach the device-specific parameters */ /* structure to the device description structure */ /* e.g., dd->deviceSpecfic = (void *) xd; */ /* (6) it must FREE the overall device description if */ /* it wants to bail out to the top-level */ /* the graphics engine is responsible for allocating */ /* the device description and freeing it in most cases */ /* but if the device driver freaks out it needs to do */ /* the clean-up itself */ /********************************************************/ /* moved from Rgraphics.h */ /* * Some Notes on Color * * R uses a 24-bit color model. Colors are specified in 32-bit * integers which are partitioned into 4 bytes as follows. * * <-- most sig least sig --> * +-------------------------------+ * | 0 | blue | green | red | * +-------------------------------+ * * The red, green and blue bytes can be extracted as follows. * * red = ((color ) & 255) * green = ((color >> 8) & 255) * blue = ((color >> 16) & 255) */ /* * Changes as from 1.4.0: use top 8 bits as an alpha channel. * 0 = opaque, 255 = transparent. */ /* * Changes as from 2.0.0: use top 8 bits as full alpha channel * 255 = opaque, 0 = transparent * [to conform with SVG, PDF and others] * and everything in between is used * [which means that NA is not stored as an internal colour; * it is converted to R_RGBA(255, 255, 255, 0)] */ #define R_RGB(r,g,b) ((r)|((g)<<8)|((b)<<16)|0xFF000000) #define R_RGBA(r,g,b,a) ((r)|((g)<<8)|((b)<<16)|((a)<<24)) #define R_RED(col) (((col) )&255) #define R_GREEN(col) (((col)>> 8)&255) #define R_BLUE(col) (((col)>>16)&255) #define R_ALPHA(col) (((col)>>24)&255) #define R_OPAQUE(col) (R_ALPHA(col) == 255) #define R_TRANSPARENT(col) (R_ALPHA(col) == 0) /* * A transparent white */ #define R_TRANWHITE (R_RGBA(255, 255, 255, 0)) /* used in various devices */ #define curDevice Rf_curDevice #define killDevice Rf_killDevice #define ndevNumber Rf_ndevNumber #define NewFrameConfirm Rf_NewFrameConfirm #define nextDevice Rf_nextDevice #define NoDevices Rf_NoDevices #define NumDevices Rf_NumDevices #define prevDevice Rf_prevDevice #define selectDevice Rf_selectDevice #define AdobeSymbol2utf8 Rf_AdobeSymbol2utf8 /* Properly declared version of devNumber */ int ndevNumber(pDevDesc ); /* How many devices exist ? (>= 1) */ int NumDevices(void); /* Check for an available device slot */ void R_CheckDeviceAvailable(void); Rboolean R_CheckDeviceAvailableBool(void); /* Return the number of the current device. */ int curDevice(void); /* Return the number of the next device. */ int nextDevice(int); /* Return the number of the previous device. */ int prevDevice(int); /* Make the specified device (specified by number) the current device */ int selectDevice(int); /* Kill device which is identified by number. */ void killDevice(int); int NoDevices(void); /* used in engine, graphics, plot, grid */ void NewFrameConfirm(pDevDesc); /* used in graphics.c, grid */ /* Graphics events: defined in gevents.c */ /* These give the indices of some known keys */ typedef enum {knUNKNOWN = -1, knLEFT = 0, knUP, knRIGHT, knDOWN, knF1, knF2, knF3, knF4, knF5, knF6, knF7, knF8, knF9, knF10, knF11, knF12, knPGUP, knPGDN, knEND, knHOME, knINS, knDEL} R_KeyName; /* These are the three possible mouse events */ typedef enum {meMouseDown = 0, meMouseUp, meMouseMove} R_MouseEvent; #define leftButton 1 #define middleButton 2 #define rightButton 4 #define doKeybd Rf_doKeybd #define doMouseEvent Rf_doMouseEvent void doMouseEvent(pDevDesc dd, R_MouseEvent event, int buttons, double x, double y); void doKeybd(pDevDesc dd, R_KeyName rkey, const char *keyname); /* For use in third-party devices when setting up a device: * duplicates Defn.h which is used internally. * (Tested in devNull.c) */ #ifndef BEGIN_SUSPEND_INTERRUPTS /* Macros for suspending interrupts */ #define BEGIN_SUSPEND_INTERRUPTS do { \ Rboolean __oldsusp__ = R_interrupts_suspended; \ R_interrupts_suspended = TRUE; #define END_SUSPEND_INTERRUPTS R_interrupts_suspended = __oldsusp__; \ if (R_interrupts_pending && ! R_interrupts_suspended) \ Rf_onintr(); \ } while(0) #include <R_ext/libextern.h> LibExtern Rboolean R_interrupts_suspended; LibExtern int R_interrupts_pending; extern void Rf_onintr(void); LibExtern Rboolean mbcslocale; #endif /* Useful for devices: translates Adobe symbol encoding to UTF-8 */ extern void *AdobeSymbol2utf8(char*out, const char *in, size_t nwork); /* Translates Unicode point to UTF-8 */ extern size_t Rf_ucstoutf8(char *s, const unsigned int c); #ifdef __cplusplus } #endif #endif /* R_GRAPHICSDEVICE_ */ |
Added undroid/Rtcl/compat/R/R_ext/GraphicsEngine.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2001-11 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Used by graphics.c, grid and by third-party graphics devices */ #ifndef R_GRAPHICSENGINE_H_ #define R_GRAPHICSENGINE_H_ #ifdef __cplusplus extern "C" { #endif /* * The current graphics engine (including graphics device) API version * MUST be integer * * This number should be bumped whenever there are changes to * GraphicsEngine.h or GraphicsDevice.h so that add-on packages * that compile against these headers (graphics systems such as * graphics and grid; graphics devices such as gtkDevice, RSvgDevice) * can detect any version mismatch. * * Version 1: Introduction of the version number. * Version 2: GEDevDesc *dd dropped from GEcontourLines(). * Version 3: R_GE_str2col() added to API. (r41887) * Version 4: UTF-8 text hooks, useRotatedTextInContour, * add newFrameConfirm() to NewDevDesc. * New API: GEaddDevice[2] GEgetDevice, GEkillDevice, * ndevNumber. (R 2.7.0) * Version 5: Clean up 1.4.0/2.0.0 changes! * Remove newDevStruct from GEDevDesc and NewDevDesc. * Remove asp, dot(), hold(), open() from NewDevDesc. * Move displayList, DLlastElt, savedSnapshot from * NewDevDesc to GEDevDesc. * Add 'ask' to GEDevDesc. (R 2.8.0) * Version 6: Add dev_Raster() and dev_Cap() (R 2.11.0) * Version 7: Change graphics event handling, adding eventEnv and eventHelper() * to DevDesc. (R 2.12.0) * Version 8: Add dev_Path() (R 2.12.0) * Version 9: Add dev_HoldFlush(), haveTrans*, haveRaster, * haveCapture, haveLocator. (R 2.14.0) * Version 10: For R 3.0.0. Typedef and use 'rcolor', * Remove name2col (R_GE_str2col does the job). * Version 11: For R 3.3.0. * Official support for saving/restoring display lists * across R sessions (via recordPlot() and replayPlot()) * - added grid DL to snapshots (used to be NULL) * - added this version number to snapshots (as attribute) * - added R version number to snapshots (as attribute) * - added pkgName to graphics system state info (as attribute) */ #define R_GE_version 11 int R_GE_getVersion(void); void R_GE_checkVersionOrDie(int version); /* The graphics engine will only accept locations and dimensions * in native device coordinates, but it provides the following functions * for converting between a couple of simple alternative coordinate * systems and device coordinates: * DEVICE = native units of the device * NDC = Normalised device coordinates * INCHES = inches (!) * CM = centimetres (!!) */ typedef enum { GE_DEVICE = 0, /* native device coordinates (rasters) */ GE_NDC = 1, /* normalised device coordinates x=(0,1), y=(0,1) */ GE_INCHES = 2, GE_CM = 3 } GEUnit; #define MAX_GRAPHICS_SYSTEMS 24 typedef enum { /* In response to this event, the registered graphics system * should allocate and initialise the systemSpecific structure * * Should return R_NilValue on failure so that engine * can tidy up memory allocation */ GE_InitState = 0, /* This event gives the registered system a chance to undo * anything done in the initialisation. */ GE_FinaliseState = 1, /* This is sent by the graphics engine prior to initialising * the display list. It give the graphics system the chance * to squirrel away information it will need for redrawing the * the display list */ GE_SaveState = 2, /* This is sent by the graphics engine prior to replaying the * display list. It gives the graphics system the chance to * restore any information it saved on the GE_SaveState event */ GE_RestoreState = 6, /* Copy system state information to the current device. * This is used when copying graphics from one device to another * so all the graphics system needs to do is to copy across * the bits required for the display list to draw faithfully * on the new device. */ GE_CopyState = 3, /* Create a snapshot of the system state that is sufficient * for the current "image" to be reproduced */ GE_SaveSnapshotState = 4, /* Restore the system state that is saved by GE_SaveSnapshotState */ GE_RestoreSnapshotState = 5, /* When replaying the display list, the graphics engine * checks, after each replayed action, that the action * produced valid output. This is the graphics system's * chance to say that the output is crap (in which case the * graphics engine will abort the display list replay). */ GE_CheckPlot = 7, /* The device wants to scale the current pointsize * (for scaling an image) * This is not a nice general solution, but a quick fix for * the Windows device. */ GE_ScalePS = 8 } GEevent; /* * Some line end/join constants */ typedef enum { GE_ROUND_CAP = 1, GE_BUTT_CAP = 2, GE_SQUARE_CAP = 3 } R_GE_lineend; typedef enum { GE_ROUND_JOIN = 1, GE_MITRE_JOIN = 2, GE_BEVEL_JOIN = 3 } R_GE_linejoin; /* * A structure containing graphical parameters * * This is how graphical parameters are passed from graphics systems * to the graphics engine AND from the graphics engine to graphics * devices. * * Devices are not *required* to honour graphical parameters * (e.g., alpha transparency is going to be tough for some) */ typedef struct { /* * Colours * * NOTE: Alpha transparency included in col & fill */ int col; /* pen colour (lines, text, borders, ...) */ int fill; /* fill colour (for polygons, circles, rects, ...) */ double gamma; /* Gamma correction */ /* * Line characteristics */ double lwd; /* Line width (roughly number of pixels) */ int lty; /* Line type (solid, dashed, dotted, ...) */ R_GE_lineend lend; /* Line end */ R_GE_linejoin ljoin; /* line join */ double lmitre; /* line mitre */ /* * Text characteristics */ double cex; /* Character expansion (font size = fontsize*cex) */ double ps; /* Font size in points */ double lineheight; /* Line height (multiply by font size) */ int fontface; /* Font face (plain, italic, bold, ...) */ char fontfamily[201]; /* Font family */ } R_GE_gcontext; typedef R_GE_gcontext* pGEcontext; #include <R_ext/GraphicsDevice.h> /* needed for DevDesc */ typedef struct _GEDevDesc GEDevDesc; typedef SEXP (* GEcallback)(GEevent, GEDevDesc *, SEXP); typedef struct { /* An array of information about each graphics system that * has registered with the graphics engine. * This is used to store graphics state for each graphics * system on each device. */ void *systemSpecific; /* * An array of function pointers, one per graphics system that * has registered with the graphics engine. * * system_Callback is called when the graphics engine wants * to give a graphics system the chance to play with its * device-specific information (stored in systemSpecific) * There are two parameters: an "event" to tell the graphics * system why the graphics engine has called this function, * and the systemSpecific pointer. The graphics engine * has to pass the systemSpecific pointer because only * the graphics engine will know what array index to use. */ GEcallback callback; } GESystemDesc; struct _GEDevDesc { /* * Stuff that the devices can see (and modify). * All detailed in GraphicsDevice.h */ pDevDesc dev; /* * Stuff about the device that only the graphics engine sees * (the devices don't see it). */ Rboolean displayListOn; /* toggle for display list status */ SEXP displayList; /* display list */ SEXP DLlastElt; /* A pointer to the end of the display list to avoid tranversing pairlists */ SEXP savedSnapshot; /* The last element of the display list * just prior to when the display list * was last initialised */ Rboolean dirty; /* Has the device received any output? */ Rboolean recordGraphics; /* Should a graphics call be stored * on the display list? * Set to FALSE by do_recordGraphics, * do_dotcallgr, and do_Externalgr * so that nested calls are not * recorded on the display list */ /* * Stuff about the device that only graphics systems see. * The graphics engine has no idea what is in here. * Used by graphics systems to store system state per device. */ GESystemDesc *gesd[MAX_GRAPHICS_SYSTEMS]; /* per-device setting for 'ask' (use NewFrameConfirm) */ Rboolean ask; }; typedef GEDevDesc* pGEDevDesc; /* functions from devices.c for use by graphics devices */ #define desc2GEDesc Rf_desc2GEDesc /* map DevDesc to enclosing GEDevDesc */ pGEDevDesc desc2GEDesc(pDevDesc dd); int GEdeviceNumber(pGEDevDesc); pGEDevDesc GEgetDevice(int); void GEaddDevice(pGEDevDesc); void GEaddDevice2(pGEDevDesc, const char *); void GEaddDevice2f(pGEDevDesc, const char *, const char *); void GEkillDevice(pGEDevDesc); pGEDevDesc GEcreateDevDesc(pDevDesc dev); void GEdestroyDevDesc(pGEDevDesc dd); void *GEsystemState(pGEDevDesc dd, int index); void GEregisterWithDevice(pGEDevDesc dd); void GEregisterSystem(GEcallback callback, int *systemRegisterIndex); void GEunregisterSystem(int registerIndex); SEXP GEhandleEvent(GEevent event, pDevDesc dev, SEXP data); #define fromDeviceX GEfromDeviceX #define toDeviceX GEtoDeviceX #define fromDeviceY GEfromDeviceY #define toDeviceY GEtoDeviceY #define fromDeviceWidth GEfromDeviceWidth #define toDeviceWidth GEtoDeviceWidth #define fromDeviceHeight GEfromDeviceHeight #define toDeviceHeight GEtoDeviceHeight double fromDeviceX(double value, GEUnit to, pGEDevDesc dd); double toDeviceX(double value, GEUnit from, pGEDevDesc dd); double fromDeviceY(double value, GEUnit to, pGEDevDesc dd); double toDeviceY(double value, GEUnit from, pGEDevDesc dd); double fromDeviceWidth(double value, GEUnit to, pGEDevDesc dd); double toDeviceWidth(double value, GEUnit from, pGEDevDesc dd); double fromDeviceHeight(double value, GEUnit to, pGEDevDesc dd); double toDeviceHeight(double value, GEUnit from, pGEDevDesc dd); /*------------------------------------------------------------------- * * COLOUR CODE is concerned with the internals of R colour representation * * From colors.c, used in par.c, grid/src/gpar.c */ typedef unsigned int rcolor; #define RGBpar Rf_RGBpar #define RGBpar3 Rf_RGBpar3 #define col2name Rf_col2name /* Convert an element of a R colour specification (which might be a number or a string) into an internal colour specification. */ rcolor RGBpar(SEXP, int); rcolor RGBpar3(SEXP, int, rcolor); /* Convert an internal colour specification to/from a colour name */ const char *col2name(rcolor col); /* used in par.c, grid */ /* Convert either a name or a #RRGGBB[AA] string to internal. Because people were using it, it also converts "1", "2" ... to a colour in the palette, and "0" to transparent white. */ rcolor R_GE_str2col(const char *s); /* * Some Notes on Line Textures * * Line textures are stored as an array of 4-bit integers within * a single 32-bit word. These integers contain the lengths of * lines to be drawn with the pen alternately down and then up. * The device should try to arrange that these values are measured * in points if possible, although pixels is ok on most displays. * * If newlty contains a line texture description it is decoded * as follows: * * ndash = 0; * for(i=0 ; i<8 && newlty & 15 ; i++) { * dashlist[ndash++] = newlty & 15; * newlty = newlty>>4; * } * dashlist[0] = length of pen-down segment * dashlist[1] = length of pen-up segment * etc * * An integer containing a zero terminates the pattern. Hence * ndash in this code fragment gives the length of the texture * description. If a description contains an odd number of * elements it is replicated to create a pattern with an * even number of elements. (If this is a pain, do something * different its not crucial). * */ /*--- The basic numbered & names line types; Here device-independent: e.g. "dashed" == "44", "dotdash" == "1343" */ /* NB: was also in Rgraphics.h in R < 2.7.0 */ #define LTY_BLANK -1 #define LTY_SOLID 0 #define LTY_DASHED 4 + (4<<4) #define LTY_DOTTED 1 + (3<<4) #define LTY_DOTDASH 1 + (3<<4) + (4<<8) + (3<<12) #define LTY_LONGDASH 7 + (3<<4) #define LTY_TWODASH 2 + (2<<4) + (6<<8) + (2<<12) R_GE_lineend GE_LENDpar(SEXP value, int ind); SEXP GE_LENDget(R_GE_lineend lend); R_GE_linejoin GE_LJOINpar(SEXP value, int ind); SEXP GE_LJOINget(R_GE_linejoin ljoin); void GESetClip(double x1, double y1, double x2, double y2, pGEDevDesc dd); void GENewPage(const pGEcontext gc, pGEDevDesc dd); void GELine(double x1, double y1, double x2, double y2, const pGEcontext gc, pGEDevDesc dd); void GEPolyline(int n, double *x, double *y, const pGEcontext gc, pGEDevDesc dd); void GEPolygon(int n, double *x, double *y, const pGEcontext gc, pGEDevDesc dd); SEXP GEXspline(int n, double *x, double *y, double *s, Rboolean open, Rboolean repEnds, Rboolean draw, const pGEcontext gc, pGEDevDesc dd); void GECircle(double x, double y, double radius, const pGEcontext gc, pGEDevDesc dd); void GERect(double x0, double y0, double x1, double y1, const pGEcontext gc, pGEDevDesc dd); void GEPath(double *x, double *y, int npoly, int *nper, Rboolean winding, const pGEcontext gc, pGEDevDesc dd); void GERaster(unsigned int *raster, int w, int h, double x, double y, double width, double height, double angle, Rboolean interpolate, const pGEcontext gc, pGEDevDesc dd); SEXP GECap(pGEDevDesc dd); void GEText(double x, double y, const char * const str, cetype_t enc, double xc, double yc, double rot, const pGEcontext gc, pGEDevDesc dd); void GEMode(int mode, pGEDevDesc dd); void GESymbol(double x, double y, int pch, double size, const pGEcontext gc, pGEDevDesc dd); void GEPretty(double *lo, double *up, int *ndiv); void GEMetricInfo(int c, const pGEcontext gc, double *ascent, double *descent, double *width, pGEDevDesc dd); double GEStrWidth(const char *str, cetype_t enc, const pGEcontext gc, pGEDevDesc dd); double GEStrHeight(const char *str, cetype_t enc, const pGEcontext gc, pGEDevDesc dd); void GEStrMetric(const char *str, cetype_t enc, const pGEcontext gc, double *ascent, double *descent, double *width, pGEDevDesc dd); int GEstring_to_pch(SEXP pch); /*------------------------------------------------------------------- * * LINE TEXTURE CODE is concerned with the internals of R * line texture representation. */ unsigned int GE_LTYpar(SEXP, int); SEXP GE_LTYget(unsigned int); /* * Raster operations */ void R_GE_rasterScale(unsigned int *sraster, int sw, int sh, unsigned int *draster, int dw, int dh); void R_GE_rasterInterpolate(unsigned int *sraster, int sw, int sh, unsigned int *draster, int dw, int dh); void R_GE_rasterRotatedSize(int w, int h, double angle, int *wnew, int *hnew); void R_GE_rasterRotatedOffset(int w, int h, double angle, int botleft, double *xoff, double *yoff); void R_GE_rasterResizeForRotation(unsigned int *sraster, int w, int h, unsigned int *newRaster, int wnew, int hnew, const pGEcontext gc); void R_GE_rasterRotate(unsigned int *sraster, int w, int h, double angle, unsigned int *draster, const pGEcontext gc, Rboolean perPixelAlpha); /* * From plotmath.c */ double GEExpressionWidth(SEXP expr, const pGEcontext gc, pGEDevDesc dd); double GEExpressionHeight(SEXP expr, const pGEcontext gc, pGEDevDesc dd); void GEExpressionMetric(SEXP expr, const pGEcontext gc, double *ascent, double *descent, double *width, pGEDevDesc dd); void GEMathText(double x, double y, SEXP expr, double xc, double yc, double rot, const pGEcontext gc, pGEDevDesc dd); /* * (End from plotmath.c) */ /* * From plot3d.c : used in package clines */ SEXP GEcontourLines(double *x, int nx, double *y, int ny, double *z, double *levels, int nl); /* * (End from plot3d.c) */ /* * From vfonts.c */ double R_GE_VStrWidth(const char *s, cetype_t enc, const pGEcontext gc, pGEDevDesc dd); double R_GE_VStrHeight(const char *s, cetype_t enc, const pGEcontext gc, pGEDevDesc dd); void R_GE_VText(double x, double y, const char * const s, cetype_t enc, double x_justify, double y_justify, double rotation, const pGEcontext gc, pGEDevDesc dd); /* * (End from vfonts.c) */ /* Also in Graphics.h */ #define DEG2RAD 0.01745329251994329576 pGEDevDesc GEcurrentDevice(void); Rboolean GEdeviceDirty(pGEDevDesc dd); void GEdirtyDevice(pGEDevDesc dd); Rboolean GEcheckState(pGEDevDesc dd); Rboolean GErecording(SEXP call, pGEDevDesc dd); void GErecordGraphicOperation(SEXP op, SEXP args, pGEDevDesc dd); void GEinitDisplayList(pGEDevDesc dd); void GEplayDisplayList(pGEDevDesc dd); void GEcopyDisplayList(int fromDevice); SEXP GEcreateSnapshot(pGEDevDesc dd); void GEplaySnapshot(SEXP snapshot, pGEDevDesc dd); void GEonExit(void); void GEnullDevice(void); /* From ../../main/plot.c, used by ../../library/grid/src/grid.c : */ #define CreateAtVector Rf_CreateAtVector SEXP CreateAtVector(double*, double*, int, Rboolean); /* From ../../main/graphics.c, used by ../../library/grDevices/src/axis_scales.c : */ #define GAxisPars Rf_GAxisPars void GAxisPars(double *min, double *max, int *n, Rboolean log, int axis); #ifdef __cplusplus } #endif #endif /* R_GRAPHICSENGINE_ */ |
Added undroid/Rtcl/compat/R/R_ext/Itermacros.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2001-12 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Macros to help defining vectorized functions with proper recycling and periodic interrupt checks. */ #ifndef R_EXT_ITERMACROS_H_ #define R_EXT_ITERMACROS_H_ #define LOOP_WITH_INTERRUPT_CHECK(LOOP, ncheck, n, ...) do { \ for (size_t __intr_threshold__ = ncheck; \ TRUE; \ __intr_threshold__ += ncheck) { \ size_t __intr_end__ = n < __intr_threshold__ ? \ n : __intr_threshold__; \ LOOP(__intr_end__, __VA_ARGS__); \ if (__intr_end__ == n) break; \ else R_CheckUserInterrupt(); \ } \ } while (0) #define R_ITERATE_CORE(n, i, loop_body) do { \ for (; i < n; ++i) { loop_body } \ } while (0) #define R_ITERATE(n, i, loop_body) do { \ i = 0; \ R_ITERATE_CORE(n, i, loop_body); \ } while (0) #define R_ITERATE_CHECK(ncheck, n, i, loop_body) do { \ i = 0; \ LOOP_WITH_INTERRUPT_CHECK(R_ITERATE_CORE, ncheck, n, i, loop_body); \ } while (0) #define MOD_ITERATE1_CORE(n, n1, i, i1, loop_body) do { \ for (; i < n; \ i1 = (++i1 == n1) ? 0 : i1, \ ++i) { \ loop_body \ } \ } while (0) #define MOD_ITERATE1(n, n1, i, i1, loop_body) do { \ i = i1 = 0; \ MOD_ITERATE1_CORE(n, n1, i, i1, loop_body); \ } while (0) #define MOD_ITERATE1_CHECK(ncheck, n, n1, i, i1, loop_body) do { \ i = i1 = 0; \ LOOP_WITH_INTERRUPT_CHECK(MOD_ITERATE1_CORE, ncheck, n, \ n1, i, i1, loop_body); \ } while (0) #define MOD_ITERATE2_CORE(n, n1, n2, i, i1, i2, loop_body) do { \ for (; i < n; \ i1 = (++i1 == n1) ? 0 : i1, \ i2 = (++i2 == n2) ? 0 : i2, \ ++i) { \ loop_body \ } \ } while (0) #define MOD_ITERATE2(n, n1, n2, i, i1, i2, loop_body) do { \ i = i1 = i2 = 0; \ MOD_ITERATE2_CORE(n, n1, n2, i, i1, i2, loop_body); \ } while (0) #define MOD_ITERATE2_CHECK(ncheck, n, n1, n2, i, i1, i2, loop_body) do { \ i = i1 = i2 = 0; \ LOOP_WITH_INTERRUPT_CHECK(MOD_ITERATE2_CORE, ncheck, n, \ n1, n2, i, i1, i2, loop_body); \ } while (0) #define MOD_ITERATE MOD_ITERATE2 #define MOD_ITERATE_CORE MOD_ITERATE2_CORE #define MOD_ITERATE_CHECK MOD_ITERATE2_CHECK #define MOD_ITERATE3_CORE(n, n1, n2, n3, i, i1, i2, i3, loop_body) do { \ for (; i < n; \ i1 = (++i1 == n1) ? 0 : i1, \ i2 = (++i2 == n2) ? 0 : i2, \ i3 = (++i3 == n3) ? 0 : i3, \ ++i) { \ loop_body \ } \ } while (0) #define MOD_ITERATE3(n, n1, n2, n3, i, i1, i2, i3, loop_body) do { \ i = i1 = i2 = i3 = 0; \ MOD_ITERATE3_CORE(n, n1, n2, n3, i, i1, i2, i3, loop_body); \ } while (0) #define MOD_ITERATE3_CHECK(ncheck, n, n1, n2, n3, i, i1, i2, i3, loop_body) \ do { \ i = i1 = i2 = i3 = 0; \ LOOP_WITH_INTERRUPT_CHECK(MOD_ITERATE3_CORE, ncheck, n, \ n1, n2, n3, i, i1, i2, i3, loop_body); \ } while (0) #define MOD_ITERATE4_CORE(n, n1, n2, n3, n4, i, i1, i2, i3, i4, loop_body) \ do { \ for (; i < n; \ i1 = (++i1 == n1) ? 0 : i1, \ i2 = (++i2 == n2) ? 0 : i2, \ i3 = (++i3 == n3) ? 0 : i3, \ i4 = (++i4 == n4) ? 0 : i4, \ ++i) { \ loop_body \ } \ } while (0) #define MOD_ITERATE4(n, n1, n2, n3, n4, i, i1, i2, i3, i4, loop_body) do { \ i = i1 = i2 = i3 = i4 = 0; \ MOD_ITERATE4_CORE(n, n1, n2, n3, n4, i, i1, i2, i3, i4, loop_body); \ } while (0) #define MOD_ITERATE4_CHECK(ncheck, n, n1, n2, n3, n4, i, i1, i2, i3, i4, \ loop_body) \ do { \ i = i1 = i2 = i3 = i4 = 0; \ LOOP_WITH_INTERRUPT_CHECK(MOD_ITERATE4_CORE, ncheck, n, \ n1, n2, n3, n4, \ i, i1, i2, i3, i4, loop_body); \ } while (0) #define MOD_ITERATE5_CORE(n, n1, n2, n3, n4, n5, i, i1, i2, i3, i4, i5, \ loop_body) \ do { \ for (; i < n; \ i1 = (++i1 == n1) ? 0 : i1, \ i2 = (++i2 == n2) ? 0 : i2, \ i3 = (++i3 == n3) ? 0 : i3, \ i4 = (++i4 == n4) ? 0 : i4, \ i5 = (++i5 == n5) ? 0 : i5, \ ++i) { \ loop_body \ } \ } while (0) #define MOD_ITERATE5(n, n1, n2, n3, n4, n5, i, i1, i2, i3, i4, i5, loop_body) \ do { \ i = i1 = i2 = i3 = i4 = i5 = 0; \ MOD_ITERATE5_CORE(n, n1, n2, n3, n4, n5, i, i1, i2, i3, i4, i5, \ loop_body); \ } while (0) #define MOD_ITERATE5_CHECK(ncheck, n, n1, n2, n3, n4, n5, \ i, i1, i2, i3, i4, i5, \ loop_body) \ do { \ i = i1 = i2 = i3 = i4 = i5 = 0; \ LOOP_WITH_INTERRUPT_CHECK(MOD_ITERATE5_CORE, ncheck, n, \ n1, n2, n3, n4, n5, \ i, i1, i2, i3, i4, i5, loop_body); \ } while (0) #endif /* R_EXT_ITERMACROS_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/Lapack.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2003-2016 The R Core Team. * Copyright (C) 2008 The R Foundation * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* C declarations of LAPACK Fortran subroutines included in R. Just those used (currently or previously) by C routines in R itself. Part of the API. R packages that use these should have PKG_LIBS in src/Makevars include $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) */ #ifndef R_LAPACK_H #define R_LAPACK_H #include <R_ext/RS.h> /* for F77_... */ #include <R_ext/Complex.h> /* for Rcomplex */ #include <R_ext/BLAS.h> /* LAPACK function names are [dz]<name>(), where d denotes the real version of the function, z the complex version. (Only double-precision versions are used in R.) */ #ifdef __cplusplus extern "C" { #endif /* The LAPACK version: might change after installation with external LAPACK */ extern void F77_NAME(ilaver)(int *major, int *minor, int *patch); // Never defined by R itself. #ifndef La_extern #define La_extern extern #endif // Utilities for Lapack-using packages : // ------------------------------------ /* matrix norms: converting typstr[] to one of {'M', 'O', 'I', 'F'} * or signal error(): */ // La_extern char La_norm_type(const char *typstr); /* matrix (reciprocal) condition numbers: convert typstr[] to 'O'(ne) or 'I'(nf) * or signal error(): */ // La_extern char La_rcond_type(const char *typstr); /* Selected Double Precision Lapack Routines ======== */ //* Double precision BiDiagonal and DIagonal matrices -> DBD & DDI /* DBDSQR - compute the singular value decomposition (SVD) of a real */ /* N-by-N (upper or lower) bidiagonal matrix B */ La_extern void F77_NAME(dbdsqr)(const char* uplo, const int* n, const int* ncvt, const int* nru, const int* ncc, double* d, double* e, double* vt, const int* ldvt, double* u, const int* ldu, double* c, const int* ldc, double* work, int* info); /* DDISNA - compute the reciprocal condition numbers for the */ /* eigenvectors of a real symmetric or complex Hermitian matrix or */ /* for the left or right singular vectors of a general m-by-n */ /* matrix */ La_extern void F77_NAME(ddisna)(const char* job, const int* m, const int* n, double* d, double* sep, int* info); //* Double precision General Banded matrices -> DGB /* DGBBRD - reduce a real general m-by-n band matrix A to upper */ /* bidiagonal form B by an orthogonal transformation */ La_extern void F77_NAME(dgbbrd)(const char* vect, const int* m, const int* n, const int* ncc, const int* kl, const int* ku, double* ab, const int* ldab, double* d, double* e, double* q, const int* ldq, double* pt, const int* ldpt, double* c, const int* ldc, double* work, int* info); /* DGBCON - estimate the reciprocal of the condition number of a */ /* real general band matrix A, in either the 1-norm or the */ /* infinity-norm */ La_extern void F77_NAME(dgbcon)(const char* norm, const int* n, const int* kl, const int* ku, double* ab, const int* ldab, int* ipiv, const double* anorm, double* rcond, double* work, int* iwork, int* info); /* DGBEQU - compute row and column scalings intended to equilibrate */ /* an M-by-N band matrix A and reduce its condition number */ La_extern void F77_NAME(dgbequ)(const int* m, const int* n, const int* kl, const int* ku, double* ab, const int* ldab, double* r, double* c, double* rowcnd, double* colcnd, double* amax, int* info); /* DGBRFS - improve the computed solution to a system of linear */ /* equations when the coefficient matrix is banded, and provides */ /* error bounds and backward error estimates for the solution */ La_extern void F77_NAME(dgbrfs)(const char* trans, const int* n, const int* kl, const int* ku, const int* nrhs, double* ab, const int* ldab, double* afb, const int* ldafb, int* ipiv, double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DGBSV - compute the solution to a real system of linear */ /* equations A * X = B, where A is a band matrix of order N with */ /* KL subdiagonals and KU superdiagonals, and X and B are */ /* N-by-NRHS matrices */ La_extern void F77_NAME(dgbsv)(const int* n, const int* kl,const int* ku, const int* nrhs, double* ab, const int* ldab, int* ipiv, double* b, const int* ldb, int* info); /* DGBSVX - use the LU factorization to compute the solution to a */ /* real system of linear equations A * X = B or A**T * X = B */ La_extern void F77_NAME(dgbsvx)(const int* fact, const char* trans, const int* n, const int* kl,const int* ku, const int* nrhs, double* ab, const int* ldab, double* afb, const int* ldafb, int* ipiv, const char* equed, double* r, double* c, double* b, const int* ldb, double* x, const int* ldx, double* rcond, double* ferr, double* berr, double* work, int* iwork, int* info); /* DGBTF2 - compute an LU factorization of a real m-by-n band */ /* matrix A using partial pivoting with row interchanges */ La_extern void F77_NAME(dgbtf2)(const int* m, const int* n, const int* kl,const int* ku, double* ab, const int* ldab, int* ipiv, int* info); /* DGBTRF - compute an LU factorization of a real m-by-n band */ /* matrix A using partial pivoting with row interchanges */ La_extern void F77_NAME(dgbtrf)(const int* m, const int* n, const int* kl,const int* ku, double* ab, const int* ldab, int* ipiv, int* info); /* DGBTRS - solve a system of linear equations A * X = B or */ /* A' * X = B with a general band matrix A using the LU */ /* factorization computed by DGBTRF */ La_extern void F77_NAME(dgbtrs)(const char* trans, const int* n, const int* kl, const int* ku, const int* nrhs, const double* ab, const int* ldab, const int* ipiv, double* b, const int* ldb, int* info); //* Double precision GEneral matrices -> DGE /* DGEBAK - form the right or left eigenvectors of a real general */ /* matrix by backward transformation on the computed eigenvectors */ /* of the balanced matrix output by DGEBAL */ La_extern void F77_NAME(dgebak)(const char* job, const char* side, const int* n, const int* ilo, const int* ihi, double* scale, const int* m, double* v, const int* ldv, int* info); /* DGEBAL - balance a general real matrix A */ La_extern void F77_NAME(dgebal)(const char* job, const int* n, double* a, const int* lda, int* ilo, int* ihi, double* scale, int* info); /* DGEBD2 - reduce a real general m by n matrix A to upper or */ /* lower bidiagonal form B by an orthogonal transformation */ La_extern void F77_NAME(dgebd2)(const int* m, const int* n, double* a, const int* lda, double* d, double* e, double* tauq, double* taup, double* work, int* info); /* DGEBRD - reduce a general real M-by-N matrix A to upper or */ /* lower bidiagonal form B by an orthogonal transformation */ La_extern void F77_NAME(dgebrd)(const int* m, const int* n, double* a, const int* lda, double* d, double* e, double* tauq, double* taup, double* work, const int* lwork, int* info); /* DGECON - estimate the reciprocal of the condition number of a */ /* general real matrix A, in either the 1-norm or the */ /* infinity-norm, using the LU factorization computed by DGETRF */ La_extern void F77_NAME(dgecon)(const char* norm, const int* n, const double* a, const int* lda, const double* anorm, double* rcond, double* work, int* iwork, int* info); /* DGEEQU - compute row and column scalings intended to equilibrate */ /* an M-by-N matrix A and reduce its condition number */ La_extern void F77_NAME(dgeequ)(const int* m, const int* n, double* a, const int* lda, double* r, double* c, double* rowcnd, double* colcnd, double* amax, int* info); /* DGEES - compute for an N-by-N real nonsymmetric matrix A, the */ /* eigenvalues, the real Schur form T, and, optionally, the matrix */ /* of Schur vectors Z */ La_extern void F77_NAME(dgees)(const char* jobvs, const char* sort, int (*select)(const double*, const double*), const int* n, double* a, const int* lda, int* sdim, double* wr, double* wi, double* vs, const int* ldvs, double* work, const int* lwork, int* bwork, int* info); /* DGEESX - compute for an N-by-N real nonsymmetric matrix A, the */ /* eigenvalues, the real Schur form T, and, optionally, the matrix */ /* of Schur vectors Z */ La_extern void F77_NAME(dgeesx)(const char* jobvs, const char* sort, int (*select)(const double*, const double*), const char* sense, const int* n, double* a, const int* lda, int* sdim, double* wr, double* wi, double* vs, const int* ldvs, double* rconde, double* rcondv, double* work, const int* lwork, int* iwork, const int* liwork, int* bwork, int* info); /* DGEEV - compute for an N-by-N real nonsymmetric matrix A, the */ /* eigenvalues and, optionally, the left and/or right eigenvectors */ La_extern void F77_NAME(dgeev)(const char* jobvl, const char* jobvr, const int* n, double* a, const int* lda, double* wr, double* wi, double* vl, const int* ldvl, double* vr, const int* ldvr, double* work, const int* lwork, int* info); /* DGEEVX - compute for an N-by-N real nonsymmetric matrix A, the */ /* eigenvalues and, optionally, the left and/or right eigenvectors */ La_extern void F77_NAME(dgeevx)(const char* balanc, const char* jobvl, const char* jobvr, const char* sense, const int* n, double* a, const int* lda, double* wr, double* wi, double* vl, const int* ldvl, double* vr, const int* ldvr, int* ilo, int* ihi, double* scale, double* abnrm, double* rconde, double* rcondv, double* work, const int* lwork, int* iwork, int* info); /* DGEHD2 - reduce a real general matrix A to upper Hessenberg */ /* form H by an orthogonal similarity transformation */ La_extern void F77_NAME(dgehd2)(const int* n, const int* ilo, const int* ihi, double* a, const int* lda, double* tau, double* work, int* info); /* DGEHRD - reduce a real general matrix A to upper Hessenberg */ /* form H by an orthogonal similarity transformation */ La_extern void F77_NAME(dgehrd)(const int* n, const int* ilo, const int* ihi, double* a, const int* lda, double* tau, double* work, const int* lwork, int* info); /* DGELQ2 - compute an LQ factorization of a real m by n matrix A */ La_extern void F77_NAME(dgelq2)(const int* m, const int* n, double* a, const int* lda, double* tau, double* work, int* info); /* DGELQF - compute an LQ factorization of a real M-by-N matrix A */ La_extern void F77_NAME(dgelqf)(const int* m, const int* n, double* a, const int* lda, double* tau, double* work, const int* lwork, int* info); /* DGELS - solve overdetermined or underdetermined real linear */ /* systems involving an M-by-N matrix A, or its transpose, using a */ /* QR or LQ factorization of A */ La_extern void F77_NAME(dgels)(const char* trans, const int* m, const int* n, const int* nrhs, double* a, const int* lda, double* b, const int* ldb, double* work, const int* lwork, int* info); /* DGELSS - compute the minimum norm solution to a real linear */ /* least squares problem */ La_extern void F77_NAME(dgelss)(const int* m, const int* n, const int* nrhs, double* a, const int* lda, double* b, const int* ldb, double* s, double* rcond, int* rank, double* work, const int* lwork, int* info); /* DGELSY - compute the minimum-norm solution to a real linear */ /* least squares problem */ La_extern void F77_NAME(dgelsy)(const int* m, const int* n, const int* nrhs, double* a, const int* lda, double* b, const int* ldb, int* jpvt, const double* rcond, int* rank, double* work, const int* lwork, int* info); /* DGEQL2 - compute a QL factorization of a real m by n matrix A */ La_extern void F77_NAME(dgeql2)(const int* m, const int* n, double* a, const int* lda, double* tau, double* work, int* info); /* DGEQLF - compute a QL factorization of a real M-by-N matrix A */ La_extern void F77_NAME(dgeqlf)(const int* m, const int* n, double* a, const int* lda, double* tau, double* work, const int* lwork, int* info); /* DGEQP3 - compute a QR factorization with column pivoting of a */ /* real M-by-N matrix A using level 3 BLAS */ La_extern void F77_NAME(dgeqp3)(const int* m, const int* n, double* a, const int* lda, int* jpvt, double* tau, double* work, const int* lwork, int* info); /* DGEQR2 - compute a QR factorization of a real m by n matrix A */ La_extern void F77_NAME(dgeqr2)(const int* m, const int* n, double* a, const int* lda, double* tau, double* work, int* info); /* DGEQRF - compute a QR factorization of a real M-by-N matrix A */ La_extern void F77_NAME(dgeqrf)(const int* m, const int* n, double* a, const int* lda, double* tau, double* work, const int* lwork, int* info); /* DGERFS - improve the computed solution to a system of linear */ /* equations and provides error bounds and backward error */ /* estimates for the solution */ La_extern void F77_NAME(dgerfs)(const char* trans, const int* n, const int* nrhs, double* a, const int* lda, double* af, const int* ldaf, int* ipiv, double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DGERQ2 - compute an RQ factorization of a real m by n matrix A */ La_extern void F77_NAME(dgerq2)(const int* m, const int* n, double* a, const int* lda, double* tau, double* work, int* info); /* DGERQF - compute an RQ factorization of a real M-by-N matrix A */ La_extern void F77_NAME(dgerqf)(const int* m, const int* n, double* a, const int* lda, double* tau, double* work, const int* lwork, int* info); /* DGESV - compute the solution to a real system of linear */ /* equations A * X = B, */ La_extern void F77_NAME(dgesv)(const int* n, const int* nrhs, double* a, const int* lda, int* ipiv, double* b, const int* ldb, int* info); /* DGESVD - compute the singular value decomposition (SVD); of a */ /* real M-by-N matrix A, optionally computing the left and/or */ /* right singular vectors */ La_extern void F77_NAME(dgesvd)(const char* jobu, const char* jobvt, const int* m, const int* n, double* a, const int* lda, double* s, double* u, const int* ldu, double* vt, const int* ldvt, double* work, const int* lwork, int* info); /* DGESVX - use the LU factorization to compute the solution to a */ /* real system of linear equations A * X = B, */ La_extern void F77_NAME(dgesvx)(const char* fact, const char* trans, const int* n, const int* nrhs, double* a, const int* lda, double* af, const int* ldaf, int* ipiv, char *equed, double* r, double* c, double* b, const int* ldb, double* x, const int* ldx, double* rcond, double* ferr, double* berr, double* work, int* iwork, int* info); /* DGETF2 - compute an LU factorization of a general m-by-n */ /* matrix A using partial pivoting with row interchanges */ La_extern void F77_NAME(dgetf2)(const int* m, const int* n, double* a, const int* lda, int* ipiv, int* info); /* DGETRF - compute an LU factorization of a general M-by-N */ /* matrix A using partial pivoting with row interchanges */ La_extern void F77_NAME(dgetrf)(const int* m, const int* n, double* a, const int* lda, int* ipiv, int* info); /* DGETRI - compute the inverse of a matrix using the LU */ /* factorization computed by DGETRF */ La_extern void F77_NAME(dgetri)(const int* n, double* a, const int* lda, int* ipiv, double* work, const int* lwork, int* info); /* DGETRS - solve a system of linear equations A * X = B or A' * */ /* X = B with a general N-by-N matrix A using the LU factorization */ /* computed by DGETRF */ La_extern void F77_NAME(dgetrs)(const char* trans, const int* n, const int* nrhs, const double* a, const int* lda, const int* ipiv, double* b, const int* ldb, int* info); //* Double precision General matrices Generalized problems -> DGG /* DGGBAK - form the right or left eigenvectors of a real */ /* generalized eigenvalue problem A*x = lambda*B*x, by backward */ /* transformation on the computed eigenvectors of the balanced */ /* pair of matrices output by DGGBAL */ La_extern void F77_NAME(dggbak)(const char* job, const char* side, const int* n, const int* ilo, const int* ihi, double* lscale, double* rscale, const int* m, double* v, const int* ldv, int* info); /* DGGBAL - balance a pair of general real matrices (A,B); */ La_extern void F77_NAME(dggbal)(const char* job, const int* n, double* a, const int* lda, double* b, const int* ldb, int* ilo, int* ihi, double* lscale, double* rscale, double* work, int* info); /* DGGES - compute for a pair of N-by-N real nonsymmetric */ /* matrices A, B the generalized eigenvalues, the generalized */ /* real Schur form (S,T), optionally, the left and/or right matrices */ /* of Schur vectors (VSL and VSR)*/ La_extern void F77_NAME(dgges)(const char* jobvsl, const char* jobvsr, const char* sort, int (*delztg)(double*, double*, double*), const int* n, double* a, const int* lda, double* b, const int* ldb, double* alphar, double* alphai, const double* beta, double* vsl, const int* ldvsl, double* vsr, const int* ldvsr, double* work, const int* lwork, int* bwork, int* info); /* DGGGLM - solve a general Gauss-Markov linear model (GLM) problem */ La_extern void F77_NAME(dggglm)(const int* n, const int* m, const int* p, double* a, const int* lda, double* b, const int* ldb, double* d, double* x, double* y, double* work, const int* lwork, int* info); /* DGGHRD - reduce a pair of real matrices (A,B); to generalized */ /* upper Hessenberg form using orthogonal transformations, where A */ /* is a general matrix and B is upper triangular */ La_extern void F77_NAME(dgghrd)(const char* compq, const char* compz, const int* n, const int* ilo, const int* ihi, double* a, const int* lda, double* b, const int* ldb, double* q, const int* ldq, double* z, const int* ldz, int* info); /* DGGLSE - solve the linear equality-constrained least squares */ /* (LSE) problem */ La_extern void F77_NAME(dgglse)(const int* m, const int* n, const int* p, double* a, const int* lda, double* b, const int* ldb, double* c, double* d, double* x, double* work, const int* lwork, int* info); /* DGGQRF - compute a generalized QR factorization of an N-by-M */ /* matrix A and an N-by-P matrix B */ La_extern void F77_NAME(dggqrf)(const int* n, const int* m, const int* p, double* a, const int* lda, double* taua, double* b, const int* ldb, double* taub, double* work, const int* lwork, int* info); /* DGGRQF - compute a generalized RQ factorization of an M-by-N */ /* matrix A and a P-by-N matrix B */ La_extern void F77_NAME(dggrqf)(const int* m, const int* p, const int* n, double* a, const int* lda, double* taua, double* b, const int* ldb, double* taub, double* work, const int* lwork, int* info); //* Double precision General Tridiagonal matrices -> DGT /* DGTCON - estimate the reciprocal of the condition number of a real */ /* tridiagonal matrix A using the LU factorization as computed by DGTTRF */ La_extern void F77_NAME(dgtcon)(const char* norm, const int* n, double* dl, double* d, double* du, double* du2, int* ipiv, const double* anorm, double* rcond, double* work, int* iwork, int* info); /* DGTRFS - improve the computed solution to a system of linear equations */ /* when the coefficient matrix is tridiagonal, and provides error bounds */ /* and backward error estimates for the solution */ La_extern void F77_NAME(dgtrfs)(const char* trans, const int* n, const int* nrhs, double* dl, double* d, double* du, double* dlf, double* df, double* duf, double* du2, int* ipiv, double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DGTSV - solve the equation A*X = B, */ La_extern void F77_NAME(dgtsv)(const int* n, const int* nrhs, double* dl, double* d, double* du, double* b, const int* ldb, int* info); /* DGTSVX - use the LU factorization to compute the solution to a */ /* real system of linear equations A * X = B or A**T * X = B, */ La_extern void F77_NAME(dgtsvx)(const int* fact, const char* trans, const int* n, const int* nrhs, double* dl, double* d, double* du, double* dlf, double* df, double* duf, double* du2, int* ipiv, double* b, const int* ldb, double* x, const int* ldx, double* rcond, double* ferr, double* berr, double* work, int* iwork, int* info); /* DGTTRF - compute an LU factorization of a real tridiagonal matrix */ /* A using elimination with partial pivoting and row interchanges */ La_extern void F77_NAME(dgttrf)(const int* n, double* dl, double* d, double* du, double* du2, int* ipiv, int* info); /* DGTTRS - solve one of the systems of equations A*X = B or */ /* A'*X = B, */ La_extern void F77_NAME(dgttrs)(const char* trans, const int* n, const int* nrhs, double* dl, double* d, double* du, double* du2, int* ipiv, double* b, const int* ldb, int* info); //* Double precision Orthogonal matrices -> DOP & DOR /* DOPGTR - generate a real orthogonal matrix Q which is defined */ /* as the product of n-1 elementary reflectors H(i); of order n, */ /* as returned by DSPTRD using packed storage */ La_extern void F77_NAME(dopgtr)(const char* uplo, const int* n, const double* ap, const double* tau, double* q, const int* ldq, double* work, int* info); /* DOPMTR - overwrite the general real M-by-N matrix C with */ /* SIDE = 'L' SIDE = 'R' TRANS = 'N' */ La_extern void F77_NAME(dopmtr)(const char* side, const char* uplo, const char* trans, const int* m, const int* n, const double* ap, const double* tau, double* c, const int* ldc, double* work, int* info); /* DORG2L - generate an m by n real matrix Q with orthonormal */ /* columns, */ La_extern void F77_NAME(dorg2l)(const int* m, const int* n, const int* k, double* a, const int* lda, const double* tau, double* work, int* info); /* DORG2R - generate an m by n real matrix Q with orthonormal */ /* columns, */ La_extern void F77_NAME(dorg2r)(const int* m, const int* n, const int* k, double* a, const int* lda, const double* tau, double* work, int* info); /* DORGBR - generate one of the real orthogonal matrices Q or */ /* P**T determined by DGEBRD when reducing a real matrix A to */ /* bidiagonal form */ La_extern void F77_NAME(dorgbr)(const char* vect, const int* m, const int* n, const int* k, double* a, const int* lda, const double* tau, double* work, const int* lwork, int* info); /* DORGHR - generate a real orthogonal matrix Q which is defined */ /* as the product of IHI-ILO elementary reflectors of order N, as */ /* returned by DGEHRD */ La_extern void F77_NAME(dorghr)(const int* n, const int* ilo, const int* ihi, double* a, const int* lda, const double* tau, double* work, const int* lwork, int* info); /* DORGL2 - generate an m by n real matrix Q with orthonormal */ /* rows, */ La_extern void F77_NAME(dorgl2)(const int* m, const int* n, const int* k, double* a, const int* lda, const double* tau, double* work, int* info); /* DORGLQ - generate an M-by-N real matrix Q with orthonormal */ /* rows, */ La_extern void F77_NAME(dorglq)(const int* m, const int* n, const int* k, double* a, const int* lda, const double* tau, double* work, const int* lwork, int* info); /* DORGQL - generate an M-by-N real matrix Q with orthonormal */ /* columns, */ La_extern void F77_NAME(dorgql)(const int* m, const int* n, const int* k, double* a, const int* lda, const double* tau, double* work, const int* lwork, int* info); /* DORGQR - generate an M-by-N real matrix Q with orthonormal */ /* columns, */ La_extern void F77_NAME(dorgqr)(const int* m, const int* n, const int* k, double* a, const int* lda, const double* tau, double* work, const int* lwork, int* info); /* DORGR2 - generate an m by n real matrix Q with orthonormal */ /* rows, */ La_extern void F77_NAME(dorgr2)(const int* m, const int* n, const int* k, double* a, const int* lda, const double* tau, double* work, int* info); /* DORGRQ - generate an M-by-N real matrix Q with orthonormal rows */ La_extern void F77_NAME(dorgrq)(const int* m, const int* n, const int* k, double* a, const int* lda, const double* tau, double* work, const int* lwork, int* info); /* DORGTR - generate a real orthogonal matrix Q which is defined */ /* as the product of n-1 elementary reflectors of order const int* n, as */ /* returned by DSYTRD */ La_extern void F77_NAME(dorgtr)(const char* uplo, const int* n, double* a, const int* lda, const double* tau, double* work, const int* lwork, int* info); /* DORM2L - overwrite the general real m by n matrix C with Q * */ /* C if SIDE = 'L' and TRANS = 'N', or Q'* C if SIDE = 'L' and */ /* TRANS = 'T', or C * Q if SIDE = 'R' and TRANS = 'N', or C * */ /* Q' if SIDE = 'R' and TRANS = 'T', */ La_extern void F77_NAME(dorm2l)(const char* side, const char* trans, const int* m, const int* n, const int* k, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, int* info); /* DORM2R - overwrite the general real m by n matrix C with Q * C */ /* if SIDE = 'L' and TRANS = 'N', or Q'* C if SIDE = 'L' and */ /* TRANS = 'T', or C * Q if SIDE = 'R' and TRANS = 'N', or C * */ /* Q' if SIDE = 'R' and TRANS = 'T', */ La_extern void F77_NAME(dorm2r)(const char* side, const char* trans, const int* m, const int* n, const int* k, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, int* info); /* DORMBR - VECT = 'Q', DORMBR overwrites the general real M-by-N */ /* matrix C with SIDE = 'L' SIDE = 'R' TRANS = 'N' */ La_extern void F77_NAME(dormbr)(const char* vect, const char* side, const char* trans, const int* m, const int* n, const int* k, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, const int* lwork, int* info); /* DORMHR - overwrite the general real M-by-N matrix C with */ /* SIDE = 'L' SIDE = 'R' TRANS = 'N' */ La_extern void F77_NAME(dormhr)(const char* side, const char* trans, const int* m, const int* n, const int* ilo, const int* ihi, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, const int* lwork, int* info); /* DORML2 - overwrite the general real m by n matrix C with Q * */ /* C if SIDE = 'L' and TRANS = 'N', or Q'* C if SIDE = 'L' and */ /* TRANS = 'T', or C * Q if SIDE = 'R' and TRANS = 'N', or C * */ /* Q' if SIDE = 'R' and TRANS = 'T', */ La_extern void F77_NAME(dorml2)(const char* side, const char* trans, const int* m, const int* n, const int* k, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, int* info); /* DORMLQ - overwrite the general real M-by-N matrix C with */ /* SIDE = 'L' SIDE = 'R' TRANS = 'N' */ La_extern void F77_NAME(dormlq)(const char* side, const char* trans, const int* m, const int* n, const int* k, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, const int* lwork, int* info); /* DORMQL - overwrite the general real M-by-N matrix C with */ /* SIDE = 'L' SIDE = 'R' TRANS = 'N' */ La_extern void F77_NAME(dormql)(const char* side, const char* trans, const int* m, const int* n, const int* k, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, const int* lwork, int* info); /* DORMQR - overwrite the general real M-by-N matrix C with SIDE = */ /* 'L' SIDE = 'R' TRANS = 'N' */ La_extern void F77_NAME(dormqr)(const char* side, const char* trans, const int* m, const int* n, const int* k, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, const int* lwork, int* info); /* DORMR2 - overwrite the general real m by n matrix C with Q * */ /* C if SIDE = 'L' and TRANS = 'N', or Q'* C if SIDE = 'L' and */ /* TRANS = 'T', or C * Q if SIDE = 'R' and TRANS = 'N', or C * */ /* Q' if SIDE = 'R' and TRANS = 'T', */ La_extern void F77_NAME(dormr2)(const char* side, const char* trans, const int* m, const int* n, const int* k, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, int* info); /* DORMRQ - overwrite the general real M-by-N matrix C with */ /* SIDE = 'L' SIDE = 'R' TRANS = 'N' */ La_extern void F77_NAME(dormrq)(const char* side, const char* trans, const int* m, const int* n, const int* k, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, const int* lwork, int* info); /* DORMTR - overwrite the general real M-by-N matrix C with */ /* SIDE = 'L' SIDE = 'R' TRANS = 'N' */ La_extern void F77_NAME(dormtr)(const char* side, const char* uplo, const char* trans, const int* m, const int* n, const double* a, const int* lda, const double* tau, double* c, const int* ldc, double* work, const int* lwork, int* info); //* Double precision Positive definite Band matrices -> DPB /* DPBCON - estimate the reciprocal of the condition number (in */ /* the 1-norm); of a real symmetric positive definite band matrix */ /* using the Cholesky factorization A = U**T*U or A = L*L**T */ /* computed by DPBTRF */ La_extern void F77_NAME(dpbcon)(const char* uplo, const int* n, const int* kd, const double* ab, const int* ldab, const double* anorm, double* rcond, double* work, int* iwork, int* info); /* DPBEQU - compute row and column scalings intended to */ /* equilibrate a symmetric positive definite band matrix A and */ /* reduce its condition number (with respect to the two-norm); */ La_extern void F77_NAME(dpbequ)(const char* uplo, const int* n, const int* kd, const double* ab, const int* ldab, double* s, double* scond, double* amax, int* info); /* DPBRFS - improve the computed solution to a system of linear */ /* equations when the coefficient matrix is symmetric positive */ /* definite and banded, and provides error bounds and backward */ /* error estimates for the solution */ La_extern void F77_NAME(dpbrfs)(const char* uplo, const int* n, const int* kd, const int* nrhs, const double* ab, const int* ldab, const double* afb, const int* ldafb, const double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DPBSTF - compute a split Cholesky factorization of a real */ /* symmetric positive definite band matrix A */ La_extern void F77_NAME(dpbstf)(const char* uplo, const int* n, const int* kd, double* ab, const int* ldab, int* info); /* DPBSV - compute the solution to a real system of linear */ /* equations A * X = B, */ La_extern void F77_NAME(dpbsv)(const char* uplo, const int* n, const int* kd, const int* nrhs, double* ab, const int* ldab, double* b, const int* ldb, int* info); /* DPBSVX - use the Cholesky factorization A = U**T*U or A = */ /* L*L**T to compute the solution to a real system of linear */ /* equations A * X = B, */ La_extern void F77_NAME(dpbsvx)(const int* fact, const char* uplo, const int* n, const int* kd, const int* nrhs, double* ab, const int* ldab, double* afb, const int* ldafb, char* equed, double* s, double* b, const int* ldb, double* x, const int* ldx, double* rcond, double* ferr, double* berr, double* work, int* iwork, int* info); /* DPBTF2 - compute the Cholesky factorization of a real */ /* symmetric positive definite band matrix A */ La_extern void F77_NAME(dpbtf2)(const char* uplo, const int* n, const int* kd, double* ab, const int* ldab, int* info); /* DPBTRF - compute the Cholesky factorization of a real */ /* symmetric positive definite band matrix A */ La_extern void F77_NAME(dpbtrf)(const char* uplo, const int* n, const int* kd, double* ab, const int* ldab, int* info); /* DPBTRS - solve a system of linear equations A*X = B with a */ /* symmetric positive definite band matrix A using the Cholesky */ /* factorization A = U**T*U or A = L*L**T computed by DPBTRF */ La_extern void F77_NAME(dpbtrs)(const char* uplo, const int* n, const int* kd, const int* nrhs, const double* ab, const int* ldab, double* b, const int* ldb, int* info); //* Double precision Positive definite matrices -> DPO /* DPOCON - estimate the reciprocal of the condition number (in */ /* the 1-norm); of a real symmetric positive definite matrix using */ /* the Cholesky factorization A = U**T*U or A = L*L**T computed by */ /* DPOTRF */ La_extern void F77_NAME(dpocon)(const char* uplo, const int* n, const double* a, const int* lda, const double* anorm, double* rcond, double* work, int* iwork, int* info); /* DPOEQU - compute row and column scalings intended to */ /* equilibrate a symmetric positive definite matrix A and reduce */ /* its condition number (with respect to the two-norm); */ La_extern void F77_NAME(dpoequ)(const int* n, const double* a, const int* lda, double* s, double* scond, double* amax, int* info); /* DPORFS - improve the computed solution to a system of linear */ /* equations when the coefficient matrix is symmetric positive */ /* definite, */ La_extern void F77_NAME(dporfs)(const char* uplo, const int* n, const int* nrhs, const double* a, const int* lda, const double* af, const int* ldaf, const double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DPOSV - compute the solution to a real system of linear */ /* equations A * X = B, */ La_extern void F77_NAME(dposv)(const char* uplo, const int* n, const int* nrhs, double* a, const int* lda, double* b, const int* ldb, int* info); /* DPOSVX - use the Cholesky factorization A = U**T*U or A = */ /* L*L**T to compute the solution to a real system of linear */ /* equations A * X = B, */ La_extern void F77_NAME(dposvx)(const int* fact, const char* uplo, const int* n, const int* nrhs, double* a, const int* lda, double* af, const int* ldaf, char* equed, double* s, double* b, const int* ldb, double* x, const int* ldx, double* rcond, double* ferr, double* berr, double* work, int* iwork, int* info); /* DPOTF2 - compute the Cholesky factorization of a real */ /* symmetric positive definite matrix A */ La_extern void F77_NAME(dpotf2)(const char* uplo, const int* n, double* a, const int* lda, int* info); /* DPOTRF - compute the Cholesky factorization of a real */ /* symmetric positive definite matrix A */ La_extern void F77_NAME(dpotrf)(const char* uplo, const int* n, double* a, const int* lda, int* info); /* DPOTRI - compute the inverse of a real symmetric positive */ /* definite matrix A using the Cholesky factorization A = U**T*U */ /* or A = L*L**T computed by DPOTRF */ La_extern void F77_NAME(dpotri)(const char* uplo, const int* n, double* a, const int* lda, int* info); /* DPOTRS - solve a system of linear equations A*X = B with a */ /* symmetric positive definite matrix A using the Cholesky */ /* factorization A = U**T*U or A = L*L**T computed by DPOTRF */ La_extern void F77_NAME(dpotrs)(const char* uplo, const int* n, const int* nrhs, const double* a, const int* lda, double* b, const int* ldb, int* info); /* DPPCON - estimate the reciprocal of the condition number (in */ /* the 1-norm); of a real symmetric positive definite packed */ /* matrix using the Cholesky factorization A = U**T*U or A = */ /* L*L**T computed by DPPTRF */ La_extern void F77_NAME(dppcon)(const char* uplo, const int* n, const double* ap, const double* anorm, double* rcond, double* work, int* iwork, int* info); /* DPPEQU - compute row and column scalings intended to */ /* equilibrate a symmetric positive definite matrix A in packed */ /* storage and reduce its condition number (with respect to the */ /* two-norm); */ La_extern void F77_NAME(dppequ)(const char* uplo, const int* n, const double* ap, double* s, double* scond, double* amax, int* info); //* Double precision Positive definite matrices in Packed storage -> DPP /* DPPRFS - improve the computed solution to a system of linear */ /* equations when the coefficient matrix is symmetric positive */ /* definite and packed, and provides error bounds and backward */ /* error estimates for the solution */ La_extern void F77_NAME(dpprfs)(const char* uplo, const int* n, const int* nrhs, const double* ap, const double* afp, const double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DPPSV - compute the solution to a real system of linear */ /* equations A * X = B, */ La_extern void F77_NAME(dppsv)(const char* uplo, const int* n, const int* nrhs, const double* ap, double* b, const int* ldb, int* info); /* DPPSVX - use the Cholesky factorization A = U**T*U or A = */ /* L*L**T to compute the solution to a real system of linear */ /* equations A * X = B, */ La_extern void F77_NAME(dppsvx)(const int* fact, const char* uplo, const int* n, const int* nrhs, double* ap, double* afp, char* equed, double* s, double* b, const int* ldb, double* x, const int* ldx, double* rcond, double* ferr, double* berr, double* work, int* iwork, int* info); /* DPPTRF - compute the Cholesky factorization of a real */ /* symmetric positive definite matrix A stored in packed format */ La_extern void F77_NAME(dpptrf)(const char* uplo, const int* n, double* ap, int* info); /* DPPTRI - compute the inverse of a real symmetric positive */ /* definite matrix A using the Cholesky factorization A = U**T*U */ /* or A = L*L**T computed by DPPTRF */ La_extern void F77_NAME(dpptri)(const char* uplo, const int* n, double* ap, int* info); /* DPPTRS - solve a system of linear equations A*X = B with a */ /* symmetric positive definite matrix A in packed storage using */ /* the Cholesky factorization A = U**T*U or A = L*L**T computed by */ /* DPPTRF */ La_extern void F77_NAME(dpptrs)(const char* uplo, const int* n, const int* nrhs, const double* ap, double* b, const int* ldb, int* info); //* Double precision symmetric Positive definite Tridiagonal matrices -> DPT /* DPTCON - compute the reciprocal of the condition number (in */ /* the 1-norm); of a real symmetric positive definite tridiagonal */ /* matrix using the factorization A = L*D*L**T or A = U**T*D*U */ /* computed by DPTTRF */ La_extern void F77_NAME(dptcon)(const int* n, const double* d, const double* e, const double* anorm, double* rcond, double* work, int* info); /* DPTEQR - compute all eigenvalues and, optionally, eigenvectors */ /* of a symmetric positive definite tridiagonal matrix by first */ /* factoring the matrix using DPTTRF, and then calling DBDSQR to */ /* compute the singular values of the bidiagonal factor */ La_extern void F77_NAME(dpteqr)(const char* compz, const int* n, double* d, double* e, double* z, const int* ldz, double* work, int* info); /* DPTRFS - improve the computed solution to a system of linear */ /* equations when the coefficient matrix is symmetric positive */ /* definite and tridiagonal, and provides error bounds and */ /* backward error estimates for the solution */ La_extern void F77_NAME(dptrfs)(const int* n, const int* nrhs, const double* d, const double* e, const double* df, const double* ef, const double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* info); /* DPTSV - compute the solution to a real system of linear */ /* equations A*X = B, where A is an N-by-N symmetric positive */ /* definite tridiagonal matrix, and X and B are N-by-NRHS matrices */ La_extern void F77_NAME(dptsv)(const int* n, const int* nrhs, double* d, double* e, double* b, const int* ldb, int* info); /* DPTSVX - use the factorization A = L*D*L**T to compute the */ /* solution to a real system of linear equations A*X = B, where A */ /* is an N-by-N symmetric positive definite tridiagonal matrix and */ /* X and B are N-by-NRHS matrices */ La_extern void F77_NAME(dptsvx)(const int* fact, const int* n, const int* nrhs, const double* d, const double* e, double* df, double* ef, const double* b, const int* ldb, double* x, const int* ldx, double* rcond, double* ferr, double* berr, double* work, int* info); /* DPTTRF - compute the factorization of a real symmetric */ /* positive definite tridiagonal matrix A */ La_extern void F77_NAME(dpttrf)(const int* n, double* d, double* e, int* info); /* DPTTRS - solve a system of linear equations A * X = B with a */ /* symmetric positive definite tridiagonal matrix A using the */ /* factorization A = L*D*L**T or A = U**T*D*U computed by DPTTRF */ La_extern void F77_NAME(dpttrs)(const int* n, const int* nrhs, const double* d, const double* e, double* b, const int* ldb, int* info); /* DRSCL - multiply an n-element real vector x by the real scalar */ /* 1/a */ La_extern void F77_NAME(drscl)(const int* n, const double* da, double* x, const int* incx); //* Double precision Symmetric Band matrices -> DSB /* DSBEV - compute all the eigenvalues and, optionally, */ /* eigenvectors of a real symmetric band matrix A */ La_extern void F77_NAME(dsbev)(const char* jobz, const char* uplo, const int* n, const int* kd, double* ab, const int* ldab, double* w, double* z, const int* ldz, double* work, int* info); /* DSBEVD - compute all the eigenvalues and, optionally, */ /* eigenvectors of a real symmetric band matrix A */ La_extern void F77_NAME(dsbevd)(const char* jobz, const char* uplo, const int* n, const int* kd, double* ab, const int* ldab, double* w, double* z, const int* ldz, double* work, const int* lwork, int* iwork, const int* liwork, int* info); /* DSBEVX - compute selected eigenvalues and, optionally, */ /* eigenvectors of a real symmetric band matrix A */ La_extern void F77_NAME(dsbevx)(const char* jobz, const char* range, const char* uplo, const int* n, const int* kd, double* ab, const int* ldab, double* q, const int* ldq, const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, int* m, double* w, double* z, const int* ldz, double* work, int* iwork, int* ifail, int* info); /* DSBGST - reduce a real symmetric-definite banded generalized */ /* eigenproblem A*x = lambda*B*x to standard form C*y = lambda*y, */ La_extern void F77_NAME(dsbgst)(const char* vect, const char* uplo, const int* n, const int* ka, const int* kb, double* ab, const int* ldab, double* bb, const int* ldbb, double* x, const int* ldx, double* work, int* info); /* DSBGV - compute all the eigenvalues, and optionally, the */ /* eigenvectors of a real generalized symmetric-definite banded */ /* eigenproblem, of the form A*x=(lambda);*B*x */ La_extern void F77_NAME(dsbgv)(const char* jobz, const char* uplo, const int* n, const int* ka, const int* kb, double* ab, const int* ldab, double* bb, const int* ldbb, double* w, double* z, const int* ldz, double* work, int* info); /* DSBTRD - reduce a real symmetric band matrix A to symmetric */ /* tridiagonal form T by an orthogonal similarity transformation */ La_extern void F77_NAME(dsbtrd)(const char* vect, const char* uplo, const int* n, const int* kd, double* ab, const int* ldab, double* d, double* e, double* q, const int* ldq, double* work, int* info); //* Double precision Symmetric Packed matrices -> DSP /* DSPCON - estimate the reciprocal of the condition number (in */ /* the 1-norm); of a real symmetric packed matrix A using the */ /* factorization A = U*D*U**T or A = L*D*L**T computed by DSPTRF */ La_extern void F77_NAME(dspcon)(const char* uplo, const int* n, const double* ap, const int* ipiv, const double* anorm, double* rcond, double* work, int* iwork, int* info); /* DSPEV - compute all the eigenvalues and, optionally, */ /* eigenvectors of a real symmetric matrix A in packed storage */ La_extern void F77_NAME(dspev)(const char* jobz, const char* uplo, const int* n, double* ap, double* w, double* z, const int* ldz, double* work, int* info); /* DSPEVD - compute all the eigenvalues and, optionally, */ /* eigenvectors of a real symmetric matrix A in packed storage */ La_extern void F77_NAME(dspevd)(const char* jobz, const char* uplo, const int* n, double* ap, double* w, double* z, const int* ldz, double* work, const int* lwork, int* iwork, const int* liwork, int* info); /* DSPEVX - compute selected eigenvalues and, optionally, */ /* eigenvectors of a real symmetric matrix A in packed storage */ La_extern void F77_NAME(dspevx)(const char* jobz, const char* range, const char* uplo, const int* n, double* ap, const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, int* m, double* w, double* z, const int* ldz, double* work, int* iwork, int* ifail, int* info); /* DSPGST - reduce a real symmetric-definite generalized */ /* eigenproblem to standard form, using packed storage */ La_extern void F77_NAME(dspgst)(const int* itype, const char* uplo, const int* n, double* ap, double* bp, int* info); /* DSPGV - compute all the eigenvalues and, optionally, the */ /* eigenvectors of a real generalized symmetric-definite */ /* eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, */ /* or B*A*x=(lambda)*x */ La_extern void F77_NAME(dspgv)(const int* itype, const char* jobz, const char* uplo, const int* n, double* ap, double* bp, double* w, double* z, const int* ldz, double* work, int* info); /* DSPRFS - improve the computed solution to a system of linear */ /* equations when the coefficient matrix is symmetric indefinite */ /* and packed, and provides error bounds and backward error */ /* estimates for the solution */ La_extern void F77_NAME(dsprfs)(const char* uplo, const int* n, const int* nrhs, const double* ap, const double* afp, const int* ipiv, const double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DSPSV - compute the solution to a real system of linear */ /* equations A * X = B, */ La_extern void F77_NAME(dspsv)(const char* uplo, const int* n, const int* nrhs, double* ap, int* ipiv, double* b, const int* ldb, int* info); /* DSPSVX - use the diagonal pivoting factorization A = U*D*U**T */ /* or A = L*D*L**T to compute the solution to a real system of */ /* linear equations A * X = B, where A is an N-by-N symmetric */ /* matrix stored in packed format and X and B are N-by-NRHS */ /* matrices */ La_extern void F77_NAME(dspsvx)(const int* fact, const char* uplo, const int* n, const int* nrhs, const double* ap, double* afp, int* ipiv, const double* b, const int* ldb, double* x, const int* ldx, double* rcond, double* ferr, double* berr, double* work, int* iwork, int* info); /* DSPTRD - reduce a real symmetric matrix A stored in packed */ /* form to symmetric tridiagonal form T by an orthogonal */ /* similarity transformation */ La_extern void F77_NAME(dsptrd)(const char* uplo, const int* n, double* ap, double* d, double* e, double* tau, int* info); /* DSPTRF - compute the factorization of a real symmetric matrix */ /* A stored in packed format using the Bunch-Kaufman diagonal */ /* pivoting method */ La_extern void F77_NAME(dsptrf)(const char* uplo, const int* n, double* ap, int* ipiv, int* info); /* DSPTRI - compute the inverse of a real symmetric indefinite */ /* matrix A in packed storage using the factorization A = U*D*U**T */ /* or A = L*D*L**T computed by DSPTRF */ La_extern void F77_NAME(dsptri)(const char* uplo, const int* n, double* ap, const int* ipiv, double* work, int* info); /* DSPTRS - solve a system of linear equations A*X = B with a */ /* real symmetric matrix A stored in packed format using the */ /* factorization A = U*D*U**T or A = L*D*L**T computed by DSPTRF */ La_extern void F77_NAME(dsptrs)(const char* uplo, const int* n, const int* nrhs, const double* ap, const int* ipiv, double* b, const int* ldb, int* info); //* Double precision Symmetric Tridiagonal matrices -> DST /* DSTEBZ - compute the eigenvalues of a symmetric tridiagonal */ /* matrix T */ La_extern void F77_NAME(dstebz)(const char* range, const char* order, const int* n, const double* vl, const double* vu, const int* il, const int* iu, const double *abstol, const double* d, const double* e, int* m, int* nsplit, double* w, int* iblock, int* isplit, double* work, int* iwork, int* info); /* DSTEDC - compute all eigenvalues and, optionally, eigenvectors */ /* of a symmetric tridiagonal matrix using the divide and conquer */ /* method */ La_extern void F77_NAME(dstedc)(const char* compz, const int* n, double* d, double* e, double* z, const int* ldz, double* work, const int* lwork, int* iwork, const int* liwork, int* info); /* DSTEIN - compute the eigenvectors of a real symmetric */ /* tridiagonal matrix T corresponding to specified eigenvalues, */ /* using inverse iteration */ La_extern void F77_NAME(dstein)(const int* n, const double* d, const double* e, const int* m, const double* w, const int* iblock, const int* isplit, double* z, const int* ldz, double* work, int* iwork, int* ifail, int* info); /* DSTEQR - compute all eigenvalues and, optionally, eigenvectors */ /* of a symmetric tridiagonal matrix using the implicit QL or QR */ /* method */ La_extern void F77_NAME(dsteqr)(const char* compz, const int* n, double* d, double* e, double* z, const int* ldz, double* work, int* info); /* DSTERF - compute all eigenvalues of a symmetric tridiagonal */ /* matrix using the Pal-Walker-Kahan variant of the QL or QR */ /* algorithm */ La_extern void F77_NAME(dsterf)(const int* n, double* d, double* e, int* info); /* DSTEV - compute all eigenvalues and, optionally, eigenvectors */ /* of a real symmetric tridiagonal matrix A */ La_extern void F77_NAME(dstev)(const char* jobz, const int* n, double* d, double* e, double* z, const int* ldz, double* work, int* info); /* DSTEVD - compute all eigenvalues and, optionally, eigenvectors */ /* of a real symmetric tridiagonal matrix */ La_extern void F77_NAME(dstevd)(const char* jobz, const int* n, double* d, double* e, double* z, const int* ldz, double* work, const int* lwork, int* iwork, const int* liwork, int* info); /* DSTEVX - compute selected eigenvalues and, optionally, */ /* eigenvectors of a real symmetric tridiagonal matrix A */ La_extern void F77_NAME(dstevx)(const char* jobz, const char* range, const int* n, double* d, double* e, const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, int* m, double* w, double* z, const int* ldz, double* work, int* iwork, int* ifail, int* info); //* Double precision SYmmetric matrices -> DSY /* DSYCON - estimate the reciprocal of the condition number (in */ /* the 1-norm); of a real symmetric matrix A using the */ /* factorization A = U*D*U**T or A = L*D*L**T computed by DSYTRF */ La_extern void F77_NAME(dsycon)(const char* uplo, const int* n, const double* a, const int* lda, const int* ipiv, const double* anorm, double* rcond, double* work, int* iwork, int* info); /* DSYEV - compute all eigenvalues and, optionally, eigenvectors */ /* of a real symmetric matrix A */ La_extern void F77_NAME(dsyev)(const char* jobz, const char* uplo, const int* n, double* a, const int* lda, double* w, double* work, const int* lwork, int* info); /* DSYEVD - compute all eigenvalues and, optionally, eigenvectors */ /* of a real symmetric matrix A */ La_extern void F77_NAME(dsyevd)(const char* jobz, const char* uplo, const int* n, double* a, const int* lda, double* w, double* work, const int* lwork, int* iwork, const int* liwork, int* info); /* DSYEVX - compute selected eigenvalues and, optionally, */ /* eigenvectors of a real symmetric matrix A */ La_extern void F77_NAME(dsyevx)(const char* jobz, const char* range, const char* uplo, const int* n, double* a, const int* lda, const double* vl, const double* vu, const int* il, const int* iu, const double* abstol, int* m, double* w, double* z, const int* ldz, double* work, const int* lwork, int* iwork, int* ifail, int* info); /* DSYEVR - compute all eigenvalues and, optionally, eigenvectors */ /* of a real symmetric matrix A */ La_extern void F77_NAME(dsyevr)(const char *jobz, const char *range, const char *uplo, const int *n, double *a, const int *lda, const double *vl, const double *vu, const int *il, const int *iu, const double *abstol, int *m, double *w, double *z, const int *ldz, int *isuppz, double *work, const int *lwork, int *iwork, const int *liwork, int *info); /* DSYGS2 - reduce a real symmetric-definite generalized */ /* eigenproblem to standard form */ La_extern void F77_NAME(dsygs2)(const int* itype, const char* uplo, const int* n, double* a, const int* lda, const double* b, const int* ldb, int* info); /* DSYGST - reduce a real symmetric-definite generalized */ /* eigenproblem to standard form */ La_extern void F77_NAME(dsygst)(const int* itype, const char* uplo, const int* n, double* a, const int* lda, const double* b, const int* ldb, int* info); /* DSYGV - compute all the eigenvalues, and optionally, the */ /* eigenvectors of a real generalized symmetric-definite */ /* eigenproblem, of the form A*x=(lambda);*B*x, A*Bx=(lambda);*x, */ /* or B*A*x=(lambda);*x */ La_extern void F77_NAME(dsygv)(const int* itype, const char* jobz, const char* uplo, const int* n, double* a, const int* lda, double* b, const int* ldb, double* w, double* work, const int* lwork, int* info); /* DSYRFS - improve the computed solution to a system of linear */ /* equations when the coefficient matrix is symmetric indefinite, */ /* and provides error bounds and backward error estimates for the */ /* solution */ La_extern void F77_NAME(dsyrfs)(const char* uplo, const int* n, const int* nrhs, const double* a, const int* lda, const double* af, const int* ldaf, const int* ipiv, const double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DSYSV - compute the solution to a real system of linear */ /* equations A * X = B, */ La_extern void F77_NAME(dsysv)(const char* uplo, const int* n, const int* nrhs, double* a, const int* lda, int* ipiv, double* b, const int* ldb, double* work, const int* lwork, int* info); /* DSYSVX - use the diagonal pivoting factorization to compute */ /* the solution to a real system of linear equations A * X = B, */ La_extern void F77_NAME(dsysvx)(const int* fact, const char* uplo, const int* n, const int* nrhs, const double* a, const int* lda, double* af, const int* ldaf, int* ipiv, const double* b, const int* ldb, double* x, const int* ldx, double* rcond, double* ferr, double* berr, double* work, const int* lwork, int* iwork, int* info); /* DSYTD2 - reduce a real symmetric matrix A to symmetric */ /* tridiagonal form T by an orthogonal similarity transformation */ La_extern void F77_NAME(dsytd2)(const char* uplo, const int* n, double* a, const int* lda, double* d, double* e, double* tau, int* info); /* DSYTF2 - compute the factorization of a real symmetric matrix */ /* A using the Bunch-Kaufman diagonal pivoting method */ La_extern void F77_NAME(dsytf2)(const char* uplo, const int* n, double* a, const int* lda, int* ipiv, int* info); /* DSYTRD - reduce a real symmetric matrix A to real symmetric */ /* tridiagonal form T by an orthogonal similarity transformation */ La_extern void F77_NAME(dsytrd)(const char* uplo, const int* n, double* a, const int* lda, double* d, double* e, double* tau, double* work, const int* lwork, int* info); /* DSYTRF - compute the factorization of a real symmetric matrix */ /* A using the Bunch-Kaufman diagonal pivoting method */ La_extern void F77_NAME(dsytrf)(const char* uplo, const int* n, double* a, const int* lda, int* ipiv, double* work, const int* lwork, int* info); /* DSYTRI - compute the inverse of a real symmetric indefinite */ /* matrix A using the factorization A = U*D*U**T or A = L*D*L**T */ /* computed by DSYTRF */ La_extern void F77_NAME(dsytri)(const char* uplo, const int* n, double* a, const int* lda, const int* ipiv, double* work, int* info); /* DSYTRS - solve a system of linear equations A*X = B with a */ /* real symmetric matrix A using the factorization A = U*D*U**T or */ /* A = L*D*L**T computed by DSYTRF */ La_extern void F77_NAME(dsytrs)(const char* uplo, const int* n, const int* nrhs, const double* a, const int* lda, const int* ipiv, double* b, const int* ldb, int* info); //* Double precision Triangular Band matrices -> DTB /* DTBCON - estimate the reciprocal of the condition number of a */ /* triangular band matrix A, in either the 1-norm or the */ /* infinity-norm */ La_extern void F77_NAME(dtbcon)(const char* norm, const char* uplo, const char* diag, const int* n, const int* kd, const double* ab, const int* ldab, double* rcond, double* work, int* iwork, int* info); /* DTBRFS - provide error bounds and backward error estimates for */ /* the solution to a system of linear equations with a triangular */ /* band coefficient matrix */ La_extern void F77_NAME(dtbrfs)(const char* uplo, const char* trans, const char* diag, const int* n, const int* kd, const int* nrhs, const double* ab, const int* ldab, const double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DTBTRS - solve a triangular system of the form A * X = B or */ /* A**T * X = B, */ La_extern void F77_NAME(dtbtrs)(const char* uplo, const char* trans, const char* diag, const int* n, const int* kd, const int* nrhs, const double* ab, const int* ldab, double* b, const int* ldb, int* info); //* Double precision Triangular matrices Generalized problems -> DTG /* DTGEVC - compute some or all of the right and/or left */ /* generalized eigenvectors of a pair of real upper triangular */ /* matrices (A,B); */ La_extern void F77_NAME(dtgevc)(const char* side, const char* howmny, const int* select, const int* n, const double* a, const int* lda, const double* b, const int* ldb, double* vl, const int* ldvl, double* vr, const int* ldvr, const int* mm, int* m, double* work, int* info); /* DTGSJA - compute the generalized singular value decomposition */ /* (GSVD); of two real upper triangular (or trapezoidal); matrices */ /* A and B */ La_extern void F77_NAME(dtgsja)(const char* jobu, const char* jobv, const char* jobq, const int* m, const int* p, const int* n, const int* k, const int* l, double* a, const int* lda, double* b, const int* ldb, const double* tola, const double* tolb, double* alpha, double* beta, double* u, const int* ldu, double* v, const int* ldv, double* q, const int* ldq, double* work, int* ncycle, int* info); //* Double precision Triangular matrices Packed storage -> DTP /* DTPCON - estimate the reciprocal of the condition number of a */ /* packed triangular matrix A, in either the 1-norm or the */ /* infinity-norm */ La_extern void F77_NAME(dtpcon)(const char* norm, const char* uplo, const char* diag, const int* n, const double* ap, double* rcond, double* work, int* iwork, int* info); /* DTPRFS - provide error bounds and backward error estimates for */ /* the solution to a system of linear equations with a triangular */ /* packed coefficient matrix */ La_extern void F77_NAME(dtprfs)(const char* uplo, const char* trans, const char* diag, const int* n, const int* nrhs, const double* ap, const double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DTPTRI - compute the inverse of a real upper or lower */ /* triangular matrix A stored in packed format */ La_extern void F77_NAME(dtptri)(const char* uplo, const char* diag, const int* n, double* ap, int* info); /* DTPTRS - solve a triangular system of the form A * X = B or */ /* A**T * X = B, */ La_extern void F77_NAME(dtptrs)(const char* uplo, const char* trans, const char* diag, const int* n, const int* nrhs, const double* ap, double* b, const int* ldb, int* info); //* Double precision TRiangular matrices -> DTR /* DTRCON - estimate the reciprocal of the condition number of a */ /* triangular matrix A, in either the 1-norm or the infinity-norm */ La_extern void F77_NAME(dtrcon)(const char* norm, const char* uplo, const char* diag, const int* n, const double* a, const int* lda, double* rcond, double* work, int* iwork, int* info); /* DTREVC - compute some or all of the right and/or left */ /* eigenvectors of a real upper quasi-triangular matrix T */ La_extern void F77_NAME(dtrevc)(const char* side, const char* howmny, const int* select, const int* n, const double* t, const int* ldt, double* vl, const int* ldvl, double* vr, const int* ldvr, const int* mm, int* m, double* work, int* info); /* DTREXC - reorder the real Schur factorization of a real matrix */ /* A = Q*T*Q**T, so that the diagonal block of T with row index */ /* IFST is moved to row ILST */ La_extern void F77_NAME(dtrexc)(const char* compq, const int* n, double* t, const int* ldt, double* q, const int* ldq, int* ifst, int* ILST, double* work, int* info); /* DTRRFS - provide error bounds and backward error estimates for */ /* the solution to a system of linear equations with a triangular */ /* coefficient matrix */ La_extern void F77_NAME(dtrrfs)(const char* uplo, const char* trans, const char* diag, const int* n, const int* nrhs, const double* a, const int* lda, const double* b, const int* ldb, double* x, const int* ldx, double* ferr, double* berr, double* work, int* iwork, int* info); /* DTRSEN - reorder the real Schur factorization of a real matrix */ /* A = Q*T*Q**T, so that a selected cluster of eigenvalues appears */ /* in the leading diagonal blocks of the upper quasi-triangular */ /* matrix T, */ La_extern void F77_NAME(dtrsen)(const char* job, const char* compq, const int* select, const int* n, double* t, const int* ldt, double* q, const int* ldq, double* wr, double* wi, int* m, double* s, double* sep, double* work, const int* lwork, int* iwork, const int* liwork, int* info); /* DTRSNA - estimate reciprocal condition numbers for specified */ /* eigenvalues and/or right eigenvectors of a real upper */ /* quasi-triangular matrix T (or of any matrix Q*T*Q**T with Q */ /* orthogonal); */ La_extern void F77_NAME(dtrsna)(const char* job, const char* howmny, const int* select, const int* n, const double* t, const int* ldt, const double* vl, const int* ldvl, const double* vr, const int* ldvr, double* s, double* sep, const int* mm, int* m, double* work, const int* lwork, int* iwork, int* info); /* DTRSYL - solve the real Sylvester matrix equation */ La_extern void F77_NAME(dtrsyl)(const char* trana, const char* tranb, const int* isgn, const int* m, const int* n, const double* a, const int* lda, const double* b, const int* ldb, double* c, const int* ldc, double* scale, int* info); /* DTRTI2 - compute the inverse of a real upper or lower */ /* triangular matrix */ La_extern void F77_NAME(dtrti2)(const char* uplo, const char* diag, const int* n, double* a, const int* lda, int* info); /* DTRTRI - compute the inverse of a real upper or lower */ /* triangular matrix A */ La_extern void F77_NAME(dtrtri)(const char* uplo, const char* diag, const int* n, double* a, const int* lda, int* info); /* DTRTRS - solve a triangular system of the form A * X = B or */ /* A**T * X = B */ La_extern void F77_NAME(dtrtrs)(const char* uplo, const char* trans, const char* diag, const int* n, const int* nrhs, const double* a, const int* lda, double* b, const int* ldb, int* info); //* Double precision utilities in Lapack /* DHGEQZ - implement a single-/double-shift version of the QZ */ /* method for finding the generalized eigenvalues */ /* w(j);=(ALPHAR(j); + i*ALPHAI(j););/BETAR(j); of the equation */ /* det( A - w(i); B ); = 0 In addition, the pair A,B may be */ /* reduced to generalized Schur form */ La_extern void F77_NAME(dhgeqz)(const char* job, const char* compq, const char* compz, const int* n, const int *ILO, const int* IHI, double* a, const int* lda, double* b, const int* ldb, double* alphar, double* alphai, const double* beta, double* q, const int* ldq, double* z, const int* ldz, double* work, const int* lwork, int* info); /* DHSEIN - use inverse iteration to find specified right and/or */ /* left eigenvectors of a real upper Hessenberg matrix H */ La_extern void F77_NAME(dhsein)(const char* side, const char* eigsrc, const char* initv, int* select, const int* n, double* h, const int* ldh, double* wr, double* wi, double* vl, const int* ldvl, double* vr, const int* ldvr, const int* mm, int* m, double* work, int* ifaill, int* ifailr, int* info); /* DHSEQR - compute the eigenvalues of a real upper Hessenberg */ /* matrix H and, optionally, the matrices T and Z from the Schur */ /* decomposition H = Z T Z**T, where T is an upper */ /* quasi-triangular matrix (the Schur form);, and Z is the */ /* orthogonal matrix of Schur vectors */ La_extern void F77_NAME(dhseqr)(const char* job, const char* compz, const int* n, const int* ilo, const int* ihi, double* h, const int* ldh, double* wr, double* wi, double* z, const int* ldz, double* work, const int* lwork, int* info); /* DLABAD - take as input the values computed by SLAMCH for */ /* underflow and overflow, and returns the square root of each of */ /* these values if the log of LARGE is sufficiently large */ La_extern void F77_NAME(dlabad)(double* small, double* large); /* DLABRD - reduce the first NB rows and columns of a real */ /* general m by n matrix A to upper or lower bidiagonal form by an */ /* orthogonal transformation Q' * A * P, and returns the matrices */ /* X and Y which are needed to apply the transformation to the */ /* unreduced part of A */ La_extern void F77_NAME(dlabrd)(const int* m, const int* n, const int* nb, double* a, const int* lda, double* d, double* e, double* tauq, double* taup, double* x, const int* ldx, double* y, const int* ldy); /* DLACON - estimate the 1-norm of a square, real matrix A */ La_extern void F77_NAME(dlacon)(const int* n, double* v, double* x, int* isgn, double* est, int* kase); /* DLACPY - copy all or part of a two-dimensional matrix A to */ /* another matrix B */ La_extern void F77_NAME(dlacpy)(const char* uplo, const int* m, const int* n, const double* a, const int* lda, double* b, const int* ldb); /* DLADIV - perform complex division in real arithmetic */ La_extern void F77_NAME(dladiv)(const double* a, const double* b, const double* c, const double* d, double* p, double* q); /* DLAE2 - compute the eigenvalues of a 2-by-2 symmetric matrix [ A B ] */ /* [ B C ] */ La_extern void F77_NAME(dlae2)(const double* a, const double* b, const double* c, double* rt1, double* rt2); /* DLAEBZ - contain the iteration loops which compute and use the */ /* function N(w);, which is the count of eigenvalues of a */ /* symmetric tridiagonal matrix T less than or equal to its */ /* argument w */ La_extern void F77_NAME(dlaebz)(const int* ijob, const int* nitmax, const int* n, const int* mmax, const int* minp, const int* nbmin, const double* abstol, const double* reltol, const double* pivmin, double* d, double* e, double* e2, int* nval, double* ab, double* c, int* mout, int* nab, double* work, int* iwork, int* info); /* DLAED0 - compute all eigenvalues and corresponding */ /* eigenvectors of a symmetric tridiagonal matrix using the divide */ /* and conquer method */ La_extern void F77_NAME(dlaed0)(const int* icompq, const int* qsiz, const int* n, double* d, double* e, double* q, const int* ldq, double* qstore, const int* ldqs, double* work, int* iwork, int* info); /* DLAED1 - compute the updated eigensystem of a diagonal matrix */ /* after modification by a rank-one symmetric matrix */ La_extern void F77_NAME(dlaed1)(const int* n, double* d, double* q, const int* ldq, int* indxq, const double* rho, const int* cutpnt, double* work, int* iwork, int* info); /* DLAED2 - merge the two sets of eigenvalues together into a */ /* single sorted set */ La_extern void F77_NAME(dlaed2)(const int* k, const int* n, double* d, double* q, const int* ldq, int* indxq, double* rho, double* z, double* dlamda, double* w, double* q2, int* indx, int* indxc, int* indxp, int* coltyp, int* info); /* DLAED3 - find the roots of the secular equation, as defined by */ /* the values in double* d, W, and RHO, between KSTART and KSTOP */ La_extern void F77_NAME(dlaed3)(const int* k, const int* n, const int* n1, double* d, double* q, const int* ldq, const double* rho, double* dlamda, double* q2, int* indx, int* ctot, double* w, double* s, int* info); /* DLAED4 - subroutine computes the I-th updated eigenvalue of a */ /* symmetric rank-one modification to a diagonal matrix whose */ /* elements are given in the array d, and that D(i); < D(j); for */ /* i < j and that RHO > 0 */ La_extern void F77_NAME(dlaed4)(const int* n, const int* i, const double* d, const double* z, const double* delta, const double* rho, double* dlam, int* info); /* DLAED5 - subroutine computes the I-th eigenvalue of a */ /* symmetric rank-one modification of a 2-by-2 diagonal matrix */ /* diag( D ); + RHO The diagonal elements in the array D are */ /* assumed to satisfy D(i); < D(j); for i < j */ La_extern void F77_NAME(dlaed5)(const int* i, const double* d, const double* z, double* delta, const double* rho, double* dlam); /* DLAED6 - compute the positive or negative root (closest to the */ /* origin); of z(1); z(2); z(3); f(x); = rho + --------- + */ /* ---------- + --------- d(1);-x d(2);-x d(3);-x It is assumed */ /* that if ORGATI = .true */ La_extern void F77_NAME(dlaed6)(const int* kniter, const int* orgati, const double* rho, const double* d, const double* z, const double* finit, double* tau, int* info); /* DLAED7 - compute the updated eigensystem of a diagonal matrix */ /* after modification by a rank-one symmetric matrix */ La_extern void F77_NAME(dlaed7)(const int* icompq, const int* n, const int* qsiz, const int* tlvls, const int* curlvl, const int* curpbm, double* d, double* q, const int* ldq, int* indxq, const double* rho, const int* cutpnt, double* qstore, double* qptr, const int* prmptr, const int* perm, const int* givptr, const int* givcol, const double* givnum, double* work, int* iwork, int* info); /* DLAED8 - merge the two sets of eigenvalues together into a */ /* single sorted set */ La_extern void F77_NAME(dlaed8)(const int* icompq, const int* k, const int* n, const int* qsiz, double* d, double* q, const int* ldq, const int* indxq, double* rho, const int* cutpnt, const double* z, double* dlamda, double* q2, const int* ldq2, double* w, int* perm, int* givptr, int* givcol, double* givnum, int* indxp, int* indx, int* info); /* DLAED9 - find the roots of the secular equation, as defined by */ /* the values in double* d, Z, and RHO, between KSTART and KSTOP */ La_extern void F77_NAME(dlaed9)(const int* k, const int* kstart, const int* kstop, const int* n, double* d, double* q, const int* ldq, const double* rho, const double* dlamda, const double* w, double* s, const int* lds, int* info); /* DLAEDA - compute the Z vector corresponding to the merge step */ /* in the CURLVLth step of the merge process with TLVLS steps for */ /* the CURPBMth problem */ La_extern void F77_NAME(dlaeda)(const int* n, const int* tlvls, const int* curlvl, const int* curpbm, const int* prmptr, const int* perm, const int* givptr, const int* givcol, const double* givnum, const double* q, const int* qptr, double* z, double* ztemp, int* info); /* DLAEIN - use inverse iteration to find a right or left */ /* eigenvector corresponding to the eigenvalue (WR,WI); of a real */ /* upper Hessenberg matrix H */ La_extern void F77_NAME(dlaein)(const int* rightv, const int* noinit, const int* n, const double* h, const int* ldh, const double* wr, const double* wi, double* vr, double* vi, double* b, const int* ldb, double* work, const double* eps3, const double* smlnum, const double* bignum, int* info); /* DLAEV2 - compute the eigendecomposition of a 2-by-2 symmetric */ /* matrix [ A B ] [ B C ] */ La_extern void F77_NAME(dlaev2)(const double* a, const double* b, const double* c, double* rt1, double* rt2, double* cs1, double *sn1); /* DLAEXC - swap adjacent diagonal blocks T11 and T22 of order 1 */ /* or 2 in an upper quasi-triangular matrix T by an orthogonal */ /* similarity transformation */ La_extern void F77_NAME(dlaexc)(const int* wantq, const int* n, double* t, const int* ldt, double* q, const int* ldq, const int* j1, const int* n1, const int* n2, double* work, int* info); /* DLAG2 - compute the eigenvalues of a 2 x 2 generalized */ /* eigenvalue problem A - w B, with scaling as necessary to aextern void */ /* over-/underflow */ La_extern void F77_NAME(dlag2)(const double* a, const int* lda, const double* b, const int* ldb, const double* safmin, double* scale1, double* scale2, double* wr1, double* wr2, double* wi); /* DLAGS2 - compute 2-by-2 orthogonal matrices U, V and Q, such */ /* that if ( UPPER ); then U'*A*Q = U'*( A1 A2 );*Q = ( x 0 ); */ /* ( 0 A3 ); ( x x ); and V'*B*Q = V'*( B1 B2 );*Q = ( x 0 ); ( */ /* 0 B3 ); ( x x ); or if ( .NOT.UPPER ); then U'*A*Q = U'*( A1 */ /* 0 );*Q = ( x x ); ( A2 A3 ); ( 0 x ); and V'*B*Q = V'*( B1 0 */ /* );*Q = ( x x ); ( B2 B3 ); ( 0 x ); The rows of the */ /* transformed A and B are parallel, where U = ( CSU SNU );, V = */ /* ( CSV SNV );, Q = ( CSQ SNQ ); ( -SNU CSU ); ( -SNV CSV ); ( */ /* -SNQ CSQ ); Z' denotes the transpose of Z */ La_extern void F77_NAME(dlags2)(const int* upper, const double* a1, const double* a2, const double* a3, const double* b1, const double* b2, const double* b3, double* csu, double* snu, double* csv, double* snv, double *csq, double *snq); /* DLAGTF - factorize the matrix (T - lambda*I);, where T is an n */ /* by n tridiagonal matrix and lambda is a scalar, as T - */ /* lambda*I = PLU, */ La_extern void F77_NAME(dlagtf)(const int* n, double* a, const double* lambda, double* b, double* c, const double *tol, double* d, int* in, int* info); /* DLAGTM - perform a matrix-vector product of the form B := */ /* alpha * A * X + beta * B where A is a tridiagonal matrix of */ /* order N, B and X are N by NRHS matrices, and alpha and beta are */ /* real scalars, each of which may be 0., 1., or -1 */ La_extern void F77_NAME(dlagtm)(const char* trans, const int* n, const int* nrhs, const double* alpha, const double* dl, const double* d, const double* du, const double* x, const int* ldx, const double* beta, double* b, const int* ldb); /* DLAGTS - may be used to solve one of the systems of equations */ /* (T - lambda*I);*x = y or (T - lambda*I);'*x = y, */ La_extern void F77_NAME(dlagts)(const int* job, const int* n, const double* a, const double* b, const double* c, const double* d, const int* in, double* y, double* tol, int* info); /* DLAHQR - an auxiliary routine called by DHSEQR to update the */ /* eigenvalues and Schur decomposition already computed by DHSEQR, */ /* by dealing with the Hessenberg submatrix in rows and columns */ /* ILO to IHI */ La_extern void F77_NAME(dlahqr)(const int* wantt, const int* wantz, const int* n, const int* ilo, const int* ihi, double* H, const int* ldh, double* wr, double* wi, const int* iloz, const int* ihiz, double* z, const int* ldz, int* info); /* DLAIC1 - apply one step of incremental condition estimation in */ /* its simplest version */ La_extern void F77_NAME(dlaic1)(const int* job, const int* j, const double* x, const double* sest, const double* w, const double* gamma, double* sestpr, double* s, double* c); /* DLALN2 - solve a system of the form (ca A - w D ); X = s B or */ /* (ca A' - w D); X = s B with possible scaling ("s"); and */ /* perturbation of A */ La_extern void F77_NAME(dlaln2)(const int* ltrans, const int* na, const int* nw, const double* smin, const double* ca, const double* a, const int* lda, const double* d1, const double* d2, const double* b, const int* ldb, const double* wr, const double* wi, double* x, const int* ldx, double* scale, double* xnorm, int* info); /* DLAMCH - determine double precision machine parameters */ La_extern double F77_NAME(dlamch)(const char* cmach); /* DLAMRG - will create a permutation list which will merge the */ /* elements of A (which is composed of two independently sorted */ /* sets); into a single set which is sorted in ascending order */ La_extern void F77_NAME(dlamrg)(const int* n1, const int* n2, const double* a, const int* dtrd1, const int* dtrd2, int* index); /* DLANGB - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of an n by n band matrix A, with kl sub-diagonals and ku */ /* super-diagonals */ La_extern double F77_NAME(dlangb)(const char* norm, const int* n, const int* kl, const int* ku, const double* ab, const int* ldab, double* work); /* DLANGE - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of a real matrix A */ La_extern double F77_NAME(dlange)(const char* norm, const int* m, const int* n, const double* a, const int* lda, double* work); /* DLANGT - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of a real tridiagonal matrix A */ La_extern double F77_NAME(dlangt)(const char* norm, const int* n, const double* dl, const double* d, const double* du); /* DLANHS - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of a Hessenberg matrix A */ La_extern double F77_NAME(dlanhs)(const char* norm, const int* n, const double* a, const int* lda, double* work); /* DLANSB - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of an n by n symmetric band matrix A, with k */ /* super-diagonals */ La_extern double F77_NAME(dlansb)(const char* norm, const char* uplo, const int* n, const int* k, const double* ab, const int* ldab, double* work); /* DLANSP - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of a real symmetric matrix A, supplied in packed form */ La_extern double F77_NAME(dlansp)(const char* norm, const char* uplo, const int* n, const double* ap, double* work); /* DLANST - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of a real symmetric tridiagonal matrix A */ La_extern double F77_NAME(dlanst)(const char* norm, const int* n, const double* d, const double* e); /* DLANSY - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of a real symmetric matrix A */ La_extern double F77_NAME(dlansy)(const char* norm, const char* uplo, const int* n, const double* a, const int* lda, double* work); /* DLANTB - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of an n by n triangular band matrix A, with ( k + 1 ) diagonals */ La_extern double F77_NAME(dlantb)(const char* norm, const char* uplo, const char* diag, const int* n, const int* k, const double* ab, const int* ldab, double* work); /* DLANTP - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of a triangular matrix A, supplied in packed form */ La_extern double F77_NAME(dlantp)(const char* norm, const char* uplo, const char* diag, const int* n, const double* ap, double* work); /* DLANTR - return the value of the one norm, or the Frobenius */ /* norm, or the infinity norm, or the element of largest absolute */ /* value of a trapezoidal or triangular matrix A */ La_extern double F77_NAME(dlantr)(const char* norm, const char* uplo, const char* diag, const int* m, const int* n, const double* a, const int* lda, double* work); /* DLANV2 - compute the Schur factorization of a real 2-by-2 */ /* nonsymmetric matrix in standard form */ La_extern void F77_NAME(dlanv2)(double* a, double* b, double* c, double* d, double* rt1r, double* rt1i, double* rt2r, double* rt2i, double* cs, double *sn); /* DLAPLL - two column vectors X and Y, let A = ( X Y ); */ La_extern void F77_NAME(dlapll)(const int* n, double* x, const int* incx, double* y, const int* incy, double* ssmin); /* DLAPMT - rearrange the columns of the M by N matrix X as */ /* specified by the permutation K(1);,K(2);,...,K(N); of the */ /* integers 1,...,N */ La_extern void F77_NAME(dlapmt)(const int* forwrd, const int* m, const int* n, double* x, const int* ldx, const int* k); /* DLAPY2 - return sqrt(x**2+y**2);, taking care not to cause */ /* unnecessary overflow */ La_extern double F77_NAME(dlapy2)(const double* x, const double* y); /* DLAPY3 - return sqrt(x**2+y**2+z**2);, taking care not to */ /* cause unnecessary overflow */ La_extern double F77_NAME(dlapy3)(const double* x, const double* y, const double* z); /* DLAQGB - equilibrate a general M by N band matrix A with KL */ /* subdiagonals and KU superdiagonals using the row and scaling */ /* factors in the vectors R and C */ La_extern void F77_NAME(dlaqgb)(const int* m, const int* n, const int* kl, const int* ku, double* ab, const int* ldab, double* r, double* c, double* rowcnd, double* colcnd, const double* amax, char* equed); /* DLAQGE - equilibrate a general M by N matrix A using the row */ /* and scaling factors in the vectors R and C */ La_extern void F77_NAME(dlaqge)(const int* m, const int* n, double* a, const int* lda, double* r, double* c, double* rowcnd, double* colcnd, const double* amax, char* equed); /* DLAQSB - equilibrate a symmetric band matrix A using the */ /* scaling factors in the vector S */ La_extern void F77_NAME(dlaqsb)(const char* uplo, const int* n, const int* kd, double* ab, const int* ldab, const double* s, const double* scond, const double* amax, char* equed); /* DLAQSP - equilibrate a symmetric matrix A using the scaling */ /* factors in the vector S */ La_extern void F77_NAME(dlaqsp)(const char* uplo, const int* n, double* ap, const double* s, const double* scond, const double* amax, int* equed); /* DLAQSY - equilibrate a symmetric matrix A using the scaling */ /* factors in the vector S */ La_extern void F77_NAME(dlaqsy)(const char* uplo, const int* n, double* a, const int* lda, const double* s, const double* scond, const double* amax, int* equed); /* DLAQTR - solve the real quasi-triangular system */ /* op(T) * p = scale*c */ La_extern void F77_NAME(dlaqtr)(const int* ltran, const int* lreal, const int* n, const double* t, const int* ldt, const double* b, const double* w, double* scale, double* x, double* work, int* info); /* DLAR2V - apply a vector of real plane rotations from both */ /* sides to a sequence of 2-by-2 real symmetric matrices, defined */ /* by the elements of the vectors x, y and z */ La_extern void F77_NAME(dlar2v)(const int* n, double* x, double* y, double* z, const int* incx, const double* c, const double* s, const int* incc); /* DLARF - apply a real elementary reflector H to a real m by n */ /* matrix C, from either the left or the right */ La_extern void F77_NAME(dlarf)(const char* side, const int* m, const int* n, const double* v, const int* incv, const double* tau, double* c, const int* ldc, double* work); /* DLARFB - apply a real block reflector H or its transpose H' */ /* to a real m by n matrix C, from either the left or the right */ La_extern void F77_NAME(dlarfb)(const char* side, const char* trans, const char* direct, const char* storev, const int* m, const int* n, const int* k, const double* v, const int* ldv, const double* t, const int* ldt, double* c, const int* ldc, double* work, const int* lwork); /* DLARFG - generate a real elementary reflector H of order n, */ /* such that H * ( alpha ) = ( beta ), H' * H = I */ La_extern void F77_NAME(dlarfg)(const int* n, const double* alpha, double* x, const int* incx, double* tau); /* DLARFT - form the triangular factor T of a real block */ /* reflector H of order n, which is defined as a product of k */ /* elementary reflectors */ La_extern void F77_NAME(dlarft)(const char* direct, const char* storev, const int* n, const int* k, double* v, const int* ldv, const double* tau, double* t, const int* ldt); /* DLARFX - apply a real elementary reflector H to a real m by n */ /* matrix C, from either the left or the right */ La_extern void F77_NAME(dlarfx)(const char* side, const int* m, const int* n, const double* v, const double* tau, double* c, const int* ldc, double* work); /* DLARGV - generate a vector of real plane rotations, determined */ /* by elements of the real vectors x and y */ La_extern void F77_NAME(dlargv)(const int* n, double* x, const int* incx, double* y, const int* incy, double* c, const int* incc); /* DLARNV - return a vector of n random real numbers from a */ /* uniform or normal distribution */ La_extern void F77_NAME(dlarnv)(const int* idist, int* iseed, const int* n, double* x); /* DLARTG - generate a plane rotation so that [ CS SN ] */ La_extern void F77_NAME(dlartg)(const double* f, const double* g, double* cs, double* sn, double *r); /* DLARTV - apply a vector of real plane rotations to elements of */ /* the real vectors x and y */ La_extern void F77_NAME(dlartv)(const int* n, double* x, const int* incx, double* y, const int* incy, const double* c, const double* s, const int* incc); /* DLARUV - return a vector of n random real numbers from a */ /* uniform (0,1); */ La_extern void F77_NAME(dlaruv)(int* iseed, const int* n, double* x); /* DLAS2 - compute the singular values of the 2-by-2 matrix */ /* [ F G ] [ 0 H ] */ La_extern void F77_NAME(dlas2)(const double* f, const double* g, const double* h, double* ssmin, double* ssmax); /* DLASCL - multiply the M by N real matrix A by the real scalar */ /* CTO/CFROM */ La_extern void F77_NAME(dlascl)(const char* type, const int* kl,const int* ku, double* cfrom, double* cto, const int* m, const int* n, double* a, const int* lda, int* info); /* DLASET - initialize an m-by-n matrix A to BETA on the diagonal */ /* and ALPHA on the offdiagonals */ La_extern void F77_NAME(dlaset)(const char* uplo, const int* m, const int* n, const double* alpha, const double* beta, double* a, const int* lda); /* DLASQ1 - DLASQ1 computes the singular values of a real N-by-N */ /* bidiagonal matrix with diagonal D and off-diagonal E */ La_extern void F77_NAME(dlasq1)(const int* n, double* d, double* e, double* work, int* info); /* DLASQ2 - DLASQ2 computes the singular values of a real N-by-N */ /* unreduced bidiagonal matrix with squared diagonal elements in */ /* Q and squared off-diagonal elements in E */ La_extern void F77_NAME(dlasq2)(const int* m, double* q, double* e, double* qq, double* ee, const double* eps, const double* tol2, const double* small2, double* sup, int* kend, int* info); /* DLASQ3 - DLASQ3 is the workhorse of the whole bidiagonal SVD */ /* algorithm */ La_extern void F77_NAME(dlasq3)(int* n, double* q, double* e, double* qq, double* ee, double* sup, double *sigma, int* kend, int* off, int* iphase, const int* iconv, const double* eps, const double* tol2, const double* small2); /* DLASQ4 - DLASQ4 estimates TAU, the smallest eigenvalue of a */ /* matrix */ La_extern void F77_NAME(dlasq4)(const int* n, const double* q, const double* e, double* tau, double* sup); /* DLASR - perform the transformation A := P*A, when SIDE = 'L' */ /* or 'l' ( Left-hand side ); A := A*P', when SIDE = 'R' or 'r' */ /* ( Right-hand side ); where A is an m by n real matrix and P is */ /* an orthogonal matrix, */ La_extern void F77_NAME(dlasr)(const char* side, const char* pivot, const char* direct, const int* m, const int* n, const double* c, const double* s, double* a, const int* lda); /* DLASRT - the numbers in D in increasing order (if ID = 'I'); */ /* or in decreasing order (if ID = 'D' ); */ La_extern void F77_NAME(dlasrt)(const char* id, const int* n, double* d, int* info); /* DLASSQ - return the values scl and smsq such that ( scl**2 */ /* );*smsq = x( 1 );**2 +...+ x( n );**2 + ( scale**2 );*sumsq, */ La_extern void F77_NAME(dlassq)(const int* n, const double* x, const int* incx, double* scale, double* sumsq); /* DLASV2 - compute the singular value decomposition of a 2-by-2 */ /* triangular matrix [ F G ] [ 0 H ] */ La_extern void F77_NAME(dlasv2)(const double* f, const double* g, const double* h, double* ssmin, double* ssmax, double* snr, double* csr, double* snl, double* csl); /* DLASWP - perform a series of row interchanges on the matrix A */ La_extern void F77_NAME(dlaswp)(const int* n, double* a, const int* lda, const int* k1, const int* k2, const int* ipiv, const int* incx); /* DLASY2 - solve for the N1 by N2 matrix double* x, 1 <= N1,N2 <= 2, in */ /* op(TL);*X + ISGN*X*op(TR); = SCALE*B, */ La_extern void F77_NAME(dlasy2)(const int* ltranl, const int* ltranr, const int* isgn, const int* n1, const int* n2, const double* tl, const int* ldtl, const double* tr, const int* ldtr, const double* b, const int* ldb, double* scale, double* x, const int* ldx, double* xnorm, int* info); /* DLASYF - compute a partial factorization of a real symmetric */ /* matrix A using the Bunch-Kaufman diagonal pivoting method */ La_extern void F77_NAME(dlasyf)(const char* uplo, const int* n, const int* nb, const int* kb, double* a, const int* lda, int* ipiv, double* w, const int* ldw, int* info); /* DLATBS - solve one of the triangular systems A *x = s*b or */ /* A'*x = s*b with scaling to prevent overflow, where A is an */ /* upper or lower triangular band matrix */ La_extern void F77_NAME(dlatbs)(const char* uplo, const char* trans, const char* diag, const char* normin, const int* n, const int* kd, const double* ab, const int* ldab, double* x, double* scale, double* cnorm, int* info); /* DLATPS - solve one of the triangular systems A *x = s*b or */ /* A'*x = s*b with scaling to prevent overflow, where A is an */ /* upper or lower triangular matrix stored in packed form */ La_extern void F77_NAME(dlatps)(const char* uplo, const char* trans, const char* diag, const char* normin, const int* n, const double* ap, double* x, double* scale, double* cnorm, int* info); /* DLATRD - reduce NB rows and columns of a real symmetric matrix */ /* A to symmetric tridiagonal form by an orthogonal similarity */ /* transformation Q' * A * Q, and returns the matrices V and W */ /* which are needed to apply the transformation to the unreduced */ /* part of A */ La_extern void F77_NAME(dlatrd)(const char* uplo, const int* n, const int* nb, double* a, const int* lda, double* e, double* tau, double* w, const int* ldw); /* DLATRS - solve one of the triangular systems A *x = s*b or */ /* A'*x = s*b with scaling to prevent overflow */ La_extern void F77_NAME(dlatrs)(const char* uplo, const char* trans, const char* diag, const char* normin, const int* n, const double* a, const int* lda, double* x, double* scale, double* cnorm, int* info); /* DLAUU2 - compute the product U * U' or L' * const int* l, where the */ /* triangular factor U or L is stored in the upper or lower */ /* triangular part of the array A */ La_extern void F77_NAME(dlauu2)(const char* uplo, const int* n, double* a, const int* lda, int* info); /* DLAUUM - compute the product U * U' or L' * L, where the */ /* triangular factor U or L is stored in the upper or lower */ /* triangular part of the array A */ La_extern void F77_NAME(dlauum)(const char* uplo, const int* n, double* a, const int* lda, int* info); /* ======================================================================== */ //* Selected Double Complex Lapack Routines /* ======== */ /* IZMAX1 finds the index of the element whose real part has maximum * absolute value. */ La_extern int F77_NAME(izmax1)(const int *n, Rcomplex *cx, const int *incx); /* ZGECON estimates the reciprocal of the condition number of a general * complex matrix A, in either the 1-norm or the infinity-norm, using * the LU factorization computed by ZGETRF. */ La_extern void F77_NAME(zgecon)(const char *norm, const int *n, const Rcomplex *a, const int *lda, const double *anorm, double *rcond, Rcomplex *work, double *rwork, int *info); /* ZGESV computes the solution to a complex system of linear equations */ La_extern void F77_NAME(zgesv)(const int *n, const int *nrhs, Rcomplex *a, const int *lda, int *ipiv, Rcomplex *b, const int *ldb, int *info); /* ZGEQP3 computes a QR factorization with column pivoting */ La_extern void F77_NAME(zgeqp3)(const int *m, const int *n, Rcomplex *a, const int *lda, int *jpvt, Rcomplex *tau, Rcomplex *work, const int *lwork, double *rwork, int *info); /* ZUNMQR applies Q or Q**H from the Left or Right */ La_extern void F77_NAME(zunmqr)(const char *side, const char *trans, const int *m, const int *n, const int *k, Rcomplex *a, const int *lda, Rcomplex *tau, Rcomplex *c, const int *ldc, Rcomplex *work, const int *lwork, int *info); /* ZTRTRS solves triangular systems */ La_extern void F77_NAME(ztrtrs)(const char *uplo, const char *trans, const char *diag, const int *n, const int *nrhs, Rcomplex *a, const int *lda, Rcomplex *b, const int *ldb, int *info); /* ZGESVD - compute the singular value decomposition (SVD); of a */ /* real M-by-N matrix A, optionally computing the left and/or */ /* right singular vectors */ La_extern void F77_NAME(zgesvd)(const char *jobu, const char *jobvt, const int *m, const int *n, Rcomplex *a, const int *lda, double *s, Rcomplex *u, const int *ldu, Rcomplex *vt, const int *ldvt, Rcomplex *work, const int *lwork, double *rwork, int *info); /* ZGHEEV - compute all eigenvalues and, optionally, eigenvectors */ /* of a Hermitian matrix A */ La_extern void F77_NAME(zheev)(const char *jobz, const char *uplo, const int *n, Rcomplex *a, const int *lda, double *w, Rcomplex *work, const int *lwork, double *rwork, int *info); /* ZGGEEV - compute all eigenvalues and, optionally, eigenvectors */ /* of a complex non-symmetric matrix A */ La_extern void F77_NAME(zgeev)(const char *jobvl, const char *jobvr, const int *n, Rcomplex *a, const int *lda, Rcomplex *wr, Rcomplex *vl, const int *ldvl, Rcomplex *vr, const int *ldvr, Rcomplex *work, const int *lwork, double *rwork, int *info); /* NOTE: The following entry points were traditionally in this file, but are not provided by R's libRlapack */ /* DZSUM1 - take the sum of the absolute values of a complex */ /* vector and returns a double precision result */ La_extern double F77_NAME(dzsum1)(const int *n, Rcomplex *CX, const int *incx); /* ZLACN2 estimates the 1-norm of a square, complex matrix A. * Reverse communication is used for evaluating matrix-vector products. */ La_extern void F77_NAME(zlacn2)(const int *n, Rcomplex *v, Rcomplex *x, double *est, int *kase, int *isave); /* ZLANTR - return the value of the one norm, or the Frobenius norm, */ /* or the infinity norm, or the element of largest absolute value of */ /* a trapezoidal or triangular matrix A */ La_extern double F77_NAME(zlantr)(const char *norm, const char *uplo, const char *diag, const int *m, const int *n, Rcomplex *a, const int *lda, double *work); /* ======================================================================== */ //* Other double precision and double complex Lapack routines provided by libRlapack. /* These are extracted from the CLAPACK headers. */ La_extern void F77_NAME(dbdsdc)(char *uplo, char *compq, int *n, double * d, double *e, double *u, int *ldu, double *vt, int *ldvt, double *q, int *iq, double *work, int * iwork, int *info); La_extern void F77_NAME(dgelsd)(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, double * s, double *rcond, int *rank, double *work, int *lwork, int *iwork, int *info); La_extern void F77_NAME(dgesc2)(int *n, double *a, int *lda, double *rhs, int *ipiv, int *jpiv, double *scale); /* DGESDD - compute the singular value decomposition (SVD); of a */ /* real M-by-N matrix A, optionally computing the left and/or */ /* right singular vectors. If singular vectors are desired, it uses a */ /* divide-and-conquer algorithm. */ La_extern void F77_NAME(dgesdd)(const char *jobz, const int *m, const int *n, double *a, const int *lda, double *s, double *u, const int *ldu, double *vt, const int *ldvt, double *work, const int *lwork, int *iwork, int *info); La_extern void F77_NAME(dgetc2)(int *n, double *a, int *lda, int *ipiv, int *jpiv, int *info); typedef int (*L_fp)(); La_extern void F77_NAME(dggesx)(char *jobvsl, char *jobvsr, char *sort, L_fp delctg, char *sense, int *n, double *a, int *lda, double *b, int *ldb, int *sdim, double *alphar, double *alphai, double *beta, double *vsl, int *ldvsl, double *vsr, int *ldvsr, double *rconde, double * rcondv, double *work, int *lwork, int *iwork, int * liwork, int *bwork, int *info); La_extern void F77_NAME(dggev)(char *jobvl, char *jobvr, int *n, double * a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double *beta, double *vl, int *ldvl, double *vr, int *ldvr, double *work, int *lwork, int *info); La_extern void F77_NAME(dggevx)(char *balanc, char *jobvl, char *jobvr, char * sense, int *n, double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double * beta, double *vl, int *ldvl, double *vr, int *ldvr, int *ilo, int *ihi, double *lscale, double *rscale, double *abnrm, double *bbnrm, double *rconde, double * rcondv, double *work, int *lwork, int *iwork, int * bwork, int *info); La_extern void F77_NAME(dgtts2)(int *itrans, int *n, int *nrhs, double *dl, double *d, double *du, double *du2, int *ipiv, double *b, int *ldb); La_extern void F77_NAME(dlagv2)(double *a, int *lda, double *b, int *ldb, double *alphar, double *alphai, double * beta, double *csl, double *snl, double *csr, double * snr); La_extern void F77_NAME(dlals0)(int *icompq, int *nl, int *nr, int *sqre, int *nrhs, double *b, int *ldb, double *bx, int *ldbx, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double * poles, double *difl, double *difr, double *z, int * k, double *c, double *s, double *work, int *info); La_extern void F77_NAME(dlalsa)(int *icompq, int *smlsiz, int *n, int *nrhs, double *b, int *ldb, double *bx, int * ldbx, double *u, int *ldu, double *vt, int *k, double *difl, double *difr, double *z, double * poles, int *givptr, int *givcol, int *ldgcol, int * perm, double *givnum, double *c, double *s, double * work, int *iwork, int *info); La_extern void F77_NAME(dlalsd)(char *uplo, int *smlsiz, int *n, int *nrhs, double *d, double *e, double *b, int *ldb, double *rcond, int *rank, double *work, int *iwork, int *info); La_extern void F77_NAME(dlamc1)(int *beta, int *t, int *rnd, int *ieee1); La_extern void F77_NAME(dlamc2)(int *beta, int *t, int *rnd, double *eps, int *emin, double *rmin, int *emax, double *rmax); La_extern double F77_NAME(dlamc3)(double *a, double *b); La_extern void F77_NAME(dlamc4)(int *emin, double *start, int *base); La_extern void F77_NAME(dlamc5)(int *beta, int *p, int *emin, int *ieee, int *emax, double *rmax); La_extern void F77_NAME(dlaqp2)(int *m, int *n, int *offset, double *a, int *lda, int *jpvt, double *tau, double *vn1, double *vn2, double *work); La_extern void F77_NAME(dlaqps)(int *m, int *n, int *offset, int *nb, int *kb, double *a, int *lda, int *jpvt, double *tau, double *vn1, double *vn2, double *auxv, double *f, int *ldf); La_extern void F77_NAME(dlar1v)(int *n, int *b1, int *bn, double *sigma, double *d, double *l, double *ld, double * lld, double *gersch, double *z, double *ztz, double *mingma, int *r, int *isuppz, double *work); La_extern void F77_NAME(dlarrb)(int *n, double *d, double *l, double *ld, double *lld, int *ifirst, int *ilast, double *sigma, double *reltol, double *w, double * wgap, double *werr, double *work, int *iwork, int * info); La_extern void F77_NAME(dlarre)(int *n, double *d, double *e, double *tol, int *nsplit, int *isplit, int *m, double *w, double *woff, double *gersch, double *work, int *info); La_extern void F77_NAME(dlarrf)(int *n, double *d, double *l, double *ld, double *lld, int *ifirst, int *ilast, double *w, double *dplus, double *lplus, double *work, int *iwork, int *info); La_extern void F77_NAME(dlarrv)(int *n, double *d, double *l, int *isplit, int *m, double *w, int *iblock, double *gersch, double *tol, double *z, int *ldz, int *isuppz, double *work, int *iwork, int *info); La_extern void F77_NAME(dlarz)(char *side, int *m, int *n, int *l, double *v, int *incv, double *tau, double *c, int *ldc, double *work); La_extern void F77_NAME(dlarzb)(char *side, char *trans, char *direct, char * storev, int *m, int *n, int *k, int *l, double *v, int *ldv, double *t, int *ldt, double *c, int * ldc, double *work, int *ldwork); La_extern void F77_NAME(dlarzt)(char *direct, char *storev, int *n, int * k, double *v, int *ldv, double *tau, double *t, int *ldt); La_extern void F77_NAME(dlasd0)(int *n, int *sqre, double *d, double *e, double *u, int *ldu, double *vt, int * ldvt, int *smlsiz, int *iwork, double *work, int * info); La_extern void F77_NAME(dlasd1)(int *nl, int *nr, int *sqre, double *d, double *alpha, double *beta, double *u, int *ldu, double *vt, int *ldvt, int *idxq, int * iwork, double *work, int *info); La_extern void F77_NAME(dlasd2)(int *nl, int *nr, int *sqre, int *k, double *d, double *z, double *alpha, double * beta, double *u, int *ldu, double *vt, int *ldvt, double *dsigma, double *u2, int *ldu2, double *vt2, int *ldvt2, int *idxp, int *idx, int *idxc, int * idxq, int *coltyp, int *info); La_extern void F77_NAME(dlasd3)(int *nl, int *nr, int *sqre, int *k, double *d, double *q, int *ldq, double *dsigma, double *u, int *ldu, double *u2, int *ldu2, double *vt, int *ldvt, double *vt2, int *ldvt2, int *idxc, int *ctot, double *z, int *info); La_extern void F77_NAME(dlasd4)(int *n, int *i, double *d, double *z, double *delta, double *rho, double * sigma, double *work, int *info); La_extern void F77_NAME(dlasd5)(int *i, double *d, double *z, double *delta, double *rho, double *dsigma, double * work); La_extern void F77_NAME(dlasd6)(int *icompq, int *nl, int *nr, int *sqre, double *d, double *vf, double *vl, double *alpha, double *beta, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double *poles, double *difl, double * difr, double *z, int *k, double *c, double *s, double *work, int *iwork, int *info); La_extern void F77_NAME(dlasd7)(int *icompq, int *nl, int *nr, int *sqre, int *k, double *d, double *z, double *zw, double *vf, double *vfw, double *vl, double *vlw, double *alpha, double *beta, double * dsigma, int *idx, int *idxp, int *idxq, int *perm, int *givptr, int *givcol, int *ldgcol, double *givnum, int *ldgnum, double *c, double *s, int *info); La_extern void F77_NAME(dlasd8)(int *icompq, int *k, double *d, double *z, double *vf, double *vl, double *difl, double *difr, int *lddifr, double *dsigma, double * work, int *info); La_extern void F77_NAME(dlasd9)(int *icompq, int *ldu, int *k, double *d, double *z, double *vf, double *vl, double *difl, double *difr, double *dsigma, double * work, int *info); La_extern void F77_NAME(dlasda)(int *icompq, int *smlsiz, int *n, int *sqre, double *d, double *e, double *u, int *ldu, double *vt, int *k, double *difl, double *difr, double *z, double *poles, int *givptr, int *givcol, int *ldgcol, int *perm, double *givnum, double *c, double *s, double *work, int *iwork, int *info); La_extern void F77_NAME(dlasdq)(char *uplo, int *sqre, int *n, int * ncvt, int *nru, int *ncc, double *d, double *e, double *vt, int *ldvt, double *u, int *ldu, double *c, int *ldc, double *work, int *info); La_extern void F77_NAME(dlasdt)(int *n, int *lvl, int *nd, int * inode, int *ndiml, int *ndimr, int *msub); La_extern void F77_NAME(dlasq5)(int *i0, int *n0, double *z, int *pp, double *tau, double *dmin, double *dmin1, double *dmin2, double *dn, double *dnm1, double *dnm2, int *ieee); La_extern void F77_NAME(dlasq6)(int *i0, int *n0, double *z, int *pp, double *dmin, double *dmin1, double *dmin2, double *dn, double *dnm1, double *dnm2); La_extern void F77_NAME(dlatdf)(int *ijob, int *n, double *z, int *ldz, double *rhs, double *rdsum, double *rdscal, int *ipiv, int *jpiv); La_extern void F77_NAME(dlatrz)(int *m, int *n, int *l, double * a, int *lda, double *tau, double *work); La_extern void F77_NAME(dormr3)(char *side, char *trans, int *m, int *n, int *k, int *l, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *info); La_extern void F77_NAME(dormrz)(char *side, char *trans, int *m, int *n, int *k, int *l, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info); La_extern void F77_NAME(dptts2)(int *n, int *nrhs, double *d, double *e, double *b, int *ldb); La_extern void F77_NAME(dsbgvd)(char *jobz, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double *bb, int * ldbb, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info); La_extern void F77_NAME(dsbgvx)(char *jobz, char *range, char *uplo, int *n, int *ka, int *kb, double *ab, int *ldab, double * bb, int *ldbb, double *q, int *ldq, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info); La_extern void F77_NAME(dspgvd)(int *itype, char *jobz, char *uplo, int * n, double *ap, double *bp, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info); La_extern void F77_NAME(dspgvx)(int *itype, char *jobz, char *range, char * uplo, int *n, double *ap, double *bp, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *iwork, int *ifail, int *info); La_extern void F77_NAME(dstegr)(char *jobz, char *range, int *n, double * d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info); La_extern void F77_NAME(dstevr)(char *jobz, char *range, int *n, double * d, double *e, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info); La_extern void F77_NAME(dsygvd)(int *itype, char *jobz, char *uplo, int * n, double *a, int *lda, double *b, int *ldb, double *w, double *work, int *lwork, int *iwork, int *liwork, int *info); La_extern void F77_NAME(dsygvx)(int *itype, char *jobz, char *range, char * uplo, int *n, double *a, int *lda, double *b, int *ldb, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, double *work, int *lwork, int *iwork, int *ifail, int *info); La_extern void F77_NAME(dtgex2)(int *wantq, int *wantz, int *n, double *a, int *lda, double *b, int *ldb, double * q, int *ldq, double *z, int *ldz, int *j1, int * n1, int *n2, double *work, int *lwork, int *info); La_extern void F77_NAME(dtgexc)(int *wantq, int *wantz, int *n, double *a, int *lda, double *b, int *ldb, double * q, int *ldq, double *z, int *ldz, int *ifst, int *ilst, double *work, int *lwork, int *info); La_extern void F77_NAME(dtgsen)(int *ijob, int *wantq, int *wantz, int *select, int *n, double *a, int *lda, double * b, int *ldb, double *alphar, double *alphai, double * beta, double *q, int *ldq, double *z, int *ldz, int *m, double *pl, double *pr, double *dif, double *work, int *lwork, int *iwork, int *liwork, int *info); La_extern void F77_NAME(dtgsna)(char *job, char *howmny, int *select, int *n, double *a, int *lda, double *b, int *ldb, double *vl, int *ldvl, double *vr, int *ldvr, double *s, double *dif, int *mm, int *m, double * work, int *lwork, int *iwork, int *info); La_extern void F77_NAME(dtgsy2)(char *trans, int *ijob, int *m, int * n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *d, int *ldd, double *e, int *lde, double *f, int *ldf, double * scale, double *rdsum, double *rdscal, int *iwork, int *pq, int *info); La_extern void F77_NAME(dtgsyl)(char *trans, int *ijob, int *m, int * n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *d, int *ldd, double *e, int *lde, double *f, int *ldf, double * scale, double *dif, double *work, int *lwork, int * iwork, int *info); La_extern void F77_NAME(dtzrzf)(int *m, int *n, double *a, int * lda, double *tau, double *work, int *lwork, int *info); La_extern void F77_NAME(dpstrf)(const char* uplo, const int* n, double* a, const int* lda, int* piv, int* rank, double* tol, double *work, int* info); La_extern int F77_NAME(lsame)(char *ca, char *cb); La_extern void F77_NAME(zbdsqr)(char *uplo, int *n, int *ncvt, int * nru, int *ncc, double *d, double *e, Rcomplex *vt, int *ldvt, Rcomplex *u, int *ldu, Rcomplex *c, int *ldc, double *rwork, int *info); La_extern void F77_NAME(zdrot)(int *n, Rcomplex *cx, int *incx, Rcomplex *cy, int *incy, double *c, double *s); La_extern void F77_NAME(zgebak)(char *job, char *side, int *n, int *ilo, int *ihi, double *scale, int *m, Rcomplex *v, int *ldv, int *info); La_extern void F77_NAME(zgebal)(char *job, int *n, Rcomplex *a, int *lda, int *ilo, int *ihi, double *scale, int *info); La_extern void F77_NAME(zgebd2)(int *m, int *n, Rcomplex *a, int *lda, double *d, double *e, Rcomplex *tauq, Rcomplex *taup, Rcomplex *work, int *info); La_extern void F77_NAME(zgebrd)(int *m, int *n, Rcomplex *a, int *lda, double *d, double *e, Rcomplex *tauq, Rcomplex *taup, Rcomplex *work, int *lwork, int * info); La_extern void F77_NAME(zgehd2)(int *n, int *ilo, int *ihi, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *info); La_extern void F77_NAME(zgehrd)(int *n, int *ilo, int *ihi, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *lwork, int *info); La_extern void F77_NAME(zgelq2)(int *m, int *n, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *work, int *info); La_extern void F77_NAME(zgelqf)(int *m, int *n, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *work, int *lwork, int *info); La_extern void F77_NAME(zgeqr2)(int *m, int *n, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *work, int *info); La_extern void F77_NAME(zgeqrf)(int *m, int *n, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *work, int *lwork, int *info); La_extern void F77_NAME(zgetf2)(int *m, int *n, Rcomplex *a, int *lda, int *ipiv, int *info); La_extern void F77_NAME(zgetrf)(int *m, int *n, Rcomplex *a, int *lda, int *ipiv, int *info); La_extern void F77_NAME(zgetrs)(char *trans, int *n, int *nrhs, Rcomplex *a, int *lda, int *ipiv, Rcomplex *b, int *ldb, int *info); La_extern void F77_NAME(zhetd2)(char *uplo, int *n, Rcomplex *a, int *lda, double *d, double *e, Rcomplex *tau, int *info); La_extern void F77_NAME(zhetrd)(char *uplo, int *n, Rcomplex *a, int *lda, double *d, double *e, Rcomplex *tau, Rcomplex *work, int *lwork, int *info); La_extern void F77_NAME(zhseqr)(char *job, char *compz, int *n, int *ilo, int *ihi, Rcomplex *h, int *ldh, Rcomplex *w, Rcomplex *z, int *ldz, Rcomplex *work, int *lwork, int *info); La_extern void F77_NAME(zlabrd)(int *m, int *n, int *nb, Rcomplex *a, int *lda, double *d, double *e, Rcomplex *tauq, Rcomplex *taup, Rcomplex *x, int * ldx, Rcomplex *y, int *ldy); La_extern void F77_NAME(zlacgv)(int *n, Rcomplex *x, int *incx); La_extern void F77_NAME(zlacpy)(char *uplo, int *m, int *n, Rcomplex *a, int *lda, Rcomplex *b, int *ldb); La_extern void F77_NAME(zlahqr)(int *wantt, int *wantz, int *n, int *ilo, int *ihi, Rcomplex *h, int *ldh, Rcomplex *w, int *iloz, int *ihiz, Rcomplex *z, int *ldz, int *info); La_extern double F77_NAME(zlange)(char *norm, int *m, int *n, Rcomplex *a, int *lda, double *work); La_extern double F77_NAME(zlanhe)(char *norm, char *uplo, int *n, Rcomplex *a, int *lda, double *work); La_extern double F77_NAME(zlanhs)(char *norm, int *n, Rcomplex *a, int *lda, double *work); La_extern void F77_NAME(zlaqp2)(int *m, int *n, int *offset, Rcomplex *a, int *lda, int *jpvt, Rcomplex *tau, double *vn1, double *vn2, Rcomplex *work); La_extern void F77_NAME(zlaqps)(int *m, int *n, int *offset, int *nb, int *kb, Rcomplex *a, int *lda, int *jpvt, Rcomplex *tau, double *vn1, double *vn2, Rcomplex * auxv, Rcomplex *f, int *ldf); La_extern void F77_NAME(zlarf)(char *side, int *m, int *n, Rcomplex *v, int *incv, Rcomplex *tau, Rcomplex *c, int * ldc, Rcomplex *work); La_extern void F77_NAME(zlarfb)(char *side, char *trans, char *direct, char * storev, int *m, int *n, int *k, Rcomplex *v, int *ldv, Rcomplex *t, int *ldt, Rcomplex *c, int * ldc, Rcomplex *work, int *ldwork); La_extern void F77_NAME(zlarfg)(int *n, Rcomplex *alpha, Rcomplex * x, int *incx, Rcomplex *tau); La_extern void F77_NAME(zlarft)(char *direct, char *storev, int *n, int * k, Rcomplex *v, int *ldv, Rcomplex *tau, Rcomplex * t, int *ldt); La_extern void F77_NAME(zlarfx)(char *side, int *m, int *n, Rcomplex *v, Rcomplex *tau, Rcomplex *c, int * ldc, Rcomplex *work); La_extern void F77_NAME(zlascl)(char *type, int *kl, int *ku, double *cfrom, double *cto, int *m, int *n, Rcomplex *a, int *lda, int *info); La_extern void F77_NAME(zlaset)(char *uplo, int *m, int *n, Rcomplex *alpha, Rcomplex *beta, Rcomplex *a, int * lda); La_extern void F77_NAME(zlasr)(char *side, char *pivot, char *direct, int *m, int *n, double *c, double *s, Rcomplex *a, int *lda); La_extern void F77_NAME(zlassq)(int *n, Rcomplex *x, int *incx, double *scale, double *sumsq); La_extern void F77_NAME(zlaswp)(int *n, Rcomplex *a, int *lda, int *k1, int *k2, int *ipiv, int *incx); La_extern void F77_NAME(zlatrd)(char *uplo, int *n, int *nb, Rcomplex *a, int *lda, double *e, Rcomplex *tau, Rcomplex *w, int *ldw); La_extern void F77_NAME(zlatrs)(char *uplo, char *trans, char *diag, char * normin, int *n, Rcomplex *a, int *lda, Rcomplex *x, double *scale, double *cnorm, int *info); La_extern void F77_NAME(zsteqr)(char *compz, int *n, double *d, double *e, Rcomplex *z, int *ldz, double *work, int *info); /* ZTRCON estimates the reciprocal of the condition number of a * triangular matrix A, in either the 1-norm or the infinity-norm. */ La_extern void F77_NAME(ztrcon)(const char *norm, const char *uplo, const char *diag, const int *n, const Rcomplex *a, const int *lda, double *rcond, Rcomplex *work, double *rwork, int *info); La_extern void F77_NAME(ztrevc)(char *side, char *howmny, int *select, int *n, Rcomplex *t, int *ldt, Rcomplex *vl, int *ldvl, Rcomplex *vr, int *ldvr, int *mm, int *m, Rcomplex *work, double *rwork, int *info); La_extern void F77_NAME(zung2l)(int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *info); La_extern void F77_NAME(zung2r)(int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *info); La_extern void F77_NAME(zungbr)(char *vect, int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *lwork, int *info); La_extern void F77_NAME(zunghr)(int *n, int *ilo, int *ihi, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *lwork, int *info); La_extern void F77_NAME(zungl2)(int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *info); La_extern void F77_NAME(zunglq)(int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *lwork, int *info); La_extern void F77_NAME(zungql)(int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *lwork, int *info); La_extern void F77_NAME(zungqr)(int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *lwork, int *info); La_extern void F77_NAME(zungr2)(int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *info); La_extern void F77_NAME(zungrq)(int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex * work, int *lwork, int *info); La_extern void F77_NAME(zungtr)(char *uplo, int *n, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *work, int *lwork, int *info); La_extern void F77_NAME(zunm2r)(char *side, char *trans, int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *c, int *ldc, Rcomplex *work, int *info); La_extern void F77_NAME(zunmbr)(char *vect, char *side, char *trans, int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *c, int *ldc, Rcomplex *work, int * lwork, int *info); La_extern void F77_NAME(zunml2)(char *side, char *trans, int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *c, int *ldc, Rcomplex *work, int *info); La_extern void F77_NAME(zunmlq)(char *side, char *trans, int *m, int *n, int *k, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *c, int *ldc, Rcomplex *work, int *lwork, int *info); /* Added in R 3.1.0 */ /* ZGESVD - compute the singular value decomposition (SVD); of a */ /* real M-by-N matrix A, optionally computing the left and/or */ /* right singular vectors */ La_extern void F77_NAME(zgesdd)(const char *jobz, const int *m, const int *n, Rcomplex *a, const int *lda, double *s, Rcomplex *u, const int *ldu, Rcomplex *vt, const int *ldvt, Rcomplex *work, const int *lwork, double *rwork, int *iwork, int *info); La_extern void F77_NAME(zgelsd)(int *m, int *n, int *nrhs, Rcomplex *a, int *lda, Rcomplex *b, int *ldb, double *s, double *rcond, int *rank, Rcomplex *work, int *lwork, double *rwork, int *iwork, int *info); /* =========================== DEPRECATED ============================== Routines below were deprecated in LAPACK 3.6.0, and are not included in a default build of LAPACK. Currently dgegv, dgeqpf, dggsvd and dggsvp are included in R, but that may change before release of R 3.3.0. */ /* DGEGV - compute for a pair of n-by-n real nonsymmetric */ /* matrices A and B, the generalized eigenvalues (alphar +/- */ /* alphai*i, beta);, and optionally, the left and/or right */ /* generalized eigenvectors (VL and VR); */ La_extern void F77_NAME(dgegv)(const char* jobvl, const char* jobvr, const int* n, double* a, const int* lda, double* b, const int* ldb, double* alphar, double* alphai, const double* beta, double* vl, const int* ldvl, double* vr, const int* ldvr, double* work, const int* lwork, int* info); /* DGEQPF - compute a QR factorization with column pivoting of a */ /* real M-by-N matrix A */ La_extern void F77_NAME(dgeqpf)(const int* m, const int* n, double* a, const int* lda, int* jpvt, double* tau, double* work, int* info); /* DGGSVD - compute the generalized singular value decomposition */ /* (GSVD) of an M-by-N real matrix A and P-by-N real matrix B */ La_extern void F77_NAME(dggsvd)(const char* jobu, const char* jobv, const char* jobq, const int* m, const int* n, const int* p, const int* k, const int* l, double* a, const int* lda, double* b, const int* ldb, const double* alpha, const double* beta, double* u, const int* ldu, double* v, const int* ldv, double* q, const int* ldq, double* work, int* iwork, int* info); /* DTZRQF - reduce the M-by-N ( M<=N ); real upper trapezoidal */ /* matrix A to upper triangular form by means of orthogonal */ /* transformations */ La_extern void F77_NAME(dtzrqf)(const int* m, const int* n, double* a, const int* lda, double* tau, int* info); /* DLAHRD - reduce the first NB columns of a real general */ /* n-by-(n-k+1); matrix A so that elements below the k-th */ /* subdiagonal are zero */ La_extern void F77_NAME(dlahrd)(const int* n, const int* k, const int* nb, double* a, const int* lda, double* tau, double* t, const int* ldt, double* y, const int* ldy); /* DLATZM - apply a Householder matrix generated by DTZRQF to a */ /* matrix */ La_extern void F77_NAME(dlatzm)(const char* side, const int* m, const int* n, const double* v, const int* incv, const double* tau, double* c1, double* c2, const int* ldc, double* work); La_extern void F77_NAME(dgegs)(char *jobvsl, char *jobvsr, int *n, double *a, int *lda, double *b, int *ldb, double * alphar, double *alphai, double *beta, double *vsl, int *ldvsl, double *vsr, int *ldvsr, double *work, int *lwork, int *info); La_extern void F77_NAME(dgelsx)(int *m, int *n, int *nrhs, double *a, int *lda, double *b, int *ldb, int * jpvt, double *rcond, int *rank, double *work, int * info); La_extern void F77_NAME(dggsvp)(char *jobu, char *jobv, char *jobq, int *m, int *p, int *n, double *a, int *lda, double *b, int *ldb, double *tola, double *tolb, int *k, int *l, double *u, int *ldu, double *v, int *ldv, double *q, int *ldq, int *iwork, double *tau, double *work, int *info); La_extern void F77_NAME(zlahrd)(int *n, int *k, int *nb, Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *t, int *ldt, Rcomplex *y, int *ldy); #ifdef __cplusplus } #endif #endif /* R_LAPACK_H */ // Local variables: *** // mode: outline-minor *** // outline-regexp: "^\^L\\|^//[*]+" *** // End: *** |
Added undroid/Rtcl/compat/R/R_ext/Linpack.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1997 Robert Gentleman and Ross Ihaka * Copyright (C) 1999-2015 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* C declarations of double-precision LINPACK Fortran subroutines included in R, and some others. Those which are listed as part of R are in the API */ #ifndef R_LINPACK_H_ #define R_LINPACK_H_ #include <R_ext/RS.h> /* for F77_... */ #include <R_ext/BLAS.h> #ifdef __cplusplus extern "C" { #endif /* Double Precision LINPACK */ extern void F77_NAME(dpbfa)(double*, int*, int*, int*, int*); extern void F77_NAME(dpbsl)(double*, int*, int*, int*, double*); extern void F77_NAME(dpoco)(double*, int*, int*, double*, double*, int*); extern void F77_NAME(dpodi)(double*, int*, int*, double*, int*); extern void F77_NAME(dpofa)(double*, int*, int*, int*); extern void F77_NAME(dposl)(double*, int*, int*, double*); extern void F77_NAME(dqrdc)(double*, int*, int*, int*, double*, int*, double*, int*); extern void F77_NAME(dqrsl)(double*, int*, int*, int*, double*, double*, double*, double*, double*, double*, double*, int*, int*); extern void F77_NAME(dsvdc)(double*, int*, int*, int*, double*, double*, double*, int*, double*, int*, double*, int*, int*); extern void F77_NAME(dtrco)(double*, int*, int*, double*, double*, int*); extern void F77_NAME(dtrsl)(double*, int*, int*, double*, int*, int*); /* The following routines are listed as they have always been declared here, but they are not currently included in R */ extern void F77_NAME(dchdc)(double*, int*, int*, double*, int*, int*, int*); extern void F77_NAME(dchdd)(double*, int*, int*, double*, double*, int*, int*, double*, double*, double*, double*, int*); extern void F77_NAME(dchex)(double*, int*, int*, int*, int*, double*, int*, int*, double*, double*, int*); extern void F77_NAME(dchud)(double*, int*, int*, double*, double*, int*, int*, double*, double*, double*, double*); extern void F77_NAME(dgbco)(double*, int*, int*, int*, int*, int*, double*, double*); extern void F77_NAME(dgbdi)(double*, int*, int*, int*, int*, int*, double*); extern void F77_NAME(dgbfa)(double*, int*, int*, int*, int*, int*, int*); extern void F77_NAME(dgbsl)(double*, int*, int*, int*, int*, int*, double*, int*); extern void F77_NAME(dgeco)(double*, int*, int*, int*, double*, double*); extern void F77_NAME(dgedi)(double*, int*, int*, int*, double*, double*, int*); extern void F77_NAME(dgefa)(double*, int*, int*, int*, int*); extern void F77_NAME(dgesl)(double*, int*, int*, int*, double*, int*); extern void F77_NAME(dgtsl)(int*, double*, double*, double*, double*, int*); extern void F77_NAME(dpbco)(double*, int*, int*, int*, double*, double*, int*); extern void F77_NAME(dpbdi)(double*, int*, int*, int*, double*); extern void F77_NAME(dppco)(double*, int*, double*, double*, int*); extern void F77_NAME(dppdi)(double*, int*, double*, int*); extern void F77_NAME(dppfa)(double*, int*, int*); extern void F77_NAME(dppsl)(double*, int*, double*); extern void F77_NAME(dptsl)(int*, double*, double*, double*); extern void F77_NAME(dsico)(double*, int*, int*, int*, double*, double*); extern void F77_NAME(dsidi)(double*, int*, int*, int*, double*, int*, double*, int*); extern void F77_NAME(dsifa)(double*, int*, int*, int*, int*); extern void F77_NAME(dsisl)(double*, int*, int*, int*, double*); extern void F77_NAME(dspco)(double*, int*, int*, double*, double*); extern void F77_NAME(dspdi)(double*, int*, int*, double*, int*, double*, int*); extern void F77_NAME(dspfa)(double*, int*, int*, int*); extern void F77_NAME(dspsl)(double*, int*, int*, double*); #ifdef __cplusplus } #endif #endif /* R_LINPACK_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/MathThreads.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2000-2014 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Experimental: included by src/library/stats/src/distance.c Note that only uses R_num_math_threads: it is not clear R_num_math_threads should be exposed at all. This is not used currently on Windows, where R_num_math_threads used not to be exposed. */ #ifndef R_EXT_MATHTHREADS_H_ #define R_EXT_MATHTHREADS_H_ #ifdef __cplusplus extern "C" { #endif #include <R_ext/libextern.h> LibExtern int R_num_math_threads; LibExtern int R_max_num_math_threads; #ifdef __cplusplus } #endif #endif /* R_EXT_MATHTHREADS_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/Memory.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1998-2016 The R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ * * * Memory Allocation (garbage collected) --- INCLUDING S compatibility --- */ /* Included by R.h: API */ #ifndef R_EXT_MEMORY_H_ #define R_EXT_MEMORY_H_ #ifndef NO_C_HEADERS # if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS) # include <cstddef> using std::size_t; # else # include <stddef.h> /* for size_t */ # endif #else #warning "use of NO_C_HEADERS is deprecated" #endif #ifdef __cplusplus extern "C" { #endif void* vmaxget(void); void vmaxset(const void *); void R_gc(void); int R_gc_running(); char* R_alloc(size_t, int); long double *R_allocLD(size_t nelem); char* S_alloc(long, int); char* S_realloc(char *, long, long, int); #ifdef __cplusplus } #endif #endif /* R_EXT_MEMORY_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/Parse.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1998-2006 R Core Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* NOTE: This file exports a part of the current internal parse interface. It is subject to change at any minor (x.y.0) version of R. */ #ifndef R_EXT_PARSE_H_ #define R_EXT_PARSE_H_ #ifdef __cplusplus extern "C" { #endif /* PARSE_NULL will not be returned by R_ParseVector */ typedef enum { PARSE_NULL, PARSE_OK, PARSE_INCOMPLETE, PARSE_ERROR, PARSE_EOF } ParseStatus; SEXP R_ParseVector(SEXP, int, ParseStatus *, SEXP); #ifdef __cplusplus } #endif #endif |
Added undroid/Rtcl/compat/R/R_ext/Print.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1998-2010 The R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Included by R.h: API */ #ifndef R_EXT_PRINT_H_ #define R_EXT_PRINT_H_ #ifdef __cplusplus /* If the vprintf interface is defined at all in C++ it may only be defined in namespace std. */ # ifdef R_USE_C99_IN_CXX # include <cstdarg> # ifdef __SUNPRO_CC using _STLP_VENDOR_CSTD::va_list; # endif # endif extern "C" { #else # include <stdarg.h> #endif void Rprintf(const char *, ...); void REprintf(const char *, ...); #if !defined(__cplusplus) || defined R_USE_C99_IN_CXX void Rvprintf(const char *, va_list); void REvprintf(const char *, va_list); #endif #ifdef __cplusplus } #endif #endif /* R_EXT_PRINT_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/PrtUtil.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1998-2014 The R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* * These functions are not part of the API. */ #ifndef PRTUTIL_H_ #define PRTUTIL_H_ #include <Rinternals.h> // for R_xlen_t #include <R_ext/Complex.h> #define formatLogical Rf_formatLogical #define formatInteger Rf_formatInteger #define formatReal Rf_formatReal #define formatComplex Rf_formatComplex #define EncodeLogical Rf_EncodeLogical #define EncodeInteger Rf_EncodeInteger #define EncodeReal Rf_EncodeReal #define EncodeReal0 Rf_EncodeReal0 #define EncodeComplex Rf_EncodeComplex #define VectorIndex Rf_VectorIndex #define printIntegerVector Rf_printIntegerVector #define printRealVector Rf_printRealVector #define printComplexVector Rf_printComplexVector #ifdef __cplusplus extern "C" { #endif /* Computation of printing formats */ void formatLogical(int *, R_xlen_t, int *); void formatInteger(int *, R_xlen_t, int *); void formatReal(double *, R_xlen_t, int *, int *, int *, int); void formatComplex(Rcomplex *, R_xlen_t, int *, int *, int *, int *, int *, int *, int); /* Formating of values */ const char *EncodeLogical(int, int); const char *EncodeInteger(int, int); const char *EncodeReal0(double, int, int, int, const char *); const char *EncodeComplex(Rcomplex, int, int, int, int, int, int, const char *); /* Legacy, misused by packages RGtk2 and qtbase */ const char *EncodeReal(double, int, int, int, char); /* Printing */ int IndexWidth(R_xlen_t); void VectorIndex(R_xlen_t, int); //void printLogicalVector(int *, R_xlen_t, int); void printIntegerVector(int *, R_xlen_t, int); void printRealVector (double *, R_xlen_t, int); void printComplexVector(Rcomplex *, R_xlen_t, int); #ifdef __cplusplus } #endif #endif /* PRTUTIL_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/QuartzDevice.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2007-12 The R Core Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ * *--------------------------------------------------------------------- * This header file constitutes the (unofficial) API to the Quartz * device. Being unofficial, the API may change at any point without * warning. * * Quartz is a general device-independent way of drawing in macOS, * therefore the Quartz device modularizes the actual drawing target * implementation into separate modules (e.g. Carbon and Cocoa for * on-screen display and PDF, Bitmap for off-screen drawing). The API * below is used by the modules to talk to the Quartz device without * having to know anything about R graphics device API. * * Key functions are listed here: * QuartzDevice_Create - creates a Quartz device * QuartzDevice_ResetContext - should be called after the target * context has been created to initialize it. * QuartzDevice_Kill - closes the Quartz device (e.g. on window close) * QuartzDevice_SetScaledSize - resize device (does not include * re-painting, it should be followed by a call to * QuartzDevice_ReplayDisplayList) * QuartzDevice_ReplayDisplayList - replays all plot commands * * Key concepts * - all Quartz modules are expected to provide a device context * (CGContextRef) for drawing. A device can temporarily return NULL * (e.g. if the context is not available immediately) and replay * the display list later to catch up. * * - interactive devices can use QuartzDevice_SetScaledSize to resize * the device (no context is necessary), then prepare the context * (call QuartzDevice_ResetContext if a new context was created) * and finally re-draw using QuartzDevice_ReplayDisplayList. * * - snapshots can be created either off the current display list * (last=0) or off the last known one (last=1). NewPage callback * can only use last=1 as there is no display list during that * call. Restored snapshots become the current display list and * thus can be extended by further painting (yet the original saved * copy is not influenced). Also note that all snapshots are SEXPs * (the declaration doesn't use SEXP as to not depend on * Rinternals.h) therefore must be protected or preserved immediately * (i.e. the Quartz device does NOT protect them - except in the * call to RestoreSnapshot). * * - dirty flag: the dirty flag is not used internally by the Quartz * device, but can be useful for the modules to determine whether * the current graphics is a restored copy or in-progress * drawing. The Quartz device manages the flag as follows: a) * display list replay does NOT change the flag, b) snapshot * restoration resets the flag, c) all other paint operations * (i.e. outside of restore/replay) set the flag. Most common use * is to determine whether restored snapshots have been * subsequently modified. * * - history: currently the history management is not used by any * modules and as such is untested and strictly experimental. It * may be removed in the future as it is not clear whether it makes * sense to be part of the device. See Cocoa module for a * module-internal implementation of the display history. * * Quartz device creation path: * quartz() function -> SEXP Quartz(args) -> * setup QuartzParameters_t, call backend constructor * [e.g. QuartzCocoa_DeviceCreate(dd, fn, QuartzParameters_t *pars)] -> * create backend definition (QuartzBackend_t backend) -> * fn->Create(dd, &backend), return the result */ #ifndef R_EXT_QUARTZDEVICE_H_ #define R_EXT_QUARTZDEVICE_H_ /* FIXME: this is installed, but can it really work without config.h? */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #ifdef __cplusplus extern "C" { #endif #if HAVE_AQUA #include <ApplicationServices/ApplicationServices.h> #else typedef void* CGContextRef; #endif /* flags passed to the newPage callback */ #define QNPF_REDRAW 0x0001 /* is set when NewPage really means re-draw of an existing page */ /* flags passed to QuartzDevice_Create (as fs parameter) */ #define QDFLAG_DISPLAY_LIST 0x0001 #define QDFLAG_INTERACTIVE 0x0002 #define QDFLAG_RASTERIZED 0x0004 /* rasterized media - may imply disabling AA paritally for rects etc. */ /* parameter flags (they should not conflict with QDFLAGS to allow chaining) */ #define QPFLAG_ANTIALIAS 0x0100 typedef void* QuartzDesc_t; typedef struct QuartzBackend_s { int size; /* structure size */ double width, height; double scalex, scaley, pointsize; int bg, canvas; int flags; void* userInfo; CGContextRef (*getCGContext)(QuartzDesc_t dev, void*userInfo); /* Get the context for this device */ int (*locatePoint)(QuartzDesc_t dev, void*userInfo, double*x, double*y); void (*close)(QuartzDesc_t dev, void*userInfo); void (*newPage)(QuartzDesc_t dev, void*userInfo, int flags); void (*state)(QuartzDesc_t dev, void*userInfo, int state); void* (*par)(QuartzDesc_t dev, void*userInfo, int set, const char *key, void *value); void (*sync)(QuartzDesc_t dev, void*userInfo); void* (*cap)(QuartzDesc_t dev, void*userInfo); } QuartzBackend_t; /* parameters that are passed to functions that create backends */ typedef struct QuartzParameters_s { int size; /* structure size */ const char *type, *file, *title; double x, y, width, height, pointsize; const char *family; int flags; int connection; int bg, canvas; double *dpi; /* the following parameters can be used to pass custom parameters when desired */ double pard1, pard2; int pari1, pari2; const char *pars1, *pars2; void *parv; } QuartzParameters_t; /* all device implementations have to call this general Quartz device constructor at some point */ QuartzDesc_t QuartzDevice_Create(void *dd, QuartzBackend_t* def); typedef struct QuartzFunctons_s { void* (*Create)(void *, QuartzBackend_t *); /* create a new device */ int (*DevNumber)(QuartzDesc_t desc); /* returns device number */ void (*Kill)(QuartzDesc_t desc); /* call to close the device */ void (*ResetContext)(QuartzDesc_t desc); /* notifies Q back-end that the implementation has created a new context */ double (*GetWidth)(QuartzDesc_t desc); /* get device width (in inches) */ double (*GetHeight)(QuartzDesc_t desc); /* get device height (in inches) */ void (*SetSize)(QuartzDesc_t desc, double width, double height); /* set device size (in inches) */ double (*GetScaledWidth)(QuartzDesc_t desc); /* get device width (in pixels) */ double (*GetScaledHeight)(QuartzDesc_t desc); /* get device height (in pixels) */ void (*SetScaledSize)(QuartzDesc_t desc, double width, double height); /* set device size (in pixels) */ double (*GetXScale)(QuartzDesc_t desc); /* get x scale factor (px/pt ratio) */ double (*GetYScale)(QuartzDesc_t desc); /* get y scale factor (px/pt ratio) */ void (*SetScale)(QuartzDesc_t desc,double scalex, double scaley); /* sets both scale factors (px/pt ratio) */ void (*SetTextScale)(QuartzDesc_t desc,double scale); /* sets text scale factor */ double (*GetTextScale)(QuartzDesc_t desc); /* sets text scale factor */ void (*SetPointSize)(QuartzDesc_t desc,double ps); /* sets point size */ double (*GetPointSize)(QuartzDesc_t desc); /* gets point size */ int (*GetDirty)(QuartzDesc_t desc); /* sets dirty flag */ void (*SetDirty)(QuartzDesc_t desc,int dirty); /* gets dirty flag */ void (*ReplayDisplayList)(QuartzDesc_t desc); /* replay display list Note: it inhibits sync calls during repaint, the caller is responsible for calling sync if needed. Dirty flag is kept unmodified */ void* (*GetSnapshot)(QuartzDesc_t desc, int last); /* create a (replayable) snapshot of the device contents. when 'last' is set then the last stored display list is used, otherwise a new snapshot is created */ void (*RestoreSnapshot)(QuartzDesc_t desc,void* snapshot); /* restore a snapshot. also clears the dirty flag */ int (*GetAntialias)(QuartzDesc_t desc); /* get anti-alias flag */ void (*SetAntialias)(QuartzDesc_t desc, int aa); /* set anti-alias flag */ int (*GetBackground)(QuartzDesc_t desc); /* get background color */ void (*Activate)(QuartzDesc_t desc); /* activate/select the device */ /* get/set Quartz-specific parameters. desc can be NULL for global parameters */ void* (*SetParameter)(QuartzDesc_t desc, const char *key, void *value); void* (*GetParameter)(QuartzDesc_t desc, const char *key); } QuartzFunctions_t; #define QuartzParam_EmbeddingFlags "embeddeding flags" /* value: int[1] */ #define QP_Flags_CFLoop 0x0001 /* drives application event loop */ #define QP_Flags_Cocoa 0x0002 /* Cocoa is fully initialized */ #define QP_Flags_Front 0x0004 /* is front application */ /* FIXME: no longer used, remove in due course */ /* from unix/aqua.c - loads grDevices if necessary and returns NULL on failure */ QuartzFunctions_t *getQuartzFunctions(); /* type of a Quartz contructor */ typedef QuartzDesc_t (*quartz_create_fn_t)(void *dd, QuartzFunctions_t *fn, QuartzParameters_t *par); /* grDevices currently supply following constructors: QuartzCocoa_DeviceCreate, QuartzCarbon_DeviceCreate, QuartzBitmap_DeviceCreate, QuartzPDF_DeviceCreate */ /* embedded Quartz support hook (defined in unix/aqua.c): dd = should be passed-through to QuartzDevice_Create fn = Quartz API functions par = parameters (see above) */ #ifndef IN_AQUA_C extern #endif QuartzDesc_t (*ptr_QuartzBackend)(void *dd, QuartzFunctions_t *fn, QuartzParameters_t *par); /* C version of the Quartz call (experimental) returns 0 on success, error code on failure */ QuartzDesc_t Quartz_C(QuartzParameters_t *par, quartz_create_fn_t q_create, int *errorCode); #ifdef __cplusplus } #endif #endif |
Added undroid/Rtcl/compat/R/R_ext/R-ftp-http.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2001-2016 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Advertized entry points, for that part of libxml included in * the internet module. */ #ifndef R_FTP_HTTP_H_ #define R_FTP_HTTP_H_ /* allow for 'large' files (>= 2GB) on 32-bit systems, where supported. */ /* required by C99/C11 */ #ifndef NO_C_HEADERS # ifdef __cplusplus # include <cstdint> # else # include <stdint.h> # endif #else #warning "use of NO_C_HEADERS is deprecated" #endif typedef int_fast64_t DLsize_t; // used for download lengths and sizes #ifdef __cplusplus extern "C" { #endif void *R_HTTPOpen(const char *url); int R_HTTPRead(void *ctx, char *dest, int len); void R_HTTPClose(void *ctx); void *R_FTPOpen(const char *url); int R_FTPRead(void *ctx, char *dest, int len); void R_FTPClose(void *ctx); void * RxmlNanoHTTPOpen(const char *URL, char **contentType, const char *headers, int cacheOK); int RxmlNanoHTTPRead(void *ctx, void *dest, int len); void RxmlNanoHTTPClose(void *ctx); int RxmlNanoHTTPReturnCode(void *ctx); char * RxmlNanoHTTPStatusMsg(void *ctx); DLsize_t RxmlNanoHTTPContentLength(void *ctx); char * RxmlNanoHTTPContentType(void *ctx); void RxmlNanoHTTPTimeout(int delay); void * RxmlNanoFTPOpen(const char *URL); int RxmlNanoFTPRead(void *ctx, void *dest, int len); int RxmlNanoFTPClose(void *ctx); void RxmlNanoFTPTimeout(int delay); DLsize_t RxmlNanoFTPContentLength(void *ctx); void RxmlMessage(int level, const char *format, ...); /* not currently used */ void RxmlNanoFTPCleanup(void); void RxmlNanoHTTPCleanup(void); #ifdef __cplusplus } #endif #endif /* R_FTP_HTTP_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/RS.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1999-2016 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Included by R.h: API */ #ifndef R_RS_H #define R_RS_H #ifndef NO_C_HEADERS # if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS) # include <cstring> # include <cstddef> using std::size_t; # else # include <string.h> /* for memcpy, memset */ # include <stddef.h> /* for size_t */ # endif #else #warning "use of NO_C_HEADERS is deprecated" #endif #include <Rconfig.h> /* for F77_APPEND_UNDERSCORE */ #ifdef __cplusplus extern "C" { #endif /* S Like Error Handling */ #include <R_ext/Error.h> /* for error and warning */ #ifndef STRICT_R_HEADERS #define R_PROBLEM_BUFSIZE 4096 /* Parentheses added for FC4 with gcc4 and -D_FORTIFY_SOURCE=2 */ #define PROBLEM {char R_problem_buf[R_PROBLEM_BUFSIZE];(sprintf)(R_problem_buf, #define MESSAGE {char R_problem_buf[R_PROBLEM_BUFSIZE];(sprintf)(R_problem_buf, #define ERROR ),error(R_problem_buf);} #define RECOVER(x) ),error(R_problem_buf);} #define WARNING(x) ),warning(R_problem_buf);} #define LOCAL_EVALUATOR /**/ #define NULL_ENTRY /**/ #define WARN WARNING(NULL) #endif /* S Like Memory Management */ extern void *R_chk_calloc(size_t, size_t); extern void *R_chk_realloc(void *, size_t); extern void R_chk_free(void *); #ifndef STRICT_R_HEADERS /* S-PLUS 3.x but not 5.x NULLs the pointer in the following */ #define Calloc(n, t) (t *) R_chk_calloc( (size_t) (n), sizeof(t) ) #define Realloc(p,n,t) (t *) R_chk_realloc( (void *)(p), (size_t)((n) * sizeof(t)) ) #define Free(p) (R_chk_free( (void *)(p) ), (p) = NULL) #endif #define R_Calloc(n, t) (t *) R_chk_calloc( (size_t) (n), sizeof(t) ) #define R_Realloc(p,n,t) (t *) R_chk_realloc( (void *)(p), (size_t)((n) * sizeof(t)) ) #define R_Free(p) (R_chk_free( (void *)(p) ), (p) = NULL) #define Memcpy(p,q,n) memcpy( p, q, (size_t)(n) * sizeof(*p) ) /* added for 3.0.0 */ #define Memzero(p,n) memset(p, 0, (size_t)(n) * sizeof(*p)) #define CallocCharBuf(n) (char *) R_chk_calloc((size_t) ((n)+1), sizeof(char)) /* S Like Fortran Interface */ /* These may not be adequate everywhere. Convex had _ prepending common blocks, and some compilers may need to specify Fortran linkage */ #ifdef HAVE_F77_UNDERSCORE # define F77_CALL(x) x ## _ #else # define F77_CALL(x) x #endif #define F77_NAME(x) F77_CALL(x) #define F77_SUB(x) F77_CALL(x) #define F77_COM(x) F77_CALL(x) #define F77_COMDECL(x) F77_CALL(x) #ifndef NO_CALL_R void call_R(char*, long, void**, char**, long*, char**, long, char**); #endif #ifdef __cplusplus } #endif #endif /* R_RS_H */ |
Added undroid/Rtcl/compat/R/R_ext/RStartup.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1999-2010 The R Core Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* C functions to be called from alternative front-ends. Part of the API for such front-ends but not for packages. */ #ifndef R_EXT_RSTARTUP_H_ #define R_EXT_RSTARTUP_H_ #include <R_ext/Boolean.h> /* TRUE/FALSE */ #ifdef __cplusplus extern "C" { #endif #ifdef Win32 typedef int (*blah1) (const char *, char *, int, int); typedef void (*blah2) (const char *, int); typedef void (*blah3) (void); typedef void (*blah4) (const char *); /* Return value here is expected to be 1 for Yes, -1 for No and 0 for Cancel: symbolic constants in graphapp.h */ typedef int (*blah5) (const char *); typedef void (*blah6) (int); typedef void (*blah7) (const char *, int, int); typedef enum {RGui, RTerm, LinkDLL} UImode; #endif /* Startup Actions */ typedef enum { SA_NORESTORE,/* = 0 */ SA_RESTORE, SA_DEFAULT,/* was === SA_RESTORE */ SA_NOSAVE, SA_SAVE, SA_SAVEASK, SA_SUICIDE } SA_TYPE; typedef struct { Rboolean R_Quiet; Rboolean R_Slave; Rboolean R_Interactive; Rboolean R_Verbose; Rboolean LoadSiteFile; Rboolean LoadInitFile; Rboolean DebugInitFile; SA_TYPE RestoreAction; SA_TYPE SaveAction; size_t vsize; size_t nsize; size_t max_vsize; size_t max_nsize; size_t ppsize; int NoRenviron; #ifdef Win32 char *rhome; /* R_HOME */ char *home; /* HOME */ blah1 ReadConsole; blah2 WriteConsole; blah3 CallBack; blah4 ShowMessage; blah5 YesNoCancel; blah6 Busy; UImode CharacterMode; blah7 WriteConsoleEx; /* used only if WriteConsole is NULL */ #endif } structRstart; typedef structRstart *Rstart; void R_DefParams(Rstart); void R_SetParams(Rstart); void R_SetWin32(Rstart); void R_SizeFromEnv(Rstart); void R_common_command_line(int *, char **, Rstart); void R_set_command_line_arguments(int argc, char **argv); void setup_Rmainloop(void); // also in Rembedded.h #ifdef __cplusplus } #endif #endif |
Added undroid/Rtcl/compat/R/R_ext/Rallocators.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2014-2016 The R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ * * * Definition of the R_allocator_t structure for custom allocators * to be used with allocVector3() */ #ifndef R_EXT_RALLOCATORS_H_ #define R_EXT_RALLOCATORS_H_ #ifndef NO_C_HEADERS # if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS) # include <cstddef> # else # include <stddef.h> /* for size_t */ # endif #else #warning "use of NO_C_HEADERS is deprecated" #endif /* R_allocator_t typedef is also declared in Rinternals.h so we guard against random inclusion order */ #ifndef R_ALLOCATOR_TYPE #define R_ALLOCATOR_TYPE typedef struct R_allocator R_allocator_t; #endif typedef void *(*custom_alloc_t)(R_allocator_t *allocator, size_t); typedef void (*custom_free_t)(R_allocator_t *allocator, void *); struct R_allocator { custom_alloc_t mem_alloc; /* malloc equivalent */ custom_free_t mem_free; /* free equivalent */ void *res; /* reserved (maybe for copy) - must be NULL */ void *data; /* custom data for the allocator implementation */ }; #endif /* R_EXT_RALLOCATORS_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/Random.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1998-2016 The R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Included by R.h: API */ #ifndef R_RANDOM_H #define R_RANDOM_H #include <R_ext/Boolean.h> #ifdef __cplusplus extern "C" { #endif typedef enum { WICHMANN_HILL, MARSAGLIA_MULTICARRY, SUPER_DUPER, MERSENNE_TWISTER, KNUTH_TAOCP, USER_UNIF, KNUTH_TAOCP2, LECUYER_CMRG } RNGtype; /* Different kinds of "N(0,1)" generators :*/ typedef enum { BUGGY_KINDERMAN_RAMAGE, AHRENS_DIETER, BOX_MULLER, USER_NORM, INVERSION, KINDERMAN_RAMAGE } N01type; void GetRNGstate(void); void PutRNGstate(void); double unif_rand(void); /* These are also defined in Rmath.h */ double norm_rand(void); double exp_rand(void); typedef unsigned int Int32; double * user_unif_rand(void); void user_unif_init(Int32); int * user_unif_nseed(void); int * user_unif_seedloc(void); double * user_norm_rand(void); #ifdef __cplusplus } #endif #endif /* R_RANDOM_H */ |
Added undroid/Rtcl/compat/R/R_ext/Rdynload.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2001-12 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* C functions used to register compiled code in packages. Those needed for that purpose are part of the API. */ #ifndef R_EXT_DYNLOAD_H_ #define R_EXT_DYNLOAD_H_ #include <R_ext/Boolean.h> /* called with a variable argument set */ typedef void * (*DL_FUNC)(); typedef unsigned int R_NativePrimitiveArgType; #define SINGLESXP 302 /* Don't have a single type for this. */ /* In the future, we will want to allow people register their own types and then refer to these in other contexts. Something like the Gtk type system may be appropriate. */ typedef unsigned int R_NativeObjectArgType; /* In the near future, we may support registering information about the arguments of native routines and whether they are used to return information. The hope is that we can minimize copying objects even further. Not currently in use. */ typedef enum {R_ARG_IN, R_ARG_OUT, R_ARG_IN_OUT, R_IRRELEVANT} R_NativeArgStyle; /* These are very similar to those in unix/dynload.c but we maintain them separately to give us more freedom to do some computations on the internal versions that are derived from these definitions. */ typedef struct { const char *name; DL_FUNC fun; int numArgs; R_NativePrimitiveArgType *types; R_NativeArgStyle *styles; } R_CMethodDef; typedef R_CMethodDef R_FortranMethodDef; typedef struct { const char *name; DL_FUNC fun; int numArgs; /* In the future, we will put types in here for the different arguments. We need a richer type system to do this effectively so that one can specify types for new classes. */ } R_CallMethodDef; typedef R_CallMethodDef R_ExternalMethodDef; typedef struct _DllInfo DllInfo; /* Currently ignore the graphics routines, accessible via .External.graphics() and .Call.graphics(). */ #ifdef __cplusplus extern "C" { #endif int R_registerRoutines(DllInfo *info, const R_CMethodDef * const croutines, const R_CallMethodDef * const callRoutines, const R_FortranMethodDef * const fortranRoutines, const R_ExternalMethodDef * const externalRoutines); Rboolean R_useDynamicSymbols(DllInfo *info, Rboolean value); Rboolean R_forceSymbols(DllInfo *info, Rboolean value); DllInfo *R_getDllInfo(const char *name); /* to be used by applications embedding R to register their symbols that are not related to any dynamic module */ DllInfo *R_getEmbeddingDllInfo(void); typedef struct Rf_RegisteredNativeSymbol R_RegisteredNativeSymbol; typedef enum {R_ANY_SYM=0, R_C_SYM, R_CALL_SYM, R_FORTRAN_SYM, R_EXTERNAL_SYM} NativeSymbolType; DL_FUNC R_FindSymbol(char const *, char const *, R_RegisteredNativeSymbol *symbol); /* Experimental interface for exporting and importing functions from one package for use from C code in a package. The registration part probably ought to be integrated with the other registrations. The naming of these routines may be less than ideal. */ void R_RegisterCCallable(const char *package, const char *name, DL_FUNC fptr); DL_FUNC R_GetCCallable(const char *package, const char *name); #ifdef __cplusplus } #endif #endif /* R_EXT_DYNLOAD_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/Riconv.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2005 the R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Interface to R's platform-independent implementation of iconv. Part of the API. */ #ifndef R_ICONV_H #define R_ICONV_H #ifdef __cplusplus extern "C" { #endif /* from sysutils.c */ #undef Riconv_open #undef Riconv #undef Riconv_close void * Riconv_open (const char* tocode, const char* fromcode); size_t Riconv (void * cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); int Riconv_close (void * cd); #ifdef __cplusplus } #endif #endif /* R_ICONV_H */ |
Added undroid/Rtcl/compat/R/R_ext/Utils.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1998-2016 The R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ * * * Generally useful UTILITIES *NOT* relying on R internals (from Defn.h) */ /* Included by R.h: API */ #ifndef R_EXT_UTILS_H_ #define R_EXT_UTILS_H_ #include <R_ext/Boolean.h> #include <R_ext/Complex.h> #ifndef NO_C_HEADERS # if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS) # include <cstddef> using std::size_t; # else # include <stddef.h> # endif #else #warning "use of NO_C_HEADERS is deprecated" #endif #define revsort Rf_revsort #define iPsort Rf_iPsort #define rPsort Rf_rPsort #define cPsort Rf_cPsort #define IndexWidth Rf_IndexWidth #define setIVector Rf_setIVector #define setRVector Rf_setRVector #define StringFalse Rf_StringFalse #define StringTrue Rf_StringTrue #define isBlankString Rf_isBlankString #ifdef __cplusplus extern "C" { #endif /* ../../main/sort.c : */ void R_isort(int*, int); void R_rsort(double*, int); void R_csort(Rcomplex*, int); void rsort_with_index(double *, int *, int); void revsort(double*, int*, int);/* reverse; sort i[] alongside */ void iPsort(int*, int, int); void rPsort(double*, int, int); void cPsort(Rcomplex*, int, int); /* ../../main/qsort.c : */ /* dummy renamed to II to avoid problems with g++ on Solaris */ void R_qsort (double *v, size_t i, size_t j); void R_qsort_I (double *v, int *II, int i, int j); void R_qsort_int (int *iv, size_t i, size_t j); void R_qsort_int_I(int *iv, int *II, int i, int j); #ifdef R_RS_H void F77_NAME(qsort4)(double *v, int *indx, int *ii, int *jj); void F77_NAME(qsort3)(double *v, int *ii, int *jj); #endif /* ../../main/util.c and others : */ const char *R_ExpandFileName(const char *); void setIVector(int*, int, int); void setRVector(double*, int, double); Rboolean StringFalse(const char *); Rboolean StringTrue(const char *); Rboolean isBlankString(const char *); /* These two are guaranteed to use '.' as the decimal point, and to accept "NA". */ double R_atof(const char *str); double R_strtod(const char *c, char **end); char *R_tmpnam(const char *prefix, const char *tempdir); char *R_tmpnam2(const char *prefix, const char *tempdir, const char *fileext); void R_CheckUserInterrupt(void); void R_CheckStack(void); void R_CheckStack2(size_t); /* ../../appl/interv.c: also in Applic.h */ int findInterval(double *xt, int n, double x, Rboolean rightmost_closed, Rboolean all_inside, int ilo, int *mflag); int findInterval2(double *xt, int n, double x, Rboolean rightmost_closed, Rboolean all_inside, Rboolean left_open, int ilo, int *mflag); #ifdef R_RS_H int F77_SUB(interv)(double *xt, int *n, double *x, Rboolean *rightmost_closed, Rboolean *all_inside, int *ilo, int *mflag); #endif void find_interv_vec(double *xt, int *n, double *x, int *nx, int *rightmost_closed, int *all_inside, int *indx); /* ../../appl/maxcol.c: also in Applic.h */ void R_max_col(double *matrix, int *nr, int *nc, int *maxes, int *ties_meth); #ifdef __cplusplus } #endif #endif /* R_EXT_UTILS_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/Visibility.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2008 the R Core Team * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Definitions controlling visibility on some platforms. Part of the API. */ #ifndef R_EXT_VISIBILITY_H_ #define R_EXT_VISIBILITY_H_ #include <Rconfig.h> #ifdef HAVE_VISIBILITY_ATTRIBUTE # define attribute_visible __attribute__ ((visibility ("default"))) # define attribute_hidden __attribute__ ((visibility ("hidden"))) #else # define attribute_visible # define attribute_hidden #endif #endif /* R_EXT_VISIBILITY_H_ */ |
Added undroid/Rtcl/compat/R/R_ext/eventloop.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2000-2016 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* For use by alternative front-ends and packages which need to share the R event loop (on Unix-alikes). Not part of the API and subject to change without notice. NB: HAVE_SYS_SELECT_H should be checked and defined before this is included (or <sys/select.h> included if NO_C_HEADERS is defined). */ #ifndef R_EXT_EVENTLOOP_H #define R_EXT_EVENTLOOP_H #ifndef NO_C_HEADERS # ifdef HAVE_SYS_SELECT_H # include <sys/select.h> /* for fd_set, select according to POSIX 2004 */ # endif # ifdef HAVE_SYS_TIME_H # include <sys/time.h> /* according to earlier POSIX and perhaps HP-UX */ # endif /* NOTE: At one time needed on FreeBSD so that fd_set is defined. */ # include <sys/types.h> #else #warning "use of NO_C_HEADERS is deprecated" #endif #ifdef __cplusplus extern "C" { #endif #define XActivity 1 #define StdinActivity 2 typedef void (*InputHandlerProc)(void *userData); typedef struct _InputHandler { int activity; int fileDescriptor; InputHandlerProc handler; struct _InputHandler *next; /* Whether we should be listening to this file descriptor or not. */ int active; /* Data that can be passed to the routine as its only argument. This might be a user-level function or closure when we implement a callback to R mechanism. */ void *userData; } InputHandler; extern InputHandler *initStdinHandler(void); extern void consoleInputHandler(unsigned char *buf, int len); extern InputHandler *addInputHandler(InputHandler *handlers, int fd, InputHandlerProc handler, int activity); extern InputHandler *getInputHandler(InputHandler *handlers, int fd); extern int removeInputHandler(InputHandler **handlers, InputHandler *it); extern InputHandler *getSelectedHandler(InputHandler *handlers, fd_set *mask); extern fd_set *R_checkActivity(int usec, int ignore_stdin); extern fd_set *R_checkActivityEx(int usec, int ignore_stdin, void (*intr)(void)); extern void R_runHandlers(InputHandler *handlers, fd_set *mask); extern int R_SelectEx(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout, void (*intr)(void)); #ifdef __SYSTEM__ #ifndef __cplusplus /* Would get duplicate conflicting symbols*/ InputHandler *R_InputHandlers; #endif #else extern InputHandler *R_InputHandlers; #endif extern void (* R_PolledEvents)(void); extern int R_wait_usec; #ifdef __cplusplus } #endif #endif /* R_EXT_EVENTLOOP_H */ |
Added undroid/Rtcl/compat/R/R_ext/libextern.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2001, 2004 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* Included by R.h: API on Windows */ /* don't disallow including this one more than once */ /* This is intended to be called from other header files, so not callable from C++ */ #undef LibExtern #undef LibImport #undef LibExport /* Don't try to include CYGWIN here: decorating some symbols breaks the auto-export that it relies on, even if R_DLL_BUILD were set. */ #ifdef _WIN32 /* _WIN32 as does not depend on config.h */ #define LibImport __declspec(dllimport) #define LibExport __declspec(dllexport) #else #define LibImport #define LibExport #endif #ifdef __MAIN__ #define LibExtern LibExport #define extern #elif defined(R_DLL_BUILD) #define LibExtern extern #else #define LibExtern extern LibImport #endif |
Added undroid/Rtcl/compat/R/R_ext/stats_package.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2007 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ #ifndef R_STATS_PACKAGE_H #define R_STATS_PACKAGE_H #include <Rconfig.h> #ifdef HAVE_VISIBILITY_ATTRIBUTE # define attribute_hidden __attribute__ ((visibility ("hidden"))) #else # define attribute_hidden #endif enum AlgType {NREG = 1, OPT = 2}; /* 0-based indices into v */ enum VPos {F = 9, F0 = 12, FDIF = 10, G = 27, HC = 70}; /* 0-based indices into iv */ enum IVPos {AI = 90, AM = 94, ALGSAV = 50, COVMAT = 25, COVPRT = 13, COVREQ = 14, DRADPR = 100, DTYPE = 15, IERR = 74, INITH = 24, INITS = 24, IPIVOT = 75, IVNEED = 2, LASTIV = 42, LASTV = 44, LMAT = 41, MXFCAL = 16, MXITER = 17, NEXTV = 46, NFCALL = 5, NFCOV = 51, NFGCAL = 6, NGCOV = 52, NITER = 30, NVDFLT = 49, NVSAVE = 8, OUTLEV = 18, PARPRT = 19, PARSAV = 48, PERM = 57, PRUNIT = 20, QRTYP = 79, RDREQ = 56, RMAT = 77, SOLPRT = 21, STATPR = 22, TOOBIG = 1, VNEED = 3, VSAVE = 59, X0PRT = 23}; void attribute_hidden S_Rf_divset(int alg, int iv[], int liv, int lv, double v[]); void attribute_hidden S_nlsb_iterate(double b[], double d[], double dr[], int iv[], int liv, int lv, int n, int nd, int p, double r[], double rd[], double v[], double x[]); void attribute_hidden S_nlminb_iterate(double b[], double d[], double fx, double g[], double h[], int iv[], int liv, int lv, int n, double v[], double x[]); static R_INLINE int S_v_length(int alg, int n) { return (alg - 1) ? (105 + (n * (2 * n + 20))) : (130 + (n * (n + 27))/2); } static R_INLINE int S_iv_length(int alg, int n) { return (alg - 1) ? (82 + 4 * n) : (78 + 3 * n); } #endif /* R_STATS_PACKAGE_H */ |
Added undroid/Rtcl/compat/R/R_ext/stats_stubs.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2007 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ #include <Rconfig.h> #include <Rinternals.h> #include <R_ext/Rdynload.h> #ifdef HAVE_VISIBILITY_ATTRIBUTE # define attribute_hidden __attribute__ ((visibility ("hidden"))) #else # define attribute_hidden #endif void attribute_hidden S_Rf_divset(int alg, int iv[], int liv, int lv, double v[]) { static void(*fun)(int,int[],int,int,double[]) = NULL; if (fun == NULL) fun = (void(*)(int,int[],int,int,double[])) R_GetCCallable("stats", "Rf_divset"); fun(alg, iv, liv, lv, v); } void attribute_hidden S_nlminb_iterate(double b[], double d[], double fx, double g[], double h[], int iv[], int liv, int lv, int n, double v[], double x[]) { static void(*fun)(double[],double[],double,double[],double[], int[],int,int,int,double[],double[]) = NULL; if (fun == NULL) fun = (void(*)(double[],double[],double,double[],double[], int[],int,int,int,double[],double[])) R_GetCCallable("stats", "nlminb_iterate"); fun(b, d, fx, g, h, iv, liv, lv, n, v, x); } void attribute_hidden S_nlsb_iterate(double b[], double d[], double dr[], int iv[], int liv, int lv, int n, int nd, int p, double r[], double rd[], double v[], double x[]) { static void(*fun)(double[],double[],double[],int[],int,int, int,int,int,double[],double[],double[], double[]) = NULL; if (fun == NULL) fun = (void(*)(double[],double[],double[],int[],int, int, int,int,int,double[], double[],double[],double[])) R_GetCCallable("stats", "nlsb_iterate"); fun(b, d, dr, iv, liv, lv, n, nd, p, r, rd, v, x); } |
Added undroid/Rtcl/compat/R/Rconfig.h.
> > > > > > > > > > > > > > > > > > > > > > > > > | 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 | /* Rconfig.h. Generated automatically */ #ifndef R_RCONFIG_H #define R_RCONFIG_H #ifndef R_CONFIG_H #define HAVE_F77_UNDERSCORE 1 /* all R platforms have this */ #define IEEE_754 1 /* #undef WORDS_BIGENDIAN */ #define R_INLINE inline #define HAVE_VISIBILITY_ATTRIBUTE 1 /* all R platforms have the next two */ #define SUPPORT_UTF8 1 #define SUPPORT_MBCS 1 #define ENABLE_NLS 1 /* #undef HAVE_AQUA */ /* Deprecated: use _OPENMP instead */ #define SUPPORT_OPENMP 1 #define SIZEOF_SIZE_T 8 #define HAVE_ALLOCA_H 1 #endif /* not R_CONFIG_H */ #endif /* not R_RCONFIG_H */ |
Added undroid/Rtcl/compat/R/Rdefines.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1999-2016 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* From 'Writing R Extensions: 'these are not kept up to date and are not recommended for new projects.' As from R 3.3.0 they have been adjusted to work when R_NO_REMAP is defined. */ #ifndef R_DEFINES_H #define R_DEFINES_H #if !defined(R_R_H) && !defined(R_S_H) /* user forgot to include R.h or S.h */ # include <R_ext/Memory.h> # include <R_ext/RS.h> #endif #include <Rinternals.h> /* * Much is from John Chambers' "Programming With Data". * Some of this is from Doug Bates. * * It is presented here to support a joint programming style which * will work in both R and S. In particular it helps with: * * 1. S/R <-> CORBA code. * 2. S/R <-> Java Code. * * And to hide some internal nastiness. */ /* * Added some macros defined in S.h from Splus 5.1 */ #define NULL_USER_OBJECT R_NilValue #define AS_LOGICAL(x) Rf_coerceVector(x,LGLSXP) #define AS_INTEGER(x) Rf_coerceVector(x,INTSXP) #define AS_NUMERIC(x) Rf_coerceVector(x,REALSXP) #define AS_CHARACTER(x) Rf_coerceVector(x,STRSXP) #define AS_COMPLEX(x) Rf_coerceVector(x,CPLXSXP) #define AS_VECTOR(x) Rf_coerceVector(x,VECSXP) #define AS_LIST(x) Rf_coerceVector(x,VECSXP) #define AS_RAW(x) Rf_coerceVector(x,RAWSXP) #ifdef USE_RINTERNALS // This is not documented to be supported, and may not be in future # define IS_LOGICAL(x) isLogical(x) # define IS_INTEGER(x) isInteger(x) # define IS_NUMERIC(x) isReal(x) # define IS_CHARACTER(x) isString(x) # define IS_COMPLEX(x) isComplex(x) #else # define IS_LOGICAL(x) Rf_isLogical(x) # define IS_INTEGER(x) Rf_isInteger(x) # define IS_NUMERIC(x) Rf_isReal(x) # define IS_CHARACTER(x) Rf_isString(x) # define IS_COMPLEX(x) Rf_isComplex(x) #endif /* NB: is this right? It means atomic or VECSXP or EXPRSXP */ #define IS_VECTOR(x) Rf_isVector(x) /* And this cannot be right: isVectorList(x)? */ #define IS_LIST(x) IS_VECTOR(x) #define IS_RAW(x) (TYPEOF(x) == RAWSXP) #define NEW_LOGICAL(n) Rf_allocVector(LGLSXP,n) #define NEW_INTEGER(n) Rf_allocVector(INTSXP,n) #define NEW_NUMERIC(n) Rf_allocVector(REALSXP,n) #define NEW_CHARACTER(n) Rf_allocVector(STRSXP,n) #define NEW_COMPLEX(n) Rf_allocVector(CPLXSXP,n) #define NEW_LIST(n) Rf_allocVector(VECSXP,n) #define NEW_STRING(n) NEW_CHARACTER(n) #define NEW_RAW(n) Rf_allocVector(RAWSXP,n) #define LOGICAL_POINTER(x) LOGICAL(x) #define INTEGER_POINTER(x) INTEGER(x) #define NUMERIC_POINTER(x) REAL(x) #define CHARACTER_POINTER(x) STRING_PTR(x) #define COMPLEX_POINTER(x) COMPLEX(x) /* Use of VECTOR_PTR will fail unless USE_RINTERNALS is in use This is probably unused. */ #define LIST_POINTER(x) VECTOR_PTR(x) #define RAW_POINTER(x) RAW(x) /* The following are not defined in `Programming with Data' but are defined in S.h in Svr4 */ /* * Note that LIST_DATA and RAW_DATA are missing. * This is consistent with Svr4. */ #define LOGICAL_DATA(x) (LOGICAL(x)) #define INTEGER_DATA(x) (INTEGER(x)) #define DOUBLE_DATA(x) (REAL(x)) #define NUMERIC_DATA(x) (REAL(x)) #define CHARACTER_DATA(x) (STRING_PTR(x)) #define COMPLEX_DATA(x) (COMPLEX(x)) /* Use of VECTOR_PTR will fail unless USE_RINTERNALS is in use VECTOR_DATA seems unused, and RECURSIVE_DATA is used only in the Expat part of XML. */ #define RECURSIVE_DATA(x) (VECTOR_PTR(x)) #define VECTOR_DATA(x) (VECTOR_PTR(x)) #define LOGICAL_VALUE(x) Rf_asLogical(x) #define INTEGER_VALUE(x) Rf_asInteger(x) #define NUMERIC_VALUE(x) Rf_asReal(x) #define CHARACTER_VALUE(x) CHAR(Rf_asChar(x)) #define STRING_VALUE(x) CHAR(Rf_asChar(x)) #define LIST_VALUE(x) Rf_error("the 'value' of a list object is not defined") #define RAW_VALUE(x) Rf_error("the 'value' of a raw object is not defined") #define SET_ELEMENT(x, i, val) SET_VECTOR_ELT(x, i, val) #define GET_ATTR(x,what) Rf_getAttrib(x, what) #define GET_CLASS(x) Rf_getAttrib(x, R_ClassSymbol) #define GET_DIM(x) Rf_getAttrib(x, R_DimSymbol) #define GET_DIMNAMES(x) Rf_getAttrib(x, R_DimNamesSymbol) #define GET_COLNAMES(x) Rf_GetColNames(x) #define GET_ROWNAMES(x) Rf_GetRowNames(x) #define GET_LEVELS(x) Rf_getAttrib(x, R_LevelsSymbol) #define GET_TSP(x) Rf_getAttrib(x, R_TspSymbol) #define GET_NAMES(x) Rf_getAttrib(x, R_NamesSymbol) #define SET_ATTR(x, what, n) Rf_setAttrib(x, what, n) #define SET_CLASS(x, n) Rf_setAttrib(x, R_ClassSymbol, n) #define SET_DIM(x, n) Rf_setAttrib(x, R_DimSymbol, n) #define SET_DIMNAMES(x, n) Rf_setAttrib(x, R_DimNamesSymbol, n) #define SET_LEVELS(x, l) Rf_setAttrib(x, R_LevelsSymbol, l) #define SET_NAMES(x, n) Rf_setAttrib(x, R_NamesSymbol, n) /* These do not support long vectors */ #define GET_LENGTH(x) Rf_length(x) #define SET_LENGTH(x, n) (x = Rf_lengthgets(x, n)) #define GET_SLOT(x, what) R_do_slot(x, what) #define SET_SLOT(x, what, value) R_do_slot_assign(x, what, value) #define MAKE_CLASS(what) R_do_MAKE_CLASS(what) /* NEW_OBJECT is recommended; NEW is for green book compatibility */ #define NEW_OBJECT(class_def) R_do_new_object(class_def) #define NEW(class_def) R_do_new_object(class_def) #define s_object SEXPREC #define S_EVALUATOR /**/ /* These conflict with definitions in R_ext/Boolean.h, but spatstat relies on them in a C file */ #ifdef __cplusplus # ifndef R_EXT_BOOLEAN_H_ # ifndef TRUE # define TRUE 1 # endif # ifndef FALSE # define FALSE 0 # endif # endif #else # ifndef TRUE # define TRUE 1 # endif # ifndef FALSE # define FALSE 0 # endif #endif #define COPY_TO_USER_STRING(x) mkChar(x) #define CREATE_STRING_VECTOR(x) mkChar(x) #define CREATE_FUNCTION_CALL(name, argList) createFunctionCall(name, argList) #define EVAL(x) eval(x,R_GlobalEnv) #endif |
Added undroid/Rtcl/compat/R/Rembedded.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 2006-2016 The R Core Team. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* A header for use with alternative front-ends. Not formally part of * the API so subject to change without notice. */ #ifndef REMBEDDED_H_ #define REMBEDDED_H_ #include <R_ext/Boolean.h> #ifdef __cplusplus extern "C" { #endif extern int Rf_initEmbeddedR(int argc, char *argv[]); extern void Rf_endEmbeddedR(int fatal); /* From here on down can be helpful in writing tailored startup and termination code */ #ifndef LibExtern # define LibExtern extern #endif int Rf_initialize_R(int ac, char **av); void setup_Rmainloop(void); extern void R_ReplDLLinit(void); extern int R_ReplDLLdo1(void); void R_setStartTime(void); extern void R_RunExitFinalizers(void); extern void CleanEd(void); extern void Rf_KillAllDevices(void); LibExtern int R_DirtyImage; extern void R_CleanTempDir(void); LibExtern char *R_TempDir; extern void R_SaveGlobalEnv(void); #ifdef _WIN32 extern char *getDLLVersion(void), *getRUser(void), *get_R_HOME(void); extern void setup_term_ui(void); LibExtern int UserBreak; extern Rboolean AllDevicesKilled; extern void editorcleanall(void); extern int GA_initapp(int, char **); extern void GA_appcleanup(void); extern void readconsolecfg(void); #else void fpu_setup(Rboolean start); #endif #ifdef __cplusplus } #endif #endif /* REMBEDDED_H_ */ |
Added undroid/Rtcl/compat/R/Rinterface.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (C) 1998--2016 The R Core Team. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* This header file is to provide hooks for alternative front-ends, e.g. GUIs such as GNOME and Cocoa. It is only used on Unix-alikes. All entries here should be documented in doc/manual/R-exts.texi. It should not be included by package sources unless they are providing such a front-end. If CSTACK_DEFNS is defined, if appropriate define HAVE_UINTPTR_T and include <stdint.h> (or <cstdint>) before including this. */ #ifndef RINTERFACE_H_ #define RINTERFACE_H_ // Support for NO_C_HEADERS added in R 3.3.0 #ifdef __cplusplus # ifndef NO_C_HEADERS # include <cstdio> # ifdef __SUNPRO_CC using std::FILE; # endif # endif extern "C" { #else # ifndef NO_C_HEADERS # include <stdio.h> #endif #endif #if defined(__GNUC__) && __GNUC__ >= 3 # define NORET __attribute__((noreturn)) #else # define NORET #endif #include <R_ext/Boolean.h> #include <R_ext/RStartup.h> /* from Defn.h */ /* this duplication will be removed in due course */ extern Rboolean R_Interactive; /* TRUE during interactive use*/ extern Rboolean R_Slave; /* Run as a slave process */ extern void R_RestoreGlobalEnv(void); extern void R_RestoreGlobalEnvFromFile(const char *, Rboolean); extern void R_SaveGlobalEnv(void); extern void R_SaveGlobalEnvToFile(const char *); extern void R_FlushConsole(void); extern void R_ClearerrConsole(void); extern void R_Suicide(const char *); extern char *R_HomeDir(void); extern int R_DirtyImage; /* Current image dirty */ extern char *R_GUIType; extern void R_setupHistory(void); extern char *R_HistoryFile; /* Name of the history file */ extern int R_HistorySize; /* Size of the history file */ extern int R_RestoreHistory; /* restore the history file? */ extern char *R_Home; /* Root of the R tree */ # define jump_to_toplevel Rf_jump_to_toplevel # define mainloop Rf_mainloop # define onintr Rf_onintr void NORET jump_to_toplevel(void); void mainloop(void); void onintr(void); #ifndef DEFN_H_ extern void* R_GlobalContext; /* Need opaque pointer type for export */ #endif void process_site_Renviron(void); void process_system_Renviron(void); void process_user_Renviron(void); extern FILE * R_Consolefile; extern FILE * R_Outputfile; /* in ../unix/sys-unix.c */ void R_setStartTime(void); void fpu_setup(Rboolean); /* in ../unix/system.c */ extern int R_running_as_main_program; #ifdef CSTACK_DEFNS /* duplicating Defn.h */ #if !defined(HAVE_UINTPTR_T) && !defined(uintptr_t) typedef unsigned long uintptr_t; #endif extern uintptr_t R_CStackLimit; /* C stack limit */ extern uintptr_t R_CStackStart; /* Initial stack address */ #endif /* formerly in src/unix/devUI.h */ #ifdef R_INTERFACE_PTRS #include <Rinternals.h> #ifdef __SYSTEM__ # define extern #endif extern void (*ptr_R_Suicide)(const char *); extern void (*ptr_R_ShowMessage)(const char *); extern int (*ptr_R_ReadConsole)(const char *, unsigned char *, int, int); extern void (*ptr_R_WriteConsole)(const char *, int); extern void (*ptr_R_WriteConsoleEx)(const char *, int, int); extern void (*ptr_R_ResetConsole)(void); extern void (*ptr_R_FlushConsole)(void); extern void (*ptr_R_ClearerrConsole)(void); extern void (*ptr_R_Busy)(int); extern void (*ptr_R_CleanUp)(SA_TYPE, int, int); extern int (*ptr_R_ShowFiles)(int, const char **, const char **, const char *, Rboolean, const char *); extern int (*ptr_R_ChooseFile)(int, char *, int); extern int (*ptr_R_EditFile)(const char *); extern void (*ptr_R_loadhistory)(SEXP, SEXP, SEXP, SEXP); extern void (*ptr_R_savehistory)(SEXP, SEXP, SEXP, SEXP); extern void (*ptr_R_addhistory)(SEXP, SEXP, SEXP, SEXP); // added in 3.0.0 extern int (*ptr_R_EditFiles)(int, const char **, const char **, const char *); // naming follows earlier versions in R.app extern SEXP (*ptr_do_selectlist)(SEXP, SEXP, SEXP, SEXP); extern SEXP (*ptr_do_dataentry)(SEXP, SEXP, SEXP, SEXP); extern SEXP (*ptr_do_dataviewer)(SEXP, SEXP, SEXP, SEXP); extern void (*ptr_R_ProcessEvents)(); /* These two are not used by R itself, but are used by the tcltk package */ extern int (*R_timeout_handler)(void); extern long R_timeout_val; #endif /* R_INTERFACE_PTRS */ #ifdef __SYSTEM__ # undef extern #endif extern int R_SignalHandlers; #ifdef __cplusplus } #endif #endif /* RINTERFACE_H_ */ |
Added undroid/Rtcl/compat/R/Rinternals.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (C) 1999-2016 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ */ /* This file is installed and available to packages, but only a small part of the contents is within the API. See chapter 6 of 'Writing R Extensions'. */ #ifndef R_INTERNALS_H_ #define R_INTERNALS_H_ // Support for NO_C_HEADERS added in R 3.3.0 #ifdef __cplusplus # ifndef NO_C_HEADERS # include <cstdio> # include <climits> # include <cstddef> # else #warning "use of NO_C_HEADERS is deprecated" # endif extern "C" { #else # ifndef NO_C_HEADERS # include <stdio.h> # include <limits.h> /* for INT_MAX */ # include <stddef.h> /* for ptrdiff_t */ # else #warning "use of NO_C_HEADERS is deprecated" # endif #endif #include <R_ext/Arith.h> #include <R_ext/Boolean.h> #include <R_ext/Complex.h> #include <R_ext/Error.h> // includes NORET macro #include <R_ext/Memory.h> #include <R_ext/Utils.h> #include <R_ext/Print.h> #include <R_ext/libextern.h> typedef unsigned char Rbyte; /* type for length of (standard, not long) vectors etc */ typedef int R_len_t; #define R_LEN_T_MAX INT_MAX /* both config.h and Rconfig.h set SIZEOF_SIZE_T, but Rconfig.h is skipped if config.h has already been included. */ #ifndef R_CONFIG_H # include <Rconfig.h> #endif #if ( SIZEOF_SIZE_T > 4 ) # define LONG_VECTOR_SUPPORT #endif #ifdef LONG_VECTOR_SUPPORT typedef ptrdiff_t R_xlen_t; typedef struct { R_xlen_t lv_length, lv_truelength; } R_long_vec_hdr_t; # define R_XLEN_T_MAX 4503599627370496 # define R_SHORT_LEN_MAX 2147483647 # define R_LONG_VEC_TOKEN -1 #else typedef int R_xlen_t; # define R_XLEN_T_MAX R_LEN_T_MAX #endif #ifndef TESTING_WRITE_BARRIER # define INLINE_PROTECT #endif /* Fundamental Data Types: These are largely Lisp * influenced structures, with the exception of LGLSXP, * INTSXP, REALSXP, CPLXSXP and STRSXP which are the * element types for S-like data objects. * * --> TypeTable[] in ../main/util.c for typeof() */ /* These exact numeric values are seldom used, but they are, e.g., in * ../main/subassign.c, and they are serialized. */ #ifndef enum_SEXPTYPE /* NOT YET using enum: * 1) The SEXPREC struct below has 'SEXPTYPE type : 5' * (making FUNSXP and CLOSXP equivalent in there), * giving (-Wall only ?) warnings all over the place * 2) Many switch(type) { case ... } statements need a final `default:' * added in order to avoid warnings like [e.g. l.170 of ../main/util.c] * "enumeration value `FUNSXP' not handled in switch" */ typedef unsigned int SEXPTYPE; #define NILSXP 0 /* nil = NULL */ #define SYMSXP 1 /* symbols */ #define LISTSXP 2 /* lists of dotted pairs */ #define CLOSXP 3 /* closures */ #define ENVSXP 4 /* environments */ #define PROMSXP 5 /* promises: [un]evaluated closure arguments */ #define LANGSXP 6 /* language constructs (special lists) */ #define SPECIALSXP 7 /* special forms */ #define BUILTINSXP 8 /* builtin non-special forms */ #define CHARSXP 9 /* "scalar" string type (internal only)*/ #define LGLSXP 10 /* logical vectors */ /* 11 and 12 were factors and ordered factors in the 1990s */ #define INTSXP 13 /* integer vectors */ #define REALSXP 14 /* real variables */ #define CPLXSXP 15 /* complex variables */ #define STRSXP 16 /* string vectors */ #define DOTSXP 17 /* dot-dot-dot object */ #define ANYSXP 18 /* make "any" args work. Used in specifying types for symbol registration to mean anything is okay */ #define VECSXP 19 /* generic vectors */ #define EXPRSXP 20 /* expressions vectors */ #define BCODESXP 21 /* byte code */ #define EXTPTRSXP 22 /* external pointer */ #define WEAKREFSXP 23 /* weak reference */ #define RAWSXP 24 /* raw bytes */ #define S4SXP 25 /* S4, non-vector */ /* used for detecting PROTECT issues in memory.c */ #define NEWSXP 30 /* fresh node created in new page */ #define FREESXP 31 /* node released by GC */ #define FUNSXP 99 /* Closure or Builtin or Special */ #else /* NOT YET */ /*------ enum_SEXPTYPE ----- */ typedef enum { NILSXP = 0, /* nil = NULL */ SYMSXP = 1, /* symbols */ LISTSXP = 2, /* lists of dotted pairs */ CLOSXP = 3, /* closures */ ENVSXP = 4, /* environments */ PROMSXP = 5, /* promises: [un]evaluated closure arguments */ LANGSXP = 6, /* language constructs (special lists) */ SPECIALSXP = 7, /* special forms */ BUILTINSXP = 8, /* builtin non-special forms */ CHARSXP = 9, /* "scalar" string type (internal only)*/ LGLSXP = 10, /* logical vectors */ INTSXP = 13, /* integer vectors */ REALSXP = 14, /* real variables */ CPLXSXP = 15, /* complex variables */ STRSXP = 16, /* string vectors */ DOTSXP = 17, /* dot-dot-dot object */ ANYSXP = 18, /* make "any" args work */ VECSXP = 19, /* generic vectors */ EXPRSXP = 20, /* expressions vectors */ BCODESXP = 21, /* byte code */ EXTPTRSXP = 22, /* external pointer */ WEAKREFSXP = 23, /* weak reference */ RAWSXP = 24, /* raw bytes */ S4SXP = 25, /* S4 non-vector */ NEWSXP = 30, /* fresh node creaed in new page */ FREESXP = 31, /* node released by GC */ FUNSXP = 99 /* Closure or Builtin */ } SEXPTYPE; #endif /* These are also used with the write barrier on, in attrib.c and util.c */ #define TYPE_BITS 5 #define MAX_NUM_SEXPTYPE (1<<TYPE_BITS) // ======================= USE_RINTERNALS section #ifdef USE_RINTERNALS /* This is intended for use only within R itself. * It defines internal structures that are otherwise only accessible * via SEXP, and macros to replace many (but not all) of accessor functions * (which are always defined). */ /* Flags */ struct sxpinfo_struct { SEXPTYPE type : TYPE_BITS;/* ==> (FUNSXP == 99) %% 2^5 == 3 == CLOSXP * -> warning: `type' is narrower than values * of its type * when SEXPTYPE was an enum */ unsigned int obj : 1; unsigned int named : 2; unsigned int gp : 16; unsigned int mark : 1; unsigned int debug : 1; unsigned int trace : 1; /* functions and memory tracing */ unsigned int spare : 1; /* currently unused */ unsigned int gcgen : 1; /* old generation number */ unsigned int gccls : 3; /* node class */ }; /* Tot: 32 */ struct vecsxp_struct { R_len_t length; R_len_t truelength; }; struct primsxp_struct { int offset; }; struct symsxp_struct { struct SEXPREC *pname; struct SEXPREC *value; struct SEXPREC *internal; }; struct listsxp_struct { struct SEXPREC *carval; struct SEXPREC *cdrval; struct SEXPREC *tagval; }; struct envsxp_struct { struct SEXPREC *frame; struct SEXPREC *enclos; struct SEXPREC *hashtab; }; struct closxp_struct { struct SEXPREC *formals; struct SEXPREC *body; struct SEXPREC *env; }; struct promsxp_struct { struct SEXPREC *value; struct SEXPREC *expr; struct SEXPREC *env; }; /* Every node must start with a set of sxpinfo flags and an attribute field. Under the generational collector these are followed by the fields used to maintain the collector's linked list structures. */ /* Define SWITH_TO_REFCNT to use reference counting instead of the 'NAMED' mechanism. This uses the R-devel binary layout. The two 'named' field bits are used for the REFCNT, so REFCNTMAX is 3. */ //#define SWITCH_TO_REFCNT #if defined(SWITCH_TO_REFCNT) && ! defined(COMPUTE_REFCNT_VALUES) # define COMPUTE_REFCNT_VALUES #endif #define REFCNTMAX (4 - 1) #define SEXPREC_HEADER \ struct sxpinfo_struct sxpinfo; \ struct SEXPREC *attrib; \ struct SEXPREC *gengc_next_node, *gengc_prev_node /* The standard node structure consists of a header followed by the node data. */ typedef struct SEXPREC { SEXPREC_HEADER; union { struct primsxp_struct primsxp; struct symsxp_struct symsxp; struct listsxp_struct listsxp; struct envsxp_struct envsxp; struct closxp_struct closxp; struct promsxp_struct promsxp; } u; } SEXPREC, *SEXP; /* The generational collector uses a reduced version of SEXPREC as a header in vector nodes. The layout MUST be kept consistent with the SEXPREC definition. The standard SEXPREC takes up 7 words on most hardware; this reduced version should take up only 6 words. In addition to slightly reducing memory use, this can lead to more favorable data alignment on 32-bit architectures like the Intel Pentium III where odd word alignment of doubles is allowed but much less efficient than even word alignment. */ typedef struct VECTOR_SEXPREC { SEXPREC_HEADER; struct vecsxp_struct vecsxp; } VECTOR_SEXPREC, *VECSEXP; typedef union { VECTOR_SEXPREC s; double align; } SEXPREC_ALIGN; /* General Cons Cell Attributes */ #define ATTRIB(x) ((x)->attrib) #define OBJECT(x) ((x)->sxpinfo.obj) #define MARK(x) ((x)->sxpinfo.mark) #define TYPEOF(x) ((x)->sxpinfo.type) #define NAMED(x) ((x)->sxpinfo.named) #define RTRACE(x) ((x)->sxpinfo.trace) #define LEVELS(x) ((x)->sxpinfo.gp) #define SET_OBJECT(x,v) (((x)->sxpinfo.obj)=(v)) #define SET_TYPEOF(x,v) (((x)->sxpinfo.type)=(v)) #define SET_NAMED(x,v) (((x)->sxpinfo.named)=(v)) #define SET_RTRACE(x,v) (((x)->sxpinfo.trace)=(v)) #define SETLEVELS(x,v) (((x)->sxpinfo.gp)=((unsigned short)v)) #if defined(COMPUTE_REFCNT_VALUES) # define REFCNT(x) ((x)->sxpinfo.named) # define TRACKREFS(x) (TYPEOF(x) == CLOSXP ? TRUE : ! (x)->sxpinfo.spare) #else # define REFCNT(x) 0 # define TRACKREFS(x) FALSE #endif #ifdef SWITCH_TO_REFCNT # undef NAMED # undef SET_NAMED # define NAMED(x) REFCNT(x) # define SET_NAMED(x, v) do {} while (0) #endif /* S4 object bit, set by R_do_new_object for all new() calls */ #define S4_OBJECT_MASK ((unsigned short)(1<<4)) #define IS_S4_OBJECT(x) ((x)->sxpinfo.gp & S4_OBJECT_MASK) #define SET_S4_OBJECT(x) (((x)->sxpinfo.gp) |= S4_OBJECT_MASK) #define UNSET_S4_OBJECT(x) (((x)->sxpinfo.gp) &= ~S4_OBJECT_MASK) /* Vector Access Macros */ #ifdef LONG_VECTOR_SUPPORT R_len_t NORET R_BadLongVector(SEXP, const char *, int); # define IS_LONG_VEC(x) (SHORT_VEC_LENGTH(x) == R_LONG_VEC_TOKEN) # define SHORT_VEC_LENGTH(x) (((VECSEXP) (x))->vecsxp.length) # define SHORT_VEC_TRUELENGTH(x) (((VECSEXP) (x))->vecsxp.truelength) # define LONG_VEC_LENGTH(x) ((R_long_vec_hdr_t *) (x))[-1].lv_length # define LONG_VEC_TRUELENGTH(x) ((R_long_vec_hdr_t *) (x))[-1].lv_truelength # define XLENGTH(x) (IS_LONG_VEC(x) ? LONG_VEC_LENGTH(x) : SHORT_VEC_LENGTH(x)) # define XTRUELENGTH(x) (IS_LONG_VEC(x) ? LONG_VEC_TRUELENGTH(x) : SHORT_VEC_TRUELENGTH(x)) # define LENGTH(x) (IS_LONG_VEC(x) ? R_BadLongVector(x, __FILE__, __LINE__) : SHORT_VEC_LENGTH(x)) # define TRUELENGTH(x) (IS_LONG_VEC(x) ? R_BadLongVector(x, __FILE__, __LINE__) : SHORT_VEC_TRUELENGTH(x)) # define SET_SHORT_VEC_LENGTH(x,v) (SHORT_VEC_LENGTH(x) = (v)) # define SET_SHORT_VEC_TRUELENGTH(x,v) (SHORT_VEC_TRUELENGTH(x) = (v)) # define SET_LONG_VEC_LENGTH(x,v) (LONG_VEC_LENGTH(x) = (v)) # define SET_LONG_VEC_TRUELENGTH(x,v) (LONG_VEC_TRUELENGTH(x) = (v)) # define SETLENGTH(x,v) do { \ SEXP sl__x__ = (x); \ R_xlen_t sl__v__ = (v); \ if (IS_LONG_VEC(sl__x__)) \ SET_LONG_VEC_LENGTH(sl__x__, sl__v__); \ else SET_SHORT_VEC_LENGTH(sl__x__, (R_len_t) sl__v__); \ } while (0) # define SET_TRUELENGTH(x,v) do { \ SEXP sl__x__ = (x); \ R_xlen_t sl__v__ = (v); \ if (IS_LONG_VEC(sl__x__)) \ SET_LONG_VEC_TRUELENGTH(sl__x__, sl__v__); \ else SET_SHORT_VEC_TRUELENGTH(sl__x__, (R_len_t) sl__v__); \ } while (0) # define IS_SCALAR(x, type) (TYPEOF(x) == (type) && SHORT_VEC_LENGTH(x) == 1) #else # define SHORT_VEC_LENGTH(x) (((VECSEXP) (x))->vecsxp.length) # define LENGTH(x) (((VECSEXP) (x))->vecsxp.length) # define TRUELENGTH(x) (((VECSEXP) (x))->vecsxp.truelength) # define XLENGTH(x) LENGTH(x) # define XTRUELENGTH(x) TRUELENGTH(x) # define SETLENGTH(x,v) ((((VECSEXP) (x))->vecsxp.length)=(v)) # define SET_TRUELENGTH(x,v) ((((VECSEXP) (x))->vecsxp.truelength)=(v)) # define SET_SHORT_VEC_LENGTH SETLENGTH # define SET_SHORT_VEC_TRUELENGTH SET_TRUELENGTH # define IS_LONG_VEC(x) 0 # define IS_SCALAR(x, type) (TYPEOF(x) == (type) && LENGTH(x) == 1) #endif /* Under the generational allocator the data for vector nodes comes immediately after the node structure, so the data address is a known offset from the node SEXP. */ #define DATAPTR(x) (((SEXPREC_ALIGN *) (x)) + 1) #define CHAR(x) ((const char *) DATAPTR(x)) #define LOGICAL(x) ((int *) DATAPTR(x)) #define INTEGER(x) ((int *) DATAPTR(x)) #define RAW(x) ((Rbyte *) DATAPTR(x)) #define COMPLEX(x) ((Rcomplex *) DATAPTR(x)) #define REAL(x) ((double *) DATAPTR(x)) #define STRING_ELT(x,i) ((SEXP *) DATAPTR(x))[i] #define VECTOR_ELT(x,i) ((SEXP *) DATAPTR(x))[i] #define STRING_PTR(x) ((SEXP *) DATAPTR(x)) #define VECTOR_PTR(x) ((SEXP *) DATAPTR(x)) /* List Access Macros */ /* These also work for ... objects */ #define LISTVAL(x) ((x)->u.listsxp) #define TAG(e) ((e)->u.listsxp.tagval) #define CAR(e) ((e)->u.listsxp.carval) #define CDR(e) ((e)->u.listsxp.cdrval) #define CAAR(e) CAR(CAR(e)) #define CDAR(e) CDR(CAR(e)) #define CADR(e) CAR(CDR(e)) #define CDDR(e) CDR(CDR(e)) #define CDDDR(e) CDR(CDR(CDR(e))) #define CADDR(e) CAR(CDR(CDR(e))) #define CADDDR(e) CAR(CDR(CDR(CDR(e)))) #define CAD4R(e) CAR(CDR(CDR(CDR(CDR(e))))) #define MISSING_MASK 15 /* reserve 4 bits--only 2 uses now */ #define MISSING(x) ((x)->sxpinfo.gp & MISSING_MASK)/* for closure calls */ #define SET_MISSING(x,v) do { \ SEXP __x__ = (x); \ int __v__ = (v); \ int __other_flags__ = __x__->sxpinfo.gp & ~MISSING_MASK; \ __x__->sxpinfo.gp = __other_flags__ | __v__; \ } while (0) /* Closure Access Macros */ #define FORMALS(x) ((x)->u.closxp.formals) #define BODY(x) ((x)->u.closxp.body) #define CLOENV(x) ((x)->u.closxp.env) #define RDEBUG(x) ((x)->sxpinfo.debug) #define SET_RDEBUG(x,v) (((x)->sxpinfo.debug)=(v)) #define RSTEP(x) ((x)->sxpinfo.spare) #define SET_RSTEP(x,v) (((x)->sxpinfo.spare)=(v)) /* Symbol Access Macros */ #define PRINTNAME(x) ((x)->u.symsxp.pname) #define SYMVALUE(x) ((x)->u.symsxp.value) #define INTERNAL(x) ((x)->u.symsxp.internal) #define DDVAL_MASK 1 #define DDVAL(x) ((x)->sxpinfo.gp & DDVAL_MASK) /* for ..1, ..2 etc */ #define SET_DDVAL_BIT(x) (((x)->sxpinfo.gp) |= DDVAL_MASK) #define UNSET_DDVAL_BIT(x) (((x)->sxpinfo.gp) &= ~DDVAL_MASK) #define SET_DDVAL(x,v) ((v) ? SET_DDVAL_BIT(x) : UNSET_DDVAL_BIT(x)) /* for ..1, ..2 etc */ /* Environment Access Macros */ #define FRAME(x) ((x)->u.envsxp.frame) #define ENCLOS(x) ((x)->u.envsxp.enclos) #define HASHTAB(x) ((x)->u.envsxp.hashtab) #define ENVFLAGS(x) ((x)->sxpinfo.gp) /* for environments */ #define SET_ENVFLAGS(x,v) (((x)->sxpinfo.gp)=(v)) #else /* not USE_RINTERNALS */ // ======================= not USE_RINTERNALS section typedef struct SEXPREC *SEXP; #define CHAR(x) R_CHAR(x) const char *(R_CHAR)(SEXP x); /* Various tests with macro versions in the second USE_RINTERNALS section */ Rboolean (Rf_isNull)(SEXP s); Rboolean (Rf_isSymbol)(SEXP s); Rboolean (Rf_isLogical)(SEXP s); Rboolean (Rf_isReal)(SEXP s); Rboolean (Rf_isComplex)(SEXP s); Rboolean (Rf_isExpression)(SEXP s); Rboolean (Rf_isEnvironment)(SEXP s); Rboolean (Rf_isString)(SEXP s); Rboolean (Rf_isObject)(SEXP s); # define IS_SCALAR(x, type) (TYPEOF(x) == (type) && XLENGTH(x) == 1) #endif /* USE_RINTERNALS */ #define IS_SIMPLE_SCALAR(x, type) \ (IS_SCALAR(x, type) && ATTRIB(x) == R_NilValue) #define NAMEDMAX 2 #define INCREMENT_NAMED(x) do { \ SEXP __x__ = (x); \ if (NAMED(__x__) != NAMEDMAX) \ SET_NAMED(__x__, NAMED(__x__) + 1); \ } while (0) #if defined(COMPUTE_REFCNT_VALUES) # define SET_REFCNT(x,v) (REFCNT(x) = (v)) # if defined(EXTRA_REFCNT_FIELDS) # define SET_TRACKREFS(x,v) (TRACKREFS(x) = (v)) # else # define SET_TRACKREFS(x,v) ((x)->sxpinfo.spare = ! (v)) # endif # define DECREMENT_REFCNT(x) do { \ SEXP drc__x__ = (x); \ if (REFCNT(drc__x__) > 0 && REFCNT(drc__x__) < REFCNTMAX) \ SET_REFCNT(drc__x__, REFCNT(drc__x__) - 1); \ } while (0) # define INCREMENT_REFCNT(x) do { \ SEXP irc__x__ = (x); \ if (REFCNT(irc__x__) < REFCNTMAX) \ SET_REFCNT(irc__x__, REFCNT(irc__x__) + 1); \ } while (0) #else # define SET_REFCNT(x,v) do {} while(0) # define SET_TRACKREFS(x,v) do {} while(0) # define DECREMENT_REFCNT(x) do {} while(0) # define INCREMENT_REFCNT(x) do {} while(0) #endif #define ENABLE_REFCNT(x) SET_TRACKREFS(x, TRUE) #define DISABLE_REFCNT(x) SET_TRACKREFS(x, FALSE) /* Macros for some common idioms. */ #ifdef SWITCH_TO_REFCNT # define MAYBE_SHARED(x) (REFCNT(x) > 1) # define NO_REFERENCES(x) (REFCNT(x) == 0) # define MARK_NOT_MUTABLE(x) SET_REFCNT(x, REFCNTMAX) #else # define MAYBE_SHARED(x) (NAMED(x) > 1) # define NO_REFERENCES(x) (NAMED(x) == 0) # define MARK_NOT_MUTABLE(x) SET_NAMED(x, NAMEDMAX) #endif #define MAYBE_REFERENCED(x) (! NO_REFERENCES(x)) #define NOT_SHARED(x) (! MAYBE_SHARED(x)) /* Complex assignment support */ /* temporary definition that will need to be refined to distinguish getter from setter calls */ #define IS_GETTER_CALL(call) (CADR(call) == R_TmpvalSymbol) /* Accessor functions. Many are declared using () to avoid the macro definitions in the USE_RINTERNALS section. The function STRING_ELT is used as an argument to arrayAssign even if the macro version is in use. */ /* General Cons Cell Attributes */ SEXP (ATTRIB)(SEXP x); int (OBJECT)(SEXP x); int (MARK)(SEXP x); int (TYPEOF)(SEXP x); int (NAMED)(SEXP x); int (REFCNT)(SEXP x); void (SET_OBJECT)(SEXP x, int v); void (SET_TYPEOF)(SEXP x, int v); void (SET_NAMED)(SEXP x, int v); void SET_ATTRIB(SEXP x, SEXP v); void DUPLICATE_ATTRIB(SEXP to, SEXP from); void SHALLOW_DUPLICATE_ATTRIB(SEXP to, SEXP from); /* S4 object testing */ int (IS_S4_OBJECT)(SEXP x); void (SET_S4_OBJECT)(SEXP x); void (UNSET_S4_OBJECT)(SEXP x); /* Vector Access Functions */ int (LENGTH)(SEXP x); int (TRUELENGTH)(SEXP x); void (SETLENGTH)(SEXP x, int v); void (SET_TRUELENGTH)(SEXP x, int v); R_xlen_t (XLENGTH)(SEXP x); R_xlen_t (XTRUELENGTH)(SEXP x); int (IS_LONG_VEC)(SEXP x); int (LEVELS)(SEXP x); int (SETLEVELS)(SEXP x, int v); int *(LOGICAL)(SEXP x); int *(INTEGER)(SEXP x); Rbyte *(RAW)(SEXP x); double *(REAL)(SEXP x); Rcomplex *(COMPLEX)(SEXP x); SEXP (STRING_ELT)(SEXP x, R_xlen_t i); SEXP (VECTOR_ELT)(SEXP x, R_xlen_t i); void SET_STRING_ELT(SEXP x, R_xlen_t i, SEXP v); SEXP SET_VECTOR_ELT(SEXP x, R_xlen_t i, SEXP v); SEXP *(STRING_PTR)(SEXP x); SEXP * NORET (VECTOR_PTR)(SEXP x); /* List Access Functions */ /* These also work for ... objects */ #define CONS(a, b) cons((a), (b)) /* data lists */ #define LCONS(a, b) lcons((a), (b)) /* language lists */ SEXP (TAG)(SEXP e); SEXP (CAR)(SEXP e); SEXP (CDR)(SEXP e); SEXP (CAAR)(SEXP e); SEXP (CDAR)(SEXP e); SEXP (CADR)(SEXP e); SEXP (CDDR)(SEXP e); SEXP (CDDDR)(SEXP e); SEXP (CADDR)(SEXP e); SEXP (CADDDR)(SEXP e); SEXP (CAD4R)(SEXP e); int (MISSING)(SEXP x); void (SET_MISSING)(SEXP x, int v); void SET_TAG(SEXP x, SEXP y); SEXP SETCAR(SEXP x, SEXP y); SEXP SETCDR(SEXP x, SEXP y); SEXP SETCADR(SEXP x, SEXP y); SEXP SETCADDR(SEXP x, SEXP y); SEXP SETCADDDR(SEXP x, SEXP y); SEXP SETCAD4R(SEXP e, SEXP y); SEXP CONS_NR(SEXP a, SEXP b); /* Closure Access Functions */ SEXP (FORMALS)(SEXP x); SEXP (BODY)(SEXP x); SEXP (CLOENV)(SEXP x); int (RDEBUG)(SEXP x); int (RSTEP)(SEXP x); int (RTRACE)(SEXP x); void (SET_RDEBUG)(SEXP x, int v); void (SET_RSTEP)(SEXP x, int v); void (SET_RTRACE)(SEXP x, int v); void SET_FORMALS(SEXP x, SEXP v); void SET_BODY(SEXP x, SEXP v); void SET_CLOENV(SEXP x, SEXP v); /* Symbol Access Functions */ SEXP (PRINTNAME)(SEXP x); SEXP (SYMVALUE)(SEXP x); SEXP (INTERNAL)(SEXP x); int (DDVAL)(SEXP x); void (SET_DDVAL)(SEXP x, int v); void SET_PRINTNAME(SEXP x, SEXP v); void SET_SYMVALUE(SEXP x, SEXP v); void SET_INTERNAL(SEXP x, SEXP v); /* Environment Access Functions */ SEXP (FRAME)(SEXP x); SEXP (ENCLOS)(SEXP x); SEXP (HASHTAB)(SEXP x); int (ENVFLAGS)(SEXP x); void (SET_ENVFLAGS)(SEXP x, int v); void SET_FRAME(SEXP x, SEXP v); void SET_ENCLOS(SEXP x, SEXP v); void SET_HASHTAB(SEXP x, SEXP v); /* Promise Access Functions */ /* First five have macro versions in Defn.h */ SEXP (PRCODE)(SEXP x); SEXP (PRENV)(SEXP x); SEXP (PRVALUE)(SEXP x); int (PRSEEN)(SEXP x); void (SET_PRSEEN)(SEXP x, int v); void SET_PRENV(SEXP x, SEXP v); void SET_PRVALUE(SEXP x, SEXP v); void SET_PRCODE(SEXP x, SEXP v); void SET_PRSEEN(SEXP x, int v); /* Hashing Functions */ /* There are macro versions in Defn.h */ int (HASHASH)(SEXP x); int (HASHVALUE)(SEXP x); void (SET_HASHASH)(SEXP x, int v); void (SET_HASHVALUE)(SEXP x, int v); /* External pointer access macros */ #define EXTPTR_PTR(x) CAR(x) #define EXTPTR_PROT(x) CDR(x) #define EXTPTR_TAG(x) TAG(x) /* Bytecode access macros */ #define BCODE_CODE(x) CAR(x) #define BCODE_CONSTS(x) CDR(x) #define BCODE_EXPR(x) TAG(x) #define isByteCode(x) (TYPEOF(x)==BCODESXP) /* Pointer Protection and Unprotection */ #define PROTECT(s) Rf_protect(s) #define UNPROTECT(n) Rf_unprotect(n) #define UNPROTECT_PTR(s) Rf_unprotect_ptr(s) /* We sometimes need to coerce a protected value and place the new coerced value under protection. For these cases PROTECT_WITH_INDEX saves an index of the protection location that can be used to replace the protected value using REPROTECT. */ typedef int PROTECT_INDEX; #define PROTECT_WITH_INDEX(x,i) R_ProtectWithIndex(x,i) #define REPROTECT(x,i) R_Reprotect(x,i) /* Evaluation Environment */ LibExtern SEXP R_GlobalEnv; /* The "global" environment */ LibExtern SEXP R_EmptyEnv; /* An empty environment at the root of the environment tree */ LibExtern SEXP R_BaseEnv; /* The base environment; formerly R_NilValue */ LibExtern SEXP R_BaseNamespace; /* The (fake) namespace for base */ LibExtern SEXP R_NamespaceRegistry;/* Registry for registered namespaces */ LibExtern SEXP R_Srcref; /* Current srcref, for debuggers */ /* Special Values */ LibExtern SEXP R_NilValue; /* The nil object */ LibExtern SEXP R_UnboundValue; /* Unbound marker */ LibExtern SEXP R_MissingArg; /* Missing argument marker */ #ifdef __MAIN__ attribute_hidden #else extern #endif SEXP R_RestartToken; /* Marker for restarted function calls */ /* Symbol Table Shortcuts */ LibExtern SEXP R_baseSymbol; // <-- backcompatible version of: LibExtern SEXP R_BaseSymbol; // "base" LibExtern SEXP R_BraceSymbol; /* "{" */ LibExtern SEXP R_Bracket2Symbol; /* "[[" */ LibExtern SEXP R_BracketSymbol; /* "[" */ LibExtern SEXP R_ClassSymbol; /* "class" */ LibExtern SEXP R_DeviceSymbol; /* ".Device" */ LibExtern SEXP R_DimNamesSymbol; /* "dimnames" */ LibExtern SEXP R_DimSymbol; /* "dim" */ LibExtern SEXP R_DollarSymbol; /* "$" */ LibExtern SEXP R_DotsSymbol; /* "..." */ LibExtern SEXP R_DoubleColonSymbol;// "::" LibExtern SEXP R_DropSymbol; /* "drop" */ LibExtern SEXP R_LastvalueSymbol; /* ".Last.value" */ LibExtern SEXP R_LevelsSymbol; /* "levels" */ LibExtern SEXP R_ModeSymbol; /* "mode" */ LibExtern SEXP R_NaRmSymbol; /* "na.rm" */ LibExtern SEXP R_NameSymbol; /* "name" */ LibExtern SEXP R_NamesSymbol; /* "names" */ LibExtern SEXP R_NamespaceEnvSymbol;// ".__NAMESPACE__." LibExtern SEXP R_PackageSymbol; /* "package" */ LibExtern SEXP R_PreviousSymbol; /* "previous" */ LibExtern SEXP R_QuoteSymbol; /* "quote" */ LibExtern SEXP R_RowNamesSymbol; /* "row.names" */ LibExtern SEXP R_SeedsSymbol; /* ".Random.seed" */ LibExtern SEXP R_SortListSymbol; /* "sort.list" */ LibExtern SEXP R_SourceSymbol; /* "source" */ LibExtern SEXP R_SpecSymbol; // "spec" LibExtern SEXP R_TripleColonSymbol;// ":::" LibExtern SEXP R_TspSymbol; /* "tsp" */ LibExtern SEXP R_dot_defined; /* ".defined" */ LibExtern SEXP R_dot_Method; /* ".Method" */ LibExtern SEXP R_dot_packageName;// ".packageName" LibExtern SEXP R_dot_target; /* ".target" */ LibExtern SEXP R_dot_Generic; /* ".Generic" */ /* Missing Values - others from Arith.h */ #define NA_STRING R_NaString LibExtern SEXP R_NaString; /* NA_STRING as a CHARSXP */ LibExtern SEXP R_BlankString; /* "" as a CHARSXP */ LibExtern SEXP R_BlankScalarString; /* "" as a STRSXP */ /* srcref related functions */ SEXP R_GetCurrentSrcref(int); SEXP R_GetSrcFilename(SEXP); /*--- FUNCTIONS ------------------------------------------------------ */ /* Type Coercions of all kinds */ SEXP Rf_asChar(SEXP); SEXP Rf_coerceVector(SEXP, SEXPTYPE); SEXP Rf_PairToVectorList(SEXP x); SEXP Rf_VectorToPairList(SEXP x); SEXP Rf_asCharacterFactor(SEXP x); int Rf_asLogical(SEXP x); int Rf_asInteger(SEXP x); double Rf_asReal(SEXP x); Rcomplex Rf_asComplex(SEXP x); #ifndef R_ALLOCATOR_TYPE #define R_ALLOCATOR_TYPE typedef struct R_allocator R_allocator_t; #endif /* Other Internally Used Functions, excluding those which are inline-able*/ char * Rf_acopy_string(const char *); void Rf_addMissingVarsToNewEnv(SEXP, SEXP); SEXP Rf_alloc3DArray(SEXPTYPE, int, int, int); SEXP Rf_allocArray(SEXPTYPE, SEXP); SEXP Rf_allocFormalsList2(SEXP sym1, SEXP sym2); SEXP Rf_allocFormalsList3(SEXP sym1, SEXP sym2, SEXP sym3); SEXP Rf_allocFormalsList4(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4); SEXP Rf_allocFormalsList5(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5); SEXP Rf_allocFormalsList6(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5, SEXP sym6); SEXP Rf_allocMatrix(SEXPTYPE, int, int); SEXP Rf_allocList(int); SEXP Rf_allocS4Object(void); SEXP Rf_allocSExp(SEXPTYPE); SEXP Rf_allocVector3(SEXPTYPE, R_xlen_t, R_allocator_t*); R_xlen_t Rf_any_duplicated(SEXP x, Rboolean from_last); R_xlen_t Rf_any_duplicated3(SEXP x, SEXP incomp, Rboolean from_last); SEXP Rf_applyClosure(SEXP, SEXP, SEXP, SEXP, SEXP); SEXP Rf_arraySubscript(int, SEXP, SEXP, SEXP (*)(SEXP,SEXP), SEXP (*)(SEXP, int), SEXP); SEXP Rf_classgets(SEXP, SEXP); SEXP Rf_cons(SEXP, SEXP); void Rf_copyMatrix(SEXP, SEXP, Rboolean); void Rf_copyListMatrix(SEXP, SEXP, Rboolean); void Rf_copyMostAttrib(SEXP, SEXP); void Rf_copyVector(SEXP, SEXP); int Rf_countContexts(int, int); SEXP Rf_CreateTag(SEXP); void Rf_defineVar(SEXP, SEXP, SEXP); SEXP Rf_dimgets(SEXP, SEXP); SEXP Rf_dimnamesgets(SEXP, SEXP); SEXP Rf_DropDims(SEXP); SEXP Rf_duplicate(SEXP); SEXP Rf_shallow_duplicate(SEXP); SEXP Rf_lazy_duplicate(SEXP); /* the next really should not be here and is also in Defn.h */ SEXP Rf_duplicated(SEXP, Rboolean); Rboolean R_envHasNoSpecialSymbols(SEXP); SEXP Rf_eval(SEXP, SEXP); SEXP Rf_findFun(SEXP, SEXP); SEXP Rf_findVar(SEXP, SEXP); SEXP Rf_findVarInFrame(SEXP, SEXP); SEXP Rf_findVarInFrame3(SEXP, SEXP, Rboolean); SEXP Rf_getAttrib(SEXP, SEXP); SEXP Rf_GetArrayDimnames(SEXP); SEXP Rf_GetColNames(SEXP); void Rf_GetMatrixDimnames(SEXP, SEXP*, SEXP*, const char**, const char**); SEXP Rf_GetOption(SEXP, SEXP); /* pre-2.13.0 compatibility */ SEXP Rf_GetOption1(SEXP); int Rf_GetOptionDigits(void); int Rf_GetOptionWidth(void); SEXP Rf_GetRowNames(SEXP); void Rf_gsetVar(SEXP, SEXP, SEXP); SEXP Rf_install(const char *); SEXP Rf_installChar(SEXP); SEXP Rf_installDDVAL(int i); SEXP Rf_installS3Signature(const char *, const char *); Rboolean Rf_isFree(SEXP); Rboolean Rf_isOrdered(SEXP); Rboolean Rf_isUnmodifiedSpecSym(SEXP sym, SEXP env); Rboolean Rf_isUnordered(SEXP); Rboolean Rf_isUnsorted(SEXP, Rboolean); SEXP Rf_lengthgets(SEXP, R_len_t); SEXP Rf_xlengthgets(SEXP, R_xlen_t); SEXP R_lsInternal(SEXP, Rboolean); SEXP R_lsInternal3(SEXP, Rboolean, Rboolean); SEXP Rf_match(SEXP, SEXP, int); SEXP Rf_matchE(SEXP, SEXP, int, SEXP); SEXP Rf_namesgets(SEXP, SEXP); SEXP Rf_mkChar(const char *); SEXP Rf_mkCharLen(const char *, int); Rboolean Rf_NonNullStringMatch(SEXP, SEXP); int Rf_ncols(SEXP); int Rf_nrows(SEXP); SEXP Rf_nthcdr(SEXP, int); // ../main/character.c : typedef enum {Bytes, Chars, Width} nchar_type; int R_nchar(SEXP string, nchar_type type_, Rboolean allowNA, Rboolean keepNA, const char* msg_name); Rboolean Rf_pmatch(SEXP, SEXP, Rboolean); Rboolean Rf_psmatch(const char *, const char *, Rboolean); void Rf_PrintValue(SEXP); #ifndef INLINE_PROTECT SEXP Rf_protect(SEXP); #endif void Rf_readS3VarsFromFrame(SEXP, SEXP*, SEXP*, SEXP*, SEXP*, SEXP*, SEXP*); SEXP Rf_setAttrib(SEXP, SEXP, SEXP); void Rf_setSVector(SEXP*, int, SEXP); void Rf_setVar(SEXP, SEXP, SEXP); SEXP Rf_stringSuffix(SEXP, int); SEXPTYPE Rf_str2type(const char *); Rboolean Rf_StringBlank(SEXP); SEXP Rf_substitute(SEXP,SEXP); const char * Rf_translateChar(SEXP); const char * Rf_translateChar0(SEXP); const char * Rf_translateCharUTF8(SEXP); const char * Rf_type2char(SEXPTYPE); SEXP Rf_type2rstr(SEXPTYPE); SEXP Rf_type2str(SEXPTYPE); SEXP Rf_type2str_nowarn(SEXPTYPE); #ifndef INLINE_PROTECT void Rf_unprotect(int); #endif void Rf_unprotect_ptr(SEXP); void NORET R_signal_protect_error(void); void NORET R_signal_unprotect_error(void); void NORET R_signal_reprotect_error(PROTECT_INDEX i); #ifndef INLINE_PROTECT void R_ProtectWithIndex(SEXP, PROTECT_INDEX *); void R_Reprotect(SEXP, PROTECT_INDEX); #endif SEXP R_tryEval(SEXP, SEXP, int *); SEXP R_tryEvalSilent(SEXP, SEXP, int *); const char *R_curErrorBuf(); Rboolean Rf_isS4(SEXP); SEXP Rf_asS4(SEXP, Rboolean, int); SEXP Rf_S3Class(SEXP); int Rf_isBasicClass(const char *); Rboolean R_cycle_detected(SEXP s, SEXP child); typedef enum { CE_NATIVE = 0, CE_UTF8 = 1, CE_LATIN1 = 2, CE_BYTES = 3, CE_SYMBOL = 5, CE_ANY =99 } cetype_t; cetype_t Rf_getCharCE(SEXP); SEXP Rf_mkCharCE(const char *, cetype_t); SEXP Rf_mkCharLenCE(const char *, int, cetype_t); const char *Rf_reEnc(const char *x, cetype_t ce_in, cetype_t ce_out, int subst); /* return(.) NOT reached : for -Wall */ #define error_return(msg) { Rf_error(msg); return R_NilValue; } #define errorcall_return(cl,msg){ Rf_errorcall(cl, msg); return R_NilValue; } #ifdef __MAIN__ #undef extern #undef LibExtern #endif /* Calling a function with arguments evaluated */ SEXP R_forceAndCall(SEXP e, int n, SEXP rho); /* External pointer interface */ SEXP R_MakeExternalPtr(void *p, SEXP tag, SEXP prot); void *R_ExternalPtrAddr(SEXP s); SEXP R_ExternalPtrTag(SEXP s); SEXP R_ExternalPtrProtected(SEXP s); void R_ClearExternalPtr(SEXP s); void R_SetExternalPtrAddr(SEXP s, void *p); void R_SetExternalPtrTag(SEXP s, SEXP tag); void R_SetExternalPtrProtected(SEXP s, SEXP p); /* Finalization interface */ typedef void (*R_CFinalizer_t)(SEXP); void R_RegisterFinalizer(SEXP s, SEXP fun); void R_RegisterCFinalizer(SEXP s, R_CFinalizer_t fun); void R_RegisterFinalizerEx(SEXP s, SEXP fun, Rboolean onexit); void R_RegisterCFinalizerEx(SEXP s, R_CFinalizer_t fun, Rboolean onexit); void R_RunPendingFinalizers(void); /* Weak reference interface */ SEXP R_MakeWeakRef(SEXP key, SEXP val, SEXP fin, Rboolean onexit); SEXP R_MakeWeakRefC(SEXP key, SEXP val, R_CFinalizer_t fin, Rboolean onexit); SEXP R_WeakRefKey(SEXP w); SEXP R_WeakRefValue(SEXP w); void R_RunWeakRefFinalizer(SEXP w); SEXP R_PromiseExpr(SEXP); SEXP R_ClosureExpr(SEXP); void R_initialize_bcode(void); SEXP R_bcEncode(SEXP); SEXP R_bcDecode(SEXP); #define PREXPR(e) R_PromiseExpr(e) #define BODY_EXPR(e) R_ClosureExpr(e) /* Protected evaluation */ Rboolean R_ToplevelExec(void (*fun)(void *), void *data); SEXP R_ExecWithCleanup(SEXP (*fun)(void *), void *data, void (*cleanfun)(void *), void *cleandata); /* Environment and Binding Features */ void R_RestoreHashCount(SEXP rho); Rboolean R_IsPackageEnv(SEXP rho); SEXP R_PackageEnvName(SEXP rho); SEXP R_FindPackageEnv(SEXP info); Rboolean R_IsNamespaceEnv(SEXP rho); SEXP R_NamespaceEnvSpec(SEXP rho); SEXP R_FindNamespace(SEXP info); void R_LockEnvironment(SEXP env, Rboolean bindings); Rboolean R_EnvironmentIsLocked(SEXP env); void R_LockBinding(SEXP sym, SEXP env); void R_unLockBinding(SEXP sym, SEXP env); void R_MakeActiveBinding(SEXP sym, SEXP fun, SEXP env); Rboolean R_BindingIsLocked(SEXP sym, SEXP env); Rboolean R_BindingIsActive(SEXP sym, SEXP env); Rboolean R_HasFancyBindings(SEXP rho); /* ../main/errors.c : */ /* needed for R_load/savehistory handling in front ends */ #if defined(__GNUC__) && __GNUC__ >= 3 void Rf_errorcall(SEXP, const char *, ...) __attribute__((noreturn)); #else void Rf_errorcall(SEXP, const char *, ...); #endif void Rf_warningcall(SEXP, const char *, ...); void Rf_warningcall_immediate(SEXP, const char *, ...); /* Save/Load Interface */ #define R_XDR_DOUBLE_SIZE 8 #define R_XDR_INTEGER_SIZE 4 void R_XDREncodeDouble(double d, void *buf); double R_XDRDecodeDouble(void *buf); void R_XDREncodeInteger(int i, void *buf); int R_XDRDecodeInteger(void *buf); typedef void *R_pstream_data_t; typedef enum { R_pstream_any_format, R_pstream_ascii_format, R_pstream_binary_format, R_pstream_xdr_format, R_pstream_asciihex_format } R_pstream_format_t; typedef struct R_outpstream_st *R_outpstream_t; struct R_outpstream_st { R_pstream_data_t data; R_pstream_format_t type; int version; void (*OutChar)(R_outpstream_t, int); void (*OutBytes)(R_outpstream_t, void *, int); SEXP (*OutPersistHookFunc)(SEXP, SEXP); SEXP OutPersistHookData; }; typedef struct R_inpstream_st *R_inpstream_t; struct R_inpstream_st { R_pstream_data_t data; R_pstream_format_t type; int (*InChar)(R_inpstream_t); void (*InBytes)(R_inpstream_t, void *, int); SEXP (*InPersistHookFunc)(SEXP, SEXP); SEXP InPersistHookData; }; void R_InitInPStream(R_inpstream_t stream, R_pstream_data_t data, R_pstream_format_t type, int (*inchar)(R_inpstream_t), void (*inbytes)(R_inpstream_t, void *, int), SEXP (*phook)(SEXP, SEXP), SEXP pdata); void R_InitOutPStream(R_outpstream_t stream, R_pstream_data_t data, R_pstream_format_t type, int version, void (*outchar)(R_outpstream_t, int), void (*outbytes)(R_outpstream_t, void *, int), SEXP (*phook)(SEXP, SEXP), SEXP pdata); #ifdef __cplusplus void R_InitFileInPStream(R_inpstream_t stream, std::FILE *fp, R_pstream_format_t type, SEXP (*phook)(SEXP, SEXP), SEXP pdata); void R_InitFileOutPStream(R_outpstream_t stream, std::FILE *fp, R_pstream_format_t type, int version, SEXP (*phook)(SEXP, SEXP), SEXP pdata); #else void R_InitFileInPStream(R_inpstream_t stream, FILE *fp, R_pstream_format_t type, SEXP (*phook)(SEXP, SEXP), SEXP pdata); void R_InitFileOutPStream(R_outpstream_t stream, FILE *fp, R_pstream_format_t type, int version, SEXP (*phook)(SEXP, SEXP), SEXP pdata); #endif #ifdef NEED_CONNECTION_PSTREAMS /* The connection interface is not available to packages. To allow limited use of connection pointers this defines the opaque pointer type. */ #ifndef HAVE_RCONNECTION_TYPEDEF typedef struct Rconn *Rconnection; #define HAVE_RCONNECTION_TYPEDEF #endif void R_InitConnOutPStream(R_outpstream_t stream, Rconnection con, R_pstream_format_t type, int version, SEXP (*phook)(SEXP, SEXP), SEXP pdata); void R_InitConnInPStream(R_inpstream_t stream, Rconnection con, R_pstream_format_t type, SEXP (*phook)(SEXP, SEXP), SEXP pdata); #endif void R_Serialize(SEXP s, R_outpstream_t ops); SEXP R_Unserialize(R_inpstream_t ips); /* slot management (in attrib.c) */ SEXP R_do_slot(SEXP obj, SEXP name); SEXP R_do_slot_assign(SEXP obj, SEXP name, SEXP value); int R_has_slot(SEXP obj, SEXP name); /* S3-S4 class (inheritance), attrib.c */ SEXP R_S4_extends(SEXP klass, SEXP useTable); /* class definition, new objects (objects.c) */ SEXP R_do_MAKE_CLASS(const char *what); SEXP R_getClassDef (const char *what); SEXP R_getClassDef_R(SEXP what); Rboolean R_has_methods_attached(void); Rboolean R_isVirtualClass(SEXP class_def, SEXP env); Rboolean R_extends (SEXP class1, SEXP class2, SEXP env); SEXP R_do_new_object(SEXP class_def); /* supporting a C-level version of is(., .) : */ int R_check_class_and_super(SEXP x, const char **valid, SEXP rho); int R_check_class_etc (SEXP x, const char **valid); /* preserve objects across GCs */ void R_PreserveObject(SEXP); void R_ReleaseObject(SEXP); /* Shutdown actions */ void R_dot_Last(void); /* in main.c */ void R_RunExitFinalizers(void); /* in memory.c */ /* Replacements for popen and system */ #ifdef HAVE_POPEN # ifdef __cplusplus std::FILE *R_popen(const char *, const char *); # else FILE *R_popen(const char *, const char *); # endif #endif int R_system(const char *); /* R_compute_identical: C version of identical() function The third arg to R_compute_identical() consists of bitmapped flags for non-default options: currently the first 4 default to TRUE, so the flag is set for FALSE values: 1 = !NUM_EQ 2 = !SINGLE_NA 4 = !ATTR_AS_SET 8 = !IGNORE_BYTECODE 16 = !IGNORE_ENV Default from R's default: 15 */ Rboolean R_compute_identical(SEXP, SEXP, int); /* C version of R's indx <- order(..., na.last, decreasing) : e.g. arglist = Rf_lang2(x,y) or Rf_lang3(x,y,z) */ void R_orderVector (int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean decreasing); // C version of R's indx <- order(x, na.last, decreasing) : void R_orderVector1(int *indx, int n, SEXP x, Rboolean nalast, Rboolean decreasing); #ifndef R_NO_REMAP #define acopy_string Rf_acopy_string #define addMissingVarsToNewEnv Rf_addMissingVarsToNewEnv #define alloc3DArray Rf_alloc3DArray #define allocArray Rf_allocArray #define allocFormalsList2 Rf_allocFormalsList2 #define allocFormalsList3 Rf_allocFormalsList3 #define allocFormalsList4 Rf_allocFormalsList4 #define allocFormalsList5 Rf_allocFormalsList5 #define allocFormalsList6 Rf_allocFormalsList6 #define allocList Rf_allocList #define allocMatrix Rf_allocMatrix #define allocS4Object Rf_allocS4Object #define allocSExp Rf_allocSExp #define allocVector Rf_allocVector #define allocVector3 Rf_allocVector3 #define any_duplicated Rf_any_duplicated #define any_duplicated3 Rf_any_duplicated3 #define applyClosure Rf_applyClosure #define arraySubscript Rf_arraySubscript #define asChar Rf_asChar #define asCharacterFactor Rf_asCharacterFactor #define asComplex Rf_asComplex #define asInteger Rf_asInteger #define asLogical Rf_asLogical #define asReal Rf_asReal #define asS4 Rf_asS4 #define classgets Rf_classgets #define coerceVector Rf_coerceVector #define conformable Rf_conformable #define cons Rf_cons #define copyListMatrix Rf_copyListMatrix #define copyMatrix Rf_copyMatrix #define copyMostAttrib Rf_copyMostAttrib #define copyVector Rf_copyVector #define countContexts Rf_countContexts #define CreateTag Rf_CreateTag #define defineVar Rf_defineVar #define dimgets Rf_dimgets #define dimnamesgets Rf_dimnamesgets #define DropDims Rf_DropDims #define duplicate Rf_duplicate #define duplicated Rf_duplicated #define elt Rf_elt #define errorcall Rf_errorcall #define eval Rf_eval #define findFun Rf_findFun #define findVar Rf_findVar #define findVarInFrame Rf_findVarInFrame #define findVarInFrame3 Rf_findVarInFrame3 #define GetArrayDimnames Rf_GetArrayDimnames #define getAttrib Rf_getAttrib #define getCharCE Rf_getCharCE #define GetColNames Rf_GetColNames #define GetMatrixDimnames Rf_GetMatrixDimnames #define GetOption1 Rf_GetOption1 #define GetOptionDigits Rf_GetOptionDigits #define GetOptionWidth Rf_GetOptionWidth #define GetOption Rf_GetOption #define GetRowNames Rf_GetRowNames #define gsetVar Rf_gsetVar #define inherits Rf_inherits #define install Rf_install #define installChar Rf_installChar #define installDDVAL Rf_installDDVAL #define installS3Signature Rf_installS3Signature #define isArray Rf_isArray #define isBasicClass Rf_isBasicClass #define isComplex Rf_isComplex #define isEnvironment Rf_isEnvironment #define isExpression Rf_isExpression #define isFactor Rf_isFactor #define isFrame Rf_isFrame #define isFree Rf_isFree #define isFunction Rf_isFunction #define isInteger Rf_isInteger #define isLanguage Rf_isLanguage #define isList Rf_isList #define isLogical Rf_isLogical #define isSymbol Rf_isSymbol #define isMatrix Rf_isMatrix #define isNewList Rf_isNewList #define isNull Rf_isNull #define isNumeric Rf_isNumeric #define isNumber Rf_isNumber #define isObject Rf_isObject #define isOrdered Rf_isOrdered #define isPairList Rf_isPairList #define isPrimitive Rf_isPrimitive #define isReal Rf_isReal #define isS4 Rf_isS4 #define isString Rf_isString #define isTs Rf_isTs #define isUnmodifiedSpecSym Rf_isUnmodifiedSpecSym #define isUnordered Rf_isUnordered #define isUnsorted Rf_isUnsorted #define isUserBinop Rf_isUserBinop #define isValidString Rf_isValidString #define isValidStringF Rf_isValidStringF #define isVector Rf_isVector #define isVectorAtomic Rf_isVectorAtomic #define isVectorizable Rf_isVectorizable #define isVectorList Rf_isVectorList #define lang1 Rf_lang1 #define lang2 Rf_lang2 #define lang3 Rf_lang3 #define lang4 Rf_lang4 #define lang5 Rf_lang5 #define lang6 Rf_lang6 #define lastElt Rf_lastElt #define lazy_duplicate Rf_lazy_duplicate #define lcons Rf_lcons #define length(x) Rf_length(x) #define lengthgets Rf_lengthgets #define list1 Rf_list1 #define list2 Rf_list2 #define list3 Rf_list3 #define list4 Rf_list4 #define list5 Rf_list5 #define listAppend Rf_listAppend #define match Rf_match #define matchE Rf_matchE #define mkChar Rf_mkChar #define mkCharCE Rf_mkCharCE #define mkCharLen Rf_mkCharLen #define mkCharLenCE Rf_mkCharLenCE #define mkNamed Rf_mkNamed #define mkString Rf_mkString #define namesgets Rf_namesgets #define ncols Rf_ncols #define nlevels Rf_nlevels #define NonNullStringMatch Rf_NonNullStringMatch #define nrows Rf_nrows #define nthcdr Rf_nthcdr #define PairToVectorList Rf_PairToVectorList #define pmatch Rf_pmatch #define psmatch Rf_psmatch #define PrintValue Rf_PrintValue #define protect Rf_protect #define readS3VarsFromFrame Rf_readS3VarsFromFrame #define reEnc Rf_reEnc #define rownamesgets Rf_rownamesgets #define S3Class Rf_S3Class #define ScalarComplex Rf_ScalarComplex #define ScalarInteger Rf_ScalarInteger #define ScalarLogical Rf_ScalarLogical #define ScalarReal Rf_ScalarReal #define ScalarString Rf_ScalarString #define ScalarRaw Rf_ScalarRaw #define setAttrib Rf_setAttrib #define setSVector Rf_setSVector #define setVar Rf_setVar #define shallow_duplicate Rf_shallow_duplicate #define str2type Rf_str2type #define stringSuffix Rf_stringSuffix #define stringPositionTr Rf_stringPositionTr #define StringBlank Rf_StringBlank #define substitute Rf_substitute #define topenv Rf_topenv #define translateChar Rf_translateChar #define translateChar0 Rf_translateChar0 #define translateCharUTF8 Rf_translateCharUTF8 #define type2char Rf_type2char #define type2rstr Rf_type2rstr #define type2str Rf_type2str #define type2str_nowarn Rf_type2str_nowarn #define unprotect Rf_unprotect #define unprotect_ptr Rf_unprotect_ptr #define VectorToPairList Rf_VectorToPairList #define warningcall Rf_warningcall #define warningcall_immediate Rf_warningcall_immediate #define xlength(x) Rf_xlength(x) #define xlengthgets Rf_xlengthgets #endif #if defined(CALLED_FROM_DEFN_H) && !defined(__MAIN__) && (defined(COMPILING_R) || ( __GNUC__ && !defined(__INTEL_COMPILER) )) #include "Rinlinedfuns.h" #else /* need remapped names here for use with R_NO_REMAP */ /* These are the inlinable functions that are provided in Rinlinedfuns.h It is *essential* that these do not appear in any other header file, with or without the Rf_ prefix. */ SEXP Rf_allocVector(SEXPTYPE, R_xlen_t); Rboolean Rf_conformable(SEXP, SEXP); SEXP Rf_elt(SEXP, int); Rboolean Rf_inherits(SEXP, const char *); Rboolean Rf_isArray(SEXP); Rboolean Rf_isFactor(SEXP); Rboolean Rf_isFrame(SEXP); Rboolean Rf_isFunction(SEXP); Rboolean Rf_isInteger(SEXP); Rboolean Rf_isLanguage(SEXP); Rboolean Rf_isList(SEXP); Rboolean Rf_isMatrix(SEXP); Rboolean Rf_isNewList(SEXP); Rboolean Rf_isNumber(SEXP); Rboolean Rf_isNumeric(SEXP); Rboolean Rf_isPairList(SEXP); Rboolean Rf_isPrimitive(SEXP); Rboolean Rf_isTs(SEXP); Rboolean Rf_isUserBinop(SEXP); Rboolean Rf_isValidString(SEXP); Rboolean Rf_isValidStringF(SEXP); Rboolean Rf_isVector(SEXP); Rboolean Rf_isVectorAtomic(SEXP); Rboolean Rf_isVectorList(SEXP); Rboolean Rf_isVectorizable(SEXP); SEXP Rf_lang1(SEXP); SEXP Rf_lang2(SEXP, SEXP); SEXP Rf_lang3(SEXP, SEXP, SEXP); SEXP Rf_lang4(SEXP, SEXP, SEXP, SEXP); SEXP Rf_lang5(SEXP, SEXP, SEXP, SEXP, SEXP); SEXP Rf_lang6(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP); SEXP Rf_lastElt(SEXP); SEXP Rf_lcons(SEXP, SEXP); R_len_t Rf_length(SEXP); SEXP Rf_list1(SEXP); SEXP Rf_list2(SEXP, SEXP); SEXP Rf_list3(SEXP, SEXP, SEXP); SEXP Rf_list4(SEXP, SEXP, SEXP, SEXP); SEXP Rf_list5(SEXP, SEXP, SEXP, SEXP, SEXP); SEXP Rf_listAppend(SEXP, SEXP); SEXP Rf_mkNamed(SEXPTYPE, const char **); SEXP Rf_mkString(const char *); int Rf_nlevels(SEXP); int Rf_stringPositionTr(SEXP, const char *); SEXP Rf_ScalarComplex(Rcomplex); SEXP Rf_ScalarInteger(int); SEXP Rf_ScalarLogical(int); SEXP Rf_ScalarRaw(Rbyte); SEXP Rf_ScalarReal(double); SEXP Rf_ScalarString(SEXP); R_xlen_t Rf_xlength(SEXP); # ifdef INLINE_PROTECT SEXP Rf_protect(SEXP); void Rf_unprotect(int); void R_ProtectWithIndex(SEXP, PROTECT_INDEX *); void R_Reprotect(SEXP, PROTECT_INDEX); # endif SEXP R_FixupRHS(SEXP x, SEXP y); #endif #ifdef USE_RINTERNALS /* Test macros with function versions above */ #undef isNull #define isNull(s) (TYPEOF(s) == NILSXP) #undef isSymbol #define isSymbol(s) (TYPEOF(s) == SYMSXP) #undef isLogical #define isLogical(s) (TYPEOF(s) == LGLSXP) #undef isReal #define isReal(s) (TYPEOF(s) == REALSXP) #undef isComplex #define isComplex(s) (TYPEOF(s) == CPLXSXP) #undef isExpression #define isExpression(s) (TYPEOF(s) == EXPRSXP) #undef isEnvironment #define isEnvironment(s) (TYPEOF(s) == ENVSXP) #undef isString #define isString(s) (TYPEOF(s) == STRSXP) #undef isObject #define isObject(s) (OBJECT(s) != 0) /* macro version of R_CheckStack */ #define R_CheckStack() do { \ void NORET R_SignalCStackOverflow(intptr_t); \ int dummy; \ intptr_t usage = R_CStackDir * (R_CStackStart - (uintptr_t)&dummy); \ if(R_CStackLimit != -1 && usage > ((intptr_t) R_CStackLimit)) \ R_SignalCStackOverflow(usage); \ } while (FALSE) #endif #ifdef __cplusplus } #endif #endif /* R_INTERNALS_H_ */ |
Added undroid/Rtcl/compat/R/Rmath.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | /* -*- C -*- * Mathlib : A C Library of Special Functions * Copyright (C) 1998-2016 The R Core Team * Copyright (C) 2004 The R Foundation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ * * Rmath.h should contain ALL headers from R's C code in `src/nmath' ------- such that ``the Math library'' can be used by simply ``#include <Rmath.h> '' and nothing else. It is part of the API and supports 'standalone Rmath'. */ #ifndef RMATH_H #define RMATH_H /* Note that on some systems you need to include math.h before the defines below. If so, define this yourself. */ #ifndef NO_C_HEADERS /* needed for cospi etc */ # ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 # endif /* See the comment in R.h */ # ifdef __SUNPRO_CC # define DO_NOT_USE_CXX_HEADERS # endif # if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS) # include <cmath> # else # include <math.h> # endif #else #warning "use of NO_C_HEADERS is deprecated" #endif /*-- Mathlib as part of R -- define this for standalone : */ /* #undef MATHLIB_STANDALONE */ #define R_VERSION_STRING "3.3.3" #ifndef HAVE_EXPM1 # define HAVE_EXPM1 1 #endif #ifndef HAVE_HYPOT # define HAVE_HYPOT 1 #endif #ifndef HAVE_LOG1P # define HAVE_LOG1P 1 #endif #ifndef HAVE_WORKING_LOG1P # define HAVE_WORKING_LOG1P 1 #endif #if defined(HAVE_LOG1P) && !defined(HAVE_WORKING_LOG1P) /* remap to avoid problems with getting the right entry point */ double Rlog1p(double); #define log1p Rlog1p #endif /* Undo SGI Madness */ #ifdef __sgi # ifdef ftrunc # undef ftrunc # endif # ifdef qexp # undef qexp # endif # ifdef qgamma # undef qgamma # endif #endif /* ----- The following constants and entry points are part of the R API ---- */ /* 30 Decimal-place constants */ /* Computed with bc -l (scale=32; proper round) */ /* SVID & X/Open Constants */ /* Names from Solaris math.h */ #ifndef M_E #define M_E 2.718281828459045235360287471353 /* e */ #endif #ifndef M_LOG2E #define M_LOG2E 1.442695040888963407359924681002 /* log2(e) */ #endif #ifndef M_LOG10E #define M_LOG10E 0.434294481903251827651128918917 /* log10(e) */ #endif #ifndef M_LN2 #define M_LN2 0.693147180559945309417232121458 /* ln(2) */ #endif #ifndef M_LN10 #define M_LN10 2.302585092994045684017991454684 /* ln(10) */ #endif #ifndef M_PI #define M_PI 3.141592653589793238462643383280 /* pi */ #endif #ifndef M_2PI #define M_2PI 6.283185307179586476925286766559 /* 2*pi */ #endif #ifndef M_PI_2 #define M_PI_2 1.570796326794896619231321691640 /* pi/2 */ #endif #ifndef M_PI_4 #define M_PI_4 0.785398163397448309615660845820 /* pi/4 */ #endif #ifndef M_1_PI #define M_1_PI 0.318309886183790671537767526745 /* 1/pi */ #endif #ifndef M_2_PI #define M_2_PI 0.636619772367581343075535053490 /* 2/pi */ #endif #ifndef M_2_SQRTPI #define M_2_SQRTPI 1.128379167095512573896158903122 /* 2/sqrt(pi) */ #endif #ifndef M_SQRT2 #define M_SQRT2 1.414213562373095048801688724210 /* sqrt(2) */ #endif #ifndef M_SQRT1_2 #define M_SQRT1_2 0.707106781186547524400844362105 /* 1/sqrt(2) */ #endif /* R-Specific Constants */ #ifndef M_SQRT_3 #define M_SQRT_3 1.732050807568877293527446341506 /* sqrt(3) */ #endif #ifndef M_SQRT_32 #define M_SQRT_32 5.656854249492380195206754896838 /* sqrt(32) */ #endif #ifndef M_LOG10_2 #define M_LOG10_2 0.301029995663981195213738894724 /* log10(2) */ #endif #ifndef M_SQRT_PI #define M_SQRT_PI 1.772453850905516027298167483341 /* sqrt(pi) */ #endif #ifndef M_1_SQRT_2PI #define M_1_SQRT_2PI 0.398942280401432677939946059934 /* 1/sqrt(2pi) */ #endif #ifndef M_SQRT_2dPI #define M_SQRT_2dPI 0.797884560802865355879892119869 /* sqrt(2/pi) */ #endif #ifndef M_LN_2PI #define M_LN_2PI 1.837877066409345483560659472811 /* log(2*pi) */ #endif #ifndef M_LN_SQRT_PI #define M_LN_SQRT_PI 0.572364942924700087071713675677 /* log(sqrt(pi)) == log(pi)/2 */ #endif #ifndef M_LN_SQRT_2PI #define M_LN_SQRT_2PI 0.918938533204672741780329736406 /* log(sqrt(2*pi)) == log(2*pi)/2 */ #endif #ifndef M_LN_SQRT_PId2 #define M_LN_SQRT_PId2 0.225791352644727432363097614947 /* log(sqrt(pi/2)) == log(pi/2)/2 */ #endif #ifdef MATHLIB_STANDALONE # ifndef R_EXT_BOOLEAN_H_ /* "copy-paste" R_ext/Boolean.h if not already included: */ #define R_EXT_BOOLEAN_H_ #undef FALSE #undef TRUE typedef enum { FALSE = 0, TRUE } Rboolean; # endif #else # include <R_ext/Boolean.h> #endif #if !defined(MATHLIB_STANDALONE) && !defined(R_NO_REMAP_RMATH) #define bessel_i Rf_bessel_i #define bessel_j Rf_bessel_j #define bessel_k Rf_bessel_k #define bessel_y Rf_bessel_y #define bessel_i_ex Rf_bessel_i_ex #define bessel_j_ex Rf_bessel_j_ex #define bessel_k_ex Rf_bessel_k_ex #define bessel_y_ex Rf_bessel_y_ex #define beta Rf_beta #define choose Rf_choose #define dbeta Rf_dbeta #define dbinom Rf_dbinom #define dbinom_raw Rf_dbinom_raw #define dcauchy Rf_dcauchy #define dchisq Rf_dchisq #define dexp Rf_dexp #define df Rf_df #define dgamma Rf_dgamma #define dgeom Rf_dgeom #define dhyper Rf_dhyper #define digamma Rf_digamma #define dlnorm Rf_dlnorm #define dlogis Rf_dlogis #define dnbeta Rf_dnbeta #define dnbinom Rf_dnbinom #define dnbinom_mu Rf_dnbinom_mu #define dnchisq Rf_dnchisq #define dnf Rf_dnf #define dnorm4 Rf_dnorm4 #define dnt Rf_dnt #define dpois_raw Rf_dpois_raw #define dpois Rf_dpois #define dpsifn Rf_dpsifn #define dsignrank Rf_dsignrank #define dt Rf_dt #define dtukey Rf_dtukey #define dunif Rf_dunif #define dweibull Rf_dweibull #define dwilcox Rf_dwilcox #define fmax2 Rf_fmax2 #define fmin2 Rf_fmin2 #define fprec Rf_fprec #define fround Rf_fround #define ftrunc Rf_ftrunc #define fsign Rf_fsign #define gammafn Rf_gammafn #define imax2 Rf_imax2 #define imin2 Rf_imin2 #define lbeta Rf_lbeta #define lchoose Rf_lchoose #define lgammafn Rf_lgammafn #define lgammafn_sign Rf_lgammafn_sign #define lgamma1p Rf_lgamma1p #define log1pexp Rf_log1pexp #define log1pmx Rf_log1pmx #define logspace_add Rf_logspace_add #define logspace_sub Rf_logspace_sub #define logspace_sum Rf_logspace_sum #define pbeta Rf_pbeta #define pbeta_raw Rf_pbeta_raw #define pbinom Rf_pbinom #define pcauchy Rf_pcauchy #define pchisq Rf_pchisq #define pentagamma Rf_pentagamma #define pexp Rf_pexp #define pf Rf_pf #define pgamma Rf_pgamma #define pgeom Rf_pgeom #define phyper Rf_phyper #define plnorm Rf_plnorm #define plogis Rf_plogis #define pnbeta Rf_pnbeta #define pnbinom Rf_pnbinom #define pnbinom_mu Rf_pnbinom_mu #define pnchisq Rf_pnchisq #define pnf Rf_pnf #define pnorm5 Rf_pnorm5 #define pnorm_both Rf_pnorm_both #define pnt Rf_pnt #define ppois Rf_ppois #define psignrank Rf_psignrank #define psigamma Rf_psigamma #define pt Rf_pt #define ptukey Rf_ptukey #define punif Rf_punif #define pythag Rf_pythag #define pweibull Rf_pweibull #define pwilcox Rf_pwilcox #define qbeta Rf_qbeta #define qbinom Rf_qbinom #define qcauchy Rf_qcauchy #define qchisq Rf_qchisq #define qchisq_appr Rf_qchisq_appr #define qexp Rf_qexp #define qf Rf_qf #define qgamma Rf_qgamma #define qgeom Rf_qgeom #define qhyper Rf_qhyper #define qlnorm Rf_qlnorm #define qlogis Rf_qlogis #define qnbeta Rf_qnbeta #define qnbinom Rf_qnbinom #define qnbinom_mu Rf_qnbinom_mu #define qnchisq Rf_qnchisq #define qnf Rf_qnf #define qnorm5 Rf_qnorm5 #define qnt Rf_qnt #define qpois Rf_qpois #define qsignrank Rf_qsignrank #define qt Rf_qt #define qtukey Rf_qtukey #define qunif Rf_qunif #define qweibull Rf_qweibull #define qwilcox Rf_qwilcox #define rbeta Rf_rbeta #define rbinom Rf_rbinom #define rcauchy Rf_rcauchy #define rchisq Rf_rchisq #define rexp Rf_rexp #define rf Rf_rf #define rgamma Rf_rgamma #define rgeom Rf_rgeom #define rhyper Rf_rhyper #define rlnorm Rf_rlnorm #define rlogis Rf_rlogis #define rmultinom Rf_rmultinom #define rnbeta Rf_rnbeta #define rnbinom Rf_rnbinom #define rnbinom_mu Rf_rnbinom_mu #define rnchisq Rf_rnchisq #define rnf Rf_rnf #define rnorm Rf_rnorm #define rnt Rf_rnt #define rpois Rf_rpois #define rsignrank Rf_rsignrank #define rt Rf_rt #define rtukey Rf_rtukey #define runif Rf_runif #define rweibull Rf_rweibull #define rwilcox Rf_rwilcox #define sign Rf_sign #define tetragamma Rf_tetragamma #define trigamma Rf_trigamma #endif #define dnorm dnorm4 #define pnorm pnorm5 #define qnorm qnorm5 #ifdef __cplusplus extern "C" { #endif /* R's versions with !R_FINITE checks */ double R_pow(double x, double y); double R_pow_di(double, int); /* Random Number Generators */ double norm_rand(void); double unif_rand(void); double exp_rand(void); #ifdef MATHLIB_STANDALONE void set_seed(unsigned int, unsigned int); void get_seed(unsigned int *, unsigned int *); #endif /* Normal Distribution */ double dnorm(double, double, double, int); double pnorm(double, double, double, int, int); double qnorm(double, double, double, int, int); double rnorm(double, double); void pnorm_both(double, double *, double *, int, int);/* both tails */ /* Uniform Distribution */ double dunif(double, double, double, int); double punif(double, double, double, int, int); double qunif(double, double, double, int, int); double runif(double, double); /* Gamma Distribution */ double dgamma(double, double, double, int); double pgamma(double, double, double, int, int); double qgamma(double, double, double, int, int); double rgamma(double, double); double log1pmx(double); double log1pexp(double); // <-- ../nmath/plogis.c double lgamma1p(double); double logspace_add(double, double); double logspace_sub(double, double); double logspace_sum(const double *, int); /* Beta Distribution */ double dbeta(double, double, double, int); double pbeta(double, double, double, int, int); double qbeta(double, double, double, int, int); double rbeta(double, double); /* Lognormal Distribution */ double dlnorm(double, double, double, int); double plnorm(double, double, double, int, int); double qlnorm(double, double, double, int, int); double rlnorm(double, double); /* Chi-squared Distribution */ double dchisq(double, double, int); double pchisq(double, double, int, int); double qchisq(double, double, int, int); double rchisq(double); /* Non-central Chi-squared Distribution */ double dnchisq(double, double, double, int); double pnchisq(double, double, double, int, int); double qnchisq(double, double, double, int, int); double rnchisq(double, double); /* F Distibution */ double df(double, double, double, int); double pf(double, double, double, int, int); double qf(double, double, double, int, int); double rf(double, double); /* Student t Distibution */ double dt(double, double, int); double pt(double, double, int, int); double qt(double, double, int, int); double rt(double); /* Binomial Distribution */ double dbinom_raw(double x, double n, double p, double q, int give_log); double dbinom(double, double, double, int); double pbinom(double, double, double, int, int); double qbinom(double, double, double, int, int); double rbinom(double, double); /* Multnomial Distribution */ void rmultinom(int, double*, int, int*); /* Cauchy Distribution */ double dcauchy(double, double, double, int); double pcauchy(double, double, double, int, int); double qcauchy(double, double, double, int, int); double rcauchy(double, double); /* Exponential Distribution */ double dexp(double, double, int); double pexp(double, double, int, int); double qexp(double, double, int, int); double rexp(double); /* Geometric Distribution */ double dgeom(double, double, int); double pgeom(double, double, int, int); double qgeom(double, double, int, int); double rgeom(double); /* Hypergeometric Distibution */ double dhyper(double, double, double, double, int); double phyper(double, double, double, double, int, int); double qhyper(double, double, double, double, int, int); double rhyper(double, double, double); /* Negative Binomial Distribution */ double dnbinom(double, double, double, int); double pnbinom(double, double, double, int, int); double qnbinom(double, double, double, int, int); double rnbinom(double, double); double dnbinom_mu(double, double, double, int); double pnbinom_mu(double, double, double, int, int); double qnbinom_mu(double, double, double, int, int); double rnbinom_mu(double, double); /* Poisson Distribution */ double dpois_raw (double, double, int); double dpois(double, double, int); double ppois(double, double, int, int); double qpois(double, double, int, int); double rpois(double); /* Weibull Distribution */ double dweibull(double, double, double, int); double pweibull(double, double, double, int, int); double qweibull(double, double, double, int, int); double rweibull(double, double); /* Logistic Distribution */ double dlogis(double, double, double, int); double plogis(double, double, double, int, int); double qlogis(double, double, double, int, int); double rlogis(double, double); /* Non-central Beta Distribution */ double dnbeta(double, double, double, double, int); double pnbeta(double, double, double, double, int, int); double qnbeta(double, double, double, double, int, int); double rnbeta(double, double, double); /* Non-central F Distribution */ double dnf(double, double, double, double, int); double pnf(double, double, double, double, int, int); double qnf(double, double, double, double, int, int); /* Non-central Student t Distribution */ double dnt(double, double, double, int); double pnt(double, double, double, int, int); double qnt(double, double, double, int, int); /* Studentized Range Distribution */ double ptukey(double, double, double, double, int, int); double qtukey(double, double, double, double, int, int); /* Wilcoxon Rank Sum Distribution */ double dwilcox(double, double, double, int); double pwilcox(double, double, double, int, int); double qwilcox(double, double, double, int, int); double rwilcox(double, double); /* Wilcoxon Signed Rank Distribution */ double dsignrank(double, double, int); double psignrank(double, double, int, int); double qsignrank(double, double, int, int); double rsignrank(double); /* Gamma and Related Functions */ double gammafn(double); double lgammafn(double); double lgammafn_sign(double, int*); void dpsifn(double, int, int, int, double*, int*, int*); double psigamma(double, double); double digamma(double); double trigamma(double); double tetragamma(double); double pentagamma(double); double beta(double, double); double lbeta(double, double); double choose(double, double); double lchoose(double, double); /* Bessel Functions */ double bessel_i(double, double, double); double bessel_j(double, double); double bessel_k(double, double, double); double bessel_y(double, double); double bessel_i_ex(double, double, double, double *); double bessel_j_ex(double, double, double *); double bessel_k_ex(double, double, double, double *); double bessel_y_ex(double, double, double *); /* General Support Functions */ #ifndef HAVE_HYPOT double hypot(double, double); #endif double pythag(double, double); #ifndef HAVE_EXPM1 double expm1(double); /* = exp(x)-1 {care for small x} */ #endif #ifndef HAVE_LOG1P double log1p(double); /* = log(1+x) {care for small x} */ #endif int imax2(int, int); int imin2(int, int); double fmax2(double, double); double fmin2(double, double); double sign(double); double fprec(double, double); double fround(double, double); double fsign(double, double); double ftrunc(double); double log1pmx(double); /* Accurate log(1+x) - x, {care for small x} */ double lgamma1p(double);/* accurate log(gamma(x+1)), small x (0 < x < 0.5) */ /* More accurate cos(pi*x), sin(pi*x), tan(pi*x) In future these declarations could clash with system headers if someone had already included math.h with __STDC_WANT_IEC_60559_FUNCS_EXT__ defined. We can add a check for that via the value of __STDC_IEC_60559_FUNCS__ (>= 201ymmL, exact value not yet known). */ double cospi(double); double sinpi(double); double tanpi(double); /* Compute the log of a sum or difference from logs of terms, i.e., * * log (exp (logx) + exp (logy)) * or log (exp (logx) - exp (logy)) * * without causing overflows or throwing away too much accuracy: */ double logspace_add(double logx, double logy); double logspace_sub(double logx, double logy); /* ----------------- Private part of the header file ------------------- */ /* old-R Compatibility */ #ifdef OLD_RMATH_COMPAT # define snorm norm_rand # define sunif unif_rand # define sexp exp_rand #endif #if defined(MATHLIB_STANDALONE) && !defined(MATHLIB_PRIVATE_H) /* second is defined by nmath.h */ /* If isnan is a macro, as C99 specifies, the C++ math header will undefine it. This happens on macOS */ # ifdef __cplusplus int R_isnancpp(double); /* in mlutils.c */ # define ISNAN(x) R_isnancpp(x) # else # define ISNAN(x) (isnan(x)!=0) # endif # define R_FINITE(x) R_finite(x) int R_finite(double); # ifdef _WIN32 /* not Win32 as no config information */ # ifdef RMATH_DLL # define R_EXTERN extern __declspec(dllimport) # else # define R_EXTERN extern # endif R_EXTERN double NA_REAL; R_EXTERN double R_PosInf; R_EXTERN double R_NegInf; R_EXTERN int N01_kind; # undef R_EXTERN #else extern int N01_kind; # endif #endif /* MATHLIB_STANDALONE */ #ifdef __cplusplus } #endif #endif /* RMATH_H */ |
Added undroid/Rtcl/compat/R/Rversion.h.
> > > > > > > > > > > > > > > > > > > > > > > > > | 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 | /* Rversion.h. Generated automatically. */ #ifndef R_VERSION_H #define R_VERSION_H #ifdef __cplusplus extern "C" { #endif #define R_VERSION 197379 #define R_NICK "Another Canoe" #define R_Version(v,p,s) (((v) * 65536) + ((p) * 256) + (s)) #define R_MAJOR "3" #define R_MINOR "3.3" #define R_STATUS "" #define R_YEAR "2017" #define R_MONTH "03" #define R_DAY "06" #define R_SVN_REVISION 72310 #define R_FILEVERSION 3,33,72310,0 #ifdef __cplusplus } #endif #endif /* not R_VERSION_H */ |
Added undroid/Rtcl/compat/R/S.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka * Copyright (C) 1997--2016 The R Core Team. * * This header file is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This file is part of R. R is distributed under the terms of the * GNU General Public License, either Version 2, June 1991 or Version 3, * June 2007. See doc/COPYRIGHTS for details of the copyright status of R. * * 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 Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, a copy is available at * https://www.R-project.org/Licenses/ * * Much of this is from Doug Bates. */ /* This is a legacy header and no longer documented. Code using it should be converted to use R.h */ /* This header includes C headers and so is not safe for inclusion from C++: use R.h instead. */ #ifndef R_S_H #define R_S_H #ifndef USING_R # define USING_R /* is this a good idea? - conflicts with many versions of f2c.h */ # define longint int #endif #ifdef __cplusplus # error S.h can not be used from C++ code: use R.h instead #endif #include <stddef.h> #include <stdlib.h> #include <stdio.h> #include <limits.h> #include <float.h> #include <math.h> #include <Rconfig.h> #include <R_ext/Constants.h> #include <R_ext/Memory.h> /* S_alloc */ /* subset of those in Random.h */ extern void seed_in(long *); extern void seed_out(long *); extern double unif_rand(void); extern double norm_rand(void); /* Macros for S/R Compatibility */ #include <R_ext/RS.h> /* for PROBLEM ... Calloc, Realloc, Free, Memcpy, F77_xxxx */ /* S4 uses macros equivalent to */ #define Salloc(n,t) (t*)S_alloc(n, sizeof(t)) #define Srealloc(p,n,old,t) (t*)S_realloc(p,n,old,sizeof(t)) /* S's complex is different, and is a define to S_complex now */ typedef struct { double re; double im; } S_complex; #ifdef S_OLD_COMPLEX # define complex S_complex #endif #ifndef NO_CALL_R /* Not quite full compatibility: beware! */ /* void call_R(char*, long, void**, char**, long*, char**, long, char**);*/ #define call_S call_R #endif #endif /* !R_S_H */ |
Added undroid/Rtcl/compat/libR_dl.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | #ifndef _LIBR_DL_H #define _LIBR_DL_H typedef SEXP (*fn_CAR)(SEXP e); typedef SEXP (*fn_CDR)(SEXP e); typedef int *(*fn_INTEGER)(SEXP e); typedef int (*fn_LENGTH)(SEXP e); typedef int *(*fn_LOGICAL)(SEXP e); typedef const char *(*fn_R_CHAR)(SEXP e); typedef double *(*fn_REAL)(SEXP e); typedef SEXP (*fn_Rf_allocVector)(SEXPTYPE t, R_xlen_t i); typedef SEXP (*fn_Rf_eval)(SEXP e, SEXP f); typedef int (*fn_Rf_initEmbeddedR)(int argc, char *argv[]); typedef SEXP (*fn_Rf_install)(const char *str); typedef SEXP (*fn_Rf_lang1)(SEXP e); typedef SEXP (*fn_Rf_lang2)(SEXP e, SEXP f); typedef R_len_t (*fn_Rf_length)(SEXP e); typedef SEXP (*fn_Rf_mkChar)(const char *str); typedef SEXP (*fn_Rf_mkString)(const char *str); typedef void (*fn_Rf_PrintValue)(SEXP e); typedef SEXP (*fn_Rf_protect)(SEXP e); typedef void (*fn_Rf_unprotect)(int i); /* extern SEXP: R_GlobalEnv */ /* extern SEXP: R_NilValue */ typedef SEXP (*fn_R_ParseVector)(SEXP e, int i, ParseStatus *s, SEXP f); typedef SEXP (*fn_R_tryEval)(SEXP e, SEXP f, int *i); typedef SEXP (*fn_SET_STRING_ELT)(SEXP e, R_xlen_t i, SEXP f); typedef SEXP (*fn_STRING_ELT)(SEXP e, R_xlen_t i); typedef SEXP *(*fn_STRING_PTR)(SEXP e); typedef int (*fn_TYPEOF)(SEXP e); typedef SEXP (*fn_VECTOR_ELT)(SEXP e, R_xlen_t i); struct libR_dl { fn_CAR m_CAR; fn_CDR m_CDR; fn_INTEGER m_INTEGER; fn_LENGTH m_LENGTH; fn_LOGICAL m_LOGICAL; fn_R_CHAR m_R_CHAR; fn_REAL m_REAL; fn_Rf_allocVector m_Rf_allocVector; fn_Rf_eval m_Rf_eval; fn_Rf_initEmbeddedR m_Rf_initEmbeddedR; fn_Rf_install m_Rf_install; fn_Rf_lang1 m_Rf_lang1; fn_Rf_lang2 m_Rf_lang2; fn_Rf_length m_Rf_length; fn_Rf_mkChar m_Rf_mkChar; fn_Rf_mkString m_Rf_mkString; fn_Rf_PrintValue m_Rf_PrintValue; fn_Rf_protect m_Rf_protect; fn_Rf_unprotect m_Rf_unprotect; SEXP *m_R_GlobalEnv; SEXP *m_R_NilValue; fn_R_ParseVector m_R_ParseVector; fn_R_tryEval m_R_tryEval; fn_SET_STRING_ELT m_SET_STRING_ELT; fn_STRING_ELT m_STRING_ELT; fn_STRING_PTR m_STRING_PTR; fn_TYPEOF m_TYPEOF; fn_VECTOR_ELT m_VECTOR_ELT; }; extern struct libR_dl libR_dl; #define CAR libR_dl.m_CAR #define CDR libR_dl.m_CDR #define INTEGER libR_dl.m_INTEGER #define LENGTH libR_dl.m_LENGTH #define LOGICAL libR_dl.m_LOGICAL #define R_CHAR libR_dl.m_R_CHAR #define REAL libR_dl.m_REAL #define Rf_allocVector libR_dl.m_Rf_allocVector #define Rf_eval libR_dl.m_Rf_eval #define Rf_initEmbeddedR libR_dl.m_Rf_initEmbeddedR #define Rf_install libR_dl.m_Rf_install #define Rf_lang1 libR_dl.m_Rf_lang1 #define Rf_lang2 libR_dl.m_Rf_lang2 #define Rf_length libR_dl.m_Rf_length #define Rf_mkChar libR_dl.m_Rf_mkChar #define Rf_mkString libR_dl.m_Rf_mkString #define Rf_PrintValue libR_dl.m_Rf_PrintValue #define Rf_protect libR_dl.m_Rf_protect #define Rf_unprotect libR_dl.m_Rf_unprotect #define R_GlobalEnv *libR_dl.m_R_GlobalEnv #define R_NilValue *libR_dl.m_R_NilValue #define R_ParseVector libR_dl.m_R_ParseVector #define R_tryEval libR_dl.m_R_tryEval #define SET_STRING_ELT libR_dl.m_SET_STRING_ELT #define STRING_ELT libR_dl.m_STRING_ELT #define STRING_PTR libR_dl.m_STRING_PTR #define TYPEOF libR_dl.m_TYPEOF #define VECTOR_ELT libR_dl.m_VECTOR_ELT #endif /* _LIBR_DL_H */ |
Added undroid/Rtcl/configure.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 8187 8188 8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 8204 8205 8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 8231 8232 8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 8248 8249 8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 8270 8271 8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 8315 8316 8317 8318 8319 8320 8321 8322 8323 8324 8325 8326 8327 8328 8329 8330 8331 8332 8333 8334 8335 8336 8337 8338 8339 8340 8341 8342 8343 8344 8345 8346 8347 8348 8349 8350 8351 8352 8353 8354 8355 8356 8357 8358 8359 8360 8361 8362 8363 8364 8365 8366 8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385 8386 8387 8388 8389 8390 8391 8392 8393 8394 8395 8396 8397 8398 8399 8400 8401 8402 8403 8404 8405 8406 8407 8408 8409 8410 8411 8412 8413 8414 8415 8416 8417 8418 8419 8420 8421 8422 8423 8424 8425 8426 8427 8428 8429 8430 8431 8432 8433 8434 8435 8436 8437 8438 8439 8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458 8459 8460 8461 8462 8463 8464 8465 8466 8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480 8481 8482 8483 8484 8485 8486 8487 8488 8489 8490 8491 8492 8493 8494 8495 8496 8497 8498 8499 8500 8501 8502 8503 8504 8505 8506 8507 8508 8509 8510 8511 8512 8513 8514 8515 8516 8517 8518 8519 8520 8521 8522 8523 8524 8525 8526 8527 8528 8529 8530 8531 8532 8533 8534 8535 8536 8537 8538 8539 8540 8541 8542 8543 8544 8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 8638 8639 8640 8641 8642 8643 8644 8645 8646 8647 8648 8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665 8666 8667 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 8679 8680 8681 8682 8683 8684 8685 8686 8687 8688 8689 8690 8691 8692 8693 8694 8695 8696 8697 8698 8699 8700 8701 8702 8703 8704 8705 8706 8707 8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726 8727 8728 8729 8730 8731 8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 8883 8884 8885 8886 8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902 8903 8904 8905 8906 8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928 8929 8930 8931 8932 8933 8934 8935 8936 8937 8938 8939 8940 8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 8980 8981 8982 8983 8984 8985 8986 8987 8988 8989 8990 8991 8992 8993 8994 8995 8996 8997 8998 8999 9000 9001 9002 9003 9004 9005 9006 9007 9008 9009 9010 9011 9012 9013 9014 9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029 9030 9031 9032 9033 9034 9035 9036 9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058 9059 9060 9061 9062 9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079 9080 9081 9082 9083 9084 9085 9086 9087 9088 9089 9090 9091 9092 9093 9094 9095 9096 9097 9098 9099 9100 9101 9102 9103 9104 9105 9106 9107 9108 9109 9110 9111 9112 9113 9114 9115 9116 9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143 9144 9145 9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228 9229 9230 9231 9232 9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249 9250 9251 9252 9253 9254 9255 9256 9257 9258 9259 9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281 9282 9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296 9297 9298 9299 9300 9301 9302 9303 9304 9305 9306 9307 9308 9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698 9699 9700 9701 9702 9703 9704 9705 9706 9707 9708 9709 9710 9711 9712 9713 9714 9715 9716 9717 9718 9719 9720 9721 9722 9723 9724 9725 9726 9727 9728 9729 9730 9731 9732 9733 9734 9735 9736 9737 9738 9739 9740 9741 9742 9743 9744 9745 9746 9747 9748 | #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for Rtcl 1.1. # # # 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" 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'" test -n "$DJDIR" || exec 7<&0 </dev/null exec 6>&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='Rtcl' PACKAGE_TARNAME='rtcl' PACKAGE_VERSION='1.1' PACKAGE_STRING='Rtcl 1.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif #ifdef STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else # ifdef HAVE_STDLIB_H # include <stdlib.h> # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif #ifdef HAVE_STRINGS_H # include <strings.h> #endif #ifdef HAVE_INTTYPES_H # include <inttypes.h> #endif #ifdef HAVE_STDINT_H # include <stdint.h> #endif #ifdef HAVE_UNISTD_H # include <unistd.h> #endif" ac_subst_vars='LTLIBOBJS LIBOBJS 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 CC_OBJNAME CFLAGS_WARNING CFLAGS_OPTIMIZE CFLAGS_DEBUG RC CELIB_DIR AR SHARED_BUILD TCL_THREADS TCL_INCLUDES PKG_OBJECTS PKG_SOURCES MATH_LIBS EGREP GREP RANLIB SET_MAKE INSTALL_SCRIPT INSTALL_PROGRAM INSTALL_DATA INSTALL CPP TCL_SHLIB_LD_LIBS TCL_LD_FLAGS TCL_EXTRA_CFLAGS TCL_DEFS TCL_LIBS CLEANFILES OBJEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC 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 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 with_tcl with_tclinclude enable_threads enable_shared enable_64bit enable_64bit_vis enable_rpath enable_wince with_celib enable_symbols ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # 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 Rtcl 1.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --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/rtcl] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Rtcl 1.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --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) 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-tclinclude directory containing the public Tcl header files --with-celib=DIR use Windows/CE support library from DIR Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to 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 Rtcl configure 1.1 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 <limits.h> declares $2. For example, HP-UX 11i <limits.h> declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer <limits.h> to <assert.h> if __STDC__ is defined, since <limits.h> exists even on freestanding compilers. */ #ifdef __STDC__ # include <limits.h> #else # include <assert.h> #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 Rtcl $as_me 1.1, 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 #-------------------------------------------------------------------- # 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. #-------------------------------------------------------------------- # 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 # If the user did not set CFLAGS, set it now to keep macros # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2". if test "${CFLAGS+set}" != "set" ; then CFLAGS="" 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 # Maybe we are cross-compiling.... case ${host_alias} in *mingw32*) EXEEXT=".exe" TEA_PLATFORM="windows" ;; *) EXEEXT="" TEA_PLATFORM="unix" ;; esac ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5 $as_echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;} # 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_... 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. #-------------------------------------------------------------------- # 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` \ `ls -d /usr/lib/tcl8.6 2>/dev/null` \ `ls -d /usr/lib/tcl8.5 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. Use --with-tcl to specify a directory containing tclConfig.sh" "$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 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 <stdio.h> 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 <stdarg.h> #include <stdio.h> 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 { $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}\"" { $as_echo "$as_me:${as_lineno-$LINENO}: checking platform" >&5 $as_echo_n "checking platform... " >&6; } hold_cc=$CC; CC="$TCL_CC" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifdef _WIN32 #error win32 #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : TEA_PLATFORM="unix" else TEA_PLATFORM="windows" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CC=$hold_cc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEA_PLATFORM" >&5 $as_echo "$TEA_PLATFORM" >&6; } # The BUILD_$pkg is to define the correct extern storage class # handling when making this package cat >>confdefs.h <<_ACEOF #define BUILD_${PACKAGE_NAME} /**/ _ACEOF # Do this here as we have fully defined TEA_PLATFORM now if test "${TEA_PLATFORM}" = "windows" ; then EXEEXT=".exe" CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp" fi # TEA specific: #----------------------------------------------------------------------- # 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 and a few others to create the basic setup # necessary to compile executables. #----------------------------------------------------------------------- # 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. 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 { $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 <stdarg.h> #include <stdio.h> 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 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 <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> 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 <limits.h> #else # include <assert.h> #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 <ac_nonexistent.h> _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 <limits.h> to <assert.h> if __STDC__ is defined, since # <limits.h> 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 <limits.h> #else # include <assert.h> #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 <ac_nonexistent.h> _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 INSTALL="\$(SHELL) \$(srcdir)/tclconfig/install-sh -c" INSTALL_DATA="\${INSTALL} -m 644" INSTALL_PROGRAM="\${INSTALL}" INSTALL_SCRIPT="\${INSTALL}" #-------------------------------------------------------------------- # 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 <stdlib.h> #include <stdarg.h> #include <string.h> #include <float.h> 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 <string.h> _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 <stdlib.h> _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 <ctype.h> #include <stdlib.h> #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 <sys/types.h> #include <sys/param.h> 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 <sys/types.h> #include <sys/param.h> 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 <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <limits.h> 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 <limits.h> 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 <sys/types.h> #include <dirent.h> 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 <stdlib.h> _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 <stdlib.h> _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 <stdlib.h> _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 <string.h> _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 <string.h> _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 #----------------------------------------------------------------------- # __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. #----------------------------------------------------------------------- vars="rtcl.c" 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" -a ! -f "${srcdir}/sdl/$i" \ ; then as_fn_error $? "could not find source file '$i'" "$LINENO" 5 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 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 header file '${srcdir}/$i'" "$LINENO" 5 fi PKG_HEADERS="$PKG_HEADERS $i" done 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 -Icompat -Icompat/R" 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" -a ! -f "${srcdir}/sdl/$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__ # 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 #-------------------------------------------------------------------- # __CHANGE__ # A few miscellaneous platform-specific items: # # Define a special symbol for Windows (BUILD_Tktable 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 extra compiler/build info here. #-------------------------------------------------------------------- CLEANFILES="$CLEANFILES pkgIndex.tcl" #-------------------------------------------------------------------- # 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. #-------------------------------------------------------------------- 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 # 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 $as_echo "#define HAVE_HIDDEN 1" >>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 if test "$GCC" = yes; then : CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall" else CFLAGS_OPTIMIZE=-O CFLAGS_WARNING="" fi CC_OBJNAME="-o \$@" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${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}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 fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${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="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 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 if test "x$ac_ct_AR" = x; then AR="" 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 else AR="$ac_cv_prog_AR" 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 "$GCC" != "yes" -a ! -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 if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; 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_RC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RC"; then ac_cv_prog_RC="$RC" # 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_RC="${ac_tool_prefix}windres" $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 RC=$ac_cv_prog_RC if test -n "$RC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5 $as_echo "$RC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RC"; then ac_ct_RC=$RC # Extract the first word of "windres", so it can be a program name with args. set dummy windres; 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_RC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RC"; then ac_cv_prog_ac_ct_RC="$ac_ct_RC" # 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_RC="windres" $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_RC=$ac_cv_prog_ac_ct_RC if test -n "$ac_ct_RC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RC" >&5 $as_echo "$ac_ct_RC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RC" = x; then RC="" 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 RC=$ac_ct_RC fi else RC="$ac_cv_prog_RC" fi 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}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compile version of gcc" >&5 $as_echo_n "checking for cross-compile version of gcc... " >&6; } if ${ac_cv_cross+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef _WIN32 #error cross-compiler #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_cross=yes else ac_cv_cross=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cross" >&5 $as_echo "$ac_cv_cross" >&6; } if test "$ac_cv_cross" = "yes"; then case "$do64bit" in amd64|x64|yes) CC="x86_64-w64-mingw32-gcc" LD="x86_64-w64-mingw32-ld" AR="x86_64-w64-mingw32-ar" RANLIB="x86_64-w64-mingw32-ranlib" RC="x86_64-w64-mingw32-windres" ;; *) CC="i686-w64-mingw32-gcc" LD="i686-w64-mingw32-ld" AR="i686-w64-mingw32-ar" RANLIB="i686-w64-mingw32-ranlib" RC="i686-w64-mingw32-windres" ;; esac fi 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" CFLAGS_DEBUG="${CFLAGS_DEBUG} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" CC_OBJNAME="-Fo\$@" 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" EXEEXT=".exe" do64bit_ok=yes 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 -Wl,-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*|GNU*|NetBSD-Debian) 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}' # workaround when cross-compiling for Win32: no -fPIC and -Wl,... if test "${TCL_SHLIB_SUFFIX}" = ".dll" ; then SHLIB_CFLAGS="" SHLIB_SUFFIX=".dll" DL_OBJS="" DL_LIBS="" TCL_LIB_VERSIONS_OK=nodots SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' else LDFLAGS="$LDFLAGS -Wl,--export-dynamic" fi 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 ;; 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-*) arch=`arch -s` case "$arch" in alpha|sparc64) SHLIB_CFLAGS="-fPIC" ;; *) SHLIB_CFLAGS="-fpic" ;; esac 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}' LDFLAGS="-Wl,-export-dynamic" CFLAGS_OPTIMIZE="-O2" if test "${TCL_THREADS}" = "1"; then : # On OpenBSD: Compile with -pthread # Don't link with -lpthread LIBS=`echo $LIBS | sed s/-lpthread//` CFLAGS="$CFLAGS -pthread" fi # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; NetBSD-*) # NetBSD 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 ;; FreeBSD-*) # This configuration from FreeBSD Ports. SHLIB_CFLAGS="-fPIC" SHLIB_LD="${CC} -shared" TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$@" TK_SHLIB_LD_EXTRAS="-Wl,-soname,\$@" SHLIB_SUFFIX=".so" LDFLAGS="" if test $doRpath = yes; then : CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-Wl,-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 case $system in FreeBSD-3.*) # 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}.so' TCL_LIB_VERSIONS_OK=nodots ;; esac ;; 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 compatibility 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 <X11/Xlib.h> 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 <tk.h> 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 ;; UNIX_SV* | UnixWare-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld accepts -Bexport flag" >&5 $as_echo_n "checking for ld accepts -Bexport flag... " >&6; } if ${tcl_cv_ld_Bexport+:} false; then : $as_echo_n "(cached) " >&6 else hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" 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_Bexport=yes else tcl_cv_ld_Bexport=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_Bexport" >&5 $as_echo "$tcl_cv_ld_Bexport" >&6; } if test $tcl_cv_ld_Bexport = yes; then : LDFLAGS="$LDFLAGS -Wl,-Bexport" fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; 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_*|MINGW32_*) ;; 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 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 if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEH support in compiler" >&5 $as_echo_n "checking for SEH support in compiler... " >&6; } if ${tcl_cv_seh+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : tcl_cv_seh=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include <windows.h> #undef WIN32_LEAN_AND_MEAN int main(int argc, char** argv) { int a, b = 0; __try { a = 666 / b; } __except (EXCEPTION_EXECUTE_HANDLER) { return 0; } return 1; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : tcl_cv_seh=yes else tcl_cv_seh=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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_seh" >&5 $as_echo "$tcl_cv_seh" >&6; } if test "$tcl_cv_seh" = "no" ; then $as_echo "#define HAVE_NO_SEH 1" >>confdefs.h fi # # Check to see if the excpt.h include file provided contains the # definition for EXCEPTION_DISPOSITION; if not, which is the case # with Cygwin's version as of 2002-04-10, define it to be int, # sufficient for getting the current code to work. # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXCEPTION_DISPOSITION support in include files" >&5 $as_echo_n "checking for EXCEPTION_DISPOSITION support in include files... " >&6; } if ${tcl_cv_eh_disposition+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define WIN32_LEAN_AND_MEAN # include <windows.h> # undef WIN32_LEAN_AND_MEAN int main () { EXCEPTION_DISPOSITION x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_eh_disposition=yes else tcl_cv_eh_disposition=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_eh_disposition" >&5 $as_echo "$tcl_cv_eh_disposition" >&6; } if test "$tcl_cv_eh_disposition" = "no" ; then $as_echo "#define EXCEPTION_DISPOSITION int" >>confdefs.h fi # Check to see if winnt.h defines CHAR, SHORT, and LONG # even if VOID has already been #defined. The win32api # used by mingw and cygwin is known to do this. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for winnt.h that ignores VOID define" >&5 $as_echo_n "checking for winnt.h that ignores VOID define... " >&6; } if ${tcl_cv_winnt_ignore_void+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define VOID void #define WIN32_LEAN_AND_MEAN #include <windows.h> #undef WIN32_LEAN_AND_MEAN int main () { CHAR c; SHORT s; LONG l; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_winnt_ignore_void=yes else tcl_cv_winnt_ignore_void=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_winnt_ignore_void" >&5 $as_echo "$tcl_cv_winnt_ignore_void" >&6; } if test "$tcl_cv_winnt_ignore_void" = "yes" ; then $as_echo "#define HAVE_WINNT_IGNORE_VOID 1" >>confdefs.h fi fi # See if the compiler supports casting to a union type. # This is used to stop gcc from printing a compiler # warning when initializing a union member. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5 $as_echo_n "checking for cast to union support... " >&6; } if ${tcl_cv_cast_to_union+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { union foo { int i; double d; }; union foo f = (union foo) (int) 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : tcl_cv_cast_to_union=yes else tcl_cv_cast_to_union=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5 $as_echo "$tcl_cv_cast_to_union" >&6; } if test "$tcl_cv_cast_to_union" = "yes"; then $as_echo "#define HAVE_CAST_TO_UNION 1" >>confdefs.h 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 <stdlib.h> 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 <stdlib.h> 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 <sys/stat.h> 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 <sys/stat.h> 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 <sys/stat.h> 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 <sys/stat.h> 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 <sys/types.h> #include <dirent.h> 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 <sys/stat.h> 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 <sys/types.h> 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} -DNDEBUG" 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. #-------------------------------------------------------------------- $as_echo "#define USE_TCL_STUBS 1" >>confdefs.h #-------------------------------------------------------------------- # 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="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi" VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi" MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}" # Don't clean .manifest provided by the package (see TEA_ADD_MANIFEST) # or one created by Makefile or configure. Could use the /manifest:filename # linker option to explicitly set the linker-generated filename. eval eval "manifest=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}.manifest" CLEANFILES="$CLEANFILES $manifest" fi rm -f conftest* MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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. if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" if test "$GCC" = "yes"; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" fi eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" if test "$GCC" = "yes"; then PKG_LIB_FILE=lib${PKG_LIB_FILE} fi 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 #-------------------------------------------------------------------- # Determine the name of the tclsh and/or wish executables in the # Tcl and Tk build directories or the location they were installed # into. These paths are used to support running test cases only, # the Makefile should not be making use of these paths to generate # a pkgIndex.tcl file or anything else at extension build time. #-------------------------------------------------------------------- { $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; } #-------------------------------------------------------------------- # 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 th AC variables in. Include these here. #-------------------------------------------------------------------- ac_config_files="$ac_config_files Makefile pkgIndex.tcl" 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}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.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 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 Rtcl $as_me 1.1, 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 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _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 Configuration files: $config_files 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="\\ Rtcl config.status 1.1 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' 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;; --he | --h | --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 _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 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "pkgIndex.tcl") CONFIG_FILES="$CONFIG_FILES pkgIndex.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 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 2>/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 ' <conf$$subs.awk | sed ' /^[^""]/{ N s/\n// } ' >>$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" eval set X " :F $CONFIG_FILES " 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 # _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 $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 ;; 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 |
Added undroid/Rtcl/configure.ac.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | #!/bin/bash -norc dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tcl installation dnl to configure the system for the local environment. #----------------------------------------------------------------------- # configure.ac for Tcl Extensions. The only places you should need to # modify this file are marked by the string __CHANGE__ # ----------------------------------------------------------------------- #----------------------------------------------------------------------- # __CHANGE__ # Set your package name and version numbers here. # # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION # set as provided. These will also be added as -D defs in your Makefile # so you can encode the package version directly into the source files. # This will also define a special symbol for Windows (BUILD_<PACKAGE_NAME> # so that we create the export library with the dll. #----------------------------------------------------------------------- AC_INIT([Rtcl], [1.1]) #-------------------------------------------------------------------- # 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. #-------------------------------------------------------------------- TEA_INIT([3.9]) AC_CONFIG_AUX_DIR(tclconfig) #-------------------------------------------------------------------- # Load the tclConfig.sh file #-------------------------------------------------------------------- TEA_PATH_TCLCONFIG TEA_LOAD_TCLCONFIG #----------------------------------------------------------------------- # Handle the --prefix=... option by defaulting to what Tcl gave. # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. #----------------------------------------------------------------------- TEA_PREFIX #----------------------------------------------------------------------- # Standard compiler checks. # This sets up CC by using the CC env var, or looks for gcc otherwise. # This also calls AC_PROG_CC and a few others to create the basic setup # necessary to compile executables. #----------------------------------------------------------------------- TEA_SETUP_COMPILER #----------------------------------------------------------------------- # __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. #----------------------------------------------------------------------- TEA_ADD_SOURCES([rtcl.c]) TEA_ADD_HEADERS([]) TEA_ADD_INCLUDES([]) TEA_ADD_LIBS([]) TEA_ADD_CFLAGS([-Icompat -Icompat/R]) TEA_ADD_STUB_SOURCES([]) TEA_ADD_TCL_SOURCES([]) #-------------------------------------------------------------------- # __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 #-------------------------------------------------------------------- TEA_PUBLIC_TCL_HEADERS #TEA_PRIVATE_TCL_HEADERS #-------------------------------------------------------------------- # __CHANGE__ # A few miscellaneous platform-specific items: # # Define a special symbol for Windows (BUILD_Tktable 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 extra compiler/build info here. #-------------------------------------------------------------------- TEA_ADD_CLEANFILES([pkgIndex.tcl]) #-------------------------------------------------------------------- # Check whether --enable-threads or --disable-threads was given. # This auto-enables if Tcl was compiled threaded. #-------------------------------------------------------------------- TEA_ENABLE_THREADS #-------------------------------------------------------------------- # The statement below defines a collection of symbols related to # building as a shared library instead of a static library. #-------------------------------------------------------------------- TEA_ENABLE_SHARED #-------------------------------------------------------------------- # 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. #-------------------------------------------------------------------- TEA_CONFIG_CFLAGS #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols option. #-------------------------------------------------------------------- TEA_ENABLE_SYMBOLS #-------------------------------------------------------------------- # 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. #-------------------------------------------------------------------- AC_DEFINE(USE_TCL_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. #-------------------------------------------------------------------- TEA_MAKE_LIB #-------------------------------------------------------------------- # Determine the name of the tclsh and/or wish executables in the # Tcl and Tk build directories or the location they were installed # into. These paths are used to support running test cases only, # the Makefile should not be making use of these paths to generate # a pkgIndex.tcl file or anything else at extension build time. #-------------------------------------------------------------------- TEA_PROG_TCLSH #-------------------------------------------------------------------- # 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 th AC variables in. Include these here. #-------------------------------------------------------------------- AC_OUTPUT([Makefile pkgIndex.tcl]) |
Added undroid/Rtcl/doc/Rtcl.n.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | '\" '\" Generated from file 'Rtcl\&.tmml' by tcllib/doctools with format 'nroff' '\" Copyright (c) 2003 Neil McKay <mckay@eecs\&.umich\&.edu> '\" Copyright (c) 2018 Matt Adams <matt\&.adams@radicaldynamic\&.com> '\" .TH "Rtcl" n 1\&.1 Rtcl "Interface to the R Statistical Language" .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. .BS .SH NAME Rtcl \- Embed an interpreter for the R Statistical Language into Tcl .SH SYNOPSIS package require \fBTcl 8\&.6\fR .sp package require \fBRtcl 1\&.1\fR .sp \fB::rtcl::eval\fR \fI?-verbose?\fR \fIR Expression\fR .sp \fB::rtcl::source\fR \fI?-verbose?\fR \fIfoo\&.R\fR .sp \fB::rtcl::gettype\fR \fI?-verbose?\fR \fIR Expression\fR .sp \fB::rtcl::getvalue\fR \fI?-verbose?\fR \fIR Expression\fR .sp .BE .SH DESCRIPTION The Rtcl package provides a way to embed an interpreter for the R statistical language into Tcl, and make it accessible via Tcl commands\&. .PP This extension requires that R be installed and working properly\&. .PP Due to the potential for errors, it is recommended that you wrap all Rtcl routines with \fBcatch\fR or \fBtry\fR\&. .SH COMMANDS .TP \fB::rtcl::eval\fR \fI?-verbose?\fR \fIR Expression\fR Evaluates an \fIR Expression\fR inside the embedded R interpreter\&. Returns an error message if the expression cannot be parsed or evaluated\&. Returns nothing if successful\&. .sp If \fI-verbose\fR (optional) is present, the R interpreter will print the results of R expressions to stdout as they are evaluated\&. This may be used to debug the results of R expressions as Rtcl commands are run\&. For example: .CS $ tclsh % package require Rtcl 1\&.1 % ::rtcl::eval {x <- 1+1} % ::rtcl::getvalue {x} 2\&.0 % ::rtcl::eval -verbose {x <- 1+1} [1] 2 % ::rtcl::getvalue {x} 2\&.0 % .CE .TP \fB::rtcl::source\fR \fI?-verbose?\fR \fIfoo\&.R\fR Sources a file into the embedded R interpreter\&. Takes a single argument that must be the path to a valid R file\&. Returns an error message if the file cannot be found or properly parsed, and returns nothing if successful\&. .sp If \fI-verbose\fR (optional) is present, the R interpreter will print the results of R expressions to stdout as they are evaluated\&. This may be used to debug the results of R expressions as Rtcl commands are run\&. .TP \fB::rtcl::gettype\fR \fI?-verbose?\fR \fIR Expression\fR Evaluates an \fIR Expression\fR inside the embedded R interpreter\&. Returns an error if the expression cannot be parsed or evaluated\&. Otherwise, it returns the R data type of the result\&. .sp If \fI-verbose\fR (optional) is present, the R interpreter will print the results of R expressions to stdout as they are evaluated\&. This may be used to debug the results of R expressions as Rtcl commands are run\&. .TP \fB::rtcl::getvalue\fR \fI?-verbose?\fR \fIR Expression\fR Evaluates an \fIR Expression\fR inside the embedded R interpreter\&. Returns an error if the expression cannot be parsed or evaluated\&. It then tries to convert the returned value to a Tcl equivalent\&. If it can, it returns the value; otherwise, it returns an error\&. .sp If \fI-verbose\fR (optional) is present, the R interpreter will print the results of R expressions to stdout as they are evaluated\&. This may be used to debug the results of R expressions as Rtcl commands are run\&. .PP .SH "SEE ALSO" R .SH KEYWORDS R, Rtcl, Statistics, Tcl .SH COPYRIGHT .nf Copyright (c) 2003 Neil McKay <mckay@eecs\&.umich\&.edu> Copyright (c) 2018 Matt Adams <matt\&.adams@radicaldynamic\&.com> .fi |
Added undroid/Rtcl/doc/Rtcl.tmml.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | [comment {-*- tcl -*- Rtcl package}] [manpage_begin Rtcl n 1.1] [see_also R] [copyright {2003 Neil McKay <mckay@eecs.umich.edu>}] [copyright {2018 Matt Adams <matt.adams@radicaldynamic.com>}] [moddesc {Interface to the R Statistical Language}] [titledesc {Embed an interpreter for the R Statistical Language into Tcl}] [require Tcl 8.6] [require Rtcl 1.1] [description] The Rtcl package provides a way to embed an interpreter for the R statistical language into Tcl, and make it accessible via Tcl commands. [para] This extension requires that R be installed and working properly. [para] Due to the potential for errors, it is recommended that you wrap all Rtcl routines with [cmd catch] or [cmd try]. [section COMMANDS] [list_begin definitions] [call [cmd ::rtcl::eval] [arg ?-verbose?] [arg {R Expression}]] Evaluates an [arg {R Expression}] inside the embedded R interpreter. Returns an error message if the expression cannot be parsed or evaluated. Returns nothing if successful. [para] If [arg -verbose] (optional) is present, the R interpreter will print the results of R expressions to stdout as they are evaluated. This may be used to debug the results of R expressions as Rtcl commands are run. For example: [example_begin]$ tclsh % package require Rtcl 1.1 % ::rtcl::eval {x <- 1+1} % ::rtcl::getvalue {x} 2.0 % ::rtcl::eval -verbose {x <- 1+1} [lb]1[rb] 2 % ::rtcl::getvalue {x} 2.0 % [example_end] [call [cmd ::rtcl::source] [arg ?-verbose?] [arg foo.R]] Sources a file into the embedded R interpreter. Takes a single argument that must be the path to a valid R file. Returns an error message if the file cannot be found or properly parsed, and returns nothing if successful. [para] If [arg -verbose] (optional) is present, the R interpreter will print the results of R expressions to stdout as they are evaluated. This may be used to debug the results of R expressions as Rtcl commands are run. [call [cmd ::rtcl::gettype] [arg ?-verbose?] [arg {R Expression}]] Evaluates an [arg {R Expression}] inside the embedded R interpreter. Returns an error if the expression cannot be parsed or evaluated. Otherwise, it returns the R data type of the result. [para] If [arg -verbose] (optional) is present, the R interpreter will print the results of R expressions to stdout as they are evaluated. This may be used to debug the results of R expressions as Rtcl commands are run. [call [cmd ::rtcl::getvalue] [arg ?-verbose?] [arg {R Expression}]] Evaluates an [arg {R Expression}] inside the embedded R interpreter. Returns an error if the expression cannot be parsed or evaluated. It then tries to convert the returned value to a Tcl equivalent. If it can, it returns the value; otherwise, it returns an error. [para] If [arg -verbose] (optional) is present, the R interpreter will print the results of R expressions to stdout as they are evaluated. This may be used to debug the results of R expressions as Rtcl commands are run. [list_end] [keywords Tcl Rtcl R Statistics] [manpage_end] |
Added undroid/Rtcl/doc/man.macros.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | .\" The -*- nroff -*- definitions below are for supplemental macros used .\" in Tcl/Tk manual entries. .\" .\" .AP type name in/out ?indent? .\" Start paragraph describing an argument to a library procedure. .\" type is type of argument (int, etc.), in/out is either "in", "out", .\" or "in/out" to describe whether procedure reads or modifies arg, .\" and indent is equivalent to second arg of .IP (shouldn't ever be .\" needed; use .AS below instead) .\" .\" .AS ?type? ?name? .\" Give maximum sizes of arguments for setting tab stops. Type and .\" name are examples of largest possible arguments that will be passed .\" to .AP later. If args are omitted, default tab stops are used. .\" .\" .BS .\" Start box enclosure. From here until next .BE, everything will be .\" enclosed in one large box. .\" .\" .BE .\" End of box enclosure. .\" .\" .CS .\" Begin code excerpt. .\" .\" .CE .\" End code excerpt. .\" .\" .VS ?version? ?br? .\" Begin vertical sidebar, for use in marking newly-changed parts .\" of man pages. The first argument is ignored and used for recording .\" the version when the .VS was added, so that the sidebars can be .\" found and removed when they reach a certain age. If another argument .\" is present, then a line break is forced before starting the sidebar. .\" .\" .VE .\" End of vertical sidebar. .\" .\" .DS .\" Begin an indented unfilled display. .\" .\" .DE .\" End of indented unfilled display. .\" .\" .SO ?manpage? .\" Start of list of standard options for a Tk widget. The manpage .\" argument defines where to look up the standard options; if .\" omitted, defaults to "options". The options follow on successive .\" lines, in three columns separated by tabs. .\" .\" .SE .\" End of list of standard options for a Tk widget. .\" .\" .OP cmdName dbName dbClass .\" Start of description of a specific option. cmdName gives the .\" option's name as specified in the class command, dbName gives .\" the option's name in the option database, and dbClass gives .\" the option's class in the option database. .\" .\" .UL arg1 arg2 .\" Print arg1 underlined, then print arg2 normally. .\" .\" .QW arg1 ?arg2? .\" Print arg1 in quotes, then arg2 normally (for trailing punctuation). .\" .\" .PQ arg1 ?arg2? .\" Print an open parenthesis, arg1 in quotes, then arg2 normally .\" (for trailing punctuation) and then a closing parenthesis. .\" .\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages. .if t .wh -1.3i ^B .nr ^l \n(.l .ad b .\" # Start an argument description .de AP .ie !"\\$4"" .TP \\$4 .el \{\ . ie !"\\$2"" .TP \\n()Cu . el .TP 15 .\} .ta \\n()Au \\n()Bu .ie !"\\$3"" \{\ \&\\$1 \\fI\\$2\\fP (\\$3) .\".b .\} .el \{\ .br .ie !"\\$2"" \{\ \&\\$1 \\fI\\$2\\fP .\} .el \{\ \&\\fI\\$1\\fP .\} .\} .. .\" # define tabbing values for .AP .de AS .nr )A 10n .if !"\\$1"" .nr )A \\w'\\$1'u+3n .nr )B \\n()Au+15n .\" .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n .nr )C \\n()Bu+\\w'(in/out)'u+2n .. .AS Tcl_Interp Tcl_CreateInterp in/out .\" # BS - start boxed text .\" # ^y = starting y location .\" # ^b = 1 .de BS .br .mk ^y .nr ^b 1u .if n .nf .if n .ti 0 .if n \l'\\n(.lu\(ul' .if n .fi .. .\" # BE - end boxed text (draw box now) .de BE .nf .ti 0 .mk ^t .ie n \l'\\n(^lu\(ul' .el \{\ .\" Draw four-sided box normally, but don't draw top of .\" box if the box started on an earlier page. .ie !\\n(^b-1 \{\ \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .el \}\ \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul' .\} .\} .fi .br .nr ^b 0 .. .\" # VS - start vertical sidebar .\" # ^Y = starting y location .\" # ^v = 1 (for troff; for nroff this doesn't matter) .de VS .if !"\\$2"" .br .mk ^Y .ie n 'mc \s12\(br\s0 .el .nr ^v 1u .. .\" # VE - end of vertical sidebar .de VE .ie n 'mc .el \{\ .ev 2 .nf .ti 0 .mk ^t \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n' .sp -1 .fi .ev .\} .nr ^v 0 .. .\" # Special macro to handle page bottom: finish off current .\" # box/sidebar if in box/sidebar mode, then invoked standard .\" # page bottom macro. .de ^B .ev 2 'ti 0 'nf .mk ^t .if \\n(^b \{\ .\" Draw three-sided box if this is the box's first page, .\" draw two sides but no top otherwise. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c .\} .if \\n(^v \{\ .nr ^x \\n(^tu+1v-\\n(^Yu \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c .\} .bp 'fi .ev .if \\n(^b \{\ .mk ^y .nr ^b 2 .\} .if \\n(^v \{\ .mk ^Y .\} .. .\" # DS - begin display .de DS .RS .nf .sp .. .\" # DE - end display .de DE .fi .RE .sp .. .\" # SO - start of list of standard options .de SO 'ie '\\$1'' .ds So \\fBoptions\\fR 'el .ds So \\fB\\$1\\fR .SH "STANDARD OPTIONS" .LP .nf .ta 5.5c 11c .ft B .. .\" # SE - end of list of standard options .de SE .fi .ft R .LP See the \\*(So manual entry for details on the standard options. .. .\" # OP - start of full description for a single option .de OP .LP .nf .ta 4c Command-Line Name: \\fB\\$1\\fR Database Name: \\fB\\$2\\fR Database Class: \\fB\\$3\\fR .fi .IP .. .\" # CS - begin code excerpt .de CS .RS .nf .ta .25i .5i .75i 1i .. .\" # CE - end code excerpt .de CE .fi .RE .. .\" # UL - underline word .de UL \\$1\l'|0\(ul'\\$2 .. .\" # QW - apply quotation marks to word .de QW .ie '\\*(lq'"' ``\\$1''\\$2 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\$2 .. .\" # PQ - apply parens and quotation marks to word .de PQ .ie '\\*(lq'"' (``\\$1''\\$2)\\$3 .\"" fix emacs highlighting .el (\\*(lq\\$1\\*(rq\\$2)\\$3 .. .\" # QR - quoted range .de QR .ie '\\*(lq'"' ``\\$1''\\-``\\$2''\\$3 .\"" fix emacs highlighting .el \\*(lq\\$1\\*(rq\\-\\*(lq\\$2\\*(rq\\$3 .. .\" # MT - "empty" string .de MT .QW "" .. |
Added undroid/Rtcl/generic/rtcl.c.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 | /* * rtcl.c -- A minimal Tcl C extension for embedded R */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <tcl.h> #include <Rembedded.h> #include <R.h> #include <Rinternals.h> #include <R_ext/Parse.h> #include <libR_dl.h> /* * Mutex used during init of this module. */ TCL_DECLARE_MUTEX(initMutex) /* * Handle of libR which is runtime linked during init. */ static Tcl_LoadHandle libR = NULL; /* * Entry points into libvlc, runtime linked. */ struct libR_dl libR_dl = { 0 }; /* *---------------------------------------------------------------------- * * RType -- * * Return the type of an R expression * * Results: * RType takes an R SEXP as input, and returns a Tcl_Obj * indicating the SEXP's type. * * Side effects: * None * *---------------------------------------------------------------------- */ static int RType(interp, retObjPtr, s) Tcl_Interp *interp; Tcl_Obj *retObjPtr; SEXP s; { switch(TYPEOF(s)) { case NILSXP: Tcl_SetStringObj(retObjPtr, "nil", -1); break; case SYMSXP: Tcl_SetStringObj(retObjPtr, "symbol", -1); break; case LISTSXP: Tcl_SetStringObj(retObjPtr, "list", -1); break; case CLOSXP: Tcl_SetStringObj(retObjPtr, "closure", -1); break; case ENVSXP: Tcl_SetStringObj(retObjPtr, "environment", -1); break; case PROMSXP: Tcl_SetStringObj(retObjPtr, "promise", -1); break; case LANGSXP: Tcl_SetStringObj(retObjPtr, "language", -1); break; case SPECIALSXP: Tcl_SetStringObj(retObjPtr, "special", -1); break; case BUILTINSXP: Tcl_SetStringObj(retObjPtr, "builtin", -1); break; case CHARSXP: Tcl_SetStringObj(retObjPtr, "char", -1); break; case LGLSXP: Tcl_SetStringObj(retObjPtr, "logical", -1); break; case INTSXP: Tcl_SetStringObj(retObjPtr, "int", -1); break; case REALSXP: Tcl_SetStringObj(retObjPtr, "real", -1); break; case CPLXSXP: Tcl_SetStringObj(retObjPtr, "complex", -1); break; case STRSXP: Tcl_SetStringObj(retObjPtr, "string", -1); break; case DOTSXP: Tcl_SetStringObj(retObjPtr, "...", -1); break; case ANYSXP: Tcl_SetStringObj(retObjPtr, "any", -1); break; case VECSXP: Tcl_SetStringObj(retObjPtr, "vector", -1); break; case EXPRSXP: Tcl_SetStringObj(retObjPtr, "expression", -1); break; case BCODESXP: Tcl_SetStringObj(retObjPtr, "bytecode", -1); break; case EXTPTRSXP: Tcl_SetStringObj(retObjPtr, "extpointer", -1); break; case WEAKREFSXP: Tcl_SetStringObj(retObjPtr, "weakref", -1); break; default: Tcl_SetStringObj(retObjPtr, "UNKNOWN", -1); break; } return TCL_OK; } /* *---------------------------------------------------------------------- * * RtoTcl -- * * Convert an R SEXP to something Tcl can deal with. * * Results: * RtoTcl takes an R SEXP as input, and returns a roughly * equivalent value as a Tcl_Obj. It returns TCL_OK if the * conversion goes well, TCL_ERROR otherwise. * * Side effects: * None * *---------------------------------------------------------------------- */ static int RtoTcl(interp, retObjPtrPtr, s) Tcl_Interp *interp; /* Tcl interp. for error messages */ Tcl_Obj **retObjPtrPtr; /* Tcl object returned here */ SEXP s; /* R SEXP to translate */ { int i, l, retcode; Tcl_Obj **objv; char *str; Tcl_DString ds; retcode = TCL_OK; switch(TYPEOF(s)) { case NILSXP: *retObjPtrPtr = Tcl_NewStringObj("", -1); break; case SYMSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R symbol expression", -1); retcode = TCL_ERROR; break; case LISTSXP: l = Rf_length(s); if (l == 0) { *retObjPtrPtr = Tcl_NewStringObj("", -1); } else if (l == 1) { return(RtoTcl(interp, retObjPtrPtr, CAR(s))); } else { objv = (Tcl_Obj **) Tcl_Alloc(l * sizeof(Tcl_Obj *)); for (i = 0; s != NULL && s != R_NilValue; i++, s = CDR(s)) { RtoTcl(interp, &(objv[i]), CAR(s)); } *retObjPtrPtr = Tcl_NewListObj(l, objv); Tcl_Free((ClientData) objv); } break; case CLOSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R closures", -1); retcode = TCL_ERROR; break; case ENVSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R environment", -1); retcode = TCL_ERROR; break; case PROMSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R promises", -1); retcode = TCL_ERROR; break; case LANGSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R language objects", -1); retcode = TCL_ERROR; break; case SPECIALSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R special expressions", -1); retcode = TCL_ERROR; break; case BUILTINSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R builtins", -1); retcode = TCL_ERROR; break; case CHARSXP: str = Tcl_ExternalToUtfDString(NULL, CHAR(s), -1, &ds); *retObjPtrPtr = Tcl_NewStringObj(str, Tcl_DStringLength(&ds)); Tcl_DStringFree(&ds); break; case LGLSXP: if (LENGTH(s) == 1) { *retObjPtrPtr = Tcl_NewIntObj((int) (*LOGICAL(s))); } else { objv = (Tcl_Obj **) Tcl_Alloc(Rf_length(s) * sizeof(Tcl_Obj *)); for (i = 0; i < LENGTH(s); i++) { objv[i] = Tcl_NewIntObj((int) (LOGICAL(s)[i])); } *retObjPtrPtr = Tcl_NewListObj(LENGTH(s), objv); Tcl_Free((ClientData) objv); } break; case INTSXP: if (LENGTH(s) == 1) { *retObjPtrPtr = Tcl_NewIntObj(*INTEGER(s)); } else { objv = (Tcl_Obj **) Tcl_Alloc(LENGTH(s) * sizeof(Tcl_Obj *)); for (i = 0; i < LENGTH(s); i++) { objv[i] = Tcl_NewIntObj(INTEGER(s)[i]); } *retObjPtrPtr = Tcl_NewListObj(LENGTH(s), objv); Tcl_Free((ClientData) objv); } break; case REALSXP: if (LENGTH(s) == 1) { *retObjPtrPtr = Tcl_NewDoubleObj(*REAL(s)); } else { objv = (Tcl_Obj **) Tcl_Alloc(LENGTH(s) * sizeof(Tcl_Obj *)); for (i = 0; i < LENGTH(s); i++) { objv[i] = Tcl_NewDoubleObj(REAL(s)[i]); } *retObjPtrPtr = Tcl_NewListObj(LENGTH(s), objv); Tcl_Free((ClientData) objv); } break; case CPLXSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R complex numbers", -1); retcode = TCL_ERROR; break; case STRSXP: if (LENGTH(s) == 1) { str = Tcl_ExternalToUtfDString(NULL, CHAR(*STRING_PTR(s)), -1, &ds); *retObjPtrPtr = Tcl_NewStringObj(str, Tcl_DStringLength(&ds)); Tcl_DStringFree(&ds); } else { objv = (Tcl_Obj **) Tcl_Alloc(Rf_length(s) * sizeof(Tcl_Obj *)); for (i = 0; i < LENGTH(s); i++) { str = Tcl_ExternalToUtfDString(NULL, CHAR(STRING_PTR(s)[i]), -1, &ds); objv[i] = Tcl_NewStringObj(str, Tcl_DStringLength(&ds)); Tcl_DStringFree(&ds); } *retObjPtrPtr = Tcl_NewListObj(LENGTH(s), objv); Tcl_Free((ClientData) objv); } break; case DOTSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R dotted pairs", -1); retcode = TCL_ERROR; break; case ANYSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R \"any\" type", -1); retcode = TCL_ERROR; break; case VECSXP: if (LENGTH(s) == 1) { i = RtoTcl(interp, retObjPtrPtr, VECTOR_ELT(s, 0)); return i; } else { objv = (Tcl_Obj **) Tcl_Alloc(Rf_length(s) * sizeof(Tcl_Obj *)); for (i = 0; i < LENGTH(s); i++) { /*@@@ Need to check return result. @@@*/ RtoTcl(interp, &(objv[i]), VECTOR_ELT(s, i)); } *retObjPtrPtr = Tcl_NewListObj(LENGTH(s), objv); Tcl_Free((ClientData) objv); } break; case EXPRSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R expressions", -1); retcode = TCL_ERROR; break; case BCODESXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R bytecode", -1); retcode = TCL_ERROR; break; case EXTPTRSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R external pointers", -1); retcode = TCL_ERROR; break; case WEAKREFSXP: *retObjPtrPtr = Tcl_NewStringObj("No Tcl equivalent for R weak references", -1); retcode = TCL_ERROR; break; default: *retObjPtrPtr = Tcl_NewStringObj("Unknown S-expression type", -1); retcode = TCL_ERROR; break; } return retcode; } /* *---------------------------------------------------------------------- * * REval -- * * Evaluate an R expression * * Results: * REval takes an array of Tcl_Obj's, and evaluates them as R * expressions. It returns a standard Tcl result. * * Side effects: * May change the state of the R interpreter * *---------------------------------------------------------------------- */ static int REval(interp, s, objc, objv) Tcl_Interp *interp; /* For error messages */ SEXP *s; /* S-Expression to put result in */ int objc; /* Number of arguments */ Tcl_Obj *CONST objv[]; /* Arguments */ { int i, l, evalError; ParseStatus status; SEXP text; SEXP exp, val; SEXP geterr, err; char *errmsg, *str; int offset, verbose; Tcl_DString ds; /* Check for verbose option */ if (strcmp(Tcl_GetString(objv[1]), "-verbose") == 0) { if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "-verbose {R Expression}"); return TCL_ERROR; } offset = 2; verbose = 1; objc -= 2; } else { offset = 1; verbose = 0; objc--; } /* Get the exp to evaluate */ text = Rf_protect(Rf_allocVector(STRSXP, objc)); for (i = 0; i < objc; i++ ) { str = Tcl_GetStringFromObj(objv[i+offset], &l); str = Tcl_UtfToExternalDString(NULL, str, l, &ds); SET_STRING_ELT(text, i, Rf_mkChar(str)); Tcl_DStringFree(&ds); } /* Parse it */ Rf_protect(exp = R_ParseVector(text, -1, &status, R_NilValue)); if (status != PARSE_OK) { Rf_unprotect(2); Tcl_SetResult(interp, "R parse error", TCL_STATIC); return TCL_ERROR; } /* Evaluate it */ val = R_tryEval(VECTOR_ELT(exp, 0), R_GlobalEnv, &evalError); if (evalError) { Rf_unprotect(2); /* Retrieve error message from R */ Rf_protect(geterr = Rf_lang1(Rf_install("geterrmessage"))); err = R_tryEval(geterr, R_GlobalEnv, &evalError); Rf_unprotect(1); errmsg = (char *) CHAR(STRING_ELT(err, 0)); errmsg = Tcl_ExternalToUtfDString(NULL, errmsg, -1, &ds); Tcl_SetResult(interp, errmsg, TCL_VOLATILE); Tcl_DStringFree(&ds); return TCL_ERROR; } else { if (verbose) { Rf_PrintValue(val); } } l = Rf_length(exp); for (i = 0; i < l; i++) { *s = Rf_eval(VECTOR_ELT(exp, i), R_GlobalEnv); } Rf_unprotect(2); return TCL_OK; } /* *---------------------------------------------------------------------- * * Rtcl_eval -- * * Evaluate R expression(s) * * Results: * A standard Tcl result * * Side effects: * May change the state of the R interpreter, depending on what * expression is evaluated. * *---------------------------------------------------------------------- */ static int Rtcl_eval(clientData, interp, objc, objv) ClientData clientData; /* Not used. */ Tcl_Interp *interp; /* Current interpreter */ int objc; /* Number of arguments */ Tcl_Obj *CONST objv[]; /* Arguments */ { SEXP ans; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "?-verbose? {R Expression}"); return TCL_ERROR; } /* Evaluate the args */ if (REval(interp, &ans, objc, objv) != TCL_OK) { return TCL_ERROR; } /* Clean up and return */ return TCL_OK; } /* *---------------------------------------------------------------------- * * Rtcl_rsource -- * * Source a file into the R environment. * * Results: * A standard Tcl result * * Side effects: * May change the state of the R interpreter, depending on what * expression is evaluated. * *---------------------------------------------------------------------- */ static int Rtcl_source(clientData, interp, objc, objv) ClientData clientData; /* Not used. */ Tcl_Interp *interp; /* Current interpreter */ int objc; /* Number of arguments */ Tcl_Obj *CONST objv[]; /* Arguments */ { int evalError; SEXP exp, val; SEXP geterr, err; char *errmsg, *str; int offset, verbose; Tcl_Obj *pathObj; Tcl_DString ds; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "?-verbose? {source_file.R}"); return TCL_ERROR; } /* Check for verbose option */ if (strcmp(Tcl_GetString(objv[1]), "-verbose") == 0) { if (objc < 3) { Tcl_WrongNumArgs(interp, 1, objv, "-verbose {source_file.R}"); return TCL_ERROR; } offset = 2; verbose = 1; objc -= 2; } else { offset = 1; verbose = 0; objc--; } pathObj = Tcl_FSGetNormalizedPath(interp, objv[offset]); if (pathObj == NULL) { return TCL_ERROR; } Tcl_IncrRefCount(pathObj); str = Tcl_GetStringFromObj(pathObj, &offset); str = Tcl_UtfToExternalDString(NULL, str, offset, &ds); Tcl_DecrRefCount(pathObj); Rf_protect(exp = Rf_lang2(Rf_install("source"), Rf_mkString(str))); Tcl_DStringFree(&ds); val = R_tryEval(exp, R_GlobalEnv, &evalError); if (evalError) { Rf_unprotect(1); /* Retrieve error message from R */ Rf_protect(geterr = Rf_lang1(Rf_install("geterrmessage"))); err = R_tryEval(geterr, R_GlobalEnv, &evalError); Rf_unprotect(1); errmsg = (char *) CHAR(STRING_ELT(err, 0)); Tcl_ExternalToUtfDString(NULL, errmsg, -1, &ds); Tcl_SetResult(interp, errmsg, TCL_VOLATILE); Tcl_DStringFree(&ds); return TCL_ERROR; } else { if (verbose) { Rf_PrintValue(val); } } Rf_unprotect(1); return TCL_OK; } /* *---------------------------------------------------------------------- * * Rtcl_gettype -- * * Evaluate an R expression and return its type. * * Results: * A standard Tcl result * * Side effects: * May change the state of the R interpreter, depending on what * expression is evaluated. * *---------------------------------------------------------------------- */ static int Rtcl_gettype(clientData, interp, objc, objv) ClientData clientData; /* Not used. */ Tcl_Interp *interp; /* Current interpreter */ int objc; /* Number of arguments */ Tcl_Obj *CONST objv[]; /* Arguments */ { SEXP ans; Tcl_Obj *r; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "?-verbose? {R Expression}"); return TCL_ERROR; } /* Evaluate the args */ if (REval(interp, &ans, objc, objv) != TCL_OK) { return TCL_ERROR; } /* Return the result in an appropriate form */ r = Tcl_NewObj(); Tcl_IncrRefCount(r); if (RType(interp, r, ans) != TCL_OK) { Tcl_DecrRefCount(r); return TCL_ERROR; } /* Clean up and return */ Tcl_SetObjResult(interp, r); Tcl_DecrRefCount(r); return TCL_OK; } /* *---------------------------------------------------------------------- * * Rtcl_getvalue -- * * Evaluate R expression and return its value. * * Results: * A standard Tcl result * * Side effects: * May change the state of the R interpreter, depending on what * expression is evaluated. * *---------------------------------------------------------------------- */ static int Rtcl_getvalue(clientData, interp, objc, objv) ClientData clientData; /* Not used. */ Tcl_Interp *interp; /* Current interpreter */ int objc; /* Number of arguments */ Tcl_Obj *CONST objv[]; /* Arguments */ { SEXP ans; Tcl_Obj *r; if (objc < 2) { Tcl_WrongNumArgs(interp, 1, objv, "?-verbose? {R Expression}"); return TCL_ERROR; } /* Evaluate the args */ if (REval(interp, &ans, objc, objv) != TCL_OK) { return TCL_ERROR; } /* Return the result in an appropriate form */ if (RtoTcl(interp, &r, ans) != TCL_OK) { return TCL_ERROR; } /* Clean up and return */ Tcl_SetObjResult(interp, r); return TCL_OK; } /* *---------------------------------------------------------------------- * * Rtcl_Init -- * * Called when Tcl loads the extension to initialize the new * package. The string "Rtcl" in the function name must match * the PACKAGE declaration at the top of configure.ac. * * Results: * A standard Tcl result * * Side effects: * The Rtcl package is created. * New namespace ::Rtcl is added. * New commands "eval", "value", "source", "type" are added under ::Rtcl * *---------------------------------------------------------------------- */ int DLLEXPORT Rtcl_Init(Tcl_Interp *interp) { /* Init flag */ static int initialized = 0; /* Rargv is the fake argument list we use to initialize R */ char *Rargv[] = {"R", "--no-restore", "--slave"}; /* Pointer to hold our own new namespace */ Tcl_Namespace *nsPtr; #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, "8.5", 0) == NULL) { return TCL_ERROR; } #else if (Tcl_PkgRequire(interp, "Tcl", "8.5", 0) == NULL) { return TCL_ERROR; } #endif if (!initialized) { int i, errors, doenv; static const char *libnames[] = { #if defined(__APPLE__) "/usr/local/lib/R/lib/libR.dylib", #elif defined(_WIN32) #error TODO #else "/usr/local/lib/R/lib/libR.so", "/usr/lib64/R/lib/libR.so", "/usr/lib/R/lib/libR.so", #endif NULL }; Tcl_MutexLock(&initMutex); if (initialized) { goto initDone; } i = errors = 0; doenv = (getenv("R_HOME") == NULL); while (libnames[i] != NULL) { Tcl_Obj *nameobj; Tcl_ResetResult(interp); if (doenv) { Tcl_DString ds; char *p; Tcl_DStringInit(&ds); Tcl_DStringAppend(&ds, libnames[i], -1); p = strrchr(Tcl_DStringValue(&ds), '/'); if (p != NULL) { *p = '\0'; p = strrchr(Tcl_DStringValue(&ds), '/'); if (p != NULL) { *p = '\0'; } setenv("R_HOME", Tcl_DStringValue(&ds), 1); } Tcl_DStringFree(&ds); } nameobj = Tcl_NewStringObj(libnames[i], -1); Tcl_IncrRefCount(nameobj); if (Tcl_LoadFile(interp, nameobj, NULL, 0, NULL, &libR) == TCL_OK) { Tcl_DecrRefCount(nameobj); break; } if (doenv) { unsetenv("R_HOME"); } Tcl_DecrRefCount(nameobj); ++i; } if (libnames[i] == NULL) { initialized = -1; goto initDone; } #define LIBR_SYM_FN(name) \ if (!errors) { \ libR_dl.m_ ## name = (fn_ ## name) \ Tcl_FindSymbol(NULL, libR, #name); \ if (libR_dl.m_ ## name == NULL) errors++; \ } #define LIBR_SYM_SEXP(name) \ if (!errors) { \ libR_dl.m_ ## name = (SEXP *) \ Tcl_FindSymbol(NULL, libR, #name); \ if (libR_dl.m_ ## name == NULL) errors++; \ } LIBR_SYM_FN(CAR); LIBR_SYM_FN(CDR); LIBR_SYM_FN(INTEGER); LIBR_SYM_FN(LENGTH); LIBR_SYM_FN(LOGICAL); LIBR_SYM_FN(R_CHAR); LIBR_SYM_FN(REAL); LIBR_SYM_FN(Rf_allocVector); LIBR_SYM_FN(Rf_eval); LIBR_SYM_FN(Rf_initEmbeddedR); LIBR_SYM_FN(Rf_install); LIBR_SYM_FN(Rf_lang1); LIBR_SYM_FN(Rf_lang2); LIBR_SYM_FN(Rf_length); LIBR_SYM_FN(Rf_mkChar); LIBR_SYM_FN(Rf_mkString); LIBR_SYM_FN(Rf_PrintValue); LIBR_SYM_FN(Rf_protect); LIBR_SYM_FN(Rf_unprotect); LIBR_SYM_SEXP(R_GlobalEnv); LIBR_SYM_SEXP(R_NilValue); LIBR_SYM_FN(R_ParseVector); LIBR_SYM_FN(R_tryEval); LIBR_SYM_FN(SET_STRING_ELT); LIBR_SYM_FN(STRING_ELT); LIBR_SYM_FN(STRING_PTR); LIBR_SYM_FN(TYPEOF); LIBR_SYM_FN(VECTOR_ELT); #undef LIBR_SYM_FN #undef LIBR_SYM_SEXP if (errors) { if (libR != NULL) { Tcl_FSUnloadFile(interp, libR); Tcl_ResetResult(interp); libR = NULL; } initialized = -1; } else { initialized = 1; } initDone: Tcl_MutexUnlock(&initMutex); } if (initialized < 0) { Tcl_SetResult(interp, "cannot load libR", TCL_STATIC); return TCL_ERROR; } /* Initialize R */ Rf_initEmbeddedR(sizeof(Rargv)/sizeof(Rargv[0]), Rargv); /* Rf_endEmbeddedR(0); */ /* Create namespace */ nsPtr = Tcl_CreateNamespace(interp, "::rtcl", NULL, NULL); if (nsPtr == NULL) { return TCL_ERROR; } /* Changed this to check for an error */ if (Tcl_PkgProvide(interp, "Rtcl", "1.1") == TCL_ERROR) { return TCL_ERROR; } Tcl_CreateObjCommand(interp, "::rtcl::eval", (Tcl_ObjCmdProc *) Rtcl_eval, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateObjCommand(interp, "::rtcl::source", (Tcl_ObjCmdProc *) Rtcl_source, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateObjCommand(interp, "::rtcl::gettype", (Tcl_ObjCmdProc *) Rtcl_gettype, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); Tcl_CreateObjCommand(interp, "::rtcl::getvalue", (Tcl_ObjCmdProc *) Rtcl_getvalue, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL); return TCL_OK; } |
Added undroid/Rtcl/pkgIndex.tcl.in.
> > > > > > | 1 2 3 4 5 6 | # # Tcl package index file # package ifneeded @PACKAGE_NAME@ @PACKAGE_VERSION@ \ [list load [file join $dir @PKG_LIB_FILE@] @PACKAGE_NAME@] |
Added undroid/Rtcl/tclconfig/README.txt.
> > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | 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 SC_* macros. |
Added undroid/Rtcl/tclconfig/install-sh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 | #!/bin/sh # install - install a program, script, or datafile scriptversion=2011-04-20.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -S $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -S) stripcmd="$stripprog $2" shift;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then 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 starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: |
Added undroid/Rtcl/tclconfig/tcl.m4.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 | # 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. 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` \ `ls -d /usr/lib/tcl8.6 2>/dev/null` \ `ls -d /usr/lib/tcl8.5 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. Use --with-tcl to specify a directory containing tclConfig.sh]) 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)`" elif test -f "${with_tkconfig}/sdl2tkConfig.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 if test -f "$i/sdl/sdl2tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i/sdl; 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 if test -f "$i/sdl/sdl2tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i/sdl; 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. Use --with-tk to specify a directory containing tkConfig.sh]) 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: # # Substitutes 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) AC_MSG_CHECKING([platform]) hold_cc=$CC; CC="$TCL_CC" AC_TRY_COMPILE(,[ #ifdef _WIN32 #error win32 #endif ], TEA_PLATFORM="unix", TEA_PLATFORM="windows" ) CC=$hold_cc AC_MSG_RESULT($TEA_PLATFORM) # The BUILD_$pkg is to define the correct extern storage class # handling when making this package AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [], [Building extension source?]) # Do this here as we have fully defined TEA_PLATFORM now if test "${TEA_PLATFORM}" = "windows" ; then EXEEXT=".exe" 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" elif test -f "${TK_BIN_DIR}/sdl2tkConfig.sh" ; then AC_MSG_RESULT([loading]) . "${TK_BIN_DIR}/sdl2tkConfig.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 case ${TK_DEFS} in *PLATFORM_SDL*) TEA_WINDOWINGSYSTEM="x11" TEA_USE_SDL=yes ;; esac if test "${TEA_USE_SDL}" = "yes" ; then true elif 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: # Substitutes the following vars: # 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: # Substitutes the following vars: # 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) -DNDEBUG" 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} -DNDEBUG" 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 <langinfo.h>], [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 $PACKAGE_VERSION variable # to put the version in the right place. This is used # by platforms that need non-standard library names. # Examples: ${PACKAGE_VERSION}.so.1.1 on NetBSD, since it needs # to have a version after the .so, and ${PACKAGE_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 # ${PACKAGE_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]) AC_DEFINE(HAVE_HIDDEN, [1], [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 AS_IF([test "$GCC" = yes], [ CFLAGS_OPTIMIZE=-O2 CFLAGS_WARNING="-Wall" ], [ CFLAGS_OPTIMIZE=-O CFLAGS_WARNING="" ]) CC_OBJNAME="-o \[$]@" AC_CHECK_TOOL(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 "$GCC" != "yes" -a ! -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 AC_CHECK_TOOL(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}" AC_CACHE_CHECK(for cross-compile version of gcc, ac_cv_cross, AC_TRY_COMPILE([ #ifdef _WIN32 #error cross-compiler #endif ], [], ac_cv_cross=yes, ac_cv_cross=no) ) if test "$ac_cv_cross" = "yes"; then case "$do64bit" in amd64|x64|yes) CC="x86_64-w64-mingw32-gcc" LD="x86_64-w64-mingw32-ld" AR="x86_64-w64-mingw32-ar" RANLIB="x86_64-w64-mingw32-ranlib" RC="x86_64-w64-mingw32-windres" ;; *) CC="i686-w64-mingw32-gcc" LD="i686-w64-mingw32-ld" AR="i686-w64-mingw32-ar" RANLIB="i686-w64-mingw32-ranlib" RC="i686-w64-mingw32-windres" ;; esac fi 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" CFLAGS_DEBUG="${CFLAGS_DEBUG} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" CC_OBJNAME="-Fo\[$]@" 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" EXEEXT=".exe" do64bit_ok=yes 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 -Wl,-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*|GNU*|NetBSD-Debian) 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}' # workaround when cross-compiling for Win32: no -fPIC and -Wl,... if test "${TCL_SHLIB_SUFFIX}" = ".dll" ; then SHLIB_CFLAGS="" SHLIB_SUFFIX=".dll" DL_OBJS="" DL_LIBS="" TCL_LIB_VERSIONS_OK=nodots SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' else LDFLAGS="$LDFLAGS -Wl,--export-dynamic" fi 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"]) ;; 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-*) arch=`arch -s` case "$arch" in alpha|sparc64) SHLIB_CFLAGS="-fPIC" ;; *) SHLIB_CFLAGS="-fpic" ;; esac 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}' LDFLAGS="-Wl,-export-dynamic" CFLAGS_OPTIMIZE="-O2" AS_IF([test "${TCL_THREADS}" = "1"], [ # On OpenBSD: Compile with -pthread # Don't link with -lpthread LIBS=`echo $LIBS | sed s/-lpthread//` CFLAGS="$CFLAGS -pthread" ]) # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; NetBSD-*) # NetBSD 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" ]) ;; FreeBSD-*) # This configuration from FreeBSD Ports. SHLIB_CFLAGS="-fPIC" SHLIB_LD="${CC} -shared" TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$[@]" TK_SHLIB_LD_EXTRAS="-Wl,-soname,\$[@]" SHLIB_SUFFIX=".so" LDFLAGS="" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' LD_SEARCH_FLAGS='-Wl,-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"]) case $system in FreeBSD-3.*) # 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}.so' TCL_LIB_VERSIONS_OK=nodots ;; esac ;; 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 compatibility 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 <X11/Xlib.h>], [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.h>], [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}' ]) ;; UNIX_SV* | UnixWare-5*) SHLIB_CFLAGS="-KPIC" SHLIB_LD='${CC} -G' SHLIB_LD_LIBS="" SHLIB_SUFFIX=".so" # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers # that don't grok the -Bexport option. Test that it does. AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [ hold_ldflags=$LDFLAGS LDFLAGS="$LDFLAGS -Wl,-Bexport" AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no) LDFLAGS=$hold_ldflags]) AS_IF([test $tcl_cv_ld_Bexport = yes], [ LDFLAGS="$LDFLAGS -Wl,-Bexport" ]) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; 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_*|MINGW32_*) ;; 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]) ]) 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']) if test "${GCC}" = "yes" -a ${SHLIB_SUFFIX} = ".dll"; then AC_CACHE_CHECK(for SEH support in compiler, tcl_cv_seh, AC_TRY_RUN([ #define WIN32_LEAN_AND_MEAN #include <windows.h> #undef WIN32_LEAN_AND_MEAN int main(int argc, char** argv) { int a, b = 0; __try { a = 666 / b; } __except (EXCEPTION_EXECUTE_HANDLER) { return 0; } return 1; } ], tcl_cv_seh=yes, tcl_cv_seh=no, tcl_cv_seh=no) ) if test "$tcl_cv_seh" = "no" ; then AC_DEFINE(HAVE_NO_SEH, 1, [Defined when mingw does not support SEH]) fi # # Check to see if the excpt.h include file provided contains the # definition for EXCEPTION_DISPOSITION; if not, which is the case # with Cygwin's version as of 2002-04-10, define it to be int, # sufficient for getting the current code to work. # AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files, tcl_cv_eh_disposition, AC_TRY_COMPILE([ # define WIN32_LEAN_AND_MEAN # include <windows.h> # undef WIN32_LEAN_AND_MEAN ],[ EXCEPTION_DISPOSITION x; ], tcl_cv_eh_disposition=yes, tcl_cv_eh_disposition=no) ) if test "$tcl_cv_eh_disposition" = "no" ; then AC_DEFINE(EXCEPTION_DISPOSITION, int, [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION]) fi # Check to see if winnt.h defines CHAR, SHORT, and LONG # even if VOID has already been #defined. The win32api # used by mingw and cygwin is known to do this. AC_CACHE_CHECK(for winnt.h that ignores VOID define, tcl_cv_winnt_ignore_void, AC_TRY_COMPILE([ #define VOID void #define WIN32_LEAN_AND_MEAN #include <windows.h> #undef WIN32_LEAN_AND_MEAN ], [ CHAR c; SHORT s; LONG l; ], tcl_cv_winnt_ignore_void=yes, tcl_cv_winnt_ignore_void=no) ) if test "$tcl_cv_winnt_ignore_void" = "yes" ; then AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1, [Defined when cygwin/mingw ignores VOID define in winnt.h]) fi fi # See if the compiler supports casting to a union type. # This is used to stop gcc from printing a compiler # warning when initializing a union member. AC_CACHE_CHECK(for cast to union support, tcl_cv_cast_to_union, AC_TRY_COMPILE([], [ union foo { int i; double d; }; union foo f = (union foo) (int) 0; ], tcl_cv_cast_to_union=yes, tcl_cv_cast_to_union=no) ) if test "$tcl_cv_cast_to_union" = "yes"; then AC_DEFINE(HAVE_CAST_TO_UNION, 1, [Defined when compiler supports casting to union type.]) fi AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(CC_OBJNAME) 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 <termios.h> 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 <termio.h> 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 <sgtty.h> 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 <termios.h> #include <errno.h> 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 <termio.h> #include <errno.h> 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 <sgtty.h> #include <errno.h> 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 <sys/types.h> #include <dirent.h>], [ #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 <dirent.h>?]) fi # TEA specific: AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])]) AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])]) AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])]) AC_CHECK_HEADER(limits.h, [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])], [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])]) 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 <stdlib.h>?]) 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 <string.h>?]) fi AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])]) AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])]) # 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" -a "${TEA_USE_SDL}" != "yes" ; 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 <X11/Xlib.h>], , not_really_there="yes") else if test ! -r $x_includes/X11/Xlib.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 <X11/Xlib.h>], 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/Xlib.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 <time.h>], [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 <time.h>], [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 <time.h>], [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 <time.h>], [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: # # Substitutes the following vars: # 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 <net/errno.h>?])]) #-------------------------------------------------------------------- # 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 <stdlib.h>], [char *p = (char *)strtoll; char *q = (char *)strtoull;]) TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>], [struct stat64 buf; int i = stat64("/", &buf);]) TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>], [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 <sys/types.h> #include <dirent.h>],[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 <sys/types.h>?]) fi AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[ AC_TRY_COMPILE([#include <sys/stat.h>],[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 <sys/stat.h>?]) fi AC_CHECK_FUNCS(open64 lseek64) AC_MSG_CHECKING([for off64_t]) AC_CACHE_VAL(tcl_cv_type_off64_t,[ AC_TRY_COMPILE([#include <sys/types.h>],[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 <sys/types.h>?]) 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 # If the user did not set CFLAGS, set it now to keep macros # like AC_PROG_CC and AC_TRY_COMPILE from adding "-g -O2". if test "${CFLAGS+set}" != "set" ; then CFLAGS="" 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 # Maybe we are cross-compiling.... case ${host_alias} in *mingw32*) EXEEXT=".exe" TEA_PLATFORM="windows" ;; *) EXEEXT="" TEA_PLATFORM="unix" ;; esac ;; 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_MSG_NOTICE([configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}]) 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" -a ! -f "${srcdir}/sdl/$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" -a ! -f "${srcdir}/sdl/$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. AC_PROG_CC AC_PROG_CPP INSTALL="\$(SHELL) \$(srcdir)/tclconfig/install-sh -c" AC_SUBST(INSTALL) INSTALL_DATA="\${INSTALL} -m 644" AC_SUBST(INSTALL_DATA) INSTALL_PROGRAM="\${INSTALL}" AC_SUBST(INSTALL_PROGRAM) INSTALL_SCRIPT="\${INSTALL}" AC_SUBST(INSTALL_SCRIPT) #-------------------------------------------------------------------- # Checks to see if the make program sets the $MAKE variable. #-------------------------------------------------------------------- AC_PROG_MAKE_SET #-------------------------------------------------------------------- # Find ranlib #-------------------------------------------------------------------- AC_CHECK_TOOL(RANLIB, 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="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;2 ; fi" VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest -outputresource:\[$]@\;1 ; fi" MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}" # Don't clean .manifest provided by the package (see TEA_ADD_MANIFEST) # or one created by Makefile or configure. Could use the /manifest:filename # linker option to explicitly set the linker-generated filename. eval eval "manifest=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}.manifest" TEA_ADD_CLEANFILES([$manifest]) ]) MAKE_STUB_LIB="\${STLIB_LD} -nodefaultlib -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. if test x"${TK_BIN_DIR}" != x ; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\"" fi SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\"" if test "$GCC" = "yes"; then SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc" fi eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}" else eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}" if test "$GCC" = "yes"; then PKG_LIB_FILE=lib${PKG_LIB_FILE} fi 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: # # Substitutes 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 tcl<Plat>Port.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 <plat>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. # # Substitutes 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: # # Substitutes 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 tk<Plat>Port.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 <plat>Port headers are in a different directory if test -f "${ac_cv_c_tkh}/tkSDLPort.h"; then result="private headers found with public headers" elif 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 case ${TK_DEFS} in *PLATFORM_SDL*) TK_PLATFORM_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/sdl\" ;; esac # 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" -o "${TEA_USE_SDL}" = "yes" ; 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. # # Substitutes 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" -o "${TEA_USE_SDL}" = "yes" ; 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: # # Substitutes 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} $1_INCLUDE_SPEC=${$1_BUILD_INCLUDE_SPEC} $1_LIBRARY_PATH=${$1_LIBRARY_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: # Substitutes 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 ]) #-------------------------------------------------------------------- # TEA_EMBED_MANIFEST # # Figure out if we can embed the manifest where necessary # # Arguments: # An optional manifest to merge into DLL/EXE. # # Results: # Will define the following vars: # VC_MANIFEST_EMBED_DLL # VC_MANIFEST_EMBED_EXE # #-------------------------------------------------------------------- AC_DEFUN([TEA_EMBED_MANIFEST], [ AC_MSG_CHECKING(whether to embed manifest) AC_ARG_ENABLE(embedded-manifest, AC_HELP_STRING([--enable-embedded-manifest], [embed manifest if possible (default: yes)]), [embed_ok=$enableval], [embed_ok=yes]) VC_MANIFEST_EMBED_DLL= VC_MANIFEST_EMBED_EXE= result=no if test "$embed_ok" = "yes" -a "${SHARED_BUILD}" = "1" \ -a "$GCC" != "yes" ; then # Add the magic to embed the manifest into the dll/exe 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+ # Could add 'if test -f' check, but manifest should be created # in this compiler case # Add in a manifest argument that may be specified VC_MANIFEST_EMBED_DLL="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest $1 -outputresource:\[$]@\;2 ; fi" VC_MANIFEST_EMBED_EXE="if test -f \[$]@.manifest ; then mt.exe -nologo -manifest \[$]@.manifest $1 -outputresource:\[$]@\;1 ; fi" result=yes if test "x$1" != x ; then result="yes ($1)" fi ]) fi AC_MSG_RESULT([$result]) AC_SUBST(VC_MANIFEST_EMBED_DLL) AC_SUBST(VC_MANIFEST_EMBED_EXE) ]) # Local Variables: # mode: autoconf # End: |
Added undroid/Rtcl/tests/all.tcl.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | # all.tcl -- # # This file contains a top-level script to run all of the Tcl # tests. Execute it by invoking "source all.test" when running tcltest # in this directory. # # Copyright (c) 1998-2000 by Scriptics Corporation. # All rights reserved. if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import ::tcltest::* } set ::tcltest::testSingleFile false set ::tcltest::testsDirectory [file dir [info script]] # We need to ensure that the testsDirectory is absolute if {[catch {::tcltest::normalizePath ::tcltest::testsDirectory}]} { # The version of tcltest we have here does not support # 'normalizePath', so we have to do this on our own. set oldpwd [pwd] catch {cd $::tcltest::testsDirectory} set ::tcltest::testsDirectory [pwd] cd $oldpwd } set chan $::tcltest::outputChannel puts $chan "Tests running in interp: [info nameofexecutable]" puts $chan "Tests running with pwd: [pwd]" puts $chan "Tests running in working dir: $::tcltest::testsDirectory" if {[llength $::tcltest::skip] > 0} { puts $chan "Skipping tests that match: $::tcltest::skip" } if {[llength $::tcltest::match] > 0} { puts $chan "Only running tests that match: $::tcltest::match" } if {[llength $::tcltest::skipFiles] > 0} { puts $chan "Skipping test files that match: $::tcltest::skipFiles" } if {[llength $::tcltest::matchFiles] > 0} { puts $chan "Only sourcing test files that match: $::tcltest::matchFiles" } set timeCmd {clock format [clock seconds]} puts $chan "Tests began at [eval $timeCmd]" # source each of the specified tests foreach file [lsort [::tcltest::getMatchingFiles]] { set tail [file tail $file] puts $chan $tail if {[catch {source $file} msg]} { puts $chan $msg } } # cleanup puts $chan "\nTests ended at [eval $timeCmd]" ::tcltest::cleanupTests 1 return |
Added undroid/Rtcl/tests/rtcl.test.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | # Commands covered: rtcl # # This file contains a collection of tests for the Rtcl extension. # Sourcing this file into Tcl runs the tests and generates output for # errors. No output means no errors were found. # # See the file "LICENCE" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # if {$tcl_platform(platform) eq "unix" && $tcl_platform(os) eq "FreeBSD"} { if {[info exists env(LD_LIBRARY_PATH)] == 0} { puts stderr "*** WARNING FOR FreeBSD ***" puts stderr "LD_LIBRARY_PATH must exist and be set to R's runtime LD_LIBRARY_PATH." puts stderr "Expect this test to fail unless LD_LIBRARY_PATH is set accordingly." puts stderr "See Rtcl README file for details.\n" } } if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import ::tcltest::* } # Would typically use "package require Rtcl" but it may not be # installed yet load ./libRtcl1.1.so test eval-1.0 { Evaluate an R expression (successfully) } -body { ::rtcl::eval {sqrt(144)} } -result {} -returnCodes {ok} test eval-1.1 { Evaluate an R expression that cannot be parsed } -body { ::rtcl::eval "x <- c\(0," } -result {R parse error} -returnCodes {error} test eval-1.2 { Evaluate an R expression that results in an error } -body { ::rtcl::eval {dim(z) <- c(3,5,100,foo)} } -result {Error: object 'foo' not found} -returnCodes {error} test source-1.0 { Source an R file (successfully) } -body { ::rtcl::source {tests/source-1.0.R} } -result {} -returnCodes {ok} test source-1.1 { Source an R file (unsuccessfully) } -body { ::rtcl::source {tests/source-1.1.R} } -result {Error in eval(ei, envir*) :* test of `options(error=expression(NULL))'} -returnCodes {error} test source-1.2 { Source a non-existent R file } -body { ::rtcl::source {tests/source-1.2.R} } -result {Error in file*cannot open the connection} -match {glob} -returnCodes {error} test gettype-1.0 { Get the R data type resulting from an R expression (successful) } -body { set results [list] lappend results [::rtcl::gettype {cat("hello, world")}] lappend results [::rtcl::gettype {1}] lappend results [::rtcl::gettype {as.character(0:9)}] lappend results [::rtcl::gettype {list(name="Fred", wife="Mary", no.children=3, child.ages=c(4,7,9))}] return $results } -result {nil real string vector} -returnCodes {return} test gettype-1.1 { Get the R data type resulting from an R expression (parsing error) } -body { ::rtcl::gettype "x <- c\(0," } -result {R parse error} -returnCodes {error} test gettype-1.2 { Get the R data type resulting from an R expression (expression error) } -body { ::rtcl::gettype {x} } -result {Error: object 'x' not found} -returnCodes {error} test getvalue-1.0 { Get the Tcl values of some R expressions (successful) } -body { set results [list] lappend results [::rtcl::getvalue {c(10, 10, 10)}] lappend results [::rtcl::getvalue {sqrt(144)}] lappend results [::rtcl::getvalue {c(10.4, 5.6, 3.1, 6.4, 21.7) -> m; 1/m;}] lappend results [::rtcl::getvalue {x <- 10; s1 <- rep(x, times=5); s1;}] return $results } -result {{10.0 10.0 10.0} 12.0 {0.09615384615384615 0.17857142857142858 0.3225806451612903 0.15625 0.04608294930875576} {10.0 10.0 10.0 10.0 10.0}} -returnCodes {ok return} test getvalue-1.1 { Get the Tcl value of an R expression (parsing error) } -body { return [::rtcl::getvalue "c\(10, 10, 10"] } -result {R parse error} -returnCodes {error} test getvalue-1.2 { Get the Tcl value of an R expression (expression error) } -body { ::rtcl::getvalue {y} } -result {Error: object 'y' not found} -returnCodes {error} ::tcltest::cleanupTests return |
Added undroid/Rtcl/tests/source-1.0.R.
> > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 | #### Simple integrity tests of the system datasets options(useFancyQuotes=FALSE) env <- as.environment("package:datasets") d <- ls(env) # don't want .names for(f in d) { if (f == "AirPassengers") { cat("\n** structure of dataset ", f, "\n", sep="") str(get(f, envir=env, inherits=FALSE)) } } |
Added undroid/Rtcl/tests/source-1.1.R.
> > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #### STRICT test suite in the spirit of no-segfaults, #### but with explicit statements. options(error=expression(NULL)) stop("test of `options(error=expression(NULL))'") if(FALSE) { ## these ought to work on machines with enough memory ## These segfaulted in 1.3.x , give "could not allocate" errors now integer(2^30+1) double(2^30+1) complex(2^30+1) character(2^30+1) vector("list", 2^30+2) } ## bad infinite recursion / on.exit / ... interactions ## catch the error to permit different error messages emitted ## (handling of infinite recursion is different in the AST interpreter ## and the byte-code interpreter) bar <- function() 1+1 foo <- function() { on.exit(bar()); foo() } tryCatch(foo(), error=function(x) TRUE) # now simple "infinite recursion" |
Changes to undroid/build-undroidwish-freebsd.sh.
︙ | ︙ | |||
85 86 87 88 89 90 91 | SUBDIRS="${SUBDIRS} 3dcanvas tkimg trf tktable tktreectrl tkpath itk v4l2" SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf vu rl_json mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" | | | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | SUBDIRS="${SUBDIRS} 3dcanvas tkimg trf tktable tktreectrl tkpath itk v4l2" SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf vu rl_json mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" SUBDIRS="${SUBDIRS} tcl-fuse Tix openjpeg imgjp2 Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 | ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --with-tk=${HERE}/sdl2tk/sdl --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* ${PFX_HERE}/lib/*/*.so | > > > > > > > > > > > > > > | 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 | ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --with-tk=${HERE}/sdl2tk/sdl --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* ${PFX_HERE}/lib/*/*.so |
︙ | ︙ | |||
1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 | cp -rp ${PFX_HERE}/lib/parse_args* assets cp -rp ${PFX_HERE}/lib/tkvlc* assets cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add shortcuts providing builtin:widget, builtin:tksqlite, etc. ( cd assets echo > widget \ | > | 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 | cp -rp ${PFX_HERE}/lib/parse_args* assets cp -rp ${PFX_HERE}/lib/tkvlc* assets cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add shortcuts providing builtin:widget, builtin:tksqlite, etc. ( cd assets echo > widget \ |
︙ | ︙ |
Changes to undroid/build-undroidwish-generic.sh.
︙ | ︙ | |||
98 99 100 101 102 103 104 105 106 107 108 109 110 111 | SUBDIRS="${SUBDIRS} piio" ;; esac SUBDIRS="${SUBDIRS} libsocketcan tclcan fswatch tserialport tcl-fuse" fi SUBDIRS="${SUBDIRS} topcua parse_args tkvlc tclJBlend Tix openjpeg imgjp2" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { | > | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | SUBDIRS="${SUBDIRS} piio" ;; esac SUBDIRS="${SUBDIRS} libsocketcan tclcan fswatch tserialport tcl-fuse" fi SUBDIRS="${SUBDIRS} topcua parse_args tkvlc tclJBlend Tix openjpeg imgjp2" SUBDIRS="${SUBDIRS} Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 | ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --with-tk=${HERE}/sdl2tk/sdl --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* \ | > > > > > > > > > > > > > > | 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 | ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --with-tk=${HERE}/sdl2tk/sdl --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 ./configure --prefix=${PFX} \ --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* \ |
︙ | ︙ | |||
1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 | cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets if test -d ${PFX_HERE}/lib/fuse* ; then cp -rp ${PFX_HERE}/lib/fuse* assets fi cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets if test "$(uname -o)" = "GNU/Linux" ; then cp -rp ${AWDIR}/undroid/mkappimg assets cp -rp ${AWDIR}/assets/touchcal* assets fi | > | 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 | cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets if test -d ${PFX_HERE}/lib/fuse* ; then cp -rp ${PFX_HERE}/lib/fuse* assets fi cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets if test "$(uname -o)" = "GNU/Linux" ; then cp -rp ${AWDIR}/undroid/mkappimg assets cp -rp ${AWDIR}/assets/touchcal* assets fi |
︙ | ︙ |
Changes to undroid/build-undroidwish-kmsdrm.sh.
︙ | ︙ | |||
90 91 92 93 94 95 96 | SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" | | | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" SUBDIRS="${SUBDIRS} tcl-fuse Tix openjpeg imgjp2 Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 | ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --with-tk=${HERE}/sdl2tk/sdl --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* \ | > > > > > > > > > > > > > > | 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 | ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --with-tk=${HERE}/sdl2tk/sdl --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 ./configure --prefix=${PFX} \ --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* \ |
︙ | ︙ | |||
1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 | cp -rp ${PFX_HERE}/lib/parse_args* assets cp -rp ${PFX_HERE}/lib/tkvlc* assets cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets fi cp -rp ${AWDIR}/assets/touchcal* assets | > | 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 | cp -rp ${PFX_HERE}/lib/parse_args* assets cp -rp ${PFX_HERE}/lib/tkvlc* assets cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets fi cp -rp ${AWDIR}/assets/touchcal* assets |
︙ | ︙ |
Changes to undroid/build-undroidwish-linux32.sh.
︙ | ︙ | |||
91 92 93 94 95 96 97 | SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" | | | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" SUBDIRS="${SUBDIRS} tcl-fuse Tix openjpeg imgjp2 Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 | --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/sdl \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* \ | > > > > > > > > > > > > > > | 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 | --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/sdl \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 ./configure --prefix=${PFX} --build=i586-linux-gnu \ --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* \ |
︙ | ︙ | |||
1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 | cp -rp ${PFX_HERE}/lib/parse_args* assets cp -rp ${PFX_HERE}/lib/tkvlc* assets cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets fi cp -rp ${AWDIR}/assets/touchcal* assets | > | 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 | cp -rp ${PFX_HERE}/lib/parse_args* assets cp -rp ${PFX_HERE}/lib/tkvlc* assets cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets fi cp -rp ${AWDIR}/assets/touchcal* assets |
︙ | ︙ |
Changes to undroid/build-undroidwish-linux64.sh.
︙ | ︙ | |||
91 92 93 94 95 96 97 | SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" | | | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" SUBDIRS="${SUBDIRS} tcl-fuse Tix openjpeg imgjp2 Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 | --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/sdl \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* \ | > > > > > > > > > > > > > > | 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 | --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/sdl \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 ./configure --prefix=${PFX} --build=x86_64-linux-gnu \ --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* \ |
︙ | ︙ | |||
1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 | cp -rp ${PFX_HERE}/lib/parse_args* assets cp -rp ${PFX_HERE}/lib/tkvlc* assets cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets fi cp -rp ${AWDIR}/assets/touchcal* assets | > | 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 | cp -rp ${PFX_HERE}/lib/parse_args* assets cp -rp ${PFX_HERE}/lib/tkvlc* assets cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets fi cp -rp ${AWDIR}/assets/touchcal* assets |
︙ | ︙ |
Changes to undroid/build-undroidwish-wayland.sh.
︙ | ︙ | |||
90 91 92 93 94 95 96 | SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" | | | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | SUBDIRS="${SUBDIRS} tkhtml dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" SUBDIRS="${SUBDIRS} tcl-fuse Tix openjpeg imgjp2 Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 | ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --with-tk=${HERE}/sdl2tk/sdl --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* \ | > > > > > > > > > > > > > > | 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 | ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --with-tk=${HERE}/sdl2tk/sdl --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 ./configure --prefix=${PFX} \ --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/sdl2wish* \ |
︙ | ︙ | |||
1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 | cp -rp ${PFX_HERE}/lib/parse_args* assets cp -rp ${PFX_HERE}/lib/tkvlc* assets cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets fi cp -rp ${AWDIR}/assets/touchcal* assets | > | 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 | cp -rp ${PFX_HERE}/lib/parse_args* assets cp -rp ${PFX_HERE}/lib/tkvlc* assets cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets fi cp -rp ${AWDIR}/assets/touchcal* assets |
︙ | ︙ |
Changes to undroid/build-vanilla-freebsd.sh.
︙ | ︙ | |||
85 86 87 88 89 90 91 | SUBDIRS="${SUBDIRS} tkimg trf tktable tktreectrl tkpath itk v4l2 tkhtml" SUBDIRS="${SUBDIRS} dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf vu rl_json tkdnd mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus parse_args" SUBDIRS="${SUBDIRS} tserialport tcl-fuse topcua tkvlc tclJBlend twv Tix" | | | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | SUBDIRS="${SUBDIRS} tkimg trf tktable tktreectrl tkpath itk v4l2 tkhtml" SUBDIRS="${SUBDIRS} dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf vu rl_json tkdnd mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus parse_args" SUBDIRS="${SUBDIRS} tserialport tcl-fuse topcua tkvlc tclJBlend twv Tix" SUBDIRS="${SUBDIRS} openjpeg imgjp2 Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 | ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --with-tk=${HERE}/sdl2tk/unix --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.so \ | > > > > > > > > > > > > > > | 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 | ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --with-tk=${HERE}/sdl2tk/unix --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/unix \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.so \ |
︙ | ︙ | |||
1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 | cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/twv* assets cp -rp ${AWDIR}/undroid/tsb* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add stripped down TDK cp -rp ${AWDIR}/undroid/TDK assets # add shortcuts providing builtin:widget, builtin:tksqlite, etc. ( | > | 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 | cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/twv* assets cp -rp ${AWDIR}/undroid/tsb* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add stripped down TDK cp -rp ${AWDIR}/undroid/TDK assets # add shortcuts providing builtin:widget, builtin:tksqlite, etc. ( |
︙ | ︙ |
Changes to undroid/build-vanilla-generic.sh.
︙ | ︙ | |||
102 103 104 105 106 107 108 109 110 111 112 113 114 115 | fi if pkg-config --exists webkit2gtk-4.0 ; then SUBDIRS="${SUBDIRS} twv" fi SUBDIRS="${SUBDIRS} topcua parse_args tkvlc tclJBlend Tix openjpeg imgjp2" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { | > | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | fi if pkg-config --exists webkit2gtk-4.0 ; then SUBDIRS="${SUBDIRS} twv" fi SUBDIRS="${SUBDIRS} topcua parse_args tkvlc tclJBlend Tix openjpeg imgjp2" SUBDIRS="${SUBDIRS} Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 | --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/unix \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.so \ | > > > > > > > > > > > > > > | 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 | --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/unix \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 ./configure --prefix=${PFX} \ --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.so \ |
︙ | ︙ | |||
1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 | fi if test -d ${PFX_HERE}/lib/twv* ; then cp -rp ${PFX_HERE}/lib/twv* assets cp -rp ${AWDIR}/undroid/tsb* assets fi cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add stripped down TDK cp -rp ${AWDIR}/undroid/TDK assets if test "$(uname -o)" = "GNU/Linux" ; then cp -rp ${AWDIR}/undroid/mkappimg assets | > | 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 | fi if test -d ${PFX_HERE}/lib/twv* ; then cp -rp ${PFX_HERE}/lib/twv* assets cp -rp ${AWDIR}/undroid/tsb* assets fi cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add stripped down TDK cp -rp ${AWDIR}/undroid/TDK assets if test "$(uname -o)" = "GNU/Linux" ; then cp -rp ${AWDIR}/undroid/mkappimg assets |
︙ | ︙ |
Changes to undroid/build-vanilla-linux32.sh.
︙ | ︙ | |||
90 91 92 93 94 95 96 | SUBDIRS="${SUBDIRS} dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json tkdnd mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" | | | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | SUBDIRS="${SUBDIRS} dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json tkdnd mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" SUBDIRS="${SUBDIRS} tcl-fuse twv Tix openjpeg imgjp2 Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 | --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/unix \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.so \ | > > > > > > > > > > > > > > | 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 | --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/unix \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 ./configure --prefix=${PFX} --build=i586-linux-gnu \ --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.so \ |
︙ | ︙ | |||
1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 | cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/twv* assets cp -rp ${AWDIR}/undroid/tsb* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add stripped down TDK cp -rp ${AWDIR}/undroid/TDK assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets | > | 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 | cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/twv* assets cp -rp ${AWDIR}/undroid/tsb* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add stripped down TDK cp -rp ${AWDIR}/undroid/TDK assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets |
︙ | ︙ |
Changes to undroid/build-vanilla-linux64.sh.
︙ | ︙ | |||
90 91 92 93 94 95 96 | SUBDIRS="${SUBDIRS} dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json tkdnd mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" | | | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | SUBDIRS="${SUBDIRS} dbus-tcl dbus-intf tclx libdmtx ZBar zint" SUBDIRS="${SUBDIRS} tcl-augeas tktray snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf libsocketcan tclcan vu" SUBDIRS="${SUBDIRS} rl_json tkdnd mpexpr" SUBDIRS="${SUBDIRS} tclcsv tkzinc libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus fswatch" SUBDIRS="${SUBDIRS} tserialport topcua parse_args tkvlc tclJBlend" SUBDIRS="${SUBDIRS} tcl-fuse twv Tix openjpeg imgjp2 Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 | --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/unix \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.so \ | > > > > > > > > > > > > > > | 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 | --with-tcl=${HERE}/tcl/unix --with-tk=${HERE}/sdl2tk/unix \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 ./configure --prefix=${PFX} --build=x86_64-linux-gnu \ --with-tcl=${HERE}/tcl/unix --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.so \ |
︙ | ︙ | |||
1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 | cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/twv* assets cp -rp ${AWDIR}/undroid/tsb* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add stripped down TDK cp -rp ${AWDIR}/undroid/TDK assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets | > | 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 | cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/twv* assets cp -rp ${AWDIR}/undroid/tsb* assets cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add stripped down TDK cp -rp ${AWDIR}/undroid/TDK assets if test "$ACTION" != "ebuild" ; then cp -rp ${AWDIR}/undroid/mkappimg assets |
︙ | ︙ |
Changes to undroid/build-vanilla-macosx.sh.
︙ | ︙ | |||
91 92 93 94 95 96 97 | SUBDIRS="${SUBDIRS} 3dcanvas tkimg trf tktable tktreectrl tkpath itk tkhtml" SUBDIRS="${SUBDIRS} dbus-tcl dbus-intf tclx libdmtx ZBar zint tcl-augeas" SUBDIRS="${SUBDIRS} snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf vu rl_json tkdnd mpexpr" SUBDIRS="${SUBDIRS} tclcsv libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus tserialport" SUBDIRS="${SUBDIRS} topcua parse_args tkvlc tcl-fuse tclJBlend twv" | | | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | SUBDIRS="${SUBDIRS} 3dcanvas tkimg trf tktable tktreectrl tkpath itk tkhtml" SUBDIRS="${SUBDIRS} dbus-tcl dbus-intf tclx libdmtx ZBar zint tcl-augeas" SUBDIRS="${SUBDIRS} snack tkvnc tksvg VecTcl tclral" SUBDIRS="${SUBDIRS} tclepeg tcluvc xotcl nsf vu rl_json tkdnd mpexpr" SUBDIRS="${SUBDIRS} tclcsv libffi ffidl tcl-lmdb DiffUtilTcl" SUBDIRS="${SUBDIRS} tclparser tclcompiler snap7 libmodbus tserialport" SUBDIRS="${SUBDIRS} topcua parse_args tkvlc tcl-fuse tclJBlend twv" SUBDIRS="${SUBDIRS} Tix openjpeg imgjp2 Rtcl" ACTION="$1" if test -z "$ACTION" ; then ACTION=build fi clean_build_stamps() { |
︙ | ︙ | |||
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 | --with-tcl=${HERE}/tcl/macosx --with-tk=${HERE}/sdl2tk/macosx \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.dylib \ | > > > > > > > > > > > > > > > | 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 | --with-tcl=${HERE}/tcl/macosx --with-tk=${HERE}/sdl2tk/macosx \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "build Rtcl ... " ( exec 3>&1 exec >> build.log 2>&1 cd Rtcl test -e build-stamp && echo >&3 "already done" && exit 0 LDFLAGS="-Wl,-undefined,dynamic_lookup -Wl,-flat_namespace" \ ./configure --prefix=${PFX} --with-tcl=${HERE}/tcl/macosx \ --enable-threads || exit 1 make || exit 1 make install-binaries install-libraries DESTDIR=${HERE} || exit 1 touch build-stamp echo >&3 "done" ) || fail echo -n "strip binaries ... " ( exec 3>&1 exec >> build.log 2>&1 set -x $STRIP ${PFX_HERE}/bin/tclsh* ${PFX_HERE}/bin/wish* ${PFX_HERE}/lib/*.dylib \ |
︙ | ︙ | |||
1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 | cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/twv* assets cp -rp ${AWDIR}/undroid/tsb assets/tsb0 cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add stripped down TDK cp -rp ${AWDIR}/undroid/TDK assets # add shortcuts providing builtin:widget, builtin:tksqlite, etc. ( | > | 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 | cp -rp ${PFX_HERE}/lib/tclJBlend* assets cp -rp ${AWDIR}/assets/tdbcjdbc* assets cp -rp ${PFX_HERE}/lib/fuse* assets cp -rp ${PFX_HERE}/lib/twv* assets cp -rp ${AWDIR}/undroid/tsb assets/tsb0 cp -rp ${PFX_HERE}/lib/Tix* assets cp -rp ${PFX_HERE}/lib/imgjp2* assets cp -rp ${PFX_HERE}/lib/Rtcl* assets cp -rp ${AWDIR}/assets/ooxml* assets cp -rp ${AWDIR}/assets/yeti* assets cp -rp ${AWDIR}/assets/calc* assets # add stripped down TDK cp -rp ${AWDIR}/undroid/TDK assets # add shortcuts providing builtin:widget, builtin:tksqlite, etc. ( |
︙ | ︙ |