Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/curl/packages/vms/config_h.com @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 $! File: config_h.com | |
| 2 $! | |
| 3 $! $Id: config_h.com,v 1.1.1.1 2012/12/02 19:25:21 wb8tyw Exp $ | |
| 4 $! | |
| 5 $! This procedure attempts to figure out how to build a config.h file | |
| 6 $! for the current project. | |
| 7 $! | |
| 8 $! P1 specifies the config.h.in file or equivalent. If it is not specified | |
| 9 $! then this procedure will search for several common names of the file. | |
| 10 $! | |
| 11 $! The CONFIGURE shell script will be examined for hints and a few symbols | |
| 12 $! but most of the tests will not produce valid results on OpenVMS. Some | |
| 13 $! will produce false positives and some will produce false negatives. | |
| 14 $! | |
| 15 $! It is easier to just read the config.h_in file and make up tests based | |
| 16 $! on what is in it! | |
| 17 $! | |
| 18 $! This file will create an empty config_vms.h file if one does not exist. | |
| 19 $! The config_vms.h is intended for manual edits to handle things that | |
| 20 $! this procedure can not. | |
| 21 $! | |
| 22 $! The config_vms.h will be invoked by the resulting config.h file. | |
| 23 $! | |
| 24 $! This procedure knows about the DEC C RTL on the system it is on. | |
| 25 $! Future versions may be handle the GNV, the OpenVMS porting library, | |
| 26 $! and others. | |
| 27 $! | |
| 28 $! This procedure may not guess the options correctly for all architectures, | |
| 29 $! and is a work in progress. | |
| 30 $! | |
| 31 $! Copyright 2011, John Malmberg | |
| 32 $! | |
| 33 $! Permission to use, copy, modify, and/or distribute this software for any | |
| 34 $! purpose with or without fee is hereby granted, provided that the above | |
| 35 $! copyright notice and this permission notice appear in all copies. | |
| 36 $! | |
| 37 $! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| 38 $! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| 39 $! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| 40 $! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
| 41 $! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
| 42 $! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT | |
| 43 $! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
| 44 $! | |
| 45 $! 15-Jan-2001 J. Malmberg Original | |
| 46 $! 29-Apr-2001 J. Malmberg Also look for config.*in* in a [.include] | |
| 47 $! subdirectory | |
| 48 $! 30-Apr-2001 J. Malmberg Update for SAMBA checks | |
| 49 $! 09-Apr-2005 J. Malmberg Update for RSYNC and large file. | |
| 50 $! 29-Sep-2011 J. Malmberg Update for Bash 4.2 | |
| 51 $! 01-Mar-2012 J. Malmberg Warn about getcwd(0,0) | |
| 52 $! 21-Dec-2012 J. Malmberg Update for gawk | |
| 53 $! 29-Dec-2012 J. Malmberg Update for curl | |
| 54 $!============================================================================ | |
| 55 $! | |
| 56 $ss_normal = 1 | |
| 57 $ss_abort = 44 | |
| 58 $ss_control_y = 1556 | |
| 59 $status = ss_normal | |
| 60 $on control_y then goto control_y | |
| 61 $on warning then goto general_error | |
| 62 $!on warning then set ver | |
| 63 $! | |
| 64 $! Some information for writing timestamps to created files | |
| 65 $!---------------------------------------------------------- | |
| 66 $my_proc = f$environment("PROCEDURE") | |
| 67 $my_proc_file = f$parse(my_proc,,,"NAME") + f$parse(my_proc,,,"TYPE") | |
| 68 $tab[0,8] = 9 | |
| 69 $datetime = f$element(0,".",f$cvtime(,"ABSOLUTE","DATETIME")) | |
| 70 $username = f$edit(f$getjpi("","USERNAME"),"TRIM") | |
| 71 $! | |
| 72 $pid = f$getjpi("","PID") | |
| 73 $tfile1 = "SYS$SCRATCH:config_h_temp1_''pid'.TEMP" | |
| 74 $dchfile = "SYS$SCRATCH:config_h_decc_''pid'.TEMP" | |
| 75 $starhfile = "SYS$SCRATCH:config_h_starlet_''pid'.TEMP" | |
| 76 $configure_script = "SYS$SCRATCH:configure_script_''pid'.TEMP" | |
| 77 $! | |
| 78 $! Get the system type | |
| 79 $!---------------------- | |
| 80 $arch_type = f$getsyi("arch_type") | |
| 81 $! | |
| 82 $! Does config_vms.h exist? | |
| 83 $!------------------------- | |
| 84 $update_config_vms = 0 | |
| 85 $file = f$search("sys$disk:[]config_vms.h") | |
| 86 $if file .nes. "" | |
| 87 $then | |
| 88 $ write sys$output "Found existing custom file ''file'." | |
| 89 $else | |
| 90 $ update_config_vms = 1 | |
| 91 $ write sys$output "Creating new sys$disk:[]config_vms.h for you." | |
| 92 $ gosub write_config_vms | |
| 93 $endif | |
| 94 $! | |
| 95 $! | |
| 96 $! On some platforms, DCL search has problems with searching a file | |
| 97 $! on a NFS mounted volume. So copy it to sys$scratch: | |
| 98 $! | |
| 99 $if f$search(configure_script) .nes. "" then delete 'configure_script';* | |
| 100 $copy sys$disk:[]configure 'configure_script' | |
| 101 $! | |
| 102 $ssl_header_dir = "OPENSSL:" | |
| 103 $if f$trnlnm("OPENSSL") .eqs. "" | |
| 104 $then | |
| 105 $ ssl_header_dir = "SSL$INCLUDE:" | |
| 106 $endif | |
| 107 $! | |
| 108 $! | |
| 109 $! Write out the header | |
| 110 $!---------------------- | |
| 111 $gosub write_config_h_header | |
| 112 $! | |
| 113 $! | |
| 114 $! | |
| 115 $! config.h.in could have at least five different names depending | |
| 116 $! on how it was transferred to OpenVMS | |
| 117 $!------------------------------------------------------------------ | |
| 118 $if p1 .nes. "" | |
| 119 $then | |
| 120 $ cfile = p1 | |
| 121 $else | |
| 122 $ cfile = f$search("sys$disk:[]config.h.in") | |
| 123 $ if cfile .eqs. "" | |
| 124 $ then | |
| 125 $ cfile = f$search("sys$disk:[]config.h_in") | |
| 126 $ if cfile .eqs. "" | |
| 127 $ then | |
| 128 $ cfile = f$search("sys$disk:[]configh.in") | |
| 129 $ if cfile .eqs. "" | |
| 130 $ then | |
| 131 $ cfile = f$search("sys$disk:[]config__2eh.in") | |
| 132 $ if cfile .eqs. "" | |
| 133 $ then | |
| 134 $ cfile = f$search("sys$disk:[]config.h__2ein") | |
| 135 $ endif | |
| 136 $ endif | |
| 137 $ endif | |
| 138 $ endif | |
| 139 $endif | |
| 140 $if f$trnlnm("PRJ_INCLUDE") .nes. "" | |
| 141 $then | |
| 142 $ cfile = f$search("PRJ_INCLUDE:config.h.in") | |
| 143 $ if cfile .eqs. "" | |
| 144 $ then | |
| 145 $ cfile = f$search("PRJ_INCLUDE:config.h_in") | |
| 146 $ if cfile .eqs. "" | |
| 147 $ then | |
| 148 $ cfile = f$search("PRJ_INCLUDE:config__2eh.in") | |
| 149 $ if cfile .eqs. "" | |
| 150 $ then | |
| 151 $ cfile = f$search("PRJ_INCLUDE:config__2eh.in") | |
| 152 $ if cfile .eqs. "" | |
| 153 $ then | |
| 154 $ cfile = f$search("PRJ_INCLUDE:config.h__2ein") | |
| 155 $ endif | |
| 156 $ endif | |
| 157 $ endif | |
| 158 $ endif | |
| 159 $endif | |
| 160 $if cfile .eqs. "" | |
| 161 $then | |
| 162 $ write sys$output "Can not find sys$disk:config.h.in" | |
| 163 $ line_out = "Looked for config.h.in, config.h_in, configh.in, " | |
| 164 $ line_out = line_out + "config__2eh.in, config.h__2ein" | |
| 165 $ write/symbol sys$output line_out | |
| 166 $ if f$trnlnm("PRJ_INCLUDE") .nes. "" | |
| 167 $ then | |
| 168 $ write sys$output "Also looked in PRJ_INCLUDE: for these files." | |
| 169 $ endif | |
| 170 $! | |
| 171 $ write tf "" | |
| 172 $ write tf - | |
| 173 " /* Could not find sys$disk:config.h.in */" | |
| 174 $ write tf - | |
| 175 " /* Looked also for config.h_in, configh.in, config__2eh.in, */" | |
| 176 $ write tf - | |
| 177 " /* config.h__2ein */" | |
| 178 $ if f$trnlnm("PRJ_INCLUDE") .nes. "" | |
| 179 $ then | |
| 180 $ write tf - | |
| 181 " /* Also looked in PRJ_INCLUDE: for these files. */" | |
| 182 $ endif | |
| 183 $ write tf - | |
| 184 "/*--------------------------------------------------------------*/ | |
| 185 $ write tf "" | |
| 186 $ goto write_tail | |
| 187 $endif | |
| 188 $! | |
| 189 $! | |
| 190 $! Locate the DECC libraries in use | |
| 191 $!----------------------------------- | |
| 192 $decc_rtldef = f$parse("decc$rtldef","sys$library:.tlb;0") | |
| 193 $decc_starletdef = f$parse("sys$starlet_c","sys$library:.tlb;0") | |
| 194 $decc_shr = f$parse("decc$shr","sys$share:.exe;0") | |
| 195 $! | |
| 196 $! Dump the DECC header names into a file | |
| 197 $!---------------------------------------- | |
| 198 $if f$search(dchfile) .nes. "" then delete 'dchfile';* | |
| 199 $if f$search(tfile1) .nes. "" then delete 'tfile1';* | |
| 200 $define/user sys$output 'tfile1' | |
| 201 $library/list 'decc_rtldef' | |
| 202 $open/read/error=rtldef_loop1_end tf1 'tfile1' | |
| 203 $open/write/error=rtldef_loop1_end tf2 'dchfile' | |
| 204 $rtldef_loop1: | |
| 205 $ read/end=rtldef_loop1_end tf1 line_in | |
| 206 $ line_in = f$edit(line_in,"TRIM,COMPRESS") | |
| 207 $ key1 = f$element(0," ",line_in) | |
| 208 $ key2 = f$element(1," ",line_in) | |
| 209 $ if key1 .eqs. " " .or. key1 .eqs. "" then goto rtldef_loop1 | |
| 210 $ if key2 .nes. " " .and. key2 .nes. "" then goto rtldef_loop1 | |
| 211 $ write tf2 "|",key1,"|" | |
| 212 $ goto rtldef_loop1 | |
| 213 $rtldef_loop1_end: | |
| 214 $if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1 | |
| 215 $if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2 | |
| 216 $if f$search(tfile1) .nes. "" then delete 'tfile1';* | |
| 217 $! | |
| 218 $! Dump the STARLET header names into a file | |
| 219 $!---------------------------------------- | |
| 220 $if f$search(starhfile) .nes. "" then delete 'starhfile';* | |
| 221 $if f$search(tfile1) .nes. "" then delete 'tfile1';* | |
| 222 $define/user sys$output 'tfile1' | |
| 223 $library/list 'decc_starletdef' | |
| 224 $open/read/error=stardef_loop1_end tf1 'tfile1' | |
| 225 $open/write/error=stardef_loop1_end tf2 'starhfile' | |
| 226 $stardef_loop1: | |
| 227 $ read/end=stardef_loop1_end tf1 line_in | |
| 228 $ line_in = f$edit(line_in,"TRIM,COMPRESS") | |
| 229 $ key1 = f$element(0," ",line_in) | |
| 230 $ key2 = f$element(1," ",line_in) | |
| 231 $ if key1 .eqs. " " .or. key1 .eqs. "" then goto stardef_loop1 | |
| 232 $ if key2 .nes. " " .and. key2 .nes. "" then goto stardef_loop1 | |
| 233 $ write tf2 "|",key1,"|" | |
| 234 $ goto stardef_loop1 | |
| 235 $stardef_loop1_end: | |
| 236 $if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1 | |
| 237 $if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2 | |
| 238 $if f$search(tfile1) .nes. "" then delete 'tfile1';* | |
| 239 $! | |
| 240 $! | |
| 241 $! Now calculate what should be in the file from reading | |
| 242 $! config.h.in and CONFIGURE. | |
| 243 $!--------------------------------------------------------------- | |
| 244 $open/read inf 'cfile' | |
| 245 $do_comment = 0 | |
| 246 $if_block = 0 | |
| 247 $cfgh_in_loop1: | |
| 248 $!set nover | |
| 249 $ read/end=cfgh_in_loop1_end inf line_in | |
| 250 $ xline = f$edit(line_in,"TRIM,COMPRESS") | |
| 251 $! | |
| 252 $! Blank line handling | |
| 253 $!--------------------- | |
| 254 $ if xline .eqs. "" | |
| 255 $ then | |
| 256 $ write tf "" | |
| 257 $ goto cfgh_in_loop1 | |
| 258 $ endif | |
| 259 $ xlen = f$length(xline) | |
| 260 $ key = f$extract(0,2,xline) | |
| 261 $! | |
| 262 $! deal with comments by copying exactly | |
| 263 $!----------------------------------------- | |
| 264 $ if (do_comment .eq. 1) .or. (key .eqs. "/*") | |
| 265 $ then | |
| 266 $ do_comment = 1 | |
| 267 $ write tf line_in | |
| 268 $ key = f$extract(xlen - 2, 2, xline) | |
| 269 $ if key .eqs. "*/" then do_comment = 0 | |
| 270 $ goto cfgh_in_loop1 | |
| 271 $ endif | |
| 272 $! | |
| 273 $! Some quick parsing | |
| 274 $!---------------------- | |
| 275 $ keyif = f$extract(0,3,xline) | |
| 276 $ key1 = f$element(0," ",xline) | |
| 277 $ key2 = f$element(1," ",xline) | |
| 278 $ key2a = f$element(0,"_",key2) | |
| 279 $ key2b = f$element(1,"_",key2) | |
| 280 $ key2_len = f$length(key2) | |
| 281 $ key2_h = f$extract(key2_len - 2, 2, key2) | |
| 282 $ key2_t = f$extract(key2_len - 5, 5, key2) | |
| 283 $ if key2_t .eqs. "_TYPE" then key2_h = "_T" | |
| 284 $ key64 = 0 | |
| 285 $ if f$locate("64", xline) .lt. xlen then key64 = 1 | |
| 286 $! | |
| 287 $!write sys$output "xline = ''xline'" | |
| 288 $! | |
| 289 $! Comment out this section of the ifblock | |
| 290 $!----------------------------------------- | |
| 291 $ if if_block .ge. 3 | |
| 292 $ then | |
| 293 $ write tf "/* ", xline, " */" | |
| 294 $ if keyif .eqs. "#en" then if_block = 0 | |
| 295 $ goto cfgh_in_loop1 | |
| 296 $ endif | |
| 297 $! | |
| 298 $! Handle the end of an ifblock | |
| 299 $!------------------------------- | |
| 300 $ if keyif .eqs. "#en" | |
| 301 $ then | |
| 302 $ write tf xline | |
| 303 $ if_block = 0 | |
| 304 $ goto cfgh_in_loop1 | |
| 305 $ endif | |
| 306 $! | |
| 307 $ if key1 .eqs. "#ifndef" | |
| 308 $ then | |
| 309 $! Manual check for _ALL_SOURCE on AIX error | |
| 310 $!----------------------------------------------- | |
| 311 $ if key2 .eqs. "_ALL_SOURCE" | |
| 312 $ then | |
| 313 $ write tf "/* ", xline, " */" | |
| 314 $! | |
| 315 $! Ignore the rest of the block | |
| 316 $!-------------------------------------- | |
| 317 $ if_block = 3 | |
| 318 $ goto cfgh_in_loop1 | |
| 319 $ endif | |
| 320 $ endif | |
| 321 $! | |
| 322 $! | |
| 323 $! Default action for an #if/#else/#endif | |
| 324 $!------------------------------------------ | |
| 325 $ if keyif .eqs. "#if" .or. keyif .eqs. "#el" | |
| 326 $ then | |
| 327 $ if_block = 1 | |
| 328 $ write tf xline | |
| 329 $ goto cfgh_in_loop1 | |
| 330 $ endif | |
| 331 $! | |
| 332 $! | |
| 333 $! Process "normal?" stuff | |
| 334 $!--------------------------- | |
| 335 $ if key1 .eqs. "#undef" | |
| 336 $ then | |
| 337 $ key2c = f$element(2, "_", key2) | |
| 338 $ if (key2c .eqs. "_") .or. (key2c .eqs. "H") then key2c = "" | |
| 339 $ key2d = f$element(3, "_", key2) | |
| 340 $ if (key2d .eqs. "_") .or. (key2d .eqs. "H") then key2d = "" | |
| 341 $ key2e = f$element(4, "_", key2) | |
| 342 $ if (key2e .eqs. "_") .or. (key2e .eqs. "H") then key2e = "" | |
| 343 $ if key2d .eqs. "T" | |
| 344 $ then | |
| 345 $ if key2e .eqs. "TYPE" | |
| 346 $ then | |
| 347 $ key2_h = "_T" | |
| 348 $ key2d = "" | |
| 349 $ endif | |
| 350 $ endif | |
| 351 $! | |
| 352 $ double_under = 0 | |
| 353 $! | |
| 354 $! Process FCNTL directives | |
| 355 $!------------------------------------- | |
| 356 $ if (key2b .eqs. "FCNTL") .and. (key2c .eqs. "O") .and. - | |
| 357 (key2d .eqs. "NONBLOCK") | |
| 358 $ then | |
| 359 $ write tf "#ifndef ''key2'" | |
| 360 $ write tf "#define ''key2' 1" | |
| 361 $ write tf "#endif" | |
| 362 $ goto cfgh_in_loop1 | |
| 363 $ endif | |
| 364 $! | |
| 365 $! Process GETADDRINFO directives | |
| 366 $!------------------------------------- | |
| 367 $ if key2 .eqs. "GETADDRINFO_THREADSAFE" | |
| 368 $ then | |
| 369 $ write tf "#ifndef ''key2'" | |
| 370 $ write tf "#define ''key2' 1" | |
| 371 $ write tf "#endif" | |
| 372 $ goto cfgh_in_loop1 | |
| 373 $ endif | |
| 374 $! | |
| 375 $! Process IOCTL directives | |
| 376 $!------------------------------------- | |
| 377 $ if (key2b .eqs. "IOCTL") .and. (key2c .nes. "") | |
| 378 $ then | |
| 379 $ if (key2c .eqs. "FIONBIO") .or. (key2c .eqs. "SIOCGIFADDR") | |
| 380 $ then | |
| 381 $ write tf "#ifndef ''key2'" | |
| 382 $ write tf "#define ''key2' 1" | |
| 383 $ write tf "#endif" | |
| 384 $ goto cfgh_in_loop1 | |
| 385 $ endif | |
| 386 $ endif | |
| 387 $! | |
| 388 $! | |
| 389 $! Manual check for LL on | |
| 390 $!----------------------------------------------- | |
| 391 $ if key2 .eqs. "LL" | |
| 392 $ then | |
| 393 $ write tf "#ifndef __VAX | |
| 394 $ write tf "#define HAVE_''key2' 1" | |
| 395 $ write tf "#endif" | |
| 396 $ goto cfgh_in_loop1 | |
| 397 $ endif | |
| 398 $! | |
| 399 $ if key2 .eqs. "bool_t" | |
| 400 $ then | |
| 401 $ write tf "#ifndef ''key2'" | |
| 402 $ write tf "#define ''key2' short" | |
| 403 $ write tf "#endif" | |
| 404 $ goto cfgh_in_loop1 | |
| 405 $ endif | |
| 406 $! | |
| 407 $ if key2 .eqs. "bits16_t" | |
| 408 $ then | |
| 409 $ write tf "#ifndef ''key2'" | |
| 410 $ write tf "#define ''key2' short" | |
| 411 $ write tf "#endif" | |
| 412 $ goto cfgh_in_loop1 | |
| 413 $ endif | |
| 414 $! | |
| 415 $ if key2 .eqs. "u_bits16_t" | |
| 416 $ then | |
| 417 $ write tf "#ifndef ''key2'" | |
| 418 $ write tf "#define ''key2' unsigned short" | |
| 419 $ write tf "#endif" | |
| 420 $ goto cfgh_in_loop1 | |
| 421 $ endif | |
| 422 $! | |
| 423 $ if key2 .eqs. "bits32_t" | |
| 424 $ then | |
| 425 $ write tf "#ifndef ''key2'" | |
| 426 $ write tf "#define ''key2' int" | |
| 427 $ write tf "#endif" | |
| 428 $ goto cfgh_in_loop1 | |
| 429 $ endif | |
| 430 $! | |
| 431 $ if key2 .eqs. "u_bits32_t" | |
| 432 $ then | |
| 433 $ write tf "#ifndef ''key2'" | |
| 434 $ write tf "#define ''key2' unsigned int" | |
| 435 $ write tf "#endif" | |
| 436 $ goto cfgh_in_loop1 | |
| 437 $ endif | |
| 438 $! | |
| 439 $ if key2 .eqs. "intmax_t" | |
| 440 $ then | |
| 441 $ write tf "#ifndef ''key2'" | |
| 442 $ write tf "#ifdef __VAX" | |
| 443 $ write tf "#define ''key2' long" | |
| 444 $ write tf "#else" | |
| 445 $ write tf "#define ''key2' long long" | |
| 446 $ write tf "#endif" | |
| 447 $ write tf "#endif" | |
| 448 $ goto cfgh_in_loop1 | |
| 449 $ endif | |
| 450 $! | |
| 451 $ if key2 .eqs. "uintmax_t" | |
| 452 $ then | |
| 453 $ write tf "#ifndef ''key2'" | |
| 454 $ write tf "#ifdef __VAX" | |
| 455 $ write tf "#define ''key2' unsigned long" | |
| 456 $ write tf "#else" | |
| 457 $ write tf "#define ''key2' unsigned long long" | |
| 458 $ write tf "#endif" | |
| 459 $ write tf "#endif" | |
| 460 $ goto cfgh_in_loop1 | |
| 461 $ endif | |
| 462 $! | |
| 463 $ if key2 .eqs. "socklen_t" | |
| 464 $ then | |
| 465 $ write tf "#ifndef ''key2'" | |
| 466 $ write tf "#define ''key2' int" | |
| 467 $ write tf "#endif" | |
| 468 $ goto cfgh_in_loop1 | |
| 469 $ endif | |
| 470 $! | |
| 471 $ if key2 .eqs. "GETGROUPS_T" | |
| 472 $ then | |
| 473 $ write tf "#ifndef ''key2'" | |
| 474 $ write tf "#define ''key2' gid_t" | |
| 475 $ write tf "#endif" | |
| 476 $ goto cfgh_in_loop1 | |
| 477 $ endif | |
| 478 $! | |
| 479 $ if key2 .eqs. "HAVE_DECL_SYS_SIGLIST" | |
| 480 $ then | |
| 481 $ write tf "#ifndef ''key2'" | |
| 482 $ write tf "#define ''key2' 0" | |
| 483 $ write tf "#endif" | |
| 484 $ goto cfgh_in_loop1 | |
| 485 $ endif | |
| 486 $! | |
| 487 $ if key2 .eqs. "HAVE_SYS_ERRLIST" | |
| 488 $ then | |
| 489 $ write tf "#ifndef ''key2'" | |
| 490 $ write tf "#define ''key2' 1" | |
| 491 $ write tf "#endif" | |
| 492 $ goto cfgh_in_loop1 | |
| 493 $ endif | |
| 494 $! | |
| 495 $ if key2 .eqs. "HAVE_STRUCT_DIRENT_D_INO" | |
| 496 $ then | |
| 497 $ write tf "#ifndef ''key2'" | |
| 498 $ write tf "#define ''key2' 1" | |
| 499 $ write tf "#endif" | |
| 500 $ goto cfgh_in_loop1 | |
| 501 $ endif | |
| 502 $! | |
| 503 $ if key2 .eqs. "HAVE_STRUCT_TIMEVAL" | |
| 504 $ then | |
| 505 $ write tf "#ifndef ''key2'" | |
| 506 $ write tf "#define ''key2' 1" | |
| 507 $ write tf "#endif" | |
| 508 $ goto cfgh_in_loop1 | |
| 509 $ endif | |
| 510 $! | |
| 511 $! ! The header files have this information, however | |
| 512 $! ! The ioctl() call only works on sockets. | |
| 513 $! if key2 .eqs. "FIONREAD_IN_SYS_IOCTL" | |
| 514 $! then | |
| 515 $! write tf "#ifndef ''key2'" | |
| 516 $! write tf "#define ''key2' 1" | |
| 517 $! write tf "#endif" | |
| 518 $! goto cfgh_in_loop1 | |
| 519 $! endif | |
| 520 $! | |
| 521 $! ! The header files have this information, however | |
| 522 $! ! The ioctl() call only works on sockets. | |
| 523 $! if key2 .eqs. "GWINSZ_IN_SYS_IOCTL" | |
| 524 $! then | |
| 525 $! write tf "#ifndef ''key2'" | |
| 526 $! write tf "#define ''key2' 1" | |
| 527 $! write tf "#endif" | |
| 528 $! goto cfgh_in_loop1 | |
| 529 $! endif | |
| 530 $! | |
| 531 $! ! The header files have this information, however | |
| 532 $! ! The ioctl() call only works on sockets. | |
| 533 $! if key2 .eqs. "STRUCT_WINSIZE_IN_SYS_IOCTL" | |
| 534 $! then | |
| 535 $! write tf "#ifndef ''key2'" | |
| 536 $! write tf "#define ''key2' 0" | |
| 537 $! write tf "#endif" | |
| 538 $! goto cfgh_in_loop1 | |
| 539 $! endif | |
| 540 $! | |
| 541 $ if key2 .eqs. "HAVE_STRUCT_TM_TM_ZONE" | |
| 542 $ then | |
| 543 $ write tf "#ifndef ''key2'" | |
| 544 $ write tf "#define ''key2' 1" | |
| 545 $ write tf "#endif" | |
| 546 $ goto cfgh_in_loop1 | |
| 547 $ endif | |
| 548 $! | |
| 549 $ if key2 .eqs. "HAVE_TM_ZONE" | |
| 550 $ then | |
| 551 $ write tf "#ifndef ''key2'" | |
| 552 $ write tf "#define ''key2' 1" | |
| 553 $ write tf "#endif" | |
| 554 $ goto cfgh_in_loop1 | |
| 555 $ endif | |
| 556 $! | |
| 557 $ if key2 .eqs. "HAVE_TIMEVAL" | |
| 558 $ then | |
| 559 $ write tf "#ifndef ''key2'" | |
| 560 $ write tf "#define ''key2' 1" | |
| 561 $ write tf "#endif" | |
| 562 $ goto cfgh_in_loop1 | |
| 563 $ endif | |
| 564 $! | |
| 565 $ if key2 .eqs. "WEXITSTATUS_OFFSET" | |
| 566 $ then | |
| 567 $ write tf "#ifndef ''key2'" | |
| 568 $ write tf "#define ''key2' 2" | |
| 569 $ write tf "#endif" | |
| 570 $ goto cfgh_in_loop1 | |
| 571 $ endif | |
| 572 $! | |
| 573 $ if key2 .eqs. "HAVE_GETPW_DECLS" | |
| 574 $ then | |
| 575 $ write tf "#ifndef ''key2'" | |
| 576 $ write tf "#define ''key2' 1" | |
| 577 $ write tf "#endif" | |
| 578 $ goto cfgh_in_loop1 | |
| 579 $ endif | |
| 580 $! | |
| 581 $ if key2 .eqs. "HAVE_DECL_CONFSTR" | |
| 582 $ then | |
| 583 $ write tf "#ifndef ''key2'" | |
| 584 $ write tf "#define ''key2' 1" | |
| 585 $ write tf "#endif" | |
| 586 $ goto cfgh_in_loop1 | |
| 587 $ endif | |
| 588 $! | |
| 589 $ if key2 .eqs. "HAVE_DECL_PRINTF" | |
| 590 $ then | |
| 591 $ write tf "#ifndef ''key2'" | |
| 592 $ write tf "#define ''key2' 1" | |
| 593 $ write tf "#endif" | |
| 594 $ goto cfgh_in_loop1 | |
| 595 $ endif | |
| 596 $! | |
| 597 $ if key2 .eqs. "HAVE_DECL_SBRK" | |
| 598 $ then | |
| 599 $ write tf "#ifndef ''key2'" | |
| 600 $ write tf "#define ''key2' 1" | |
| 601 $ write tf "#endif" | |
| 602 $ goto cfgh_in_loop1 | |
| 603 $ endif | |
| 604 $! | |
| 605 $ if key2 .eqs. "HAVE_DECL_STRSIGNAL" | |
| 606 $ then | |
| 607 $ write tf "#ifndef ''key2'" | |
| 608 $ write tf "#define ''key2' 0" | |
| 609 $ write tf "#endif" | |
| 610 $ goto cfgh_in_loop1 | |
| 611 $ endif | |
| 612 $! | |
| 613 $ if key2a .eqs. "HAVE_DECL_STRTOLD" | |
| 614 $ then | |
| 615 $ write tf "#ifndef ''key2'" | |
| 616 $ write tf "#define ''key2' 0" | |
| 617 $ write tf "#endif" | |
| 618 $ goto cfgh_in_loop1 | |
| 619 $ endif | |
| 620 $! | |
| 621 $ if key2 .eqs. "HAVE_DECL_STRTOIMAX" | |
| 622 $ then | |
| 623 $ write tf "#ifndef ''key2'" | |
| 624 $ write tf "#define ''key2' 0" | |
| 625 $ write tf "#endif" | |
| 626 $ goto cfgh_in_loop1 | |
| 627 $ endif | |
| 628 $! | |
| 629 $ if key2 .eqs. "HAVE_DECL_STRTOL" | |
| 630 $ then | |
| 631 $ write tf "#ifndef ''key2'" | |
| 632 $ write tf "#define ''key2' 1" | |
| 633 $ write tf "#endif" | |
| 634 $ goto cfgh_in_loop1 | |
| 635 $ endif | |
| 636 $! | |
| 637 $ if key2 .eqs. "HAVE_DECL_STRTOLL" | |
| 638 $ then | |
| 639 $ write tf "#ifndef ''key2'" | |
| 640 $ write tf "#define ''key2' 1" | |
| 641 $ write tf "#endif" | |
| 642 $ goto cfgh_in_loop1 | |
| 643 $ endif | |
| 644 $! | |
| 645 $ if key2 .eqs. "HAVE_DECL_STRTOUL" | |
| 646 $ then | |
| 647 $ write tf "#ifndef ''key2'" | |
| 648 $ write tf "#define ''key2' 1" | |
| 649 $ write tf "#endif" | |
| 650 $ goto cfgh_in_loop1 | |
| 651 $ endif | |
| 652 $! | |
| 653 $ if key2 .eqs. "HAVE_DECL_STRTOULL" | |
| 654 $ then | |
| 655 $ write tf "#ifndef ''key2'" | |
| 656 $ write tf "#define ''key2' 1" | |
| 657 $ write tf "#endif" | |
| 658 $ goto cfgh_in_loop1 | |
| 659 $ endif | |
| 660 $! | |
| 661 $ if key2 .eqs. "HAVE_DECL_STRTOUMAX" | |
| 662 $ then | |
| 663 $ write tf "#ifndef ''key2'" | |
| 664 $ write tf "#define ''key2' 0" | |
| 665 $ write tf "#endif" | |
| 666 $ goto cfgh_in_loop1 | |
| 667 $ endif | |
| 668 $! | |
| 669 $ if key2 .eqs. "GETPGRP_VOID" | |
| 670 $ then | |
| 671 $ write tf "#ifndef ''key2'" | |
| 672 $ write tf "#define ''key2' 1" | |
| 673 $ write tf "#endif" | |
| 674 $ goto cfgh_in_loop1 | |
| 675 $ endif | |
| 676 $! | |
| 677 $ if key2 .eqs. "NAMED_PIPES_MISSING" | |
| 678 $ then | |
| 679 $ write tf "#ifndef ''key2'" | |
| 680 $ write tf "#define ''key2' 1" | |
| 681 $ write tf "#endif" | |
| 682 $ goto cfgh_in_loop1 | |
| 683 $ endif | |
| 684 $! | |
| 685 $ if key2 .eqs. "OPENDIR_NOT_ROBUST" | |
| 686 $ then | |
| 687 $ write tf "#ifndef ''key2'" | |
| 688 $ write tf "#define ''key2' 1" | |
| 689 $ write tf "#endif" | |
| 690 $ goto cfgh_in_loop1 | |
| 691 $ endif | |
| 692 $! | |
| 693 $ if key2 .eqs. "PGRP_PIPE" | |
| 694 $ then | |
| 695 $ write tf "#ifndef ''key2'" | |
| 696 $ write tf "#define ''key2' 1" | |
| 697 $ write tf "#endif" | |
| 698 $ goto cfgh_in_loop1 | |
| 699 $ endif | |
| 700 $! | |
| 701 $ if key2 .eqs. "CAN_REDEFINE_GETENV" | |
| 702 $ then | |
| 703 $ write tf "#ifndef ''key2'" | |
| 704 $ write tf "#define ''key2' 1" | |
| 705 $ write tf "#endif" | |
| 706 $ goto cfgh_in_loop1 | |
| 707 $ endif | |
| 708 $! | |
| 709 $ if key2 .eqs. "HAVE_PRINTF_A_FORMAT" | |
| 710 $ then | |
| 711 $ write tf "#ifndef ''key2'" | |
| 712 $ write tf "#define ''key2' 1" | |
| 713 $ write tf "#endif" | |
| 714 $ goto cfgh_in_loop1 | |
| 715 $ endif | |
| 716 $! | |
| 717 $ if key2 .eqs. "CTYPE_NON_ASCII" | |
| 718 $ then | |
| 719 $ write tf "#ifndef ''key2'" | |
| 720 $ write tf "#define ''key2' 1" | |
| 721 $ write tf "#endif" | |
| 722 $ goto cfgh_in_loop1 | |
| 723 $ endif | |
| 724 $! | |
| 725 $ if key2 .eqs. "HAVE_LANGINFO_CODESET" | |
| 726 $ then | |
| 727 $ write tf "#ifndef ''key2'" | |
| 728 $ write tf "#define ''key2' 0" | |
| 729 $ write tf "#endif" | |
| 730 $ goto cfgh_in_loop1 | |
| 731 $ endif | |
| 732 $! | |
| 733 $! This wants execve() to do this automagically to pass. | |
| 734 $! if key2 .eqs. "HAVE_HASH_BANG_EXEC" | |
| 735 $! then | |
| 736 $! write tf "#ifndef ''key2'" | |
| 737 $! write tf "#define ''key2' 1" | |
| 738 $! write tf "#endif" | |
| 739 $! goto cfgh_in_loop1 | |
| 740 $! endif | |
| 741 $! | |
| 742 $ if key2 .eqs. "ICONV_CONST" | |
| 743 $ then | |
| 744 $ write tf "#ifndef ''key2'" | |
| 745 $ write tf "#define ''key2'" | |
| 746 $ write tf "#endif" | |
| 747 $ goto cfgh_in_loop1 | |
| 748 $ endif | |
| 749 $! | |
| 750 $ if key2 .eqs. "VOID_SIGHANDLER" | |
| 751 $ then | |
| 752 $ write tf "#ifndef ''key2'" | |
| 753 $ write tf "#define ''key2' 1" | |
| 754 $ write tf "#endif" | |
| 755 $ goto cfgh_in_loop1 | |
| 756 $ endif | |
| 757 $! | |
| 758 $ if key2 .eqs. "HAVE_POSIX_SIGNALS" | |
| 759 $ then | |
| 760 $ write tf "#ifndef ''key2'" | |
| 761 $ write tf "#define ''key2' 1" | |
| 762 $ write tf "#endif" | |
| 763 $ goto cfgh_in_loop1 | |
| 764 $ endif | |
| 765 $! | |
| 766 $ if key2 .eqs. "UNUSABLE_RT_SIGNALS" | |
| 767 $ then | |
| 768 $ write tf "#ifndef ''key2'" | |
| 769 $ write tf "#define ''key2' 1" | |
| 770 $ write tf "#endif" | |
| 771 $ goto cfgh_in_loop1 | |
| 772 $ endif | |
| 773 $! | |
| 774 $ if key2a .eqs. "HAVE_DECL_FPURGE" | |
| 775 $ then | |
| 776 $ write tf "#ifndef ''key2a'" | |
| 777 $ write tf "#define ''key2a' 1" | |
| 778 $ write tf "#endif" | |
| 779 $ goto cfgh_in_loop1 | |
| 780 $ endif | |
| 781 $! | |
| 782 $ if key2 .eqs. "HAVE_DECL_SETREGID" | |
| 783 $ then | |
| 784 $ write tf "#ifndef ''key2'" | |
| 785 $ write tf "#define ''key2' 1" | |
| 786 $ write tf "#endif" | |
| 787 $ goto cfgh_in_loop1 | |
| 788 $ endif | |
| 789 $! | |
| 790 $ if key2 .eqs. "HAVE_POSIX_SIGSETJMP" | |
| 791 $ then | |
| 792 $ write tf "#ifndef ''key2'" | |
| 793 $ write tf "#define ''key2' 1" | |
| 794 $ write tf "#endif" | |
| 795 $ goto cfgh_in_loop1 | |
| 796 $ endif | |
| 797 $! | |
| 798 $ if key2 .eqs. "HAVE_LIBDL" | |
| 799 $ then | |
| 800 $ write tf "#ifndef ''key2'" | |
| 801 $ write tf "#define ''key2' 1" | |
| 802 $ write tf "#endif" | |
| 803 $ goto cfgh_in_loop1 | |
| 804 $ endif | |
| 805 $! | |
| 806 $ if key2 .eqs. "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" | |
| 807 $ then | |
| 808 $ if f$search("''ssl_header_dir'engine.h") .nes. "" | |
| 809 $ then | |
| 810 $ search_key = key2 - "HAVE_" | |
| 811 $ define/user sys$output nl: | |
| 812 $ define/user sys$error nl: | |
| 813 $ search/output=nl: 'ssl_header_dir'engine.h 'search_key' | |
| 814 $ if '$severity' .eq. 1 | |
| 815 $ then | |
| 816 $ write tf "#ifndef ''key2'" | |
| 817 $ write tf "#define ''key2' 1" | |
| 818 $ write tf "#endif" | |
| 819 $ else | |
| 820 $ write tf "/* #undef ''key2' */" | |
| 821 $ endif | |
| 822 $ else | |
| 823 $ write tf "/* #undef ''key2' */" | |
| 824 $ endif | |
| 825 $ goto cfgh_in_loop1 | |
| 826 $ endif | |
| 827 $! | |
| 828 $ if key2b .eqs. "RAND" .and. key2c .nes. "" .and. key2d .eqs. "" | |
| 829 $ then | |
| 830 $ if (key2c .eqs. "EGD") .or. - | |
| 831 (key2c .eqs. "STATUS") .or. - | |
| 832 (key2c .eqs. "SCREEN") | |
| 833 $ then | |
| 834 $ if f$search("''ssl_header_dir'rand.h") .nes. "" | |
| 835 $ then | |
| 836 $ write tf "#ifndef ''key2'" | |
| 837 $ write tf "#define ''key2' 1" | |
| 838 $ write tf "#endif" | |
| 839 $ else | |
| 840 $ write tf "/* #undef ''key2' */" | |
| 841 $ endif | |
| 842 $ endif | |
| 843 $ endif | |
| 844 $! | |
| 845 $ if key2 .eqs. "STRCOLL_BROKEN" | |
| 846 $ then | |
| 847 $ write tf "#ifndef ''key2'" | |
| 848 $ write tf "#define ''key2' 1" | |
| 849 $ write tf "#endif" | |
| 850 $ goto cfgh_in_loop1 | |
| 851 $ endif | |
| 852 $! | |
| 853 $ if key2 .eqs. "DUP_BROKEN" | |
| 854 $ then | |
| 855 $ write tf "#ifndef ''key2'" | |
| 856 $ write tf "#define ''key2' 1" | |
| 857 $ write tf "#endif" | |
| 858 $ goto cfgh_in_loop1 | |
| 859 $ endif | |
| 860 $! | |
| 861 $! This is for a test that getcwd(0,0) works. | |
| 862 $! It does not on VMS. | |
| 863 $!-------------------------- | |
| 864 $ if key2 .eqs. "GETCWD_BROKEN" | |
| 865 $ then | |
| 866 $ write sys$output "" | |
| 867 $ write sys$output - | |
| 868 "%CONFIG_H-I-NONPORT, ''key2' being tested for!" | |
| 869 $ write sys$output - | |
| 870 "-CONFIG_H-I-GETCWD, GETCWD(0,0) does not work on VMS." | |
| 871 $ write sys$output - | |
| 872 "-CONFIG_H-I-GETCWD2, Work around hack probably required." | |
| 873 $ write sys$output - | |
| 874 "-CONFIG_H-I-REVIEW, Manual Code review required!" | |
| 875 $ if update_config_vms | |
| 876 $ then | |
| 877 $ open/append tfcv sys$disk:[]config_vms.h | |
| 878 $ write tfcv "" | |
| 879 $ write tfcv - | |
| 880 "/* Check config.h for use of ''key2' settings */" | |
| 881 $ write tfcv "" | |
| 882 $ close tfcv | |
| 883 $ endif | |
| 884 $ | |
| 885 $ goto cfgh_in_loop1 | |
| 886 $ endif | |
| 887 $! | |
| 888 $ if (key2a .eqs. "HAVE") .or. (key2a .eqs. "STAT") .or. - | |
| 889 (key2 .eqs. "ENABLE_IPV6") .or. (key2b .eqs. "LDAP") | |
| 890 $ then | |
| 891 $! | |
| 892 $! Process extra underscores | |
| 893 $!------------------------------------ | |
| 894 $ if f$locate("HAVE___", key2) .lt. key2_len | |
| 895 $ then | |
| 896 $ key2b = "__" + key2d | |
| 897 $ key2d = "" | |
| 898 $ double_under = 1 | |
| 899 $ else | |
| 900 $ if f$locate("HAVE__", key2) .lt. key2_len | |
| 901 $ then | |
| 902 $ key2b = "_" + key2c | |
| 903 $ key2c = "" | |
| 904 $ double_under = 1 | |
| 905 $ endif | |
| 906 $ endif | |
| 907 $! | |
| 908 $ if (key2_h .eqs. "_H") .or. (key2 .eqs. "ENABLE_IPV6") .or. - | |
| 909 (key2b .eqs. "LDAP") | |
| 910 $ then | |
| 911 $! | |
| 912 $! Looking for a header file | |
| 913 $!--------------------------------------- | |
| 914 $ headf = key2b | |
| 915 $ if key2c .nes. "" then headf = headf + "_" + key2c | |
| 916 $ if key2d .nes. "" then headf = headf + "_" + key2d | |
| 917 $! | |
| 918 $! (key2b .eqs. "READLINE") | |
| 919 $! | |
| 920 $! Some special parsing | |
| 921 $!------------------------------------------ | |
| 922 $ if (key2b .eqs. "SYS") .or. (key2b .eqs. "ARPA") .or. - | |
| 923 (key2b .eqs. "NET") .or. (key2b .eqs. "NETINET") | |
| 924 $ then | |
| 925 $ if key2c .nes. "" | |
| 926 $ then | |
| 927 $ headf = key2c | |
| 928 $ if key2d .nes. "" then headf = key2c + "_" + key2d | |
| 929 $ endif | |
| 930 $ endif | |
| 931 $! | |
| 932 $! And of course what's life with out some special cases | |
| 933 $!-------------------------------------------------------------------- | |
| 934 $ if key2 .eqs. "ENABLE_IPV6" | |
| 935 $ then | |
| 936 $ headf = "in6" | |
| 937 $ endif | |
| 938 $! | |
| 939 $ if key2b .eqs. "LDAP" | |
| 940 $ then | |
| 941 $ if (key2 .eqs. "HAVE_LDAP_SSL") .or. - | |
| 942 (key2 .eqs. "HAVE_LDAP_URL_PARSE") | |
| 943 $ then | |
| 944 $ headf = "ldap" | |
| 945 $ endif | |
| 946 $ endif | |
| 947 $! | |
| 948 $! | |
| 949 $ if key2b .eqs. "FILE" | |
| 950 $ then | |
| 951 $ write sys$output "" | |
| 952 $ write sys$output - | |
| 953 "%CONFIG_H-I-NONPORT, ''key2' being asked for!" | |
| 954 $ write sys$output - | |
| 955 "-CONFIG_H-I-FILE_OLD, file.h will not be configured as is obsolete!" | |
| 956 $ write sys$output - | |
| 957 "-CONFIG_H_I-FCNTL_NEW, "Expecting fcntl.h to be configured instead!" | |
| 958 $ write sys$output - | |
| 959 "-CONFIG_H_I-FCNTL_CHK, "Unable to verify at this time!" | |
| 960 $ write sys$output - | |
| 961 "-CONFIG_H-I-REVIEW, Manual Code review required!" | |
| 962 $! | |
| 963 $ if update_config_vms | |
| 964 $ then | |
| 965 $ open/append tfcv sys$disk:[]config_vms.h | |
| 966 $ write tfcv "" | |
| 967 $ write tfcv - | |
| 968 "/* Check config.h for use of fcntl.h instead of file.h */" | |
| 969 $ write tfcv "" | |
| 970 $ close tfcv | |
| 971 $ endif | |
| 972 $ endif | |
| 973 $! | |
| 974 $! Now look it up in the DEC C RTL | |
| 975 $!--------------------------------------------- | |
| 976 $ define/user sys$output nl: | |
| 977 $ define/user sys$error nl: | |
| 978 $ search/output=nl: 'dchfile' |'headf'|/exact | |
| 979 $ if '$severity' .eq. 1 | |
| 980 $ then | |
| 981 $ if key64 then write tf "#ifndef __VAX" | |
| 982 $ write tf "#ifndef ''key2'" | |
| 983 $ write tf "#define ''key2' 1" | |
| 984 $if p2 .nes. "" then write sys$output "''dchfile' - #define ''key2' 1" | |
| 985 $ write tf "#endif" | |
| 986 $ if key64 then write tf "#endif" | |
| 987 $set nover | |
| 988 $ goto cfgh_in_loop1 | |
| 989 $ endif | |
| 990 $! | |
| 991 $! | |
| 992 $! Now look it up in the DEC C STARLET_C | |
| 993 $!--------------------------------------------- | |
| 994 $ define/user sys$output nl: | |
| 995 $ define/user sys$error nl: | |
| 996 $ search/output=nl: 'starhfile' |'headf'|/exact | |
| 997 $ if '$severity' .eq. 1 | |
| 998 $ then | |
| 999 $ if key64 then write tf "#ifndef __VAX" | |
| 1000 $ write tf "#ifndef ''key2'" | |
| 1001 $ write tf "#define ''key2' 1" | |
| 1002 $if p2 .nes. "" then write sys$output "''starfile' - #define ''key2' 1" | |
| 1003 $ write tf "#endif" | |
| 1004 $ if key64 then write tf "#endif" | |
| 1005 $set nover | |
| 1006 $ goto cfgh_in_loop1 | |
| 1007 $ endif | |
| 1008 $! | |
| 1009 $! Now look for OPENSSL headers | |
| 1010 $!--------------------------------------------------------- | |
| 1011 $ if key2b .eqs. "OPENSSL" | |
| 1012 $ then | |
| 1013 $ headf = headf - "OPENSSL_" | |
| 1014 $ header = f$search("''ssl_header_dir'''headf'.h") | |
| 1015 $ if header .nes. "" | |
| 1016 $ then | |
| 1017 $ write tf "#ifndef ''key2'" | |
| 1018 $ write tf "#define ''key2' 1" | |
| 1019 $ write tf "#endif" | |
| 1020 $set nover | |
| 1021 $ goto cfgh_in_loop1 | |
| 1022 $ endif | |
| 1023 $ endif | |
| 1024 $! | |
| 1025 $! Now look for Kerberos | |
| 1026 $!------------------------------------------------------------ | |
| 1027 $ if key2b .eqs. "GSSAPI" | |
| 1028 $ then | |
| 1029 $ header_dir = "sys$sysroot:[kerberos.include]" | |
| 1030 $ headf = headf - "GSSAPI_" | |
| 1031 $ header = f$search("''header_dir'''headf'.h") | |
| 1032 $ if header .nes. "" | |
| 1033 $ then | |
| 1034 $ write tf "#ifndef ''key2'" | |
| 1035 $ write tf "#define ''key2' 1" | |
| 1036 $ write tf "#endif" | |
| 1037 $set nover | |
| 1038 $ goto cfgh_in_loop1 | |
| 1039 $ endif | |
| 1040 $ endif | |
| 1041 $! | |
| 1042 $set nover | |
| 1043 $ else | |
| 1044 $! | |
| 1045 $! Looking for a routine or a symbol | |
| 1046 $!------------------------------------------------ | |
| 1047 $ if key2c .eqs. "MACRO" | |
| 1048 $ then | |
| 1049 $ if (key2b .eqs. "FILE") .or. (key2b .eqs. "DATE") - | |
| 1050 .or. (key2b .eqs. "LINE") .or. (key2b .eqs. "TIME") | |
| 1051 $ then | |
| 1052 $ write tf "#ifndef HAVE_''key2b'" | |
| 1053 $ write tf "#define HAVE_''key2b' 1" | |
| 1054 $ write tf "#endif" | |
| 1055 $ endif | |
| 1056 $ goto cfgh_in_loop1 | |
| 1057 $ endif | |
| 1058 $! | |
| 1059 $! Special false tests | |
| 1060 $!------------------------------------- | |
| 1061 $ if double_under | |
| 1062 $ then | |
| 1063 $ if key2b .eqs. "_FCNTL" .or. key2b .eqs. "__FCNTL" | |
| 1064 $ then | |
| 1065 $ write tf "/* #undef HAVE_''key2b' */" | |
| 1066 $ goto cfgh_in_loop1 | |
| 1067 $ endif | |
| 1068 $! | |
| 1069 $ if key2b .eqs. "_STAT" .or. key2b .eqs. "__STAT" | |
| 1070 $ then | |
| 1071 $ write tf "/* #undef HAVE_''key2b' */" | |
| 1072 $ goto cfgh_in_loop1 | |
| 1073 $ endif | |
| 1074 $! | |
| 1075 $ if key2b .eqs. "_READ" .or. key2b .eqs. "__READ" | |
| 1076 $ then | |
| 1077 $ write tf "/* #undef HAVE_''key2b' */" | |
| 1078 $ goto cfgh_in_loop1 | |
| 1079 $ endif | |
| 1080 $ endif | |
| 1081 $! | |
| 1082 $ keysym = key2b | |
| 1083 $ if key2c .nes. "" then keysym = keysym + "_" + key2c | |
| 1084 $ if key2d .nes. "" then keysym = keysym + "_" + key2d | |
| 1085 $ if key2e .nes. "" then keysym = keysym + "_" + key2e | |
| 1086 $! | |
| 1087 $! | |
| 1088 $! Stat structure members | |
| 1089 $!------------------------------------- | |
| 1090 $ if key2b .eqs. "STRUCT" | |
| 1091 $ then | |
| 1092 $ if key2c .eqs. "STAT" .and (key2d .nes. "") | |
| 1093 $ then | |
| 1094 $ key2b = key2b + "_" + key2c + "_" + key2d | |
| 1095 $ key2c = key2e | |
| 1096 $ key2d = "" | |
| 1097 $ key2e = "" | |
| 1098 $ endif | |
| 1099 $ endif | |
| 1100 $ if (key2b .eqs. "ST") .or. (key2b .eqs. "STRUCT_STAT_ST") | |
| 1101 $ then | |
| 1102 $ keysym = "ST" + "_" + key2c | |
| 1103 $ keysym = f$edit(keysym,"LOWERCASE") | |
| 1104 $ endif | |
| 1105 $ if key2a .eqs. "STAT" | |
| 1106 $ then | |
| 1107 $ if (f$locate("STATVFS", key2b) .eq. 0) .and. key2c .eqs. "" | |
| 1108 $ then | |
| 1109 $ keysym = f$edit(key2b, "LOWERCASE") | |
| 1110 $ endif | |
| 1111 $!$ if (key2b .eqs. "STATVFS" .or. key2b .eqs. "STATFS2" - | |
| 1112 $! .or. key2b .eqs. "STATFS3") .and. key2c .nes. "" | |
| 1113 $! | |
| 1114 $ if (key2b .eqs. "STATVFS") .and. key2c .nes. "" | |
| 1115 $ then | |
| 1116 $! Should really verify that the structure | |
| 1117 $! named by key2b actually exists first. | |
| 1118 $!------------------------------------------------------------ | |
| 1119 $! | |
| 1120 $! Statvfs structure members | |
| 1121 $!------------------------------------------------- | |
| 1122 $ keysym = "f_" + f$edit(key2c,"LOWERCASE") | |
| 1123 $ endif | |
| 1124 $ endif | |
| 1125 $! | |
| 1126 $! UTMPX structure members | |
| 1127 $!-------------------------------------- | |
| 1128 $ if key2b .eqs. "UT" .and. key2c .eqs. "UT" | |
| 1129 $ then | |
| 1130 $ keysym = "ut_" + f$edit(key2d,"LOWERCASE") | |
| 1131 $ endif | |
| 1132 $! | |
| 1133 $ if f$locate("MMAP",key2) .lt. key2_len | |
| 1134 $ then | |
| 1135 $ write sys$output "" | |
| 1136 $ write sys$output - | |
| 1137 "%CONFIG_H-I-NONPORT, ''key2' being asked for!" | |
| 1138 $ write sys$output - | |
| 1139 "-CONFIG_H-I-MMAP, MMAP operations only work on STREAM and BINARY files!" | |
| 1140 $ write sys$output - | |
| 1141 "-CONFIG_H-I-REVIEW, Manual Code review required!" | |
| 1142 $ if update_config_vms | |
| 1143 $ then | |
| 1144 $ open/append tfcv sys$disk:[]config_vms.h | |
| 1145 $ write tfcv "" | |
| 1146 $ write tfcv - | |
| 1147 "/* Check config.h for use of ''key2' settings */" | |
| 1148 $ write tfcv "" | |
| 1149 $ close tfcv | |
| 1150 $ endif | |
| 1151 $ endif | |
| 1152 $! | |
| 1153 $! | |
| 1154 $ if keysym .eqs. "CRYPT" | |
| 1155 $ then | |
| 1156 $ write sys$output "" | |
| 1157 $ write sys$output - | |
| 1158 "%CONFIG_H-I-NONPORT, ''key2' being asked for!" | |
| 1159 $ write sys$output - | |
| 1160 "-CONFIG_H-I-CRYPT, CRYPT operations on the VMS SYSUAF may not work!" | |
| 1161 $ write sys$output - | |
| 1162 "-CONFIG_H-I-REVIEW, Manual Code review required!" | |
| 1163 $ if update_config_vms | |
| 1164 $ then | |
| 1165 $ open/append tfcv sys$disk:[]config_vms.h | |
| 1166 $ write tfcv "" | |
| 1167 $ write tfcv - | |
| 1168 "/* Check config.h for use of ''keysym' */" | |
| 1169 $ write tfcv "" | |
| 1170 $ close tfcv | |
| 1171 $ endif | |
| 1172 $ endif | |
| 1173 $! | |
| 1174 $! | |
| 1175 $ if keysym .eqs. "EXECL" | |
| 1176 $ then | |
| 1177 $ write sys$output "" | |
| 1178 $ write sys$output - | |
| 1179 "%CONFIG_H-I-NONPORT, ''key2' being asked for!" | |
| 1180 $ write sys$output - | |
| 1181 "-CONFIG_H-I-EXCEL, EXECL configured, Will probably not work." | |
| 1182 $ write sys$output - | |
| 1183 "-CONFIG_H-I-REVIEW, Manual Code review required!" | |
| 1184 $ if update_config_vms | |
| 1185 $ then | |
| 1186 $ open/append tfcv sys$disk:[]config_vms.h | |
| 1187 $ write tfcv "" | |
| 1188 $ write tfcv - | |
| 1189 "/* Check config.h for use of ''keysym' */" | |
| 1190 $ write tfcv "" | |
| 1191 $ close tfcv | |
| 1192 $ endif | |
| 1193 $ endif | |
| 1194 $! | |
| 1195 $! | |
| 1196 $! Process if cpp supports ANSI-C stringizing '#' operator | |
| 1197 $!----------------------------------------------------------------------- | |
| 1198 $ if keysym .eqs. "STRINGIZE" | |
| 1199 $ then | |
| 1200 $ write tf "#ifndef HAVE_STRINGIZE" | |
| 1201 $ write tf "#define HAVE_STRINGSIZE 1" | |
| 1202 $ write tf "#endif" | |
| 1203 $ goto cfgh_in_loop1 | |
| 1204 $ endif | |
| 1205 $! | |
| 1206 $ if keysym .eqs. "VOLATILE" | |
| 1207 $ then | |
| 1208 $ write tf "#ifndef HAVE_VOLATILE" | |
| 1209 $ write tf "#define HAVE_VOLATILE 1" | |
| 1210 $ write tf "#endif" | |
| 1211 $ goto cfgh_in_loop1 | |
| 1212 $ endif | |
| 1213 $! | |
| 1214 $ if keysym .eqs. "ALLOCA" | |
| 1215 $ then | |
| 1216 $ write tf "#ifndef HAVE_ALLOCA" | |
| 1217 $ write tf "#define HAVE_ALLOCA 1" | |
| 1218 $ write tf "#endif" | |
| 1219 $ goto cfgh_in_loop1 | |
| 1220 $ endif | |
| 1221 $! | |
| 1222 $ if keysym .eqs. "ERRNO_DECL" | |
| 1223 $ then | |
| 1224 $ write tf "#ifndef HAVE_ERRNO_DECL" | |
| 1225 $ write tf "#define HAVE_ERRNO_DECL 1" | |
| 1226 $ write tf "#endif" | |
| 1227 $ goto cfgh_in_loop1 | |
| 1228 $ endif | |
| 1229 $! | |
| 1230 $ if keysym .eqs. "LONGLONG" | |
| 1231 $ then | |
| 1232 $ write tf "#ifndef __VAX" | |
| 1233 $ write tf "#pragma message disable longlongtype" | |
| 1234 $ write tf "#ifndef HAVE_LONGLONG" | |
| 1235 $ write tf "#define HAVE_LONGLONG 1" | |
| 1236 $ write tf "#endif" | |
| 1237 $ write tf "#endif" | |
| 1238 $ goto cfgh_in_loop1 | |
| 1239 $ endif | |
| 1240 $! | |
| 1241 $! May need to test compiler version | |
| 1242 $!----------------------------------------------- | |
| 1243 $ if keysym .eqs. "LONG_LONG" | |
| 1244 $ then | |
| 1245 $ write tf "#ifndef __VAX" | |
| 1246 $ write tf "#pragma message disable longlongtype" | |
| 1247 $ write tf "#ifndef HAVE_LONG_LONG" | |
| 1248 $ write tf "#define HAVE_LONG_LONG 1" | |
| 1249 $ write tf "#endif" | |
| 1250 $ write tf "#endif" | |
| 1251 $ goto cfgh_in_loop1 | |
| 1252 $ endif | |
| 1253 $! | |
| 1254 $! May need to test compiler version | |
| 1255 $!----------------------------------------------- | |
| 1256 $ if keysym .eqs. "UNSIGNED_LONG_LONG" | |
| 1257 $ then | |
| 1258 $ write tf "#ifndef __VAX" | |
| 1259 $ write tf "#pragma message disable longlongtype" | |
| 1260 $ write tf "#ifndef HAVE_UNSIGNED_LONG_LONG" | |
| 1261 $ write tf "#define HAVE_UNSIGNED_LONG_LONG 1" | |
| 1262 $ write tf "#endif" | |
| 1263 $ write tf "#endif" | |
| 1264 $ goto cfgh_in_loop1 | |
| 1265 $ endif | |
| 1266 $! | |
| 1267 $! May need to test compiler version | |
| 1268 $!----------------------------------------------- | |
| 1269 $ if keysym .eqs. "UNSIGNED_LONG_LONG_INT" | |
| 1270 $ then | |
| 1271 $ write tf "#ifndef __VAX" | |
| 1272 $ write tf "#pragma message disable longlongtype" | |
| 1273 $ write tf "#ifndef HAVE_UNSIGNED_LONG_LONG_INT" | |
| 1274 $ write tf "#define HAVE_UNSIGNED_LONG_LONG_INT 1" | |
| 1275 $ write tf "#endif" | |
| 1276 $ write tf "#endif" | |
| 1277 $ goto cfgh_in_loop1 | |
| 1278 $ endif | |
| 1279 $! | |
| 1280 $! May need to test compiler version | |
| 1281 $!----------------------------------------------- | |
| 1282 $ if keysym .eqs. "LONG_DOUBLE" | |
| 1283 $ then | |
| 1284 $ write tf "#ifndef __VAX" | |
| 1285 $ write tf "#pragma message disable longlongtype" | |
| 1286 $ write tf "#ifndef HAVE_LONG_DOUBLE" | |
| 1287 $ write tf "#define HAVE_LONG_DOUBLE 1" | |
| 1288 $ write tf "#endif" | |
| 1289 $ write tf "#endif" | |
| 1290 $ goto cfgh_in_loop1 | |
| 1291 $ endif | |
| 1292 $! | |
| 1293 $ if keysym .eqs. "FCNTL_LOCK" | |
| 1294 $ then | |
| 1295 $ write sys$output - | |
| 1296 "%CONFIG_H-I-NONPORT, ''key2' being asked for! | |
| 1297 $ write sys$output - | |
| 1298 "-CONFIG_H-I-REVIEW, Manual Code review required!" | |
| 1299 $ goto cfgh_in_loop1 | |
| 1300 $ endif | |
| 1301 $! | |
| 1302 $! | |
| 1303 $! These libraries are provided by the DEC C RTL | |
| 1304 $!------------------------------------------------------------- | |
| 1305 $ if keysym .eqs. "LIBINET" .or. keysym .eqs. "LIBSOCKET" | |
| 1306 $ then | |
| 1307 $ write tf "#ifndef HAVE_''keysym'" | |
| 1308 $ write tf "#define HAVE_''keysym' 1" | |
| 1309 $if p2 .nes. "" then write sys$output "''decc_shr' #define ''keysym' 1" | |
| 1310 $ write tf "#endif | |
| 1311 $ goto cfgh_in_loop1 | |
| 1312 $ endif | |
| 1313 $! | |
| 1314 $ if keysym .eqs. "HERRNO" then keysym = "h_errno" | |
| 1315 $ if keysym .eqs. "UTIMBUF" then keysym = "utimbuf" | |
| 1316 $ if key2c .eqs. "STRUCT" | |
| 1317 $ then | |
| 1318 $ keysym = f$edit(key2d,"LOWERCASE") | |
| 1319 $ else | |
| 1320 $ if key2_h .eqs. "_T" | |
| 1321 $ then | |
| 1322 $ if key2_t .eqs. "_TYPE" | |
| 1323 $ then | |
| 1324 $ keysym = f$extract(0, key2_len - 5, key2) - "HAVE_" | |
| 1325 $ endif | |
| 1326 $ keysym = f$edit(keysym,"LOWERCASE") | |
| 1327 $ endif | |
| 1328 $ endif | |
| 1329 $! | |
| 1330 $! Check the DEC C RTL shared image first | |
| 1331 $!------------------------------------------------------ | |
| 1332 $ if f$search(tfile1) .nes. "" then delete 'tfile1';* | |
| 1333 $ define/user sys$output nl: | |
| 1334 $ define/user sys$error nl: | |
| 1335 $ search/format=nonull/out='tfile1' 'decc_shr' 'keysym' | |
| 1336 $ if '$severity' .eq. 1 | |
| 1337 $ then | |
| 1338 $! | |
| 1339 $! Not documented, but from observation | |
| 1340 $!------------------------------------------------------ | |
| 1341 $ define/user sys$output nl: | |
| 1342 $ define/user sys$error nl: | |
| 1343 $ if arch_type .eq. 3 | |
| 1344 $ then | |
| 1345 $ keyterm = "''keysym'<SOH>" | |
| 1346 $ else | |
| 1347 $ if arch_type .eq. 2 | |
| 1348 $ then | |
| 1349 $ keyterm = "''keysym'<BS>" | |
| 1350 $ else | |
| 1351 $ keyterm = "''keysym'<STX>" | |
| 1352 $ endif | |
| 1353 $ endif | |
| 1354 $ search/out=nl: 'tfile1' - | |
| 1355 "$''keyterm'","$g''keyterm'","$__utc_''keyterm'",- | |
| 1356 "$__utctz_''keyterm'","$__bsd44_''keyterm'","$bsd_''keyterm'",- | |
| 1357 "$''keysym'decc$","$G''keysym'decc$","$GX''keyterm'" | |
| 1358 $ severity = '$severity' | |
| 1359 $! | |
| 1360 $! | |
| 1361 $! Of course the 64 bit stuff is different | |
| 1362 $!--------------------------------------------------------- | |
| 1363 $ if severity .ne. 1 .and. key64 | |
| 1364 $ then | |
| 1365 $ define/user sys$output nl: | |
| 1366 $ define/user sys$error nl: | |
| 1367 $ search/out=nl: 'tfile1' "$_''keyterm'" | |
| 1368 $! search/out 'tfile1' "$_''keyterm'" | |
| 1369 $ severity = '$severity' | |
| 1370 $ endif | |
| 1371 $! | |
| 1372 $! Unix compatibility routines | |
| 1373 $!--------------------------------------------- | |
| 1374 $ if severity .ne. 1 | |
| 1375 $ then | |
| 1376 $ define/user sys$output nl: | |
| 1377 $ define/user sys$error nl: | |
| 1378 $ search/out=nl: 'tfile1' - | |
| 1379 "$__unix_''keyterm'","$__vms_''keyterm'","$_posix_''keyterm'" | |
| 1380 $ severity = '$severity' | |
| 1381 $ endif | |
| 1382 $! | |
| 1383 $! Show the result of the search | |
| 1384 $!------------------------------------------------ | |
| 1385 $ if 'severity' .eq. 1 | |
| 1386 $ then | |
| 1387 $ if key64 then write tf "#ifndef __VAX" | |
| 1388 $ write tf "#ifndef ''key2'" | |
| 1389 $ write tf "#define ''key2' 1" | |
| 1390 $if p2 .nes. "" then write sys$output "''decc_shr' #define ''key2' 1" | |
| 1391 $ write tf "#endif" | |
| 1392 $ if key64 then write tf "#endif" | |
| 1393 $ goto cfgh_in_loop1 | |
| 1394 $ endif | |
| 1395 $ endif | |
| 1396 $ if f$search(tfile1) .nes. "" then delete 'tfile1';* | |
| 1397 $! | |
| 1398 $! Check the DECC Header files next | |
| 1399 $!---------------------------------------------- | |
| 1400 $ define/user sys$output nl: | |
| 1401 $ define/user sys$error nl: | |
| 1402 $ search/out=nl: 'decc_rtldef' - | |
| 1403 "''keysym';", "''keysym'[", "struct ''keysym'"/exact | |
| 1404 $ severity = '$severity' | |
| 1405 $ if severity .eq. 1 | |
| 1406 $ then | |
| 1407 $ if key64 then write tf "#ifndef __VAX" | |
| 1408 $ write tf "#ifndef ''key2'" | |
| 1409 $ write tf "#define ''key2' 1" | |
| 1410 $if p2 .nes. "" then write sys$output "''decc_rtldef' #define ''key2' 1" | |
| 1411 $ write tf "#endif" | |
| 1412 $ if key64 then write tf "#endif" | |
| 1413 $ goto cfgh_in_loop1 | |
| 1414 $ endif | |
| 1415 $! | |
| 1416 $! Check kerberos | |
| 1417 $!-------------------------------------------- | |
| 1418 $ if f$search("SYS$SYSROOT:[kerberos]include.dir") .nes. "" | |
| 1419 $ then | |
| 1420 $ test_mit = "SYS$SYSROOT:[kerberos.include]gssapi_krb5.h" | |
| 1421 $ if (key2 .eqs. "HAVE_GSSAPI") | |
| 1422 $ then | |
| 1423 $ write tf "#ifndef ''key2'" | |
| 1424 $ write tf "#define ''key2' 1" | |
| 1425 $ write tf "#endif" | |
| 1426 $ goto cfgh_in_loop1 | |
| 1427 $ endif | |
| 1428 $! | |
| 1429 $! This is really do we have the newer MIT Kerberos | |
| 1430 $!---------------------------------------------------------------------- | |
| 1431 $ if (key2 .eqs. "HAVE_GSSMIT") | |
| 1432 $ then | |
| 1433 $ if f$search(test_mit) .nes. "" | |
| 1434 $ then | |
| 1435 $ write tf "#ifndef ''key2'" | |
| 1436 $ write tf "#define ''key2' 1" | |
| 1437 $ else | |
| 1438 $ write tf "#ifdef ''key2'" | |
| 1439 $ write tf "#undef ''key2'" | |
| 1440 $ endif | |
| 1441 $ write tf "#endif" | |
| 1442 $ goto cfgh_in_loop1 | |
| 1443 $ endif | |
| 1444 $! | |
| 1445 $! Older MIT looks like Heimdal | |
| 1446 $!------------------------------------------------ | |
| 1447 $ if (key2 .eqs. "HAVE_HEIMDAL") | |
| 1448 $ then | |
| 1449 $ if f$search(test_mit) .eqs. "" | |
| 1450 $ then | |
| 1451 $ write tf "#ifndef ''key2'" | |
| 1452 $ write tf "#define ''key2' 1" | |
| 1453 $ else | |
| 1454 $ write tf "#ifdef ''key2'" | |
| 1455 $ write tf "#undef ''key2'" | |
| 1456 $ endif | |
| 1457 $ write tf "#endif" | |
| 1458 $ goto cfgh_in_loop1 | |
| 1459 $ endif | |
| 1460 $ endif | |
| 1461 $! | |
| 1462 $ endif | |
| 1463 $ write tf "/* ", xline, " */" | |
| 1464 $ goto cfgh_in_loop1 | |
| 1465 $ endif | |
| 1466 $! | |
| 1467 $! | |
| 1468 $! Process SIZEOF directives found in SAMBA and others | |
| 1469 $!---------------------------------------------------------- | |
| 1470 $ if key2a .eqs. "SIZEOF" | |
| 1471 $ then | |
| 1472 $ if key2b .eqs. "INO" .and. key2_h .eqs. "_T" | |
| 1473 $ then | |
| 1474 $ write tf "#ifndef SIZEOF_INO_T" | |
| 1475 $ write tf "#if !__USING_STD_STAT | |
| 1476 $ write tf "#define SIZEOF_INO_T 6" | |
| 1477 $ write tf "#else | |
| 1478 $ write tf "#define SIZEOF_INO_T 8" | |
| 1479 $ write tf "#endif | |
| 1480 $ write tf "#endif" | |
| 1481 $ goto cfgh_in_loop1 | |
| 1482 $ endif | |
| 1483 $ if key2b .eqs. "INTMAX" .and. key2_h .eqs. "_T" | |
| 1484 $ then | |
| 1485 $ write tf "#ifndef SIZEOF_INTMAX_T" | |
| 1486 $ write tf "#ifdef __VAX" | |
| 1487 $ write tf "#define SIZEOF_INTMAX_T 4" | |
| 1488 $ write tf "#else" | |
| 1489 $ write tf "#define SIZEOF_INTMAX_T 8" | |
| 1490 $ write tf "#endif" | |
| 1491 $ write tf "#endif" | |
| 1492 $ goto cfgh_in_loop1 | |
| 1493 $ endif | |
| 1494 $ if key2b .eqs. "OFF" .and. key2_h .eqs. "_T" | |
| 1495 $ then | |
| 1496 $ write tf "#ifndef SIZEOF_OFF_T" | |
| 1497 $ write tf "#if __USE_OFF64_T" | |
| 1498 $ write tf "#define SIZEOF_OFF_T 8" | |
| 1499 $ write tf "#else" | |
| 1500 $ write tf "#define SIZEOF_OFF_T 4" | |
| 1501 $ write tf "#endif" | |
| 1502 $ write tf "#endif" | |
| 1503 $ goto cfgh_in_loop1 | |
| 1504 $ endif | |
| 1505 $ if key2b .eqs. "CHAR" .and. key2_h .eqs. "_P" | |
| 1506 $ then | |
| 1507 $ write tf "#ifndef SIZEOF_CHAR_P" | |
| 1508 $ write tf "#if __INITIAL_POINTER_SIZE == 64" | |
| 1509 $ write tf "#define SIZEOF_CHAR_P 8" | |
| 1510 $ write tf "#else" | |
| 1511 $ write tf "#define SIZEOF_CHAR_P 4" | |
| 1512 $ write tf "#endif" | |
| 1513 $ goto cfgh_in_loop1 | |
| 1514 $ endif | |
| 1515 $ if key2b .eqs. "VOIDP" | |
| 1516 $ then | |
| 1517 $ write tf "#ifndef SIZEOF_VOIDP" | |
| 1518 $ write tf "#if __INITIAL_POINTER_SIZE == 64" | |
| 1519 $ write tf "#define SIZEOF_VOIDP 8" | |
| 1520 $ write tf "#else" | |
| 1521 $ write tf "#define SIZEOF_VOIDP 4" | |
| 1522 $ write tf "#endif" | |
| 1523 $ write tf "#endif" | |
| 1524 $ goto cfgh_in_loop1 | |
| 1525 $ endif | |
| 1526 $ if key2b .eqs. "INT" | |
| 1527 $ then | |
| 1528 $ write tf "#ifndef SIZEOF_INT" | |
| 1529 $ write tf "#define SIZEOF_INT 4" | |
| 1530 $ write tf "#endif" | |
| 1531 $ goto cfgh_in_loop1 | |
| 1532 $ endif | |
| 1533 $ if key2b .eqs. "SIZE" .and. key2_h .eqs. "_T" | |
| 1534 $ then | |
| 1535 $ write tf "#ifndef SIZEOF_SIZE_T" | |
| 1536 $ write tf "#define SIZEOF_SIZE_T 4" | |
| 1537 $ write tf "#endif" | |
| 1538 $ goto cfgh_in_loop1 | |
| 1539 $ endif | |
| 1540 $ if key2b .eqs. "TIME" .and. key2_h .eqs. "_T" | |
| 1541 $ then | |
| 1542 $ write tf "#ifndef SIZEOF_TIME_T" | |
| 1543 $ write tf "#define SIZEOF_TIME_T 4" | |
| 1544 $ write tf "#endif" | |
| 1545 $ goto cfgh_in_loop1 | |
| 1546 $ endif | |
| 1547 $ if key2b .eqs. "DOUBLE" | |
| 1548 $ then | |
| 1549 $ write tf "#ifndef SIZEOF_DOUBLE" | |
| 1550 $ write tf "#define SIZEOF_DOUBLE 8" | |
| 1551 $ write tf "#endif" | |
| 1552 $ goto cfgh_in_loop1 | |
| 1553 $ endif | |
| 1554 $ if key2b .eqs. "LONG" | |
| 1555 $ then | |
| 1556 $ if key2c .eqs. "" | |
| 1557 $ then | |
| 1558 $ write tf "#ifndef SIZEOF_LONG" | |
| 1559 $ write tf "#define SIZEOF_LONG 4" | |
| 1560 $ write tf "#endif" | |
| 1561 $ else | |
| 1562 $ write tf "#ifndef SIZEOF_LONG_LONG" | |
| 1563 $ write tf "#ifndef __VAX" | |
| 1564 $ write tf "#define SIZEOF_LONG_LONG 8" | |
| 1565 $ write tf "#endif" | |
| 1566 $ write tf "#endif" | |
| 1567 $ endif | |
| 1568 $ goto cfgh_in_loop1 | |
| 1569 $ endif | |
| 1570 $ if key2b .eqs. "SHORT" | |
| 1571 $ then | |
| 1572 $ write tf "#ifndef SIZEOF_SHORT" | |
| 1573 $ write tf "#define SIZEOF_SHORT 2" | |
| 1574 $ write tf "#endif" | |
| 1575 $ goto cfgh_in_loop1 | |
| 1576 $ endif | |
| 1577 $ write tf "/* ", xline, " */" | |
| 1578 $ goto cfgh_in_loop1 | |
| 1579 $ endif | |
| 1580 $! | |
| 1581 $! Process NEED directives | |
| 1582 $!------------------------------- | |
| 1583 $ if key2a .eqs. "NEED" | |
| 1584 $ then | |
| 1585 $ if key2b .eqs. "STRINGS" .and. key2_h .eqs. "_H" | |
| 1586 $ then | |
| 1587 $ write tf "#ifndef NEED_STRINGS_H" | |
| 1588 $ write tf "#define NEED_STRINGS_H 1" | |
| 1589 $ write tf "#endif" | |
| 1590 $ goto cfgh_in_loop1 | |
| 1591 $ endif | |
| 1592 $ write tf "/* ", xline, " */" | |
| 1593 $ goto cfgh_in_loop1 | |
| 1594 $ endif | |
| 1595 $! | |
| 1596 $! Process GETHOSTNAME directives | |
| 1597 $!------------------------------------- | |
| 1598 $ if key2 .eqs. "GETHOSTNAME_TYPE_ARG2" | |
| 1599 $ then | |
| 1600 $ write tf "#ifndef ''key2'" | |
| 1601 $ write tf "#ifdef _DECC_V4_SOURCE" | |
| 1602 $ write tf "#define ''key2' int" | |
| 1603 $ write tf "#else" | |
| 1604 $ write tf "#define ''key2' size_t" | |
| 1605 $ write tf "#endif" | |
| 1606 $ write tf "#endif" | |
| 1607 $ goto cfgh_in_loop1 | |
| 1608 $ endif | |
| 1609 $! | |
| 1610 $! Process GETNAMEINFO directives | |
| 1611 $!------------------------------------- | |
| 1612 $ if key2a .eqs. "GETNAMEINFO" | |
| 1613 $ then | |
| 1614 $ if key2 .eqs. "GETNAMEINFO_QUAL_ARG1" | |
| 1615 $ then | |
| 1616 $ write tf "#ifndef ''key2'" | |
| 1617 $ write tf "#define ''key2' const" | |
| 1618 $ write tf "#endif" | |
| 1619 $ goto cfgh_in_loop1 | |
| 1620 $ endif | |
| 1621 $ if key2 .eqs. "GETNAMEINFO_TYPE_ARG1" | |
| 1622 $ then | |
| 1623 $ write tf "#ifndef ''key2'" | |
| 1624 $ write tf "#define ''key2' struct sockaddr *" | |
| 1625 $ write tf "#endif" | |
| 1626 $ goto cfgh_in_loop1 | |
| 1627 $ endif | |
| 1628 $ if key2 .eqs. "GETNAMEINFO_TYPE_ARG2" | |
| 1629 $ then | |
| 1630 $ write tf "#ifndef ''key2'" | |
| 1631 $ write tf "#define ''key2' size_t" | |
| 1632 $ write tf "#endif" | |
| 1633 $ goto cfgh_in_loop1 | |
| 1634 $ endif | |
| 1635 $ if key2 .eqs. "GETNAMEINFO_TYPE_ARG46" | |
| 1636 $ then | |
| 1637 $ write tf "#ifndef ''key2'" | |
| 1638 $ write tf "#define ''key2' size_t" | |
| 1639 $ write tf "#endif" | |
| 1640 $ goto cfgh_in_loop1 | |
| 1641 $ endif | |
| 1642 $ if key2 .eqs. "GETNAMEINFO_TYPE_ARG7" | |
| 1643 $ then | |
| 1644 $ write tf "#ifndef ''key2'" | |
| 1645 $ write tf "#define ''key2' int" | |
| 1646 $ write tf "#endif" | |
| 1647 $ goto cfgh_in_loop1 | |
| 1648 $ endif | |
| 1649 $ endif | |
| 1650 $! | |
| 1651 $! Process RECV directives | |
| 1652 $!------------------------------------- | |
| 1653 $ if key2a .eqs. "RECV" | |
| 1654 $ then | |
| 1655 $ if key2 .eqs. "RECV_TYPE_ARG1" | |
| 1656 $ then | |
| 1657 $ write tf "#ifndef ''key2'" | |
| 1658 $ write tf "#define ''key2' int" | |
| 1659 $ write tf "#endif" | |
| 1660 $ goto cfgh_in_loop1 | |
| 1661 $ endif | |
| 1662 $ if key2 .eqs. "RECV_TYPE_ARG2" | |
| 1663 $ then | |
| 1664 $ write tf "#ifndef ''key2'" | |
| 1665 $ write tf "#define ''key2' void *" | |
| 1666 $ write tf "#endif" | |
| 1667 $ goto cfgh_in_loop1 | |
| 1668 $ endif | |
| 1669 $ if key2 .eqs. "RECV_TYPE_ARG3" | |
| 1670 $ then | |
| 1671 $ write tf "#ifndef ''key2'" | |
| 1672 $ write tf "#define ''key2' size_t" | |
| 1673 $ write tf "#endif" | |
| 1674 $ goto cfgh_in_loop1 | |
| 1675 $ endif | |
| 1676 $ if key2 .eqs. "RECV_TYPE_ARG4" | |
| 1677 $ then | |
| 1678 $ write tf "#ifndef ''key2'" | |
| 1679 $ write tf "#define ''key2' int" | |
| 1680 $ write tf "#endif" | |
| 1681 $ goto cfgh_in_loop1 | |
| 1682 $ endif | |
| 1683 $ if key2 .eqs. "RECV_TYPE_RETV" | |
| 1684 $ then | |
| 1685 $ write tf "#ifndef ''key2'" | |
| 1686 $ write tf "#define ''key2' int" | |
| 1687 $ write tf "#endif" | |
| 1688 $ goto cfgh_in_loop1 | |
| 1689 $ endif | |
| 1690 $ endif | |
| 1691 $! | |
| 1692 $! | |
| 1693 $! Process RECVFROM directives | |
| 1694 $!------------------------------------- | |
| 1695 $ if key2a .eqs. "RECVFROM" | |
| 1696 $ then | |
| 1697 $ if key2 .eqs. "RECVFROM_QUAL_ARG5" | |
| 1698 $ then | |
| 1699 $ write tf "#ifndef ''key2'" | |
| 1700 $ write tf "#define ''key2'" | |
| 1701 $ write tf "#endif" | |
| 1702 $ goto cfgh_in_loop1 | |
| 1703 $ endif | |
| 1704 $ if key2 .eqs. "RECVFROM_TYPE_ARG1" | |
| 1705 $ then | |
| 1706 $ write tf "#ifndef ''key2'" | |
| 1707 $ write tf "#define ''key2' int" | |
| 1708 $ write tf "#endif" | |
| 1709 $ goto cfgh_in_loop1 | |
| 1710 $ endif | |
| 1711 $ if key2 .eqs. "RECVFROM_TYPE_ARG2" | |
| 1712 $ then | |
| 1713 $ write tf "#ifndef ''key2'" | |
| 1714 $ write tf "#define ''key2' void *" | |
| 1715 $ write tf "#endif" | |
| 1716 $ goto cfgh_in_loop1 | |
| 1717 $ endif | |
| 1718 $ if key2 .eqs. "RECVFROM_TYPE_ARG3" | |
| 1719 $ then | |
| 1720 $ write tf "#ifndef ''key2'" | |
| 1721 $ write tf "#define ''key2' size_t" | |
| 1722 $ write tf "#endif" | |
| 1723 $ goto cfgh_in_loop1 | |
| 1724 $ endif | |
| 1725 $ if key2 .eqs. "RECVFROM_TYPE_ARG4" | |
| 1726 $ then | |
| 1727 $ write tf "#ifndef ''key2'" | |
| 1728 $ write tf "#define ''key2' int" | |
| 1729 $ write tf "#endif" | |
| 1730 $ goto cfgh_in_loop1 | |
| 1731 $ endif | |
| 1732 $ if key2 .eqs. "RECVFROM_TYPE_ARG5" | |
| 1733 $ then | |
| 1734 $ write tf "#ifndef ''key2'" | |
| 1735 $ write tf "#define ''key2' struct sockaddr" | |
| 1736 $ write tf "#endif" | |
| 1737 $ goto cfgh_in_loop1 | |
| 1738 $ endif | |
| 1739 $ if key2 .eqs. "RECVFROM_TYPE_ARG6" | |
| 1740 $ then | |
| 1741 $ write tf "#ifndef ''key2'" | |
| 1742 $ write tf "#define ''key2' unsigned int" | |
| 1743 $ write tf "#endif" | |
| 1744 $ goto cfgh_in_loop1 | |
| 1745 $ endif | |
| 1746 $ if key2 .eqs. "RECVFROM_TYPE_RETV" | |
| 1747 $ then | |
| 1748 $ write tf "#ifndef ''key2'" | |
| 1749 $ write tf "#define ''key2' int" | |
| 1750 $ write tf "#endif" | |
| 1751 $ goto cfgh_in_loop1 | |
| 1752 $ endif | |
| 1753 $ endif | |
| 1754 $! | |
| 1755 $! Process SELECT directives | |
| 1756 $!------------------------------------- | |
| 1757 $ if key2a .eqs. "SELECT" | |
| 1758 $ then | |
| 1759 $ if key2 .eqs. "SELECT_QUAL_ARG5" | |
| 1760 $ then | |
| 1761 $ write tf "#ifndef ''key2'" | |
| 1762 $ write tf "#define ''key2' const" | |
| 1763 $ write tf "#endif" | |
| 1764 $ goto cfgh_in_loop1 | |
| 1765 $ endif | |
| 1766 $ if key2 .eqs. "SELECT_TYPE_ARG1" | |
| 1767 $ then | |
| 1768 $ write tf "#ifndef ''key2'" | |
| 1769 $ write tf "#define ''key2' int" | |
| 1770 $ write tf "#endif" | |
| 1771 $ goto cfgh_in_loop1 | |
| 1772 $ endif | |
| 1773 $ if key2 .eqs. "SELECT_TYPE_ARG2" | |
| 1774 $ then | |
| 1775 $ write tf "#ifndef ''key2'" | |
| 1776 $ write tf "#define ''key2' void *" | |
| 1777 $ write tf "#endif" | |
| 1778 $ goto cfgh_in_loop1 | |
| 1779 $ endif | |
| 1780 $ if key2 .eqs. "SELECT_TYPE_ARG234" | |
| 1781 $ then | |
| 1782 $ write tf "#ifndef ''key2'" | |
| 1783 $ write tf "#define ''key2' fd_set *" | |
| 1784 $ write tf "#endif" | |
| 1785 $ goto cfgh_in_loop1 | |
| 1786 $ endif | |
| 1787 $ if key2 .eqs. "SELECT_TYPE_ARG5" | |
| 1788 $ then | |
| 1789 $ write tf "#ifndef ''key2'" | |
| 1790 $ write tf "#define ''key2' struct timeval *" | |
| 1791 $ write tf "#endif" | |
| 1792 $ goto cfgh_in_loop1 | |
| 1793 $ endif | |
| 1794 $ if key2 .eqs. "SELECT_TYPE_RETV" | |
| 1795 $ then | |
| 1796 $ write tf "#ifndef ''key2'" | |
| 1797 $ write tf "#define ''key2' int" | |
| 1798 $ write tf "#endif" | |
| 1799 $ goto cfgh_in_loop1 | |
| 1800 $ endif | |
| 1801 $ endif | |
| 1802 $! | |
| 1803 $! Process SEND directives | |
| 1804 $!------------------------------------- | |
| 1805 $ if key2a .eqs. "SEND" | |
| 1806 $ then | |
| 1807 $ if key2 .eqs. "SEND_QUAL_ARG2" | |
| 1808 $ then | |
| 1809 $ write tf "#ifndef ''key2'" | |
| 1810 $ write tf "#define ''key2' const" | |
| 1811 $ write tf "#endif" | |
| 1812 $ goto cfgh_in_loop1 | |
| 1813 $ endif | |
| 1814 $ if key2 .eqs. "SEND_TYPE_ARG1" | |
| 1815 $ then | |
| 1816 $ write tf "#ifndef ''key2'" | |
| 1817 $ write tf "#define ''key2' int" | |
| 1818 $ write tf "#endif" | |
| 1819 $ goto cfgh_in_loop1 | |
| 1820 $ endif | |
| 1821 $ if key2 .eqs. "SEND_TYPE_ARG2" | |
| 1822 $ then | |
| 1823 $ write tf "#ifndef ''key2'" | |
| 1824 $ write tf "#define ''key2' void *" | |
| 1825 $ write tf "#endif" | |
| 1826 $ goto cfgh_in_loop1 | |
| 1827 $ endif | |
| 1828 $ if key2 .eqs. "SEND_TYPE_ARG3" | |
| 1829 $ then | |
| 1830 $ write tf "#ifndef ''key2'" | |
| 1831 $ write tf "#define ''key2' size_t" | |
| 1832 $ write tf "#endif" | |
| 1833 $ goto cfgh_in_loop1 | |
| 1834 $ endif | |
| 1835 $ if key2 .eqs. "SEND_TYPE_ARG4" | |
| 1836 $ then | |
| 1837 $ write tf "#ifndef ''key2'" | |
| 1838 $ write tf "#define ''key2' int" | |
| 1839 $ write tf "#endif" | |
| 1840 $ goto cfgh_in_loop1 | |
| 1841 $ endif | |
| 1842 $ if key2 .eqs. "SEND_TYPE_RETV" | |
| 1843 $ then | |
| 1844 $ write tf "#ifndef ''key2'" | |
| 1845 $ write tf "#define ''key2' int" | |
| 1846 $ write tf "#endif" | |
| 1847 $ goto cfgh_in_loop1 | |
| 1848 $ endif | |
| 1849 $ endif | |
| 1850 $! | |
| 1851 $! | |
| 1852 $! Process STATFS directives | |
| 1853 $!------------------------------- | |
| 1854 $! if key2a .eqs. "STATFS" | |
| 1855 $! then | |
| 1856 $! write tf "/* ", xline, " */" | |
| 1857 $! goto cfgh_in_loop1 | |
| 1858 $! endif | |
| 1859 $! | |
| 1860 $! Process inline directive | |
| 1861 $!------------------------------ | |
| 1862 $ if key2 .eqs. "inline" | |
| 1863 $ then | |
| 1864 $ write tf "#ifndef inline" | |
| 1865 $ write tf "#define inline __inline" | |
| 1866 $ write tf "#endif" | |
| 1867 $ goto cfgh_in_loop1 | |
| 1868 $ endif | |
| 1869 $! | |
| 1870 $! Process restrict directive | |
| 1871 $!-------------------------------- | |
| 1872 $ if key2 .eqs. "restrict" | |
| 1873 $ then | |
| 1874 $ write tf "#ifndef restrict" | |
| 1875 $ write tf "#define restrict __restrict" | |
| 1876 $ write tf "#endif" | |
| 1877 $ goto cfgh_in_loop1 | |
| 1878 $ endif | |
| 1879 $! | |
| 1880 $! Process RETSIGTYPE directive | |
| 1881 $!---------------------------------- | |
| 1882 $ if key2 .eqs. "RETSIGTYPE" | |
| 1883 $ then | |
| 1884 $ write tf "#ifndef RETSIGTYPE" | |
| 1885 $ write tf "#define RETSIGTYPE void" | |
| 1886 $ write tf "#endif" | |
| 1887 $ goto cfgh_in_loop1 | |
| 1888 $ endif | |
| 1889 $! | |
| 1890 $! Process STDC_HEADERS (SAMBA!) | |
| 1891 $!--------------------------- | |
| 1892 $ if key2 .eqs. "STDC_HEADERS" | |
| 1893 $ then | |
| 1894 $ write tf "#ifndef STDC_HEADERS" | |
| 1895 $ write tf "#define STDC_HEADERS 1" | |
| 1896 $ write tf "#endif" | |
| 1897 $ goto cfgh_in_loop1 | |
| 1898 $ endif | |
| 1899 $! | |
| 1900 $! Process PROTOTYPES directive | |
| 1901 $!------------------------------------- | |
| 1902 $ if key2 .eqs. "PROTOTYPES" | |
| 1903 $ then | |
| 1904 $ write tf "#ifndef PROTOTYPES" | |
| 1905 $ write tf "#define PROTOTYPES 1" | |
| 1906 $ write tf "#endif" | |
| 1907 $ goto cfgh_in_loop1 | |
| 1908 $ endif | |
| 1909 $! | |
| 1910 $! Special for SEEKDIR_RETURNS_VOID | |
| 1911 $!--------------------------------------- | |
| 1912 $ if key2 .eqs. "SEEKDIR_RETURNS_VOID" | |
| 1913 $ then | |
| 1914 $ write tf "#ifndef SEEKDIR_RETURNS_VOID" | |
| 1915 $ write tf "#define SEEKDIR_RETURNS_VOID 1" | |
| 1916 $ write tf "#endif" | |
| 1917 $ endif | |
| 1918 $! | |
| 1919 $! Unknown - See if CONFIGURE can give a clue for this | |
| 1920 $!---------------------------------------------------------- | |
| 1921 $ pflag = 0 | |
| 1922 $ set_flag = 0 | |
| 1923 $! gproj_name = proj_name - "_VMS" - "-VMS" | |
| 1924 $ if f$search(tfile1) .nes. "" then delete 'tfile1';* | |
| 1925 $ define/user sys$output nl: | |
| 1926 $ define/user sys$error nl: | |
| 1927 $! if f$locate("FILE", key2) .lt. key2_len then pflag = 1 | |
| 1928 $! if f$locate("DIR", key2) .eq. key2_len - 3 then pflag = 1 | |
| 1929 $! if f$locate("PATH", key2) .eq. key2_len - 4 then pflag = 1 | |
| 1930 $! | |
| 1931 $ search/out='tfile1' 'configure_script' "''key2'="/exact | |
| 1932 $ search_sev = '$severity' | |
| 1933 $ if 'search_sev' .eq. 1 | |
| 1934 $ then | |
| 1935 $ open/read/err=unknown_cf_rd_error sf 'tfile1' | |
| 1936 $search_file_rd_loop: | |
| 1937 $ read/end=unknown_cf_rd_err sf line_in | |
| 1938 $ line_in = f$edit(line_in, "TRIM") | |
| 1939 $ skey1 = f$element(0,"=",line_in) | |
| 1940 $ if skey1 .eqs. key2 | |
| 1941 $ then | |
| 1942 $ skey2 = f$element(1,"=",line_in) | |
| 1943 $ skey2a = f$extract(0,2,skey2) | |
| 1944 $! | |
| 1945 $! | |
| 1946 $! We can not handle assignment to shell symbols. | |
| 1947 $! For now skip them. | |
| 1948 $!------------------------------------------------------------ | |
| 1949 $ if f$locate("$", skey2) .lt. f$length(skey2) | |
| 1950 $ then | |
| 1951 $ write tf "/* ", xline, " */" | |
| 1952 $ set_flag = 1 | |
| 1953 $ goto found_in_configure | |
| 1954 $ endif | |
| 1955 $! | |
| 1956 $! Keep these two cases separate to make it easier to add | |
| 1957 $! more future intelligence to this routine | |
| 1958 $!---------------------------------------------------------------------- | |
| 1959 $ if skey2a .eqs. """`" | |
| 1960 $ then | |
| 1961 $! if pflag .eq. 1 | |
| 1962 $! then | |
| 1963 $! write tf "#ifndef ''key2'" | |
| 1964 $! write tf "#define ",key2," """,gproj_name,"_",key2,"""" | |
| 1965 $! write tf "#endif" | |
| 1966 $! else | |
| 1967 $! Ignore this for now | |
| 1968 $!------------------------------------------ | |
| 1969 $ write tf "/* ", xline, " */" | |
| 1970 $! endif | |
| 1971 $ set_flag = 1 | |
| 1972 $ goto found_in_configure | |
| 1973 $ endif | |
| 1974 $ if skey2a .eqs. """$" | |
| 1975 $ then | |
| 1976 $! if pflag .eq. 1 | |
| 1977 $! then | |
| 1978 $! write tf "#ifndef ''key2'" | |
| 1979 $! write tf "#define ",key2," """,gproj_name,"_",key2,"""" | |
| 1980 $! write tf "#endif" | |
| 1981 $! else | |
| 1982 $! Ignore this for now | |
| 1983 $!------------------------------------------- | |
| 1984 $ write tf "/* ", xline, " */" | |
| 1985 $! endif | |
| 1986 $ set_flag = 1 | |
| 1987 $ goto found_in_configure | |
| 1988 $ endif | |
| 1989 $! | |
| 1990 $! Remove multiple layers of quotes if present | |
| 1991 $!---------------------------------------------------------- | |
| 1992 $ if f$extract(0, 1, skey2) .eqs. "'" | |
| 1993 $ then | |
| 1994 $ skey2 = skey2 - "'" - "'" - "'" - "'" | |
| 1995 $ endif | |
| 1996 $ if f$extract(0, 1, skey2) .eqs. """" | |
| 1997 $ then | |
| 1998 $ skey2 = skey2 - """" - """" - """" - """" | |
| 1999 $ endif | |
| 2000 $ write tf "#ifndef ''key2'" | |
| 2001 $ if skey2 .eqs. "" | |
| 2002 $ then | |
| 2003 $ write tf "#define ",key2 | |
| 2004 $ else | |
| 2005 $! Only quote non-numbers | |
| 2006 $!---------------------------------------- | |
| 2007 $ if f$string(skey2+0) .eqs. skey2 | |
| 2008 $ then | |
| 2009 $ write tf "#define ",key2," ",skey2 | |
| 2010 $ else | |
| 2011 $ write tf "#define ",key2," """,skey2,"""" | |
| 2012 $ endif | |
| 2013 $ endif | |
| 2014 $ write tf "#endif" | |
| 2015 $ set_flag = 1 | |
| 2016 $ else | |
| 2017 $ goto search_file_rd_loop | |
| 2018 $! if pflag .eq. 1 | |
| 2019 $! then | |
| 2020 $! write tf "#ifndef ''key2'" | |
| 2021 $! write tf "#define ",key2," """,gproj_name,"_",key2,"""" | |
| 2022 $! write tf "#endif" | |
| 2023 $! set_flag = 1 | |
| 2024 $! endif | |
| 2025 $ endif | |
| 2026 $found_in_configure: | |
| 2027 $unknown_cf_rd_err: | |
| 2028 $ if f$trnlnm("sf","lnm$process",,"SUPERVISOR") .nes. "" | |
| 2029 $ then | |
| 2030 $ close sf | |
| 2031 $ endif | |
| 2032 $ if f$search(tfile1) .nes. "" then delete 'tfile1';* | |
| 2033 $ if set_flag .eq. 1 then goto cfgh_in_loop1 | |
| 2034 $ endif | |
| 2035 $ endif | |
| 2036 $! | |
| 2037 $! | |
| 2038 $! | |
| 2039 $! If it falls through everything else, comment it out | |
| 2040 $!----------------------------------------------------- | |
| 2041 $ write tf "/* ", xline, " */" | |
| 2042 $ goto cfgh_in_loop1 | |
| 2043 $cfgh_in_loop1_end: | |
| 2044 $close inf | |
| 2045 $! | |
| 2046 $! | |
| 2047 $! Write out the tail | |
| 2048 $!-------------------- | |
| 2049 $write_tail: | |
| 2050 $gosub write_config_h_tail | |
| 2051 $! | |
| 2052 $! Exit and clean up | |
| 2053 $!-------------------- | |
| 2054 $general_error: | |
| 2055 $status = '$status' | |
| 2056 $all_exit: | |
| 2057 $set noon | |
| 2058 $if f$trnlnm("sf","lnm$process",,"SUPERVISOR") .nes. "" then close sf | |
| 2059 $if f$trnlnm("tf","lnm$process",,"SUPERVISOR") .nes. "" then close tf | |
| 2060 $if f$trnlnm("inf","lnm$process",,"SUPERVISOR") .nes. "" then close inf | |
| 2061 $if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1 | |
| 2062 $if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2 | |
| 2063 $if f$trnlnm("tfcv","lnm$process",,"SUPERVISOR") .nes. "" then close tfcv | |
| 2064 $if f$type(tfile1) .eqs. "STRING" | |
| 2065 $then | |
| 2066 $ if f$search(tfile1) .nes. "" then delete 'tfile1';* | |
| 2067 $endif | |
| 2068 $if f$type(dchfile) .eqs. "STRING" | |
| 2069 $then | |
| 2070 $ if f$search(dchfile) .nes. "" then delete 'dchfile';* | |
| 2071 $endif | |
| 2072 $if f$type(starhfile) .eqs. "STRING" | |
| 2073 $then | |
| 2074 $ if f$search(starhfile) .nes. "" then delete 'starhfile';* | |
| 2075 $endif | |
| 2076 $if f$type(configure_script) .eqs. "STRING" | |
| 2077 $then | |
| 2078 $ if f$search(configure_script) .nes. "" then delete 'configure_script';* | |
| 2079 $endif | |
| 2080 $exit 'status' | |
| 2081 $! | |
| 2082 $! | |
| 2083 $control_y: | |
| 2084 $ status = ss_control_y | |
| 2085 $ goto all_exit | |
| 2086 $! | |
| 2087 $! | |
| 2088 $! | |
| 2089 $! Gosub to write a new config_vms.h | |
| 2090 $!----------------------------------- | |
| 2091 $write_config_vms: | |
| 2092 $outfile = "sys$disk:[]config_vms.h" | |
| 2093 $create 'outfile' | |
| 2094 $open/append tf 'outfile' | |
| 2095 $write tf "/* File: config_vms.h" | |
| 2096 $write tf "**" | |
| 2097 $write tf "** This file contains the manual edits needed for porting" | |
| 2098 $!write tf "** the ''proj_name' package to OpenVMS. | |
| 2099 $write tf "**" | |
| 2100 $write tf "** Edit this file as needed. The procedure that automatically" | |
| 2101 $write tf "** generated this header stub will not overwrite or make any" | |
| 2102 $write tf "** changes to this file." | |
| 2103 $write tf "**" | |
| 2104 $write tf - | |
| 2105 "** ", datetime, tab, username, tab, "Generated by ''my_proc_file'" | |
| 2106 $write tf "**" | |
| 2107 $write tf - | |
| 2108 "**========================================================================*/" | |
| 2109 $write tf "" | |
| 2110 $close tf | |
| 2111 $return | |
| 2112 $! | |
| 2113 $! gosub to write out a documentation header for config.h | |
| 2114 $!---------------------------------------------------------------- | |
| 2115 $write_config_h_header: | |
| 2116 $outfile = "sys$disk:[]config.h" | |
| 2117 $create 'outfile' | |
| 2118 $open/append tf 'outfile' | |
| 2119 $write tf "#ifndef CONFIG_H" | |
| 2120 $write tf "#define CONFIG_H" | |
| 2121 $write tf "/* File: config.h" | |
| 2122 $write tf "**" | |
| 2123 $write tf - | |
| 2124 "** This file contains the options needed for porting " | |
| 2125 $write tf "** the project on a VMS system." | |
| 2126 $write tf "**" | |
| 2127 $write tf "** Try not to make any edits to this file, as it is" | |
| 2128 $write tf "** automagically generated." | |
| 2129 $write tf "**" | |
| 2130 $write tf "** Manual edits should be made to the config_vms.h file." | |
| 2131 $write tf "**" | |
| 2132 $write tf - | |
| 2133 "** ", datetime, tab, username, tab, "Generated by ''my_proc_file'" | |
| 2134 $write tf "**" | |
| 2135 $write tf - | |
| 2136 "**========================================================================*/" | |
| 2137 $write tf "" | |
| 2138 $write tf "#if (__CRTL_VER >= 70200000) && !defined (__VAX)" | |
| 2139 $write tf "#define _LARGEFILE 1" | |
| 2140 $write tf "#endif" | |
| 2141 $write tf "" | |
| 2142 $write tf "#ifndef __VAX" | |
| 2143 $write tf "#ifdef __CRTL_VER" | |
| 2144 $write tf "#if __CRTL_VER >= 80200000" | |
| 2145 $write tf "#define _USE_STD_STAT 1" | |
| 2146 $write tf "#endif" | |
| 2147 $write tf "#endif" | |
| 2148 $write tf "#endif" | |
| 2149 $write tf "" | |
| 2150 $! | |
| 2151 $write tf " /* Allow compiler builtins */" | |
| 2152 $write tf "/*-------------------------*/" | |
| 2153 $write tf "#ifdef __DECC_VER" | |
| 2154 $write tf "#include <non_existant_dir:builtins.h>" | |
| 2155 $write tf "#endif" | |
| 2156 $! | |
| 2157 $write tf "" | |
| 2158 $return | |
| 2159 $! | |
| 2160 $! gosub to write out the tail for config.h and close it | |
| 2161 $!--------------------------------------------------------- | |
| 2162 $write_config_h_tail: | |
| 2163 $write tf "" | |
| 2164 $write tf " /* Include the hand customized settings */" | |
| 2165 $write tf "/*--------------------------------------*/" | |
| 2166 $write tf "#include ""config_vms.h""" | |
| 2167 $write tf "" | |
| 2168 $write tf "#endif /* CONFIG_H */" | |
| 2169 $close tf | |
| 2170 $return | |
| 2171 $! |
