1$! OpenVMS configuration procedure for Perl -- do not attempt to run under DOS 2$ sav_ver = 'F$VERIFY(0)' 3$ on control_y then goto clean_up 4$! SET VERIFY 5$! 6$! For example, if you unpacked perl into: [USER.PERL-5n...] then you will 7$! want to cd into the tree and execute Configure: 8$! 9$! $ SET DEFAULT [USER.PERL5_xxx] 10$! $ @Configure 11$! 12$! or 13$! 14$! $ SET DEFAULT [USER.PERL5_xxx] 15$! $ @Configure "-des" 16$! 17$! That's it. If you get into a bind trying to build perl on VMS then 18$! definitely read through the README.VMS file. 19$! Beyond that send email to vmsperl@perl.org 20$! 21$! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22$! 23$! send suggestions to: 24$! Dan Sugalski <dan@sidhe.org> 25$! Thank you!!!! 26$! 27$! Adapted and converted from Larry Wall & Andy Dougherty's 28$! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer 29$! (a Bourne sh[ell] script for configuring the installation of perl 30$! on non-VMS systems) in the perl5.002|3 epoch (spring/summer 1996) 31$! with much valuable help from Charles Bailey & 32$! the whole VMSPerl crew. 33$! Extended and messed about with by Dan Sugalski 34$! 35$! VMS-isms we will need: 36$ echo = "write sys$output " 37$ cat = "type" 38$ delete := delete ! local symbol overrides globals with qualifiers 39$ gcc_symbol = "gcc" 40$ ld = "Link/nodebug" 41$ ans = "" 42$ macros = "" 43$ extra_flags = "" 44$ user_c_flags = "" 45$ use_ieee_math = "y" 46$ be_case_sensitive = "n" 47$ unlink_all_versions = "n" 48$ builder = "MMK" 49$ use_vmsdebug_perl = "n" 50$ use64bitall = "n" 51$ use64bitint = "n" 52$ uselargefiles = "n" 53$ usesitecustomize = "n" 54$ C_Compiler_Replace = "CC=" 55$ Thread_Live_Dangerously = "MT=" 56$ use_two_pot_malloc = "N" 57$ use_pack_malloc = "N" 58$ use_debugmalloc = "N" 59$ ccflags = "" 60$ static_ext = "" 61$ nonxs_ext = "" 62$ vms_default_directory_name = F$ENVIRONMENT("DEFAULT") 63$ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx] 64$! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx] 65$! 66$! Sebastian Bazley's request: close the CONFIG handle with /NOLOG 67$! qualifier "just in case" (configure.com is re @ed in a bad state). 68$! This construct was tested to be not a problem as far back as 69$! VMS V5.5-2, hopefully earlier versions are OK as well. 70$! 71$ CLOSE/NOLOG CONFIG 72$! 73$! Now keep track of open files 74$! 75$ vms_filcnt = F$GETJPI ("","FILCNT") 76$! 77$!: compute my invocation name 78$ me = F$ENVIRONMENT("PROCEDURE") 79$! 80$! Many null statements (begin with colon ':') in the Bourne shell version of 81$! this script serve as comments/placeholders. I have retained some of the ones 82$! that will help you compare this .COM file to the sh version - as well as 83$! leave placeholders for future improvements to this .COM file. 84$! sfn = VMS "skipped for now" 85$! 86$!: Proper PATH separator !sfn 87$!: Proper PATH setting !sfn 88$!: Sanity checks !sfn "Say '@''$me''" 89$!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn 90$!: Configure runs within the UU subdirectory !->after find MANIFEST 91$! <big long list of default values (mostly null)> 92$!: We must find out about Eunice early !(?) 93$!: list of known cpp symbols, sorted alphabetically !sfn 94$! al = al + "..." 95$!: default library list !sfn 96$! <no hints files in use (yet?)> 97$!: Extra object files, if any, needed on this platform. !sfn 98$!: Possible local include directories to search. !sfn 99$!: Set locincpth to "" in a hint file to defeat local include searches. !sfn 100$!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn 101$!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" 102$!: no include file wanted by default !sfn 103$!inclwanted='' !sfn 104$!: Possible local library directories to search. !sfn 105$!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn 106$!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn 107$!: general looking path for locating libraries !sfn 108$!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn 109$!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn 110$!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn 111$!: Private path used by Configure to find libraries. Its value !sfn 112$!: is prepended to libpth. This variable takes care of special !sfn 113$!: machines, like the mips. Usually, it should be empty. !sfn 114$!plibpth='' !sfn 115$!: full support for void wanted by default !sfn 116$!defvoidused=15 !sfn 117$!: List of libraries we want. !sfn 118$!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn 119$!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn 120$!libswanted="$libswanted ucb bsd BSD PW x" !sfn 121$!: We probably want to search /usr/shlib before most other libraries. !sfn 122$!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn 123$!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn 124$!glibpth="/usr/shlib $glibpth" !sfn 125$!: Do not use vfork unless overridden by a hint file. !sfn 126$!usevfork=false !sfn 127$!: script used to extract .SH files with variable substitutions !sfn 128$!: produce awk script to parse command line options !sfn 129$!sfn (assume no sed awk) see below 130$!: process the command line options 131$! 132$!: set up default values 133$ fastread="" 134$ reuseval="false" 135$ maniskip = "false" 136$ IF F$TYPE(config_sh) .EQS. "" THEN config_sh="" 137$ alldone="" 138$ error="" 139$ silent="" 140$ extractsh="" 141$ override="" 142$ knowitall="" 143$ ccname="VAX" 144$ Dec_C_Version = "" 145$ cxxversion = "" 146$ use_threads = "F" 147$ use_5005_threads = "N" 148$ use_ithreads = "N" 149$! 150$!: option parsing 151$ config_args = "" 152$ IF (P1 .NES. "") 153$ THEN !one or more switches was thrown 154$ i = 1 155$ bang = 0 156$Param_loop: 157$ IF (P'i'.NES."") 158$ THEN 159$ bang = bang + 1 160$ config_args = config_args + F$FAO(" !AS",P'i') 161$ ENDIF 162$ i = i + 1 163$ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8 164$! 165$ i = 1 166$Opt_loop: 167$ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-" 168$ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/" 169$Remove_quotation_mark: 170$ P'i' = P'i' - """" 171$ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark 172$ gotopt = "f" !"alse" 173$ gotshortopt = "f" !"alse" 174$ IF (F$EXTRACT(0,1,P'i') .EQS. "d") 175$ THEN 176$ fastread = "yes" 177$ gotopt = "t" !"rue" 178$ P'i' = P'i' - "d" 179$ gotshortopt = "t" !"rue" 180$ ENDIF 181$ IF (F$EXTRACT(0,1,P'i') .EQS. "e") 182$ THEN 183$ alldone = "cont" 184$ gotopt = "t" 185$ P'i' = P'i' - "e" 186$ gotshortopt = "t" 187$ ENDIF 188$ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f" 189$ THEN 190$ P'i' = P'i' - "f" 191$ config_sh = P'i' 192$ IF (F$SEARCH(config_sh).NES."") 193$ THEN 194$ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO") 195$ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh)) 196$ THEN 197$ config_dflt = "y" 198$ CONTINUE !at this point check UIC && if test allows... 199$ !to be continued ? 200$ ELSE 201$ echo "''me': cannot read config file ''config_sh'." 202$ error="true" 203$ ENDIF 204$ ELSE 205$ echo "''me': cannot read config file ''config_sh'." 206$ error="true" 207$ ENDIF 208$ gotopt = "t" 209$ ENDIF 210$ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h" 211$ THEN 212$ error = "true" 213$ gotopt = "t" 214$ P'i' = P'i' - "h" 215$ gotshortopt = "t" 216$ ENDIF 217$ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m" 218$ THEN 219$ maniskip = "true" 220$ gotopt = "t" 221$ P'i' = P'i' - "m" 222$ gotshortopt = "t" 223$ ENDIF 224$ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r" 225$ THEN 226$ reuseval = "true" 227$ gotopt = "t" 228$ P'i' = P'i' - "r" 229$ gotshortopt = "t" 230$ ENDIF 231$ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s" 232$ THEN 233$ silent = "true" 234$ gotopt = "t" 235$ P'i' = P'i' - "s" 236$ gotshortopt = "t" 237$ ENDIF 238$ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E" 239$ THEN 240$ alldone = "exit" 241$ gotopt = "t" 242$ ENDIF 243$ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K" 244$ THEN 245$ knowitall = "true" 246$ gotopt = "t" 247$ P'i' = P'i' - "K" 248$ gotshortopt = "t" 249$ ENDIF 250$ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O" 251$ THEN 252$ override = "true" 253$ gotopt = "t" 254$ P'i' = P'i' - "O" 255$ gotshortopt = "t" 256$ ENDIF 257$ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S" 258$ THEN 259$ extractsh = "true" !VMS? Yes with munchconfig 260$ gotopt = "t" 261$ P'i' = P'i' - "S" 262$ gotshortopt = "t" 263$ ENDIF 264$ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D" 265$ THEN 266$ P'i' = P'i' - "D" 267$ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i')) 268$ THEN 269$ tmp = P'i' + "=""define""" 270$ 'tmp' 271$ DELETE/SYMBOL tmp 272$ ELSE 273$ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1)) 274$ THEN 275$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE") 276$ echo "''me': use ""-Usymbol=val"" not ""-Dsymbol=""." 277$ echo "''me': ignoring -D",P'i' 278$ ELSE 279$ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i') 280$ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """" 281$ 'tmp' 282$ DELETE/SYMBOL tmp 283$ ENDIF 284$ ENDIF 285$ gotopt = "t" 286$ ENDIF 287$ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U" 288$ THEN 289$ P'i' = P'i' - "U" 290$ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i')) 291$ THEN 292$ tmp = P'i' + "=""""" 293$ 'tmp' 294$ DELETE/SYMBOL tmp 295$ ELSE 296$ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1)) 297$ THEN 298$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE") 299$ echo "''me': use ""-Dsymbol=val"" not ""-Usymbol=val""." 300$ echo "''me': ignoring -U",P'i' 301$ ELSE 302$ tmp = P'i' + "=""undef""" 303$ 'tmp' 304$ DELETE/SYMBOL tmp 305$ ENDIF 306$ ENDIF 307$ gotopt = "t" 308$ ENDIF 309$ IF (F$EXTRACT(0,1,P'i') .EQS. "V") 310$ THEN 311$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE") 312$ echo "''me' generated by an unknown version of EDT." 313$ STOP 314$ EXIT 315$ ENDIF 316$ IF .NOT.gotopt 317$ THEN 318$ echo "''me': unknown option ",P'i' 319$ error = "true" 320$ ENDIF 321$ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch 322$ i = i + 1 323$ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop 324$! 325$ ENDIF ! (P1 .NES. "") 326$ config_args = F$EDIT(config_args,"TRIM") 327$! 328$ IF (error) 329$ THEN 330$ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME") 331$ echo "Usage: @''me' [-dehmr""EKOSV""] [-fconfig.sh] [""-Dsymbol""] [""-Dsymbol=value""]" 332$ echo " [-Usymbol] [-Usymbol=]" 333$ TYPE SYS$INPUT: 334$ DECK 335 "-d" : use defaults for all answers. 336 "-e" : go on without questioning past the production of config.sh. * 337 "-f" : specify an alternate default configuration file. 338 "-h" : print this help message and exit (with an error status). 339 "-m" : skip the MANIFEST check to see that all files are present 340 "-r" : reuse C symbols value if possible (skips costly nm extraction).* 341 "-s" : silent mode, only echoes questions and essential information. 342 -"D" : define symbol to have some value: * 343 -"Dsymbol" symbol gets the value 'define' 344 -"Dsymbol=value" symbol gets the value 'value' 345 -E : stop at the end of questions, after having produced config.sh. * 346 -K : do not use unless you know what you are doing. 347 -O : let -D and -U override definitions from loaded configuration file. * 348 -S : perform variable substitutions on all .SH files (can mix with -f) * 349 -"U" : undefine symbol: * 350 -"Usymbol" symbol gets the value 'undef' 351 -"Usymbol=" symbol gets completely empty 352 -V : print version number and exit (with a zero status). 353$ EOD 354$ echo "%Config-I-VMS, lower case switches must be enclosed" 355$ echo "-Config-I-VMS, in double quotation marks, e.g.:" 356$ echo "-Config-I-VMS, @Configure ""-des""" 357$ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS." 358$ SET DEFAULT 'vms_default_directory_name' !be kind rewind 359$ STOP 360$ EXIT 3 ! $STATUS = "%X00000003" (informational) 361$ ENDIF 362$! 363$ GOTO Check_silence 364$! 365$Shut_up: 366$ IF F$Mode() .eqs. "BATCH" 367$ THEN 368$ STDOUT = F$PARSE(F$GETQUI("DISPLAY_ENTRY", "JOB_NAME"), - 369 F$GETQUI("DISPLAY_ENTRY", "LOG_SPECIFICATION"), ".LOG") 370$ WRITE SYS$OUTPUT "Warning: Executing in batch mode. To avoid file locking conflicts," 371$ WRITE SYS$OUTPUT "output intended for SYS$OUTPUT will be sent to a new version" 372$ WRITE SYS$OUTPUT STDOUT 373$ ELSE 374$ STDOUT = F$TRNLNM("SYS$OUTPUT") 375$ ENDIF 376$ DEFINE SYS$OUTPUT "_NLA0:" 377$ echo4 = "write STDOUT " 378$ cat4 = "TYPE/OUTPUT=''STDOUT'" 379$ open/write/share=read STDOUT 'STDOUT' 380$ RETURN 381$! 382$Check_silence: 383$ IF (silent) 384$ THEN 385$ GOSUB Shut_up 386$ ELSE 387$ echo4 = "write SYS$OUTPUT " 388$ cat4 = "TYPE" 389$ ENDIF 390$! 391$!: run the defines and the undefines, if any, but leave the file out there... 392$! Unfortunately Configure.COM in DCL is not yet set up to do this - 393$! maybe someday 394$! 395$!: set package name 396$ package = "perl5" 397$ packageup = F$EDIT((package - "5"),"UPCASE") 398$! 399$!: Eunice requires " " instead of "", can you believe it 400$ echo "" 401$!: Here we go... 402$ echo "Beginning of configuration questions for ''package'." 403$ echo "" 404$! 405$!: Some greps do not return status, grrr. 406$ contains = "SEARCH" 407$! 408$!: first determine how to suppress newline on echo command !cant DCL is record oriented 409$! echo "Checking ''echo' to see how to suppress newlines..." 410$! echo "giving up..." 411$! echo "The star should be here-->*" 412$! 413$!: Now test for existence of everything in MANIFEST 414$ echo "" 415$ echo4 "First let's make sure your kit is complete. Checking..." 416$ manifestfound = "" 417$ miss_list = "" 418$! Here I assume we are in the [foo.PERLxxx...] tree 419$! because the search routine simply does set def [-] if necessary. 420$ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...] 421$Research_manifest: 422$ manifestfound = F$SEARCH(file_2_find) 423$ IF (manifestfound .EQS. "") 424$ THEN 425$ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]" 426$ THEN 427$ SET DEFAULT [-] 428$ GOTO Research_manifest 429$ ELSE 430$ echo "" 431$ echo "There is no MANIFEST file. I hope your kit is complete !" 432$ miss_list = "" 433$ GOTO Beyond_manifest 434$ ENDIF 435$ ELSE 436$! MANIFEST. has been found and we have set def'ed there. 437$! Time to bail out before it's too late, i.e. too deep. 438$! Depth check is unnecessary on Alpha VMS V7.2++ (even for ODS-2). 439$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE")) 440$ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check 441$! Depth check also unnecessary on ODS 5 (or later) file systems. 442$ tmp = F$INTEGER(F$GETDVI(F$ENVIRONMENT("DEFAULT"),"ACPTYPE") - "F11V") 443$ IF (tmp .GE. 5) THEN GOTO Beyond_depth_check 444$ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("DEFAULT")).nes.".") 445$ THEN 446$ TYPE SYS$INPUT: 447$ DECK 448%Config-E-VMS, ERROR: 449 Sorry! It apears as though your perl build sub-directory is already too 450 deep into the VMS file system. Please try moving stuff into a shallower 451 directory (or altering the "max_allowed_dir_depth" parameter). 452$ EOD 453$ echo4 "ABORTING..." 454$ SET DEFAULT 'vms_default_directory_name' !be kind rewind 455$ STOP 456$ EXIT !2 !$STATUS = "%X00000002" (error) 457$ ENDIF 458$Beyond_depth_check: 459$! 460$! after finding MANIFEST let's create (but not yet enter) the UU subdirectory 461$! 462$ IF (manifestfound .NES. "") 463$ THEN 464$ IF ( F$SEARCH("UU.DIR").EQS."" ) 465$ THEN 466$ CREATE/DIRECTORY [.UU] 467$ ELSE 468$ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM [.UU]*.*;* 469$ ENDIF 470$!: Configure runs within the UU subdirectory 471$ SET DEFAULT [.UU] 472$! 473$! a little redundancy never hurt anybody? 474$ file_2_find = "[-]" + file_2_find 475$ manifestfound = F$SEARCH(file_2_find) 476$! 477$ OPEN/WRITE MISSING MISSING. 478$!change to "FALSE" if you wish to skip the manifest search 479$!(which after all is rather slow in DCL :-) 480$ IF (maniskip) 481$ THEN 482$ echo "Skipping MANIFEST check as requested" 483$ ELSE 484$! 485$ OPEN/READ CONFIG 'manifestfound' 486$Read_loop_manifest: 487$ READ/END_OF_FILE = Done_manifest CONFIG line 488$! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c" 489$! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46 490$! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz" 491$! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip 492$ line = F$EDIT(line,"TRIM, COMPRESS") 493$ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line) 494$ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find) 495$ THEN 496$Re_strip_line_manifest: 497$ loca = F$LOCATE("/",file_2_find) 498$ ante = F$EXTRACT(0,loca,file_2_find) 499$ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find) 500$ test_this = ante + "." + (post - "/") 501$ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this) 502$ THEN 503$ file_2_find = ante + "." + (post - "/") 504$ GOTO Re_strip_line_manifest 505$ ELSE 506$ file_2_find = ante + "]" + (post - "/") 507$ ENDIF 508$ file_2_find = "[-."+file_2_find 509$ ELSE 510$ file_2_find = "[-]" + file_2_find 511$ ENDIF 512$! 513$ tmp = F$PARSE(file_2_find + ";",,,,"SYNTAX_ONLY") 514$ IF F$SEARCH(tmp) .NES. "" THEN file_2_find = tmp 515$ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]" 516$ file_2_find = file_2_find - dirname 517$! 518$! may not need double dot check on ODS-5 volumes 519$ found = F$SEARCH(dirname + file_2_find) 520$ IF found .NES. "" THEN GOTO Read_loop_manifest 521$! 522$ dots = 0 523$Dot_loop: 524$ dot_ele = F$ELEMENT(dots,".",file_2_find) 525$ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop 526$ IF dots .eq. 0 527$ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "." 528$ ELSE basename = basename + dot_ele + "_" 529$ ENDIF 530$ dots = dots + 1 531$ GOTO dot_loop 532$Eo_dot_loop: 533$ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. - 534 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN - 535 basename = f$extract(0,f$length(basename)-1,basename) 536$ file_2_find = dirname + basename 537$! 538$ found = F$SEARCH(file_2_find) 539$ IF (found .EQS. "" .AND. dots .GT. 2) 540$ THEN 541$! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into 542$! "[.foo.bar]baz_c.buz" to cover unzipped archives and put 543$! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found. 544$ basename[f$locate(".",basename),1] := _ 545$ dot_ele = F$ELEMENT(dots - 1,"_",basename) 546$ basename = - 547 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) - 548 + "." + dot_ele 549$ found = F$SEARCH(dirname + basename) 550$ file_2_find = file_2_find + "," + basename 551$ ENDIF 552$ IF (found .EQS. "") 553$ THEN 554$ WRITE MISSING file_2_find 555$ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250) 556$ THEN 557$ miss_list = miss_list + "," + file_2_find 558$ ENDIF 559$ ENDIF 560$ GOTO Read_loop_manifest 561$Done_manifest: 562$ CLOSE CONFIG 563$ ENDIF !"TRUE" 564$ CLOSE MISSING 565$ ENDIF ! (manifestfound .NES. "") 566$Beyond_manifest: 567$ IF (miss_list .NES. "") 568$ THEN 569$ echo "Some of the files not found include:" 570$ cat4 MISSING. 571$ ENDIF 572$ IF ((miss_list .NES. "").OR.(manifestfound .EQS. "")) 573$ THEN 574$ TYPE SYS$INPUT: 575$ DECK 576 577 578THIS PACKAGE SEEMS TO BE INCOMPLETE. 579 580You have the option of continuing the configuration process, despite the 581distinct possibility that your kit is damaged, by typing 'y'es. If you 582do, don't blame me if something goes wrong. I advise you to type 'n'o 583and contact the author (dan@sidhe.org) 584 585$ EOD 586$ READ SYS$COMMAND/PROMPT="Continue? [n] " ans 587$ IF ans 588$ THEN 589$ echo4 "Continuing..." 590$ ELSE 591$ echo4 "ABORTING..." 592$ GOTO Clean_up 593$ ENDIF 594$ ELSE 595$ echo4 "Looks good..." 596$ DELETE/NOLOG/NOCONFIRM MISSING.; 597$ ENDIF ! (miss_list .NES. "") 598$ ENDIF ! (manifestfound .EQS. "") ELSE 599$! 600$! after finding MANIFEST (see above) 601$!: Configure runs within the UU subdirectory 602$! 603$!: compute the number of columns on the terminal for proper question formatting 604$ IF F$MODE() .EQS. "BATCH" 605$! else it winds up being 512 in batch 606$ THEN COLUMNS = 80 607$ ELSE COLUMNS = F$GETDVI("SYS$OUTPUT","DEVBUFSIZ") 608$ ENDIF 609$! "-des" sets SYS$OUTPUT to NL: with a DEVBUFSIZ too large (512 again) 610$ IF COLUMNS .GT. 210 THEN COLUMNS = 80 611$! not sure if this would actually be needed - it hopefully will not hurt 612$ IF COLUMNS .LT. 40 THEN COLUMNS = 40 613$! 614$!: set up the echo used in my read !sfn 615$!: now set up to do reads with possible shell escape and default assignment !sfn 616$ GOTO Beyond_myread 617$! 618$! The sub_rp splitting is intended to handle long symbols such as the dflt for 619$! extensions. 620$! 621$myread: 622$ ans = "" 623$ len_rp = F$LENGTH(rp) 624$ If (.NOT. silent) Then echo "" 625$ IF len_rp .GT. 210 626$ THEN 627$ i_rp = 0 628$ rp_loop: 629$ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp) 630$ i_rp = i_rp + COLUMNS 631$ if i_rp .LT. len_rp THEN echo4 "''sub_rp'" 632$ IF i_rp .LT. len_rp THEN GOTO rp_loop 633$ ELSE 634$ sub_rp = rp 635$ ENDIF 636$ if (fastread) 637$ then 638$ echo4 "''sub_rp'" 639$ else 640$ READ SYS$COMMAND/PROMPT="''sub_rp'" ans 641$ endif 642$ IF (ans .EQS. "&-d") 643$ THEN 644$ echo4 "(OK, I will run with -d after this question.)" 645$ echo "" 646$ deferred_fastread =1 647$ goto myread 648$ ENDIF 649$ IF (ans .EQS. "&-s") 650$ THEN 651$ echo4 "(OK, I will run with -s after this question.)" 652$ echo "" 653$ deferred_silent = 1 654$ goto myread 655$ ENDIF 656$ if (bool_dflt .nes. "") 657$ then 658$ if (ans .eqs. "") then ans = bool_dflt 659$ ans = f$extract(0,1,f$edit(ans,"collapse,upcase")) 660$ if (ans .eqs. "Y" .or. ans .eqs. "1" .or. ans .eqs. "T") 661$ then 662$ ans = "Y" 663$ else 664$ if (ans .eqs. "N" .or. ans .eqs. "0" .or. ans .eqs. "F") 665$ then 666$ ans = "N" 667$ else 668$ echo4 "Input not understood please answer 'Yes' or 'No'" 669$ goto myread 670$ endif 671$ endif 672$ bool_dflt = "" 673$ else 674$ ans = f$edit(ans,"trim,compress") 675$ if (ans .eqs. "") then ans = dflt 676$ if (f$edit(ans,"upcase") .eqs. "NONE") then ans = "" 677$ endif 678$ if f$type(deferred_silent) .nes. "" 679$ then 680$ silent := true 681$ GOSUB Shut_up 682$ delete/symbol deferred_silent 683$ ENDIF 684$ if f$type(deferred_fastread) .nes. "" 685$ then 686$ fastread = 1 687$ delete/symbol deferred_fastread 688$ endif 689$ RETURN 690$! 691$Beyond_myread: 692$! 693$!: create .config dir to save info across Configure sessions 694$ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" ) 695$ THEN 696$ CREATE/DIRECTORY [-.CONFIG] 697$ OPEN/WRITE CONFIG [-.CONFIG]README. 698$ WRITE CONFIG - 699 "This directory created by Configure to save information that should" 700$ WRITE CONFIG - 701 "persist across sessions." 702$ WRITE CONFIG "" 703$ WRITE CONFIG - 704 "You may safely delete it if you wish." 705$ CLOSE CONFIG 706$ ENDIF 707$! 708$ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n 709$ patchlevel_h = F$SEARCH("[-]patchlevel.h") 710$ IF (patchlevel_h.NES."") 711$ THEN 712$ SEARCH 'patchlevel_h' "define","PERL_VERSION","epoch"/match=and/out=[]ver.out 713$ IF .NOT. usedevel .AND. usedevel .NES. "define" 714$ THEN 715$ OPEN/READ CONFIG []ver.out 716$ READ CONFIG line 717$ CLOSE CONFIG 718$ tmp = F$EDIT(line,"TRIM,COMPRESS") 719$ xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp)) 720$ line = xpatchlevel / 2 721$ tmp = xpatchlevel - ( line * 2 ) 722$ IF tmp .NE. 0 723$ THEN 724$ echo4 "patchlevel is " + F$STRING(xpatchlevel) 725$ cat4 SYS$INPUT: 726$ DECK 727*** WHOA THERE!!! *** 728 729 This is an UNSTABLE DEVELOPMENT release. 730 (The patchlevel, is odd--as opposed to even, 731 and that signifies a development release. If you want a 732 maintenance release, you want an even-numbered release.) 733 734 Do ***NOT*** install this into production use. 735 Data corruption and crashes are possible. 736 737 It is most seriously suggested that you do not continue any further 738 unless you want to help in developing and debugging Perl. 739 740$ EOD 741$ bool_dflt="n" 742$ rp="Do you really want to continue? [''bool_dflt'] " 743$ fastread_save = fastread 744$ fastread := FALSE 745$ GOSUB myread 746$ fastread = fastread_save 747$ delete/symbol fastread_save 748$ IF ans 749$ THEN 750$ echo4 "Okay, continuing." 751$ ELSE 752$ echo4 "Okay, bye." 753$ DELETE/NOLOG/NOCONFIRM []ver.out; 754$ GOTO Clean_up 755$ ENDIF 756$ ENDIF 757$ DELETE/SYMBOL line 758$ DELETE/SYMBOL tmp 759$ ENDIF 760$ DELETE/NOLOG/NOCONFIRM []ver.out; 761$ ENDIF 762$!: general instructions 763$ needman = "true" 764$ firsttime = "true" 765$ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE") 766$ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."") 767$ THEN 768$ messages = F$ENVIRONMENT("MESSAGE") 769$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT 770$ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user' 771$ IF .NOT.($status.EQ.%X08D78053) 772$ THEN 773$ firsttime="" 774$ bool_dflt = "n" 775$ rp = "Would you like to see the instructions? [''bool_dflt'] " 776$ GOSUB myread 777$ if .NOT.ans THEN needman="" 778$ ENDIF 779$ SET MESSAGE 'messages' 780$ ENDIF 781$ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman="" 782$! 783$ IF (needman) 784$ THEN 785$ TYPE SYS$INPUT: 786$ DECK 787 788This installation shell script will examine your system and ask you questions 789to determine how the perl5 package should be installed. If you get 790stuck on a question, you may use a ^C or ^Y shell escape to STOP this 791process, edit something, then restart this process as you just did. 792Many of the questions will have default answers in square 793brackets; typing carriage return will give you the default. 794 795$ EOD 796$ if (fastread) 797$ then 798$ echo4 "" 799$ else 800$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans 801$ endif 802$ TYPE SYS$INPUT: 803$ DECK 804 805In a hurry? You may run '@Configure "-d"'. This will bypass nearly all 806the questions and use the computed defaults (or the previous answers provided 807there was already a config.sh file). Type '@Configure "-h"' for a list of 808options. 809 810$ EOD 811$ if (fastread) 812$ then 813$ echo4 "" 814$ else 815$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans 816$ endif 817$ TYPE SYS$INPUT: 818$ DECK 819 820Much effort has been expended to ensure that this shell script will 821run on any VMS system. If despite that it blows up on yours, your 822best bet is to edit Configure.com and @ it again. Whatever problems 823you have with Configure.com, let me (dan@sidhe.org) know how I blew 824it. 825 826$ EOD 827$!This installation script affects things in two ways: 828$! 829$!1) it may do direct variable substitutions on some of the files included 830$! in this kit. 831$!2) it builds a config.h file for inclusion in C programs. You may edit 832$! any of these files as the need arises after running this script. 833$! 834$!If you make a mistake on a question, there is no easy way to back up to it 835$!currently. 836$! 837$ if (fastread) 838$ then 839$ echo4 "" 840$ else 841$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans 842$ endif 843$ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."") 844$ THEN 845$ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT. 846$ WRITE CONFIG user 847$ CLOSE CONFIG 848$ ENDIF 849$ ENDIF !(needman .EQS. "true") 850$! 851$!: see if sh knows # comments !sfn 852$ sharpbang = "$ " 853$!: figure out how to guarantee sh startup !sfn 854$!: find out where common programs are !sfn 855$!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq" 856$!trylist="byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname" 857$! echo "I don't know where '$file' is, and my life depends on it." 858$! echo "Go find a public domain implementation or fix your PATH setting!" 859$! echo "" 860$! echo "Don't worry if any of the following aren't found..." 861$!: determine whether symbolic links are supported !sfn !jem- further down 862$!: see whether [:lower:] and [:upper:] are supported character classes !sfn 863$!: set up the translation script tr, must be called with ./tr of course !sfn 864$! 865$!: Try to determine whether config.sh was made on this system 866$!: Get old answers from old config file if Configure was run on the 867$!: same system, otherwise use the hints. 868$ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/" 869$ i = 0 870$ max = 3 871$Config_sh_look: 872$ config_sh = F$ELEMENT(i,"/",config_sh_es) 873$ i = i + 1 874$ IF (config_sh.NES."/").AND.(config_sh.NES."") 875$ THEN 876$ configshfound = F$SEARCH(config_sh) 877$ IF (configshfound.NES."") THEN GOTO Config_sh_found 878$ ENDIF 879$ IF (i.LT.max) THEN GOTO Config_sh_look 880$! genconfig.pl has "osname='VMS'" 881$ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE") 882$ IF (configshfound.EQS."") 883$ THEN 884$ config_sh = "[-]config.sh" ! the fallback default 885$ GOTO Beyond_config_sh 886$ ENDIF 887$Config_sh_found: 888$ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE") 889$ bool_dflt = "n" 890$ IF F$TYPE(config_dflt) .NES. "" THEN bool_dflt = config_dflt 891$ rp = "Shall I use ''config_sh' for default answers? [''bool_dflt'] " 892$ GOSUB myread 893$ IF ans 894$ THEN 895$ echo "" 896$ echo "Fetching default answers from ''config_sh'..." 897$! 898$! we do our own parsing of the shell-script stuff 899$! ...and only accept symbols if they're in the | delimited list below 900$! 901$ config_symbols0 ="|archlib|archlibexp|bin|binexp|builddir|cf_email|config_sh|installarchlib|installbin|installman1dir|installman3dir|" 902$ config_symbols1 ="|installprivlib|installscript|installsitearch|installsitelib|most|oldarchlib|oldarchlibexp|osname|pager|perl_symbol|perl_verb|" 903$ config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitebin|sitelib|sitelib_stem|sitelibexp|try_cxx|use64bitall|use64bitint|" 904$ config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|usemultiplicity|usemymalloc|usedebugging_perl|useperlio|usesecurelog|" 905$ config_symbols4 ="|usethreads|usevmsdebug|usefaststdio|usemallocwrap|unlink_all_versions|uselargefiles|usesitecustomize|" 906$ config_symbols5 ="|buildmake|builder|" 907$! 908$ open/read CONFIG 'config_sh' 909$ rd_conf_loop: 910$ read/end=erd_conf_loop CONFIG line 911$ line = f$edit(line,"trim") 912$ if line .eqs. "" .or. f$extract(0,1,line) .eqs. "#" then goto rd_conf_loop 913$ sym = f$element(0,"=",line) 914$ if sym .eqs. "=" then goto rd_conf_loop 915$ dsym = "|"+sym+"|" 916$ k = 0 917$ rd_ck_loop: 918$ syms = config_symbols'k' 919$ j = f$locate(dsym, syms) 920$ if j .lt. f$length(syms) then goto erd_ck_loop 921$ k = k + 1 922$ if k .lt. 6 then goto rd_ck_loop 923$ goto rd_conf_loop 924$ erd_ck_loop: 925$ val = f$element(1,"=",line) 926$ val = f$extract(1,f$length(val)-2,val) 927$ write sys$output "''sym' = ""''val'""" 928$ 'sym' = "''val'" 929$ goto rd_conf_loop 930$ erd_conf_loop: 931$ close CONFIG 932$ delete/symbol config_symbols0 933$ delete/symbol config_symbols1 934$ delete/symbol config_symbols2 935$ delete/symbol config_symbols3 936$ delete/symbol config_symbols4 937$ delete/symbol config_symbols5 938$ delete/symbol sym 939$ delete/symbol val 940$ delete/symbol dsym 941$ if f$type(usedebugging_perl) .nes. "" 942$ then 943$ useperldebug = usedebugging_perl 944$ delete/symbol usedebugging_perl 945$ endif 946$! 947$ ENDIF 948$ if f$type(config_dflt) .nes. "" then DELETE/SYMBOL config_dflt 949$! 950$!we actually do not have "hints/" for VMS 951$! TYPE SYS$INPUT: 952$! DECK 953$! 954$!First time through, eh? I have some defaults handy for the following systems: 955$! 956$! EOD 957$! echo " ","VMS_VAX" 958$! echo " ","VMS_AXP" 959$! echo " ","VMS_IA64" 960$! : Now look for a hint file osname_osvers, unless one has been 961$! : specified already. 962$! TYPE SYS$INPUT: 963$! 964$!You may give one or more space-separated answers, or "none" if appropriate. 965$!If your OS version has no hints, DO NOT give a wrong version -- say "none". 966$! 967$! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans 968$! 969$Beyond_config_sh: 970$! 971$!: Restore computed paths !sfn 972$! 973$! %Config-I-VMS, a necessary error trap (could be PC running VCL) 974$! 975$ IF (osname .NES. "VMS") 976$ THEN 977$ echo4 "Hmm.. I wonder what ''osname' is (?)" 978$ TYPE SYS$INPUT: 979$ DECK 980 981%Config-E-VMS, ERROR: 982 983 Err, you do not appear to be running VMS! 984 This procedure is intended to Configure the building of Perl for VMS. 985 986$ EOD 987$ bool_dflt = "n" 988$ GOSUB myread 989$ IF ans 990$ THEN 991$ echo4 "Continuing..." 992$ ELSE 993$ echo4 "ABORTING..." 994$ SET DEFAULT 'vms_default_directory_name' !be kind rewind 995$ STOP 996$ EXIT 2 !$STATUS = "%X00000002" (error) 997$ ENDIF 998$ ENDIF !(osname .NES./.EQS. "VMS") 999$! 1000$!: who configured the system 1001$ cf_by = F$EDIT(user,"LOWERCASE") 1002$ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM") 1003$! 1004$! Peter Prymmer has seen: 1005$! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic) 1006$! "SYS$TIME_ZONE" = "EDT" 1007$! 1008$! Charles Lane recommended: 1009$! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400" 1010$! "NEWS_TIMEZONE" = "-0500" 1011$! "ST_TIMEZONE" = "EDT" 1012$! "JAN_TIME_ZONE" = "EST " 1013$! "MULTINET_TIMEZONE" = "EST" 1014$! "DAYLIGHT_SAVINGS" = "1" 1015$! 1016$! Charles Bailey recommends (in ANU NEWS Doc Jan 1995): 1017$! "PMDF_Timezone" 1018$! "Multinet_Timezone" 1019$! "TCPware_Timezone" 1020$! "WIN$Time_Zone" 1021$! 1022$! This snippet o' DCL returns a string in default Unix `date` format, 1023$! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL. 1024$! 1025$ MIN_TZO = -840 !units are minutes here 1026$ MAX_TZO = 840 1027$! 1028$ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY")) 1029$ monn = F$CVTIME(,,"MONTH") 1030$ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE")) 1031$ hour = F$CVTIME(,,"HOUR") 1032$ min = F$CVTIME(,,"MINUTE") 1033$ sec = F$CVTIME(,,"SECOND") 1034$ year = F$CVTIME(,,"YEAR") 1035$! 1036$ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/" 1037$ i = 0 1038$Mon_loop: 1039$ i = i + 1 1040$ mon = F$ELEMENT(i,"/",months) 1041$ IF i.LT.monn THEN GOTO Mon_loop 1042$! 1043$ tzneedset = "t" 1044$ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL") 1045$ IF systz.NES."" 1046$ THEN 1047$ tzhour = F$INTEGER(systz)/3600 1048$ tzmins = F$INTEGER(systz)/60 1049$ tzminrem = tzmins - tzhour*60 1050$ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy 1051$ IF tzhour.ge.0 1052$ THEN signothetime = "+" 1053$ IF tzhour.EQ.0.AND.tzminrem.EQ.0 1054$ THEN direction = "on GMT/" 1055$ ELSE direction = "east of " 1056$ ENDIF 1057$ ELSE signothetime = "-" 1058$ tzhour = -1*tzhour !keeps !UL happy 1059$ direction = "west of " 1060$ ENDIF 1061$ echo "" 1062$ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')" 1063$ IF tzminrem.ne.0 1064$ THEN 1065$ tzspan = "''tzhour' hours & ''tzminrem' minutes" 1066$ ELSE 1067$ tzspan = "''tzhour' hours" 1068$ ENDIF 1069$ bool_dflt = "y" 1070$ echo "Your system is ''tzspan' ''direction'UTC in England." 1071$ rp = "(''systz') Is this UTC Time Zone Offset correct? [''bool_dflt'] " 1072$ GOSUB myread 1073$ IF ans 1074$ THEN 1075$ tzneedset = "f" 1076$ tzd = systz 1077$ GOTO Beyond_TimeZone 1078$ ENDIF 1079$ ELSE 1080$ echo "" 1081$ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system" 1082$ ENDIF 1083$! 1084$TZSet: 1085$ echo "" 1086$ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England" 1087$ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but" 1088$ echo "Eastern Daylight Time (summer) is -4:00 offset." 1089$ dflt = "0:00" 1090$ rp = "Enter the Time Zone offset: [''dflt'] " 1091$ GOSUB myread 1092$ ans = F$Edit(ans,"collapse,trim,uncomment,upcase") 1093$ IF ans.EQS."" THEN ans = dflt 1094$ tzhour = F$ELEMENT(0,":","''ans'") !first 1095$ IF tzhour.EQS."" THEN tzhour = 0 1096$ tzhour = F$INTEGER(tzhour) 1097$ tzminrem = F$ELEMENT(1,":","''ans'") !second 1098$ IF tzminrem.NES."" 1099$ THEN 1100$ tzminrem = F$INTEGER(tzminrem) 1101$ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1 1102$ ELSE 1103$ tzminrem = 0 1104$ ENDIF 1105$ tzmins = tzhour*60 + tzminrem 1106$ tzd = F$STRING(tzmins*60) 1107$ IF tzhour .GE. 0 1108$ THEN 1109$ signothetime = "+" 1110$ ELSE 1111$ tzhour = -1*tzhour !keeps !UL happy 1112$ signothetime = "-" 1113$ ENDIF 1114$ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO) 1115$ THEN 1116$ echo "" 1117$ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00." 1118$ goto TZSet 1119$ ENDIF 1120$! 1121$Beyond_TimeZone: 1122$ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem) 1123$ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'" 1124$! 1125$!: determine the architecture name 1126$! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX' 1127$! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME") 1128$! but does have F$GETSYI("HW_MODEL"). 1129$! Please try to use either archname .EQS. "VMS_VAX" or archname .EQS. 1130$! "VMS_AXP" from here on to allow cross-platform configuration (e.g. 1131$! configure a VAX build on an Alpha). 1132$! 1133$ IF (F$GETSYI("HW_MODEL") .LT. 1024 .AND. F$GETSYI("HW_MODEL") .GT. 0) 1134$ THEN 1135$ archname = "VMS_VAX" 1136$ otherarch = "an Alpha or IA64" 1137$ alignbytes="8" 1138$ arch_type = "ARCH-TYPE=__VAX__" 1139$ ELSE 1140$ IF (F$GETSYI("ARCH_TYPE") .EQ. 2) 1141$ THEN 1142$ archname = "VMS_AXP" 1143$ otherarch = "a VAX or IA64" 1144$ arch_type = "ARCH-TYPE=__AXP__" 1145$ ELSE 1146$ archname = "VMS_IA64" 1147$ otherarch = "a VAX or Alpha" 1148$ arch_type = "ARCH-TYPE=__IA64__" 1149$ ENDIF 1150$ alignbytes="8" 1151$ ENDIF 1152$ dflt = archname 1153$ rp = "What is your architecture name? [''archname'] " 1154$ GOSUB myread 1155$ IF ans.NES."" 1156$ THEN 1157$ ans = F$EDIT(ans,"COLLAPSE, UPCASE") 1158$ IF (ans.NES.archname) !.AND.knowitall 1159$ THEN 1160$ echo4 "I'll go with ''archname' anyway..." 1161$ ENDIF 1162$ ENDIF 1163$ bool_dflt = "n" 1164$ vms_prefix = "perl_root" 1165$ vms_prefixup = F$EDIT(vms_prefix,"UPCASE") 1166$ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''bool_dflt'] " 1167$ GOSUB myread 1168$ IF .NOT. ans 1169$ THEN 1170$ sharedperl = "N" 1171$ ELSE 1172$ sharedperl = "Y" 1173$ IF (archname.EQS."VMS_AXP") 1174$ THEN 1175$ macros = macros + """AXE=1""," 1176$ ENDIF 1177$ IF (archname.EQS."VMS_IA64") 1178$ THEN 1179$ macros = macros + """IXE=1""," 1180$ ENDIF 1181$ ENDIF 1182$! 1183$!: is AFS running? !sfn 1184$!: decide how portable to be. Allow command line overrides. !sfn 1185$!: set up shell script to do ~ expansion !sfn 1186$!: expand filename !sfn 1187$!: now set up to get a file name !sfn 1188$! 1189$ IF F$TYPE(prefix) .EQS. "" 1190$ THEN 1191$ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]" 1192$ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - "000000." - ".000000" - ".;" 1193$ prefixbase = prefix - "]" 1194$! Add _ROOT to make install PERL_ROOT differ from build directory. 1195$ prefix = prefixbase + "_ROOT.]" 1196$ ENDIF 1197$ src = prefix 1198$!: determine root of directory hierarchy where package will be installed. 1199$ dflt = prefix 1200$ IF .NOT.silent 1201$ THEN 1202$ echo "" 1203$ echo "By default, ''package' will be installed in ''dflt', pod" 1204$ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for" 1205$ echo "all installation directories." 1206$ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation" 1207$ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM." 1208$ ENDIF 1209$ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] " 1210$ GOSUB myread 1211$ IF ans.NES."" 1212$ THEN 1213$ prefix = ans 1214$ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]" 1215$ ELSE 1216$ prefix = dflt 1217$ ENDIF 1218$ perl_root = prefix 1219$! 1220$! Check here for pre-existing PERL_ROOT. 1221$! -> ask if removal desired. 1222$! Check here for writability of requested PERL_ROOT if it is not the default (cwd). 1223$! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable. 1224$! 1225$ tmp = perl_root - ".]" + "]" 1226$ dflt = f$parse(tmp,,,,) 1227$ IF dflt .eqs. "" 1228$ THEN 1229$ echo4 "''tmp' does not yet exist." 1230$! create/directory 'tmp' 1231$ ELSE 1232$ echo4 "''tmp' already exists." 1233$ ENDIF 1234$! 1235$ vms_skip_install = "true" 1236$ bool_dflt = "y" 1237$! echo "" 1238$ rp = "Skip the remaining """"where install"""" questions? [''bool_dflt'] " 1239$ GOSUB myread 1240$ IF (.NOT.ans) THEN vms_skip_install = "false" 1241$ IF (.NOT.vms_skip_install) 1242$ THEN 1243$! 1244$!: set the prefixit variable, to compute a suitable default value 1245$! 1246$!: determine where private library files go 1247$!: Usual default is /usr/local/lib/perl5. Also allow things like 1248$!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant. 1249$ IF .NOT.silent 1250$ THEN 1251$ TYPE SYS$INPUT: 1252$ DECK 1253 1254There are some auxiliary files for perl5 that need to be put into a 1255private library directory that is accessible by everyone. 1256$ EOD 1257$ ENDIF 1258$ IF F$TYPE(privlib) .NES. "" 1259$ THEN dflt = privlib 1260$ ELSE dflt = "''vms_prefix':[lib]" 1261$ ENDIF 1262$ rp = "Pathname where the private library files will reside? " 1263$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") 1264$ GOSUB myread 1265$ privlib = ans 1266$! 1267$ ENDIF !%Config-I-VMS, skip remaining "where install" questions 1268$! 1269$ IF F$TYPE(perl_symbol) .EQS. "" THEN perl_symbol := true 1270$ IF F$TYPE(perl_verb) .EQS. "" THEN perl_verb = "" 1271$ IF perl_symbol 1272$ THEN bool_dflt = "y" 1273$ ELSE bool_dflt = "n" 1274$ ENDIF 1275$ IF .NOT.silent 1276$ THEN 1277$ echo "" 1278$ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign" 1279$ echo "symbol to invoke ''package', which is the usual method." 1280$ echO "If you do not do so then you would need a DCL command verb at the" 1281$ echo "process or the system wide level." 1282$ ENDIF 1283$ rp = "Invoke perl as a global symbol foreign command? [''bool_dflt'] " 1284$ GOSUB myread 1285$ IF (.NOT.ans) THEN perl_symbol = "false" 1286$! 1287$ IF (.NOT.perl_symbol) 1288$ THEN 1289$ IF perl_verb .EQS. "DCLTABLES" 1290$ THEN bool_dflt = "n" 1291$ ELSE bool_dflt = "y" 1292$ ENDIF 1293$ IF .NOT.silent 1294$ THEN 1295$ echo "" 1296$ echo "Since you won't be using a symbol you must choose to put the ''packageup'" 1297$ echo "verb in a per-process table or in the system wide DCLTABLES (which" 1298$ echo "would require write privilege)." 1299$ ENDIF 1300$ rp = "Invoke perl as a per process command verb? [ ''bool_dflt' ] " 1301$ GOSUB myread 1302$ IF (.NOT.ans) 1303$ THEN perl_verb = "DCLTABLES" 1304$ ELSE perl_verb = "PROCESS" 1305$ ENDIF 1306$ ENDIF ! (.NOT.perl_symbol) 1307$! 1308$!: set the base revision 1309$ baserev="5.0" 1310$ revision = baserev - ".0" 1311$!: get the patchlevel 1312$ echo "" 1313$ echo4 "Getting the current patchlevel..." 1314$ patchlevel="0" 1315$ subversion="0" 1316$ api_revision="0" 1317$ api_version="0" 1318$ api_subversion="0" 1319$ perl_patchlevel="0" 1320$ patchlevel_h = F$SEARCH("[-]patchlevel.h") 1321$ IF (patchlevel_h.NES."") 1322$ THEN 1323$ got_patch = "false" 1324$ got_sub = "false" 1325$ got_api_revision = "false" 1326$ got_api_version = "false" 1327$ got_api_subversion = "false" 1328$ got_perl_patchlevel= "false" 1329$ OPEN/READONLY CONFIG 'patchlevel_h' 1330$Patchlevel_h_loop: 1331$ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line 1332$ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch)) 1333$ THEN 1334$ line = F$EDIT(line,"COMPRESS, TRIM") 1335$ patchlevel = F$ELEMENT(2," ",line) 1336$ got_patch = "true" 1337$ ENDIF 1338$ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub)) 1339$ THEN 1340$ line = F$EDIT(line,"COMPRESS, TRIM") 1341$ subversion = F$ELEMENT(2," ",line) 1342$ got_sub = "true" 1343$ ENDIF 1344$ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision)) 1345$ THEN 1346$ line = F$EDIT(line,"COMPRESS, TRIM") 1347$ api_revision = F$ELEMENT(2," ",line) 1348$ got_api_revision = "true" 1349$ ENDIF 1350$ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version)) 1351$ THEN 1352$ line = F$EDIT(line,"COMPRESS, TRIM") 1353$ api_version = F$ELEMENT(2," ",line) 1354$ got_api_version = "true" 1355$ ENDIF 1356$ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion)) 1357$ THEN 1358$ line = F$EDIT(line,"COMPRESS, TRIM") 1359$ api_subversion = F$ELEMENT(2," ",line) 1360$ got_api_subversion = "true" 1361$ ENDIF 1362$ IF ((F$LOCATE("""DEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel)) 1363$ THEN 1364$ line = F$EDIT(line,"COMPRESS, TRIM") 1365$ perl_patchlevel = F$ELEMENT(1,"""",line) 1366$ perl_patchlevel = perl_patchlevel - "DEVEL" 1367$ got_perl_patchlevel = "true" 1368$ ENDIF 1369$ IF (.NOT. got_patch) .OR. - 1370 (.NOT. got_sub) .OR. - 1371 (.NOT. got_api_revision) .OR. - 1372 (.NOT. got_api_version) .OR. - 1373 (.NOT. got_api_subversion) .OR. - 1374 (.NOT. got_perl_patchlevel) - 1375 THEN GOTO Patchlevel_h_loop 1376$Close_patch: 1377$ CLOSE CONFIG 1378$ ENDIF 1379$! 1380$ IF F$SEARCH("[-].patch") .NES. "" 1381$ THEN 1382$ SET NOON 1383$ OPEN/READ PATCH [-].patch 1384$ READ PATCH line 1385$ CLOSE PATCH 1386$ tmp = F$EDIT(line,"COLLAPSE") 1387$ SET ON 1388$ IF tmp .GT. perl_patchlevel then perl_patchlevel = tmp 1389$ ENDIF 1390$! 1391$ version_patchlevel_string = "version ''patchlevel' subversion ''subversion'" 1392$ IF got_perl_patchlevel .AND. perl_patchlevel .NES. "0" 1393$ THEN 1394$ version_patchlevel_string = "''version_patchlevel_string' patch ''perl_patchlevel'" 1395$ ENDIF 1396$ echo "(You have ''package' ''version_patchlevel_string'.)" 1397$! 1398$ version = revision + "_" + patchlevel + "_" + subversion 1399$! 1400$ IF (.NOT.vms_skip_install) 1401$ THEN 1402$!: set the prefixup variable, to restore leading tilde escape !sfn 1403$! 1404$!: determine where public architecture dependent libraries go 1405$ IF (.NOT.silent) 1406$ THEN 1407$ echo "" 1408$ echo "''package' contains architecture-dependent library files. If you are" 1409$ ENDIF 1410$ IF (.NOT.silent) 1411$ THEN 1412$ TYPE SYS$INPUT: 1413$ DECK 1414sharing libraries in a heterogeneous environment, you might store 1415these files in a separate location. Otherwise, you can just include 1416them with the rest of the public library files. 1417$ EOD 1418$ ENDIF 1419$ IF F$TYPE(archlib) .NES. "" 1420$ THEN dflt = archlib 1421$ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]" 1422$ ENDIF 1423$ rp = "Where do you want to put the public architecture-dependent libraries? " 1424$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") 1425$ GOSUB myread 1426$ archlib = ans 1427$! 1428$ ENDIF !%Config-I-VMS, skip "where install" questions 1429$! 1430$! This quotation from Configure has to be included on VMS: 1431$! 1432$ TYPE SYS$INPUT: 1433$ DECK 1434 1435There is, however, a strange, musty smell in the air that reminds me of 1436something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit. 1437$ EOD 1438$ IF (.NOT.vms_skip_install) 1439$ THEN 1440$!: it so happens the Eunice I know will not run shell scripts in Unix format 1441$! 1442$!: see if setuid scripts can be secure !sfn 1443$!: now see if they want to do setuid emulation !sfn 1444$! 1445$!: determine where site specific libraries go. 1446$ IF .NOT.silent 1447$ THEN 1448$ TYPE SYS$INPUT: 1449$ DECK 1450 1451The installation process will also create a directory for 1452site-specific extensions and modules. Some users find it convenient 1453to place all local files in this directory rather than in the main 1454distribution directory. 1455$ EOD 1456$ ENDIF 1457$ IF F$TYPE(sitelib) .NES. "" 1458$ THEN dflt = sitelib 1459$ ELSE dflt = privlib - "]" + ".SITE_PERL]" 1460$ ENDIF 1461$ rp = "Pathname for the site-specific library files? " 1462$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") 1463$ GOSUB myread 1464$ sitelib = ans 1465$! 1466$!: determine where site specific architecture-dependent libraries go. 1467$ IF .NOT.silent 1468$ THEN TYPE SYS$INPUT: 1469$ DECK 1470 1471The installation process will also create a directory for 1472architecture-dependent site-specific extensions and modules. 1473$ EOD 1474$ ENDIF 1475$ IF F$TYPE(sitearch) .NES. "" 1476$ THEN dflt = sitearch 1477$ ELSE dflt = sitelib - "]" + "." + archname + "]" 1478$ ENDIF 1479$ rp = "Pathname for the site-specific architecture-dependent library files? " 1480$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") 1481$ GOSUB myread 1482$ sitearch = ans 1483$! 1484$!: determine where old public architecture dependent libraries might be 1485$! 1486$!: determine where public executables go 1487$ IF F$TYPE(bin) .NES. "" 1488$ THEN dflt = bin 1489$! ELSE dflt = prefix - ".]" + ".BIN]" 1490$ ELSE dflt = "/''vms_prefix'" 1491$ ENDIF 1492$ rp = "Pathname where the public executables will reside? " 1493$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") 1494$ GOSUB myread 1495$ bin = ans 1496$! 1497$!: determine where add-on public executables go 1498$ IF F$TYPE(sitebin) .NES. "" 1499$ THEN dflt = sitebin 1500$ ELSE dflt = "''vms_prefix':[bin.''archname']" 1501$ ENDIF 1502$ rp = "Pathname where the add-on public executables should be installed? " 1503$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ") 1504$ GOSUB myread 1505$ sitebin = ans 1506$! 1507$!: determine where manual pages are on this system 1508$!: What suffix to use on installed man pages 1509$!: see if we can have long filenames 1510$!: determine where library module manual pages go 1511$!: What suffix to use on installed man pages 1512$!: see what memory models we can support 1513$! 1514$ ELSE ! skipping "where install" questions, we must set some symbols 1515$ IF F$TYPE(archlib).EQS."" THEN - 1516 archlib="''vms_prefix':[lib.''archname'.''version']" 1517$ IF F$TYPE(bin) .EQS. "" THEN - 1518 bin="/''vms_prefix'" 1519$ IF F$TYPE(privlib) .EQS. "" THEN - 1520 privlib ="''vms_prefix':[lib]" 1521$ IF F$TYPE(sitearch) .EQS. "" THEN - 1522 sitearch="''vms_prefix':[lib.site_perl.''archname']" 1523$ IF F$TYPE(sitelib) .EQS. "" THEN - 1524 sitelib ="''vms_prefix':[lib.site_perl]" 1525$ IF F$TYPE(sitebin) .EQS. "" THEN - 1526 sitebin="''vms_prefix':[bin.''archname']" 1527$ ENDIF !%Config-I-VMS, skip "where install" questions 1528$! 1529$! These derived locations can be set whether we've opted to 1530$! skip the where install questions or not. 1531$! 1532$ IF F$TYPE(archlibexp) .EQS. "" THEN - 1533 archlibexp="''vms_prefix':[lib.''archname'.''version']" 1534$ IF F$TYPE(binexp) .EQS. "" THEN - 1535 binexp ="''vms_prefix':[000000]" 1536$ IF F$TYPE(builddir) .EQS. "" THEN - 1537 builddir ="''vms_prefix':[000000]" 1538$ IF F$TYPE(installarchlib) .EQS. "" THEN - 1539 installarchlib="''vms_prefix':[lib.''archname'.''version']" 1540$ IF F$TYPE(installbin) .EQS. "" THEN - 1541 installbin ="''vms_prefix':[000000]" 1542$ IF F$TYPE(installscript) .EQS. "" THEN - 1543 installscript ="''vms_prefix':[utils]" 1544$ IF F$TYPE(installman1dir) .EQS. "" THEN - 1545 installman1dir ="''vms_prefix':[man.man1]" 1546$ IF F$TYPE(installman3dir) .EQS. "" THEN - 1547 installman3dir ="''vms_prefix':[man.man3]" 1548$ IF F$TYPE(installprivlib) .EQS. "" THEN - 1549 installprivlib ="''vms_prefix':[lib]" 1550$ IF F$TYPE(installsitearch) .EQS. "" THEN - 1551 installsitearch="''vms_prefix':[lib.site_perl.''archname']" 1552$ IF F$TYPE(installsitelib) .EQS. "" THEN - 1553 installsitelib ="''vms_prefix':[lib.site_perl]" 1554$ IF F$TYPE(oldarchlib) .EQS. "" THEN - 1555 oldarchlib="''vms_prefix':[lib.''archname']" 1556$ IF F$TYPE(oldarchlibexp) .EQS. "" THEN - 1557 oldarchlibexp="''vms_prefix':[lib.''archname']" 1558$ IF F$TYPE(privlibexp) .EQS. "" THEN - 1559 privlibexp ="''vms_prefix':[lib]" 1560$ IF F$TYPE(scriptdir) .EQS. "" THEN - 1561 scriptdir ="''vms_prefix':[utils]" 1562$ IF F$TYPE(sitearchexp) .EQS. "" THEN - 1563 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']" 1564$ IF F$TYPE(sitelib_stem) .EQS. "" THEN - 1565 sitelib_stem ="''vms_prefix':[lib.site_perl]" 1566$ IF F$TYPE(sitelibexp) .EQS. "" THEN - 1567 sitelibexp ="''vms_prefix':[lib.site_perl]" 1568$! 1569$!: see if we need a special compiler 1570$! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands 1571$! 1572$ nocc = "f" 1573$ vms_cc_dflt = "" 1574$ vms_cc_available = "" 1575$! 1576$ OPEN/WRITE CONFIG ccvms.c 1577$ WRITE CONFIG "#ifdef __DECC" 1578$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky 1579$ WRITE CONFIG "#endif" 1580$ WRITE CONFIG "#include <stdio.h>" 1581$ WRITE CONFIG "int main() {" 1582$ WRITE CONFIG "#ifdef __DECC" 1583$ WRITE CONFIG " printf(""/DECC\n"");" 1584$ WRITE CONFIG "#else" 1585$ WRITE CONFIG " printf(""/VAXC\n"");" 1586$ WRITE CONFIG "#endif" 1587$ WRITE CONFIG " exit(0);" 1588$ WRITE CONFIG "}" 1589$ CLOSE CONFIG 1590$! 1591$ SET NOON 1592$ DEFINE/USER_MODE SYS$ERROR _NLA0: 1593$ DEFINE/USER_MODE SYS$OUTPUT _NLA0: 1594$ cc/NoObj/list=ccvms.lis ccvms.c 1595$ tmp = $status 1596$ SET ON 1597$ IF (silent) THEN GOSUB Shut_up 1598$ IF tmp.NE.%X10B90001 1599$ THEN 1600$ IF tmp.NE.%X10000001 1601$ THEN 1602$ nocc = "t" !%X10000001 is return from gcc 1603$ GOTO Gcc_initial_check 1604$ ENDIF 1605$ ENDIF 1606$! 1607$ GOSUB List_Parse 1608$ IF .NOT.silent THEN echo "" 1609$ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'" 1610$ IF F$LOCATE("VAX",line).NE.F$LENGTH(line) 1611$ THEN 1612$ IF .NOT.silent 1613$ THEN 1614$ echo "Will try cc/decc..." 1615$ ENDIF 1616$ SET NOON 1617$ DEFINE/USER_MODE SYS$ERROR NL: 1618$ DEFINE/USER_MODE SYS$OUTPUT NL: 1619$ cc/decc/NoObj/list=ccvms.lis ccvms.c 1620$ tmp = $status 1621$ SET ON 1622$ IF (silent) THEN GOSUB Shut_up 1623$ IF tmp.NE.%X10B90001 1624$ THEN 1625$ echo "Apparently you don't have that one." 1626$ ELSE 1627$ GOSUB List_parse 1628$ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'" 1629$ vms_cc_available = vms_cc_available + "cc/decc " 1630$ ENDIF 1631$ ELSE 1632$ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line)) - 1633 .or.(F$LOCATE("HP",F$EDIT(line,"UPCASE")).NE.F$LENGTH(line)) 1634$ THEN 1635$ vms_cc_dflt = "/decc" 1636$ vms_cc_available = vms_cc_available + "cc/decc " 1637$ ENDIF 1638$ ENDIF 1639$! 1640$Gcc_initial_check: 1641$ echo "Checking for gcc" 1642$ OPEN/WRITE CONFIG gccvers.lis 1643$ SET NOON 1644$ DEFINE/USER_MODE SYS$ERROR CONFIG 1645$ DEFINE/USER_MODE SYS$OUTPUT CONFIG 1646$ 'gcc_symbol'/noobj/version _nla0: 1647$ tmp = $status 1648$ SET ON 1649$ IF (silent) THEN GOSUB Shut_up 1650$ CLOSE CONFIG 1651$ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001) 1652$ THEN 1653$ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you do not have it." 1654$ DELETE/NOLOG/NOCONFIRM gccvers.lis; 1655$ GOTO Cxx_initial_check 1656$ ENDIF 1657$ OPEN/READ CONFIG gccvers.lis 1658$GCC_List_Read: 1659$ READ/END_OF_FILE=GCC_List_End CONFIG line 1660$ GOTO GCC_List_Read 1661$GCC_List_End: 1662$ CLOSE CONFIG 1663$ echo line 1664$ vms_cc_available = vms_cc_available + "''gcc_symbol' " 1665$ DELETE/NOLOG/NOCONFIRM gccvers.lis; 1666$! 1667$Cxx_initial_check: 1668$! 1669$! Do note that [vms]perl source files have a ways to go before they will 1670$! compile under CXX. 1671$! In order to test Configure.com with CXX invoke it with "-Dtry_cxx" on 1672$! the command line. 1673$! 1674$ IF F$TYPE(try_cxx) .EQS. "" THEN try_cxx := n 1675$ IF try_cxx .OR. try_cxx .EQS. "define" 1676$! 1677$ THEN 1678$! 1679$ echo "Checking for CXX..." 1680$ OPEN/WRITE CONFIG ccvms.c 1681$ WRITE CONFIG "#include <iostream>" 1682$ WRITE CONFIG "int main() {" 1683$ WRITE CONFIG "#ifdef __DECCXX" 1684$ WRITE CONFIG " cout << __DECCXX, endl;" 1685$ WRITE CONFIG "#else" 1686$ WRITE CONFIG " cout << 0,endl;" 1687$ WRITE CONFIG "#endif" 1688$! Todo: add G++ identifier check ?? 1689$ WRITE CONFIG " return(0);" 1690$ WRITE CONFIG "}" 1691$ CLOSE CONFIG 1692$ SET NOON 1693$ DEFINE/USER_MODE SYS$OUTPUT NL: 1694$ DEFINE/USER_MODE SYS$ERROR NL: 1695$ cxx ccvms.c 1696$ tmp = $status 1697$ SET ON 1698$! success $status with: 1699$! DEC C++ V1.1-001 on VMS VAX V5.5-2 1700$! DEC C++ V5.6-013 on OpenVMS VAX V7.1 1701$! DEC C++ V6.1-003 on OpenVMS Alpha V7.1 1702$! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1 1703$ IF tmp .eq. %X15F60001 1704$ THEN 1705$! Which linker? 1706$ SET NOON 1707$ DEFINE/USER_MODE SYS$OUTPUT NL: 1708$ DEFINE/USER_MODE SYS$ERROR NL: 1709$ link/nodebug ccvms.obj 1710$ tmp = $status 1711$ SET ON 1712$ ! success $status with: 1713$ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2 1714$ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1 1715$ IF tmp .eq. %X10000001 1716$ THEN 1717$ ld_try = "Link" 1718$ vms_cc_available = vms_cc_available + "cxx " 1719$ echo "CXX and LINK are available." 1720$ ELSE 1721$ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe; 1722$ SET NOON 1723$ DEFINE/USER_MODE SYS$OUTPUT NL: 1724$ DEFINE/USER_MODE SYS$ERROR NL: 1725$ cxxlink ccvms.obj 1726$ tmp = $status 1727$ SET ON 1728$ ! success $status with: 1729$ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1 1730$ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1 1731$ IF tmp .eq. %X10000001 1732$ THEN 1733$ ld_try = "cxxlink" 1734$ vms_cc_available = vms_cc_available + "cxx " 1735$ echo "CXX and CXXLINK are available." 1736$ ENDIF 1737$ ENDIF 1738$ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe; 1739$ ELSE 1740$ echo "Nope." 1741$ ENDIF 1742$ DELETE/NOLOG/NOCONFIRM ccvms.c; 1743$ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj; 1744$ CALL Cxx_demangler_cleanup 1745$! 1746$ ENDIF ! 1 .eq. 0 or 1 .eq. 1 1747$! 1748$CC_Cleanup: 1749$ DELETE/NOLOG/NOCONFIRM ccvms.*; 1750$CC_Desired: 1751$!: see if we need a special compiler 1752$! echo "" 1753$ echo "Available compiler(s):" 1754$ echo "( ''vms_cc_available')" 1755$ IF .NOT.nocc 1756$ THEN 1757$ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK 1758$ ELSE 1759$ dflt = gcc_symbol 1760$ ENDIF 1761$ rp = "Use which C compiler? [''dflt'] " 1762$ GOSUB myread 1763$ IF ans.NES."" 1764$ THEN 1765$ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE") 1766$ Mcc = ans 1767$ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans)) - 1768 .or.(F$LOCATE("hp",ans).NE.F$LENGTH(ans)) 1769$ THEN 1770$ Mcc = "cc/decc" 1771$! CPQ ? 1772$ ccname := DEC 1773$ C_COMPILER_Replace = "CC=cc=''Mcc'" 1774$ ENDIF 1775$ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans) 1776$ THEN 1777$ Mcc = "cxx" 1778$ ccname := CXX 1779$ ld = ld_try 1780$ C_COMPILER_Replace = "CC=cc=''Mcc'" 1781$ ELSE ! Not_cxx 1782$ IF Mcc.NES.dflt 1783$ THEN 1784$ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. - 1785 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt) 1786$ THEN 1787$ C_COMPILER_Replace = "CC=cc=''Mcc'" 1788$ ELSE 1789$ ccname := DEC 1790$ ENDIF 1791$ ELSE 1792$ IF Mcc .EQS. "cc/decc" 1793$ THEN 1794$ ccname := DEC 1795$ C_COMPILER_Replace = "CC=cc=''Mcc'" 1796$ ENDIF 1797$ ENDIF 1798$ ENDIF 1799$ ELSE 1800$ Mcc = dflt 1801$ IF Mcc .EQS. "cc/decc" 1802$ THEN 1803$ ccname := DEC 1804$ C_COMPILER_Replace = "CC=cc=''Mcc'" 1805$ ENDIF 1806$ IF Mcc .EQS. "gcc" 1807$ THEN 1808$ ccname := GCC 1809$ C_COMPILER_Replace = "CC=cc=''Mcc'" 1810$ ENDIF 1811$ ENDIF 1812$Decc_Version_check: 1813$ ccversion="" 1814$ IF ccname .EQS. "DEC" 1815$ THEN 1816$ echo "" 1817$ echo4 "Checking for the Dec C version number..." 1818$ OPEN/WRITE CONFIG deccvers.c 1819$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky 1820$ WRITE CONFIG "#include <stdio.h>" 1821$ WRITE CONFIG "int main() {" 1822$ WRITE CONFIG "#ifdef __DECC" 1823$ WRITE CONFIG "#ifdef __DECC_VER" 1824$ WRITE CONFIG " printf(""%i\n"", __DECC_VER);" 1825$ WRITE CONFIG "#else" 1826$ WRITE CONFIG " printf(""%i\n"", ""1"");" 1827$ WRITE CONFIG "#endif" 1828$ WRITE CONFIG "#endif" 1829$ WRITE CONFIG " exit(0);" 1830$ WRITE CONFIG "}" 1831$ CLOSE CONFIG 1832$ SET NOON 1833$ DEFINE/USER_MODE SYS$ERROR NL: 1834$ DEFINE/USER_MODE SYS$OUTPUT NL: 1835$ 'Mcc' deccvers.c 1836$ tmp = $status 1837$ IF (silent) THEN GOSUB Shut_up 1838$ DEFINE/USER_MODE SYS$ERROR NL: 1839$ DEFINE/USER_MODE SYS$OUTPUT NL: 1840$ link/nodebug deccvers.obj 1841$ tmp = $status 1842$ IF (silent) THEN GOSUB Shut_up 1843$ OPEN/WRITE CONFIG deccvers.out 1844$ DEFINE/USER_MODE SYS$ERROR CONFIG 1845$ DEFINE/USER_MODE SYS$OUTPUT CONFIG 1846$ mcr []deccvers.exe 1847$ tmp = $status 1848$ SET ON 1849$ CLOSE CONFIG 1850$ IF (silent) THEN GOSUB Shut_up 1851$ OPEN/READ CONFIG deccvers.out 1852$ READ/END_OF_FILE=Dec_c_cleanup CONFIG line 1853$Dec_c_cleanup: 1854$ CLOSE CONFIG 1855$ echo "You are using Dec C ''line'" 1856$ ccversion = line 1857$ Dec_C_Version = F$INTEGER(line) 1858$ IF Dec_C_Version .GE. 60200000 .AND. archname .NES. "VMS_VAX" 1859$ THEN 1860$ echo4 "adding /NOANSI_ALIAS qualifier to ccflags." 1861$ ccflags = ccflags + "/NOANSI_ALIAS" 1862$ ENDIF 1863$ DELETE/NOLOG/NOCONFIRM deccvers.*; 1864$ ENDIF 1865$Gcc_check: 1866$ gccversion = "" 1867$ IF ccname .EQS. "GCC" 1868$ THEN 1869$ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB") 1870$ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE") 1871$ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB") 1872$ IF gcclib_olb .EQS. "" 1873$ THEN 1874$! These objects/libs come w/ gcc 2.7.2 for AXP: 1875$ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb") 1876$ IF tmp .NES. "" then gcclib_olb = tmp 1877$ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb") 1878$ IF tmp .NES. "" 1879$ THEN 1880$ IF gcclib_olb .EQS. "" 1881$ THEN gcclib_olb = tmp 1882$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp 1883$ ENDIF 1884$ ENDIF 1885$ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB") 1886$ IF tmp .NES. "" 1887$ THEN 1888$ IF gcclib_olb .EQS. "" 1889$ THEN gcclib_olb = tmp 1890$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp 1891$ ENDIF 1892$ ENDIF 1893$ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj") 1894$ IF tmp .NES. "" 1895$ THEN 1896$ IF gcclib_olb .EQS. "" 1897$ THEN gcclib_olb = tmp 1898$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp 1899$ ENDIF 1900$ ENDIF 1901$ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs 1902$ ELSE 1903$ gcclib_olb = gcclib_olb + "/lib" 1904$ ENDIF 1905$ IF gcclib_olb .NES. "" .AND. - 1906 (vaxcrtl_olb .NES. "" .OR. - 1907 vaxcrtl_exe .NES. "" ) 1908$ THEN 1909$ echo "" 1910$ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4 1911$ OPEN/WRITE CONFIG gccvers.c 1912$ WRITE CONFIG "#include <stdio.h>" 1913$ WRITE CONFIG "int main() {" 1914$ WRITE CONFIG "#ifdef __GNUC__" 1915$ WRITE CONFIG "#ifdef __VERSION__" 1916$ WRITE CONFIG " printf(""%s\n"", __VERSION__);" 1917$ WRITE CONFIG "#else" 1918$ WRITE CONFIG " printf(""%s\n"", ""1"");" 1919$ WRITE CONFIG "#endif" 1920$ WRITE CONFIG "#endif" 1921$ WRITE CONFIG " exit(0);" 1922$ WRITE CONFIG "}" 1923$ CLOSE CONFIG 1924$ DEFINE SYS$ERROR _NLA0: 1925$ DEFINE SYS$OUTPUT _NLA0: 1926$ 'Mcc' gccvers.c 1927$ tmp = $status 1928$ DEASSIGN SYS$ERROR _NLA0: 1929$ DEASSIGN SYS$OUTPUT _NLA0: 1930$ IF (silent) THEN GOSUB Shut_up 1931$ DEFINE SYS$ERROR _NLA0: 1932$ DEFINE SYS$OUTPUT _NLA0: 1933$ IF vaxcrtl_exe .EQS. "" 1934$ THEN 1935$ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb) 1936$ THEN 1937$ link/nodebug gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library 1938$ tmp = $status 1939$ ELSE 1940$ link/nodebug gccvers.obj,'gcclib_olb' 1941$ tmp = $status 1942$ ENDIF 1943$ ELSE 1944$ OPEN/WRITE CONFIG GCCVERS.OPT 1945$ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE" 1946$ CLOSE CONFIG 1947$ link/nodebug gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb' 1948$ tmp = $status 1949$ ENDIF 1950$ DEASSIGN SYS$ERROR 1951$ DEASSIGN SYS$OUTPUT 1952$ IF (silent) THEN GOSUB Shut_up 1953$ OPEN/WRITE CONFIG gccvers.out 1954$ DEFINE SYS$ERROR CONFIG 1955$ DEFINE SYS$OUTPUT CONFIG 1956$ mcr []gccvers.exe 1957$ tmp = $status 1958$ CLOSE CONFIG 1959$ DEASSIGN SYS$OUTPUT 1960$ DEASSIGN SYS$ERROR 1961$ IF (silent) THEN GOSUB Shut_up 1962$ OPEN/READ CONFIG gccvers.out 1963$ READ/END_OF_FILE=Gcc_cleanup CONFIG line 1964$Gcc_cleanup: 1965$ CLOSE CONFIG 1966$ DELETE/NOLOG/NOCONFIRM gccvers.*; 1967$ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line) 1968$ THEN 1969$ echo "You are not using GNU cc." 1970$ GOTO Host_name 1971$ ELSE 1972$ echo "You are using GNU cc ''line'" 1973$ gccversion = line 1974$ ccname := "GCC" 1975$ C_COMPILER_Replace = "CC=cc=''Mcc'" 1976$ GOTO Include_dirs 1977$ ENDIF 1978$ ENDIF 1979$ ENDIF 1980$Cxx_Version_check: 1981$ IF ccname .EQS. "CXX" 1982$ THEN 1983$ OPEN/WRITE CONFIG cxxvers.c 1984$ WRITE CONFIG "#include <stdio.h>" 1985$ WRITE CONFIG "int main() {" 1986$ WRITE CONFIG "#ifdef __DECCXX_VER" 1987$ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);" 1988$ WRITE CONFIG "#else" 1989$ WRITE CONFIG " printf(""%i\n"", ""0"");" 1990$ WRITE CONFIG "#endif" 1991$ WRITE CONFIG " return(0);" 1992$ WRITE CONFIG "}" 1993$ CLOSE CONFIG 1994$ SET NOON 1995$ DEFINE/USER_MODE SYS$ERROR NL: 1996$ DEFINE/USER_MODE SYS$OUTPUT NL: 1997$ 'Mcc' cxxvers.c 1998$ tmp = $status 1999$ SET ON 2000$ IF (silent) THEN GOSUB Shut_up 2001$ SET NOON 2002$ DEFINE/USER_MODE SYS$ERROR NL: 2003$ DEFINE/USER_MODE SYS$OUTPUT NL: 2004$ 'ld' cxxvers.obj 2005$ tmp = $status 2006$ SET ON 2007$ IF (silent) THEN GOSUB Shut_up 2008$ OPEN/WRITE CONFIG cxxvers.out 2009$ SET NOON 2010$ DEFINE/USER_MODE SYS$ERROR CONFIG 2011$ DEFINE/USER_MODE SYS$OUTPUT CONFIG 2012$ mcr []cxxvers.exe 2013$ tmp = $status 2014$ SET ON 2015$ CLOSE CONFIG 2016$ IF (silent) THEN GOSUB Shut_up 2017$ OPEN/READ CONFIG cxxvers.out 2018$ READ/END_OF_FILE=Cxx_cleanup CONFIG line 2019$Cxx_cleanup: 2020$ CLOSE CONFIG 2021$ DELETE/NOLOG/NOCONFIRM cxxvers.*; 2022$ echo "You are using CXX ''line'" 2023$ cxxversion = line 2024$ ccversion = line 2025$ CALL Cxx_demangler_cleanup 2026$ ENDIF 2027$! 2028$Cxx_demangler_cleanup: SUBROUTINE 2029$! 2030$! If we do build with CXX these demangler Dbs will be left all over. 2031$! However, configure.com does try to remove the [.UU] sub directory. 2032$! Be sure to set default to the correct place before calling this sub. 2033$! 2034$ SET NOON 2035$ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;* 2036$ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. "" 2037$ THEN 2038$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR 2039$ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR; 2040$ ENDIF 2041$ SET ON 2042$ EXIT 2043$ ENDSUBROUTINE ! Cxx_demangler_cleanup 2044$! 2045$ GOTO Host_name 2046$! 2047$List_Parse: 2048$ OPEN/READ CONFIG ccvms.lis 2049$ READ CONFIG line 2050$ IF archname .EQS. "VMS_VAX" 2051$ THEN 2052$ read CONFIG line 2053$ archsufx = "VAX" 2054$ ELSE 2055$ IF archname .EQS. "VMS_AXP" 2056$ THEN 2057$ archsufx = "AXP" 2058$ ELSE 2059$ archsufx = "IA64" 2060$ ENDIF 2061$ ENDIF 2062$ CLOSE CONFIG 2063$ line = F$EDIT(line,"TRIM,COMPRESS") 2064$ line = line - "Page 1" ! occurs at end all compilers 2065$ line = line - "CCVMS " ! filename appears w/ VAXC 2066$ line = line - "Source Listing " ! Seen w/ AXP DECC 2067$ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 " 2068$ line = line - tmp 2069$ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry 2070$ DELETE/NOLOG/NOCONFIRM ccvms.lis; 2071$ RETURN 2072$! 2073$Include_dirs: 2074$!: What should the include directory be ? (.TLB text libraries) 2075$ dflt = gcclib_olb 2076$ rp = "Where are the include files you want to use? " 2077$ IF f$length( rp + "[''dflt'] " ).gt.76 2078$ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ") 2079$ ELSE rp = rp + "[''dflt'] " 2080$ ENDIF 2081$ GOSUB myread 2082$ usrinc = ans 2083$! 2084$!: see if we have to deal with yellow pages, now NIS. 2085$!: now get the host name 2086$Host_name: 2087$ echo "" 2088$ echo4 "Figuring out host name..." !>&4 2089$ myhostname = "" 2090$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME") 2091$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME") 2092$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME") 2093$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME") 2094$ IF myhostname.eqs."".and. - 2095 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. - 2096 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN - 2097 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN") 2098$ IF myhostname.eqs."".and. - 2099 F$TRNLNM("TCPIP$INET_HOST") .nes. "" .and. - 2100 F$TRNLNM("TCPIP$INET_DOMAIN") .nes. "" THEN - 2101 myhostname = F$TRNLNM("TCPIP$INET_HOST") + "." + F$TRNLNM("TCPIP$INET_DOMAIN") 2102$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME") 2103$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS") 2104$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::" 2105$ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM") 2106$!: you do not want to know about this 2107$!: verify guess 2108$ rp = "Your host name appears to be """"''myhostname'"""". Right? " 2109$ bool_dflt = "y" 2110$ GOSUB myread 2111$ IF (.not.ans) 2112$ THEN 2113$ READ SYS$COMMAND/PROMPT= - 2114 "Please type the (one word) name of your host: " ans 2115$ myhostname = ans 2116$ ENDIF 2117$!: translate upper to lower if necessary 2118$ myhostname = F$EDIT(myhostname,"COLLAPSE") 2119$ mylowhostname = F$EDIT(myhostname," LOWERCASE") 2120$ IF mylowhostname.NES.myhostname 2121$ THEN 2122$ echo "(Normalizing case in your host name)" 2123$ myhostname = mylowhostname 2124$ ENDIF 2125$! 2126$ fp = F$LOCATE(".",myhostname) 2127$ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname) 2128$ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::" 2129$ THEN 2130$ rp = "What is your domain name? [''mydomain'] " 2131$ dflt = mydomain 2132$ GOSUB myread 2133$ mydomain = ans 2134$!: translate upper to lower if necessary 2135$ mydomain = F$EDIT(mydomain,"COLLAPSE") 2136$ mylowdomain = F$EDIT(mydomain," LOWERCASE") 2137$ IF mylowdomain.NES.mydomain 2138$ THEN 2139$ echo "(Normalizing case in your domain name)" 2140$ mydomain = mylowdomain 2141$ ENDIF 2142$ ENDIF 2143$ myhostname = myhostname - mydomain 2144$ echo "(Trimming domain name from host name--host name is now ''myhostname')" 2145$ IF .NOT.silent 2146$ THEN 2147$ TYPE SYS$INPUT: 2148$ DECK 2149 2150I need to get your e-mail address in Internet format if possible, i.e. 2151something like user@host.domain. Please answer accurately since I have 2152no easy means to double check it. The default value provided below 2153is most probably close to the reality but may not be valid from outside 2154your organization... 2155$ EOD 2156$ ENDIF 2157$ IF F$TYPE(cf_email) .EQS. "" 2158$ THEN 2159$ dflt = "''cf_by'@''myhostname'"+"''mydomain'" 2160$ rp = "What is your e-mail address? [''dflt'] " 2161$ GOSUB myread 2162$ cf_email = ans 2163$ ENDIF 2164$! 2165$ IF .NOT.silent 2166$ THEN 2167$ TYPE SYS$INPUT: 2168$ DECK 2169 2170If you or somebody else will be maintaining perl at your site, please 2171fill in the correct e-mail address here so that they may be contacted 2172if necessary. Currently, the "perlbug" program included with perl 2173will send mail to this address in addition to perlbug@perl.com. You may 2174enter "none" for no administrator. 2175$ EOD 2176$ ENDIF 2177$ dflt = "''cf_email'" 2178$ rp = "Perl administrator e-mail address [''dflt'] " 2179$ GOSUB myread 2180$ perladmin = ans 2181$! 2182$!: determine where public executable scripts go 2183$!: determine perl absolute location 2184$!: figure out how to guarantee perl startup 2185$! 2186$!: see how we invoke the C preprocessor 2187$! echo "" 2188$! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4 2189$!: Set private lib path 2190$!: Now check and see which directories actually exist, avoiding duplicates 2191$!: determine optimize, if desired, or use for debug flag also 2192$!: We will not override a previous value, but we might want to 2193$!: augment a hint file 2194$!: the following weeds options from ccflags that are of no interest to cpp 2195$!: flags used in final linking phase 2196$!: Try to guess additional flags to pick up local libraries. 2197$!: coherency check 2198$! echo "" 2199$! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4 2200$!: compute shared library extension 2201$!: Looking for optional libraries 2202$!: see if nm is to be used to determine whether a symbol is defined or not 2203$!: get list of predefined functions in a handy place 2204$!: see if we have sigaction or sigprocmask 2205$!: see whether socketshr exists 2206$ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."") 2207$ THEN 2208$ Has_socketshr = "T" 2209$ echo "" 2210$ echo4 "Hmm... Looks like you have SOCKETSHR Berkeley networking support." 2211$ ELSE 2212$ Has_socketshr = "F" 2213$ ENDIF 2214$ IF (ccname .EQS. "DEC" .AND. Dec_C_Version .GE. 50200000) .OR. (ccname .EQS. "CXX") 2215$ THEN 2216$ Has_Dec_C_Sockets = "T" 2217$ echo "" 2218$ echo4 "Hmm... Looks like you have Dec C Berkeley networking support." 2219$ ELSE 2220$ Has_Dec_C_Sockets = "F" 2221$ ENDIF 2222$ ! Hey, we've got both. Default to Dec C, then, since it's better 2223$ IF Has_socketshr .OR. Has_Dec_C_Sockets 2224$ THEN 2225$ echo "" 2226$ echo "You have sockets available. Which socket stack do you want to" 2227$ echo "build into Perl?" 2228$ IF Has_Dec_C_Sockets 2229$ THEN 2230$ dflt = "DECC" 2231$ ELSE 2232$ dflt = "SOCKETSHR" 2233$ ENDIF 2234$ rp = "Choose socket stack (NONE" 2235$ IF Has_socketshr THEN rp = rp + ",SOCKETSHR" 2236$ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC" 2237$ rp = rp + ") [''dflt'] " 2238$ GOSUB myread 2239$ Has_Dec_C_Sockets = "F" 2240$ Has_socketshr = "F" 2241$ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE") 2242$ IF ans.eqs."decc" THEN Has_Dec_C_Sockets = "T" 2243$ IF ans.eqs."socketshr" THEN Has_socketshr = "T" 2244$ ENDIF 2245$! 2246$! 2247$! Ask if they want to build with VMS_DEBUG perl 2248$ echo "" 2249$ echo "Perl can be built to run under the VMS debugger." 2250$ echo "You should only select this option if you are debugging" 2251$ echo "perl itself. This can be a useful feature if you are " 2252$ echo "embedding perl in a program." 2253$ bool_dflt = "n" 2254$ if f$type(usevmsdebug) .nes. "" 2255$ then 2256$ if usevmsdebug .or. usevmsdebug .eqs. "define" then bool_dflt="y" 2257$ endif 2258$ rp = "Build a VMS-DEBUG version of Perl? [''bool_dflt'] " 2259$ GOSUB myread 2260$ use_vmsdebug_perl = ans 2261$ IF use_vmsdebug_perl 2262$ THEN 2263$ usevmsdebug = "define" 2264$ macros = macros + """__DEBUG__=1""," 2265$ ELSE 2266$ usevmsdebug = "undef" 2267$ ENDIF 2268$! 2269$! Ask if they want to build with DEBUGGING 2270$ echo "" 2271$ echo "Perl can be built with extra runtime debugging enabled. This" 2272$ echo "enables the -D switch, at the cost of some performance. It" 2273$ echo "was mandatory on perl 5.005 and before on VMS, but is now" 2274$ echo "optional. If you do not generally use it you should probably" 2275$ echo "leave this off and gain a bit of extra speed." 2276$ bool_dflt = "y" 2277$ if f$type(useperldebug) .nes. "" 2278$ then 2279$ if f$extract(0,1,f$edit(useperldebug,"collapse,upcase")).eqs."N" .or. useperldebug .eqs. "undef" then bool_dflt="n" 2280$ endif 2281$ rp = "Build a DEBUGGING version of Perl? [''bool_dflt'] " 2282$ GOSUB myread 2283$ use_debugging_perl = ans 2284$! 2285$! Ask if they want to build with MULTIPLICITY 2286$ echo "" 2287$ echo "Perl can be built so that multiple Perl interpreters can coexist" 2288$ echo "within the same Perl executable." 2289$ echo "There is some performance overhead, however, so you" 2290$ echo "probably do not want to choose this unless you are going to be" 2291$ echo "doing things with embedded perl." 2292$ bool_dflt = "n" 2293$ if f$type(usemultiplicity) .nes. "" 2294$ then 2295$ if usemultiplicity .or. usemultiplicity .eqs. "define" then bool_dflt = "y" 2296$ endif 2297$ rp = "Build Perl for multiplicity? [''bool_dflt'] " 2298$ GOSUB myread 2299$ IF ans 2300$ THEN 2301$ usemultiplicity="define" 2302$ ELSE 2303$ usemultiplicity="undef" 2304$ ENDIF 2305$! 2306$! Ask if they want to build with 64-bit support 2307$ IF (archname.NES."VMS_VAX").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1") 2308$ THEN 2309$ bool_dflt = "n" 2310$ IF F$TYPE(use64bitint) .NES. "" 2311$ THEN 2312$ IF use64bitint .OR. use64bitint .eqs. "define" THEN bool_dflt = "y" 2313$ ENDIF 2314$ echo "" 2315$ echo "You have natively 64-bit long integers." 2316$ echo "" 2317$ echo "Perl can be built to take advantage of 64-bit integer types" 2318$ echo "on some systems, To do so, Configure can be run with -Duse64bitint." 2319$ echo "Choosing this option will most probably introduce binary incompatibilities." 2320$ echo "" 2321$ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'." 2322$ rp = "Try to use 64-bit integers, if available? [''bool_dflt'] " 2323$ GOSUB myread 2324$ use64bitint = ans 2325$! 2326$ bool_dflt = "n" 2327$ IF F$TYPE(use64bitall) .NES. "" 2328$ THEN 2329$ IF use64bitall .OR. use64bitall .eqs. "define" THEN bool_dflt = "y" 2330$ ENDIF 2331$ echo "" 2332$ echo "You may also choose to try maximal 64-bitness. It means using as much" 2333$ echo "64-bitness as possible on the platform. This in turn means even more" 2334$ echo "binary incompatibilities. On the other hand, your platform may not" 2335$ echo "have any more 64-bitness available than what you already have chosen." 2336$ echo "" 2337$ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'." 2338$ rp = "Try to use maximal 64-bit support, if available? [''bool_dflt'] " 2339$ GOSUB myread 2340$ use64bitall=ans 2341$ IF use64bitall .AND. .NOT. use64bitint 2342$ THEN 2343$ echo "" 2344$ echo "Since you have chosen a maximally 64-bit build, I'm also turning on" 2345$ echo "the use of 64-bit integers." 2346$ echo "I am also setting the default to use large files if available." 2347$ use64bitint="Y" 2348$ ENDIF 2349$! 2350$ bool_dflt = use64bitall 2351$ IF F$TYPE(uselargefiles) .NES. "" 2352$ THEN 2353$ IF uselargefiles .OR. uselargefiles .eqs. "define" THEN bool_dflt = "y" 2354$ ENDIF 2355$ echo "" 2356$ echo "Perl can be built to understand large files (files larger than 2 gigabytes)" 2357$ echo "on some systems. To do so, Configure can be run with -Duselargefiles." 2358$ echo "" 2359$ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'." 2360$ rp = "Try to understand large files, if available? [''bool_dflt'] " 2361$ GOSUB myread 2362$ uselargefiles=ans 2363$! 2364$ ENDIF ! not VAX && >= 7.1 2365$! 2366$ IF usesitecustomize .OR. usesitecustomize .eqs. "define" 2367$ THEN 2368$ usesitecustomize = "define" 2369$ ELSE 2370$ usesitecustomize = "undef" 2371$ ENDIF 2372$! 2373$! Ask about threads, if appropriate 2374$ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX" 2375$ THEN 2376$ echo "" 2377$ echo "Perl can be built to take advantage of threads on some systems." 2378$ echo "To do so, configure.com can be run with -""Dusethreads""." 2379$ echo "" 2380$ echo "Note that Perl built with threading support runs slightly slower" 2381$ echo "and uses more memory than plain Perl. The current implementation" 2382$ echo "is believed to be stable, but it is fairly new, and so should be" 2383$ echo "treated with caution." 2384$ echo "" 2385$ bool_dflt = "n" 2386$ if f$type(usethreads) .nes. "" 2387$ then 2388$ if usethreads .or. usethreads .eqs. "define" then bool_dflt="y" 2389$ endif 2390$! Catch cases where user specified ithreads or 5005threads but 2391$! forgot -Dusethreads 2392$ if f$type(useithreads) .nes. "" 2393$ then 2394$ if useithreads .or. useithreads .eqs. "define" then bool_dflt="y" 2395$ endif 2396$ if f$type(use5005threads) .nes. "" 2397$ then 2398$ if use5005threads .or. use5005threads .eqs. "define" then bool_dflt="y" 2399$ endif 2400$ echo "If this doesn't make any sense to you, just accept the default '" + bool_dflt + "'." 2401$ rp = "Build a threading Perl? [''bool_dflt'] " 2402$ GOSUB myread 2403$ if ans 2404$ THEN 2405$ use_threads="T" 2406$ ! Shall we do the 5.005-type threads, or IThreads? 2407$ echo "Since release 5.6, Perl has had two different threading implementations," 2408$ echo "the newer interpreter-based version (ithreads) with one interpreter per" 2409$ echo "thread, and the older 5.005 version (5005threads)." 2410$ echo "The 5005threads version is effectively unmaintained and will probably be" 2411$ echo "removed in Perl 5.10, so there should be no need to build a Perl using it" 2412$ echo "unless needed for backwards compatibility with some existing 5.005threads" 2413$ echo "code." 2414$ echo "" 2415$ bool_dflt = "y" 2416$ if f$type(useithreads) .nes. "" 2417$ then 2418$ if useithreads .eqs. "undef" then bool_dflt="n" 2419$ endif 2420$ if f$type(use5005threads) .nes. "" 2421$ then 2422$ if use5005threads .or. use5005threads .eqs. "define" then bool_dflt="n" 2423$ endif 2424$ rp = "Use the newer intepreter-based ithreads? [''bool_dflt'] " 2425$ GOSUB myread 2426$ use_ithreads=ans 2427$ if use_ithreads 2428$ THEN 2429$ use_5005_threads="N" 2430$ ELSE 2431$ use_5005_threads="Y" 2432$ ENDIF 2433$ ! Are they on VMS 7.1 on an alpha or itanium? 2434$ if (archname.nes."VMS_VAX").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1") 2435$ THEN 2436$ echo "" 2437$ echo "Threaded perl can be linked to use multiple kernel threads" 2438$ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature" 2439$ echo "allows multiple threads to execute simultaneously on an SMP" 2440$ echo "system as well as preventing a single thread from blocking" 2441$ echo "all the threads in a program, even on a single-processor" 2442$ echo "machine. Unfortunately, this feature isn't safe on an" 2443$ echo "unpatched 7.1 system (several OS patches were required when" 2444$ echo "this procedure was written)." 2445$ bool_dflt = "n" 2446$ rp = "Enable multiple kernel threads and upcalls? [''bool_dflt'] " 2447$ gosub myread 2448$ if ans 2449$ THEN 2450$ Thread_Live_Dangerously = "MT=MT=1" 2451$ ENDIF 2452$ ENDIF 2453$ ENDIF 2454$ ENDIF 2455$ IF archname .NES. "VMS_VAX" 2456$ THEN 2457$! Case sensitive? 2458$ echo "" 2459$ echo "By default, perl (and pretty much everything else on VMS) uses" 2460$ echo "case-insensitive linker symbols. Which is to say, when the" 2461$ echo "underlying C code makes a call to a routine called Perl_foo in" 2462$ echo "the source, the name in the object modules or shareable images" 2463$ echo "is really PERL_FOO. There are some packages that use an" 2464$ echo "embedded perl interpreter that instead require case-sensitive" 2465$ echo "linker symbols." 2466$ echo "" 2467$ echo "If you have no idea what this means, and do not have" 2468$ echo "any program requiring anything, choose the default." 2469$ bool_dflt = be_case_sensitive 2470$ if f$type(usecasesensitive) .nes. "" 2471$ then 2472$ if usecasesensitive .or. usecasesensitive .eqs. "define" then bool_dflt = "y" 2473$ if f$extract(0,1,f$edit(usecasesensitive,"collapse,upcase")).eqs."N" .or. usecasesensitive .eqs. "undef" then bool_dflt = "n" 2474$ endif 2475$ rp = "Build with case-sensitive symbols? [''bool_dflt'] " 2476$ GOSUB myread 2477$ be_case_sensitive = ans 2478$! IEEE math? 2479$ echo "" 2480$ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers" 2481$ echo "internally on Alpha, but if you need G_FLOAT for binary compatibility" 2482$ echo "with an external library or existing data, you may wish to disable" 2483$ echo "the IEEE math option." 2484$ bool_dflt = use_ieee_math 2485$ if f$type(useieee) .nes. "" 2486$ then 2487$ if useieee .or. useieee .eqs. "define" 2488$ then 2489$ bool_dflt="y" 2490$ else 2491$ bool_dflt="n" 2492$ endif 2493$ endif 2494$ rp = "Use IEEE math? [''bool_dflt'] " 2495$ GOSUB myread 2496$ use_ieee_math = ans 2497$ ELSE 2498$ be_case_sensitive = "n" 2499$ use_ieee_math = "n" 2500$ ENDIF 2501$ useieee = "undef" 2502$ usecasesensitive = "undef" 2503$ if (use_ieee_math) then useieee = "define" 2504$ if (be_case_sensitive) then usecasesensitive = "define" 2505$! Unlink all versions? 2506$ echo "" 2507$ echo "By default, Perl's unlink() provides VMS-like behavior and only" 2508$ echo "deletes the latest version of a file. Enabling this option builds" 2509$ echo "Perl so that unlink() deletes all versions of a file." 2510$ bool_dflt = unlink_all_versions 2511$ if f$type(unlink_all_versions) .nes. "" 2512$ then 2513$ if unlink_all_versions .or. unlink_all_versions .eqs. "define" 2514$ then 2515$ bool_dflt="y" 2516$ else 2517$ bool_dflt="n" 2518$ endif 2519$ endif 2520$ rp = "Make unlink() delete all versions of a file? [''bool_dflt'] " 2521$ GOSUB myread 2522$ unlink_all_versions = ans 2523$ IF unlink_all_versions 2524$ THEN 2525$ d_unlink_all_versions = "define" 2526$ ELSE 2527$ d_unlink_all_versions = "undef" 2528$ ENDIF 2529$! CC Flags 2530$ echo "" 2531$ echo "Your compiler may want other flags. For this question you should include" 2532$ echo "/INCLUDE=(whatever) and /DEFINE=(whatever), flags and any other flags" 2533$ echo "or qualifiers used by the compiler." 2534$ echo "" 2535$ echo "To use no flags, specify the word ""none""." 2536$ dflt = user_c_flags 2537$ rp = "Any additional cc flags? [''dflt'] " 2538$ GOSUB myread 2539$ IF ans .EQS. "none" THEN ans = "" 2540$ user_c_flags = "''ans'" 2541$! 2542$! Ask whether they want to use secure logical translation when tainting 2543$ echo "" 2544$ echo "As Perl starts up, it checks several logical names, such as" 2545$ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects" 2546$ echo "of its behavior. For additional security, you may limit this" 2547$ echo "process to executive- and kernel-mode translation when tainting" 2548$ echo "is enabled. In this case, logical names normally skipped when" 2549$ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well." 2550$ echo "If you do not choose to do this, the usual order of access modes" 2551$ echo "is used for logical name translation." 2552$ echo "" 2553$ echo "This restriction does not apply to the %ENV hash or to implicit" 2554$ echo "logical name translation during parsing of file specifications;" 2555$ echo "these always use the normal sequence of access modes for logical" 2556$ echo "name translation." 2557$ bool_dflt = "y" 2558$ if f$type(usesecurelog) .nes. "" 2559$ then 2560$ if f$extract(0,1,f$edit(usesecurelog,"collapse,upcase")).eqs."N" .or. usesecurelog .eqs. "undef" then bool_dflt = "n" 2561$ endif 2562$ rp = "Use secure logical name translation? [''bool_dflt'] " 2563$ GOSUB myread 2564$ d_secintgenv = ans 2565$ usesecurelog = "undef" 2566$ if (d_secintgenv) then usesecurelog = "define" 2567$! 2568$! Ask whether they want to default filetypes 2569$ echo "" 2570$ echo "When you pass the name of a program to Perl on the command line," 2571$ echo "it generally doesn't supply any defaults unless the -S command" 2572$ echo "line switch is specified. In keeping with the VMS tradition of" 2573$ echo "default file types, however, you can configure Perl to try default" 2574$ echo "file types of nothing, .pl, and .com, in that order (e.g. typing" 2575$ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and" 2576$ echo "finally foo.com)." 2577$ echo "" 2578$ echo "This is currently broken in some configurations. Only enable it if" 2579$ echo "you know what you are doing." 2580$ bool_dflt = "n" 2581$ if f$type(usedefaulttypes) .nes. "" 2582$ then 2583$ if usedefaulttypes .or. usedefaulttypes .eqs. "define" then bool_dflt="y" 2584$ endif 2585$ rp = "Always use default file types? [''bool_dflt'] " 2586$ GOSUB myread 2587$ d_alwdeftype = ans 2588$ usedefaulttypes = "undef" 2589$ if (d_alwdeftype) then usedefaulttypes = "define" 2590$! 2591$! determine whether to use malloc wrapping 2592$ echo "" 2593$ bool_dflt = "y" 2594$ IF F$TYPE(usemallocwrap) .nes. "" 2595$ then 2596$ if .NOT. usemallocwrap .or. usemallocwrap .eqs. "undef" then bool_dflt = "n" 2597$ endif 2598$ rp = "Do you wish to wrap malloc calls to protect against potential overflows? [''bool_dflt'] " 2599$ GOSUB myread 2600$ IF ans 2601$ THEN usemallocwrap = "define" 2602$ ELSE usemallocwrap = "undef" 2603$ ENDIF 2604$! 2605$! Ask if they want to use perl's memory allocator 2606$ echo "" 2607$ echo "Perl has a built-in memory allocator that is tuned for normal" 2608$ echo "memory usage. It is oftentimes better than the standard system" 2609$ echo "memory allocator. It also has the advantage of providing memory" 2610$ echo "allocation statistics, if you choose to enable them." 2611$ bool_dflt = "n" 2612$ IF F$TYPE(usemymalloc) .nes. "" 2613$ then 2614$ if usemymalloc .or. usemymalloc .eqs. "define" then bool_dflt = "y" 2615$ endif 2616$ rp = "Do you wish to attempt to use the malloc that comes with ''package'? [''bool_dflt'] " 2617$ GOSUB myread 2618$ mymalloc = ans 2619$ IF mymalloc 2620$ THEN 2621$ IF use_debugging_perl 2622$ THEN 2623$ echo "" 2624$ echo "Perl can keep statistics on memory usage if you choose to use" 2625$ echo "them. This is useful for debugging, but does have some" 2626$ echo "performance overhead." 2627$ bool_dflt = "n" 2628$ rp = "Do you want the debugging memory allocator? [''bool_dflt'] " 2629$ gosub myread 2630$ use_debugmalloc = ans 2631$ ENDIF 2632$ ! Check which memory allocator we want 2633$ echo "" 2634$ echo "There are currently three different memory allocators: the" 2635$ echo "default (which is a pretty good general-purpose memory manager)," 2636$ echo "the TWO_POT allocator (which is optimized to save memory for" 2637$ echo "larger allocations), and PACK_MALLOC (which is optimized to save" 2638$ echo "memory for smaller allocations). They're all good, but if your" 2639$ echo "usage tends towards larger chunks use TWO_POT, otherwise use" 2640$ echo "PACK_MALLOC." 2641$ dflt = "DEFAULT" 2642$ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] " 2643$ GOSUB myread 2644$ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y" 2645$ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y" 2646$ ENDIF 2647$! 2648$ known_extensions = "" 2649$ xxx = "" 2650$ OPEN/READ CONFIG 'manifestfound' 2651$ext_loop: 2652$ READ/END_OF_FILE=end_ext/ERROR=end_ext CONFIG line 2653$ IF F$EXTRACT(0,4,line) .NES. "ext/" .AND. - 2654 F$EXTRACT(0,8,line) .NES. "vms/ext/" THEN goto ext_loop 2655$ line = F$EDIT(line,"COMPRESS") 2656$ line = F$ELEMENT(0," ",line) 2657$ line_len = F$LENGTH(line) 2658$ IF F$EXTRACT(line_len - 12,12,line) .NES. "/Makefile.PL" THEN goto ext_loop 2659$ IF F$EXTRACT(0,4,line) .EQS. "ext/" THEN - 2660 xxx = F$EXTRACT(4,line_len - 16,line) 2661$ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit 2662$ IF xxx .EQS. "SDBM_File/sdbm" THEN goto ext_loop ! sub extension - omit 2663$ IF xxx .EQS. "Devel/PPPort/harness" THEN goto ext_loop ! sub extension - omit 2664$ IF F$EXTRACT(0,7,xxx) .EQS. "Encode/" THEN goto ext_loop ! sub extension - omit 2665$ IF xxx .EQS. "B/C" THEN goto ext_loop ! sub extension - omit 2666$ IF F$EXTRACT(0,8,line) .EQS. "vms/ext/" THEN - 2667 xxx = "VMS/" + F$EXTRACT(8,line_len - 20,line) 2668$ known_extensions = known_extensions + " ''xxx'" 2669$ goto ext_loop 2670$end_ext: 2671$ close CONFIG 2672$ DELETE/SYMBOL xxx 2673$ known_extensions = F$EDIT(known_extensions,"TRIM,COMPRESS") 2674$ dflt = known_extensions 2675$ IF ccname .NES. "DEC" .AND. ccname .NES. "CXX" 2676$ THEN 2677$ dflt = dflt - "POSIX" ! not with VAX C or GCC 2678$ ENDIF 2679$ dflt = dflt - "ByteLoader" ! needs to be ported 2680$ dflt = dflt - "DB_File" ! needs to be ported 2681$ dflt = dflt - "GDBM_File" ! needs porting/special library 2682$ dflt = dflt - "IPC/SysV" ! needs to be ported 2683$ dflt = dflt - "NDBM_File" ! needs porting/special library 2684$ dflt = dflt - "ODBM_File" ! needs porting/special library 2685$ dflt = dflt - "Sys/Syslog" ! needs porting/special library "GDBM_File macro LOG_DEBUG" 2686$ IF .NOT. Has_socketshr .AND. .NOT. Has_Dec_C_Sockets 2687$ THEN 2688$ dflt = dflt - "Socket" ! optional on VMS 2689$ ENDIF 2690$ IF .NOT. use_threads THEN dflt = dflt - "Thread" 2691$ dflt = F$EDIT(dflt,"TRIM,COMPRESS") 2692$! 2693$! Ask for their default list of extensions to build 2694$ echo "" 2695$ echo "It is time to specify which modules you want to build into" 2696$ echo "perl. Most of these are standard and should be chosen, though" 2697$ echo "you might, for example, want to build GDBM_File instead of" 2698$ echo "SDBM_File if you have the GDBM library built on your machine." 2699$ echo "" 2700$ echo "Which modules do you want to build into perl?" 2701$ rp = "[''dflt'] " 2702$ GOSUB myread 2703$ extensions = F$EDIT(ans,"TRIM,COMPRESS") 2704$! 2705$! %Config-I-VMS, determine build/make utility here (make gmake mmk mms) 2706$ echo "" 2707$ echo "Checking your ""make"" utilities..." 2708$! If the 'build' that you use is not here add it and it's test 2709$! switch to the _END_ of these strings (and increment max_build) 2710$! (e.g. builders = builders + "/FOOMAKE" 2711$! probers = probers + " -fooVersionSwitch" 2712$! ) & please let me know about it. 2713$ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK" 2714$ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT" 2715$ max_build = 7 2716$! 2717$ orig_dflt = f$edit(builder,"UPCASE") 2718$ if orig_dflt .eqs. "" then orig_dflt = "MMK" 2719$ default_set = "" 2720$ ok_builders = "" 2721$ OPEN/WRITE/ERROR=Open_error CONFIG Makefile. 2722$ WRITE CONFIG "dont_make_anything_yet:" 2723$ WRITE CONFIG F$FAO("!_") 2724$ CLOSE CONFIG 2725$ n = 0 2726$ messages = F$ENVIRONMENT("MESSAGE") 2727$Build_probe: 2728$ build = F$ELEMENT(n,"/",builders) 2729$ probe = F$ELEMENT(n,"!",probers) 2730$ echo "Testing whether you have ''build' on your system..." 2731$! 2732$! Noted with GNU Make version 3.60 that the $status and $severity 2733$! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C" 2734$! $SEVERITY == "4". 2735$! 2736$ SET NOON 2737$ ON CONTROL_Y THEN GOTO Reenable_messages_build 2738$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT 2739$ 'build' 'probe' 2740$ IF ($SEVERITY .EQ. 1) ! not adequate? 2741$ THEN 2742$ echo "OK." 2743$ IF (build .EQS. orig_dflt) 2744$ THEN 2745$ default_set = "TRUE" 2746$ dflt = build 2747$ ENDIF 2748$ ok_builders = ok_builders + " " + build 2749$ IF (.NOT. default_set) THEN dflt = build 2750$ ELSE 2751$ echo "Nope." 2752$ ENDIF 2753$Reenable_messages_build: 2754$ SET MESSAGE 'messages' 2755$ SET ON 2756$ on control_y then goto clean_up 2757$ n = n + 1 2758$ IF (n .LT. max_build) THEN GOTO Build_probe 2759$! 2760$ echo "" 2761$ IF (ok_builders .NES. "") 2762$ THEN 2763$ echo "Here is the list of builders you can apparently use:" 2764$ echo "(",ok_builders," )" 2765$ rp = "Which """"make"""" utility do you wish to use? [''dflt'] " 2766$ GOSUB myread 2767$ ans = F$EDIT(ans,"TRIM, COMPRESS") 2768$ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here 2769$ IF (ans .EQS. "") 2770$ THEN build = dflt 2771$ ELSE build = ans 2772$ ENDIF 2773$ ELSE 2774$ TYPE SYS$INPUT: 2775$ DECK 2776 2777%Config-E-VMS, ERROR: 2778 Well this looks pretty serious. Perl5 cannot be compiled without a "make" 2779 utility of some sort and after checking my "builders" list I cannot find 2780 the symbol or command you use on your system to compile programs. 2781 2782$ EOD 2783$ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans 2784$ ans = F$EDIT(ans,"TRIM, COMPRESS") 2785$ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here 2786$ IF (ans .EQS. "") 2787$ THEN build = dflt 2788$ echo "I do not know where ""make"" is, and my life depends on it." 2789$ echo "Go find a make program or fix your DCL$PATH setting!" 2790$ echo "ABORTING..." 2791$ SET DEFAULT 'vms_default_directory_name' !be kind rewind 2792$ STOP 2793$ EXIT 2 !$STATUS = "%X00000002" (error) 2794$ ELSE 2795$ build = ans 2796$ ENDIF 2797$ ENDIF 2798$! 2799$ DELETE/NOLOG/NOCONFIRM Makefile.; 2800$ GOTO Beyond_open 2801$Open_error: 2802$ TYPE SYS$INPUT: 2803$ DECK 2804 2805 There seems to be trouble. I just tried to create a file in 2806$ EOD 2807$ echo4 'F$ENVIRONMENT("DEFAULT")' 2808$ TYPE SYS$INPUT: 2809$ DECK 2810 but was unsuccessful. I am stopping now. Please check that directories' 2811 PROTECTION bits. I will leave you in the directory where you started 2812 Configure.com 2813$ EOD 2814$ echo4 "ABORTING..." 2815$ GOTO Clean_up 2816$ STOP 2817$ EXIT 2818$! 2819$Beyond_open: 2820$! echo " Very well I will proceed with ""''build'""" 2821$ make = F$EDIT(build,"UPCASE") 2822$! 2823$!: locate the preferred pager for this system 2824$!pagers = "most|more|less|type/page" 2825$ IF osvers .GES. "V6.1" 2826$ THEN 2827$ dflt = "type/page=save=10" 2828$ ELSE 2829$ dflt = "type/page" 2830$ ENDIF 2831$! assume that the presence of a most symbol indicates the presence 2832$! of the pager. 2833$ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most" 2834$ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager 2835$ rp="What pager is used on your system? [''dflt'] " 2836$ GOSUB myread 2837$ pager = ans 2838$! 2839$! update [.vms]config.vms here 2840$! 2841$! update makefile here 2842$! echo4 "Updating makefile..." 2843$! 2844$ IF (make .EQS. "MMS").OR.(make .EQS. "MMK") 2845$ THEN 2846$ makefile = "" !wrt MANIFEST dir 2847$ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir 2848$ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?) 2849$ Makefile_SH = "descrip_mms.template" 2850$ ELSE 2851$ makefile = " -f Makefile." !wrt MANIFEST dir 2852$ UUmakefile = "[-]Makefile." !wrt CWD dir 2853$ DEFmakefile = "Makefile." !wrt DEF dir (?) 2854$ Makefile_SH = "Makefile.in" 2855$ ENDIF 2856$! 2857$ IF macros .NES. "" 2858$ THEN 2859$ tmp = F$LENGTH(macros) 2860$ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma 2861$ macros = "/macro=(" + macros + ")" 2862$ ENDIF 2863$! Build up the extra C flags 2864$! 2865$ IF use_ieee_math 2866$ THEN 2867$ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm" 2868$ ENDIF 2869$ IF be_case_sensitive 2870$ THEN 2871$ extra_flags = "''extra_flags'" + "/Names=As_Is" 2872$ ENDIF 2873$ extra_flags = "''extra_flags'" + "''user_c_flags'" 2874$! 2875$ min_pgflquota = "100000" 2876$ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA")) 2877$ IF pgflquota .LES. min_pgflquota 2878$ THEN 2879$ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'." 2880$ READ SYS$COMMAND/PROMPT="Continue? [n] " ans 2881$ IF ans 2882$ THEN 2883$ echo4 "Continuing..." 2884$ ELSE 2885$ echo4 "ABORTING..." 2886$ GOTO Clean_up 2887$ ENDIF 2888$ ENDIF 2889$! 2890$! PerlIO abstraction 2891$! 2892$ bool_dflt = "y" 2893$ IF F$TYPE(useperlio) .NES. "" 2894$ then 2895$ if f$extract(0,1,f$edit(useperlio,"collapse,upcase")) .eqs. "N" .or. useperlio .eqs. "undef" then bool_dflt = "n" 2896$ endif 2897$ IF .NOT. silent 2898$ THEN 2899$ echo "Previous versions of ''package' used the standard IO mechanisms as" 2900$ TYPE SYS$INPUT: 2901$ DECK 2902defined in <stdio.h>. Versions 5.003_02 and later of perl allow 2903alternate IO mechanisms via the PerlIO abstraction layer, but the 2904stdio mechanism is still available if needed. The abstraction layer 2905can use AT&T's sfio (if you already have sfio installed) or regular stdio. 2906Using PerlIO with sfio may cause problems with some extension modules. 2907 2908$ EOD 2909$ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'." 2910$ ENDIF 2911$ rp = "Use the PerlIO abstraction layer? [''bool_dflt'] " 2912$ GOSUB myread 2913$ IF ans 2914$ THEN 2915$ useperlio = "define" 2916$ ELSE 2917$ echo "Ok, doing things the stdio way." 2918$ useperlio = "undef" 2919$ ENDIF 2920$! 2921$ echo "" 2922$ echo4 "Checking the C run-time library." 2923$! 2924$! Former SUBCONFIGURE.COM 2925$! 2926$! - build a config.sh for VMS Perl. 2927$! - use built config.sh to take config_h.SH -> config.h 2928$! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile) 2929$! vms/Makefile.in -> Makefile. (VMS GNU Makefile?) 2930$! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?) 2931$! 2932$! Note for folks from other platforms changing things in here: 2933$! 2934$! Fancy changes (based on compiler capabilities or VMS version or 2935$! whatever) are tricky, so go ahead and punt on those. 2936$! 2937$! Simple changes, though (say, always setting something to 1, or undef, 2938$! or something like that) are straightforward. Adding a new constant 2939$! item for the ultimately created config.sh requires at least one 2940$! (possibly more) line(s) to this file. 2941$! 2942$! Add a line in the format: 2943$! 2944$! $ WC "foo='undef'" 2945$! 2946$! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##' 2947$! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order 2948$! is sorted ASCII and corresponds to the output of config.sh in the 2949$! Bourne shell version of Configure). 2950$! Be very careful with quoting, as it can be tricky. 2951$! For example if instead of a constant string like 'undef' or 'define' 2952$! you wanted to add something to VMS's config.sh that looks like: 2953$! 2954$! blank_string='' 2955$! 2956$! then add a line that looks like this before the 2957$! '##END WRITE NEW CONSTANTS HERE##' tagged line: 2958$! 2959$! $ WC "blank_string='" + "'" 2960$! 2961$! (+ is the string concatenator and "''var'" has the effect 2962$! of "${var}" in perl or sh, but "'const'" is not interpolated). 2963$! 2964$! Note that unitialized variables, such as a line like: 2965$! 2966$! $ WC "new_var='" + new_var + "'" 2967$! 2968$! should be avoided unless new_var has a value assigned prior 2969$! to that line (think of perl's -w warnings). 2970$! 2971$! %DCL-W-UNDSYM, undefined symbol - check validity and spelling 2972$! \NEW_VAR\ 2973$! 2974$! 2975$ vms_ver = F$EXTRACT(1,3, osvers) 2976$ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc" 2977$ MCC = f$edit(mcc, "UPCASE") 2978$ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'" 2979$ IF ccname .EQS. "DEC" 2980$ THEN 2981$ Checkcc := "''Mcc'/prefix=all" 2982$ ELSE 2983$ IF ccname .EQS. "CXX" 2984$ THEN 2985$ Checkcc := cxx 2986$ ELSE 2987$ Checkcc := "''Mcc'" 2988$ ENDIF 2989$ ENDIF 2990$ ccflags = ccflags + extra_flags 2991$ IF be_case_sensitive 2992$ THEN 2993$ d_vms_be_case_sensitive = "define" 2994$ ELSE 2995$ d_vms_be_case_sensitive = "undef" 2996$ ENDIF 2997$! Some constant defaults. 2998$ hwname = f$getsyi("HW_NAME") 2999$ myname = myhostname 3000$ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE") 3001$! 3002$ ccdlflags="" 3003$ cccdlflags="" 3004$! 3005$ IF use64bitint .OR. use64bitint .EQS. "define" 3006$ THEN 3007$ use64bitint = "define" 3008$ uselongdouble = "define" 3009$ alignbytes="16" 3010$ usemorebits = "define" 3011$ ivdformat="""Ld""" 3012$ uvuformat="""Lu""" 3013$ uvoformat="""Lo""" 3014$ uvxformat="""Lx""" 3015$ uvXUformat="""LX""" 3016$ ELSE 3017$ use64bitint = "undef" 3018$ uselongdouble = "undef" 3019$ usemorebits = "undef" 3020$ ivdformat="""ld""" 3021$ uvuformat="""lu""" 3022$ uvoformat="""lo""" 3023$ uvxformat="""lx""" 3024$ uvXUformat="""lX""" 3025$ ENDIF 3026$ IF uselongdouble .OR. uselongdouble .EQS. "define" 3027$ THEN 3028$ nveformat="""Le""" 3029$ nvfformat="""Lf""" 3030$ nvgformat="""Lg""" 3031$ ELSE 3032$ nveformat="""e""" 3033$ nvfformat="""f""" 3034$ nvgformat="""g""" 3035$ ENDIF 3036$ IF use64bitall .OR. use64bitall .EQS. "define" 3037$ THEN 3038$ use64bitall = "define" 3039$ ELSE 3040$ use64bitall = "undef" 3041$ ENDIF 3042$ IF uselargefiles .OR. uselargefiles .EQS. "define" 3043$ THEN 3044$ uselargefiles = "define" 3045$ ELSE 3046$ uselargefiles = "undef" 3047$ ENDIF 3048$! 3049$ usemymalloc = "undef" 3050$ if mymalloc then usemymalloc = "define" 3051$! 3052$ perl_cc=Mcc 3053$! 3054$ IF (sharedperl .AND. archname .EQS. "VMS_AXP") 3055$ THEN 3056$ obj_ext=".abj" 3057$ so="axe" 3058$ dlext="axe" 3059$ exe_ext=".axe" 3060$ lib_ext=".alb" 3061$ ELSE 3062$ IF (sharedperl .AND. archname .EQS. "VMS_IA64") 3063$ THEN 3064$ obj_ext=".ibj" 3065$ so="ixe" 3066$ dlext="ixe" 3067$ exe_ext=".ixe" 3068$ lib_ext=".ilb" 3069$ ELSE 3070$ obj_ext=".obj" 3071$ so="exe" 3072$ dlext="exe" 3073$ exe_ext=".exe" 3074$ lib_ext=".olb" 3075$ ENDIF 3076$ ENDIF 3077$ dlobj="dl_vms''obj_ext'" 3078$! 3079$ cppstdin="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input" 3080$ cppminus=" " 3081$ cpprun="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input" 3082$ cpplast=" " 3083$! 3084$ timetype="time_t" 3085$ signal_t="void" 3086$ stdchar="char" 3087$! 3088$ IF mymalloc 3089$ THEN d_mymalloc="define" 3090$ ELSE d_mymalloc="undef" 3091$ ENDIF 3092$! 3093$ usedl="define" 3094$ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n" 3095$ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}""" 3096$! 3097$ IF ((use_threads) .AND. (vms_ver .LES. "6.2")) 3098$ THEN 3099$ libs="SYS$SHARE:CMA$LIB_SHR.EXE/SHARE SYS$SHARE:CMA$RTL.EXE/SHARE SYS$SHARE:CMA$OPEN_LIB_SHR.exe/SHARE SYS$SHARE:CMA$OPEN_RTL.exe/SHARE" 3100$ ELSE 3101$ libs=" " 3102$ ENDIF 3103$ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX" 3104$ THEN 3105$ libc="(DECCRTL)" 3106$ ELSE 3107$ libc=" " 3108$ ENDIF 3109$! 3110$! perllibs should be libs with all non-core libs (such as gdbm) removed. 3111$! 3112$ perllibs=libs 3113$! 3114$! Are we 64 bit? 3115$! 3116$ IF use64bitint .OR. use64bitint .EQS. "define" 3117$ THEN 3118$ d_PRId64 = "define" 3119$ d_PRIu64 = "define" 3120$ d_PRIo64 = "define" 3121$ d_PRIx64 = "define" 3122$ d_PRIXU64 = "define" 3123$ sPRId64 = """Ld""" 3124$ sPRIXU64 = """LX""" 3125$ sPRIi64 = """Li""" 3126$ sPRIo64 = """Lo""" 3127$ sPRIu64 = """Lu""" 3128$ sPRIx64 = """Lx""" 3129$ d_quad = "define" 3130$ quadtype = "long long" 3131$ uquadtype = "unsigned long long" 3132$ quadkind = "QUAD_IS_LONG_LONG" 3133$ d_frexpl = "define" 3134$ d_isnan = "define" 3135$ d_isnanl = "define" 3136$ d_modfl = "define" 3137$ d_modflproto = "define" 3138$ ELSE 3139$ d_PRId64 = "undef" 3140$ d_PRIXU64 = "undef" 3141$ d_PRIu64 = "undef" 3142$ d_PRIo64 = "undef" 3143$ d_PRIx64 = "undef" 3144$ sPRId64 = "" 3145$ sPRIXU64 = """lX""" 3146$ sPRIi64 = "" 3147$ sPRIo64 = "" 3148$ sPRIu64 = "" 3149$ sPRIx64 = "" 3150$ d_quad = "undef" 3151$ quadtype = "long" 3152$ uquadtype = "unsigned long" 3153$ quadkind = "QUAD_IS_LONG" 3154$ d_frexpl = "undef" 3155$ d_isnan = "undef" 3156$ d_isnanl = "undef" 3157$ d_modfl = "undef" 3158$ d_modflproto = "undef" 3159$ ENDIF 3160$! 3161$! Now some that we build up 3162$! 3163$ IF use_threads 3164$ THEN 3165$ IF use_5005_threads 3166$ THEN 3167$ arch = "''arch'-thread" 3168$ archname = "''archname'-thread" 3169$ d_old_pthread_create_joinable = "undef" 3170$ old_pthread_create_joinable = " " 3171$ use5005threads = "define" 3172$ useithreads = "undef" 3173$ ELSE 3174$ arch = "''arch'-ithread" 3175$ archname = "''archname'-ithread" 3176$ d_old_pthread_create_joinable = "undef" 3177$ old_pthread_create_joinable = " " 3178$ use5005threads = "undef" 3179$ useithreads = "define" 3180$ ENDIF 3181$ ELSE 3182$ d_old_pthread_create_joinable = "undef" 3183$ old_pthread_create_joinable = " " 3184$ use5005threads = "undef" 3185$ useithreads = "undef" 3186$ ENDIF 3187$! 3188$! Some that we need to invoke the compiler for 3189$! 3190$! 3191$! handy construction aliases/symbols 3192$! 3193$ OS := "open/write CONFIG []try.c" 3194$ WS := "write CONFIG" 3195$ CS := "close CONFIG" 3196$ DS := "delete/nolog/noconfirm []try.*;*" 3197$ Needs_Opt := N 3198$ good_compile = %X10B90001 3199$ IF ccname .EQS. "GCC" 3200$ THEN 3201$ open/write OPTCHAN []try.opt 3202$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library" 3203$ write OPTCHAN "Sys$Share:VAXCRTL/Share" 3204$ Close OPTCHAN 3205$ Needs_Opt := Y 3206$ good_compile = %X10000001 3207$ ENDIF 3208$ IF ccname .EQS. "CXX" 3209$ THEN 3210$ good_compile = %X15F60001 3211$ ENDIF 3212$ good_link = %X10000001 3213$ tmp = "" ! null string default 3214$! 3215$ GOTO beyond_compile_ok 3216$! 3217$! Check for type sizes 3218$! 3219$type_size_check: 3220$! 3221$ OS 3222$ WS "#if defined(__DECC) || defined(__DECCXX)" 3223$ WS "#include <stdlib.h>" 3224$ WS "#endif" 3225$ WS "#include <stdio.h>" 3226$ WS "int main()" 3227$ WS "{" 3228$ WS "printf(""%d\n"", sizeof(''tmp'));" 3229$ WS "exit(0);" 3230$ WS "}" 3231$ CS 3232$ GOSUB compile 3233$ RETURN 3234$! 3235$!: locate header file 3236$findhdr: 3237$! 3238$ OS 3239$ WS "#if defined(__DECC) || defined(__DECCXX)" 3240$ WS "#include <stdlib.h>" 3241$ WS "#endif" 3242$ WS "#include <stdio.h>" 3243$ WS "#include <''tmp'>" 3244$ WS "int main()" 3245$ WS "{" 3246$ WS "printf(""define\n"");" 3247$ WS "exit(0);" 3248$ WS "}" 3249$ CS 3250$ GOSUB link_ok 3251$ RETURN 3252$! 3253$!: define an alternate in-header-list? function 3254$inhdr: 3255$! 3256$ GOSUB findhdr 3257$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link 3258$ THEN 3259$ echo4 "<''tmp'> found." 3260$ tmp = "define" 3261$ ELSE 3262$ echo4 "<''tmp'> NOT found." 3263$ tmp = "undef" 3264$ ENDIF 3265$ RETURN 3266$! 3267$!: define an is-in-libc? function 3268$inlibc: 3269$ GOSUB link_ok 3270$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link 3271$ THEN 3272$ echo4 "''tmp'() found." 3273$ tmp = "define" 3274$ ELSE 3275$ echo4 "''tmp'() NOT found." 3276$ tmp = "undef" 3277$ ENDIF 3278$ RETURN 3279$! 3280$!: define a shorthand compile call 3281$compile: 3282$ GOSUB link_ok 3283$just_mcr_it: 3284$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link 3285$ THEN 3286$ OPEN/WRITE CONFIG []try.out 3287$ DEFINE/USER_MODE SYS$ERROR CONFIG 3288$ DEFINE/USER_MODE SYS$OUTPUT CONFIG 3289$ MCR []try.exe 3290$ CLOSE CONFIG 3291$ OPEN/READ CONFIG []try.out 3292$ READ CONFIG tmp 3293$ CLOSE CONFIG 3294$ DELETE/NOLOG/NOCONFIRM []try.out; 3295$ DELETE/NOLOG/NOCONFIRM []try.exe; 3296$ ELSE 3297$ tmp = "" ! null string default 3298$ ENDIF 3299$ RETURN 3300$! 3301$link_ok: 3302$ GOSUB compile_ok 3303$ DEFINE/USER_MODE SYS$ERROR _NLA0: 3304$ DEFINE/USER_MODE SYS$OUTPUT _NLA0: 3305$ SET NOON 3306$ IF Needs_Opt 3307$ THEN 3308$ 'ld' try.obj,try.opt/opt 3309$ link_status = $status 3310$ ELSE 3311$ 'ld' try.obj 3312$ link_status = $status 3313$ ENDIF 3314$ SET ON 3315$ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj; 3316$ RETURN 3317$! 3318$!: define a shorthand compile call for compilations that should be ok. 3319$compile_ok: 3320$ DEFINE/USER_MODE SYS$ERROR _NLA0: 3321$ DEFINE/USER_MODE SYS$OUTPUT _NLA0: 3322$ SET NOON 3323$ 'Checkcc' try.c 3324$ compile_status = $status 3325$ SET ON 3326$ DELETE/NOLOG/NOCONFIRM try.c; 3327$ RETURN 3328$! 3329$beyond_compile_ok: 3330$! 3331$! Check for __STDC__ 3332$! 3333$ OS 3334$ WS "#if defined(__DECC) || defined(__DECCXX)" 3335$ WS "#include <stdlib.h>" 3336$ WS "#endif" 3337$ WS "#include <stdio.h>" 3338$ WS "int main()" 3339$ WS "{" 3340$ WS "#ifdef __STDC__" 3341$ WS "printf(""42\n"");" 3342$ WS "#else" 3343$ WS "printf(""1\n"");" 3344$ WS "#endif" 3345$ WS "exit(0);" 3346$ WS "}" 3347$ CS 3348$ GOSUB compile 3349$ cpp_stuff=tmp 3350$ IF F$INTEGER(tmp) .eq. 42 3351$ THEN 3352$ echo4 "Your C compiler and pre-processor defines the symbol:" 3353$ echo4 "__STDC__" 3354$ ENDIF 3355$! 3356$! Check for double size 3357$! 3358$ echo4 "Checking to see how big your double precision numbers are..." 3359$ tmp="double" 3360$ GOSUB type_size_check 3361$ doublesize = tmp 3362$ echo "Your double is ''doublesize' bytes long." 3363$! 3364$! Check for long double size 3365$! 3366$ OS 3367$ WS "#if defined(__DECC) || defined(__DECCXX)" 3368$ WS "#pragma message disable ALL" ! VAX compilers may have distracting informationals 3369$ WS "#include <stdlib.h>" 3370$ WS "#endif" 3371$ WS "#include <stdio.h>" 3372$ WS "int main()" 3373$ WS "{" 3374$ WS "printf(""%d\n"", sizeof(long double));" 3375$ WS "exit(0);" 3376$ WS "}" 3377$ CS 3378$ echo4 "Checking to see if you have long double..." 3379$ GOSUB link_ok 3380$ IF link_status .NE. good_link 3381$ THEN 3382$ longdblsize="0" 3383$ d_longdbl="undef" 3384$ echo "You do not have long double." 3385$ ELSE 3386$ echo "You have long double." 3387$ echo4 "Checking to see how big your long doubles are..." 3388$ GOSUB just_mcr_it 3389$ longdblsize = tmp 3390$ d_longdbl = "define" 3391$ echo "Your long doubles are ''longdblsize' bytes long." 3392$ ENDIF 3393$! 3394$ IF d_longdbl .OR. d_longdbl .EQS. "define" 3395$ THEN 3396$ d_PRIEUldbl = "define" 3397$ d_PRIFUldbl = "define" 3398$ d_PRIGUldbl = "define" 3399$ d_PRIeldbl = "define" 3400$ d_PRIfldbl = "define" 3401$ d_PRIgldbl = "define" 3402$ sPRIEUldbl = """LE""" 3403$ sPRIFUldbl = """LF""" 3404$ sPRIGUldbl = """LG""" 3405$ sPRIeldbl = """Le""" 3406$ sPRIfldbl = """Lf""" 3407$ sPRIgldbl = """Lg""" 3408$ ELSE 3409$ d_PRIEUldbl = "undef" 3410$ d_PRIFUldbl = "undef" 3411$ d_PRIGUldbl = "undef" 3412$ d_PRIeldbl = "undef" 3413$ d_PRIfldbl = "undef" 3414$ d_PRIgldbl = "undef" 3415$ sPRIEUldbl = "" 3416$ sPRIFUldbl = "" 3417$ sPRIGUldbl = "" 3418$ sPRIeldbl = "" 3419$ sPRIfldbl = "" 3420$ sPRIgldbl = "" 3421$ ENDIF 3422$ d_SCNfldbl = d_PRIfldbl 3423$ sSCNfldbl = sPRIfldbl ! expect consistency 3424$! 3425$!: check for long long 3426$ OS 3427$ WS "#if defined(__DECC) || defined(__DECCXX)" 3428$ WS "#include <stdlib.h>" 3429$ WS "#endif" 3430$ WS "#include <stdio.h>" 3431$ WS "int main()" 3432$ WS "{" 3433$ WS "printf(""%d\n"", sizeof(long long));" 3434$ WS "exit(0);" 3435$ WS "}" 3436$ CS 3437$ echo4 "Checking to see if you have long long..." 3438$ GOSUB link_ok 3439$ IF link_status .NE. good_link 3440$ THEN 3441$ longlongsize="0" 3442$ d_longlong="undef" 3443$ echo "You do not have long long." 3444$ ELSE 3445$ echo "You have long long." 3446$ echo4 "Checking to see how big your long longs are..." 3447$ GOSUB just_mcr_it 3448$ longlongsize = tmp 3449$ d_longlong = "define" 3450$ echo "Your long longs are ''longlongsize' bytes long." 3451$ ENDIF 3452$! 3453$! Check the prototype for getgid 3454$! 3455$ echo "Looking for the type for group ids returned by getgid()." 3456$ OS 3457$ WS "#if defined(__DECC) || defined(__DECCXX)" 3458$ WS "#include <stdlib.h>" 3459$ WS "#endif" 3460$ WS "#include <stdio.h>" 3461$ WS "#include <types.h>" 3462$ WS "int main()" 3463$ WS "{" 3464$ WS "gid_t foo;" 3465$ WS "exit(0);" 3466$ WS "}" 3467$ CS 3468$ GOSUB compile_ok 3469$ IF compile_status .NE. good_compile 3470$ THEN 3471$! Okay, gid_t failed. Must be unsigned int 3472$ gidtype = "unsigned int" 3473$ echo4 "assuming ""''gidtype'""." 3474$ ELSE 3475$ gidtype = "gid_t" 3476$ echo4 "gid_t found." 3477$ ENDIF 3478$! 3479$! Check to see if we've got dev_t 3480$! 3481$ echo "Looking for the type for dev." 3482$ OS 3483$ WS "#if defined(__DECC) || defined(__DECCXX)" 3484$ WS "#include <stdlib.h>" 3485$ WS "#endif" 3486$ WS "#include <stdio.h>" 3487$ WS "#include <types.h>" 3488$ WS "int main()" 3489$ WS "{" 3490$ WS "dev_t foo;" 3491$ WS "exit(0);" 3492$ WS "}" 3493$ CS 3494$ GOSUB compile_ok 3495$ IF compile_status .NE. good_compile 3496$ THEN 3497$! Okay, dev_t failed. Must be unsigned int 3498$ devtype = "unsigned int" 3499$ echo4 "assuming ""''devtype'""." 3500$ ELSE 3501$ devtype = "dev_t" 3502$ echo4 "dev_t found." 3503$ ENDIF 3504$! 3505$! Check to see if we've got unistd.h (which we ought to, but you never know) 3506$! 3507$ i_netdb = "undef" 3508$ tmp = "unistd.h" 3509$ GOSUB inhdr 3510$ i_unistd = tmp 3511$! 3512$! do we have getppid()? 3513$! 3514$ IF i_unistd .EQS. "define" 3515$ THEN 3516$ OS 3517$ WS "#include <stdio.h>" 3518$ WS "#include <unistd.h>" 3519$ WS "int main() {" 3520$ WS "printf(""%d\n"",getppid());" 3521$ WS "return(0);" 3522$ WS "}" 3523$ CS 3524$ tmp = "getppid" 3525$ GOSUB inlibc 3526$ d_getppid = tmp 3527$ ELSE 3528$ d_getppid = "undef" 3529$ ENDIF 3530$! 3531$!: see if this is a libutil.h system 3532$! 3533$ tmp = "libutil.h" 3534$ GOSUB inhdr 3535$ i_libutil = tmp 3536$! 3537$! Check to see if we've got shadow.h (probably not, but...) 3538$! 3539$ tmp = "shadow.h" 3540$ GOSUB inhdr 3541$ i_shadow = tmp 3542$! 3543$! Check to see if we've got socks.h (probably not, but...) 3544$! 3545$ tmp = "socks.h" 3546$ GOSUB inhdr 3547$ i_socks = tmp 3548$! 3549$! Check the prototype for select 3550$! 3551$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 3552$ THEN 3553$ OS 3554$ WS "#if defined(__DECC) || defined(__DECCXX)" 3555$ WS "#include <stdlib.h>" 3556$ WS "#endif" 3557$ WS "#include <stdio.h>" 3558$ WS "#include <types.h>" 3559$ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>" 3560$ IF Has_Socketshr 3561$ THEN 3562$ WS "#include <socketshr.h>" 3563$ ELSE 3564$ WS "#include <time.h>" 3565$ WS "#include <socket.h>" 3566$ ENDIF 3567$ WS "int main()" 3568$ WS "{" 3569$ WS "fd_set *foo;" 3570$ WS "int bar;" 3571$ WS "foo = NULL;" 3572$ WS "bar = select(2, foo, foo, foo, NULL);" 3573$ WS "exit(0);" 3574$ WS "}" 3575$ CS 3576$ GOSUB compile_ok 3577$ IF compile_status .NE. good_compile 3578$ THEN 3579$! Okay, select failed. Must be an int * 3580$ selecttype = "int *" 3581$ echo4 "select() NOT found." 3582$ ELSE 3583$ selecttype="fd_set *" 3584$ echo4 "select() found." 3585$ ENDIF 3586$ ELSE 3587$ ! No sockets, so stick in an int * : no select, so pick a harmless default 3588$ selecttype = "int *" 3589$ ENDIF 3590$! 3591$! Check to see if fd_set exists 3592$! 3593$ echo "Checking to see how well your C compiler handles fd_set and friends ..." 3594$ OS 3595$ WS "#if defined(__DECC) || defined(__DECCXX)" 3596$ WS "#include <stdlib.h>" 3597$ WS "#endif" 3598$ WS "#include <stdio.h>" 3599$ WS "#include <types.h>" 3600$ IF Has_Socketshr 3601$ THEN 3602$ WS "#include <socketshr.h>" 3603$ ENDIF 3604$ IF Has_Dec_C_Sockets 3605$ THEN 3606$ WS "#include <time.h>" 3607$ WS "#include <socket.h>" 3608$ ENDIF 3609$ WS "int main()" 3610$ WS "{" 3611$ WS "fd_set *foo;" 3612$ WS "int bar;" 3613$ WS "exit(0);" 3614$ WS "}" 3615$ CS 3616$ GOSUB compile_ok 3617$ IF compile_status .ne. good_compile 3618$ THEN 3619$! Okay, fd_set failed. Must not exist 3620$ d_fd_set = "undef" 3621$ echo4 "Hmm, your compiler has some difficulty with fd_set." 3622$ ELSE 3623$ d_fd_set="define" 3624$ echo4 "Well, your system knows about the normal fd_set typedef..." 3625$ ENDIF 3626$! 3627$! Check for inttypes.h 3628$! 3629$ tmp = "inttypes.h" 3630$ GOSUB inhdr 3631$ i_inttypes = tmp 3632$! 3633$! Check to see if off64_t exists 3634$! 3635$ echo4 "Checking to see if you have off64_t..." 3636$ OS 3637$ WS "#if defined(__DECC) || defined(__DECCXX)" 3638$ WS "#include <stdlib.h>" 3639$ WS "#endif" 3640$ WS "#include <stdio.h>" 3641$ WS "#include <types.h>" 3642$ WS "#''i_inttypes' IIH" 3643$ WS "#ifdef IIH" 3644$ WS "#include <inttypes.h>" 3645$ WS "#endif" 3646$ WS "int main()" 3647$ WS "{" 3648$ WS "off64_t bar;" 3649$ WS "exit(0);" 3650$ WS "}" 3651$ CS 3652$ GOSUB compile_ok 3653$ IF compile_status .EQ. good_compile 3654$ THEN 3655$ d_off64_t="define" 3656$ echo "You have off64_t." 3657$ ELSE 3658$ d_off64_t = "undef" 3659$ echo "You do not have off64_t." 3660$ ENDIF 3661$! 3662$! Check to see if fpos64_t exists 3663$! 3664$ echo4 "Checking to see if you have fpos64_t..." 3665$ OS 3666$ WS "#if defined(__DECC) || defined(__DECCXX)" 3667$ WS "#include <stdlib.h>" 3668$ WS "#endif" 3669$ WS "#include <stdio.h>" 3670$ WS "#include <types.h>" 3671$ WS "#''i_inttypes' IIH" 3672$ WS "#ifdef IIH" 3673$ WS "#include <inttypes.h>" 3674$ WS "#endif" 3675$ WS "int main()" 3676$ WS "{" 3677$ WS "fpos64_t bar;" 3678$ WS "exit(0);" 3679$ WS "}" 3680$ CS 3681$ GOSUB compile_ok 3682$ IF compile_status .EQ. good_compile 3683$ THEN 3684$ d_fpos64_t="define" 3685$ echo "You have fpos64_t." 3686$ ELSE 3687$ d_fpos64_t = "undef" 3688$ echo "You do not have fpos64_t." 3689$ ENDIF 3690$! 3691$! Check to see if int64_t exists 3692$! 3693$ echo4 "Checking to see if you have int64_t..." 3694$ OS 3695$ WS "#if defined(__DECC) || defined(__DECCXX)" 3696$ WS "#include <stdlib.h>" 3697$ WS "#endif" 3698$ WS "#include <stdio.h>" 3699$ WS "#include <types.h>" 3700$ WS "#''i_inttypes' IIH" 3701$ WS "#ifdef IIH" 3702$ WS "#include <inttypes.h>" 3703$ WS "#endif" 3704$ WS "int main()" 3705$ WS "{" 3706$ WS "int64_t bar;" 3707$ WS "exit(0);" 3708$ WS "}" 3709$ CS 3710$ GOSUB compile_ok 3711$ IF compile_status .EQ. good_compile 3712$ THEN 3713$ d_int64_t="define" 3714$ echo "You have int64_t." 3715$ ELSE 3716$ d_int64_t = "undef" 3717$ echo "You do not have int64_t." 3718$ ENDIF 3719$! 3720$! Check to see if fseeko exists 3721$! 3722$ OS 3723$ WS "#include <stdio.h>" 3724$ WS "int main()" 3725$ WS "{" 3726$ WS "FILE *f=NULL;" 3727$ WS "fseeko(f,(off_t)0,SEEK_SET);" 3728$ WS "return(0);" 3729$ WS "}" 3730$ CS 3731$ tmp = "fseeko" 3732$ GOSUB inlibc 3733$ d_fseeko = tmp 3734$! 3735$! Check to see if ftello exists 3736$! 3737$ OS 3738$ WS "#include <stdio.h>" 3739$ WS "int main()" 3740$ WS "{" 3741$ WS "FILE *f=NULL; off_t o=0;" 3742$ WS "o=ftello(f);" 3743$ WS "return(0);" 3744$ WS "}" 3745$ CS 3746$ tmp = "ftello" 3747$ GOSUB inlibc 3748$ d_ftello = tmp 3749$! 3750$!: see if this is a netdb.h system 3751$ IF Has_Dec_C_Sockets 3752$ THEN 3753$ tmp = "netdb.h" 3754$ GOSUB inhdr 3755$ i_netdb = tmp 3756$ ENDIF 3757$! 3758$! Check for h_errno 3759$! 3760$ echo4 "Checking to see if you have h_errno..." 3761$ OS 3762$ WS "#if defined(__DECC) || defined(__DECCXX)" 3763$ WS "#include <stdlib.h>" 3764$ WS "#endif" 3765$ WS "#include <stdio.h>" 3766$ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>" 3767$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 3768$ WS "int main()" 3769$ WS "{" 3770$ WS "h_errno = 3;" 3771$ WS "exit(0);" 3772$ WS "}" 3773$ CS 3774$ GOSUB link_ok 3775$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link 3776$ THEN 3777$ d_herrno="define" 3778$ echo "You have h_errno." 3779$ ELSE 3780$ d_herrno="undef" 3781$ echo "You do not have h_errno." 3782$ ENDIF 3783$! 3784$! Check to see if gethostname exists 3785$! 3786$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 3787$ THEN 3788$ OS 3789$ WS "#if defined(__DECC) || defined(__DECCXX)" 3790$ WS "#include <stdlib.h>" 3791$ WS "#endif" 3792$ WS "#include <stdio.h>" 3793$ WS "#include <types.h>" 3794$ IF Has_Socketshr 3795$ THEN 3796$ WS "#include <socketshr.h>" 3797$ ELSE 3798$ WS "#include <time.h>" 3799$ WS "#include <socket.h>" 3800$ ENDIF 3801$ WS "int main()" 3802$ WS "{" 3803$ WS "char name[100];" 3804$ WS "int bar, baz;" 3805$ WS "bar = 100;" 3806$ WS "baz = gethostname(name, bar);" 3807$ WS "exit(0);" 3808$ WS "}" 3809$ CS 3810$ GOSUB link_ok 3811$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link 3812$ THEN 3813$ d_gethname="define" 3814$ echo4 "gethostname() found." 3815$ ELSE 3816$ d_gethname="undef" 3817$ ENDIF 3818$ ELSE 3819$ ! No sockets, so no gethname 3820$ d_gethname = "undef" 3821$ ENDIF 3822$! 3823$! Check for sys/file.h 3824$! 3825$ tmp = "sys/file.h" 3826$ GOSUB inhdr 3827$ i_sysfile = tmp 3828$! 3829$! 3830$! Check for sys/ioctl.h 3831$! 3832$ tmp = "sys/ioctl.h" 3833$ GOSUB inhdr 3834$ i_sysioctl = tmp 3835$! 3836$! Check for sys/utsname.h 3837$! 3838$ tmp = "sys/utsname.h" 3839$ GOSUB inhdr 3840$ i_sysutsname = tmp 3841$! 3842$! Check for syslog.h 3843$! 3844$ tmp = "syslog.h" 3845$ GOSUB inhdr 3846$ i_syslog = tmp 3847$! 3848$! Check for poll.h 3849$! 3850$ tmp = "poll.h" 3851$ GOSUB inhdr 3852$ i_poll = tmp 3853$! 3854$! Check for sys/uio.h 3855$! 3856$ tmp = "sys/uio.h" 3857$ GOSUB inhdr 3858$ i_sysuio = tmp 3859$! 3860$! Check for sys/mode.h 3861$! 3862$ tmp = "sys/mode.h" 3863$ GOSUB inhdr 3864$ i_sysmode = tmp 3865$! 3866$! Check for sys/access.h 3867$! 3868$ tmp = "sys/access.h" 3869$ GOSUB inhdr 3870$ i_sysaccess = tmp 3871$! 3872$! Check for sys/security.h 3873$! 3874$ tmp = "sys/security.h" 3875$ GOSUB inhdr 3876$ i_syssecrt = tmp 3877$! 3878$! Check for fcntl.h 3879$! 3880$ tmp = "fcntl.h" 3881$ GOSUB inhdr 3882$ i_fcntl = tmp 3883$! 3884$! Check for fcntl 3885$! 3886$ OS 3887$ WS "#if defined(__DECC) || defined(__DECCXX)" 3888$ WS "#include <stdlib.h>" 3889$ WS "#endif" 3890$ WS "#include <stdio.h>" 3891$ WS "#include <fcntl.h>" 3892$ WS "int main()" 3893$ WS "{" 3894$ WS "fcntl(1,2,3);" 3895$ WS "exit(0);" 3896$ WS "}" 3897$ CS 3898$ tmp = "fcntl" 3899$ GOSUB inlibc 3900$ d_fcntl = tmp 3901$! 3902$! Check for fcntl locking capability 3903$! 3904$ echo4 "Checking if fcntl-based file locking works... " 3905$ tmp = "undef" 3906$ IF d_fcntl .EQS. "define" 3907$ THEN 3908$ OS 3909$ WS "#include <stdio.h>" 3910$ WS "#if defined(__DECC) || defined(__DECCXX)" 3911$ WS "#include <stdlib.h>" 3912$ WS "#endif" 3913$ WS "#include <fcntl.h>" 3914$ WS "#include <unistd.h>" 3915$ WS "int main() {" 3916$ WS "#if defined(F_SETLK) && defined(F_SETLKW)" 3917$ WS " struct flock flock;" 3918$ WS " int retval, fd;" 3919$ WS " fd = open(""try.c"", O_RDONLY);" 3920$ WS " flock.l_type = F_RDLCK;" 3921$ WS " flock.l_whence = SEEK_SET;" 3922$ WS " flock.l_start = flock.l_len = 0;" 3923$ WS " retval = fcntl(fd, F_SETLK, &flock);" 3924$ WS " close(fd);" 3925$ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));" 3926$ WS "#else" 3927$ WS " printf(""undef\n"");" 3928$ WS "#endif" 3929$ WS "}" 3930$ CS 3931$ GOSUB link_ok 3932$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link 3933$ THEN 3934$ GOSUB just_mcr_it 3935$ IF tmp .EQS. "define" 3936$ THEN 3937$ echo4 "Yes, it seems to work." 3938$ ELSE 3939$ echo4 "Nope, it didn't work." 3940$ ENDIF 3941$ ELSE 3942$ echo4 "I'm unable to compile the test program, so I'll assume not." 3943$ tmp = "undef" 3944$ ENDIF 3945$ ELSE 3946$ echo4 "Nope, since you don't even have fcntl()." 3947$ ENDIF 3948$ d_fcntl_can_lock = tmp 3949$! 3950$! Check for memchr 3951$! 3952$ OS 3953$ WS "#if defined(__DECC) || defined(__DECCXX)" 3954$ WS "#include <stdlib.h>" 3955$ WS "#endif" 3956$ WS "#include <string.h>" 3957$ WS "int main()" 3958$ WS "{" 3959$ WS "char * place;" 3960$ WS "place = memchr(""foo"", 47, 3);" 3961$ WS "exit(0);" 3962$ WS "}" 3963$ CS 3964$ tmp = "memchr" 3965$ GOSUB inlibc 3966$ d_memchr = tmp 3967$! 3968$! Check for strtoull 3969$! 3970$ OS 3971$ WS "#if defined(__DECC) || defined(__DECCXX)" 3972$ WS "#include <stdlib.h>" 3973$ WS "#endif" 3974$ WS "#include <string.h>" 3975$ WS "int main()" 3976$ WS "{" 3977$ WS "unsigned __int64 result;" 3978$ WS "result = strtoull(""123123"", NULL, 10);" 3979$ WS "exit(0);" 3980$ WS "}" 3981$ CS 3982$ tmp = "strtoull" 3983$ GOSUB inlibc 3984$ d_strtoull = tmp 3985$! 3986$! Check for strtouq 3987$! 3988$ OS 3989$ WS "#if defined(__DECC) || defined(__DECCXX)" 3990$ WS "#include <stdlib.h>" 3991$ WS "#endif" 3992$ WS "#include <string.h>" 3993$ WS "int main()" 3994$ WS "{" 3995$ WS "unsigned __int64 result;" 3996$ WS "result = strtouq(""123123"", NULL, 10);" 3997$ WS "exit(0);" 3998$ WS "}" 3999$ CS 4000$ tmp = "strtouq" 4001$ GOSUB inlibc 4002$ d_strtouq = tmp 4003$! 4004$! Check for strtoll 4005$! 4006$ OS 4007$ WS "#if defined(__DECC) || defined(__DECCXX)" 4008$ WS "#include <stdlib.h>" 4009$ WS "#endif" 4010$ WS "#include <string.h>" 4011$ WS "int main()" 4012$ WS "{" 4013$ WS "__int64 result;" 4014$ WS "result = strtoll(""123123"", NULL, 10);" 4015$ WS "exit(0);" 4016$ WS "}" 4017$ CS 4018$ tmp = "strtoll" 4019$ GOSUB inlibc 4020$ d_strtoll = tmp 4021$! 4022$! Check for strtoq 4023$! 4024$ OS 4025$ WS "#if defined(__DECC) || defined(__DECCXX)" 4026$ WS "#include <stdlib.h>" 4027$ WS "#endif" 4028$ WS "#include <string.h>" 4029$ WS "int main()" 4030$ WS "{" 4031$ WS "__int64 result;" 4032$ WS "result = strtoq(""123123"", NULL, 10);" 4033$ WS "exit(0);" 4034$ WS "}" 4035$ CS 4036$ tmp = "strtoq" 4037$ GOSUB inlibc 4038$ d_strtoq = tmp 4039$! 4040$! Check for strtold 4041$! 4042$ OS 4043$ WS "#if defined(__DECC) || defined(__DECCXX)" 4044$ WS "#include <stdlib.h>" 4045$ WS "#endif" 4046$ WS "#include <string.h>" 4047$ WS "int main()" 4048$ WS "{" 4049$ WS "long double result;" 4050$ WS "result = strtold(""123123"", NULL, 10);" 4051$ WS "exit(0);" 4052$ WS "}" 4053$ CS 4054$ tmp = "strtold" 4055$ GOSUB inlibc 4056$ d_strtold = tmp 4057$! 4058$! Check for atoll 4059$! 4060$ OS 4061$ WS "#if defined(__DECC) || defined(__DECCXX)" 4062$ WS "#include <stdlib.h>" 4063$ WS "#endif" 4064$ WS "#include <string.h>" 4065$ WS "int main()" 4066$ WS "{" 4067$ WS " __int64 result;" 4068$ WS "result = atoll(""123123"");" 4069$ WS "exit(0);" 4070$ WS "}" 4071$ CS 4072$ tmp = "atoll" 4073$ GOSUB inlibc 4074$ d_atoll = tmp 4075$! 4076$! Check for atolf 4077$! 4078$ OS 4079$ WS "#if defined(__DECC) || defined(__DECCXX)" 4080$ WS "#include <stdlib.h>" 4081$ WS "#endif" 4082$ WS "#include <string.h>" 4083$ WS "int main()" 4084$ WS "{" 4085$ WS "long double" 4086$ WS "result = atolf(""123123"");" 4087$ WS "exit(0);" 4088$ WS "}" 4089$ CS 4090$ tmp = "atolf" 4091$ GOSUB inlibc 4092$ d_atolf = tmp 4093$! 4094$! Check for access 4095$! 4096$ OS 4097$ WS "#if defined(__DECC) || defined(__DECCXX)" 4098$ WS "#include <stdlib.h>" 4099$ WS "#endif" 4100$ WS "#include <stdio.h>" 4101$ WS "int main()" 4102$ WS "{" 4103$ WS "access(""foo"", F_OK);" 4104$ WS "exit(0);" 4105$ WS "}" 4106$ CS 4107$ tmp = "acess" 4108$ GOSUB inlibc 4109$ d_access = tmp 4110$! 4111$! Check for bzero 4112$! 4113$ OS 4114$ WS "#if defined(__DECC) || defined(__DECCXX)" 4115$ WS "#include <stdlib.h>" 4116$ WS "#endif" 4117$ WS "#include <stdio.h>" 4118$ WS "#include <strings.h>" 4119$ WS "int main()" 4120$ WS "{" 4121$ WS "char foo[10];" 4122$ WS "bzero(foo, 10);" 4123$ WS "exit(0);" 4124$ WS "}" 4125$ CS 4126$ tmp = "bzero" 4127$ GOSUB inlibc 4128$ d_bzero = tmp 4129$! 4130$! Check for bcopy 4131$! 4132$ OS 4133$ WS "#if defined(__DECC) || defined(__DECCXX)" 4134$ WS "#include <stdlib.h>" 4135$ WS "#endif" 4136$ WS "#include <stdio.h>" 4137$ WS "#include <strings.h>" 4138$ WS "int main()" 4139$ WS "{" 4140$ WS "char foo[10], bar[10];" 4141$ WS "bcopy(""foo"", bar, 3);" 4142$ WS "exit(0);" 4143$ WS "}" 4144$ CS 4145$ tmp = "bcopy" 4146$ GOSUB inlibc 4147$ d_bcopy = tmp 4148$! 4149$! Check for mkstemp 4150$! 4151$ OS 4152$ WS "#if defined(__DECC) || defined(__DECCXX)" 4153$ WS "#include <stdlib.h>" 4154$ WS "#endif" 4155$ WS "#include <stdio.h>" 4156$ WS "int main()" 4157$ WS "{" 4158$ WS "mkstemp(""foo"");" 4159$ WS "exit(0);" 4160$ WS "}" 4161$ CS 4162$ tmp = "mkstemp" 4163$ GOSUB inlibc 4164$ d_mkstemp = tmp 4165$! 4166$! Check for mkstemps 4167$! 4168$ OS 4169$ WS "#if defined(__DECC) || defined(__DECCXX)" 4170$ WS "#include <stdlib.h>" 4171$ WS "#endif" 4172$ WS "#include <stdio.h>" 4173$ WS "int main()" 4174$ WS "{" 4175$ WS "mkstemps(""foo"", 1);" 4176$ WS "exit(0);" 4177$ WS "}" 4178$ CS 4179$ tmp = "mkstemps" 4180$ GOSUB inlibc 4181$ d_mkstemps = tmp 4182$! 4183$! Check for mkdtemp 4184$! 4185$ OS 4186$ WS "#if defined(__DECC) || defined(__DECCXX)" 4187$ WS "#include <stdlib.h>" 4188$ WS "#endif" 4189$ WS "#include <stdio.h>" 4190$ WS "int main()" 4191$ WS "{" 4192$ WS "mkdtemp(""foo"");" 4193$ WS "exit(0);" 4194$ WS "}" 4195$ CS 4196$ tmp = "mkdtemp" 4197$ GOSUB inlibc 4198$ d_mkdtemp = tmp 4199$! 4200$! Check for poll 4201$! 4202$ if i_poll .eqs. "define" 4203$ then 4204$ OS 4205$ WS "#if defined(__DECC) || defined(__DECCXX)" 4206$ WS "#include <stdlib.h>" 4207$ WS "#endif" 4208$ WS "#include <poll.h>" 4209$ WS "int main()" 4210$ WS "{" 4211$ WS "struct pollfd pfd;" 4212$ WS "int count=poll(&pfd,1,0);" 4213$ WS "exit(0);" 4214$ WS "}" 4215$ CS 4216$ tmp = "poll" 4217$ GOSUB inlibc 4218$ d_poll = tmp 4219$ else 4220$ d_poll = "undef" 4221$ endif 4222$! 4223$! Check for setvbuf 4224$! 4225$ OS 4226$ WS "#if defined(__DECC) || defined(__DECCXX)" 4227$ WS "#include <stdlib.h>" 4228$ WS "#endif" 4229$ WS "#include <stdio.h>" 4230$ WS "int main()" 4231$ WS "{" 4232$ WS "FILE *foo;" 4233$ WS "char Buffer[99];" 4234$ WS "foo = fopen(""foo"", ""r"");" 4235$ WS "setvbuf(foo, Buffer, 0, 0);" 4236$ WS "exit(0);" 4237$ WS "}" 4238$ CS 4239$ tmp = "setvbuf" 4240$ GOSUB inlibc 4241$ d_setvbuf = tmp 4242$! 4243$! see if sfio.h is available 4244$! see if sfio library is available 4245$! Ok, but do we want to use it. 4246$! IF F$TYPE(usesfio) .EQS. "" THEN usesfio = "undef" 4247$! IF val .EQS. "define" 4248$! THEN 4249$! IF usesfio .EQS. "define" 4250$! THEN dflt = "y" 4251$! ELSE dflt = "n" 4252$! ENDIF 4253$! echo "''package' can use the sfio library, but it is experimental." 4254$! IF useperlio .EQS. "undef" 4255$! THEN 4256$! echo "For sfio also the PerlIO abstraction layer is needed." 4257$! echo "Earlier you said you would not want that." 4258$! ENDIF 4259$! rp="You seem to have sfio available, do you want to try using it? [''dflt'] " 4260$! GOSUB myread 4261$! IF ans .EQS. "" THEN ans = dflt 4262$! IF ans 4263$! THEN 4264$! echo "Ok, turning on both sfio and PerlIO, then." 4265$! useperlio="define" 4266$! val="define" 4267$! ELSE 4268$! echo "Ok, avoiding sfio this time. I'll use stdio instead." 4269$! val="undef" 4270$! ENDIF 4271$! ELSE 4272$! IF usesfio .EQS. "define" 4273$! THEN 4274$! echo4 "Sorry, cannot find sfio on this machine." 4275$! echo4 "Ignoring your setting of usesfio=''usesfio'." 4276$! val="undef" 4277$! ENDIF 4278$! ENDIF 4279$! 4280$! Check for setenv 4281$! 4282$ OS 4283$ WS "#if defined(__DECC) || defined(__DECCXX)" 4284$ WS "#include <stdlib.h>" 4285$ WS "#endif" 4286$ WS "#include <stdio.h>" 4287$ WS "int main()" 4288$ WS "{" 4289$ WS "setenv(""FOO"", ""BAR"", 0);" 4290$ WS "exit(0);" 4291$ WS "}" 4292$ CS 4293$ tmp = "setenv" 4294$ GOSUB inlibc 4295$ d_setenv = tmp 4296$! 4297$! Check for setproctitle 4298$! 4299$ OS 4300$ WS "#if defined(__DECC) || defined(__DECCXX)" 4301$ WS "#include <stdlib.h>" 4302$ WS "#endif" 4303$ WS "#include <stdio.h>" 4304$ WS "int main()" 4305$ WS "{" 4306$ WS "setproctitle(""%s"", ""FOO"");" 4307$ WS "exit(0);" 4308$ WS "}" 4309$ CS 4310$ tmp = "setproctitle" 4311$ GOSUB inlibc 4312$ d_setproctitle = tmp 4313$! 4314$! Check for <netinet/in.h> 4315$! 4316$ IF Has_Dec_C_Sockets .or. Has_Socketshr 4317$ THEN 4318$ tmp = "netinet/in.h" 4319$ GOSUB inhdr 4320$ i_niin = tmp 4321$ ELSE 4322$ i_niin="undef" 4323$ ENDIF 4324$! 4325$! Check for <netinet/tcp.h> 4326$! 4327$ IF Has_Dec_C_Sockets .or. Has_Socketshr 4328$ THEN 4329$ tmp = "netinet/tcp.h" 4330$ GOSUB inhdr 4331$ i_netinettcp = tmp 4332$ ELSE 4333$ i_netinettcp="undef" 4334$ ENDIF 4335$! 4336$! Check for endhostent 4337$! 4338$ IF Has_Dec_C_Sockets .or. Has_Socketshr 4339$ THEN 4340$ OS 4341$ WS "#if defined(__DECC) || defined(__DECCXX)" 4342$ WS "#include <stdlib.h>" 4343$ WS "#endif" 4344$ WS "#include <stdio.h>" 4345$ IF Has_Socketshr 4346$ THEN WS "#include <socketshr.h>" 4347$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4348$ ENDIF 4349$ WS "int main()" 4350$ WS "{" 4351$ WS "endhostent();" 4352$ WS "exit(0);" 4353$ WS "}" 4354$ CS 4355$ tmp = "endhostent" 4356$ GOSUB inlibc 4357$ d_endhent = tmp 4358$ ELSE 4359$ d_endhent="undef" 4360$ ENDIF 4361$! 4362$! Check for endnetent 4363$! 4364$ IF Has_Dec_C_Sockets .or. Has_Socketshr 4365$ THEN 4366$ OS 4367$ WS "#if defined(__DECC) || defined(__DECCXX)" 4368$ WS "#include <stdlib.h>" 4369$ WS "#endif" 4370$ WS "#include <stdio.h>" 4371$ IF Has_Socketshr 4372$ THEN WS "#include <socketshr.h>" 4373$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4374$ ENDIF 4375$ WS "int main()" 4376$ WS "{" 4377$ WS "endnetent();" 4378$ WS "exit(0);" 4379$ WS "}" 4380$ CS 4381$ tmp = "endnetent" 4382$ GOSUB inlibc 4383$ d_endnent = tmp 4384$ ELSE 4385$ d_endnent="undef" 4386$ ENDIF 4387$! 4388$! Check for endprotoent 4389$! 4390$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4391$ THEN 4392$ OS 4393$ WS "#if defined(__DECC) || defined(__DECCXX)" 4394$ WS "#include <stdlib.h>" 4395$ WS "#endif" 4396$ WS "#include <stdio.h>" 4397$ IF Has_Socketshr 4398$ THEN WS "#include <socketshr.h>" 4399$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4400$ ENDIF 4401$ WS "int main()" 4402$ WS "{" 4403$ WS "endprotoent();" 4404$ WS "exit(0);" 4405$ WS "}" 4406$ CS 4407$ tmp = "endprotoent" 4408$ GOSUB inlibc 4409$ d_endpent = tmp 4410$ ELSE 4411$ d_endpent="undef" 4412$ ENDIF 4413$! 4414$! Check for endservent 4415$! 4416$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4417$ THEN 4418$ OS 4419$ WS "#if defined(__DECC) || defined(__DECCXX)" 4420$ WS "#include <stdlib.h>" 4421$ WS "#endif" 4422$ WS "#include <stdio.h>" 4423$ IF Has_Socketshr 4424$ THEN WS "#include <socketshr.h>" 4425$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4426$ ENDIF 4427$ WS "int main()" 4428$ WS "{" 4429$ WS "endservent();" 4430$ WS "exit(0);" 4431$ WS "}" 4432$ CS 4433$ tmp = "endservent" 4434$ GOSUB inlibc 4435$ d_endsent = tmp 4436$ ELSE 4437$ d_endsent="undef" 4438$ ENDIF 4439$! 4440$! Check for sethostent 4441$! 4442$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4443$ THEN 4444$ OS 4445$ WS "#if defined(__DECC) || defined(__DECCXX)" 4446$ WS "#include <stdlib.h>" 4447$ WS "#endif" 4448$ WS "#include <stdio.h>" 4449$ IF Has_Socketshr 4450$ THEN WS "#include <socketshr.h>" 4451$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4452$ ENDIF 4453$ WS "int main()" 4454$ WS "{" 4455$ WS "sethostent(1);" 4456$ WS "exit(0);" 4457$ WS "}" 4458$ CS 4459$ tmp = "sethostent" 4460$ GOSUB inlibc 4461$ d_sethent = tmp 4462$ ELSE 4463$ d_sethent="undef" 4464$ ENDIF 4465$! 4466$! Check for setnetent 4467$! 4468$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4469$ THEN 4470$ OS 4471$ WS "#if defined(__DECC) || defined(__DECCXX)" 4472$ WS "#include <stdlib.h>" 4473$ WS "#endif" 4474$ WS "#include <stdio.h>" 4475$ IF Has_Socketshr 4476$ THEN WS "#include <socketshr.h>" 4477$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4478$ ENDIF 4479$ WS "int main()" 4480$ WS "{" 4481$ WS "setnetent(1);" 4482$ WS "exit(0);" 4483$ WS "}" 4484$ CS 4485$ tmp = "setnetent" 4486$ GOSUB inlibc 4487$ d_setnent = tmp 4488$ ELSE 4489$ d_setnent="undef" 4490$ ENDIF 4491$! 4492$! Check for setprotoent 4493$! 4494$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4495$ THEN 4496$ OS 4497$ WS "#if defined(__DECC) || defined(__DECCXX)" 4498$ WS "#include <stdlib.h>" 4499$ WS "#endif" 4500$ WS "#include <stdio.h>" 4501$ IF Has_Socketshr 4502$ THEN WS "#include <socketshr.h>" 4503$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4504$ ENDIF 4505$ WS "int main()" 4506$ WS "{" 4507$ WS "setprotoent(1);" 4508$ WS "exit(0);" 4509$ WS "}" 4510$ CS 4511$ tmp = "setprotoent" 4512$ GOSUB inlibc 4513$ d_setpent = tmp 4514$ ELSE 4515$ d_setpent="undef" 4516$ ENDIF 4517$! 4518$! Check for setservent 4519$! 4520$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4521$ THEN 4522$ OS 4523$ WS "#if defined(__DECC) || defined(__DECCXX)" 4524$ WS "#include <stdlib.h>" 4525$ WS "#endif" 4526$ WS "#include <stdio.h>" 4527$ IF Has_Socketshr 4528$ THEN WS "#include <socketshr.h>" 4529$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4530$ ENDIF 4531$ WS "int main()" 4532$ WS "{" 4533$ WS "setservent(1);" 4534$ WS "exit(0);" 4535$ WS "}" 4536$ CS 4537$ tmp = "setservent" 4538$ GOSUB inlibc 4539$ d_setsent = tmp 4540$ ELSE 4541$ d_setsent="undef" 4542$ ENDIF 4543$! 4544$! Check for gethostent 4545$! 4546$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4547$ THEN 4548$ OS 4549$ WS "#if defined(__DECC) || defined(__DECCXX)" 4550$ WS "#include <stdlib.h>" 4551$ WS "#endif" 4552$ WS "#include <stdio.h>" 4553$ IF Has_Socketshr 4554$ THEN WS "#include <socketshr.h>" 4555$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4556$ ENDIF 4557$ WS "int main()" 4558$ WS "{" 4559$ WS "gethostent();" 4560$ WS "exit(0);" 4561$ WS "}" 4562$ CS 4563$ tmp = "gethostent" 4564$ GOSUB inlibc 4565$ d_gethent = tmp 4566$ ELSE 4567$ d_gethent="undef" 4568$ ENDIF 4569$! 4570$! Check for getnetent 4571$! 4572$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4573$ THEN 4574$ OS 4575$ WS "#if defined(__DECC) || defined(__DECCXX)" 4576$ WS "#include <stdlib.h>" 4577$ WS "#endif" 4578$ WS "#include <stdio.h>" 4579$ IF Has_Socketshr 4580$ THEN WS "#include <socketshr.h>" 4581$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4582$ ENDIF 4583$ WS "int main()" 4584$ WS "{" 4585$ WS "getnetent();" 4586$ WS "exit(0);" 4587$ WS "}" 4588$ CS 4589$ tmp = "getnetent" 4590$ GOSUB inlibc 4591$ d_getnent = tmp 4592$ ELSE 4593$ d_getnent="undef" 4594$ ENDIF 4595$! 4596$! Check for getprotoent 4597$! 4598$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4599$ THEN 4600$ OS 4601$ WS "#if defined(__DECC) || defined(__DECCXX)" 4602$ WS "#include <stdlib.h>" 4603$ WS "#endif" 4604$ WS "#include <stdio.h>" 4605$ IF Has_Socketshr 4606$ THEN WS "#include <socketshr.h>" 4607$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4608$ ENDIF 4609$ WS "int main()" 4610$ WS "{" 4611$ WS "getprotoent();" 4612$ WS "exit(0);" 4613$ WS "}" 4614$ CS 4615$ tmp = "getprotoent" 4616$ GOSUB inlibc 4617$ d_getpent = tmp 4618$ ELSE 4619$ d_getpent="undef" 4620$ ENDIF 4621$! 4622$! Check for getservent 4623$! 4624$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4625$ THEN 4626$ OS 4627$ WS "#if defined(__DECC) || defined(__DECCXX)" 4628$ WS "#include <stdlib.h>" 4629$ WS "#endif" 4630$ WS "#include <stdio.h>" 4631$ IF Has_Socketshr 4632$ THEN WS "#include <socketshr.h>" 4633$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4634$ ENDIF 4635$ WS "int main()" 4636$ WS "{" 4637$ WS "getservent();" 4638$ WS "exit(0);" 4639$ WS "}" 4640$ CS 4641$ tmp = "getservent" 4642$ GOSUB inlibc 4643$ d_getsent = tmp 4644$ ELSE 4645$ d_getsent="undef" 4646$ ENDIF 4647$! 4648$! Check for nanosleep 4649$! 4650$ OS 4651$ WS "#if defined(__DECC) || defined(__DECCXX)" 4652$ WS "#include <stdlib.h>" 4653$ WS "#endif" 4654$ WS "#include <time.h>" 4655$ WS "int main()" 4656$ WS "{" 4657$ WS "int asleep = nanosleep(NULL,NULL);" 4658$ WS "exit(0);" 4659$ WS "}" 4660$ CS 4661$ tmp = "nanosleep" 4662$ GOSUB inlibc 4663$ d_nanosleep = tmp 4664$! 4665$! Check for socklen_t 4666$! 4667$ IF Has_Dec_C_Sockets .OR. Has_Socketshr 4668$ THEN 4669$ echo4 "Checking to see if you have socklen_t..." 4670$ OS 4671$ WS "#if defined(__DECC) || defined(__DECCXX)" 4672$ WS "#include <stdlib.h>" 4673$ WS "#endif" 4674$ WS "#include <stdio.h>" 4675$ IF Has_Socketshr 4676$ THEN WS "#include <socketshr.h>" 4677$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>" 4678$ ENDIF 4679$ WS "int main()" 4680$ WS "{" 4681$ WS "socklen_t x = 16;" 4682$ WS "exit(0);" 4683$ WS "}" 4684$ CS 4685$ GOSUB link_ok 4686$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link 4687$ THEN 4688$ d_socklen_t="define" 4689$ echo "You have socklen_t." 4690$ ELSE 4691$ d_socklen_t="undef" 4692$ echo "You do not have socklen_t." 4693$ ENDIF 4694$ ELSE 4695$ d_socklen_t="undef" 4696$ ENDIF 4697$! 4698$! Check for pthread_yield 4699$! 4700$ IF use_threads 4701$ THEN 4702$ OS 4703$ WS "#if defined(__DECC) || defined(__DECCXX)" 4704$ WS "#include <stdlib.h>" 4705$ WS "#endif" 4706$ WS "#include <pthread.h>" 4707$ WS "#include <stdio.h>" 4708$ WS "int main()" 4709$ WS "{" 4710$ WS "pthread_yield();" 4711$ WS "exit(0);" 4712$ WS "}" 4713$ CS 4714$ tmp = "pthread_yield" 4715$ GOSUB inlibc 4716$ d_pthread_yield = tmp 4717$ ELSE 4718$ d_pthread_yield="undef" 4719$ ENDIF 4720$! 4721$! Check for sched_yield 4722$! 4723$ IF use_threads 4724$ THEN 4725$ OS 4726$ WS "#if defined(__DECC) || defined(__DECCXX)" 4727$ WS "#include <stdlib.h>" 4728$ WS "#endif" 4729$ WS "#include <pthread.h>" 4730$ WS "#include <stdio.h>" 4731$ WS "int main()" 4732$ WS "{" 4733$ WS "sched_yield();" 4734$ WS "exit(0);" 4735$ WS "}" 4736$ CS 4737$ tmp = "sched_yield" 4738$ GOSUB inlibc 4739$ d_sched_yield = tmp 4740$ IF d_sched_yield .EQS. "define" 4741$ THEN sched_yield = "sched_yield" 4742$ ELSE sched_yield = " " 4743$ ENDIF 4744$ ELSE 4745$ d_sched_yield="undef" 4746$ sched_yield = " " 4747$ ENDIF 4748$! 4749$! Check for pthread_attr_setscope and PTHREAD_SCOPE_SYSTEM. 4750$! (The actual test is to be written.) 4751$! 4752$ d_pthread_attr_setscope="undef" 4753$! 4754$! Check for generic pointer size 4755$! 4756$ echo4 "Checking to see how big your pointers are..." 4757$ OS 4758$ WS "#if defined(__DECC) || defined(__DECCXX)" 4759$ WS "#include <stdlib.h>" 4760$ WS "#endif" 4761$ WS "#include <stdio.h>" 4762$ WS "int main()" 4763$ WS "{" 4764$ WS "int foo;" 4765$ WS "foo = sizeof(char *);" 4766$ WS "printf(""%d\n"", foo);" 4767$ WS "exit(0);" 4768$ WS "}" 4769$ CS 4770$ tmp = "char *" 4771$ GOSUB type_size_check 4772$ ptrsize = tmp 4773$ echo "Your pointers are ''ptrsize' bytes long." 4774$! 4775$! Check for size_t size 4776$! 4777$ tmp = "size_t" 4778$ zzz = tmp 4779$ echo4 "Checking the size of ''zzz'..." 4780$ GOSUB type_size_check 4781$ sizesize = tmp 4782$ echo "Your ''zzz' size is ''sizesize' bytes." 4783$! 4784$! Check for _LARGEFILE capability. 4785$! 4786$ off_t_size = 4 4787$ OS 4788$ WS "#define _LARGEFILE" 4789$ WS "#include <stdio.h>" 4790$ WS "int main()" 4791$ WS "{" 4792$ WS "printf(""%d\n"", sizeof(off_t));" 4793$ WS "return(0);" 4794$ WS "}" 4795$ CS 4796$ GOSUB link_ok 4797$ IF link_status .EQ. good_link 4798$ THEN 4799$ GOSUB just_mcr_it 4800$ off_t_size = tmp 4801$ ENDIF 4802$ echo "Your off_t size is ''off_t_size' bytes when _LARGEFILE is defined." 4803$ IF off_t_size .ne. 8 .AND. (uselargefiles .OR. uselargefiles .eqs. "define") 4804$ THEN 4805$ echo4 "You configured with -Duselargefiles but your CRTL does not support _LARGEFILE." 4806$ echo4 "I'm disabling large file support." 4807$ uselargefiles = "undef" 4808$ ENDIF 4809$! 4810$! Tests for hard link, symbolic links, and 7.3 + CRTL features 4811$! 4812$ d_lchown = "undef" 4813$ d_link = "undef" 4814$ d_lstat = "undef" 4815$ d_readlink = "undef" 4816$ d_symlink = "undef" 4817$ d_realpath = "undef" 4818$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE")) 4819$! 4820$! Hard link support has been present since 7.3-1 except for the 4821$! easy to use DCL test to see if hardlinks are enabled on the build 4822$! disk. That would require more work to test, and I am only testing 4823$! this on 8.2, so that is why the 8.2 test. 4824$! 4825$ IF (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024) 4826$ THEN 4827$ IF f$getdvi("SYS$DISK","HARDLINKS_SUPPORTED") 4828$ THEN 4829$ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links enabled on build disk." 4830$ echo "I will build with hard link support" 4831$ d_link = "define" 4832$ ELSE 4833$ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links disabled on build disk." 4834$ echo "I will not build with hard link support." 4835$ ENDIF 4836$ ELSE 4837$ echo4 "I can not dected if your CRTL and build disk support hard links." 4838$ echo4 "I am disabling hard link support." 4839$ ENDIF 4840$! 4841$ IF uselargefiles .OR. uselargefiles .eqs. "define" 4842$ THEN 4843$ IF (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024) 4844$ THEN 4845$ echo4 - 4846 "Looking for the realpath() function to indicate symbolic link support..." 4847$ OS 4848$! WS "#include <stdlib.h>" 4849$ WS "void exit(int foo);" 4850$ WS "char *realpath(const char *file_name, char * resolved_name, ...);" 4851$ WS "int main()" 4852$ WS "{" 4853$ WS "char result[255];" 4854$ WS "realpath(""foo"",result);" 4855$ WS "exit(0);" 4856$ WS "}" 4857$ CS 4858$ GOSUB link_ok 4859$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link 4860$ THEN 4861$ echo - 4862 "Found realpath() which indicates symbolic link support is present." 4863$ d_lchown = "define" 4864$ d_lstat = "define" 4865$ d_readlink = "define" 4866$ d_symlink = "define" 4867$! d_realpath = "define" ! Perl will not put it in the config.h file? 4868$! Perl apparently does not use a built in realpath() on other platforms, 4869$! but there is a severe performance penatly on OpenVMS to use the Perl 4870$! script that implements a realpath(). The d_symlink symbol is used 4871$! as a replacement for the d_realpath since they are related and both 4872$! were activated by the CRTL at the same time. 4873$! 4874$ ELSE 4875$ echo4 "Your system does not support symbolic links." 4876$ echo4 "I am disabling symbolic link support." 4877$ ENDIF 4878$ ELSE 4879$ echo4 "Your system does not support symbolic links." 4880$ echo4 "I am disabling symbolic link support." 4881$ ENDIF 4882$ ELSE 4883$ IF (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024) 4884$ THEN 4885$ echo4 "-duselargefiles is required for symbolic link support." 4886$ echo4 "You did not specify that, so I am disabling symbolic link support." 4887$ ENDIF 4888$ ENDIF 4889$! 4890$! 4891$! Check for grp.h -- should be 7.3 and later, but test to be sure 4892$! 4893$ tmp = "grp.h" 4894$ GOSUB inhdr 4895$ i_grp = tmp 4896$! 4897$! VMS V7.3-2 powered options 4898$! We know that it is only available for V7.3-2 and later on 64 bit platforms. 4899$! Only implementing right now on 8.2 because that is what I am testing. 4900$! 4901$ d_getgrgid_r = "undef" 4902$ getgrgid_r_proto = "0" 4903$ d_getgrnam_r = "undef" 4904$ getgrnam_r_proto = "0" 4905$ d_getpgid = "undef" 4906$ d_getpgrp = "undef" 4907$! N.B. We already have home-grown thread-safe versions of 4908$! getpwnam and getpwuid -- no need to use CRTL versions 4909$ d_getpwnam_r = "undef" 4910$ getpwnam_r_proto = "0" 4911$ d_getpwuid_r = "undef" 4912$ getpwuid_r_proto = "0" 4913$ d_setgrent = "undef" 4914$ d_ttyname_r = "undef" 4915$ ttyname_r_proto = "0" 4916$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE")) 4917$ if (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024) 4918$ then 4919$ echo "Found 64 bit OpenVMS 8.2, will build with V7.3-2 routines" 4920$ d_getgrgid_r = "define" 4921$ getgrgid_r_proto = "1" 4922$ d_getgrnam_r = "define" 4923$ getgrnam_r_proto = "1" 4924$ if d_symlink .or. d_symlink .EQS. "define" 4925$ then 4926$! FIXME: Need to find how to activate this. 4927$! d_getpgid = "define" 4928$! d_getpgrp = "define" 4929$ endif 4930$ d_setgrent = "define" 4931$ d_ttyname_r = "define" 4932$ ttyname_r_proto = "1" 4933$ endif 4934$! 4935$! VMS V7.3-2 powered options 4936$! We know that it is only available for V7.3-2 and later on 64 bit platforms. 4937$! Only implementing right now on 8.2 because that is what I am testing 4938$! These functions may require POSIX UIDs/GIDs to be active, so I am 4939$! not activating the features at this time, just preparing this file 4940$! to easily use them in the future. 4941$! 4942$ d_seteuid = "undef" 4943$ d_setpgid = "undef" 4944$ d_setpgrp = "undef" 4945$ d_setregid = "undef" 4946$ d_setreuid = "undef" 4947$ d_setsid = "undef" 4948$! tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE")) 4949$tmp = "" ! Disable this section for now. 4950$ if (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024) 4951$ then 4952$ echo "Found 64 bit OpenVMS 8.2, will build with V7.3-2 UID setting routines" 4953$ d_seteuid = "define" 4954$ d_setpgid = "define" 4955$ d_setpgrp = "define" 4956$ d_setregid = "define" 4957$ d_setreuid = "define" 4958$ d_setsid = "define" 4959$ endif 4960$! 4961$! VMS V8 powered options 4962$! We know that it is only available for 8.2 and later on 64 bit platforms. 4963$! 4964$ d_fstatvfs = "undef" 4965$! d_statvfs = "undef" 4966$ i_sysstatvfs = "undef" 4967$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE")) 4968$ if (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024) 4969$ then 4970$ echo "Found 64 bit OpenVMS 8.2, will build with 8.2 routines" 4971$ d_fstatvfs = "define" 4972$! d_statvfs = "define" 4973$ i_sysstatvfs = "define" 4974$ endif 4975$! 4976$! Check rand48 and its ilk 4977$! 4978$ echo4 "Looking for a random number function..." 4979$ OS 4980$ WS "#if defined(__DECC) || defined(__DECCXX)" 4981$ WS "#include <stdlib.h>" 4982$ WS "#endif" 4983$ WS "#include <stdio.h>" 4984$ WS "int main()" 4985$ WS "{" 4986$ WS "srand48(12L);" 4987$ WS "exit(0);" 4988$ WS "}" 4989$ CS 4990$ GOSUB link_ok 4991$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link 4992$ THEN 4993$ drand01 = "drand48()" 4994$ randbits = "48" 4995$ randfunc = "drand48" 4996$ randseedtype = "long int" 4997$ seedfunc = "srand48" 4998$ echo4 "Good, found drand48()." 4999$ d_drand48proto = "define" 5000$ ELSE 5001$ d_drand48proto = "undef" 5002$ drand01="random()" 5003$ randbits = "31" 5004$ randfunc = "random" 5005$ randseedtype = "unsigned" 5006$ seedfunc = "srandom" 5007$ OS 5008$ WS "#if defined(__DECC) || defined(__DECCXX)" 5009$ WS "#include <stdlib.h>" 5010$ WS "#endif" 5011$ WS "#include <stdio.h>" 5012$ WS "int main()" 5013$ WS "{" 5014$ WS "srandom(12);" 5015$ WS "exit(0);" 5016$ WS "}" 5017$ CS 5018$ GOSUB link_ok 5019$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link 5020$ THEN 5021$ echo4 "OK, found random()." 5022$ ELSE 5023$ drand01="(((float)rand())*MY_INV_RAND_MAX)" 5024$ randfunc = "rand" 5025$ randseedtype = "unsigned" 5026$ seedfunc = "srand" 5027$ echo4 "Yick, looks like I have to use rand()." 5028$ ENDIF 5029$ ENDIF 5030$! Done with compiler checks. Clean up. 5031$ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;* 5032$ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;* 5033$ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;* 5034$ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;* 5035$ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;* 5036$ IF ccname .EQS. "CXX" 5037$ THEN 5038$ CALL Cxx_demangler_cleanup 5039$ ENDIF 5040$! 5041$! Some that are compiler or VMS version sensitive 5042$! 5043$! Gnu C stuff 5044$ IF ccname .EQS. "GCC" 5045$ THEN 5046$ d_attribut="define" 5047$ vms_cc_type="gcc" 5048$ ELSE 5049$ vms_cc_type="cc" 5050$ d_attribut="undef" 5051$ ENDIF 5052$! 5053$! Dec C >= 5.2 and VMS ver >= 7.0 5054$ IF (ccname .EQS. "DEC") .AND. - 5055 (F$INTEGER(Dec_C_Version).GE.50200000) .AND. (vms_ver .GES. "7.0") 5056$ THEN 5057$ d_bcmp="define" 5058$ d_getitimer="define" 5059$ d_gettimeod="define" 5060$ d_mmap="define" 5061$ d_mprotect="define" 5062$ d_munmap="define" 5063$ d_msync="define" 5064$ d_ualarm="define" 5065$ d_uname="define" 5066$! d_unsetenv="define" ! Fix me - Activating requires changing VMS code 5067$ d_unsetenv="undef" ! Change will be needed to allow GNV integration 5068$ d_clearenv="undef" 5069$ d_usleep="define" 5070$ d_setitimer="define" 5071$ d_sigaction="define" 5072$ d_sigprocmask="define" 5073$ d_truncate="define" 5074$ d_wait4="define" 5075$ d_index="define" 5076$ pidtype="pid_t" 5077$ sig_name1="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM " 5078$ sig_name2="TERM ABRT USR1 USR2 SPARE18 SPARE19 CHLD CONT STOP TSTP TTIN TTOU " 5079$ sig_name3="DEBUG SPARE27 SPARE28 SPARE29 SPARE30 SPARE31 SPARE32 " 5080$ sig_name4="WINCH " 5081$ sig_namert="RTMIN RTMAX" 5082$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS""," 5083$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP""," 5084$ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32""," 5085$ psnwc4_v7_3="""WINCH""," 5086$ psnwcrt="""RTMIN"",""RTMAX"",0" 5087$ sig_num1="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 " 5088$ sig_num_v7_3="28 " 5089$ sig_numrt="33 64" 5090$ sig_num_init1="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32," 5091$ sig_num_init_v7_3="28," 5092$ sig_num_initrt="33,64,0" 5093$ if (vms_ver .GES. "7.3") 5094$ then 5095$ sig_name = sig_name1 + sig_name2 + sig_name3 + sig_name4 + sig_namert 5096$ sig_name_init = psnwc1 + psnwc2 + psnwc3 + psnwc4_v7_3 + psnwcrt 5097$ sig_num = sig_num1 + sig_num_v7_3 + sig_numrt 5098$ sig_num_init = sig_num_init1 + sig_num_v7_3 + sig_num_initrt 5099$ sig_size="37" 5100$ else 5101$ sig_name = sig_name1 + sig_name2 + sig_name3 + sig_namert 5102$ sig_name_init = psnwc1 + psnwc2 + psnwc3 + psnwcrt 5103$ sig_num = sig_num1 + sig_numrt 5104$ sig_num_init = sig_num_init1 + sig_num_initrt 5105$ sig_size="36" 5106$ endif 5107$ sig_count="64" 5108$ uidtype="uid_t" 5109$ d_pathconf="define" 5110$ d_fpathconf="define" 5111$ d_sysconf="define" 5112$ d_sigsetjmp="define" 5113$ ELSE 5114$ pidtype="unsigned int" 5115$ d_bcmp="undef" 5116$ d_getitimer="undef" 5117$ d_gettimeod="undef" 5118$ d_mmap="undef" 5119$ d_mprotect="undef" 5120$ d_munmap="undef" 5121$ d_msync="undef" 5122$ d_ualarm="undef" 5123$ d_uname="undef" 5124$ d_unsetenv="undef" 5125$ d_clearenv="undef" 5126$ d_usleep="undef" 5127$ d_setitimer="undef" 5128$ d_sigaction="undef" 5129$ d_sigprocmask="undef" 5130$ d_truncate="undef" 5131$ d_wait4="undef" 5132$ d_index="undef" 5133$ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2" 5134$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS""," 5135$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0" 5136$ sig_name_init = psnwc1 + psnwc2 5137$ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17" 5138$ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0" 5139$ sig_size="19" 5140$ sig_count="15" 5141$ if (vms_ver .GES. "6.2") then sig_count="17" 5142$ uidtype="unsigned int" 5143$ d_pathconf="undef" 5144$ d_fpathconf="undef" 5145$ d_sysconf="undef" 5146$ d_sigsetjmp="undef" 5147$ ENDIF 5148$!: see if tzname[] exists 5149$ OS 5150$ WS "#include <stdio.h>" 5151$ WS "#include <time.h>" 5152$ WS "int main() { extern short tzname[]; printf(""%hd"", tzname[0]); }" 5153$ CS 5154$ GOSUB compile_ok 5155$ IF compile_status .EQ. good_compile 5156$ THEN 5157$ d_tzname = "undef" 5158$ echo4 "tzname[] NOT found." 5159$ ELSE 5160$ d_tzname = "define" 5161$ echo4 "tzname[] found." 5162$ ENDIF 5163$ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj; 5164$! 5165$ IF d_gethname .EQS. "undef" .AND. d_uname .EQS. "undef" 5166$ THEN 5167$ d_phostname="define" 5168$ ELSE 5169$ d_phostname="undef" 5170$ ENDIF 5171$! 5172$! Dec C alone 5173$ IF ccname .EQS. "DEC" 5174$ THEN 5175$ d_mbstowcs="define" 5176$ d_mbtowc="define" 5177$ d_stdiobase="define" 5178$ d_stdio_cnt_lval="define" 5179$ d_stdio_ptr_lval="define" 5180$ d_stdstdio="define" 5181$ d_faststdio="define" 5182$ d_wcstombs="define" 5183$ d_mblen="define" 5184$ d_mktime="define" 5185$ d_strcoll="define" 5186$ d_strxfrm="define" 5187$ d_wctomb="define" 5188$ i_locale="define" 5189$ i_langinfo="define" 5190$ d_locconv="define" 5191$ IF vms_ver .GES. "6.2" 5192$ THEN 5193$ d_nl_langinfo="define" 5194$ ELSE 5195$ d_nl_langinfo="undef" 5196$ ENDIF 5197$ d_setlocale="define" 5198$ vms_cc_type="decc" 5199$ ELSE 5200$ d_mbstowcs="undef" 5201$ d_mbtowc="undef" 5202$ d_stdiobase="undef" 5203$ d_stdio_cnt_lval="undef" 5204$ d_stdio_ptr_lval="undef" 5205$ d_stdstdio="undef" 5206$ d_faststdio="undef" 5207$ d_wcstombs="undef" 5208$ d_mblen="undef" 5209$ d_mktime="undef" 5210$ d_strcoll="undef" 5211$ d_strxfrm="undef" 5212$ d_wctomb="undef" 5213$ i_locale="undef" 5214$ i_langinfo="undef" 5215$ d_locconv="undef" 5216$ d_nl_langinfo="undef" 5217$ d_setlocale="undef" 5218$ ENDIF 5219$ d_stdio_ptr_lval_sets_cnt="undef" 5220$ d_stdio_ptr_lval_nochange_cnt="define" 5221$ usefaststdio="define" 5222$! 5223$! Sockets? 5224$ if Has_Socketshr .OR. Has_Dec_C_Sockets 5225$ THEN 5226$ d_vms_do_sockets="define" 5227$ d_htonl="define" 5228$ d_socket="define" 5229$ d_sockpair = "undef" 5230$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE")) 5231$ if (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024) 5232$ then 5233$ echo "Found 64 bit OpenVMS 8.2, will build with socketpair support" 5234$ d_sockpair = "define" 5235$ endif 5236$ d_select="define" 5237$ netdb_hlen_type="int" 5238$ netdb_host_type="char *" 5239$ netdb_name_type="char *" 5240$ netdb_net_type="long" 5241$ d_gethbyaddr="define" 5242$ d_gethbyname="define" 5243$ d_getnbyaddr="define" 5244$ d_getnbyname="define" 5245$ d_getpbynumber="define" 5246$ d_getpbyname="define" 5247$ d_getsbyport="define" 5248$ d_getsbyname="define" 5249$ d_gethostprotos="define" 5250$ d_getnetprotos="define" 5251$ d_getprotoprotos="define" 5252$ d_getservprotos="define" 5253$ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX" 5254$ THEN 5255$ socksizetype="unsigned int" 5256$ ELSE 5257$ socksizetype="int *" 5258$ ENDIF 5259$ ELSE 5260$ d_vms_do_sockets="undef" 5261$ d_htonl="undef" 5262$ d_socket="undef" 5263$ d_socketpair = "undef" 5264$ d_select="undef" 5265$ netdb_hlen_type="int" 5266$ netdb_host_type="char *" 5267$ netdb_name_type="char *" 5268$ netdb_net_type="long" 5269$ d_gethbyaddr="undef" 5270$ d_gethbyname="undef" 5271$ d_getnbyaddr="undef" 5272$ d_getnbyname="undef" 5273$ d_getpbynumber="undef" 5274$ d_getpbyname="undef" 5275$ d_getsbyport="undef" 5276$ d_getsbyname="undef" 5277$ d_gethostprotos="undef" 5278$ d_getnetprotos="undef" 5279$ d_getprotoprotos="undef" 5280$ d_getservprotos="undef" 5281$ socksizetype="undef" 5282$ ENDIF 5283$! Threads 5284$ IF use_threads 5285$ THEN 5286$ usethreads="define" 5287$ d_pthreads_created_joinable="define" 5288$ if (vms_ver .GES. "7.0") 5289$ THEN 5290$ d_oldpthreads="undef" 5291$ ELSE 5292$ d_oldpthreads="define" 5293$ ENDIF 5294$ ELSE 5295$ d_oldpthreads="undef" 5296$ usethreads="undef" 5297$ d_pthreads_created_joinable="undef" 5298$ ENDIF 5299$! 5300$! new (5.005_62++) typedefs for primitives 5301$! 5302$ echo "Choosing the C types to be used for Perl's internal types..." 5303$ ivtype="long" 5304$ uvtype="unsigned long" 5305$ i8type="char" 5306$ u8type="unsigned char" 5307$ i16type="short" 5308$ u16type="unsigned short" 5309$ i32type="int" 5310$ u32type="unsigned int" 5311$ i64type="long long" 5312$ u64type="unsigned long long" 5313$ nvtype="double" 5314$! 5315$ IF use64bitint .OR. use64bitint .EQS. "define" 5316$ THEN 5317$ ivtype = "''i64type'" 5318$ uvtype = "''u64type'" 5319$ nvtype="long double" 5320$ ELSE 5321$ i64size="undef" 5322$ u64size="undef" 5323$ ENDIF 5324$! 5325$ tmp = "''ivtype'" 5326$ GOSUB type_size_check 5327$ ivsize = tmp 5328$ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp 5329$ IF ivtype .eqs. "long" 5330$ THEN longsize = tmp 5331$ ELSE 5332$ tmp = "long" 5333$ GOSUB type_size_check 5334$ longsize = tmp 5335$ ENDIF 5336$! 5337$ tmp = "''uvtype'" 5338$ GOSUB type_size_check 5339$ uvsize = tmp 5340$ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp 5341$! 5342$ tmp = "''i8type'" 5343$ GOSUB type_size_check 5344$ i8size = tmp 5345$! 5346$ tmp = "''u8type'" 5347$ GOSUB type_size_check 5348$ u8size = tmp 5349$! 5350$ tmp = "''i16type'" 5351$ GOSUB type_size_check 5352$ i16size = tmp 5353$ IF i16type .eqs. "short" 5354$ THEN shortsize = tmp 5355$ ELSE 5356$ tmp = "short" 5357$ gosub type_size_check 5358$ shortsize = tmp 5359$ ENDIF 5360$! 5361$ tmp = "''u16type'" 5362$ GOSUB type_size_check 5363$ u16size = tmp 5364$! 5365$ tmp = "''i32type'" 5366$ GOSUB type_size_check 5367$ i32size = tmp 5368$ IF i32type .eqs. "int" 5369$ THEN intsize = tmp 5370$ ELSE 5371$ tmp = "int" 5372$ gosub type_size_check 5373$ intsize = tmp 5374$ ENDIF 5375$! 5376$ tmp = "''u32type'" 5377$ gosub type_size_check 5378$ u32size = tmp 5379$! 5380$ tmp = "''nvtype'" 5381$ GOSUB type_size_check 5382$ nvsize = tmp 5383$! 5384$ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)" 5385$ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)" 5386$ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)" 5387$! 5388$ echo4 "Checking whether your NVs can preserve your UVs..." 5389$ OS 5390$ WS "#if defined(__DECC) || defined(__DECCXX)" 5391$ WS "#include <stdlib.h>" 5392$ WS "#endif" 5393$ WS "#include <stdio.h>" 5394$ WS "int main() {" 5395$ WS " ''uvtype' k = (''uvtype')~0, l;" 5396$ WS " ''nvtype' d;" 5397$ WS " l = k;" 5398$ WS " d = (''nvtype')l;" 5399$ WS " l = (''uvtype')d;" 5400$ WS " if (l == k)" 5401$ WS " printf(""preserve\n"");" 5402$ WS " exit(0);" 5403$ WS "}" 5404$ CS 5405$ GOSUB compile 5406$ IF tmp .EQS. "preserve" 5407$ THEN 5408$ d_nv_preserves_uv = "define" 5409$ echo "Yes, they can." 5410$ nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8) 5411$ ELSE 5412$ d_nv_preserves_uv = "undef" 5413$ echo "No, they can't." 5414$ echo4 "Checking how many bits of your UVs your NVs can preserve..." 5415$ OS 5416$ WS "#if defined(__DECC) || defined(__DECCXX)" 5417$ WS "#include <stdlib.h>" 5418$ WS "#endif" 5419$ WS "#include <stdio.h>" 5420$ WS "int main() {" 5421$ WS " ''uvtype' u = 0;" 5422$ WS " int n = 8 * ''uvsize';" 5423$ WS " int i;" 5424$ WS " for (i = 0; i < n; i++) {" 5425$ WS " u = u << 1 | (''uvtype')1;" 5426$ WS " if ((''uvtype')(''nvtype')u != u)" 5427$ WS " break;" 5428$ WS " }" 5429$ WS " printf(""%d\n"", i);" 5430$ WS " exit(0);" 5431$ WS "}" 5432$ CS 5433$ GOSUB compile 5434$ nv_preserves_uv_bits = tmp 5435$ ENDIF 5436$! 5437$ echo4 "Checking if kill() uses SYS$FORCEX or can't be called from a signal handler..." 5438$ kill_by_sigprc = "undef" 5439$ OS 5440$ WS "#include <stdio.h>" 5441$ WS "#include <signal.h>" 5442$ WS "#include <unistd.h>" 5443$ WS "void handler1(int s) { printf(""%d"",s); kill(getpid(),2); }" 5444$ WS "void handler2(int s) { printf(""%d"",s); }" 5445$ WS "main(){" 5446$ WS " printf(""0"");" 5447$ WS " signal(1,handler1);" 5448$ WS " signal(2,handler2);" 5449$ WS " kill(getpid(),1);" 5450$ WS " sleep(1);" 5451$ WS " printf(""\n"");" 5452$ WS "}" 5453$ CS 5454$ ON ERROR THEN CONTINUE 5455$ GOSUB compile 5456$ IF tmp .NES. "012" 5457$ THEN 5458$ echo4 "Yes, it has at least one of those limitations." 5459$ echo4 "Checking whether we can use SYS$SIGPRC instead..." 5460$ OS 5461$ WS "#include <stdio.h>" 5462$ WS "#include <lib$routines.h>" 5463$ WS "unsigned long code = 0;" 5464$ WS "int handler(unsigned long *args) {" 5465$ WS " code = args[1];" 5466$ WS " return 1;" 5467$ WS "}" 5468$ WS "main() { " 5469$ WS " int iss, sys$sigprc();" 5470$ WS " lib$establish(handler);" 5471$ WS " iss = sys$sigprc(0,0,0x1234);" 5472$ WS " iss = ((iss&1)==1 && code == 0x1234);" 5473$ WS " printf(""%d\n"",iss);" 5474$ WS "}" 5475$ CS 5476$ ON ERROR THEN CONTINUE 5477$ GOSUB compile 5478$ IF tmp .EQS. "1" 5479$ THEN 5480$ echo4 "Yep, we can." 5481$ kill_by_sigprc = "define" 5482$! 5483$! since SIGBUS and SIGSEGV indistinguishable, make them the same here. 5484$! sigusr1 and sigusr2 show up in VMS6.2 and later 5485$! 5486$ if vms_ver .GES. "6.2" 5487$ then 5488$ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2" 5489$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS""," 5490$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0" 5491$ sig_name_init = psnwc1 + psnwc2 5492$ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17" 5493$ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0" 5494$ sig_size="19" 5495$ sig_count="17" 5496$ else 5497$ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT" 5498$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS""," 5499$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",0" 5500$ sig_name_init = psnwc1 + psnwc2 5501$ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6" 5502$ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,0" 5503$ sig_size="17" 5504$ sig_count="15" 5505$ endif 5506$ ELSE 5507$ echo4 "Nope, we can't." 5508$ ENDIF 5509$ ELSE 5510$ echo4 "Nope, it doesn't." 5511$ ENDIF 5512$ DELETE/SYMBOL tmp 5513$! 5514$! Finally the composite ones. All config 5515$! 5516$ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'" 5517$! 5518$ IF ccname .EQS. "DEC" 5519$ THEN 5520$ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'" 5521$ ENDIF 5522$ i_dirent = "undef" 5523$ IF ccname .EQS. "CXX" 5524$ THEN 5525$ i_dirent = "define" 5526$ ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'" 5527$ ENDIF 5528$ IF use_vmsdebug_perl 5529$ THEN 5530$ optimize="/List/Debug/NoOpt" 5531$ ldflags="/Debug/Trace/Map" 5532$ dbgprefix = "DBG" 5533$ ELSE 5534$ optimize= "/NoList" 5535$ ldflags="/NoTrace/NoMap" 5536$ dbgprefix = "" 5537$ ENDIF 5538$! 5539$! Okay, we've got everything configured. Now go write out a config.sh. 5540$ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",) 5541$ echo4 "Creating ''basename_config_sh'..." 5542$ open/write CONFIG 'config_sh' 5543$ WC := write CONFIG 5544$! 5545$! ##BEGIN WRITE NEW CONSTANTS HERE## 5546$! 5547$ WC "#!/bin/sh" 5548$ WC "#" 5549$ WC "# This file was produced by Configure.COM on a ''osname' system." 5550$ WC "#" 5551$ WC "# Package name : ''package'" 5552$ WC "# Source directory : ''src'" 5553$ WC "# Configuration time: " + cf_time 5554$ WC "# Configuration by : " + cf_by 5555$ WC "# Target system : " + myuname 5556$ WC "" 5557$ WC "Makefile_SH='" + Makefile_SH + "'" 5558$ WC "Mcc='" + Mcc + "'" 5559$ WC "PERL_REVISION='" + revision + "'" 5560$ WC "PERL_VERSION='" + patchlevel + "'" 5561$ WC "PERL_SUBVERSION='" + subversion + "'" 5562$ WC "PERL_API_REVISION='" + api_revision + "'" 5563$ WC "PERL_API_VERSION='" + api_version + "'" 5564$ WC "PERL_API_SUBVERSION='" + api_subversion + "'" 5565$ WC "PERL_PATCHLEVEL='" + perl_patchlevel + "'" 5566$ WC "PERL_CONFIG_SH='true'" 5567$ WC "_a='" + lib_ext + "'" 5568$ WC "_exe='" + exe_ext + "'" 5569$ WC "_o='" + obj_ext + "'" 5570$ WC "alignbytes='" + alignbytes + "'" 5571$ WC "aphostname='write sys$output f$edit(f$getsyi(\""SCSNODE\""),\""TRIM,LOWERCASE\"")'" 5572$ WC "ar='" + "'" 5573$ WC "archlib='" + archlib + "'" 5574$ WC "archlibexp='" + archlibexp + "'" 5575$ WC "archname='" + archname + "'" 5576$ WC "baserev='" + baserev + "'" 5577$ WC "bin='" + bin + "'" 5578$ WC "binexp='" + binexp + "'" 5579$ WC "builddir='" + builddir + "'" 5580$ WC "byteorder='1234'" 5581$ WC "castflags='0'" 5582$ WC "cc='" + perl_cc + "'" 5583$ WC "cccdlflags='" + cccdlflags + "'" 5584$ WC "ccdlflags='" + ccdlflags + "'" 5585$ IF uselargefiles .OR. uselargefiles .EQS. "define" 5586$ THEN 5587$! Perl can not use _USE_STD_STAT at the moment 5588$! IF d_symlink .OR. d_symlink .EQS. "define" 5589$! THEN 5590$! ccdefines = "_USE_STD_STAT=1" 5591$! ELSE 5592$ ccdefines = "_LARGEFILE=1" 5593$! ENDIF 5594$ ELSE 5595$ ccdefines = "" 5596$ ENDIF 5597$ IF ccdefines .NES. "" 5598$ THEN 5599$ WC "ccflags='" + ccflags + "/Define=" + ccdefines + "'" 5600$ ELSE 5601$ WC "ccflags='" + ccflags + "'" 5602$ ENDIF 5603$ WC "ccflags_uselargefiles='" + "'" 5604$ WC "ccname='" + ccname + "'" 5605$ WC "ccversion='" + ccversion + "'" 5606$ WC "cf_by='" + cf_by + "'" 5607$ WC "cf_email='" + cf_email + "'" 5608$ WC "cf_time='" + cf_time + "'" 5609$ WC "config_args='" + config_args + "'" 5610$ WC "config_sh='" + config_sh + "'" 5611$ WC "cpp_stuff='" + cpp_stuff + "'" 5612$ WC "cpplast='" + cpplast + "'" 5613$ WC "cppminus='" + cppminus + "'" 5614$ WC "cpprun='" + cpprun + "'" 5615$ WC "cppstdin='" + cppstdin + "'" 5616$ IF use64bitint .OR. use64bitint .EQS. "define" 5617$ THEN 5618$! gcvt() does not work for > 16 decimal places; fallback to sprintf 5619$ WC "d_Gconvert='sprintf((b),""%.*" + (nvgformat-"""") + ",(n),(x))'" 5620$ ELSE 5621$ WC "d_Gconvert='my_gconvert(x,n,t,b)'" 5622$ ENDIF 5623$ WC "d_PRIEldbl='" + d_PRIEUldbl + "'" 5624$ WC "d_PRIFldbl='" + d_PRIFUldbl + "'" 5625$ WC "d_PRIGldbl='" + d_PRIGUldbl + "'" 5626$ WC "d_PRIXU64='" + d_PRIXU64 + "'" 5627$ WC "d_PRId64='" + d_PRId64 + "'" 5628$ WC "d_PRIeldbl='" + d_PRIeldbl + "'" 5629$ WC "d_PRIfldbl='" + d_PRIfldbl + "'" 5630$ WC "d_PRIgldbl='" + d_PRIgldbl + "'" 5631$ WC "d_PRIo64='" + d_PRIo64 + "'" 5632$ WC "d_PRIu64='" + d_PRIu64 + "'" 5633$ WC "d_PRIx64='" + d_PRIx64 + "'" 5634$ WC "d_SCNfldbl='" + d_SCNfldbl + "'" 5635$ WC "d__fwalk='undef'" 5636$ WC "d_access='" + d_access + "'" 5637$ WC "d_accessx='undef'" 5638$ WC "d_aintl='undef'" 5639$ WC "d_alarm='define'" 5640$ WC "d_archlib='define'" 5641$ WC "d_atolf='" + d_atolf + "'" 5642$ WC "d_atoll='" + d_atoll + "'" 5643$ WC "d_attribute_format='" + d_attribut + "'" 5644$ WC "d_attribute_malloc='undef'" 5645$ WC "d_attribute_nonnull='undef'" 5646$ WC "d_attribute_noreturn='undef'" 5647$ WC "d_attribute_pure='undef'" 5648$ WC "d_attribute_unused='undef'" 5649$ WC "d_attribute_warn_unused_result='undef'" 5650$ WC "d_bcmp='" + d_bcmp + "'" 5651$ WC "d_bcopy='" + d_bcopy + "'" 5652$ WC "d_bincompat3='undef'" 5653$! WC "d_bsdpgrp='undef'" 5654$ WC "d_bsdgetpgrp='undef'" 5655$ WC "d_bsdsetpgrp='undef'" 5656$ WC "d_bzero='" + d_bzero + "'" 5657$ WC "d_casti32='define'" 5658$ WC "d_castneg='define'" 5659$ WC "d_charvspr='undef'" 5660$ WC "d_chown='define'" 5661$ WC "d_chroot='undef'" 5662$ WC "d_chsize='undef'" 5663$ WC "d_class='undef'" 5664$ WC "d_cmsghdr_s='undef'" 5665$ WC "d_const='define'" 5666$ WC "d_copysignl='define'" 5667$ WC "d_crypt='define'" 5668$ WC "d_csh='undef'" 5669$ WC "d_cuserid='define'" 5670$ WC "d_dbl_dig='define'" 5671$ WC "d_dbminitproto='undef'" 5672$ WC "d_difftime='define'" 5673$ WC "d_dirfd='undef'" 5674$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE")) 5675$ IF (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024) 5676$ then 5677$! Sorry, CRTL does not have this, and in order to support 5678$! POSIX filespecifications, the CRTL readdir() structures 5679$! need to be used globaly for now. 5680$ echo "Building for OpenVMS 8.2 uses CRTL dirent.h, so no dirnamlen member" 5681$ WC "d_dirnamlen='undef'" 5682$ else 5683$ WC "d_dirnamlen='define'" 5684$ endif 5685$ WC "d_dlerror='undef'" 5686$ WC "d_dlsymun='undef'" 5687$ WC "d_dosuid='undef'" 5688$ WC "d_drand48proto='" + d_drand48proto + "'" 5689$ WC "d_dup2='define'" 5690$ WC "d_eaccess='undef'" 5691$ WC "d_endgrent='define'" 5692$ WC "d_endhent='" + d_endhent + "'" 5693$ WC "d_endnent='" + d_endnent + "'" 5694$ WC "d_endpent='" + d_endpent + "'" 5695$ WC "d_endpwent='define'" 5696$ WC "d_endsent='" + d_endsent + "'" 5697$ WC "d_eofnblk='undef'" 5698$ WC "d_eunice='undef'" 5699$ WC "d_fchmod='undef'" 5700$ WC "d_fchdir='undef'" 5701$ WC "d_fchown='undef'" 5702$ WC "d_fcntl='" + d_fcntl + "'" 5703$ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'" 5704$ WC "d_fd_set='" + d_fd_set + "'" 5705$ WC "d_fgetpos='define'" 5706$ WC "d_finite='undef'" 5707$ WC "d_finitel='undef'" 5708$ WC "d_flexfnam='define'" 5709$ WC "d_flock='undef'" 5710$ WC "d_flockproto='undef'" 5711$ WC "d_fork='undef'" 5712$ WC "d_fp_class='undef'" 5713$ WC "d_fpathconf='" + d_fpathconf + "'" 5714$ WC "d_fpclass='undef'" 5715$ WC "d_fpclassify='undef'" 5716$ WC "d_fpclassl='undef'" 5717$ WC "d_fpos64_t='" + d_fpos64_t + "'" 5718$ WC "d_frexpl='" + d_frexpl + "'" 5719$ WC "d_fs_data_s='undef'" 5720$ WC "d_fseeko='" + d_fseeko + "'" 5721$ WC "d_fsetpos='define'" 5722$ WC "d_fstatfs='undef'" 5723$ WC "d_fstatvfs='" + d_fstatvfs + "'" 5724$ WC "d_fsync='undef'" 5725$ WC "d_ftello='" + d_ftello + "'" 5726$ WC "d_futimes='undef'" 5727$ WC "d_getcwd='define'" 5728$ WC "d_getespwnam='undef'" 5729$ WC "d_getfsstat='undef'" 5730$ WC "d_getgrent='define'" 5731$ WC "d_getgrps='undef'" 5732$ WC "d_gethbyaddr='" + d_gethbyaddr + "'" 5733$ WC "d_gethbyname='" + d_gethbyname + "'" 5734$ WC "d_gethent='" + d_gethent + "'" 5735$ WC "d_gethname='" + d_gethname + "'" 5736$ WC "d_gethostprotos='" + d_gethostprotos + "'" 5737$ WC "d_getitimer='" + d_getitimer + "'" 5738$ WC "d_getlogin='define'" 5739$ WC "d_getmnt='undef'" 5740$ WC "d_getmntent='undef'" 5741$ WC "d_getnbyaddr='" + d_getnbyaddr + "'" 5742$ WC "d_getnbyname='" + d_getnbyname + "'" 5743$ WC "d_getnent='" + d_getnent + "'" 5744$ WC "d_getnetprotos='" + d_getnetprotos + "'" 5745$ WC "d_getpagsz='undef'" 5746$ WC "d_getpbyname='" + d_getpbyname + "'" 5747$ WC "d_getpbynumber='" + d_getpbynumber + "'" 5748$ WC "d_getpent='" + d_getpent + "'" 5749$ WC "d_getpgid='" + d_getpgid + "'" 5750$ WC "d_getpgrp2='undef'" 5751$ WC "d_getpgrp='" + d_getpgrp + "'" 5752$ WC "d_getppid='" + d_getppid + "'" 5753$ WC "d_getprior='undef'" 5754$ WC "d_getprotoprotos='" + d_getprotoprotos + "'" 5755$ WC "d_getprpwnam='undef'" 5756$ WC "d_getpwent='define'" 5757$ WC "d_getsbyname='" + d_getsbyname + "'" 5758$ WC "d_getsbyport='" + d_getsbyport + "'" 5759$ WC "d_getsent='" + d_getsent + "'" 5760$ WC "d_getservprotos='" + d_getservprotos + "'" 5761$ WC "d_getspnam='undef'" 5762$ WC "d_gettimeod='" + d_gettimeod + "'" 5763$ WC "d_gnulibc='undef'" 5764$ WC "d_grpasswd='undef'" 5765$ WC "d_hasmntopt='undef'" 5766$ WC "d_htonl='" + d_htonl + "'" 5767$ WC "d_ilogbl='undef'" 5768$ WC "d_index='" + d_index + "'" 5769$ WC "d_inetaton='undef'" 5770$ WC "d_int64_t='" + d_int64_t + "'" 5771$ WC "d_isascii='define'" 5772$ WC "d_isfinite='undef'" 5773$ WC "d_isinf='undef'" 5774$ WC "d_isnan='" + d_isnan + "'" 5775$ WC "d_isnanl='" + d_isnanl + "'" 5776$ WC "d_killpg='undef'" 5777$ WC "d_lchown='" + d_lchown + "'" 5778$ WC "d_ldbl_dig='define'" 5779$ WC "d_libm_lib_version='undef'" 5780$ WC "d_link='" + d_link + "'" 5781$ WC "d_llseek='undef'" 5782$ WC "d_locconv='" + d_locconv + "'" 5783$ WC "d_lockf='undef'" 5784$ WC "d_longdbl='" + d_longdbl + "'" 5785$ WC "d_longlong='" + d_longlong + "'" 5786$ WC "d_lseekproto='define'" 5787$ WC "d_lstat='" + d_lstat + "'" 5788$ WC "d_madvise='undef'" 5789$ WC "d_malloc_size='undef'" 5790$ WC "d_malloc_good_size='undef'" 5791$ WC "d_mblen='" + d_mblen + "'" 5792$ WC "d_mbstowcs='" + d_mbstowcs + "'" 5793$ WC "d_mbtowc='" + d_mbtowc + "'" 5794$ WC "d_memchr='" + d_memchr + "'" 5795$ WC "d_memcmp='define'" 5796$ WC "d_memcpy='define'" 5797$ WC "d_memmove='define'" 5798$ WC "d_memset='define'" 5799$ WC "d_mkdir='define'" 5800$ WC "d_mkdtemp='" + d_mkdtemp + "'" 5801$ WC "d_mkfifo='undef'" 5802$ WC "d_mknod='undef'" 5803$ WC "d_mkstemp='" + d_mkstemp + "'" 5804$ WC "d_mkstemps='" + d_mkstemps + "'" 5805$ WC "d_mktime='" + d_mktime + "'" 5806$ WC "d_mmap='" + d_mmap + "'" 5807$ WC "d_modfl='" + d_modfl + "'" 5808$ WC "d_modflproto='" + d_modflproto + "'" 5809$ WC "d_modfl_pow32_bug='undef'" 5810$ WC "d_mprotect='" + d_mprotect + "'" 5811$ WC "d_msg='undef'" 5812$ WC "d_msg_ctrunc='undef'" 5813$ WC "d_msg_dontroute='undef'" 5814$ WC "d_msg_oob='undef'" 5815$ WC "d_msg_peek='undef'" 5816$ WC "d_msg_proxy='undef'" 5817$ WC "d_msghdr_s='undef'" 5818$ WC "d_msync='" + d_msync + "'" 5819$ WC "d_munmap='" + d_munmap + "'" 5820$ WC "d_mymalloc='" + d_mymalloc + "'" 5821$ WC "d_nanosleep='" + d_nanosleep + "'" 5822$ WC "d_nice='define'" 5823$ WC "d_nl_langinfo='" + d_nl_langinfo + "'" 5824$ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'" 5825$ WC "nv_preserves_uv_bits='" + nv_preserves_uv_bits + "'" 5826$ WC "d_nv_zero_is_allbits_zero='define'" 5827$ WC "d_off64_t='" + d_off64_t + "'" 5828$ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'" 5829$ WC "d_oldarchlib='define'" 5830$ WC "d_oldpthreads='" + d_oldpthreads + "'" 5831$ WC "d_open3='define'" 5832$ WC "d_pathconf='" + d_pathconf + "'" 5833$ WC "d_pause='define'" 5834$ WC "d_perl_otherlibdirs='undef'" 5835$ WC "d_phostname='" + d_phostname + "'" 5836$ WC "d_pipe='define'" 5837$ WC "d_poll='" + d_poll + "'" 5838$ WC "d_procselfexe='undef'" 5839$ WC "d_pthread_atfork='undef'" 5840$ WC "d_pthread_attr_setscope='" + d_pthread_attr_setscope + "'" 5841$ WC "d_pthread_yield='" + d_pthread_yield + "'" 5842$ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'" 5843$ WC "d_pwage='undef'" 5844$ WC "d_pwchange='undef'" 5845$ WC "d_pwclass='undef'" 5846$ WC "d_pwcomment='define'" 5847$ WC "d_pwexpire='undef'" 5848$ WC "d_pwgecos='define'" 5849$ WC "d_pwpasswd='define'" 5850$ WC "d_pwquota='undef'" 5851$ WC "d_qgcvt='undef'" 5852$ WC "d_quad='" + d_quad + "'" 5853$ WC "d_readdir='define'" 5854$ WC "d_readlink='" + d_readlink + "'" 5855$ WC "d_readv='undef'" 5856$ WC "d_realpath='" + d_realpath + "'" 5857$ WC "d_recvmsg='undef'" 5858$ WC "d_rename='define'" 5859$ WC "d_rewinddir='define'" 5860$ WC "d_rmdir='define'" 5861$ WC "d_safebcpy='undef'" 5862$ WC "d_safemcpy='define'" 5863$ WC "d_sanemcmp='define'" 5864$ WC "d_sbrkproto='define'" 5865$ WC "d_scalbnl='undef'" 5866$ WC "d_sched_yield='" + d_sched_yield + "'" 5867$ WC "d_scm_rights='undef'" 5868$ WC "d_seekdir='define'" 5869$ WC "d_select='" + d_select + "'" 5870$ WC "d_sem='undef'" 5871$ WC "d_semctl_semid_ds='undef'" 5872$ WC "d_semctl_semun='undef'" 5873$ WC "d_sendmsg='undef'" 5874$ WC "d_setegid='undef'" 5875$ WC "d_setenv='" + d_setenv + "'" 5876$ WC "d_seteuid='" + d_seteuid + "'" 5877$ WC "d_setgrent='" + d_setgrent + "'" 5878$ WC "d_setgrps='undef'" 5879$ WC "d_sethent='" + d_sethent + "'" 5880$ WC "d_setitimer='" + d_setitimer + "'" 5881$ WC "d_setlinebuf='undef'" 5882$ WC "d_setlocale='" + d_setlocale + "'" 5883$ WC "d_setnent='" + d_setnent + "'" 5884$ WC "d_setpent='" + d_setpent + "'" 5885$ WC "d_setpgid='" + d_setpgid + "'" 5886$ WC "d_setpgrp2='undef'" 5887$ WC "d_setpgrp='" + d_setpgrp + "'" 5888$ WC "d_setprior='undef'" 5889$ WC "d_setproctitle='" + d_setproctitle + "'" 5890$ WC "d_setpwent='define'" 5891$ WC "d_setregid='" + d_setregid + "'" 5892$ WC "d_setresgid='undef'" 5893$ WC "d_setresuid='undef'" 5894$ WC "d_setreuid='" + d_setreuid + "'" 5895$ WC "d_setrgid='undef'" 5896$ WC "d_setruid='undef'" 5897$ WC "d_setsent='" + d_setsent + "'" 5898$ WC "d_setsid='" + d_setsid + "'" 5899$ WC "d_setvbuf='" + d_setvbuf + "'" 5900$ WC "d_sfio='undef'" 5901$ WC "d_shm='undef'" 5902$ WC "d_shmatprototype='undef'" 5903$ WC "d_sigaction='" + d_sigaction + "'" 5904$ WC "d_sigprocmask='" + d_sigprocmask + "'" 5905$ WC "d_sigsetjmp='" + d_sigsetjmp + "'" 5906$ WC "d_sockatmark='undef'" 5907$ WC "d_sockatmarkproto='undef'" 5908$ WC "d_socket='" + d_socket + "'" 5909$ WC "d_socklen_t='" + d_socklen_t + "'" 5910$ WC "d_sockpair='" + d_sockpair + "'" 5911$ WC "d_socks5_init='undef'" 5912$ WC "d_sprintf_returns_strlen='define'" 5913$ WC "d_sqrtl='define'" 5914$ WC "d_sresgproto='undef'" 5915$ WC "d_sresgproto='undef'" 5916$ WC "d_sresproto='undef'" 5917$ WC "d_sresuproto='undef'" 5918$ WC "d_statblks='undef'" 5919$ WC "d_statfs_f_flags='undef'" 5920$ WC "d_statfs_s='undef'" 5921$ WC "d_statfsflags='undef'" 5922$ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'" 5923$ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'" 5924$ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'" 5925$ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'" 5926$ WC "d_stdio_stream_array='undef'" 5927$ WC "d_stdiobase='" + d_stdiobase + "'" 5928$ WC "d_stdstdio='" + d_stdstdio + "'" 5929$ WC "d_faststdio='" + d_faststdio + "'" 5930$ WC "d_strchr='define'" 5931$ WC "d_strcoll='" + d_strcoll + "'" 5932$ WC "d_strctcpy='define'" 5933$ WC "d_strerrm='strerror((e),vaxc$errno)'" 5934$ WC "d_strerror='define'" 5935$ WC "d_strftime='define'" 5936$ WC "d_strlcat='undef'" 5937$ WC "d_strlcpy='undef'" 5938$ WC "d_strtod='define'" 5939$ WC "d_strtol='define'" 5940$ WC "d_strtold='" + d_strtold + "'" 5941$ WC "d_strtoll='" + d_strtoll + "'" 5942$ WC "d_strtoq='" + d_strtoq + "'" 5943$ WC "d_strtoul='define'" 5944$ WC "d_strtoull='" + d_strtoull + "'" 5945$ WC "d_strtouq='" + d_strtouq + "'" 5946$ WC "d_strxfrm='" + d_strxfrm + "'" 5947$ WC "d_suidsafe='undef'" 5948$ WC "d_symlink='" + d_symlink + "'" 5949$ WC "d_syscall='undef'" 5950$ WC "d_syscallproto='undef'" 5951$ WC "d_sysconf='" + d_sysconf + "'" 5952$ WC "d_syserrlst='undef'" 5953$ WC "d_system='define'" 5954$ WC "d_tcgetpgrp='undef'" 5955$ WC "d_tcsetpgrp='undef'" 5956$ WC "d_telldir='define'" 5957$ WC "d_telldirproto='define'" 5958$ WC "d_time='define'" 5959$ WC "d_times='define'" 5960$ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.0") 5961$ THEN 5962$ WC "d_tm_tm_gmtoff='define'" 5963$ WC "d_tm_tm_zone='define'" 5964$ ELSE 5965$ WC "d_tm_tm_gmtoff='undef'" 5966$ WC "d_tm_tm_zone='undef'" 5967$ ENDIF 5968$ WC "d_truncate='" + d_truncate + "'" 5969$ WC "d_tzname='" + d_tzname + "'" 5970$ WC "d_u32align='define'" 5971$ WC "d_ualarm='" + d_ualarm + "'" 5972$ WC "d_umask='define'" 5973$ WC "d_uname='" + d_uname + "'" 5974$ WC "d_union_semun='undef'" 5975$ WC "d_unlink_all_versions='" + d_unlink_all_versions + "'" ! VMS-specific 5976$ WC "d_unordered='undef'" 5977$ WC "d_unsetenv='" + d_unsetenv + "'" 5978$ WC "d_clearenv='" + d_clearenv + "'" 5979$ WC "d_usleep='" + d_usleep + "'" 5980$ WC "d_usleepproto='" + d_usleep + "'" 5981$ WC "d_ustat='undef'" 5982$ WC "d_vendorarch='undef'" 5983$ WC "d_vendorlib='undef'" 5984$ WC "d_vfork='define'" 5985$ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS 5986$ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS 5987$ WC "d_void_closedir='define'" 5988$ WC "d_volatile='define'" 5989$ WC "d_vprintf='define'" 5990$ WC "d_wait4='" + d_wait4 + "'" 5991$ WC "d_waitpid='define'" 5992$ WC "d_wcstombs='" + d_wcstombs + "'" 5993$ WC "d_wctomb='" + d_wctomb + "'" 5994$ WC "d_writev='undef'" 5995$ WC "db_hashtype=' '" 5996$ WC "db_prefixtype=' '" 5997$ WC "db_version_major='" + "'" 5998$ WC "db_version_minor='" + "'" 5999$ WC "db_version_patch='" + "'" 6000$ WC "dbgprefix='" + dbgprefix + "'" 6001$ WC "defvoidused='15'" 6002$ WC "devtype='" + devtype + "'" 6003$ WC "direntrytype='struct dirent'" 6004$ WC "dlext='" + dlext + "'" 6005$ WC "dlobj='" + dlobj + "'" 6006$ WC "dlsrc='dl_vms.c'" 6007$ WC "doublesize='" + doublesize + "'" 6008$ WC "drand01='" + drand01 + "'" 6009$! 6010$! The extensions symbol may be quite long 6011$! 6012$ tmp = "dynamic_ext='" + extensions + "'" 6013$ WC/symbol tmp 6014$ DELETE/SYMBOL tmp 6015$ WC "eagain=' '" 6016$ WC "ebcdic='undef'" 6017$ WC "embedmymalloc='" + usemymalloc + "'" 6018$ WC "eunicefix=':'" 6019$ WC "exe_ext='" + exe_ext + "'" 6020$! 6021$! The extensions symbol may be quite long 6022$! 6023$ tmp = "extensions='" + extensions + "'" 6024$ WC/symbol tmp 6025$ DELETE/SYMBOL tmp 6026$ WC "fflushNULL='define'" 6027$ WC "fflushall='undef'" 6028$ WC "fpostype='fpos_t'" 6029$ WC "freetype='void'" 6030$ WC "full_ar='" + "'" 6031$ WC "full_csh='" + " '" 6032$ WC "full_sed='_NLA0:'" 6033$ WC "gccversion='" + gccversion + "'" 6034$ WC "gidformat='lu'" 6035$ WC "gidsign='1'" 6036$ WC "gidsize='4'" 6037$ WC "gidtype='" + gidtype + "'" 6038$ WC "groupstype='Gid_t'" 6039$ WC "hint='none'" 6040$ WC "hintfile='" + "'" 6041$ WC "i16size='" + i16size + "'" 6042$ WC "i16type='" + i16type + "'" 6043$ WC "i32size='" + i32size + "'" 6044$ WC "i32type='" + i32type + "'" 6045$ WC "i64size='" + i64size + "'" 6046$ WC "i64type='" + i64type + "'" 6047$ WC "i8size='" + i8size + "'" 6048$ WC "i8type='" + i8type + "'" 6049$ WC "i_arpainet='undef'" 6050$ WC "i_crypt='undef'" 6051$ WC "i_db='undef'" 6052$ WC "i_dbm='undef'" 6053$ WC "i_dirent='" + i_dirent + "'" 6054$ WC "i_dlfcn='undef'" 6055$ WC "i_fcntl='" + i_fcntl + "'" 6056$ WC "i_float='define'" 6057$ WC "i_fp='undef'" 6058$ WC "i_fp_class='undef'" 6059$ WC "i_grp='" + i_grp + "'" 6060$ WC "i_ieeefp='undef'" 6061$ WC "i_inttypes='" + i_inttypes + "'" 6062$ WC "i_langinfo='" + i_langinfo + "'" 6063$ WC "i_libutil='" + i_libutil + "'" 6064$ WC "i_limits='define'" 6065$ WC "i_locale='" + i_locale + "'" 6066$ WC "i_machcthr='undef'" 6067$ WC "i_machcthreads='undef'" 6068$ WC "i_math='define'" 6069$ WC "i_memory='undef'" 6070$ WC "i_mntent='undef'" 6071$ WC "i_ndbm='undef'" 6072$ WC "i_netdb='" + i_netdb + "'" 6073$ WC "i_neterrno='define'" 6074$ WC "i_netinettcp='" + i_netinettcp + "'" 6075$ WC "i_niin='" + i_niin + "'" 6076$ WC "i_poll='" + i_poll + "'" 6077$ WC "i_prot='undef'" 6078$ WC "i_pthread='define'" 6079$ WC "i_pwd='undef'" 6080$ WC "i_rpcsvcdbm='undef'" 6081$ WC "i_sfio='undef'" 6082$ WC "i_sgtty='undef'" 6083$ WC "i_shadow='" + i_shadow + "'" 6084$ WC "i_socks='" + i_socks + "'" 6085$ WC "i_stdarg='define'" 6086$ WC "i_stddef='define'" 6087$ WC "i_stdlib='define'" 6088$ WC "i_string='define'" 6089$ WC "i_sunmath='undef'" 6090$ WC "i_sysaccess='" + i_sysaccess + "'" 6091$ WC "i_sysdir='undef'" 6092$ WC "i_sysfile='" + i_sysfile + "'" 6093$ WC "i_sysioctl='" + i_sysioctl + "'" 6094$ WC "i_syslog='" + i_syslog + "'" 6095$ WC "i_sysmman='undef'" 6096$ WC "i_sysmode='" + i_sysmode + "'" 6097$ WC "i_sysmount='undef'" 6098$ WC "i_sysndir='undef'" 6099$ WC "i_sysparam='undef'" 6100$ WC "i_sysresrc='undef'" 6101$ WC "i_syssecrt='" + i_syssecrt + "'" 6102$ WC "i_sysselct='undef'" 6103$ WC "i_syssockio='undef'" 6104$ WC "i_sysstat='define'" 6105$ WC "i_sysstatfs='undef'" 6106$ WC "i_sysstatvfs='" + i_sysstatvfs + "'" 6107$ WC "i_systime='undef'" 6108$ WC "i_systimek='undef'" 6109$ WC "i_systimes='undef'" 6110$ WC "i_systypes='define'" 6111$ WC "i_sysuio='" + i_sysuio + "'" 6112$ WC "i_sysun='undef'" 6113$ WC "i_sysutsname='" + i_sysutsname + "'" 6114$ WC "i_sysvfs='undef'" 6115$ WC "i_syswait='undef'" 6116$ WC "i_termio='undef'" 6117$ WC "i_termios='undef'" 6118$ WC "i_time='define'" 6119$ WC "i_unistd='" + i_unistd + "'" 6120$ WC "i_ustat='undef'" 6121$ WC "i_utime='undef'" 6122$ WC "i_values='undef'" 6123$ WC "i_varargs='undef'" 6124$ WC "i_vfork='undef'" 6125$ WC "inc_version_list='0'" 6126$ WC "inc_version_list_init='0'" 6127$ WC "installarchlib='" + installarchlib + "'" 6128$ WC "installbin='" + installbin + "'" 6129$ WC "installman1dir='" + installman1dir + "'" 6130$ WC "installman3dir='" + installman3dir + "'" 6131$ WC "installprefix='" + vms_prefix + "'" 6132$ WC "installprefixexp='" + vms_prefix + ":'" 6133$ WC "installprivlib='" + installprivlib + "'" 6134$ WC "installscript='" + installscript + "'" 6135$ WC "installsitearch='" + installsitearch + "'" 6136$ WC "installsitebin='" + sitebin + "'" 6137$ WC "installsitelib='" + installsitelib + "'" 6138$ WC "installusrbinperl='undef'" 6139$ WC "intsize='" + intsize + "'" 6140$ WC "ivdformat='" + ivdformat + "'" 6141$ WC "ivsize='" + ivsize + "'" 6142$ WC "ivtype='" + ivtype + "'" 6143$! 6144$! The known_extensions symbol may be quite long 6145$! 6146$ tmp = "known_extensions='" + known_extensions + "'" 6147$ WC/symbol tmp 6148$ DELETE/SYMBOL tmp 6149$ WC "ld='" + ld + "'" 6150$ WC "lddlflags='/Share'" 6151$ WC "ldflags='" + ldflags + "'" 6152$ WC "ldflags_uselargefiles='" + "'" 6153$ WC "lib_ext='" + lib_ext + "'" 6154$ WC "libc='" + libc + "'" 6155$ WC "libpth='/sys$share /sys$library'" 6156$ WC "libs='" + libs + "'" 6157$ WC "libswanted='" + "'" 6158$ WC "libswanted_uselargefiles='" + "'" 6159$ WC "longdblsize='" + longdblsize + "'" 6160$ WC "longlongsize='" + longlongsize + "'" 6161$ WC "longsize='" + longsize + "'" 6162$ IF uselargefiles .OR. uselargefiles .EQS. "define" 6163$ THEN 6164$ WC "lseeksize='8'" 6165$ WC "lseektype='off_t'" 6166$ ELSE 6167$ WC "lseeksize='4'" 6168$ WC "lseektype='int'" 6169$ ENDIF 6170$ WC "mab='" + "'" 6171$ WC "make='" + make + "'" 6172$ WC "malloctype='void *'" 6173$ WC "usemallocwrap='" + usemallocwrap + "'" 6174$ WC "man1ext='rno'" 6175$ WC "man3ext='rno'" 6176$ WC "mmaptype='void *'" 6177$ WC "modetype='unsigned int'" 6178$ WC "multiarch='undef'" 6179$ WC "mydomain='" + mydomain + "'" 6180$ WC "myhostname='" + myhostname + "'" 6181$ WC "myuname='" + myuname + "'" 6182$ WC "need_va_copy='undef'" 6183$ WC "netdb_hlen_type='" + netdb_hlen_type + "'" 6184$ WC "netdb_host_type='" + netdb_host_type + "'" 6185$ WC "netdb_name_type='" + netdb_name_type + "'" 6186$ WC "netdb_net_type='" + netdb_net_type + "'" 6187$ WC "nonxs_ext='" + nonxs_ext + "'" 6188$ WC "nveformat='" + nveformat + "'" 6189$ WC "nvfformat='" + nvfformat + "'" 6190$ WC "nvgformat='" + nvgformat + "'" 6191$ WC "nvsize='" + nvsize + "'" 6192$ WC "nvtype='" + nvtype + "'" 6193$ WC "o_nonblock=' '" 6194$ WC "obj_ext='" + obj_ext + "'" 6195$ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'" 6196$ WC "oldarchlib='" + oldarchlib + "'" 6197$ WC "oldarchlibexp='" + oldarchlibexp + "'" 6198$ WC "optimize='" + optimize + "'" 6199$ WC "osname='" + osname + "'" 6200$ WC "osvers='" + osvers + "'" 6201$ WC "otherlibdirs='" + "'" 6202$ WC "package='" + package + "'" 6203$ WC "pager='" + pager + "'" 6204$ WC "patchlevel='" + patchlevel + "'" 6205$ WC "path_sep='|'" 6206$ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm() 6207$ WC "perladmin='" + perladmin + "'" 6208$ WC "perllibs='" + perllibs + "'" 6209$ WC "perlpath='" + "''vms_prefix':[000000]Perl''exe_ext'" + "'" 6210$ WC "perl_symbol='" + perl_symbol + "'" ! VMS specific 6211$ WC "perl_verb='" + perl_verb + "'" ! VMS specific 6212$ WC "pgflquota='" + pgflquota + "'" 6213$ WC "pidtype='" + pidtype + "'" 6214$ WC "prefix='" + vms_prefix + "'" 6215$ WC "prefixexp='" + vms_prefix + ":'" 6216$ WC "privlib='" + privlib + "'" 6217$ WC "privlibexp='" + privlibexp + "'" 6218$ WC "procselfexe=' '" 6219$ WC "prototype='define'" 6220$ WC "ptrsize='" + ptrsize + "'" 6221$ WC "quadkind='" + quadkind + "'" 6222$ WC "quadtype='" + quadtype + "'" 6223$ WC "randbits='" + randbits + "'" 6224$ WC "randfunc='" + randfunc + "'" 6225$ WC "randseedtype='" + randseedtype + "'" 6226$ WC "ranlib='" + "'" 6227$ WC "rd_nodata=' '" 6228$ WC "revision='" + revision + "'" 6229$ WC "sPRId64='" + sPRId64 + "'" 6230$ WC "sPRIEldbl='" + sPRIEUldbl + "'" 6231$ WC "sPRIFldbl='" + sPRIFUldbl + "'" 6232$ WC "sPRIGldbl='" + sPRIGUldbl + "'" 6233$ WC "sPRIX64='" + sPRIXU64 + "'" 6234$ WC "sPRIeldbl='" + sPRIeldbl + "'" 6235$ WC "sPRIfldbl='" + sPRIfldbl + "'" 6236$ WC "sPRIgldbl='" + sPRIgldbl + "'" 6237$! WC "sPRIi64='" + sPRIi64 + "'" 6238$ WC "sPRIo64='" + sPRIo64 + "'" 6239$ WC "sPRIu64='" + sPRIu64 + "'" 6240$ WC "sPRIx64='" + sPRIx64 + "'" 6241$ WC "sSCNfldbl='" + sSCNfldbl + "'" 6242$ WC "sched_yield='" + sched_yield + "'" 6243$ WC "scriptdir='" + scriptdir + "'" 6244$ WC "scriptdirexp='" + scriptdir + "'" ! use scriptdir for now 6245$ WC "seedfunc='" + seedfunc + "'" 6246$ WC "selectminbits='32'" 6247$ WC "selecttype='" + selecttype + "'" 6248$ WC "sh='MCR'" 6249$ WC "shmattype='" + " '" 6250$ WC "shortsize='" + shortsize + "'" 6251$ WC "shrplib='define'" 6252$ WC "sig_name='" + sig_name + "'" 6253$ tmp = "sig_name_init='" + sig_name_init + "'" 6254$ WC/symbol tmp 6255$ DELETE/SYMBOL tmp 6256$ WC "sig_num='" + sig_num + "'" 6257$ WC "sig_num_init='" + sig_num_init + "'" 6258$ WC "sig_count='" + sig_count + "'" 6259$ WC "sig_size='" + sig_size + "'" 6260$ WC "signal_t='" + signal_t + "'" 6261$ WC "sitearch='" + sitearch + "'" 6262$ WC "sitearchexp='" + sitearchexp + "'" 6263$ WC "sitebin='" + sitebin + "'" 6264$ WC "sitebinexp='" + sitebin + "'" 6265$ WC "sitelib='" + sitelib + "'" 6266$ WC "sitelib_stem='" + sitelib_stem + "'" 6267$ WC "sitelibexp='" + sitelibexp + "'" 6268$ WC "siteprefix='" + vms_prefix + "'" 6269$ WC "siteprefixexp='" + vms_prefix + ":'" 6270$ WC "sizesize='" + sizesize + "'" 6271$ WC "sizetype='size_t'" 6272$ WC "so='" + so + "'" 6273$ WC "socksizetype='" + socksizetype + "'" 6274$ WC "spitshell='write sys$output '" 6275$ WC "src='" + src + "'" 6276$ WC "ssizetype='int'" 6277$ WC "startperl=" + startperl ! This one's special--no enclosing single quotes 6278$ WC "static_ext='" + static_ext + "'" 6279$ WC "stdchar='" + stdchar + "'" 6280$ WC "stdio_base='((*fp)->_base)'" 6281$ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'" 6282$ WC "stdio_cnt='((*fp)->_cnt)'" 6283$ WC "stdio_ptr='((*fp)->_ptr)'" 6284$ WC "stdio_stream_array=' " + "'" 6285$ WC "subversion='" + subversion + "'" 6286$ WC "timetype='" + timetype + "'" 6287$ WC "u16size='" + u16size + "'" 6288$ WC "u16type='" + u16type + "'" 6289$ WC "u32size='" + u32size + "'" 6290$ WC "u32type='" + u32type + "'" 6291$ WC "u64size='" + u64size + "'" 6292$ WC "u64type='" + u64type + "'" 6293$ WC "u8size='" + u8size + "'" 6294$ WC "u8type='" + u8type + "'" 6295$ WC "uidformat='lu'" 6296$ WC "uidsign='1'" 6297$ WC "uidsize='4'" 6298$ WC "uidtype='" + uidtype + "'" 6299$ WC "uquadtype='" + uquadtype + "'" 6300$ WC "use5005threads='" + use5005threads + "'" 6301$ WC "use64bitall='" + use64bitall + "'" 6302$ WC "use64bitint='" + use64bitint + "'" 6303$ WC "usecasesensitive='" + be_case_sensitive + "'" ! VMS-specific 6304$ WC "usedebugging_perl='"+use_debugging_perl+"'" 6305$ WC "usedefaulttypes='" + usedefaulttypes + "'" ! VMS-specific 6306$ WC "usecrosscompile='undef'" 6307$ WC "usedl='" + usedl + "'" 6308$ WC "usefaststdio='" + usefaststdio + "'" 6309$ WC "useieee='" + useieee + "'" ! VMS-specific 6310$ WC "useithreads='" + useithreads + "'" 6311$ WC "uselargefiles='" + uselargefiles + "'" 6312$ WC "uselongdouble='" + uselongdouble + "'" 6313$ WC "usemorebits='" + usemorebits + "'" 6314$ WC "usemultiplicity='" + usemultiplicity + "'" 6315$ WC "usemymalloc='" + usemymalloc + "'" 6316$ WC "useperlio='" + useperlio + "'" 6317$ WC "useposix='false'" 6318$ WC "usereentrant='undef'" 6319$ WC "usesecurelog='" + usesecurelog + "'" ! VMS-specific 6320$ WC "usesitecustomize='" + usesitecustomize + "'" 6321$ WC "usesocks='undef'" 6322$ WC "usethreads='" + usethreads + "'" 6323$ WC "usevendorprefix='" + "'" ! try to say no, though we'll be ignored as of MM 5.90_01 6324$ WC "usevfork='true'" 6325$ WC "usevmsdebug='" + usevmsdebug + "'" ! VMS-specific 6326$ WC "uvoformat='" + uvoformat + "'" 6327$ WC "uvsize='" + uvsize + "'" 6328$ WC "uvtype='" + uvtype + "'" 6329$ WC "uvuformat='" + uvuformat + "'" 6330$ WC "uvxformat='" + uvxformat + "'" 6331$ WC "uvXUformat='" + uvXUformat + "'" 6332$ WC "vendorarch='" + "'" 6333$ WC "vendorarchexp='" + "'" 6334$ WC "vendorbin='" + "'" 6335$ WC "vendorbinexp='" + "'" 6336$ WC "vendorlib_stem='" + "'" 6337$ WC "vendorlib='" + "'" 6338$ WC "vendorlibexp='" + "'" 6339$ WC "vendorprefix='" + "'" 6340$ WC "vendorprefixexp='" + "'" 6341$ WC "version='" + version + "'" 6342$ WC "version_patchlevel_string='" + version_patchlevel_string + "'" 6343$ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific 6344$ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific 6345$ WC "vms_ver='" + vms_ver + "'" ! VMS specific 6346$ WC "voidflags='15'" 6347$! 6348$! ## The UNIXy POSIXy reentrantey thingys ## 6349$! See "Appendix B, Version-Dependency Tables" in the C RTL 6350$! manual for when assorted _r functions became available. 6351$! 6352$ IF use_threads .AND. vms_ver .GES. "7.2" 6353$ THEN 6354$ WC "asctime_r_proto='REENTRANT_PROTO_B_SB'" 6355$ WC "d_asctime_r='define'" 6356$ WC "ctime_r_proto='REENTRANT_PROTO_B_SB'" 6357$ WC "d_ctime_r='define'" 6358$ ELSE 6359$ WC "asctime_r_proto='0'" 6360$ WC "d_asctime_r='undef'" 6361$ WC "ctime_r_proto='0'" 6362$ WC "d_ctime_r='undef'" 6363$ ENDIF 6364$ WC "d_crypt_r='undef'" 6365$ WC "d_ctermid_r='undef'" 6366$ WC "d_drand48_r='undef'" 6367$ WC "d_endgrent_r='undef'" 6368$ WC "d_endhostent_r='undef'" 6369$ WC "d_endnetent_r='undef'" 6370$ WC "d_endprotoent_r='undef'" 6371$ WC "d_endpwent_r='undef'" 6372$ WC "d_endservent_r='undef'" 6373$ WC "d_getgrent_r='undef'" 6374$ WC "d_getgrgid_r='" + d_getgrgid_r + "'" 6375$ WC "d_getgrnam_r='" + d_getgrnam_r + "'" 6376$ WC "d_gethostbyaddr_r='undef'" 6377$ WC "d_gethostbyname_r='undef'" 6378$ WC "d_gethostent_r='undef'" 6379$ WC "d_getlogin_r='undef'" 6380$ WC "d_getnetbyaddr_r='undef'" 6381$ WC "d_getnetbyname_r='undef'" 6382$ WC "d_getnetent_r='undef'" 6383$ WC "d_getprotobyname_r='undef'" 6384$ WC "d_getprotobynumber_r='undef'" 6385$ WC "d_getprotoent_r='undef'" 6386$ WC "d_getpwent_r='undef'" 6387$ WC "d_getpwnam_r='" + d_getpwnam_r + "'" 6388$ WC "d_getpwuid_r='" + d_getpwuid_r + "'" 6389$ WC "d_getservbyname_r='undef'" 6390$ WC "d_getservbyport_r='undef'" 6391$ WC "d_getservent_r='undef'" 6392$ WC "d_getspnam_r='undef'" 6393$ WC "d_gmtime_r='undef'" ! leave undef'd; we use my_gmtime 6394$ WC "d_localtime_r='undef'" ! leave undef'd; we use my_localtime 6395$ WC "d_random_r='undef'" 6396$ WC "d_readdir_r='define'" ! always defined; we roll our own 6397$ WC "d_readdir64_r='undef'" 6398$ WC "d_setgrent_r='undef'" 6399$ WC "d_sethostent_r='undef'" 6400$ WC "d_setlocale_r='undef'" 6401$ WC "d_setnetent_r='undef'" 6402$ WC "d_setprotoent_r='undef'" 6403$ WC "d_setpwent_r='undef'" 6404$ WC "d_setservent_r='undef'" 6405$ WC "d_srand48_r='undef'" 6406$ WC "d_srandom_r='undef'" 6407$ WC "d_strerror_r='undef'" 6408$ WC "d_tmpnam_r='undef'" 6409$ WC "d_ttyname_r='" + d_ttyname_r + "'" 6410$ WC "ctermid_r_proto='0'" 6411$ WC "crypt_r_proto='0'" 6412$ WC "drand48_r_proto='0'" 6413$ WC "endgrent_r_proto='0'" 6414$ WC "endhostent_r_proto='0'" 6415$ WC "endnetent_r_proto='0'" 6416$ WC "endprotoent_r_proto='0'" 6417$ WC "endpwent_r_proto='0'" 6418$ WC "endservent_r_proto='0'" 6419$ WC "getgrent_r_proto='0'" 6420$ WC "getgrgid_r_proto='" + getgrgid_r_proto + "'" 6421$ WC "getgrnam_r_proto='" + getgrnam_r_proto + "'" 6422$ WC "gethostbyaddr_r_proto='0'" 6423$ WC "gethostbyname_r_proto='0'" 6424$ WC "gethostent_r_proto='0'" 6425$ WC "getlogin_r_proto='0'" 6426$ WC "getnetbyaddr_r_proto='0'" 6427$ WC "getnetbyname_r_proto='0'" 6428$ WC "getnetent_r_proto='0'" 6429$ WC "getprotobyname_r_proto='0'" 6430$ WC "getprotobynumber_r_proto='0'" 6431$ WC "getprotoent_r_proto='0'" 6432$ WC "getpwent_r_proto='0'" 6433$ WC "getpwnam_r_proto='0'" 6434$ WC "getpwuid_r_proto='0'" 6435$ WC "getservbyname_r_proto='0'" 6436$ WC "getservbyport_r_proto='0'" 6437$ WC "getservent_r_proto='0'" 6438$ WC "getspnam_r_proto='0'" 6439$ WC "gmtime_r_proto='0'" 6440$ WC "localtime_r_proto='0'" 6441$ WC "random_r_proto='0'" 6442$ WC "readdir_r_proto='REENTRANT_PROTO_I_TSR'" ! always defined; we roll our own 6443$ WC "readdir64_r_proto='0'" 6444$ WC "setgrent_r_proto='0'" 6445$ WC "sethostent_r_proto='0'" 6446$ WC "setlocale_r_proto='0'" 6447$ WC "setnetent_r_proto='0'" 6448$ WC "setprotoent_r_proto='0'" 6449$ WC "setpwent_r_proto='0'" 6450$ WC "setservent_r_proto='0'" 6451$ WC "srand48_r_proto='0'" 6452$ WC "srandom_r_proto='0'" 6453$ WC "strerror_r_proto='0'" 6454$ WC "tmpnam_r_proto='0'" 6455$ WC "ttyname_r_proto='" + ttyname_r_proto + "'" 6456$! 6457$! ##END WRITE NEW CONSTANTS HERE## 6458$! 6459$ CLOSE CONFIG 6460$! 6461$! Okay, we've gotten here. Build munchconfig.exe 6462$ COPY/NOLOG [-.vms]munchconfig.c [] 6463$ COPY/NOLOG [-.vms]'Makefile_SH' [] 6464$ 'Perl_CC' munchconfig.c 6465$ IF Needs_Opt 6466$ THEN 6467$ OPEN/WRITE CONFIG []munchconfig.opt 6468$ IF ccname .EQS. "GCC" 6469$ THEN 6470$ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library" 6471$ ENDIF 6472$ WRITE CONFIG "Sys$Share:VAXCRTL/Share" 6473$ CLOSE CONFIG 6474$ 'ld' munchconfig.obj,munchconfig.opt/opt 6475$ DELETE/NOLOG/NOCONFIRM munchconfig.opt; 6476$ ELSE 6477$ 'ld' munchconfig.obj 6478$ ENDIF 6479$ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj; 6480$ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c; 6481$ IF ccname .EQS. "CXX" 6482$ THEN 6483$ CALL Cxx_demangler_cleanup 6484$ ENDIF 6485$! 6486$ IF alldone .EQS. "" 6487$ THEN 6488$ cat4 SYS$INPUT: 6489$ DECK 6490 6491If you'd like to make any changes to the config.sh file before I begin 6492to configure things, answer yes to the following question. 6493 6494$ EOD 6495$ bool_dflt="n" 6496$ rp="Do you wish to edit ''basename_config_sh'? [''bool_dflt'] " 6497$ GOSUB myread 6498$ IF ans 6499$ THEN 6500$ echo4 "" 6501$ echo4 "Be sure to type LOGOUT after you have edited the file," 6502$ echo4 "then this procedure will resume." 6503$ echo4 "" 6504$ default = F$ENVIRONMENT("DEFAULT") 6505$ DIRECTORY 'config_sh' 6506$ SET DEFAULT [-] 6507$ SPAWN/WAIT 6508$ SET DEFAULT 'default' 6509$ ENDIF 6510$ ENDIF 6511$! 6512$ echo "" 6513$ echo4 "Adding ''osname' specific preprocessor commands." 6514$ ! 6515$ ! we need an fdl file 6516$ CREATE [-]CONFIG.FDL 6517$ DECK 6518RECORD 6519 FORMAT STREAM_LF 6520$ EOD 6521$ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL 6522$ ! First spit out the header info with the local defines (to get 6523$ ! around the 255 character command line limit) 6524$ OPEN/APPEND CONFIG [-]config.local 6525$ IF use_debugging_perl THEN WC "#define DEBUGGING" 6526$ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE" 6527$ IF mymalloc THEN WC "#define EMBEDMYMALLOC" 6528$ IF use_pack_malloc THEN WC "#define PACK_MALLOC" 6529$ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS" 6530$ IF ccname .EQS. "GCC" THEN WC "#define GNUC_ATTRIBUTE_CHECK" 6531$ IF (Has_Dec_C_Sockets) 6532$ THEN 6533$ WC "#define VMS_DO_SOCKETS" 6534$ WC "#define DECCRTL_SOCKETS" 6535$ ELSE 6536$ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS" 6537$ ENDIF 6538$! This is VMS-specific for now 6539$ WC "#''d_setenv' HAS_SETENV" 6540$ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV" 6541$ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES" 6542$ IF use64bitint .OR. use64bitint .EQS. "define" 6543$ THEN 6544$ WC "#define USE_64_BIT_INT" 6545$ WC "#define USE_LONG_DOUBLE" 6546$ ENDIF 6547$ IF use64bitall .OR. use64bitall .EQS. "define" THEN - 6548 WC "#define USE_64_BIT_ALL" 6549$ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE" 6550$ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO" 6551$ WC "#define HAS_ENVGETENV" 6552$ WC "#define PERL_EXTERNAL_GLOB" 6553$ IF archname .EQS. "VMS_VAX" .AND. - 6554 ccname .EQS. "DEC" .AND. - 6555 ccversion .LE. 50390006 6556$ THEN 6557$! Alas this does not help to build Fcntl 6558$! WC "#define PERL_IGNORE_FPUSIG SIGFPE" 6559$ ENDIF 6560$ IF kill_by_sigprc .EQS. "define" then WC "#define KILL_BY_SIGPRC" 6561$ IF unlink_all_versions .OR. unlink_all_versions .EQS. "define" THEN - 6562 WC "#define UNLINK_ALL_VERSIONS" 6563$ CLOSE CONFIG 6564$! 6565$ echo4 "Doing variable substitutions on .SH files..." 6566$ echo4 "Extracting config.h (with variable substitutions)" 6567$! 6568$! Now build the normal config.h 6569$ DEFINE/USER_MODE sys$output [-]config.main 6570$ mcr []munchconfig 'config_sh' [-]config_h.sh 6571$ ! Concatenate them together 6572$ copy [-]config.local,[-]config.main [-]config.h 6573$! Clean up 6574$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.MAIN;* 6575$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.LOCAL;* 6576$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;* 6577$! 6578$ IF ccname .EQS. "DEC" 6579$ THEN 6580$ DECC_REPLACE = "DECC=decc=1" 6581$ ELSE 6582$ DECC_REPLACE = "DECC=" 6583$ ENDIF 6584$ IF ccname .EQS. "CXX" 6585$ THEN 6586$ DECCXX_REPLACE = "DECCXX=DECCXX=1" 6587$ ELSE 6588$ DECCXX_REPLACE = "DECCXX=" 6589$ ENDIF 6590$ IF ccname .EQS. "GCC" 6591$ THEN 6592$ GNUC_REPLACE = "GNUC=gnuc=1" 6593$ ELSE 6594$ GNUC_REPLACE = "GNUC=" 6595$ ENDIF 6596$ IF Has_Dec_C_Sockets 6597$ THEN 6598$ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1" 6599$ ELSE 6600$ IF Has_Socketshr 6601$ THEN 6602$ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1" 6603$ ELSE 6604$ SOCKET_REPLACE = "SOCKET=" 6605$ ENDIF 6606$ ENDIF 6607$ IF use_threads 6608$ THEN 6609$ IF (vms_ver .LES. "6.2") 6610$ THEN 6611$ THREAD_REPLACE = "THREAD=OLDTHREADED=1" 6612$ ELSE 6613$ THREAD_REPLACE = "THREAD=THREADED=1" 6614$ ENDIF 6615$ ELSE 6616$ THREAD_REPLACE = "THREAD=" 6617$ ENDIF 6618$ IF mymalloc 6619$ THEN 6620$ MALLOC_REPLACE = "MALLOC=MALLOC=1" 6621$ ELSE 6622$ MALLOC_REPLACE = "MALLOC=" 6623$ ENDIF 6624$ IF uselargefiles .OR. uselargefiles .EQS. "define" 6625$ THEN 6626$! Perl can not use _USE_STD_STAT at the moment 6627$! IF d_symlink .or. d_symlink .eqs. "define" 6628$! THEN 6629$! LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_USE_STD_STAT=1" 6630$! ELSE 6631$ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_LARGEFILE=1" 6632$! ENDIF 6633$ ELSE 6634$ LARGEFILE_REPLACE = "LARGEFILE=" 6635$ ENDIF 6636$ echo4 "Extracting ''defmakefile' (with variable substitutions)" 6637$ DEFINE/USER_MODE sys$output 'UUmakefile' 6638$ mcr []munchconfig 'config_sh' 'Makefile_SH' "''DECC_REPLACE'" "''DECCXX_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" - 6639"''SOCKET_REPLACE'" "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" - 6640"''Thread_Live_Dangerously'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'" "''LARGEFILE_REPLACE'" 6641$! Clean up after ourselves 6642$ DELETE/NOLOG/NOCONFIRM []munchconfig.exe; 6643$! 6644$ echo4 "Extracting make_ext.com (without variable substitutions)" 6645$ Create Sys$Disk:[-]make_ext.com 6646$ Deck/Dollar="$EndOfTpl$" 6647$!++ make_ext.com 6648$! NOTE: This file is extracted as part of the VMS configuration process. 6649$! Any changes made to it directly will be lost. If you need to make any 6650$! changes, please edit the template in Configure.Com instead. 6651$ def = F$Environment("Default") 6652$! p1 - how to invoke miniperl (passed in from descrip.mms) 6653$ p1 = F$Edit(p1,"Upcase,Compress,Trim") 6654$ If F$Locate("MCR ",p1).eq.0 Then p1 = F$Extract(3,255,p1) 6655$ miniperl = "$" + F$Search(F$Parse(p1,".Exe")) 6656$! p2 - how to invoke local make utility (passed in from descrip.mms) 6657$ makeutil = p2 6658$ if f$type('p2') .nes. "" then makeutil = 'p2' 6659$! p3 - make target (passed in from descrip.mms) 6660$ targ = F$Edit(p3,"Lowercase") 6661$ sts = 1 6662$ extensions = "" 6663$ open/read CONFIG config.sh 6664$ find_ext_loop: 6665$ read/end=end_ext_loop CONFIG line 6666$ if (f$extract(0,12,line) .NES. "extensions='") 6667$ then goto find_ext_loop 6668$ else extensions = f$extract(12,f$length(line),line) - "'" 6669$ endif 6670$ end_ext_loop: 6671$ close CONFIG 6672$ extensions = f$edit(extensions,"TRIM,COMPRESS") 6673$ i = 0 6674$ next_ext: 6675$ ext = f$element(i," ",extensions) 6676$ If ext .eqs. " " .or. ext .eqs. "" Then Goto done 6677$ Define/User_mode Perl_Env_Tables CLISYM_LOCAL 6678$ miniperl 6679$ deck 6680 ($extdir = $ENV{'ext'}) =~ s/::/./g; 6681 $extdir =~ s#/#.#g; 6682 if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; } 6683 else { $extdir = ".ext.$extdir"; } 6684 ($ENV{'extdir'} = "[$extdir]"); 6685 ($ENV{'up'} = ('-') x ($extdir =~ tr/././)); 6686$ eod 6687$ Set Default &extdir 6688$ redesc = 0 6689$ If F$Locate("clean",targ) .eqs. F$Length(targ) 6690$ Then 6691$ Write Sys$Output "" 6692$ Write Sys$Output " Making ''ext' (dynamic)" 6693$ On Error Then Goto done 6694$ If F$Search("Descrip.MMS") .eqs. "" 6695$ Then 6696$ redesc = 1 6697$ Else 6698$ If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. - 6699 F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1 6700$ EndIf 6701$ Else 6702$ Write Sys$Output "''targ'ing ''ext' . . ." 6703$ On Error Then Continue 6704$ EndIf 6705$ If redesc Then - 6706 miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]" "PERL_CORE=1" 6707$ makeutil 'targ' 6708$ i = i + 1 6709$ Set Def &def 6710$ Goto next_ext 6711$ done: 6712$ sts = $Status 6713$ Set Def &def 6714$ Exit sts 6715$!-- make_ext.com 6716$EndOfTpl$ 6717$! 6718$! Note that the /key qualifier to search, as in: 6719$! search README.* "=head"/key=(position=1)/window=0/output=extra.pods 6720$! is not supported on VMS V5.5-2, hence not used in extra_pods.com. 6721$! 6722$ echo4 "Extracting extra_pods.com (without variable substitutions)" 6723$ Create Sys$Disk:[-]extra_pods.com 6724$ Deck/Dollar="$EOExtra_Pods$" 6725$!++ extra_pods.com 6726$! NOTE: This file is extracted as part of the VMS configuration process. 6727$! Any changes made to it directly will be lost. If you need to make any 6728$! changes, please edit the template in Configure.Com instead. 6729$! Use FORCE if you've just podified a README.* file on VMS. 6730$ if f$search("extra.pods") .eqs. "" .or. P1 .eqs. "FORCE" then - 6731 search README.* "=head"/window=0/output=extra.pods 6732$ open/read/error=extra_close EXTRA extra.pods 6733$extra_loop: 6734$ read/error=extra_close/END_OF_FILE=extra_close EXTRA file 6735$ file_type = f$edit(f$parse(file,,,"TYPE",),"LOWERCASE") - "." 6736$ if file_type .nes. "VMS" .and. file_type .nes. "vms" 6737$ then 6738$ pod_file = "[.pod]perl''file_type'.pod" 6739$ file = file - "''f$parse(file,,,"VERSION",)'" 6740$ if p1 .eqs. "CLEAN" 6741$ then if f$search(pod_file) .nes. "" then delete/log 'pod_file';* 6742$ else 6743$ do_copy := false 6744$ if f$search(pod_file) .eqs. "" 6745$ then do_copy := true 6746$ else 6747$ file_rdt = f$cvtime(f$file_attributes(file,"RDT")) 6748$ pod_file_rdt = f$cvtime(f$file_attributes(pod_file,"RDT")) 6749$ if file_rdt .GTS. pod_file_rdt then do_copy := true 6750$ endif 6751$ ! wacky method to preserve case on ODS-5 even when parse style is traditional 6752$ if do_copy then mcr sys$disk:[]miniperl.exe -e "exit 0+$^E unless File::Copy::rmscopy(q{''file'}, q{''pod_file'});" 6753$ endif 6754$ endif 6755$ goto extra_loop 6756$extra_close: 6757$ close EXTRA 6758$ if p1 .eqs. "CLEAN" .and. f$search("extra.pods;-1") .nes. "" then - 6759 purge/nolog extra.pods 6760$!-- extra_pods.com 6761$EOExtra_Pods$ 6762$! 6763$! Warn of dangerous symbols or logical names 6764$! 6765$Bad_environment: SUBROUTINE 6766$ Bad_env = "" 6767$ IF p2 .eqs. "SYMBOL" 6768$ THEN 6769$ IF f$type('p1') .nes. "" THEN Bad_env := SYMBOL 6770$ ELSE 6771$ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL 6772$ ENDIF 6773$ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL" 6774$ THEN 6775$ IF f$search("config.msg") .nes. "" 6776$ THEN 6777$ OPEN/APPEND CONFIG config.msg 6778$ ELSE 6779$ OPEN/WRITE CONFIG config.msg 6780$ ENDIF 6781$ IF Bad_env .eqs. "SYMBOL" 6782$ THEN 6783$ WRITE CONFIG "" 6784$ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1 6785$ WRITE CONFIG " delete before building ''package' via:" 6786$ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'" 6787$ IF f$locate("""",&p1) .ge. f$length(&p1) 6788$ THEN 6789$ WRITE CONFIG " after building, testing, and installing ''package'" 6790$ WRITE CONFIG " restore the symbol with:" 6791$ WRITE CONFIG " $ ''p1' == """ + &p1 + """" 6792$ ENDIF 6793$ ENDIF 6794$ IF Bad_env .eqs. "LOGICAL" 6795$ THEN 6796$ WRITE CONFIG "" 6797$ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1) 6798$ WRITE CONFIG " deassign before building ''package'" 6799$ ENDIF 6800$ CLOSE CONFIG 6801$ Bad_env = "" 6802$ ENDIF 6803$ EXIT 6804$ ENDSUBROUTINE ! Bad_environment 6805$ echo "" 6806$ echo4 "Checking for dangerous pre-existing global symbols and logical names." 6807$ CALL Bad_environment "COMP" 6808$ CALL Bad_environment "EXT" 6809$ CALL Bad_environment "FOO" 6810$ CALL Bad_environment "LIB" 6811$ CALL Bad_environment "LIST" 6812$ CALL Bad_environment "MIME" 6813$ CALL Bad_environment "POSIX" 6814$ CALL Bad_environment "SYS" 6815$ CALL Bad_environment "T" 6816$ CALL Bad_environment "THREAD" 6817$ CALL Bad_environment "THREADS" 6818$ CALL Bad_environment "TIME" 6819$ CALL Bad_environment "TMP" 6820$ CALL Bad_environment "UNICODE" 6821$ CALL Bad_environment "UTIL" 6822$ CALL Bad_environment "TEST" "SYMBOL" 6823$ IF f$search("config.msg") .eqs. "" THEN echo "OK." 6824$! 6825$! %Config-I-VMS, write perl_setup.com here 6826$! 6827$ IF (.NOT.perl_symbol) 6828$ THEN 6829$ file_2_find = "[-]''packageup'.cld" 6830$ echo "" 6831$ echo4 "The perl.cld file is now being written..." 6832$ OPEN/WRITE CONFIG 'file_2_find' 6833$ ext = ".exe" 6834$ IF (sharedperl .AND. F$EXTRACT(0,7,archname) .EQS. "VMS_AXP") THEN ext := .AXE 6835$ IF (sharedperl .AND. F$EXTRACT(0,8,archname) .EQS. "VMS_IA64") THEN ext := .IXE 6836$ IF (use_vmsdebug_perl) 6837$ THEN 6838$ WRITE CONFIG "define verb dbgperl" 6839$ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'") 6840$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)") 6841$ WRITE CONFIG "" 6842$ WRITE CONFIG "define verb perl" 6843$ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'") 6844$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)") 6845$ ELSE 6846$ WRITE CONFIG "define verb perl" 6847$ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'") 6848$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)") 6849$ ENDIF 6850$ CLOSE CONFIG 6851$ ENDIF ! (.NOT.perl_symbol) 6852$ echo "" 6853$ echo4 "The perl_setup.com file is now being written..." 6854$ file_2_find = "[-]perl_setup.com" 6855$! 6856$! Folks are likely to want to edit perl_setup.com. 6857$! STMLF RFM plays nicer with ported editors than does VFC. 6858$! 6859$ CREATE [-]CONFIG.FDL 6860$ DECK 6861RECORD 6862 FORMAT STREAM_LF 6863$ EOD 6864$ CREATE /FDL=[-]CONFIG.FDL 'file_2_find' 6865$ OPEN/APPEND CONFIG 'file_2_find' 6866$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL; 6867$ WRITE CONFIG "$!" 6868$ WRITE CONFIG "$! Perl_Setup.com ''cf_time'" 6869$ IF cf_email.NES.perladmin 6870$ THEN 6871$ WRITE CONFIG "$! perl configured by ''cf_email'" 6872$ ELSE 6873$ WRITE CONFIG "$! This perl configured & administered by ''perladmin'" 6874$ ENDIF 6875$ WRITE CONFIG "$!" 6876$! HP hack to make distributing binaries easier 6877$!---------------------------------------------- 6878$ pcsi_producer = f$trnlnm("PCSI_PRODUCER") 6879$ if pcsi_producer .eqs. "" 6880$ then 6881$ prefix = prefix - "000000." 6882$ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN prefix = prefix - "]" + ".]" 6883$ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'" 6884$ else 6885$ WRITE CONFIG "$ myproc = f$environment(""PROCEDURE"")" 6886$ WRITE CONFIG "$ myroot_dev = f$parse(myproc,,,""DEVICE"",""NO_CONCEAL"")" 6887$ WRITE CONFIG "$ myroot_dir = f$parse(myproc,,,""DIRECTORY"",""NO_CONCEAL"")" 6888$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000."" - ""><000000.""" 6889$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000]"" - ""><000000>""" 6890$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""]["" - ""><""" 6891$ WRITE CONFIG "$ myroot_dir = myroot_dir - "".]"" - "".>"" - ""["" - ""]"" - ""<"" - "">""" 6892$ WRITE CONFIG "$ if f$trnlnm(""HP_BUILD_PERL_BIN_KIT"",""LNM$PROCESS_TABLE"") .EQS. """"" 6893$ WRITE CONFIG "$ then" 6894$ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' 'myroot_dev'['myroot_dir'.]" 6895$ WRITE CONFIG "$ endif" 6896$ endif 6897$ 6898$ prefix = prefix - "000000." 6899$ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN prefix = prefix - "]" + ".]" 6900$ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'" 6901 6902 6903$ WRITE CONFIG "$ ext = "".exe""" 6904$ IF sharedperl 6905$ THEN 6906$ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 2 then ext = "".AXE""" 6907$ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 3 then ext = "".IXE""" 6908$ ENDIF 6909$ IF (perl_symbol) 6910$ THEN 6911$ perl_setup_perl = "'" + "'perl'" ! triple quoted foreign command symbol 6912$ IF (use_vmsdebug_perl) 6913$ THEN 6914$ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgperl'ext'" 6915$ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgperl'ext'" 6916$ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'" 6917$ ELSE 6918$ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'" 6919$ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'" 6920$ ENDIF 6921$ ELSE ! .NOT.perl_symbol 6922$ perl_setup_perl = "perl" ! command verb 6923$ IF (use_vmsdebug_perl) 6924$ THEN 6925$ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'" 6926$ ELSE 6927$ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'" 6928$ ENDIF 6929$ IF perl_verb .EQS. "PROCESS" 6930$ THEN 6931$ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD" 6932$ ENDIF 6933$ ENDIF ! perl_symbol 6934$ WRITE CONFIG "$ define/nolog pod2text ''vms_prefix':[lib.pod]pod2text.com" 6935$ WRITE CONFIG "$ define/nolog pod2html ''vms_prefix':[lib.pod]pod2html.com" 6936$ WRITE CONFIG "$ define/nolog pod2man ''vms_prefix':[lib.pod]pod2man.com" 6937$! 6938$ IF (tzneedset) 6939$ THEN 6940$ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'" 6941$ ELSE !leave in but commented out (in case setting was from perl :-) 6942$ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'" 6943$ ENDIF 6944$ WRITE CONFIG "$!" 6945$ WRITE CONFIG "$! Symbols for commonly used programs:" 6946$ WRITE CONFIG "$!" 6947$ WRITE CONFIG "$ c2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]c2ph.com""" 6948$ WRITE CONFIG "$ cpan == """ + perl_setup_perl + " ''vms_prefix':[utils]cpan.com""" 6949$ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions) 6950$ THEN 6951$ WRITE CONFIG "$ dprofpp == """ + perl_setup_perl + " ''vms_prefix':[utils]dprofpp.com""" 6952$ ENDIF 6953$ WRITE CONFIG "$ enc2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]enc2xs.com""" 6954$ WRITE CONFIG "$ find2perl == """ + perl_setup_perl + " ''vms_prefix':[utils]find2perl.com""" 6955$ WRITE CONFIG "$ h2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]h2ph.com""" 6956$ WRITE CONFIG "$ h2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]h2xs.com""" 6957$ WRITE CONFIG "$ instmodsh == """ + perl_setup_perl + " ''vms_prefix':[utils]instmodsh.com""" 6958$ WRITE CONFIG "$ libnetcfg == """ + perl_setup_perl + " ''vms_prefix':[utils]libnetcfg.com""" 6959$ WRITE CONFIG "$ perlbug == """ + perl_setup_perl + " ''vms_prefix':[lib]perlbug.com""" 6960$ WRITE CONFIG "$!perlcc == """ + perl_setup_perl + " ''vms_prefix':[utils]perlcc.com""" 6961$ WRITE CONFIG "$ perldoc == """ + perl_setup_perl + " ''vms_prefix':[lib.pods]perldoc.com -t""" 6962$ WRITE CONFIG "$ perlivp == """ + perl_setup_perl + " ''vms_prefix':[utils]perlivp.com""" 6963$ WRITE CONFIG "$ piconv == """ + perl_setup_perl + " ''vms_prefix':[utils]piconv.com""" 6964$ WRITE CONFIG "$ pl2pm == """ + perl_setup_perl + " ''vms_prefix':[utils]pl2pm.com""" 6965$ WRITE CONFIG "$ pod2html == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2html""" 6966$ WRITE CONFIG "$ pod2latex == """ + perl_setup_perl + " ''vms_prefix':[lib.pod]pod2latex.com""" 6967$ WRITE CONFIG "$ pod2text == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2text""" 6968$ WRITE CONFIG "$!pod2man == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2man""" 6969$ WRITE CONFIG "$ pod2usage == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2usage.com""" 6970$ WRITE CONFIG "$ podchecker == """ + perl_setup_perl + " ''vms_prefix':[utils]podchecker.com""" 6971$ WRITE CONFIG "$ podselect == """ + perl_setup_perl + " ''vms_prefix':[utils]podselect.com""" 6972$ WRITE CONFIG "$ prove == """ + perl_setup_perl + " ''vms_prefix':[utils]prove.com""" 6973$ WRITE CONFIG "$ psed == """ + perl_setup_perl + " ''vms_prefix':[utils]psed.com""" 6974$ WRITE CONFIG "$ pstruct == """ + perl_setup_perl + " ''vms_prefix':[utils]pstruct.com""" 6975$ WRITE CONFIG "$ s2p == """ + perl_setup_perl + " ''vms_prefix':[utils]s2p.com""" 6976$ WRITE CONFIG "$ splain == """ + perl_setup_perl + " ''vms_prefix':[utils]splain.com""" 6977$ WRITE CONFIG "$ xsubpp == """ + perl_setup_perl + " ''vms_prefix':[utils]xsubpp.com""" 6978$ CLOSE CONFIG 6979$! 6980$ echo "" 6981$ echo "The file can be found at:" 6982$ echo4 " ''F$SEARCH(file_2_find)'" 6983$ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM" 6984$ echo "when you are satisfied with a successful compilation," 6985$ echo "testing, and installation of your perl." 6986$ echo "" 6987$ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES")) 6988$ THEN 6989$ file_2_find = "[-]''packageup'_install.com" 6990$ OPEN/WRITE CONFIG 'file_2_find' 6991$ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -" 6992$ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe" 6993$ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe" 6994$ CLOSE CONFIG 6995$ echo4 "" 6996$ echo4 "In order to install the ''packageup' verb into DCLTABLES run:" 6997$ echo4 " @ ''F$SEARCH(file_2_find)'" 6998$ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege." 6999$ echo4 "" 7000$ ENDIF 7001$! 7002$!figure out where we "are" by parsing 'vms_default_directory_name' 7003$! 7004$ set_def_command = "" 7005$ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]" 7006$ tmp = vms_default_directory_name - dflt - "]" 7007$ i = 0 7008$ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop 7009$Set_def_loop: 7010$ tmp1 = F$ELEMENT(i,".",tmp) 7011$ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop 7012$ IF i .EQ. 0 7013$ THEN set_def_command = "set default [-" 7014$ ELSE set_def_command = set_def_command + "-" 7015$ ENDIF 7016$ i = i + 1 7017$ GOTO Set_def_loop 7018$Beyond_set_def_loop: 7019$ IF set_def_command.NES."" 7020$ THEN 7021$ set_def_command = set_def_command - "-" + "]" 7022$ echo4 "" 7023$ echo4 "In order to build ''package' you must now issue the commands:" 7024$ echo4 "" 7025$ echo4 " ''set_def_command'" 7026$ ELSE 7027$ echo4 "" 7028$ echo4 "In order to build ''package' you must now issue the command:" 7029$ echo4 "" 7030$ ENDIF 7031$ echo4 " ''make'''makefile'", macros 7032$ echo4 "" 7033$! 7034$ IF ( F$SEARCH("config.msg").NES."" ) 7035$ THEN 7036$ echo4 "Hmm. I also noted the following information while running:" 7037$ echo4 "" 7038$ TYPE/OUTPUT=SYS$ERROR: config.msg 7039$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg 7040$ DELETE/NOLOG/NOCONFIRM config.msg; 7041$ ENDIF 7042$! 7043$Clean_up: 7044$ SET NOON 7045$ IF (silent) 7046$ THEN 7047$ CLOSE/NOLOG STDOUT 7048$ DEASSIGN SYS$OUTPUT 7049$ ENDIF 7050$ CLOSE/NOLOG CONFIG 7051$ IF F$GETJPI("","FILCNT").GT.vms_filcnt 7052$ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open" 7053$ ENDIF 7054$ dflt = F$ENVIRONMENT("DEFAULT") 7055$ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3) 7056$ THEN 7057$ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;* 7058$ SET DEFAULT [-] 7059$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR 7060$ DELETE/NOLOG/NOCONFIRM UU.DIR; 7061$ ENDIF 7062$ SET DEFAULT 'vms_default_directory_name' !be kind rewind 7063$ EXIT 7064$!: End of Configure 7065