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