1 $! OpenVMS configuration procedure for Perl -- do not attempt to run under DOS
2 $ sav_ver = 'F$VERIFY(0)'
3 $ on control_y then goto clean_up
6 $! For example, if you unpacked perl into: [USER.PERL-5n...] then you will
7 $! want to cd into the tree and execute Configure:
9 $! $ SET DEFAULT [USER.PERL5_xxx]
14 $! $ SET DEFAULT [USER.PERL5_xxx]
15 $! $ @Configure "-des"
17 $! That's it. If you get into a bind trying to build perl on VMS then
18 $! definitely read through the README.VMS file.
19 $! Beyond that send email to vmsperl@perl.org
21 $! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 $! send suggestions to:
24 $! Dan Sugalski <dan@sidhe.org>
27 $! Adapted and converted from Larry Wall & Andy Dougherty's
28 $! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer
29 $! (a Bourne sh[ell] script for configuring the installation of perl
30 $! on non-VMS systems) in the perl5.002|3 epoch (spring/summer 1996)
31 $! with much valuable help from Charles Bailey &
32 $! the whole VMSPerl crew.
33 $! Extended and messed about with by Dan Sugalski
35 $! VMS-isms we will need:
36 $ echo = "write sys$output "
38 $ delete := delete ! local symbol overrides globals with qualifiers
46 $ be_case_sensitive = "n"
47 $ unlink_all_versions = "n"
49 $ use_vmsdebug_perl = "n"
55 $ usesitecustomize = "n"
56 $ C_Compiler_Replace = "CC="
57 $ thread_upcalls = "MTU="
58 $ thread_kernel = "MTK="
59 $ use_two_pot_malloc = "N"
60 $ use_pack_malloc = "N"
61 $ use_debugmalloc = "N"
66 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
67 $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx]
68 $! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx]
70 $! Sebastian Bazley's request: close the CONFIG handle with /NOLOG
71 $! qualifier "just in case" (configure.com is re @ed in a bad state).
72 $! This construct was tested to be not a problem as far back as
73 $! VMS V5.5-2, hopefully earlier versions are OK as well.
77 $! Now keep track of open files
79 $ vms_filcnt = F$GETJPI ("","FILCNT")
81 $!: compute my invocation name
82 $ me = F$ENVIRONMENT("PROCEDURE")
84 $! Many null statements (begin with colon ':') in the Bourne shell version of
85 $! this script serve as comments/placeholders. I have retained some of the ones
86 $! that will help you compare this .COM file to the sh version - as well as
87 $! leave placeholders for future improvements to this .COM file.
88 $! sfn = VMS "skipped for now"
90 $!: Proper PATH separator !sfn
91 $!: Proper PATH setting !sfn
92 $!: Sanity checks !sfn "Say '@''$me''"
93 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
94 $!: Configure runs within the UU subdirectory !->after find MANIFEST
95 $! <big long list of default values (mostly null)>
96 $!: We must find out about Eunice early !(?)
97 $!: list of known cpp symbols, sorted alphabetically !sfn
99 $!: default library list !sfn
100 $! <no hints files in use (yet?)>
101 $!: Extra object files, if any, needed on this platform. !sfn
102 $!: Possible local include directories to search. !sfn
103 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
104 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
105 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
106 $!: no include file wanted by default !sfn
108 $!: Possible local library directories to search. !sfn
109 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
110 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
111 $!: general looking path for locating libraries !sfn
112 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
113 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
114 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
115 $!: Private path used by Configure to find libraries. Its value !sfn
116 $!: is prepended to libpth. This variable takes care of special !sfn
117 $!: machines, like the mips. Usually, it should be empty. !sfn
119 $!: full support for void wanted by default !sfn
120 $!defvoidused=15 !sfn
121 $!: List of libraries we want. !sfn
122 $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
123 $!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
124 $!libswanted="$libswanted ucb bsd BSD PW x" !sfn
125 $!: We probably want to search /usr/shlib before most other libraries. !sfn
126 $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
127 $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
128 $!glibpth="/usr/shlib $glibpth" !sfn
129 $!: Do not use vfork unless overridden by a hint file. !sfn
130 $!usevfork=false !sfn
131 $!: script used to extract .SH files with variable substitutions !sfn
132 $!: produce awk script to parse command line options !sfn
133 $!sfn (assume no sed awk) see below
134 $!: process the command line options
136 $!: set up default values
140 $ IF F$TYPE(config_sh) .EQS. "" THEN config_sh=""
151 $ use_5005_threads = "N"
157 $ THEN !one or more switches was thrown
164 $ config_args = config_args + F$FAO(" !AS",P'i')
167 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
171 $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
172 $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
173 $Remove_quotation_mark:
175 $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
176 $ gotopt = "f" !"alse"
177 $ gotshortopt = "f" !"alse"
178 $ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
181 $ gotopt = "t" !"rue"
183 $ gotshortopt = "t" !"rue"
185 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
192 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f"
196 $ IF (F$SEARCH(config_sh).NES."")
198 $ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
199 $ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
202 $ CONTINUE !at this point check UIC && if test allows...
205 $ echo "''me': cannot read config file ''config_sh'."
209 $ echo "''me': cannot read config file ''config_sh'."
214 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h"
221 $ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m"
228 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r"
235 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s"
242 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E"
247 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K"
254 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O"
261 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S"
263 $ extractsh = "true" !VMS? Yes with munchconfig
268 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D"
271 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
273 $ tmp = P'i' + "=""define"""
277 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
279 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
280 $ echo "''me': use ""-Usymbol=val"" not ""-Dsymbol=""."
281 $ echo "''me': ignoring -D",P'i'
283 $ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')
284 $ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """"
291 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U"
294 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
296 $ tmp = P'i' + "="""""
300 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
302 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
303 $ echo "''me': use ""-Dsymbol=val"" not ""-Usymbol=val""."
304 $ echo "''me': ignoring -U",P'i'
306 $ tmp = P'i' + "=""undef"""
313 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
315 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
316 $ echo "''me' generated by an unknown version of EDT."
322 $ echo "''me': unknown option ",P'i'
325 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
327 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
329 $ ENDIF ! (P1 .NES. "")
330 $ config_args = F$EDIT(config_args,"TRIM")
334 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
335 $ echo "Usage: @''me' [-dehmr""EKOSV""] [-fconfig.sh] [""-Dsymbol""] [""-Dsymbol=value""]"
336 $ echo " [-Usymbol] [-Usymbol=]"
339 "-d" : use defaults for all answers.
340 "-e" : go on without questioning past the production of config.sh. *
341 "-f" : specify an alternate default configuration file.
342 "-h" : print this help message and exit (with an error status).
343 "-m" : skip the MANIFEST check to see that all files are present
344 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
345 "-s" : silent mode, only echoes questions and essential information.
346 -"D" : define symbol to have some value: *
347 -"Dsymbol" symbol gets the value 'define'
348 -"Dsymbol=value" symbol gets the value 'value'
349 -E : stop at the end of questions, after having produced config.sh. *
350 -K : do not use unless you know what you are doing.
351 -O : let -D and -U override definitions from loaded configuration file. *
352 -S : perform variable substitutions on all .SH files (can mix with -f) *
353 -"U" : undefine symbol: *
354 -"Usymbol" symbol gets the value 'undef'
355 -"Usymbol=" symbol gets completely empty
356 -V : print version number and exit (with a zero status).
358 $ echo "%Config-I-VMS, lower case switches must be enclosed"
359 $ echo "-Config-I-VMS, in double quotation marks, e.g.:"
360 $ echo "-Config-I-VMS, @Configure ""-des"""
361 $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
362 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
364 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
370 $ IF F$Mode() .eqs. "BATCH"
372 $ x = F$GETQUI("CANCEL_OPERATION") ! clear the deck
374 $ bproc_queue = f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*",x)
375 $ bproc_entry = f$getqui("DISPLAY_JOB","ENTRY_NUMBER",,x)
376 $ bproc_name = f$getqui("DISPLAY_JOB","JOB_NAME",,x)
377 $ bproc_log_spec = f$getqui("DISPLAY_JOB","LOG_SPECIFICATION",,x)
378 $ STDOUT = F$PARSE(bproc_name, bproc_log_spec, ".LOG")
379 $ WRITE SYS$OUTPUT "Writing output of entry ''bproc_entry' in queue ''bproc_queue' to a new version of: "
380 $ WRITE SYS$OUTPUT STDOUT
382 $ DELETE_/SYMBOL bproc_queue
383 $ DELETE_/SYMBOL bproc_entry
384 $ DELETE_/SYMBOL bproc_name
385 $ DELETE_/SYMBOL bproc_log_spec
387 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
389 $ DEFINE SYS$OUTPUT "_NLA0:"
390 $ echo4 = "write STDOUT "
391 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
392 $ open/write/share=read STDOUT 'STDOUT'
400 $ echo4 = "write SYS$OUTPUT "
404 $!: run the defines and the undefines, if any, but leave the file out there...
405 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
410 $ packageup = F$EDIT((package - "5"),"UPCASE")
412 $!: Eunice requires " " instead of "", can you believe it
415 $ echo "Beginning of configuration questions for ''package'."
418 $!: Some greps do not return status, grrr.
419 $ contains = "SEARCH"
421 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
422 $! echo "Checking ''echo' to see how to suppress newlines..."
423 $! echo "giving up..."
424 $! echo "The star should be here-->*"
426 $!: Now test for existence of everything in MANIFEST
428 $ echo4 "First let's make sure your kit is complete. Checking..."
431 $! Here I assume we are in the [foo.PERLxxx...] tree
432 $! because the search routine simply does set def [-] if necessary.
433 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
435 $ manifestfound = F$SEARCH(file_2_find)
436 $ IF (manifestfound .EQS. "")
438 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
441 $ GOTO Research_manifest
444 $ echo "There is no MANIFEST file. I hope your kit is complete !"
446 $ GOTO Beyond_manifest
449 $! MANIFEST. has been found and we have set def'ed there.
450 $! Time to bail out before it's too late, i.e. too deep.
451 $! Depth check is unnecessary on Alpha VMS V7.2++ (even for ODS-2).
452 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
453 $ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
454 $! Depth check also unnecessary on ODS 5 (or later) file systems.
455 $ tmp = F$INTEGER(F$GETDVI(F$ENVIRONMENT("DEFAULT"),"ACPTYPE") - "F11V")
456 $ IF (tmp .GE. 5) THEN GOTO Beyond_depth_check
457 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("DEFAULT")).nes.".")
461 %Config-E-VMS, ERROR:
462 Sorry! It apears as though your perl build sub-directory is already too
463 deep into the VMS file system. Please try moving stuff into a shallower
464 directory (or altering the "max_allowed_dir_depth" parameter).
466 $ echo4 "ABORTING..."
467 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
469 $ EXIT !2 !$STATUS = "%X00000002" (error)
473 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
475 $ IF (manifestfound .NES. "")
477 $ IF ( F$SEARCH("UU.DIR").EQS."" )
479 $ CREATE/DIRECTORY [.UU]
481 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM [.UU]*.*;*
483 $!: Configure runs within the UU subdirectory
486 $! a little redundancy never hurt anybody?
487 $ file_2_find = "[-]" + file_2_find
488 $ manifestfound = F$SEARCH(file_2_find)
490 $ OPEN/WRITE MISSING MISSING.
491 $!change to "FALSE" if you wish to skip the manifest search
492 $!(which after all is rather slow in DCL :-)
495 $ echo "Skipping MANIFEST check as requested"
498 $ OPEN/READ CONFIG 'manifestfound'
500 $ READ/END_OF_FILE = Done_manifest CONFIG line
501 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
502 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
503 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
504 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
505 $ line = F$EDIT(line,"TRIM, COMPRESS")
506 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
507 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
509 $Re_strip_line_manifest:
510 $ loca = F$LOCATE("/",file_2_find)
511 $ ante = F$EXTRACT(0,loca,file_2_find)
512 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
513 $ test_this = ante + "." + (post - "/")
514 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
516 $ file_2_find = ante + "." + (post - "/")
517 $ GOTO Re_strip_line_manifest
519 $ file_2_find = ante + "]" + (post - "/")
521 $ file_2_find = "[-."+file_2_find
523 $ file_2_find = "[-]" + file_2_find
526 $ tmp = F$PARSE(file_2_find + ";",,,,"SYNTAX_ONLY")
527 $ IF F$SEARCH(tmp) .NES. "" THEN file_2_find = tmp
528 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
529 $ file_2_find = file_2_find - dirname
531 $! may not need double dot check on ODS-5 volumes
532 $ found = F$SEARCH(dirname + file_2_find)
533 $ IF found .NES. "" THEN GOTO Read_loop_manifest
537 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
538 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
540 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
541 $ ELSE basename = basename + dot_ele + "_"
546 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
547 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
548 basename = f$extract(0,f$length(basename)-1,basename)
549 $ file_2_find = dirname + basename
551 $ found = F$SEARCH(file_2_find)
552 $ IF (found .EQS. "" .AND. dots .GT. 2)
554 $! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
555 $! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
556 $! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
557 $ dotloc = f$locate(".",basename)
558 $ basename[dotloc,1] := "_"
559 $ dot_ele = F$ELEMENT(dots - 1,"_",f$extract(dotloc,f$length(basename),basename))
561 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
563 $ found = F$SEARCH(dirname + basename)
564 $ file_2_find = file_2_find + "," + basename
566 $ tildeloc = f$locate("~",basename)
567 $ IF (found .EQS. "" .AND. tildeloc .LT. f$length(basename))
569 $ basename[tildeloc,1] := "_"
570 $ found = F$SEARCH(dirname + basename)
571 $ file_2_find = file_2_find + "," + basename
573 $ IF (found .EQS. "")
575 $ WRITE MISSING file_2_find
576 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
578 $ miss_list = miss_list + "," + file_2_find
581 $ GOTO Read_loop_manifest
586 $ ENDIF ! (manifestfound .NES. "")
588 $ IF (miss_list .NES. "")
590 $ echo "Some of the files not found include:"
593 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
599 THIS PACKAGE SEEMS TO BE INCOMPLETE.
601 You have the option of continuing the configuration process, despite the
602 distinct possibility that your kit is damaged, by typing 'y'es. If you
603 do, don't blame me if something goes wrong. I advise you to type 'n'o
604 and contact the author (dan@sidhe.org)
607 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
610 $ echo4 "Continuing..."
612 $ echo4 "ABORTING..."
616 $ echo4 "Looks good..."
617 $ DELETE/NOLOG/NOCONFIRM MISSING.;
618 $ ENDIF ! (miss_list .NES. "")
619 $ ENDIF ! (manifestfound .EQS. "") ELSE
621 $! after finding MANIFEST (see above)
622 $!: Configure runs within the UU subdirectory
624 $!: compute the number of columns on the terminal for proper question formatting
625 $ IF F$MODE() .EQS. "BATCH"
626 $! else it winds up being 512 in batch
628 $ ELSE COLUMNS = F$GETDVI("SYS$OUTPUT","DEVBUFSIZ")
630 $! "-des" sets SYS$OUTPUT to NL: with a DEVBUFSIZ too large (512 again)
631 $ IF COLUMNS .GT. 210 THEN COLUMNS = 80
632 $! not sure if this would actually be needed - it hopefully will not hurt
633 $ IF COLUMNS .LT. 40 THEN COLUMNS = 40
635 $!: set up the echo used in my read !sfn
636 $!: now set up to do reads with possible shell escape and default assignment !sfn
639 $! The sub_rp splitting is intended to handle long symbols such as the dflt for
644 $ len_rp = F$LENGTH(rp)
645 $ If (.NOT. silent) Then echo ""
650 $ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
651 $ i_rp = i_rp + COLUMNS
652 $ if i_rp .LT. len_rp THEN echo4 "''sub_rp'"
653 $ IF i_rp .LT. len_rp THEN GOTO rp_loop
661 $ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
663 $ IF (ans .EQS. "&-d")
665 $ echo4 "(OK, I will run with -d after this question.)"
667 $ deferred_fastread =1
670 $ IF (ans .EQS. "&-s")
672 $ echo4 "(OK, I will run with -s after this question.)"
674 $ deferred_silent = 1
677 $ if (bool_dflt .nes. "")
679 $ if (ans .eqs. "") then ans = bool_dflt
680 $ ans = f$extract(0,1,f$edit(ans,"collapse,upcase"))
681 $ if (ans .eqs. "Y" .or. ans .eqs. "1" .or. ans .eqs. "T")
685 $ if (ans .eqs. "N" .or. ans .eqs. "0" .or. ans .eqs. "F")
689 $ echo4 "Input not understood please answer 'Yes' or 'No'"
695 $ ans = f$edit(ans,"trim,compress")
696 $ if (ans .eqs. "") then ans = dflt
697 $ if (f$edit(ans,"upcase") .eqs. "NONE") then ans = ""
699 $ if f$type(deferred_silent) .nes. ""
703 $ delete/symbol deferred_silent
705 $ if f$type(deferred_fastread) .nes. ""
708 $ delete/symbol deferred_fastread
714 $!: create .config dir to save info across Configure sessions
715 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
717 $ CREATE/DIRECTORY [-.CONFIG]
718 $ OPEN/WRITE CONFIG [-.CONFIG]README.
720 "This directory created by Configure to save information that should"
722 "persist across sessions."
725 "You may safely delete it if you wish."
729 $ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n
730 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
731 $ IF (patchlevel_h.NES."")
733 $ SEARCH 'patchlevel_h' "define","PERL_VERSION","epoch"/match=and/out=[]ver.out
734 $ IF .NOT. usedevel .AND. usedevel .NES. "define"
736 $ OPEN/READ CONFIG []ver.out
739 $ tmp = F$EDIT(line,"TRIM,COMPRESS")
740 $ xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp))
741 $ line = xpatchlevel / 2
742 $ tmp = xpatchlevel - ( line * 2 )
745 $ echo4 "patchlevel is " + F$STRING(xpatchlevel)
748 *** WHOA THERE!!! ***
750 This is an UNSTABLE DEVELOPMENT release.
751 (The patchlevel, is odd--as opposed to even,
752 and that signifies a development release. If you want a
753 maintenance release, you want an even-numbered release.)
755 Do ***NOT*** install this into production use.
756 Data corruption and crashes are possible.
758 It is most seriously suggested that you do not continue any further
759 unless you want to help in developing and debugging Perl.
763 $ rp="Do you really want to continue? [''bool_dflt'] "
764 $ fastread_save = fastread
767 $ fastread = fastread_save
768 $ delete/symbol fastread_save
771 $ echo4 "Okay, continuing."
774 $ DELETE/NOLOG/NOCONFIRM []ver.out;
781 $ DELETE/NOLOG/NOCONFIRM []ver.out;
783 $!: general instructions
786 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
787 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
789 $ messages = F$ENVIRONMENT("MESSAGE")
790 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
791 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
792 $ IF .NOT.($status.EQ.%X08D78053)
796 $ rp = "Would you like to see the instructions? [''bool_dflt'] "
798 $ if .NOT.ans THEN needman=""
800 $ SET MESSAGE 'messages'
802 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
809 This installation shell script will examine your system and ask you questions
810 to determine how the perl5 package should be installed. If you get
811 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
812 process, edit something, then restart this process as you just did.
813 Many of the questions will have default answers in square
814 brackets; typing carriage return will give you the default.
821 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
826 In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
827 the questions and use the computed defaults (or the previous answers provided
828 there was already a config.sh file). Type '@Configure "-h"' for a list of
836 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
841 Much effort has been expended to ensure that this shell script will
842 run on any VMS system. If despite that it blows up on yours, your
843 best bet is to edit Configure.com and @ it again. Whatever problems
844 you have with Configure.com, let me (dan@sidhe.org) know how I blew
848 $!This installation script affects things in two ways:
850 $!1) it may do direct variable substitutions on some of the files included
852 $!2) it builds a config.h file for inclusion in C programs. You may edit
853 $! any of these files as the need arises after running this script.
855 $!If you make a mistake on a question, there is no easy way to back up to it
862 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
864 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
866 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
870 $ ENDIF !(needman .EQS. "true")
872 $!: see if sh knows # comments !sfn
873 $!: figure out how to guarantee sh startup !sfn
874 $!: find out where common programs are !sfn
875 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
876 $!trylist="byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
877 $! echo "I don't know where '$file' is, and my life depends on it."
878 $! echo "Go find a public domain implementation or fix your PATH setting!"
880 $! echo "Don't worry if any of the following aren't found..."
881 $!: determine whether symbolic links are supported !sfn !jem- further down
882 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
883 $!: set up the translation script tr, must be called with ./tr of course !sfn
885 $!: Try to determine whether config.sh was made on this system
886 $!: Get old answers from old config file if Configure was run on the
887 $!: same system, otherwise use the hints.
888 $ config_sh_es = "''config_sh'/[-]config.sh/"
892 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
894 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
896 $ configshfound = F$SEARCH(config_sh)
897 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
899 $ IF (i.LT.max) THEN GOTO Config_sh_look
900 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
901 $ IF (configshfound.EQS."")
903 $ config_sh = "[-]config.sh" ! the fallback default
904 $ GOTO Beyond_config_sh
907 $ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
909 $ IF F$TYPE(config_dflt) .NES. "" THEN bool_dflt = config_dflt
910 $ rp = "Shall I use ''config_sh' for default answers? [''bool_dflt'] "
915 $ echo "Fetching default answers from ''config_sh'..."
917 $! we do our own parsing of the shell-script stuff
918 $! ...and only accept symbols if they're in the | delimited list below
920 $ config_symbols0 ="|archlib|archlibexp|bin|binexp|builddir|cf_email|config_sh|installarchlib|installbin|installman1dir|installman3dir|"
921 $ config_symbols1 ="|installprivlib|installscript|installsitearch|installsitelib|most|oldarchlib|oldarchlibexp|osname|pager|perl_symbol|perl_verb|"
922 $ config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitebin|sitelib|sitelib_stem|sitelibexp|try_cxx|use64bitall|use64bitint|"
923 $ config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|uselongdouble|usemultiplicity|usemymalloc|usedebugging_perl|"
924 $ config_symbols4 ="|useperlio|usesecurelog|usethreads|usevmsdebug|usefaststdio|usemallocwrap|unlink_all_versions|uselargefiles|usesitecustomize|"
925 $ config_symbols5 ="|buildmake|builder|usethreadupcalls|usekernelthread"
927 $ open/read CONFIG 'config_sh'
929 $ read/end=erd_conf_loop CONFIG line
930 $ line = f$edit(line,"trim")
931 $ if line .eqs. "" .or. f$extract(0,1,line) .eqs. "#" then goto rd_conf_loop
932 $ sym = f$element(0,"=",line)
933 $ if sym .eqs. "=" then goto rd_conf_loop
937 $ syms = config_symbols'k'
938 $ j = f$locate(dsym, syms)
939 $ if j .lt. f$length(syms) then goto erd_ck_loop
941 $ if k .lt. 6 then goto rd_ck_loop
944 $ val = f$element(1,"=",line)
945 $ val = f$extract(1,f$length(val)-2,val)
946 $ write sys$output "''sym' = ""''val'"""
951 $ delete/symbol config_symbols0
952 $ delete/symbol config_symbols1
953 $ delete/symbol config_symbols2
954 $ delete/symbol config_symbols3
955 $ delete/symbol config_symbols4
956 $ delete/symbol config_symbols5
960 $ if f$type(usedebugging_perl) .nes. ""
962 $ useperldebug = usedebugging_perl
963 $ delete/symbol usedebugging_perl
967 $ if f$type(config_dflt) .nes. "" then DELETE/SYMBOL config_dflt
969 $!we actually do not have "hints/" for VMS
973 $!First time through, eh? I have some defaults handy for the following systems:
976 $! echo " ","VMS_VAX"
977 $! echo " ","VMS_AXP"
978 $! echo " ","VMS_IA64"
979 $! : Now look for a hint file osname_osvers, unless one has been
980 $! : specified already.
983 $!You may give one or more space-separated answers, or "none" if appropriate.
984 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
986 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
990 $!: Restore computed paths !sfn
992 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
994 $ IF (osname .NES. "VMS")
996 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
1000 %Config-E-VMS, ERROR:
1002 Err, you do not appear to be running VMS!
1003 This procedure is intended to Configure the building of Perl for VMS.
1010 $ echo4 "Continuing..."
1012 $ echo4 "ABORTING..."
1013 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
1015 $ EXIT 2 !$STATUS = "%X00000002" (error)
1017 $ ENDIF !(osname .NES./.EQS. "VMS")
1019 $!: who configured the system
1020 $ cf_by = F$EDIT(user,"LOWERCASE")
1021 $ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
1023 $! Peter Prymmer has seen:
1024 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
1025 $! "SYS$TIME_ZONE" = "EDT"
1027 $! Charles Lane recommended:
1028 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
1029 $! "NEWS_TIMEZONE" = "-0500"
1030 $! "ST_TIMEZONE" = "EDT"
1031 $! "JAN_TIME_ZONE" = "EST "
1032 $! "MULTINET_TIMEZONE" = "EST"
1033 $! "DAYLIGHT_SAVINGS" = "1"
1035 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
1037 $! "Multinet_Timezone"
1038 $! "TCPware_Timezone"
1041 $! This snippet o' DCL returns a string in default Unix `date` format,
1042 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
1044 $ MIN_TZO = -840 !units are minutes here
1047 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
1048 $ monn = F$CVTIME(,,"MONTH")
1049 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
1050 $ hour = F$CVTIME(,,"HOUR")
1051 $ min = F$CVTIME(,,"MINUTE")
1052 $ sec = F$CVTIME(,,"SECOND")
1053 $ year = F$CVTIME(,,"YEAR")
1055 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
1059 $ mon = F$ELEMENT(i,"/",months)
1060 $ IF i.LT.monn THEN GOTO Mon_loop
1063 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
1066 $ tzhour = F$INTEGER(systz)/3600
1067 $ tzmins = F$INTEGER(systz)/60
1068 $ tzminrem = tzmins - tzhour*60
1069 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
1071 $ THEN signothetime = "+"
1072 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
1073 $ THEN direction = "on GMT/"
1074 $ ELSE direction = "east of "
1076 $ ELSE signothetime = "-"
1077 $ tzhour = -1*tzhour !keeps !UL happy
1078 $ direction = "west of "
1081 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
1084 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
1086 $ tzspan = "''tzhour' hours"
1089 $ echo "Your system is ''tzspan' ''direction'UTC in England."
1090 $ rp = "(''systz') Is this UTC Time Zone Offset correct? [''bool_dflt'] "
1096 $ GOTO Beyond_TimeZone
1100 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
1105 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
1106 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
1107 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
1109 $ rp = "Enter the Time Zone offset: [''dflt'] "
1111 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
1112 $ IF ans.EQS."" THEN ans = dflt
1113 $ tzhour = F$ELEMENT(0,":","''ans'") !first
1114 $ IF tzhour.EQS."" THEN tzhour = 0
1115 $ tzhour = F$INTEGER(tzhour)
1116 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
1117 $ IF tzminrem.NES.""
1119 $ tzminrem = F$INTEGER(tzminrem)
1120 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
1124 $ tzmins = tzhour*60 + tzminrem
1125 $ tzd = F$STRING(tzmins*60)
1128 $ signothetime = "+"
1130 $ tzhour = -1*tzhour !keeps !UL happy
1131 $ signothetime = "-"
1133 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
1136 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
1141 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
1142 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
1144 $!: determine the architecture name
1145 $! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME")
1146 $! but does have F$GETSYI("HW_MODEL").
1147 $! Please try to use either archname .EQS. "VMS_VAX" or archname .EQS.
1148 $! "VMS_AXP" from here on to allow cross-platform configuration (e.g.
1149 $! configure a VAX build on an Alpha).
1151 $ IF (F$GETSYI("HW_MODEL") .LT. 1024 .AND. F$GETSYI("HW_MODEL") .GT. 0)
1153 $ archname = "VMS_VAX"
1154 $ otherarch = "an Alpha or IA64"
1156 $ arch_type = "ARCH-TYPE=__VAX__"
1158 $ IF (F$GETSYI("ARCH_TYPE") .EQ. 2)
1160 $ archname = "VMS_AXP"
1161 $ otherarch = "a VAX or IA64"
1162 $ arch_type = "ARCH-TYPE=__AXP__"
1164 $ archname = "VMS_IA64"
1165 $ otherarch = "a VAX or Alpha"
1166 $ arch_type = "ARCH-TYPE=__IA64__"
1171 $ rp = "What is your architecture name? [''archname'] "
1175 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
1176 $ IF (ans.NES.archname) !.AND.knowitall
1178 $ echo4 "I'll go with ''archname' anyway..."
1182 $ vms_prefix = "perl_root"
1183 $ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
1184 $ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''bool_dflt'] "
1191 $ IF (archname.EQS."VMS_AXP")
1193 $ macros = macros + """AXE=1"","
1195 $ IF (archname.EQS."VMS_IA64")
1197 $ macros = macros + """IXE=1"","
1201 $!: is AFS running? !sfn
1202 $!: decide how portable to be. Allow command line overrides. !sfn
1203 $!: set up shell script to do ~ expansion !sfn
1204 $!: expand filename !sfn
1205 $!: now set up to get a file name !sfn
1207 $ IF F$TYPE(prefix) .EQS. ""
1209 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
1210 $ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - "000000." - ".000000" - ".;"
1211 $ prefixbase = prefix - "]"
1212 $! Add _ROOT to make install PERL_ROOT differ from build directory.
1213 $ prefix = prefixbase + "_ROOT.]"
1215 $ ! more redundant scrubbing of values
1216 $ prefix = prefix - "000000."
1217 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN prefix = prefix - "]" + ".]"
1219 $!: determine root of directory hierarchy where package will be installed.
1224 $ echo "By default, ''package' will be installed in ''dflt', pod"
1225 $ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
1226 $ echo "all installation directories."
1227 $ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
1228 $ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
1230 $ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
1235 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
1239 $ perl_root = prefix
1241 $! Check here for pre-existing PERL_ROOT.
1242 $! -> ask if removal desired.
1243 $! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
1244 $! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
1246 $ tmp = perl_root - ".]" + "]"
1247 $ dflt = f$parse(tmp,,,,)
1250 $ echo4 "''tmp' does not yet exist."
1251 $! create/directory 'tmp'
1253 $ echo4 "''tmp' already exists."
1256 $ vms_skip_install = "true"
1259 $ rp = "Skip the remaining """"where install"""" questions? [''bool_dflt'] "
1261 $ IF (.NOT.ans) THEN vms_skip_install = "false"
1262 $ IF (.NOT.vms_skip_install)
1265 $!: set the prefixit variable, to compute a suitable default value
1267 $!: determine where private library files go
1268 $!: Usual default is /usr/local/lib/perl5. Also allow things like
1269 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
1275 There are some auxiliary files for perl5 that need to be put into a
1276 private library directory that is accessible by everyone.
1279 $ IF F$TYPE(privlib) .NES. ""
1280 $ THEN dflt = privlib
1281 $ ELSE dflt = "''vms_prefix':[lib]"
1283 $ rp = "Pathname where the private library files will reside? "
1284 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1288 $ ENDIF !%Config-I-VMS, skip remaining "where install" questions
1290 $ IF F$TYPE(perl_symbol) .EQS. "" THEN perl_symbol := true
1291 $ IF F$TYPE(perl_verb) .EQS. "" THEN perl_verb = ""
1293 $ THEN bool_dflt = "y"
1294 $ ELSE bool_dflt = "n"
1299 $ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
1300 $ echo "symbol to invoke ''package', which is the usual method."
1301 $ echO "If you do not do so then you would need a DCL command verb at the"
1302 $ echo "process or the system wide level."
1304 $ rp = "Invoke perl as a global symbol foreign command? [''bool_dflt'] "
1306 $ IF (.NOT.ans) THEN perl_symbol = "false"
1308 $ IF (.NOT.perl_symbol)
1310 $ IF perl_verb .EQS. "DCLTABLES"
1311 $ THEN bool_dflt = "n"
1312 $ ELSE bool_dflt = "y"
1317 $ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
1318 $ echo "verb in a per-process table or in the system wide DCLTABLES (which"
1319 $ echo "would require write privilege)."
1321 $ rp = "Invoke perl as a per process command verb? [ ''bool_dflt' ] "
1324 $ THEN perl_verb = "DCLTABLES"
1325 $ ELSE perl_verb = "PROCESS"
1327 $ ENDIF ! (.NOT.perl_symbol)
1329 $!: set the base revision
1331 $ revision = baserev - ".0"
1332 $!: get the patchlevel
1334 $ echo4 "Getting the current patchlevel..."
1339 $ api_subversion="0"
1340 $ perl_patchlevel="0"
1341 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1342 $ IF (patchlevel_h.NES."")
1344 $ got_patch = "false"
1346 $ got_api_revision = "false"
1347 $ got_api_version = "false"
1348 $ got_api_subversion = "false"
1349 $ got_perl_patchlevel= "false"
1350 $ OPEN/READONLY CONFIG 'patchlevel_h'
1352 $ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
1353 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
1355 $ line = F$EDIT(line,"COMPRESS, TRIM")
1356 $ patchlevel = F$ELEMENT(2," ",line)
1357 $ got_patch = "true"
1359 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
1361 $ line = F$EDIT(line,"COMPRESS, TRIM")
1362 $ subversion = F$ELEMENT(2," ",line)
1365 $ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1367 $ line = F$EDIT(line,"COMPRESS, TRIM")
1368 $ api_revision = F$ELEMENT(2," ",line)
1369 $ got_api_revision = "true"
1371 $ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1373 $ line = F$EDIT(line,"COMPRESS, TRIM")
1374 $ api_version = F$ELEMENT(2," ",line)
1375 $ got_api_version = "true"
1377 $ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1379 $ line = F$EDIT(line,"COMPRESS, TRIM")
1380 $ api_subversion = F$ELEMENT(2," ",line)
1381 $ got_api_subversion = "true"
1383 $ IF ((F$LOCATE("""DEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1385 $ line = F$EDIT(line,"COMPRESS, TRIM")
1386 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1387 $ perl_patchlevel = perl_patchlevel - "DEVEL"
1388 $ got_perl_patchlevel = "true"
1390 $ IF ((F$LOCATE("""SMOKE",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1392 $ line = F$EDIT(line,"COMPRESS, TRIM")
1393 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1394 $ perl_patchlevel = perl_patchlevel - "SMOKE"
1395 $ got_perl_patchlevel = "true"
1397 $ IF ((F$LOCATE("""MAINT",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1399 $ line = F$EDIT(line,"COMPRESS, TRIM")
1400 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1401 $ perl_patchlevel = perl_patchlevel - "MAINT"
1402 $ got_perl_patchlevel = "true"
1404 $ IF (.NOT. got_patch) .OR. -
1405 (.NOT. got_sub) .OR. -
1406 (.NOT. got_api_revision) .OR. -
1407 (.NOT. got_api_version) .OR. -
1408 (.NOT. got_api_subversion) .OR. -
1409 (.NOT. got_perl_patchlevel) -
1410 THEN GOTO Patchlevel_h_loop
1415 $ IF F$SEARCH("[-].patch") .NES. ""
1418 $ OPEN/READ PATCH [-].patch
1421 $ tmp = F$EDIT(line,"TRIM,COMPRESS")
1422 $ IF F$ELEMENT(3, " ", tmp) .NES. "" THEN tmp = F$ELEMENT(3, " ", tmp)
1424 $ IF tmp .NES. "" THEN perl_patchlevel = tmp
1427 $ version_patchlevel_string = "version ''patchlevel' subversion ''subversion'"
1428 $ IF got_perl_patchlevel .AND. perl_patchlevel .NES. "0"
1430 $ version_patchlevel_string = "''version_patchlevel_string' patch ''perl_patchlevel'"
1432 $ echo "(You have ''package' ''version_patchlevel_string'.)"
1434 $ version = revision + "_" + patchlevel + "_" + subversion
1436 $ IF (.NOT.vms_skip_install)
1438 $!: set the prefixup variable, to restore leading tilde escape !sfn
1440 $!: determine where public architecture dependent libraries go
1444 $ echo "''package' contains architecture-dependent library files. If you are"
1450 sharing libraries in a heterogeneous environment, you might store
1451 these files in a separate location. Otherwise, you can just include
1452 them with the rest of the public library files.
1455 $ IF F$TYPE(archlib) .NES. ""
1456 $ THEN dflt = archlib
1457 $ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
1459 $ rp = "Where do you want to put the public architecture-dependent libraries? "
1460 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1464 $ ENDIF !%Config-I-VMS, skip "where install" questions
1466 $! This quotation from Configure has to be included on VMS:
1471 There is, however, a strange, musty smell in the air that reminds me of
1472 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1474 $ IF (.NOT.vms_skip_install)
1476 $!: it so happens the Eunice I know will not run shell scripts in Unix format
1478 $!: see if setuid scripts can be secure !sfn
1479 $!: now see if they want to do setuid emulation !sfn
1481 $!: determine where site specific libraries go.
1487 The installation process will also create a directory for
1488 site-specific extensions and modules. Some users find it convenient
1489 to place all local files in this directory rather than in the main
1490 distribution directory.
1493 $ IF F$TYPE(sitelib) .NES. ""
1494 $ THEN dflt = sitelib
1495 $ ELSE dflt = privlib - "]" + ".SITE_PERL]"
1497 $ rp = "Pathname for the site-specific library files? "
1498 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1502 $!: determine where site specific architecture-dependent libraries go.
1504 $ THEN TYPE SYS$INPUT:
1507 The installation process will also create a directory for
1508 architecture-dependent site-specific extensions and modules.
1511 $ IF F$TYPE(sitearch) .NES. ""
1512 $ THEN dflt = sitearch
1513 $ ELSE dflt = sitelib - "]" + "." + archname + "]"
1515 $ rp = "Pathname for the site-specific architecture-dependent library files? "
1516 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1520 $!: determine where old public architecture dependent libraries might be
1522 $!: determine where public executables go
1523 $ IF F$TYPE(bin) .NES. ""
1525 $! ELSE dflt = prefix - ".]" + ".BIN]"
1526 $ ELSE dflt = "/''vms_prefix'"
1528 $ rp = "Pathname where the public executables will reside? "
1529 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1533 $!: determine where add-on public executables go
1534 $ IF F$TYPE(sitebin) .NES. ""
1535 $ THEN dflt = sitebin
1536 $ ELSE dflt = "''vms_prefix':[bin.''archname']"
1538 $ rp = "Pathname where the add-on public executables should be installed? "
1539 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1543 $!: determine where manual pages are on this system
1544 $!: What suffix to use on installed man pages
1545 $!: see if we can have long filenames
1546 $!: determine where library module manual pages go
1547 $!: What suffix to use on installed man pages
1548 $!: see what memory models we can support
1550 $ ELSE ! skipping "where install" questions, we must set some symbols
1551 $ IF F$TYPE(archlib).EQS."" THEN -
1552 archlib="''vms_prefix':[lib.''archname'.''version']"
1553 $ IF F$TYPE(bin) .EQS. "" THEN -
1554 bin="/''vms_prefix'"
1555 $ IF F$TYPE(privlib) .EQS. "" THEN -
1556 privlib ="''vms_prefix':[lib]"
1557 $ IF F$TYPE(sitearch) .EQS. "" THEN -
1558 sitearch="''vms_prefix':[lib.site_perl.''archname']"
1559 $ IF F$TYPE(sitelib) .EQS. "" THEN -
1560 sitelib ="''vms_prefix':[lib.site_perl]"
1561 $ IF F$TYPE(sitebin) .EQS. "" THEN -
1562 sitebin="''vms_prefix':[bin.''archname']"
1563 $ ENDIF !%Config-I-VMS, skip "where install" questions
1565 $! These derived locations can be set whether we've opted to
1566 $! skip the where install questions or not.
1568 $ IF F$TYPE(archlibexp) .EQS. "" THEN -
1569 archlibexp="''vms_prefix':[lib.''archname'.''version']"
1570 $ IF F$TYPE(binexp) .EQS. "" THEN -
1571 binexp ="''vms_prefix':[000000]"
1572 $ IF F$TYPE(builddir) .EQS. "" THEN -
1573 builddir ="''vms_prefix':[000000]"
1574 $ IF F$TYPE(installarchlib) .EQS. "" THEN -
1575 installarchlib="''vms_prefix':[lib.''archname'.''version']"
1576 $ IF F$TYPE(installbin) .EQS. "" THEN -
1577 installbin ="''vms_prefix':[000000]"
1578 $ IF F$TYPE(installscript) .EQS. "" THEN -
1579 installscript ="''vms_prefix':[utils]"
1580 $ IF F$TYPE(installman1dir) .EQS. "" THEN -
1581 installman1dir ="''vms_prefix':[man.man1]"
1582 $ IF F$TYPE(installman3dir) .EQS. "" THEN -
1583 installman3dir ="''vms_prefix':[man.man3]"
1584 $ IF F$TYPE(installprivlib) .EQS. "" THEN -
1585 installprivlib ="''vms_prefix':[lib]"
1586 $ IF F$TYPE(installsitearch) .EQS. "" THEN -
1587 installsitearch="''vms_prefix':[lib.site_perl.''archname']"
1588 $ IF F$TYPE(installsitelib) .EQS. "" THEN -
1589 installsitelib ="''vms_prefix':[lib.site_perl]"
1590 $ IF F$TYPE(oldarchlib) .EQS. "" THEN -
1591 oldarchlib="''vms_prefix':[lib.''archname']"
1592 $ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
1593 oldarchlibexp="''vms_prefix':[lib.''archname']"
1594 $ IF F$TYPE(privlibexp) .EQS. "" THEN -
1595 privlibexp ="''vms_prefix':[lib]"
1596 $ IF F$TYPE(scriptdir) .EQS. "" THEN -
1597 scriptdir ="''vms_prefix':[utils]"
1598 $ IF F$TYPE(sitearchexp) .EQS. "" THEN -
1599 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
1600 $ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
1601 sitelib_stem ="''vms_prefix':[lib.site_perl]"
1602 $ IF F$TYPE(sitelibexp) .EQS. "" THEN -
1603 sitelibexp ="''vms_prefix':[lib.site_perl]"
1605 $!: see if we need a special compiler
1606 $! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1610 $ vms_cc_available = ""
1612 $ OPEN/WRITE CONFIG ccvms.c
1613 $ WRITE CONFIG "#ifdef __DECC"
1614 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1615 $ WRITE CONFIG "#endif"
1616 $ WRITE CONFIG "#include <stdio.h>"
1617 $ WRITE CONFIG "int main() {"
1618 $ WRITE CONFIG "#ifdef __DECC"
1619 $ WRITE CONFIG " printf(""/DECC\n"");"
1620 $ WRITE CONFIG "#else"
1621 $ WRITE CONFIG " printf(""/VAXC\n"");"
1622 $ WRITE CONFIG "#endif"
1623 $ WRITE CONFIG " exit(0);"
1628 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
1629 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
1630 $ cc/NoObj/list=ccvms.lis ccvms.c
1633 $ IF (silent) THEN GOSUB Shut_up
1634 $ IF tmp.NE.%X10B90001
1636 $ IF tmp.NE.%X10000001
1638 $ nocc = "t" !%X10000001 is return from gcc
1639 $ GOTO Gcc_initial_check
1644 $ IF .NOT.silent THEN echo ""
1645 $ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1646 $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1650 $ echo "Will try cc/decc..."
1653 $ DEFINE/USER_MODE SYS$ERROR NL:
1654 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1655 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1658 $ IF (silent) THEN GOSUB Shut_up
1659 $ IF tmp.NE.%X10B90001
1661 $ echo "Apparently you don't have that one."
1664 $ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1665 $ vms_cc_available = vms_cc_available + "cc/decc "
1668 $ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line)) -
1669 .or.(F$LOCATE("HP",F$EDIT(line,"UPCASE")).NE.F$LENGTH(line))
1671 $ vms_cc_dflt = "/decc"
1672 $ vms_cc_available = vms_cc_available + "cc/decc "
1677 $ echo "Checking for gcc"
1678 $ OPEN/WRITE CONFIG gccvers.lis
1680 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1681 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1682 $ 'gcc_symbol'/noobj/version _nla0:
1685 $ IF (silent) THEN GOSUB Shut_up
1687 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1689 $ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you do not have it."
1690 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1691 $ GOTO Cxx_initial_check
1693 $ OPEN/READ CONFIG gccvers.lis
1695 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1696 $ GOTO GCC_List_Read
1700 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1701 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1705 $! Do note that [vms]perl source files have a ways to go before they will
1706 $! compile under CXX.
1707 $! In order to test Configure.com with CXX invoke it with "-Dtry_cxx" on
1708 $! the command line.
1710 $ IF F$TYPE(try_cxx) .EQS. "" THEN try_cxx := n
1711 $ IF try_cxx .OR. try_cxx .EQS. "define"
1715 $ echo "Checking for CXX..."
1716 $ OPEN/WRITE CONFIG ccvms.c
1717 $ WRITE CONFIG "#include <iostream>"
1718 $ WRITE CONFIG "int main() {"
1719 $ WRITE CONFIG "#ifdef __DECCXX"
1720 $ WRITE CONFIG " cout << __DECCXX, endl;"
1721 $ WRITE CONFIG "#else"
1722 $ WRITE CONFIG " cout << 0,endl;"
1723 $ WRITE CONFIG "#endif"
1724 $! Todo: add G++ identifier check ??
1725 $ WRITE CONFIG " return(0);"
1729 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1730 $ DEFINE/USER_MODE SYS$ERROR NL:
1734 $! success $status with:
1735 $! DEC C++ V1.1-001 on VMS VAX V5.5-2
1736 $! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1737 $! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1738 $! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1739 $ IF tmp .eq. %X15F60001
1743 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1744 $ DEFINE/USER_MODE SYS$ERROR NL:
1745 $ link/nodebug ccvms.obj
1748 $ ! success $status with:
1749 $ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1750 $ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1751 $ IF tmp .eq. %X10000001
1754 $ vms_cc_available = vms_cc_available + "cxx "
1755 $ echo "CXX and LINK are available."
1757 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1759 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1760 $ DEFINE/USER_MODE SYS$ERROR NL:
1764 $ ! success $status with:
1765 $ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1766 $ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1767 $ IF tmp .eq. %X10000001
1769 $ ld_try = "cxxlink"
1770 $ vms_cc_available = vms_cc_available + "cxx "
1771 $ echo "CXX and CXXLINK are available."
1774 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1778 $ DELETE/NOLOG/NOCONFIRM ccvms.c;
1779 $ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1780 $ CALL Cxx_demangler_cleanup
1782 $ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1785 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1787 $!: see if we need a special compiler
1789 $ echo "Available compiler(s):"
1790 $ echo "( ''vms_cc_available')"
1793 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1797 $ rp = "Use which C compiler? [''dflt'] "
1801 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1803 $ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans)) -
1804 .or.(F$LOCATE("hp",ans).NE.F$LENGTH(ans))
1809 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1811 $ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1816 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1820 $ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1821 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt)
1823 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1828 $ IF Mcc .EQS. "cc/decc"
1831 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1837 $ IF Mcc .EQS. "cc/decc"
1840 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1842 $ IF Mcc .EQS. "gcc"
1845 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1848 $Decc_Version_check:
1850 $ IF ccname .EQS. "DEC"
1853 $ echo4 "Checking for the Dec C version number..."
1854 $ OPEN/WRITE CONFIG deccvers.c
1855 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1856 $ WRITE CONFIG "#include <stdio.h>"
1857 $ WRITE CONFIG "int main() {"
1858 $ WRITE CONFIG "#ifdef __DECC"
1859 $ WRITE CONFIG "#ifdef __DECC_VER"
1860 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1861 $ WRITE CONFIG "#else"
1862 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1863 $ WRITE CONFIG "#endif"
1864 $ WRITE CONFIG "#endif"
1865 $ WRITE CONFIG " exit(0);"
1869 $ DEFINE/USER_MODE SYS$ERROR NL:
1870 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1873 $ IF (silent) THEN GOSUB Shut_up
1874 $ DEFINE/USER_MODE SYS$ERROR NL:
1875 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1876 $ link/nodebug deccvers.obj
1878 $ IF (silent) THEN GOSUB Shut_up
1879 $ OPEN/WRITE CONFIG deccvers.out
1880 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1881 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1882 $ mcr []deccvers.exe
1886 $ IF (silent) THEN GOSUB Shut_up
1887 $ OPEN/READ CONFIG deccvers.out
1888 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1891 $ echo "You are using Dec C ''line'"
1893 $ Dec_C_Version = F$INTEGER(line)
1894 $ IF Dec_C_Version .GE. 60200000 .AND. archname .NES. "VMS_VAX"
1896 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1897 $ ccflags = ccflags + "/NOANSI_ALIAS"
1899 $ DELETE/NOLOG/NOCONFIRM deccvers.*;
1903 $ IF ccname .EQS. "GCC"
1905 $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1906 $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1907 $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1908 $ IF gcclib_olb .EQS. ""
1910 $! These objects/libs come w/ gcc 2.7.2 for AXP:
1911 $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1912 $ IF tmp .NES. "" then gcclib_olb = tmp
1913 $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1916 $ IF gcclib_olb .EQS. ""
1917 $ THEN gcclib_olb = tmp
1918 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1921 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1924 $ IF gcclib_olb .EQS. ""
1925 $ THEN gcclib_olb = tmp
1926 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1929 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1932 $ IF gcclib_olb .EQS. ""
1933 $ THEN gcclib_olb = tmp
1934 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1937 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1939 $ gcclib_olb = gcclib_olb + "/lib"
1941 $ IF gcclib_olb .NES. "" .AND. -
1942 (vaxcrtl_olb .NES. "" .OR. -
1943 vaxcrtl_exe .NES. "" )
1946 $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1947 $ OPEN/WRITE CONFIG gccvers.c
1948 $ WRITE CONFIG "#include <stdio.h>"
1949 $ WRITE CONFIG "int main() {"
1950 $ WRITE CONFIG "#ifdef __GNUC__"
1951 $ WRITE CONFIG "#ifdef __VERSION__"
1952 $ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1953 $ WRITE CONFIG "#else"
1954 $ WRITE CONFIG " printf(""%s\n"", ""1"");"
1955 $ WRITE CONFIG "#endif"
1956 $ WRITE CONFIG "#endif"
1957 $ WRITE CONFIG " exit(0);"
1960 $ DEFINE SYS$ERROR _NLA0:
1961 $ DEFINE SYS$OUTPUT _NLA0:
1964 $ DEASSIGN SYS$ERROR _NLA0:
1965 $ DEASSIGN SYS$OUTPUT _NLA0:
1966 $ IF (silent) THEN GOSUB Shut_up
1967 $ DEFINE SYS$ERROR _NLA0:
1968 $ DEFINE SYS$OUTPUT _NLA0:
1969 $ IF vaxcrtl_exe .EQS. ""
1971 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1973 $ link/nodebug gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1976 $ link/nodebug gccvers.obj,'gcclib_olb'
1980 $ OPEN/WRITE CONFIG GCCVERS.OPT
1981 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1983 $ link/nodebug gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1986 $ DEASSIGN SYS$ERROR
1987 $ DEASSIGN SYS$OUTPUT
1988 $ IF (silent) THEN GOSUB Shut_up
1989 $ OPEN/WRITE CONFIG gccvers.out
1990 $ DEFINE SYS$ERROR CONFIG
1991 $ DEFINE SYS$OUTPUT CONFIG
1995 $ DEASSIGN SYS$OUTPUT
1996 $ DEASSIGN SYS$ERROR
1997 $ IF (silent) THEN GOSUB Shut_up
1998 $ OPEN/READ CONFIG gccvers.out
1999 $ READ/END_OF_FILE=Gcc_cleanup CONFIG line
2002 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
2003 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
2005 $ echo "You are not using GNU cc."
2008 $ echo "You are using GNU cc ''line'"
2011 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
2017 $ IF ccname .EQS. "CXX"
2019 $ OPEN/WRITE CONFIG cxxvers.c
2020 $ WRITE CONFIG "#include <stdio.h>"
2021 $ WRITE CONFIG "int main() {"
2022 $ WRITE CONFIG "#ifdef __DECCXX_VER"
2023 $ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
2024 $ WRITE CONFIG "#else"
2025 $ WRITE CONFIG " printf(""%i\n"", ""0"");"
2026 $ WRITE CONFIG "#endif"
2027 $ WRITE CONFIG " return(0);"
2031 $ DEFINE/USER_MODE SYS$ERROR NL:
2032 $ DEFINE/USER_MODE SYS$OUTPUT NL:
2036 $ IF (silent) THEN GOSUB Shut_up
2038 $ DEFINE/USER_MODE SYS$ERROR NL:
2039 $ DEFINE/USER_MODE SYS$OUTPUT NL:
2043 $ IF (silent) THEN GOSUB Shut_up
2044 $ OPEN/WRITE CONFIG cxxvers.out
2046 $ DEFINE/USER_MODE SYS$ERROR CONFIG
2047 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
2052 $ IF (silent) THEN GOSUB Shut_up
2053 $ OPEN/READ CONFIG cxxvers.out
2054 $ READ/END_OF_FILE=Cxx_cleanup CONFIG line
2057 $ DELETE/NOLOG/NOCONFIRM cxxvers.*;
2058 $ echo "You are using CXX ''line'"
2061 $ d_cplusplus = "define"
2062 $ CALL Cxx_demangler_cleanup
2064 $ d_cplusplus = "undef"
2067 $Cxx_demangler_cleanup: SUBROUTINE
2069 $! If we do build with CXX these demangler Dbs will be left all over.
2070 $! However, configure.com does try to remove the [.UU] sub directory.
2071 $! Be sure to set default to the correct place before calling this sub.
2074 $ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
2075 $ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
2077 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
2078 $ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
2082 $ ENDSUBROUTINE ! Cxx_demangler_cleanup
2087 $ OPEN/READ CONFIG ccvms.lis
2089 $ IF archname .EQS. "VMS_VAX"
2094 $ IF archname .EQS. "VMS_AXP"
2102 $ line = F$EDIT(line,"TRIM,COMPRESS")
2103 $ line = line - "Page 1" ! occurs at end all compilers
2104 $ line = line - "CCVMS " ! filename appears w/ VAXC
2105 $ line = line - "Source Listing " ! Seen w/ AXP DECC
2106 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
2108 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
2109 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
2113 $!: What should the include directory be ? (.TLB text libraries)
2115 $ rp = "Where are the include files you want to use? "
2116 $ IF f$length( rp + "[''dflt'] " ) .GT. 76
2117 $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
2118 $ ELSE rp = rp + "[''dflt'] "
2123 $!: see if we have to deal with yellow pages, now NIS.
2124 $!: now get the host name
2127 $ echo4 "Figuring out host name..." !>&4
2129 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
2130 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
2131 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
2132 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
2133 $ IF myhostname.eqs."".and. -
2134 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
2135 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
2136 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
2137 $ IF myhostname.eqs."".and. -
2138 F$TRNLNM("TCPIP$INET_HOST") .nes. "" .and. -
2139 F$TRNLNM("TCPIP$INET_DOMAIN") .nes. "" THEN -
2140 myhostname = F$TRNLNM("TCPIP$INET_HOST") + "." + F$TRNLNM("TCPIP$INET_DOMAIN")
2141 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
2142 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
2143 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
2144 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
2145 $!: you do not want to know about this
2147 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
2152 $ READ SYS$COMMAND/PROMPT= -
2153 "Please type the (one word) name of your host: " ans
2156 $!: translate upper to lower if necessary
2157 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
2158 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
2159 $ IF mylowhostname.NES.myhostname
2161 $ echo "(Normalizing case in your host name)"
2162 $ myhostname = mylowhostname
2165 $ fp = F$LOCATE(".",myhostname)
2166 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
2167 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
2169 $ rp = "What is your domain name? [''mydomain'] "
2173 $!: translate upper to lower if necessary
2174 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
2175 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
2176 $ IF mylowdomain.NES.mydomain
2178 $ echo "(Normalizing case in your domain name)"
2179 $ mydomain = mylowdomain
2182 $ myhostname = myhostname - mydomain
2183 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
2189 I need to get your e-mail address in Internet format if possible, i.e.
2190 something like user@host.domain. Please answer accurately since I have
2191 no easy means to double check it. The default value provided below
2192 is most probably close to the reality but may not be valid from outside
2193 your organization...
2196 $ IF F$TYPE(cf_email) .EQS. ""
2198 $ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
2199 $ rp = "What is your e-mail address? [''dflt'] "
2209 If you or somebody else will be maintaining perl at your site, please
2210 fill in the correct e-mail address here so that they may be contacted
2211 if necessary. Currently, the "perlbug" program included with perl
2212 will send mail to this address in addition to perlbug@perl.com. You may
2213 enter "none" for no administrator.
2216 $ dflt = "''cf_email'"
2217 $ rp = "Perl administrator e-mail address [''dflt'] "
2221 $!: determine where public executable scripts go
2222 $!: determine perl absolute location
2223 $!: figure out how to guarantee perl startup
2225 $!: see how we invoke the C preprocessor
2227 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
2228 $!: Set private lib path
2229 $!: Now check and see which directories actually exist, avoiding duplicates
2230 $!: determine optimize, if desired, or use for debug flag also
2231 $!: We will not override a previous value, but we might want to
2232 $!: augment a hint file
2233 $!: the following weeds options from ccflags that are of no interest to cpp
2234 $!: flags used in final linking phase
2235 $!: Try to guess additional flags to pick up local libraries.
2238 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
2239 $!: compute shared library extension
2240 $!: Looking for optional libraries
2241 $!: see if nm is to be used to determine whether a symbol is defined or not
2242 $!: get list of predefined functions in a handy place
2243 $!: see if we have sigaction or sigprocmask
2244 $!: see whether socketshr exists
2245 $ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
2247 $ Has_socketshr = "T"
2249 $ echo4 "Hmm... Looks like you have SOCKETSHR Berkeley networking support."
2251 $ Has_socketshr = "F"
2253 $ IF (ccname .EQS. "DEC" .AND. Dec_C_Version .GE. 50200000) .OR. (ccname .EQS. "CXX")
2255 $ Has_Dec_C_Sockets = "T"
2257 $ echo4 "Hmm... Looks like you have Dec C Berkeley networking support."
2259 $ Has_Dec_C_Sockets = "F"
2261 $ ! Hey, we've got both. Default to Dec C, then, since it's better
2262 $ IF Has_socketshr .OR. Has_Dec_C_Sockets
2265 $ echo "You have sockets available. Which socket stack do you want to"
2266 $ echo "build into Perl?"
2267 $ IF Has_Dec_C_Sockets
2271 $ dflt = "SOCKETSHR"
2273 $ rp = "Choose socket stack (NONE"
2274 $ IF Has_socketshr THEN rp = rp + ",SOCKETSHR"
2275 $ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
2276 $ rp = rp + ") [''dflt'] "
2278 $ Has_Dec_C_Sockets = "F"
2279 $ Has_socketshr = "F"
2280 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
2281 $ IF ans.eqs."decc" THEN Has_Dec_C_Sockets = "T"
2282 $ IF ans.eqs."socketshr" THEN Has_socketshr = "T"
2286 $! Ask if they want to build with VMS_DEBUG perl
2288 $ echo "Perl can be built to run under the VMS debugger."
2289 $ echo "You should only select this option if you are debugging"
2290 $ echo "perl itself. This can be a useful feature if you are "
2291 $ echo "embedding perl in a program."
2293 $ if f$type(usevmsdebug) .nes. ""
2295 $ if usevmsdebug .or. usevmsdebug .eqs. "define" then bool_dflt="y"
2297 $ rp = "Build a VMS-DEBUG version of Perl? [''bool_dflt'] "
2299 $ use_vmsdebug_perl = ans
2300 $ IF use_vmsdebug_perl
2302 $ usevmsdebug = "define"
2303 $ macros = macros + """__DEBUG__=1"","
2305 $ usevmsdebug = "undef"
2308 $! Ask if they want to build with DEBUGGING
2310 $ echo "Perl can be built with extra runtime debugging enabled. This"
2311 $ echo "enables the -D switch, at the cost of some performance. It"
2312 $ echo "was mandatory on perl 5.005 and before on VMS, but is now"
2313 $ echo "optional. If you do not generally use it you should probably"
2314 $ echo "leave this off and gain a bit of extra speed."
2316 $ if f$type(useperldebug) .nes. ""
2318 $ if f$extract(0,1,f$edit(useperldebug,"collapse,upcase")).eqs."N" .or. useperldebug .eqs. "undef" then bool_dflt="n"
2320 $ rp = "Build a DEBUGGING version of Perl? [''bool_dflt'] "
2322 $ use_debugging_perl = ans
2324 $! Ask if they want to build with MULTIPLICITY
2326 $ echo "Perl can be built so that multiple Perl interpreters can coexist"
2327 $ echo "within the same Perl executable."
2328 $ echo "There is some performance overhead, however, so you"
2329 $ echo "probably do not want to choose this unless you are going to be"
2330 $ echo "doing things with embedded perl."
2332 $ if f$type(usemultiplicity) .nes. ""
2334 $ if usemultiplicity .or. usemultiplicity .eqs. "define" then bool_dflt = "y"
2336 $ rp = "Build Perl for multiplicity? [''bool_dflt'] "
2340 $ usemultiplicity="define"
2342 $ usemultiplicity="undef"
2345 $! Ask if they want to build with 64-bit support
2346 $ IF (archname.NES."VMS_VAX").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2349 $ IF F$TYPE(use64bitint) .NES. ""
2351 $ IF use64bitint .OR. use64bitint .eqs. "define" THEN bool_dflt = "y"
2354 $ echo "You have natively 64-bit long integers."
2356 $ echo "Perl can be built to take advantage of 64-bit integer types"
2357 $ echo "on some systems, To do so, Configure can be run with -Duse64bitint."
2358 $ echo "Choosing this option will most probably introduce binary incompatibilities."
2360 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2361 $ rp = "Try to use 64-bit integers, if available? [''bool_dflt'] "
2366 $ IF F$TYPE(use64bitall) .NES. ""
2368 $ IF use64bitall .OR. use64bitall .eqs. "define" THEN bool_dflt = "y"
2371 $ echo "You may also choose to try maximal 64-bitness. It means using as much"
2372 $ echo "64-bitness as possible on the platform. This in turn means even more"
2373 $ echo "binary incompatibilities. On the other hand, your platform may not"
2374 $ echo "have any more 64-bitness available than what you already have chosen."
2376 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2377 $ rp = "Try to use maximal 64-bit support, if available? [''bool_dflt'] "
2380 $ IF use64bitall .AND. .NOT. use64bitint
2383 $ echo "Since you have chosen a maximally 64-bit build, I'm also turning on"
2384 $ echo "the use of 64-bit integers."
2388 $ bool_dflt = use64bitall
2389 $ IF F$TYPE(uselargefiles) .NES. ""
2391 $ IF uselargefiles .OR. uselargefiles .eqs. "define" THEN bool_dflt = "y"
2394 $ echo "Perl can be built to understand large files (files larger than 2 gigabytes)"
2395 $ echo "on some systems. To do so, Configure can be run with -Duselargefiles."
2397 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2398 $ rp = "Try to understand large files, if available? [''bool_dflt'] "
2403 $ IF F$TYPE(uselongdouble) .NES. ""
2405 $ IF uselongdouble .OR. uselongdouble .eqs. "define" THEN bool_dflt = "y"
2408 $ echo "Perl can be built to take advantage of long doubles which"
2409 $ echo "(if available) may give more accuracy and range for floating point numbers."
2411 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2412 $ rp = "Try to use long doubles, if available? [''bool_dflt'] "
2414 $ uselongdouble = ans
2416 $ ENDIF ! not VAX && >= 7.1
2418 $ IF usesitecustomize .OR. usesitecustomize .eqs. "define"
2420 $ usesitecustomize = "define"
2422 $ usesitecustomize = "undef"
2425 $! Ask about threads, if appropriate
2426 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
2429 $ echo "Perl can be built to take advantage of threads on some systems."
2430 $ echo "To do so, configure.com can be run with -""Dusethreads""."
2432 $ echo "Note that Perl built with threading support runs slightly slower"
2433 $ echo "and uses more memory than plain Perl. The current implementation"
2434 $ echo "is believed to be stable, but it is fairly new, and so should be"
2435 $ echo "treated with caution."
2438 $ if f$type(usethreads) .nes. ""
2440 $ if usethreads .or. usethreads .eqs. "define" then bool_dflt="y"
2442 $! Catch cases where user specified ithreads or 5005threads but
2443 $! forgot -Dusethreads
2444 $ if f$type(useithreads) .nes. ""
2446 $ if useithreads .or. useithreads .eqs. "define" then bool_dflt="y"
2448 $ if f$type(use5005threads) .nes. ""
2450 $ if use5005threads .or. use5005threads .eqs. "define" then bool_dflt="y"
2452 $ echo "If this doesn't make any sense to you, just accept the default '" + bool_dflt + "'."
2453 $ rp = "Build a threading Perl? [''bool_dflt'] "
2458 $ ! Shall we do the 5.005-type threads, or IThreads?
2459 $ echo "Since release 5.6, Perl has had two different threading implementations,"
2460 $ echo "the newer interpreter-based version (ithreads) with one interpreter per"
2461 $ echo "thread, and the older 5.005 version (5005threads)."
2462 $ echo "The 5005threads version is effectively unmaintained and will probably be"
2463 $ echo "removed in Perl 5.10, so there should be no need to build a Perl using it"
2464 $ echo "unless needed for backwards compatibility with some existing 5.005threads"
2468 $ if f$type(useithreads) .nes. ""
2470 $ if useithreads .eqs. "undef" then bool_dflt="n"
2472 $ if f$type(use5005threads) .nes. ""
2474 $ if use5005threads .or. use5005threads .eqs. "define" then bool_dflt="n"
2476 $ rp = "Use the newer intepreter-based ithreads? [''bool_dflt'] "
2481 $ use_5005_threads="N"
2483 $ use_5005_threads="Y"
2485 $ ! Are they on VMS 7.1 or greater?
2486 $ IF "''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.1"
2489 $ echo "Threaded Perl can be linked to use system upcalls on your system. This feature"
2490 $ echo "allows the thread scheduler to be made aware of system events (such as I/O)"
2491 $ echo "so as to prevent a single thread from blocking all the threads in a program,"
2492 $ echo "even on a single-processor machine."
2494 $ IF f$type(usethreadupcalls) .NES. ""
2496 $ if .not. usethreadupcalls .or. usethreadupcalls .eqs. "undef" then bool_dflt="n"
2498 $ rp = "Enable thread upcalls? [''bool_dflt'] "
2502 $ thread_upcalls = "MTU=MTU=1"
2503 $ usethreadupcalls = "define"
2504 $ ! Are they on alpha or itanium?
2505 $ IF (archname .NES. "VMS_VAX") .AND. ("''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.2")
2508 $ echo "Threaded Perl can be linked to use multiple kernel threads on your system."
2509 $ echo "This feature allows multiple user threads to make use of multiple CPUs on"
2510 $ echo "a multi-processor machine."
2512 $ IF f$type(usekernelthreads) .nes. ""
2514 $ if usekernelthreads .or. usekernelthreads .eqs. "define" then bool_dflt="y"
2516 $ rp = "Enable multiple kernel threads? [''bool_dflt'] "
2520 $ thread_kernel = "MTK=MTK=1"
2521 $ usekernelthreads = "define"
2528 $ IF F$TYPE(usethreadupcalls) .EQS. "" THEN usethreadupcalls = "undef"
2529 $ IF F$TYPE(usekernelthreads) .EQS. "" THEN usekernelthreads = "undef"
2530 $ IF archname .NES. "VMS_VAX"
2534 $ echo "By default, perl (and pretty much everything else on VMS) uses"
2535 $ echo "case-insensitive linker symbols. Which is to say, when the"
2536 $ echo "underlying C code makes a call to a routine called Perl_foo in"
2537 $ echo "the source, the name in the object modules or shareable images"
2538 $ echo "is really PERL_FOO. There are some packages that use an"
2539 $ echo "embedded perl interpreter that instead require case-sensitive"
2540 $ echo "linker symbols."
2542 $ echo "If you have no idea what this means, and do not have"
2543 $ echo "any program requiring anything, choose the default."
2544 $ bool_dflt = be_case_sensitive
2545 $ if f$type(usecasesensitive) .nes. ""
2547 $ if usecasesensitive .or. usecasesensitive .eqs. "define" then bool_dflt = "y"
2548 $ if f$extract(0,1,f$edit(usecasesensitive,"collapse,upcase")).eqs."N" .or. usecasesensitive .eqs. "undef" then bool_dflt = "n"
2550 $ rp = "Build with case-sensitive symbols? [''bool_dflt'] "
2552 $ be_case_sensitive = ans
2555 $ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers on"
2556 $ echo "Alpha and Itanium, but if you need G_FLOAT for binary compatibility"
2557 $ echo "with an external library or existing data, you may wish to disable"
2558 $ echo "the IEEE math option."
2559 $ bool_dflt = use_ieee_math
2560 $ if f$type(useieee) .nes. ""
2562 $ if useieee .or. useieee .eqs. "define"
2569 $ rp = "Use IEEE math? [''bool_dflt'] "
2571 $ use_ieee_math = ans
2573 $ be_case_sensitive = "n"
2574 $ use_ieee_math = "n"
2577 $ usecasesensitive = "undef"
2578 $ if (use_ieee_math) then useieee = "define"
2579 $ if (be_case_sensitive) then usecasesensitive = "define"
2580 $! Unlink all versions?
2582 $ echo "By default, Perl's unlink() provides VMS-like behavior and only"
2583 $ echo "deletes the latest version of a file. Enabling this option builds"
2584 $ echo "Perl so that unlink() deletes all versions of a file."
2585 $ bool_dflt = unlink_all_versions
2586 $ if f$type(unlink_all_versions) .nes. ""
2588 $ if unlink_all_versions .or. unlink_all_versions .eqs. "define"
2595 $ rp = "Make unlink() delete all versions of a file? [''bool_dflt'] "
2597 $ unlink_all_versions = ans
2598 $ IF unlink_all_versions
2600 $ d_unlink_all_versions = "define"
2602 $ d_unlink_all_versions = "undef"
2607 $ echo "Your compiler may want other flags. For this question you should include"
2608 $ echo "/INCLUDE=(whatever) and /DEFINE=(whatever), flags and any other flags"
2609 $ echo "or qualifiers used by the compiler."
2611 $ echo "To use no flags, specify the word ""none""."
2612 $ dflt = user_c_flags
2613 $ rp = "Any additional cc flags? [''dflt'] "
2615 $ IF ans .EQS. "none" THEN ans = ""
2616 $ user_c_flags = "''ans'"
2618 $! Ask whether they want to use secure logical translation when tainting
2620 $ echo "As Perl starts up, it checks several logical names, such as"
2621 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2622 $ echo "of its behavior. For additional security, you may limit this"
2623 $ echo "process to executive- and kernel-mode translation when tainting"
2624 $ echo "is enabled. In this case, logical names normally skipped when"
2625 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2626 $ echo "If you do not choose to do this, the usual order of access modes"
2627 $ echo "is used for logical name translation."
2629 $ echo "This restriction does not apply to the %ENV hash or to implicit"
2630 $ echo "logical name translation during parsing of file specifications;"
2631 $ echo "these always use the normal sequence of access modes for logical"
2632 $ echo "name translation."
2634 $ if f$type(usesecurelog) .nes. ""
2636 $ if f$extract(0,1,f$edit(usesecurelog,"collapse,upcase")).eqs."N" .or. usesecurelog .eqs. "undef" then bool_dflt = "n"
2638 $ rp = "Use secure logical name translation? [''bool_dflt'] "
2640 $ d_secintgenv = ans
2641 $ usesecurelog = "undef"
2642 $ if (d_secintgenv) then usesecurelog = "define"
2644 $! Ask whether they want to default filetypes
2646 $ echo "When you pass the name of a program to Perl on the command line,"
2647 $ echo "it generally doesn't supply any defaults unless the -S command"
2648 $ echo "line switch is specified. In keeping with the VMS tradition of"
2649 $ echo "default file types, however, you can configure Perl to try default"
2650 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2651 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2652 $ echo "finally foo.com)."
2654 $ echo "This is currently broken in some configurations. Only enable it if"
2655 $ echo "you know what you are doing."
2657 $ if f$type(usedefaulttypes) .nes. ""
2659 $ if usedefaulttypes .or. usedefaulttypes .eqs. "define" then bool_dflt="y"
2661 $ rp = "Always use default file types? [''bool_dflt'] "
2663 $ d_alwdeftype = ans
2664 $ usedefaulttypes = "undef"
2665 $ if (d_alwdeftype) then usedefaulttypes = "define"
2667 $! determine whether to use malloc wrapping
2670 $ IF F$TYPE(usemallocwrap) .nes. ""
2672 $ if .NOT. usemallocwrap .or. usemallocwrap .eqs. "undef" then bool_dflt = "n"
2674 $ rp = "Do you wish to wrap malloc calls to protect against potential overflows? [''bool_dflt'] "
2677 $ THEN usemallocwrap = "define"
2678 $ ELSE usemallocwrap = "undef"
2681 $! Ask if they want to use perl's memory allocator
2683 $ echo "Perl has a built-in memory allocator that is tuned for normal"
2684 $ echo "memory usage. It is oftentimes better than the standard system"
2685 $ echo "memory allocator. It also has the advantage of providing memory"
2686 $ echo "allocation statistics, if you choose to enable them."
2688 $ IF F$TYPE(usemymalloc) .nes. ""
2690 $ if usemymalloc .or. usemymalloc .eqs. "define" then bool_dflt = "y"
2692 $ rp = "Do you wish to attempt to use the malloc that comes with ''package'? [''bool_dflt'] "
2697 $ IF use_debugging_perl
2700 $ echo "Perl can keep statistics on memory usage if you choose to use"
2701 $ echo "them. This is useful for debugging, but does have some"
2702 $ echo "performance overhead."
2704 $ rp = "Do you want the debugging memory allocator? [''bool_dflt'] "
2706 $ use_debugmalloc = ans
2708 $ ! Check which memory allocator we want
2710 $ echo "There are currently three different memory allocators: the"
2711 $ echo "default (which is a pretty good general-purpose memory manager),"
2712 $ echo "the TWO_POT allocator (which is optimized to save memory for"
2713 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save"
2714 $ echo "memory for smaller allocations). They're all good, but if your"
2715 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use"
2716 $ echo "PACK_MALLOC."
2718 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2720 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2721 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2724 $ known_extensions = ""
2726 $ OPEN/READ CONFIG 'manifestfound'
2728 $ READ/END_OF_FILE=end_ext/ERROR=end_ext CONFIG line
2729 $ IF F$EXTRACT(0,4,line) .NES. "ext/" .AND. -
2730 F$EXTRACT(0,5,line) .NES. "cpan/" THEN goto ext_loop
2731 $ line = F$EDIT(line,"COMPRESS")
2732 $ line = F$ELEMENT(0," ",line)
2733 $ IF F$EXTRACT(0,4,line) .EQS. "ext/"
2735 $ xxx = F$ELEMENT(1,"/",line)
2736 $ IF F$SEARCH("[-.ext]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2738 $ IF F$EXTRACT(0,5,line) .EQS. "cpan/"
2740 $ xxx = F$ELEMENT(1,"/",line)
2741 $ IF F$SEARCH("[-.cpan]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2743 $ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit
2745 $! (extspec = xxx) =~ tr!-!/!
2748 $ extension_dir_name = xxx
2749 $ replace_dash_with_slash:
2750 $ before = F$ELEMENT(idx, "-", xxx)
2751 $ IF before .EQS. "-" THEN goto end_replace_dash_with_slash
2752 $ IF extspec .NES. ""
2754 $ extspec = extspec + "/"
2756 $ extspec = extspec + before
2758 $ goto replace_dash_with_slash
2760 $ end_replace_dash_with_slash:
2762 $ xxx = known_extensions
2763 $ gosub may_already_have_extension
2767 $ gosub may_already_have_extension
2769 $ IF $STATUS .NE. 1 THEN goto ext_loop
2770 $ goto found_new_extension
2772 $ may_already_have_extension:
2773 $ idx = F$LOCATE(extspec, xxx)
2774 $ extlen = F$LENGTH(xxx)
2775 $ IF idx .EQ. extlen THEN return 1
2776 $! But "Flirble" may just be part of "Acme-Flirble"
2777 $ IF idx .GT. 0 .AND. F$EXTRACT(idx - 1, 1, xxx) .NES. " "
2779 $ xxx = F$EXTRACT(idx + F$LENGTH(extspec) + 1, extlen, xxx)
2780 $ GOTO may_already_have_extension
2782 $! But "Foo" may just be part of "Foo-Bar" so check for equality.
2783 $ xxx = F$EXTRACT(idx, extlen - idx, xxx)
2784 $ IF F$ELEMENT(0, " ", xxx) .EQS. extspec
2788 $ xxx = F$EXTRACT(F$LENGTH(extspec) + 1, extlen, xxx)
2789 GOTO may_already_have_extension
2792 $ found_new_extension:
2793 $ IF F$SEARCH("[-.ext.''extension_dir_name']*.xs") .EQS. "" .AND. F$SEARCH("[-.cpan.''extension_dir_name']*.xs") .EQS. ""
2795 $ nonxs_ext = nonxs_ext + " ''extspec'"
2797 $ known_extensions = known_extensions + " ''extspec'"
2804 $ DELETE/SYMBOL extspec
2805 $ DELETE/SYMBOL extlen
2806 $ DELETE/SYMBOL extension_dir_name
2807 $ known_extensions = F$EDIT(known_extensions,"TRIM,COMPRESS")
2808 $ dflt = known_extensions
2809 $ IF ccname .NES. "DEC" .AND. ccname .NES. "CXX"
2811 $ dflt = dflt - "POSIX" ! not with VAX C or GCC
2813 $ dflt = dflt - "ByteLoader" ! needs to be ported
2814 $ dflt = dflt - "DB_File" ! needs to be ported
2815 $ dflt = dflt - "GDBM_File" ! needs porting/special library
2816 $ dflt = dflt - "IPC/SysV" ! needs to be ported
2817 $ dflt = dflt - "NDBM_File" ! needs porting/special library
2818 $ dflt = dflt - "ODBM_File" ! needs porting/special library
2819 $ dflt = dflt - "Sys/Syslog" ! needs porting/special library "GDBM_File macro LOG_DEBUG"
2820 $ IF .NOT. Has_socketshr .AND. .NOT. Has_Dec_C_Sockets
2822 $ dflt = dflt - "Socket" ! optional on VMS
2824 $ dflt = dflt - "Win32API/File" - "Win32" ! need Dave Cutler's other project
2825 $ nonxs_ext = nonxs_ext - "Win32CORE"
2826 $ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
2827 $ nonxs_ext = F$EDIT(nonxs_ext,"TRIM,COMPRESS")
2829 $! Ask for their default list of extensions to build
2831 $ echo "It is time to specify which modules you want to build into"
2832 $ echo "perl. Most of these are standard and should be chosen, though"
2833 $ echo "you might, for example, want to build GDBM_File instead of"
2834 $ echo "SDBM_File if you have the GDBM library built on your machine."
2836 $ echo "Which modules do you want to build into perl?"
2839 $ dynamic_ext = F$EDIT(ans,"TRIM,COMPRESS")
2841 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2843 $ echo "Checking your ""make"" utilities..."
2844 $! If the 'build' that you use is not here add it and it's test
2845 $! switch to the _END_ of these strings (and increment max_build)
2846 $! (e.g. builders = builders + "/FOOMAKE"
2847 $! probers = probers + " -fooVersionSwitch"
2848 $! ) & please let me know about it.
2849 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2850 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2853 $ orig_dflt = f$edit(builder,"UPCASE")
2854 $ if orig_dflt .eqs. "" then orig_dflt = "MMK"
2857 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2858 $ WRITE CONFIG "dont_make_anything_yet:"
2859 $ WRITE CONFIG F$FAO("!_")
2862 $ messages = F$ENVIRONMENT("MESSAGE")
2864 $ build = F$ELEMENT(n,"/",builders)
2865 $ probe = F$ELEMENT(n,"!",probers)
2866 $ echo "Testing whether you have ''build' on your system..."
2868 $! Noted with GNU Make version 3.60 that the $status and $severity
2869 $! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2870 $! $SEVERITY == "4".
2873 $ ON CONTROL_Y THEN GOTO Reenable_messages_build
2874 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
2876 $ IF ($SEVERITY .EQ. 1) ! not adequate?
2879 $ IF (build .EQS. orig_dflt)
2881 $ default_set = "TRUE"
2884 $ ok_builders = ok_builders + " " + build
2885 $ IF (.NOT. default_set) THEN dflt = build
2889 $Reenable_messages_build:
2890 $ SET MESSAGE 'messages'
2892 $ on control_y then goto clean_up
2894 $ IF (n .LT. max_build) THEN GOTO Build_probe
2897 $ IF (ok_builders .NES. "")
2899 $ echo "Here is the list of builders you can apparently use:"
2900 $ echo "(",ok_builders," )"
2901 $ rp = "Which """"make"""" utility do you wish to use? [''dflt'] "
2903 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2904 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2913 %Config-E-VMS, ERROR:
2914 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
2915 utility of some sort and after checking my "builders" list I cannot find
2916 the symbol or command you use on your system to compile programs.
2919 $ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
2920 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2921 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2924 $ echo "I do not know where ""make"" is, and my life depends on it."
2925 $ echo "Go find a make program or fix your DCL$PATH setting!"
2926 $ echo "ABORTING..."
2927 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2929 $ EXIT 2 !$STATUS = "%X00000002" (error)
2935 $ DELETE/NOLOG/NOCONFIRM Makefile.;
2941 There seems to be trouble. I just tried to create a file in
2943 $ echo4 'F$ENVIRONMENT("DEFAULT")'
2946 but was unsuccessful. I am stopping now. Please check that directories'
2947 PROTECTION bits. I will leave you in the directory where you started
2950 $ echo4 "ABORTING..."
2956 $! echo " Very well I will proceed with ""''build'"""
2957 $ make = F$EDIT(build,"UPCASE")
2959 $!: locate the preferred pager for this system
2960 $!pagers = "most|more|less|type/page"
2961 $ IF osvers .GES. "V6.1"
2963 $ dflt = "type/page=save=10"
2965 $ dflt = "type/page"
2967 $! assume that the presence of a most symbol indicates the presence
2969 $ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most"
2970 $ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager
2971 $ rp="What pager is used on your system? [''dflt'] "
2975 $! update makefile here
2976 $! echo4 "Updating makefile..."
2978 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2980 $ makefile = "" !wrt MANIFEST dir
2981 $ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
2982 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
2983 $ Makefile_SH = "descrip_mms.template"
2985 $ makefile = " -f Makefile." !wrt MANIFEST dir
2986 $ UUmakefile = "[-]Makefile." !wrt CWD dir
2987 $ DEFmakefile = "Makefile." !wrt DEF dir (?)
2988 $ Makefile_SH = "Makefile.in"
2991 $ IF macros .NES. ""
2993 $ tmp = F$LENGTH(macros)
2994 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2995 $ macros = "/macro=(" + macros + ")"
2997 $! Build up the extra C flags
3001 $ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm"
3003 $ IF (archname.EQS."VMS_IA64")
3005 $ extra_flags = "''extra_flags'" + "/float=g_float"
3008 $ IF be_case_sensitive
3010 $ extra_flags = "''extra_flags'" + "/Names=As_Is"
3012 $ extra_flags = "''extra_flags'" + "''user_c_flags'"
3014 $ min_pgflquota = "100000"
3015 $ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
3016 $ IF pgflquota .LES. min_pgflquota
3018 $ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
3019 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
3022 $ echo4 "Continuing..."
3024 $ echo4 "ABORTING..."
3029 $! PerlIO abstraction
3032 $ IF F$TYPE(useperlio) .NES. ""
3034 $ if f$extract(0,1,f$edit(useperlio,"collapse,upcase")) .eqs. "N" .or. useperlio .eqs. "undef" then bool_dflt = "n"
3038 $ echo "Previous versions of ''package' used the standard IO mechanisms as"
3041 defined in <stdio.h>. Versions 5.003_02 and later of perl allow
3042 alternate IO mechanisms via the PerlIO abstraction layer, but the
3043 stdio mechanism is still available if needed. The abstraction layer
3044 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
3045 Using PerlIO with sfio may cause problems with some extension modules.
3048 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
3050 $ rp = "Use the PerlIO abstraction layer? [''bool_dflt'] "
3054 $ useperlio = "define"
3056 $ echo "Ok, doing things the stdio way."
3057 $ useperlio = "undef"
3061 $ echo4 "Checking the C run-time library."
3063 $! Former SUBCONFIGURE.COM
3065 $! - build a config.sh for VMS Perl.
3066 $! - use built config.sh to take config_h.SH -> config.h
3067 $! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
3068 $! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
3069 $! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
3071 $! Note for folks from other platforms changing things in here:
3073 $! Fancy changes (based on compiler capabilities or VMS version or
3074 $! whatever) are tricky, so go ahead and punt on those.
3076 $! Simple changes, though (say, always setting something to 1, or undef,
3077 $! or something like that) are straightforward. Adding a new constant
3078 $! item for the ultimately created config.sh requires at least one
3079 $! (possibly more) line(s) to this file.
3081 $! Add a line in the format:
3083 $! $ WC "foo='undef'"
3085 $! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
3086 $! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
3087 $! is sorted ASCII and corresponds to the output of config.sh in the
3088 $! Bourne shell version of Configure).
3089 $! Be very careful with quoting, as it can be tricky.
3090 $! For example if instead of a constant string like 'undef' or 'define'
3091 $! you wanted to add something to VMS's config.sh that looks like:
3095 $! then add a line that looks like this before the
3096 $! '##END WRITE NEW CONSTANTS HERE##' tagged line:
3098 $! $ WC "blank_string='" + "'"
3100 $! (+ is the string concatenator and "''var'" has the effect
3101 $! of "${var}" in perl or sh, but "'const'" is not interpolated).
3103 $! Note that unitialized variables, such as a line like:
3105 $! $ WC "new_var='" + new_var + "'"
3107 $! should be avoided unless new_var has a value assigned prior
3108 $! to that line (think of perl's -w warnings).
3110 $! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
3114 $ vms_ver = F$EXTRACT(1,3, osvers)
3115 $ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
3116 $ MCC = f$edit(mcc, "UPCASE")
3117 $ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
3118 $ IF ccname .EQS. "DEC"
3120 $ Checkcc := "''Mcc'/prefix=all"
3122 $ IF ccname .EQS. "CXX"
3126 $ Checkcc := "''Mcc'"
3129 $ ccflags = ccflags + extra_flags
3130 $ IF be_case_sensitive
3132 $ d_vms_be_case_sensitive = "define"
3134 $ d_vms_be_case_sensitive = "undef"
3136 $! Some constant defaults.
3137 $ hwname = f$getsyi("HW_NAME")
3138 $ myname = myhostname
3139 $ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
3144 $! FIXME -- This section does not really handle all the different permutations
3145 $! of 64-bitness, and it does not provide for the /POINTER_SIZE=64 compiler
3146 $! option that would be necessary to support the "explicit 64-bit interfaces"
3147 $! promised by -Dusemorebits.
3149 $ usemorebits = "undef"
3150 $ IF use64bitint .OR. use64bitint .EQS. "define"
3152 $ use64bitint = "define"
3153 $ ivdformat="""Ld"""
3154 $ uvuformat="""Lu"""
3155 $ uvoformat="""Lo"""
3156 $ uvxformat="""Lx"""
3157 $ uvXUformat="""LX"""
3159 $ use64bitint = "undef"
3160 $ ivdformat="""ld"""
3161 $ uvuformat="""lu"""
3162 $ uvoformat="""lo"""
3163 $ uvxformat="""lx"""
3164 $ uvXUformat="""lX"""
3166 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
3168 $ uselongdouble = "define"
3170 $ nveformat="""Le"""
3171 $ nvfformat="""Lf"""
3172 $ nvgformat="""Lg"""
3174 $ uselongdouble = "undef"
3179 $ IF use64bitall .OR. use64bitall .EQS. "define"
3181 $ use64bitall = "define"
3183 $ use64bitall = "undef"
3185 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
3187 $ uselargefiles = "define"
3189 $ uselargefiles = "undef"
3192 $ usemymalloc = "undef"
3193 $ if mymalloc then usemymalloc = "define"
3197 $ IF (sharedperl .AND. archname .EQS. "VMS_AXP")
3205 $ IF (sharedperl .AND. archname .EQS. "VMS_IA64")
3220 $ dlobj="dl_vms''obj_ext'"
3222 $ cppstdin="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
3224 $ cpprun="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
3232 $ THEN d_mymalloc="define"
3233 $ ELSE d_mymalloc="undef"
3238 $ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
3239 $ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
3241 $ IF ((use_threads) .AND. (vms_ver .LES. "6.2"))
3243 $ 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"
3247 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
3254 $! perllibs should be libs with all non-core libs (such as gdbm) removed.
3259 $ IF archname .NES. "VMS_VAX"
3261 $ d_PRId64 = "define"
3262 $ d_PRIu64 = "define"
3263 $ d_PRIo64 = "define"
3264 $ d_PRIx64 = "define"
3265 $ d_PRIXU64 = "define"
3266 $ sPRId64 = """Ld"""
3267 $ sPRIXU64 = """LX"""
3268 $ sPRIi64 = """Li"""
3269 $ sPRIo64 = """Lo"""
3270 $ sPRIu64 = """Lu"""
3271 $ sPRIx64 = """Lx"""
3273 $ quadtype = "long long"
3274 $ uquadtype = "unsigned long long"
3277 $ d_frexpl = "define"
3278 $ d_modfl = "define"
3279 $ d_modflproto = "define"
3281 $ d_PRId64 = "undef"
3282 $ d_PRIXU64 = "undef"
3283 $ d_PRIu64 = "undef"
3284 $ d_PRIo64 = "undef"
3285 $ d_PRIx64 = "undef"
3287 $ sPRIXU64 = """lX"""
3293 $ quadtype = "undef"
3294 $ uquadtype = "undef"
3295 $ quadkind = "undef"
3297 $ d_frexpl = "undef"
3299 $ d_modflproto = "undef"
3302 $ IF useieee .OR. useieee .EQS. "define"
3304 $ d_isnan = "define"
3305 $ d_isnanl = "define"
3308 $ d_isnanl = "undef"
3311 $! Now some that we build up
3315 $ IF use_5005_threads
3317 $ arch = "''arch'-thread"
3318 $ archname = "''archname'-thread"
3319 $ d_old_pthread_create_joinable = "undef"
3320 $ old_pthread_create_joinable = " "
3321 $ use5005threads = "define"
3322 $ useithreads = "undef"
3324 $ arch = "''arch'-ithread"
3325 $ archname = "''archname'-ithread"
3326 $ d_old_pthread_create_joinable = "undef"
3327 $ old_pthread_create_joinable = " "
3328 $ use5005threads = "undef"
3329 $ useithreads = "define"
3332 $ d_old_pthread_create_joinable = "undef"
3333 $ old_pthread_create_joinable = " "
3334 $ use5005threads = "undef"
3335 $ useithreads = "undef"
3338 $! Some that we need to invoke the compiler for
3341 $! handy construction aliases/symbols
3343 $ OS := "open/write CONFIG []try.c"
3344 $ WS := "write CONFIG"
3345 $ CS := "close CONFIG"
3346 $ DS := "delete/nolog/noconfirm []try.*;*"
3348 $ good_compile = %X10B90001
3349 $ IF ccname .EQS. "GCC"
3351 $ open/write OPTCHAN []try.opt
3352 $ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
3353 $ write OPTCHAN "Sys$Share:VAXCRTL/Share"
3356 $ good_compile = %X10000001
3358 $ IF ccname .EQS. "CXX"
3360 $ good_compile = %X15F60001
3362 $ good_link = %X10000001
3363 $ tmp = "" ! null string default
3365 $ GOTO beyond_compile_ok
3367 $! Check for type sizes
3372 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3373 $ WS "#include <stdlib.h>"
3375 $ WS "#include <stdio.h>"
3378 $ WS "printf(""%d\n"", sizeof(''tmp'));"
3385 $!: locate header file
3389 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3390 $ WS "#include <stdlib.h>"
3392 $ WS "#include <stdio.h>"
3393 $ WS "#include <''tmp'>"
3396 $ WS "printf(""define\n"");"
3403 $!: define an alternate in-header-list? function
3407 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3409 $ echo4 "<''tmp'> found."
3412 $ echo4 "<''tmp'> NOT found."
3417 $!: define an is-in-libc? function
3420 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3422 $ echo4 "''tmp'() found."
3425 $ echo4 "''tmp'() NOT found."
3430 $!: define a shorthand compile call
3434 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3436 $ OPEN/WRITE CONFIG []try.out
3437 $ DEFINE/USER_MODE SYS$ERROR CONFIG
3438 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
3441 $ OPEN/READ CONFIG []try.out
3444 $ DELETE/NOLOG/NOCONFIRM []try.out;
3445 $ DELETE/NOLOG/NOCONFIRM []try.exe;
3447 $ tmp = "" ! null string default
3453 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3454 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3458 $ 'ld' try.obj,try.opt/opt
3459 $ link_status = $status
3462 $ link_status = $status
3465 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
3468 $!: define a shorthand compile call for compilations that should be ok.
3470 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3471 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3474 $ compile_status = $status
3476 $ DELETE/NOLOG/NOCONFIRM try.c;
3481 $! Check for __STDC__
3484 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3485 $ WS "#include <stdlib.h>"
3487 $ WS "#include <stdio.h>"
3490 $ WS "#ifdef __STDC__"
3491 $ WS "printf(""42\n"");"
3493 $ WS "printf(""1\n"");"
3500 $ IF F$INTEGER(tmp) .eq. 42
3502 $ echo4 "Your C compiler and pre-processor defines the symbol:"
3506 $! Check for double size
3508 $ echo4 "Checking to see how big your double precision numbers are..."
3510 $ GOSUB type_size_check
3512 $ echo "Your double is ''doublesize' bytes long."
3514 $! Check for long double size
3517 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3518 $ WS "#pragma message disable ALL" ! VAX compilers may have distracting informationals
3519 $ WS "#include <stdlib.h>"
3521 $ WS "#include <stdio.h>"
3524 $ WS "printf(""%d\n"", sizeof(long double));"
3528 $ echo4 "Checking to see if you have long double..."
3530 $ IF link_status .NE. good_link
3534 $ echo "You do not have long double."
3536 $ echo "You have long double."
3537 $ echo4 "Checking to see how big your long doubles are..."
3540 $ d_longdbl = "define"
3541 $ echo "Your long doubles are ''longdblsize' bytes long."
3544 $ IF d_longdbl .OR. d_longdbl .EQS. "define"
3546 $ d_PRIEUldbl = "define"
3547 $ d_PRIFUldbl = "define"
3548 $ d_PRIGUldbl = "define"
3549 $ d_PRIeldbl = "define"
3550 $ d_PRIfldbl = "define"
3551 $ d_PRIgldbl = "define"
3552 $ sPRIEUldbl = """LE"""
3553 $ sPRIFUldbl = """LF"""
3554 $ sPRIGUldbl = """LG"""
3555 $ sPRIeldbl = """Le"""
3556 $ sPRIfldbl = """Lf"""
3557 $ sPRIgldbl = """Lg"""
3559 $ d_PRIEUldbl = "undef"
3560 $ d_PRIFUldbl = "undef"
3561 $ d_PRIGUldbl = "undef"
3562 $ d_PRIeldbl = "undef"
3563 $ d_PRIfldbl = "undef"
3564 $ d_PRIgldbl = "undef"
3572 $ d_SCNfldbl = d_PRIfldbl
3573 $ sSCNfldbl = sPRIfldbl ! expect consistency
3575 $!: check for long long
3577 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3578 $ WS "#include <stdlib.h>"
3580 $ WS "#include <stdio.h>"
3583 $ WS "printf(""%d\n"", sizeof(long long));"
3587 $ echo4 "Checking to see if you have long long..."
3589 $ IF link_status .NE. good_link
3592 $ d_longlong="undef"
3593 $ echo "You do not have long long."
3595 $ echo "You have long long."
3596 $ echo4 "Checking to see how big your long longs are..."
3598 $ longlongsize = tmp
3599 $ d_longlong = "define"
3600 $ echo "Your long longs are ''longlongsize' bytes long."
3603 $! Check the prototype for getgid
3605 $ echo "Looking for the type for group ids returned by getgid()."
3607 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3608 $ WS "#include <stdlib.h>"
3610 $ WS "#include <stdio.h>"
3611 $ WS "#include <types.h>"
3619 $ IF compile_status .NE. good_compile
3621 $! Okay, gid_t failed. Must be unsigned int
3622 $ gidtype = "unsigned int"
3623 $ echo4 "assuming ""''gidtype'""."
3626 $ echo4 "gid_t found."
3629 $! Check to see if we've got dev_t
3631 $ echo "Looking for the type for dev."
3633 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3634 $ WS "#include <stdlib.h>"
3636 $ WS "#include <stdio.h>"
3637 $ WS "#include <types.h>"
3645 $ IF compile_status .NE. good_compile
3647 $! Okay, dev_t failed. Must be unsigned int
3648 $ devtype = "unsigned int"
3649 $ echo4 "assuming ""''devtype'""."
3652 $ echo4 "dev_t found."
3655 $! Check to see if we've got unistd.h (which we ought to, but you never know)
3662 $! Check to see if we've got utime.h (which we should use if we have)
3669 $! do we have getppid()?
3671 $ IF i_unistd .EQS. "define"
3674 $ WS "#include <stdio.h>"
3675 $ WS "#include <unistd.h>"
3677 $ WS "printf(""%d\n"",getppid());"
3685 $ d_getppid = "undef"
3688 $!: see if this is a libutil.h system
3694 $! Check to see if we've got shadow.h (probably not, but...)
3700 $! Check to see if we've got socks.h (probably not, but...)
3706 $! Check the prototype for select
3708 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3711 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3712 $ WS "#include <stdlib.h>"
3714 $ WS "#include <stdio.h>"
3715 $ WS "#include <types.h>"
3716 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3719 $ WS "#include <socketshr.h>"
3721 $ WS "#include <time.h>"
3722 $ WS "#include <socket.h>"
3729 $ WS "bar = select(2, foo, foo, foo, NULL);"
3734 $ IF compile_status .NE. good_compile
3736 $! Okay, select failed. Must be an int *
3737 $ selecttype = "int *"
3738 $ echo4 "select() NOT found."
3740 $ selecttype="fd_set *"
3741 $ echo4 "select() found."
3744 $ ! No sockets, so stick in an int * : no select, so pick a harmless default
3745 $ selecttype = "int *"
3748 $! Check to see if fd_set exists
3750 $ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3752 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3753 $ WS "#include <stdlib.h>"
3755 $ WS "#include <stdio.h>"
3756 $ WS "#include <types.h>"
3759 $ WS "#include <socketshr.h>"
3761 $ IF Has_Dec_C_Sockets
3763 $ WS "#include <time.h>"
3764 $ WS "#include <socket.h>"
3774 $ IF compile_status .ne. good_compile
3776 $! Okay, fd_set failed. Must not exist
3777 $ d_fd_set = "undef"
3778 $ echo4 "Hmm, your compiler has some difficulty with fd_set."
3781 $ echo4 "Well, your system knows about the normal fd_set typedef..."
3784 $! Check for inttypes.h
3786 $ tmp = "inttypes.h"
3790 $! Check to see if off64_t exists
3792 $ echo4 "Checking to see if you have off64_t..."
3794 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3795 $ WS "#include <stdlib.h>"
3797 $ WS "#include <stdio.h>"
3798 $ WS "#include <types.h>"
3799 $ WS "#''i_inttypes' IIH"
3801 $ WS "#include <inttypes.h>"
3810 $ IF compile_status .EQ. good_compile
3812 $ d_off64_t="define"
3813 $ echo "You have off64_t."
3815 $ d_off64_t = "undef"
3816 $ echo "You do not have off64_t."
3819 $! Check to see if fpos64_t exists
3821 $ echo4 "Checking to see if you have fpos64_t..."
3823 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3824 $ WS "#include <stdlib.h>"
3826 $ WS "#include <stdio.h>"
3827 $ WS "#include <types.h>"
3828 $ WS "#''i_inttypes' IIH"
3830 $ WS "#include <inttypes.h>"
3834 $ WS "fpos64_t bar;"
3839 $ IF compile_status .EQ. good_compile
3841 $ d_fpos64_t="define"
3842 $ echo "You have fpos64_t."
3844 $ d_fpos64_t = "undef"
3845 $ echo "You do not have fpos64_t."
3848 $! Check to see if int64_t exists
3850 $ echo4 "Checking to see if you have int64_t..."
3852 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3853 $ WS "#include <stdlib.h>"
3855 $ WS "#include <stdio.h>"
3856 $ WS "#include <types.h>"
3857 $ WS "#''i_inttypes' IIH"
3859 $ WS "#include <inttypes.h>"
3868 $ IF compile_status .EQ. good_compile
3870 $ d_int64_t="define"
3871 $ echo "You have int64_t."
3873 $ d_int64_t = "undef"
3874 $ echo "You do not have int64_t."
3877 $! Check to see if fseeko exists
3880 $ WS "#include <stdio.h>"
3883 $ WS "FILE *f=NULL;"
3884 $ WS "fseeko(f,(off_t)0,SEEK_SET);"
3892 $! Check to see if ftello exists
3895 $ WS "#include <stdio.h>"
3898 $ WS "FILE *f=NULL; off_t o=0;"
3907 $!: see if this is a netdb.h system
3908 $ IF Has_Dec_C_Sockets
3915 $! Check for h_errno
3917 $ echo4 "Checking to see if you have h_errno..."
3919 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3920 $ WS "#include <stdlib.h>"
3922 $ WS "#include <stdio.h>"
3923 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3924 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
3932 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3935 $ echo "You have h_errno."
3938 $ echo "You do not have h_errno."
3941 $! Check to see if gethostname exists
3943 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3946 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3947 $ WS "#include <stdlib.h>"
3949 $ WS "#include <stdio.h>"
3950 $ WS "#include <types.h>"
3953 $ WS "#include <socketshr.h>"
3955 $ WS "#include <time.h>"
3956 $ WS "#include <socket.h>"
3960 $ WS "char name[100];"
3961 $ WS "int bar, baz;"
3963 $ WS "baz = gethostname(name, bar);"
3968 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3970 $ d_gethname="define"
3971 $ echo4 "gethostname() found."
3973 $ d_gethname="undef"
3976 $ ! No sockets, so no gethname
3977 $ d_gethname = "undef"
3980 $! Check for sys/file.h
3982 $ tmp = "sys/file.h"
3987 $! Check for sys/ioctl.h
3989 $ tmp = "sys/ioctl.h"
3993 $! Check for sys/utsname.h
3995 $ tmp = "sys/utsname.h"
3997 $ i_sysutsname = tmp
3999 $! Check for syslog.h
4011 $! Check for sys/uio.h
4017 $! Check for sys/mode.h
4019 $ tmp = "sys/mode.h"
4025 $ tmp = "sys/poll.h"
4029 $! Check for sys/access.h
4031 $ tmp = "sys/access.h"
4035 $! Check for sys/security.h
4037 $ tmp = "sys/security.h"
4041 $! Check for fcntl.h
4050 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4051 $ WS "#include <stdlib.h>"
4053 $ WS "#include <stdio.h>"
4054 $ WS "#include <fcntl.h>"
4057 $ WS "fcntl(1,2,3);"
4065 $! Check for fcntl locking capability
4067 $ echo4 "Checking if fcntl-based file locking works... "
4069 $ IF d_fcntl .EQS. "define"
4072 $ WS "#include <stdio.h>"
4073 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4074 $ WS "#include <stdlib.h>"
4076 $ WS "#include <fcntl.h>"
4077 $ WS "#include <unistd.h>"
4079 $ WS "#if defined(F_SETLK) && defined(F_SETLKW)"
4080 $ WS " struct flock flock;"
4081 $ WS " int retval, fd;"
4082 $ WS " fd = open(""[-]perl.c"", O_RDONLY);"
4083 $ WS " flock.l_type = F_RDLCK;"
4084 $ WS " flock.l_whence = SEEK_SET;"
4085 $ WS " flock.l_start = flock.l_len = 0;"
4086 $ WS " retval = fcntl(fd, F_SETLK, &flock);"
4088 $ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));"
4090 $ WS " printf(""undef\n"");"
4095 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4098 $ IF tmp .EQS. "define"
4100 $ echo4 "Yes, it seems to work."
4102 $ echo4 "Nope, it didn't work."
4105 $ echo4 "I'm unable to compile the test program, so I'll assume not."
4109 $ echo4 "Nope, since you don't even have fcntl()."
4111 $ d_fcntl_can_lock = tmp
4116 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4117 $ WS "#include <stdlib.h>"
4119 $ WS "#include <string.h>"
4122 $ WS "char * place;"
4123 $ WS "place = memchr(""foo"", 47, 3);"
4131 $! Check for strtoull
4134 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4135 $ WS "#include <stdlib.h>"
4137 $ WS "#include <string.h>"
4140 $ WS "unsigned __int64 result;"
4141 $ WS "result = strtoull(""123123"", NULL, 10);"
4149 $! Check for strtouq
4152 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4153 $ WS "#include <stdlib.h>"
4155 $ WS "#include <string.h>"
4158 $ WS "unsigned __int64 result;"
4159 $ WS "result = strtouq(""123123"", NULL, 10);"
4167 $! Check for strtoll
4170 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4171 $ WS "#include <stdlib.h>"
4173 $ WS "#include <string.h>"
4176 $ WS "__int64 result;"
4177 $ WS "result = strtoll(""123123"", NULL, 10);"
4188 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4189 $ WS "#include <stdlib.h>"
4191 $ WS "#include <string.h>"
4194 $ WS "__int64 result;"
4195 $ WS "result = strtoq(""123123"", NULL, 10);"
4203 $! Check for strtold
4206 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4207 $ WS "#include <stdlib.h>"
4209 $ WS "#include <string.h>"
4212 $ WS "long double result;"
4213 $ WS "result = strtold(""123123"", NULL, 10);"
4224 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4225 $ WS "#include <stdlib.h>"
4227 $ WS "#include <string.h>"
4230 $ WS " __int64 result;"
4231 $ WS "result = atoll(""123123"");"
4242 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4243 $ WS "#include <stdlib.h>"
4245 $ WS "#include <string.h>"
4249 $ WS "result = atolf(""123123"");"
4260 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4261 $ WS "#include <stdlib.h>"
4263 $ WS "#include <stdio.h>"
4266 $ WS "access(""foo"", F_OK);"
4277 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4278 $ WS "#include <stdlib.h>"
4280 $ WS "#include <stdio.h>"
4281 $ WS "#include <strings.h>"
4284 $ WS "char foo[10];"
4285 $ WS "bzero(foo, 10);"
4296 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4297 $ WS "#include <stdlib.h>"
4299 $ WS "#include <stdio.h>"
4300 $ WS "#include <strings.h>"
4303 $ WS "char foo[10], bar[10];"
4304 $ WS "bcopy(""foo"", bar, 3);"
4312 $! Check for mkstemp
4315 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4316 $ WS "#include <stdlib.h>"
4318 $ WS "#include <stdio.h>"
4321 $ WS "mkstemp(""foo"");"
4329 $! Check for mkstemps
4332 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4333 $ WS "#include <stdlib.h>"
4335 $ WS "#include <stdio.h>"
4338 $ WS "mkstemps(""foo"", 1);"
4346 $! Check for mkdtemp
4349 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4350 $ WS "#include <stdlib.h>"
4352 $ WS "#include <stdio.h>"
4355 $ WS "mkdtemp(""foo"");"
4365 $ if i_poll .eqs. "define"
4368 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4369 $ WS "#include <stdlib.h>"
4371 $ WS "#include <poll.h>"
4374 $ WS "struct pollfd pfd;"
4375 $ WS "int count=poll(&pfd,1,0);"
4386 $! Check for setvbuf
4389 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4390 $ WS "#include <stdlib.h>"
4392 $ WS "#include <stdio.h>"
4396 $ WS "char Buffer[99];"
4397 $ WS "foo = fopen(""foo"", ""r"");"
4398 $ WS "setvbuf(foo, Buffer, 0, 0);"
4406 $! see if sfio.h is available
4407 $! see if sfio library is available
4408 $! Ok, but do we want to use it.
4409 $! IF F$TYPE(usesfio) .EQS. "" THEN usesfio = "undef"
4410 $! IF val .EQS. "define"
4412 $! IF usesfio .EQS. "define"
4416 $! echo "''package' can use the sfio library, but it is experimental."
4417 $! IF useperlio .EQS. "undef"
4419 $! echo "For sfio also the PerlIO abstraction layer is needed."
4420 $! echo "Earlier you said you would not want that."
4422 $! rp="You seem to have sfio available, do you want to try using it? [''dflt'] "
4424 $! IF ans .EQS. "" THEN ans = dflt
4427 $! echo "Ok, turning on both sfio and PerlIO, then."
4428 $! useperlio="define"
4431 $! echo "Ok, avoiding sfio this time. I'll use stdio instead."
4435 $! IF usesfio .EQS. "define"
4437 $! echo4 "Sorry, cannot find sfio on this machine."
4438 $! echo4 "Ignoring your setting of usesfio=''usesfio'."
4446 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4447 $ WS "#include <stdlib.h>"
4449 $ WS "#include <stdio.h>"
4452 $ WS "setenv(""FOO"", ""BAR"", 0);"
4460 $! Check for setproctitle
4463 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4464 $ WS "#include <stdlib.h>"
4466 $ WS "#include <stdio.h>"
4469 $ WS "setproctitle(""%s"", ""FOO"");"
4473 $ tmp = "setproctitle"
4475 $ d_setproctitle = tmp
4477 $! Check for <netinet/in.h>
4479 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4481 $ tmp = "netinet/in.h"
4488 $! Check for <netinet/tcp.h>
4490 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4492 $ tmp = "netinet/tcp.h"
4494 $ i_netinettcp = tmp
4496 $ i_netinettcp="undef"
4499 $! Check for endhostent
4501 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4504 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4505 $ WS "#include <stdlib.h>"
4507 $ WS "#include <stdio.h>"
4509 $ THEN WS "#include <socketshr.h>"
4510 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4514 $ WS "endhostent();"
4518 $ tmp = "endhostent"
4525 $! Check for endnetent
4527 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4530 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4531 $ WS "#include <stdlib.h>"
4533 $ WS "#include <stdio.h>"
4535 $ THEN WS "#include <socketshr.h>"
4536 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4551 $! Check for endprotoent
4553 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4556 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4557 $ WS "#include <stdlib.h>"
4559 $ WS "#include <stdio.h>"
4561 $ THEN WS "#include <socketshr.h>"
4562 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4566 $ WS "endprotoent();"
4570 $ tmp = "endprotoent"
4577 $! Check for endservent
4579 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4582 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4583 $ WS "#include <stdlib.h>"
4585 $ WS "#include <stdio.h>"
4587 $ THEN WS "#include <socketshr.h>"
4588 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4592 $ WS "endservent();"
4596 $ tmp = "endservent"
4603 $! Check for sethostent
4605 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4608 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4609 $ WS "#include <stdlib.h>"
4611 $ WS "#include <stdio.h>"
4613 $ THEN WS "#include <socketshr.h>"
4614 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4618 $ WS "sethostent(1);"
4622 $ tmp = "sethostent"
4629 $! Check for setnetent
4631 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4634 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4635 $ WS "#include <stdlib.h>"
4637 $ WS "#include <stdio.h>"
4639 $ THEN WS "#include <socketshr.h>"
4640 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4644 $ WS "setnetent(1);"
4655 $! Check for setprotoent
4657 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4660 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4661 $ WS "#include <stdlib.h>"
4663 $ WS "#include <stdio.h>"
4665 $ THEN WS "#include <socketshr.h>"
4666 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4670 $ WS "setprotoent(1);"
4674 $ tmp = "setprotoent"
4681 $! Check for setservent
4683 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4686 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4687 $ WS "#include <stdlib.h>"
4689 $ WS "#include <stdio.h>"
4691 $ THEN WS "#include <socketshr.h>"
4692 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4696 $ WS "setservent(1);"
4700 $ tmp = "setservent"
4707 $! Check for gethostent
4709 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4712 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4713 $ WS "#include <stdlib.h>"
4715 $ WS "#include <stdio.h>"
4717 $ THEN WS "#include <socketshr.h>"
4718 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4722 $ WS "gethostent();"
4726 $ tmp = "gethostent"
4733 $! Check for getnetent
4735 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4738 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4739 $ WS "#include <stdlib.h>"
4741 $ WS "#include <stdio.h>"
4743 $ THEN WS "#include <socketshr.h>"
4744 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4759 $! Check for getprotoent
4761 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4764 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4765 $ WS "#include <stdlib.h>"
4767 $ WS "#include <stdio.h>"
4769 $ THEN WS "#include <socketshr.h>"
4770 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4774 $ WS "getprotoent();"
4778 $ tmp = "getprotoent"
4785 $! Check for getservent
4787 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4790 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4791 $ WS "#include <stdlib.h>"
4793 $ WS "#include <stdio.h>"
4795 $ THEN WS "#include <socketshr.h>"
4796 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4800 $ WS "getservent();"
4804 $ tmp = "getservent"
4811 $! Check for nanosleep
4814 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4815 $ WS "#include <stdlib.h>"
4817 $ WS "#include <time.h>"
4820 $ WS "int asleep = nanosleep(NULL,NULL);"
4828 $! Check for socklen_t
4830 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4832 $ echo4 "Checking to see if you have socklen_t..."
4834 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4835 $ WS "#include <stdlib.h>"
4837 $ WS "#include <stdio.h>"
4839 $ THEN WS "#include <socketshr.h>"
4840 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4844 $ WS "socklen_t x = 16;"
4849 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4851 $ d_socklen_t="define"
4852 $ echo "You have socklen_t."
4854 $ d_socklen_t="undef"
4855 $ echo "You do not have socklen_t."
4858 $ d_socklen_t="undef"
4861 $! Check for pthread_yield
4866 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4867 $ WS "#include <stdlib.h>"
4869 $ WS "#include <pthread.h>"
4870 $ WS "#include <stdio.h>"
4873 $ WS "pthread_yield();"
4877 $ tmp = "pthread_yield"
4879 $ d_pthread_yield = tmp
4881 $ d_pthread_yield="undef"
4884 $! Check for sched_yield
4889 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4890 $ WS "#include <stdlib.h>"
4892 $ WS "#include <pthread.h>"
4893 $ WS "#include <stdio.h>"
4896 $ WS "sched_yield();"
4900 $ tmp = "sched_yield"
4902 $ d_sched_yield = tmp
4903 $ IF d_sched_yield .EQS. "define"
4904 $ THEN sched_yield = "sched_yield"
4905 $ ELSE sched_yield = " "
4908 $ d_sched_yield="undef"
4912 $! Check for pthread_attr_setscope and PTHREAD_SCOPE_SYSTEM.
4913 $! (The actual test is to be written.)
4915 $ d_pthread_attr_setscope="undef"
4917 $! Check for generic pointer size
4919 $ echo4 "Checking to see how big your pointers are..."
4921 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4922 $ WS "#include <stdlib.h>"
4924 $ WS "#include <stdio.h>"
4928 $ WS "foo = sizeof(char *);"
4929 $ WS "printf(""%d\n"", foo);"
4934 $ GOSUB type_size_check
4936 $ echo "Your pointers are ''ptrsize' bytes long."
4938 $! Check for size_t size
4942 $ echo4 "Checking the size of ''zzz'..."
4943 $ GOSUB type_size_check
4945 $ echo "Your ''zzz' size is ''sizesize' bytes."
4947 $! Check for _LARGEFILE capability.
4951 $ WS "#define _LARGEFILE"
4952 $ WS "#include <stdio.h>"
4955 $ WS "printf(""%d\n"", sizeof(off_t));"
4960 $ IF link_status .EQ. good_link
4965 $ echo "Your off_t size is ''off_t_size' bytes when _LARGEFILE is defined."
4966 $ IF off_t_size .ne. 8 .AND. (uselargefiles .OR. uselargefiles .eqs. "define")
4968 $ echo4 "You configured with -Duselargefiles but your CRTL does not support _LARGEFILE."
4969 $ echo4 "I'm disabling large file support."
4970 $ uselargefiles = "undef"
4973 $! Tests for hard link, symbolic links, and 7.3 + CRTL features
4975 $ d_lchown = "undef"
4978 $ d_readlink = "undef"
4979 $ d_symlink = "undef"
4980 $ d_realpath = "undef"
4982 $! Hard link support has been present since 7.3-1 except for the
4983 $! easy to use DCL test to see if hardlinks are enabled on the build
4984 $! disk. That would require more work to test, and I am only testing
4985 $! this on 8.2, so that is why the 8.2 test.
4987 $ IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
4989 $ IF f$getdvi("SYS$DISK","HARDLINKS_SUPPORTED")
4991 $ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links enabled on build disk."
4992 $ echo "I will build with hard link support"
4995 $ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links disabled on build disk."
4996 $ echo "I will not build with hard link support."
4999 $ echo4 "I can not detect if your CRTL and build disk support hard links."
5000 $ echo4 "I am disabling hard link support."
5003 $ IF uselargefiles .OR. uselargefiles .eqs. "define"
5005 $ IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
5007 $ echo4 "Largefile support enabled, so enabling standard stat support too."
5010 "Looking for the realpath() function to indicate symbolic link support..."
5012 $! WS "#include <stdlib.h>"
5013 $ WS "void exit(int foo);"
5014 $ WS "char *realpath(const char *file_name, char * resolved_name, ...);"
5017 $ WS "char result[255];"
5018 $ WS "realpath(""foo"",result);"
5023 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
5026 "Found realpath() which indicates symbolic link support is present."
5027 $ d_lchown = "define"
5028 $ d_lstat = "define"
5029 $ d_readlink = "define"
5030 $ d_symlink = "define"
5031 $! d_realpath = "define" ! Perl will not put it in the config.h file?
5032 $! Perl apparently does not use a built in realpath() on other platforms,
5033 $! but there is a severe performance penatly on OpenVMS to use the Perl
5034 $! script that implements a realpath(). The d_symlink symbol is used
5035 $! as a replacement for the d_realpath since they are related and both
5036 $! were activated by the CRTL at the same time.
5039 $ echo4 "Your system does not support symbolic links."
5040 $ echo4 "I am disabling symbolic link support."
5043 $ echo4 "Your system does not support symbolic links."
5044 $ echo4 "I am disabling symbolic link support."
5047 $ IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
5049 $ echo4 "-Duselargefiles is required for symbolic link support."
5050 $ echo4 "You did not specify that, so I am disabling symbolic link support."
5055 $! Check for grp.h -- should be 7.3 and later, but test to be sure
5061 $! VMS V7.3-2 powered options
5062 $! We know that it is only available for V7.3-2 and later on 64 bit platforms.
5064 $ d_getgrgid_r = "undef"
5065 $ getgrgid_r_proto = "0"
5066 $ d_getgrnam_r = "undef"
5067 $ getgrnam_r_proto = "0"
5068 $ d_getpgid = "undef"
5069 $ d_getpgrp = "undef"
5070 $! N.B. We already have home-grown thread-safe versions of
5071 $! getpwnam and getpwuid -- no need to use CRTL versions
5072 $ d_getpwnam_r = "undef"
5073 $ getpwnam_r_proto = "0"
5074 $ d_getpwuid_r = "undef"
5075 $ getpwuid_r_proto = "0"
5076 $ d_setgrent = "undef"
5077 $ d_ttyname_r = "undef"
5078 $ ttyname_r_proto = "0"
5079 $ d_snprintf = "undef"
5080 $ d_vsnprintf = "undef"
5081 $ if (vms_ver .GES. "7.3-2") .AND. (archname .NES. "VMS_VAX")
5083 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 routines"
5084 $ d_getgrgid_r = "define"
5085 $ getgrgid_r_proto = "1"
5086 $ d_getgrnam_r = "define"
5087 $ getgrnam_r_proto = "1"
5088 $ if d_symlink .or. d_symlink .EQS. "define"
5090 $! FIXME: Need to find how to activate this.
5091 $! d_getpgid = "define"
5092 $! d_getpgrp = "define"
5094 $ d_setgrent = "define"
5095 $ d_ttyname_r = "define"
5096 $ ttyname_r_proto = "1"
5097 $ d_snprintf = "define"
5098 $ d_vsnprintf = "define"
5101 $! VMS V7.3-2 powered options
5102 $! We know that it is only available for V7.3-2 and later on 64 bit platforms.
5103 $! Only implementing right now on 8.2 because that is what I am testing
5104 $! These functions may require POSIX UIDs/GIDs to be active, so I am
5105 $! not activating the features at this time, just preparing this file
5106 $! to easily use them in the future.
5108 $ d_seteuid = "undef"
5109 $ d_setpgid = "undef"
5110 $ d_setpgrp = "undef"
5111 $ d_setregid = "undef"
5112 $ d_setreuid = "undef"
5113 $ d_setsid = "undef"
5114 $ ! Disable this section for now.
5115 $!$ if (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
5118 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 UID setting routines"
5119 $ d_seteuid = "define"
5120 $ d_setpgid = "define"
5121 $ d_setpgrp = "define"
5122 $ d_setregid = "define"
5123 $ d_setreuid = "define"
5124 $ d_setsid = "define"
5127 $! VMS V8 powered options
5128 $! We know that it is only available for 8.2 and later on 64 bit platforms.
5130 $ d_fstatvfs = "undef"
5131 $! d_statvfs = "undef"
5132 $ i_sysstatvfs = "undef"
5133 $ if (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
5135 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with 8.2 routines"
5136 $ d_fstatvfs = "define"
5137 $! d_statvfs = "define"
5138 $ i_sysstatvfs = "define"
5141 $! Check rand48 and its ilk
5143 $ echo4 "Looking for a random number function..."
5145 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5146 $ WS "#include <stdlib.h>"
5148 $ WS "#include <stdio.h>"
5151 $ WS "srand48(12L);"
5156 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
5158 $ drand01 = "drand48()"
5160 $ randfunc = "drand48"
5161 $ randseedtype = "long int"
5162 $ seedfunc = "srand48"
5163 $ echo4 "Good, found drand48()."
5164 $ d_drand48proto = "define"
5166 $ d_drand48proto = "undef"
5167 $ drand01="random()"
5169 $ randfunc = "random"
5170 $ randseedtype = "unsigned"
5171 $ seedfunc = "srandom"
5173 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5174 $ WS "#include <stdlib.h>"
5176 $ WS "#include <stdio.h>"
5184 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
5186 $ echo4 "OK, found random()."
5188 $ drand01="(((float)rand())*MY_INV_RAND_MAX)"
5190 $ randseedtype = "unsigned"
5191 $ seedfunc = "srand"
5192 $ echo4 "Yick, looks like I have to use rand()."
5195 $! Done with compiler checks. Clean up.
5196 $ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
5197 $ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
5198 $ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
5199 $ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
5200 $ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
5201 $ IF ccname .EQS. "CXX"
5203 $ CALL Cxx_demangler_cleanup
5206 $! Some that are compiler or VMS version sensitive
5209 $ IF ccname .EQS. "GCC"
5211 $ d_attribut="define"
5215 $ d_attribut="undef"
5218 $! Dec C >= 5.2 and VMS ver >= 7.0
5219 $ IF (ccname .EQS. "DEC") .AND. -
5220 (F$INTEGER(Dec_C_Version).GE.50200000) .AND. (vms_ver .GES. "7.0")
5223 $ d_getitimer="define"
5224 $ d_gettimeod="define"
5226 $ d_mprotect="define"
5231 $! d_unsetenv="define" ! Fix me - Activating requires changing VMS code
5232 $ d_unsetenv="undef" ! Change will be needed to allow GNV integration
5233 $ d_clearenv="undef"
5235 $ d_setitimer="define"
5236 $ d_sigaction="define"
5237 $ d_sigprocmask="define"
5238 $ d_truncate="define"
5242 $ sig_name1="ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE"
5243 $ sig_name2=" ALRM TERM USR1 USR2 NUM18 NUM19 CHLD CONT STOP TSTP TTIN TTOU DEBUG"
5244 $ IF (vms_ver .GES. "7.3")
5246 $ sig_name2 = sig_name2 + " NUM27 WINCH"
5248 $!* signal.h defines SIGRTMIN as 33 and SIGRTMAX as 64, but there is no
5249 $!* sigqueue function or other apparent means to do realtime signalling,
5250 $!* so let's not try to include the realtime range for now.
5251 $!* sig_name3=" NUM29 NUM30 NUM31 NUM32 RTMIN NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43"
5252 $!* sig_name4=" NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58"
5253 $!* sig_name5=" NUM59 NUM60 NUM61 NUMT62 NUM63 RTMAX"
5254 $ sig_name = sig_name1 + sig_name2
5257 $ sig_name_init = ""
5260 $ PARSE_SIG_NAME_LOOP:
5262 $ tmp = F$ELEMENT(sig_index, " ", sig_name)
5263 $ IF F$LENGTH(F$EDIT(tmp,"TRIM")) .eq. 0 THEN GOTO END_SIG_NAME_LOOP
5264 $ sig_name_init = sig_name_init + """''tmp'"","
5265 $ sig_num = sig_num + "''sig_index' "
5266 $ sig_num_init = sig_num_init + "''sig_index',"
5267 $ sig_index = sig_index + 1
5268 $ GOTO PARSE_SIG_NAME_LOOP
5270 $ END_SIG_NAME_LOOP:
5272 $ sig_name_init = sig_name_init + "0"
5273 $ sig_num_init = sig_num_init + "0"
5274 $ sig_size = "''sig_index'"
5275 $ sig_index = sig_index - 1
5276 $ sig_count = "''sig_index'"
5278 $ d_pathconf="define"
5279 $ d_fpathconf="define"
5280 $ d_sysconf="define"
5281 $ d_sigsetjmp="define"
5283 $ pidtype="unsigned int"
5285 $ d_getitimer="undef"
5286 $ d_gettimeod="undef"
5288 $ d_mprotect="undef"
5293 $ d_unsetenv="undef"
5294 $ d_clearenv="undef"
5296 $ d_setitimer="undef"
5297 $ d_sigaction="undef"
5298 $ d_sigprocmask="undef"
5299 $ d_truncate="undef"
5302 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"
5303 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
5304 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
5305 $ sig_name_init = psnwc1 + psnwc2
5306 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"
5307 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
5310 $ if (vms_ver .GES. "6.2") then sig_count="17"
5311 $ uidtype="unsigned int"
5312 $ d_pathconf="undef"
5313 $ d_fpathconf="undef"
5315 $ d_sigsetjmp="undef"
5317 $!: see if tzname[] exists
5319 $ WS "#include <stdio.h>"
5320 $ WS "#include <time.h>"
5321 $ WS "int main() { extern short tzname[]; printf(""%hd"", tzname[0]); }"
5324 $ IF compile_status .EQ. good_compile
5326 $ d_tzname = "undef"
5327 $ echo4 "tzname[] NOT found."
5329 $ d_tzname = "define"
5330 $ echo4 "tzname[] found."
5332 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
5334 $ IF d_gethname .EQS. "undef" .AND. d_uname .EQS. "undef"
5336 $ d_phostname="define"
5338 $ d_phostname="undef"
5342 $ IF ccname .EQS. "DEC"
5344 $ d_mbstowcs="define"
5346 $ d_stdiobase="define"
5347 $ d_stdio_cnt_lval="define"
5348 $ d_stdio_ptr_lval="define"
5349 $ d_stdstdio="define"
5350 $ d_faststdio="define"
5351 $ d_wcstombs="define"
5354 $ d_strcoll="define"
5355 $ d_strxfrm="define"
5358 $ i_langinfo="define"
5359 $ d_locconv="define"
5360 $ IF vms_ver .GES. "6.2"
5362 $ d_nl_langinfo="define"
5364 $ d_nl_langinfo="undef"
5366 $ d_setlocale="define"
5367 $ vms_cc_type="decc"
5369 $ d_mbstowcs="undef"
5371 $ d_stdiobase="undef"
5372 $ d_stdio_cnt_lval="undef"
5373 $ d_stdio_ptr_lval="undef"
5374 $ d_stdstdio="undef"
5375 $ d_faststdio="undef"
5376 $ d_wcstombs="undef"
5383 $ i_langinfo="undef"
5385 $ d_nl_langinfo="undef"
5386 $ d_setlocale="undef"
5388 $ d_stdio_ptr_lval_sets_cnt="undef"
5389 $ d_stdio_ptr_lval_nochange_cnt="define"
5390 $ usefaststdio="undef"
5393 $ if Has_Socketshr .OR. Has_Dec_C_Sockets
5395 $ d_vms_do_sockets="define"
5398 $ d_sockpair = "undef"
5399 $ if (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
5401 $ echo "Found 64 bit OpenVMS 8.2, will build with socketpair support"
5402 $ d_sockpair = "define"
5405 $ netdb_hlen_type="int"
5406 $ netdb_host_type="char *"
5407 $ netdb_name_type="char *"
5408 $ netdb_net_type="long"
5409 $ d_gethbyaddr="define"
5410 $ d_gethbyname="define"
5411 $ d_getnbyaddr="define"
5412 $ d_getnbyname="define"
5413 $ d_getpbynumber="define"
5414 $ d_getpbyname="define"
5415 $ d_getsbyport="define"
5416 $ d_getsbyname="define"
5417 $ d_gethostprotos="define"
5418 $ d_getnetprotos="define"
5419 $ d_getprotoprotos="define"
5420 $ d_getservprotos="define"
5421 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
5423 $ socksizetype="unsigned int"
5425 $ socksizetype="int *"
5428 $ d_vms_do_sockets="undef"
5431 $ d_socketpair = "undef"
5433 $ netdb_hlen_type="int"
5434 $ netdb_host_type="char *"
5435 $ netdb_name_type="char *"
5436 $ netdb_net_type="long"
5437 $ d_gethbyaddr="undef"
5438 $ d_gethbyname="undef"
5439 $ d_getnbyaddr="undef"
5440 $ d_getnbyname="undef"
5441 $ d_getpbynumber="undef"
5442 $ d_getpbyname="undef"
5443 $ d_getsbyport="undef"
5444 $ d_getsbyname="undef"
5445 $ d_gethostprotos="undef"
5446 $ d_getnetprotos="undef"
5447 $ d_getprotoprotos="undef"
5448 $ d_getservprotos="undef"
5449 $ socksizetype="undef"
5454 $ usethreads="define"
5455 $ d_pthreads_created_joinable="define"
5456 $ if (vms_ver .GES. "7.0")
5458 $ d_oldpthreads="undef"
5460 $ d_oldpthreads="define"
5463 $ d_oldpthreads="undef"
5464 $ usethreads="undef"
5465 $ d_pthreads_created_joinable="undef"
5468 $! new (5.005_62++) typedefs for primitives
5470 $ echo "Choosing the C types to be used for Perl's internal types..."
5472 $ uvtype="unsigned long"
5474 $ u8type="unsigned char"
5476 $ u16type="unsigned short"
5478 $ u32type="unsigned int"
5479 $ i64type="long long"
5480 $ u64type="unsigned long long"
5483 $ IF use64bitint .OR. use64bitint .EQS. "define"
5485 $ ivtype = "''i64type'"
5486 $ uvtype = "''u64type'"
5492 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
5494 $ nvtype="long double"
5498 $ GOSUB type_size_check
5500 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp
5501 $ IF ivtype .eqs. "long"
5502 $ THEN longsize = tmp
5505 $ GOSUB type_size_check
5510 $ GOSUB type_size_check
5512 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp
5515 $ GOSUB type_size_check
5519 $ GOSUB type_size_check
5522 $ tmp = "''i16type'"
5523 $ GOSUB type_size_check
5525 $ IF i16type .eqs. "short"
5526 $ THEN shortsize = tmp
5529 $ gosub type_size_check
5533 $ tmp = "''u16type'"
5534 $ GOSUB type_size_check
5537 $ tmp = "''i32type'"
5538 $ GOSUB type_size_check
5540 $ IF i32type .eqs. "int"
5541 $ THEN intsize = tmp
5544 $ gosub type_size_check
5548 $ tmp = "''u32type'"
5549 $ gosub type_size_check
5553 $ GOSUB type_size_check
5556 $ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
5557 $ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
5558 $ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
5560 $ d_nv_preserves_uv = "undef"
5561 $ echo4 "Checking how many bits of your UVs your NVs can preserve..."
5563 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5564 $ WS "#include <stdlib.h>"
5566 $ WS "#include <stdio.h>"
5568 $ WS " ''uvtype' u = 0;"
5569 $ WS " int n = 8 * ''uvsize';"
5571 $ WS " for (i = 0; i < n; i++) {"
5572 $ WS " u = u << 1 | (''uvtype')1;"
5573 $ WS " if ((''uvtype')(''nvtype')u != u)"
5576 $ WS " printf(""%d\n"", i);"
5581 $ nv_preserves_uv_bits = tmp
5582 $ IF F$INTEGER(nv_preserves_uv_bits) .GE. (F$INTEGER(uvsize) * 8)
5584 $ d_nv_preserves_uv = "define"
5585 $ echo "Your NVs can preserve all ''nv_preserves_uv_bits' bits of your UVs."
5587 $ d_nv_preserves_uv = "undef""
5588 $ echo "Your NVs can preserve only ''nv_preserves_uv_bits' bits of your UVs."
5591 $ nv_overflows_integers_at = "0"
5592 $ echo4 "Checking to find the largest integer value your NVs can hold..."
5594 $ WS "#include <stdio.h>"
5596 $ WS "typedef ''nvtype' NV;"
5600 $ WS " NV value = 2;"
5601 $ WS " int count = 1;"
5603 $ WS " while(count < 256) {"
5604 $ WS " volatile NV up = value + 1.0;"
5605 $ WS " volatile NV negated = -value;"
5606 $ WS " volatile NV down = negated - 1.0;"
5607 $ WS " volatile NV got_up = up - value;"
5608 $ WS " int up_good = got_up == 1.0;"
5609 $ WS " int got_down = down - negated;"
5610 $ WS " int down_good = got_down == -1.0;"
5612 $ WS " if (down_good != up_good) {"
5613 $ WS " fprintf(stderr,"
5614 $ WS " ""Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n"","
5615 $ WS " up_good, (double) got_up, down_good, (double) got_down,"
5616 $ WS " count, (double) value);"
5619 $ WS " if (!up_good) {"
5621 $ WS " if (count > 8) {"
5623 $ WS " fputs(""256.0"", stdout);"
5626 $ WS " fputs(""2.0"", stdout);"
5628 $ WS " if (!count) {"
5632 $ WS " fputs(""*"", stdout);"
5638 $ WS " fprintf(stderr, ""Cannot overflow integer range, even at 2**%d (%.20f)\n"","
5639 $ WS " count, (double) value);"
5644 $ IF F$LENGTH(tmp) .GT. 0
5646 $ IF F$EXTRACT(0,1,tmp) .EQS. "2"
5648 $ echo "The largest integer your NVs can preserve is equal to ''tmp'"
5649 $ nv_overflows_integers_at = tmp
5651 $ echo "Cannot determine the largest integer value your NVs can hold, unexpected output"
5655 $ echo "Cannot determine the largest integer value your NVs can hold"
5658 $! Check for signbit (must already know nvtype)
5660 $ echo4 "Checking to see if you have signbit() available to work on ''nvtype'..."
5662 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5663 $ WS "#include <stdlib.h>"
5665 $ WS "#include <fp.h>"
5666 $ WS "#include <stdio.h>"
5669 $ WS " ''nvtype' x = 0.0;"
5670 $ WS " ''nvtype' y = -0.0;"
5671 $ WS " if ((signbit(x) == 0) && (signbit(y) != 0))"
5672 $ WS " printf(""1\n"");"
5674 $ WS " printf(""0\n"");"
5680 $ d_signbit = "define"
5683 $ d_signbit = "undef"
5687 $ echo4 "Checking if kill() uses SYS$FORCEX or can't be called from a signal handler..."
5688 $ kill_by_sigprc = "undef"
5690 $ WS "#include <stdio.h>"
5691 $ WS "#include <signal.h>"
5692 $ WS "#include <unistd.h>"
5693 $ WS "void handler1(int s) { printf(""%d"",s); kill(getpid(),2); }"
5694 $ WS "void handler2(int s) { printf(""%d"",s); }"
5696 $ WS " printf(""0"");"
5697 $ WS " signal(1,handler1);"
5698 $ WS " signal(2,handler2);"
5699 $ WS " kill(getpid(),1);"
5701 $ WS " printf(""\n"");"
5704 $ ON ERROR THEN CONTINUE
5706 $ IF tmp .NES. "012"
5708 $ echo4 "Yes, it has at least one of those limitations."
5709 $ echo4 "Checking whether we can use SYS$SIGPRC instead..."
5711 $ WS "#include <stdio.h>"
5712 $ WS "#include <lib$routines.h>"
5713 $ WS "unsigned long code = 0;"
5714 $ WS "int handler(unsigned long *args) {"
5715 $ WS " code = args[1];"
5719 $ WS " int iss, sys$sigprc();"
5720 $ WS " lib$establish(handler);"
5721 $ WS " iss = sys$sigprc(0,0,0x1234);"
5722 $ WS " iss = ((iss&1)==1 && code == 0x1234);"
5723 $ WS " printf(""%d\n"",iss);"
5726 $ ON ERROR THEN CONTINUE
5730 $ echo4 "Yep, we can."
5731 $ kill_by_sigprc = "define"
5733 $! Use the same list of signals the CRTL does for recent systems, but cook our own for very old systems.
5734 $! Note that the list controls what signals can be caught by name as well as what can be raised via kill().
5736 $ if vms_ver .LTS. "6.2"
5738 $! since SIGBUS and SIGSEGV indistinguishable, make them the same here.
5739 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT"
5740 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
5741 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",0"
5742 $ sig_name_init = psnwc1 + psnwc2
5743 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6"
5744 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,0"
5749 $ echo4 "Nope, we can't."
5752 $ echo4 "Nope, it doesn't."
5756 $! Finally the composite ones. All config
5758 $ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
5760 $ IF ccname .EQS. "DEC"
5762 $ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
5764 $ i_dirent = "undef"
5765 $ IF ccname .EQS. "CXX"
5767 $ i_dirent = "define"
5768 $ ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
5770 $ IF use_vmsdebug_perl
5772 $ optimize="/List/Debug/NoOpt"
5773 $ ldflags="/Debug/Trace/Map"
5776 $ optimize= "/NoList"
5777 $ ldflags="/NoTrace/NoMap"
5781 $! Okay, we've got everything configured. Now go write out a config.sh.
5782 $ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
5783 $ echo4 "Creating ''basename_config_sh'..."
5784 $ open/write CONFIG 'config_sh'
5785 $ WC := write CONFIG
5787 $! ##BEGIN WRITE NEW CONSTANTS HERE##
5791 $ WC "# This file was produced by Configure.COM on a ''osname' system."
5793 $ WC "# Package name : ''package'"
5794 $ WC "# Source directory : ''src'"
5795 $ WC "# Configuration time: " + cf_time
5796 $ WC "# Configuration by : " + cf_by
5797 $ WC "# Target system : " + myuname
5799 $ WC "Makefile_SH='" + Makefile_SH + "'"
5800 $ WC "Mcc='" + Mcc + "'"
5801 $ WC "PERL_REVISION='" + revision + "'"
5802 $ WC "PERL_VERSION='" + patchlevel + "'"
5803 $ WC "PERL_SUBVERSION='" + subversion + "'"
5804 $ WC "PERL_API_REVISION='" + api_revision + "'"
5805 $ WC "PERL_API_VERSION='" + api_version + "'"
5806 $ WC "PERL_API_SUBVERSION='" + api_subversion + "'"
5807 $ WC "PERL_PATCHLEVEL='" + perl_patchlevel + "'"
5808 $ WC "perl_patchlevel='" + perl_patchlevel + "'"
5809 $ WC "PERL_CONFIG_SH='true'"
5810 $ WC "_a='" + lib_ext + "'"
5811 $ WC "_exe='" + exe_ext + "'"
5812 $ WC "_o='" + obj_ext + "'"
5813 $ WC "alignbytes='" + alignbytes + "'"
5814 $ WC "aphostname='write sys$output f$edit(f$getsyi(\""SCSNODE\""),\""TRIM,LOWERCASE\"")'"
5816 $ WC "archlib='" + archlib + "'"
5817 $ WC "archlibexp='" + archlibexp + "'"
5818 $ WC "archname='" + archname + "'"
5819 $ WC "baserev='" + baserev + "'"
5820 $ WC "bin='" + bin + "'"
5821 $ WC "binexp='" + binexp + "'"
5822 $ WC "builddir='" + builddir + "'"
5823 $ WC "byteorder='1234'"
5824 $ WC "castflags='0'"
5825 $ WC "cc='" + perl_cc + "'"
5826 $ WC "cccdlflags='" + cccdlflags + "'"
5827 $ WC "ccdlflags='" + ccdlflags + "'"
5828 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
5830 $ IF usestdstat .OR. usestdstat .EQS. "define"
5832 $ ccdefines = "_USE_STD_STAT=1"
5834 $ ccdefines = "_LARGEFILE=1"
5839 $ IF ccdefines .NES. ""
5841 $ WC "ccflags='" + ccflags + "/Define=" + ccdefines + "'"
5843 $ WC "ccflags='" + ccflags + "'"
5845 $ WC "ccflags_uselargefiles='" + "'"
5846 $ WC "ccname='" + ccname + "'"
5847 $ WC "ccversion='" + ccversion + "'"
5848 $ WC "cf_by='" + cf_by + "'"
5849 $ WC "cf_email='" + cf_email + "'"
5850 $ WC "cf_time='" + cf_time + "'"
5851 $ WC "config_args='" + config_args + "'"
5852 $ WC "config_sh='" + config_sh + "'"
5853 $ WC "cpp_stuff='" + cpp_stuff + "'"
5854 $ WC "cpplast='" + cpplast + "'"
5855 $ WC "cppminus='" + cppminus + "'"
5856 $ WC "cpprun='" + cpprun + "'"
5857 $ WC "cppstdin='" + cppstdin + "'"
5858 $ IF use64bitint .OR. use64bitint .EQS. "define"
5860 $! gcvt() does not work for > 16 decimal places; fallback to sprintf
5861 $ WC "d_Gconvert='sprintf((b),""%.*" + (nvgformat-"""") + ",(n),(x))'"
5863 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
5865 $ WC "d_PRIEldbl='" + d_PRIEUldbl + "'"
5866 $ WC "d_PRIFldbl='" + d_PRIFUldbl + "'"
5867 $ WC "d_PRIGldbl='" + d_PRIGUldbl + "'"
5868 $ WC "d_PRIXU64='" + d_PRIXU64 + "'"
5869 $ WC "d_PRId64='" + d_PRId64 + "'"
5870 $ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
5871 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
5872 $ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
5873 $ WC "d_PRIo64='" + d_PRIo64 + "'"
5874 $ WC "d_PRIu64='" + d_PRIu64 + "'"
5875 $ WC "d_PRIx64='" + d_PRIx64 + "'"
5876 $ WC "d_SCNfldbl='" + d_SCNfldbl + "'"
5877 $ WC "d__fwalk='undef'"
5878 $ WC "d_access='" + d_access + "'"
5879 $ WC "d_accessx='undef'"
5880 $ WC "d_aintl='undef'"
5881 $ WC "d_alarm='define'"
5882 $ WC "d_archlib='define'"
5883 $ WC "d_asctime64='undef'"
5884 $ WC "d_atolf='" + d_atolf + "'"
5885 $ WC "d_atoll='" + d_atoll + "'"
5886 $ WC "d_attribute_format='" + d_attribut + "'"
5887 $ WC "d_attribute_deprecated='undef'"
5888 $ WC "d_attribute_malloc='undef'"
5889 $ WC "d_attribute_nonnull='undef'"
5890 $ WC "d_attribute_noreturn='undef'"
5891 $ WC "d_attribute_pure='undef'"
5892 $ WC "d_attribute_unused='undef'"
5893 $ WC "d_attribute_warn_unused_result='undef'"
5894 $ WC "d_printf_format_null='undef'"
5895 $ WC "d_bcmp='" + d_bcmp + "'"
5896 $ WC "d_bcopy='" + d_bcopy + "'"
5897 $ WC "d_bincompat3='undef'"
5898 $! WC "d_bsdpgrp='undef'"
5899 $ WC "d_bsdgetpgrp='undef'"
5900 $ WC "d_bsdsetpgrp='undef'"
5901 $ WC "d_builtin_choose_expr='undef'" ! GCC only
5902 $ WC "d_builtin_expect='undef'" ! GCC only
5903 $ WC "d_bzero='" + d_bzero + "'"
5904 $ WC "d_casti32='define'"
5905 $ WC "d_castneg='define'"
5906 $ WC "d_charvspr='undef'"
5907 $ WC "d_chown='define'"
5908 $ WC "d_chroot='undef'"
5909 $ WC "d_chsize='undef'"
5910 $ WC "d_class='undef'"
5911 $ WC "d_cmsghdr_s='undef'"
5912 $ WC "d_const='define'"
5913 $ WC "d_copysignl='define'"
5914 $ WC "d_cplusplus='" + d_cplusplus + "'"
5915 $ WC "d_crypt='define'"
5916 $ WC "d_csh='undef'"
5917 $ WC "d_ctermid='define'"
5918 $ WC "d_ctime64='undef'"
5919 $ WC "d_cuserid='define'"
5920 $ WC "d_c99_variadic_macros='undef'"
5921 $ WC "d_dbl_dig='define'"
5922 $ WC "d_dbminitproto='undef'"
5923 $ WC "d_difftime='define'"
5924 $ WC "d_difftime64='undef'"
5925 $ WC "d_dir_dd_fd='undef'"
5926 $ WC "d_dirfd='undef'"
5927 $ WC "d_dirnamlen='define'"
5928 $ WC "d_dlerror='undef'"
5929 $ WC "d_dlsymun='undef'"
5930 $ WC "d_dosuid='undef'"
5931 $ WC "d_drand48proto='" + d_drand48proto + "'"
5932 $ WC "d_dup2='define'"
5933 $ WC "d_eaccess='undef'"
5934 $ WC "d_endgrent='define'"
5935 $ WC "d_endhent='" + d_endhent + "'"
5936 $ WC "d_endnent='" + d_endnent + "'"
5937 $ WC "d_endpent='" + d_endpent + "'"
5938 $ WC "d_endpwent='define'"
5939 $ WC "d_endsent='" + d_endsent + "'"
5940 $ WC "d_eofnblk='undef'"
5941 $ WC "d_eunice='undef'"
5942 $ WC "d_fchmod='undef'"
5943 $ WC "d_fchdir='undef'"
5944 $ WC "d_fchown='undef'"
5945 $ WC "d_fcntl='" + d_fcntl + "'"
5946 $ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
5947 $ WC "d_fd_set='" + d_fd_set + "'"
5948 $ WC "d_fgetpos='define'"
5949 $ WC "d_finite='undef'"
5950 $ WC "d_finitel='undef'"
5951 $ WC "d_flexfnam='define'"
5952 $ WC "d_flock='undef'"
5953 $ WC "d_flockproto='undef'"
5954 $ WC "d_fork='undef'"
5955 $ WC "d_fp_class='undef'"
5956 $ WC "d_fpathconf='" + d_fpathconf + "'"
5957 $ WC "d_fpclass='undef'"
5958 $ WC "d_fpclassify='undef'"
5959 $ WC "d_fpclassl='undef'"
5960 $ WC "d_fpos64_t='" + d_fpos64_t + "'"
5961 $ WC "d_frexpl='" + d_frexpl + "'"
5962 $ WC "d_fs_data_s='undef'"
5963 $ WC "d_fseeko='" + d_fseeko + "'"
5964 $ WC "d_fsetpos='define'"
5965 $ WC "d_fstatfs='undef'"
5966 $ WC "d_fstatvfs='" + d_fstatvfs + "'"
5967 $ WC "d_fsync='undef'"
5968 $ WC "d_ftello='" + d_ftello + "'"
5969 $ WC "d_futimes='undef'"
5970 $ WC "d_gdbmndbm_h_uses_prototypes='undef'"
5971 $ WC "d_gdbm_ndbm_h_uses_prototypes='undef'"
5972 $ WC "d_getaddrinfo='undef'"
5973 $ WC "d_getcwd='define'"
5974 $ WC "d_getespwnam='undef'"
5975 $ WC "d_getfsstat='undef'"
5976 $ WC "d_getgrent='define'"
5977 $ WC "d_getgrps='undef'"
5978 $ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
5979 $ WC "d_gethbyname='" + d_gethbyname + "'"
5980 $ WC "d_gethent='" + d_gethent + "'"
5981 $ WC "d_gethname='" + d_gethname + "'"
5982 $ WC "d_gethostprotos='" + d_gethostprotos + "'"
5983 $ WC "d_getitimer='" + d_getitimer + "'"
5984 $ WC "d_getlogin='define'"
5985 $ WC "d_getmnt='undef'"
5986 $ WC "d_getmntent='undef'"
5987 $ WC "d_getnameinfo='undef'"
5988 $ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
5989 $ WC "d_getnbyname='" + d_getnbyname + "'"
5990 $ WC "d_getnent='" + d_getnent + "'"
5991 $ WC "d_getnetprotos='" + d_getnetprotos + "'"
5992 $ WC "d_getpagsz='undef'"
5993 $ WC "d_getpbyname='" + d_getpbyname + "'"
5994 $ WC "d_getpbynumber='" + d_getpbynumber + "'"
5995 $ WC "d_getpent='" + d_getpent + "'"
5996 $ WC "d_getpgid='" + d_getpgid + "'"
5997 $ WC "d_getpgrp2='undef'"
5998 $ WC "d_getpgrp='" + d_getpgrp + "'"
5999 $ WC "d_getppid='" + d_getppid + "'"
6000 $ WC "d_getprior='undef'"
6001 $ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
6002 $ WC "d_getprpwnam='undef'"
6003 $ WC "d_getpwent='define'"
6004 $ WC "d_getsbyname='" + d_getsbyname + "'"
6005 $ WC "d_getsbyport='" + d_getsbyport + "'"
6006 $ WC "d_getsent='" + d_getsent + "'"
6007 $ WC "d_getservprotos='" + d_getservprotos + "'"
6008 $ WC "d_getspnam='undef'"
6009 $ WC "d_gettimeod='" + d_gettimeod + "'"
6010 $ WC "d_gmtime64='undef'"
6011 $ WC "d_gnulibc='undef'"
6012 $ WC "d_grpasswd='undef'"
6013 $ WC "d_hasmntopt='undef'"
6014 $ WC "d_htonl='" + d_htonl + "'"
6015 $ WC "d_ilogbl='undef'"
6016 $ WC "d_inc_version_list='undef'"
6017 $ WC "d_index='" + d_index + "'"
6018 $ WC "d_inetaton='undef'"
6019 $ WC "d_inetntop='undef'"
6020 $ WC "d_inetpton='undef'"
6021 $ WC "d_int64_t='" + d_int64_t + "'"
6022 $ WC "d_isascii='define'"
6023 $ WC "d_isfinite='undef'"
6024 $ WC "d_isinf='undef'"
6025 $ WC "d_isnan='" + d_isnan + "'"
6026 $ WC "d_isnanl='" + d_isnanl + "'"
6027 $ WC "d_killpg='undef'"
6028 $ WC "d_lchown='" + d_lchown + "'"
6029 $ WC "d_ldbl_dig='define'"
6030 $ WC "d_libm_lib_version='undef'"
6031 $ WC "d_link='" + d_link + "'"
6032 $ WC "d_llseek='undef'"
6033 $ WC "d_localtime64='undef'"
6034 $ WC "d_locconv='" + d_locconv + "'"
6035 $ WC "d_lockf='undef'"
6036 $ WC "d_longdbl='" + d_longdbl + "'"
6037 $ WC "d_longlong='" + d_longlong + "'"
6038 $ WC "d_lseekproto='define'"
6039 $ WC "d_lstat='" + d_lstat + "'"
6040 $ WC "d_madvise='undef'"
6041 $ WC "d_malloc_size='undef'"
6042 $ WC "d_malloc_good_size='undef'"
6043 $ WC "d_mblen='" + d_mblen + "'"
6044 $ WC "d_mbstowcs='" + d_mbstowcs + "'"
6045 $ WC "d_mbtowc='" + d_mbtowc + "'"
6046 $ WC "d_memchr='" + d_memchr + "'"
6047 $ WC "d_memcmp='define'"
6048 $ WC "d_memcpy='define'"
6049 $ WC "d_memmove='define'"
6050 $ WC "d_memset='define'"
6051 $ WC "d_mkdir='define'"
6052 $ WC "d_mkdtemp='" + d_mkdtemp + "'"
6053 $ WC "d_mkfifo='undef'"
6054 $ WC "d_mknod='undef'"
6055 $ WC "d_mkstemp='" + d_mkstemp + "'"
6056 $ WC "d_mkstemps='" + d_mkstemps + "'"
6057 $ WC "d_mktime='" + d_mktime + "'"
6058 $ WC "d_mktime64='undef'"
6059 $ WC "d_mmap='" + d_mmap + "'"
6060 $ WC "d_modfl='" + d_modfl + "'"
6061 $ WC "d_modflproto='" + d_modflproto + "'"
6062 $ WC "d_modfl_pow32_bug='undef'"
6063 $ WC "d_mprotect='" + d_mprotect + "'"
6064 $ WC "d_msg='undef'"
6065 $ WC "d_msg_ctrunc='undef'"
6066 $ WC "d_msg_dontroute='undef'"
6067 $ WC "d_msg_oob='undef'"
6068 $ WC "d_msg_peek='undef'"
6069 $ WC "d_msg_proxy='undef'"
6070 $ WC "d_msghdr_s='undef'"
6071 $ WC "d_msync='" + d_msync + "'"
6072 $ WC "d_munmap='" + d_munmap + "'"
6073 $ WC "d_mymalloc='" + d_mymalloc + "'"
6074 $ WC "d_nanosleep='" + d_nanosleep + "'"
6075 $ WC "d_ndbm_h_uses_prototypes='undef'"
6076 $ WC "d_nice='define'"
6077 $ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
6078 $ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
6079 $ WC "nv_overflows_integers_at='" + nv_overflows_integers_at + "'"
6080 $ WC "nv_preserves_uv_bits='" + nv_preserves_uv_bits + "'"
6081 $ WC "d_nv_zero_is_allbits_zero='define'"
6082 $ WC "d_off64_t='" + d_off64_t + "'"
6083 $ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
6084 $ WC "d_oldarchlib='define'"
6085 $ WC "d_oldpthreads='" + d_oldpthreads + "'"
6086 $ WC "d_open3='define'"
6087 $ WC "d_pathconf='" + d_pathconf + "'"
6088 $ WC "d_pause='define'"
6089 $ WC "d_perl_otherlibdirs='undef'"
6090 $ WC "d_phostname='" + d_phostname + "'"
6091 $ WC "d_pipe='define'"
6092 $ WC "d_poll='" + d_poll + "'"
6093 $ WC "d_procselfexe='undef'"
6094 $ WC "d_pseudofork='undef'"
6095 $ WC "d_pthread_atfork='undef'"
6096 $ WC "d_pthread_attr_setscope='" + d_pthread_attr_setscope + "'"
6097 $ WC "d_pthread_yield='" + d_pthread_yield + "'"
6098 $ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
6099 $ WC "d_pwage='undef'"
6100 $ WC "d_pwchange='undef'"
6101 $ WC "d_pwclass='undef'"
6102 $ WC "d_pwcomment='define'"
6103 $ WC "d_pwexpire='undef'"
6104 $ WC "d_pwgecos='define'"
6105 $ WC "d_pwpasswd='define'"
6106 $ WC "d_pwquota='undef'"
6107 $ WC "d_qgcvt='undef'"
6108 $ WC "d_quad='" + d_quad + "'"
6109 $ WC "d_readdir='define'"
6110 $ WC "d_readlink='" + d_readlink + "'"
6111 $ WC "d_readv='undef'"
6112 $ WC "d_realpath='" + d_realpath + "'"
6113 $ WC "d_recvmsg='undef'"
6114 $ WC "d_rename='define'"
6115 $ WC "d_rewinddir='define'"
6116 $ WC "d_rmdir='define'"
6117 $ WC "d_safebcpy='undef'"
6118 $ WC "d_safemcpy='define'"
6119 $ WC "d_sanemcmp='define'"
6120 $ WC "d_sbrkproto='define'"
6121 $ WC "d_scalbnl='undef'"
6122 $ WC "d_sched_yield='" + d_sched_yield + "'"
6123 $ WC "d_scm_rights='undef'"
6124 $ WC "d_seekdir='define'"
6125 $ WC "d_select='" + d_select + "'"
6126 $ WC "d_sem='undef'"
6127 $ WC "d_semctl_semid_ds='undef'"
6128 $ WC "d_semctl_semun='undef'"
6129 $ WC "d_sendmsg='undef'"
6130 $ WC "d_setegid='undef'"
6131 $ WC "d_setenv='" + d_setenv + "'"
6132 $ WC "d_seteuid='" + d_seteuid + "'"
6133 $ WC "d_setgrent='" + d_setgrent + "'"
6134 $ WC "d_setgrps='undef'"
6135 $ WC "d_sethent='" + d_sethent + "'"
6136 $ WC "d_setitimer='" + d_setitimer + "'"
6137 $ WC "d_setlinebuf='undef'"
6138 $ WC "d_setlocale='" + d_setlocale + "'"
6139 $ WC "d_setnent='" + d_setnent + "'"
6140 $ WC "d_setpent='" + d_setpent + "'"
6141 $ WC "d_setpgid='" + d_setpgid + "'"
6142 $ WC "d_setpgrp2='undef'"
6143 $ WC "d_setpgrp='" + d_setpgrp + "'"
6144 $ WC "d_setprior='undef'"
6145 $ WC "d_setproctitle='" + d_setproctitle + "'"
6146 $ WC "d_setpwent='define'"
6147 $ WC "d_setregid='" + d_setregid + "'"
6148 $ WC "d_setresgid='undef'"
6149 $ WC "d_setresuid='undef'"
6150 $ WC "d_setreuid='" + d_setreuid + "'"
6151 $ WC "d_setrgid='undef'"
6152 $ WC "d_setruid='undef'"
6153 $ WC "d_setsent='" + d_setsent + "'"
6154 $ WC "d_setsid='" + d_setsid + "'"
6155 $ WC "d_setvbuf='" + d_setvbuf + "'"
6156 $ WC "d_sfio='undef'"
6157 $ WC "d_shm='undef'"
6158 $ WC "d_shmatprototype='undef'"
6159 $ WC "d_sigaction='" + d_sigaction + "'"
6160 $ WC "d_signbit='" + d_signbit + "'"
6161 $ WC "d_sigprocmask='" + d_sigprocmask + "'"
6162 $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
6163 $ WC "d_sitearch='define'"
6164 $ WC "d_sockatmark='undef'"
6165 $ WC "d_sockatmarkproto='undef'"
6166 $ WC "d_socket='" + d_socket + "'"
6167 $ WC "d_socklen_t='" + d_socklen_t + "'"
6168 $ WC "d_sockpair='" + d_sockpair + "'"
6169 $ WC "d_socks5_init='undef'"
6170 $ WC "d_sprintf_returns_strlen='define'"
6171 $ WC "d_sqrtl='define'"
6172 $ WC "d_sresgproto='undef'"
6173 $ WC "d_sresgproto='undef'"
6174 $ WC "d_sresproto='undef'"
6175 $ WC "d_sresuproto='undef'"
6176 $ WC "d_statblks='undef'"
6177 $ WC "d_statfs_f_flags='undef'"
6178 $ WC "d_statfs_s='undef'"
6179 $ WC "d_statfsflags='undef'"
6180 $ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
6181 $ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
6182 $ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'"
6183 $ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'"
6184 $ WC "d_stdio_stream_array='undef'"
6185 $ WC "d_stdiobase='" + d_stdiobase + "'"
6186 $ WC "d_stdstdio='" + d_stdstdio + "'"
6187 $ WC "d_faststdio='" + d_faststdio + "'"
6188 $ WC "d_strchr='define'"
6189 $ WC "d_strcoll='" + d_strcoll + "'"
6190 $ WC "d_strctcpy='define'"
6191 $ WC "d_strerrm='strerror((e),vaxc$errno)'"
6192 $ WC "d_strerror='define'"
6193 $ WC "d_strftime='define'"
6194 $ WC "d_strlcat='undef'"
6195 $ WC "d_strlcpy='undef'"
6196 $ WC "d_strtod='define'"
6197 $ WC "d_strtol='define'"
6198 $ WC "d_strtold='" + d_strtold + "'"
6199 $ WC "d_strtoll='" + d_strtoll + "'"
6200 $ WC "d_strtoq='" + d_strtoq + "'"
6201 $ WC "d_strtoul='define'"
6202 $ WC "d_strtoull='" + d_strtoull + "'"
6203 $ WC "d_strtouq='" + d_strtouq + "'"
6204 $ WC "d_strxfrm='" + d_strxfrm + "'"
6205 $ WC "d_suidsafe='undef'"
6206 $ WC "d_symlink='" + d_symlink + "'"
6207 $ WC "d_syscall='undef'"
6208 $ WC "d_syscallproto='undef'"
6209 $ WC "d_sysconf='" + d_sysconf + "'"
6210 $ WC "d_syserrlst='undef'"
6211 $ WC "d_system='define'"
6212 $ WC "d_tcgetpgrp='undef'"
6213 $ WC "d_tcsetpgrp='undef'"
6214 $ WC "d_telldir='define'"
6215 $ WC "d_telldirproto='define'"
6216 $ WC "d_time='define'"
6217 $ WC "d_timegm='undef'"
6218 $ WC "d_times='define'"
6219 $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.0")
6221 $ WC "d_tm_tm_gmtoff='define'"
6222 $ WC "d_tm_tm_zone='define'"
6224 $ WC "d_tm_tm_gmtoff='undef'"
6225 $ WC "d_tm_tm_zone='undef'"
6227 $ WC "d_truncate='" + d_truncate + "'"
6228 $ WC "d_tzname='" + d_tzname + "'"
6229 $ WC "d_u32align='define'"
6230 $ WC "d_ualarm='" + d_ualarm + "'"
6231 $ WC "d_umask='define'"
6232 $ WC "d_uname='" + d_uname + "'"
6233 $ WC "d_union_semun='undef'"
6234 $ WC "d_unlink_all_versions='" + d_unlink_all_versions + "'" ! VMS-specific
6235 $ WC "d_unordered='undef'"
6236 $ WC "d_unsetenv='" + d_unsetenv + "'"
6237 $ WC "d_clearenv='" + d_clearenv + "'"
6238 $ WC "d_usleep='" + d_usleep + "'"
6239 $ WC "d_usleepproto='" + d_usleep + "'"
6240 $ WC "d_ustat='undef'"
6241 $ WC "d_vendorarch='undef'"
6242 $ WC "d_vendorlib='undef'"
6243 $ WC "d_vfork='define'"
6244 $ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
6245 $ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
6246 $ WC "d_void_closedir='define'"
6247 $ WC "d_volatile='define'"
6248 $ WC "d_vprintf='define'"
6249 $ WC "d_vsnprintf='" + d_vsnprintf + "'"
6250 $ WC "d_wait4='" + d_wait4 + "'"
6251 $ WC "d_waitpid='define'"
6252 $ WC "d_wcstombs='" + d_wcstombs + "'"
6253 $ WC "d_wctomb='" + d_wctomb + "'"
6254 $ WC "d_writev='undef'"
6255 $ WC "db_hashtype=' '"
6256 $ WC "db_prefixtype=' '"
6257 $ WC "db_version_major='" + "'"
6258 $ WC "db_version_minor='" + "'"
6259 $ WC "db_version_patch='" + "'"
6260 $ WC "dbgprefix='" + dbgprefix + "'"
6261 $ WC "defvoidused='15'"
6262 $ WC "devtype='" + devtype + "'"
6263 $ WC "direntrytype='struct dirent'"
6264 $ WC "dlext='" + dlext + "'"
6265 $ WC "dlobj='" + dlobj + "'"
6266 $ WC "dlsrc='dl_vms.c'"
6267 $ WC "doublesize='" + doublesize + "'"
6268 $ WC "drand01='" + drand01 + "'"
6269 $ WC "dtrace='" + "'"
6271 $! The dynamic_ext symbol may be quite long
6273 $ tmp = "dynamic_ext='" + dynamic_ext + "'"
6277 $ WC "ebcdic='undef'"
6278 $ WC "embedmymalloc='" + usemymalloc + "'"
6279 $ WC "eunicefix=':'"
6280 $ WC "exe_ext='" + exe_ext + "'"
6282 $! The extensions symbols may be quite long
6284 $ tmp = "extensions='" + nonxs_ext + " " + dynamic_ext + "'"
6287 $ WC "fflushNULL='define'"
6288 $ WC "fflushall='undef'"
6289 $ WC "fpostype='fpos_t'"
6290 $ WC "freetype='void'"
6291 $ WC "full_ar='" + "'"
6292 $ WC "full_csh='" + " '"
6293 $ WC "full_sed='_NLA0:'"
6294 $ WC "gccversion='" + gccversion + "'"
6295 $ WC "gidformat='lu'"
6298 $ WC "gidtype='" + gidtype + "'"
6299 $ WC "groupstype='Gid_t'"
6301 $ WC "hintfile='" + "'"
6302 $ WC "i16size='" + i16size + "'"
6303 $ WC "i16type='" + i16type + "'"
6304 $ WC "i32size='" + i32size + "'"
6305 $ WC "i32type='" + i32type + "'"
6306 $ WC "i64size='" + i64size + "'"
6307 $ WC "i64type='" + i64type + "'"
6308 $ WC "i8size='" + i8size + "'"
6309 $ WC "i8type='" + i8type + "'"
6310 $ WC "i_arpainet='undef'"
6311 $ WC "i_assert='define'"
6312 $ WC "i_crypt='undef'"
6314 $ WC "i_dbm='undef'"
6315 $ WC "i_dirent='" + i_dirent + "'"
6316 $ WC "i_dlfcn='undef'"
6317 $ WC "i_fcntl='" + i_fcntl + "'"
6318 $ WC "i_float='define'"
6320 $ WC "i_fp_class='undef'"
6321 $ WC "i_gdbm='undef'"
6322 $ WC "i_gdbm_ndbm='undef'"
6323 $ WC "i_gdbmndbm='undef'"
6324 $ WC "i_grp='" + i_grp + "'"
6325 $ WC "i_ieeefp='undef'"
6326 $ WC "i_inttypes='" + i_inttypes + "'"
6327 $ WC "i_langinfo='" + i_langinfo + "'"
6328 $ WC "i_libutil='" + i_libutil + "'"
6329 $ WC "i_limits='define'"
6330 $ WC "i_locale='" + i_locale + "'"
6331 $ WC "i_machcthr='undef'"
6332 $ WC "i_machcthreads='undef'"
6333 $ WC "i_mallocmalloc='undef'"
6334 $ WC "i_math='define'"
6335 $ WC "i_memory='undef'"
6336 $ WC "i_mntent='undef'"
6337 $ WC "i_ndbm='undef'"
6338 $ WC "i_netdb='" + i_netdb + "'"
6339 $ WC "i_neterrno='define'"
6340 $ WC "i_netinettcp='" + i_netinettcp + "'"
6341 $ WC "i_niin='" + i_niin + "'"
6342 $ WC "i_poll='" + i_poll + "'"
6343 $ WC "i_prot='undef'"
6344 $ WC "i_pthread='define'"
6345 $ WC "i_pwd='undef'"
6346 $ WC "i_rpcsvcdbm='undef'"
6347 $ WC "i_sfio='undef'"
6348 $ WC "i_sgtty='undef'"
6349 $ WC "i_shadow='" + i_shadow + "'"
6350 $ WC "i_socks='" + i_socks + "'"
6351 $ WC "i_stdarg='define'"
6352 $ WC "i_stddef='define'"
6353 $ WC "i_stdlib='define'"
6354 $ WC "i_string='define'"
6355 $ WC "i_sunmath='undef'"
6356 $ WC "i_sysaccess='" + i_sysaccess + "'"
6357 $ WC "i_sysdir='undef'"
6358 $ WC "i_sysfile='" + i_sysfile + "'"
6359 $ WC "i_sysioctl='" + i_sysioctl + "'"
6360 $ WC "i_syslog='" + i_syslog + "'"
6361 $ WC "i_sysmman='undef'"
6362 $ WC "i_sysmode='" + i_sysmode + "'"
6363 $ WC "i_sysmount='undef'"
6364 $ WC "i_sysndir='undef'"
6365 $ WC "i_sysparam='undef'"
6366 $ WC "i_syspoll='" + i_syspoll + "'"
6367 $ WC "i_sysresrc='undef'"
6368 $ WC "i_syssecrt='" + i_syssecrt + "'"
6369 $ WC "i_sysselct='undef'"
6370 $ WC "i_syssockio='undef'"
6371 $ WC "i_sysstat='define'"
6372 $ WC "i_sysstatfs='undef'"
6373 $ WC "i_sysstatvfs='" + i_sysstatvfs + "'"
6374 $ WC "i_systime='undef'"
6375 $ WC "i_systimek='undef'"
6376 $ WC "i_systimes='undef'"
6377 $ WC "i_systypes='define'"
6378 $ WC "i_sysuio='" + i_sysuio + "'"
6379 $ WC "i_sysun='undef'"
6380 $ WC "i_sysutsname='" + i_sysutsname + "'"
6381 $ WC "i_sysvfs='undef'"
6382 $ WC "i_syswait='undef'"
6383 $ WC "i_termio='undef'"
6384 $ WC "i_termios='undef'"
6385 $ WC "i_time='define'"
6386 $ WC "i_unistd='" + i_unistd + "'"
6387 $ WC "i_ustat='undef'"
6388 $ WC "i_utime='" + i_utime + "'"
6389 $ WC "i_values='undef'"
6390 $ WC "i_varargs='undef'"
6391 $ WC "i_vfork='undef'"
6392 $ WC "inc_version_list='0'"
6393 $ WC "inc_version_list_init='0'"
6394 $ WC "installarchlib='" + installarchlib + "'"
6395 $ WC "installbin='" + installbin + "'"
6396 $ WC "installman1dir='" + installman1dir + "'"
6397 $ WC "installman3dir='" + installman3dir + "'"
6398 $ WC "installprefix='" + vms_prefix + "'"
6399 $ WC "installprefixexp='" + vms_prefix + ":'"
6400 $ WC "installprivlib='" + installprivlib + "'"
6401 $ WC "installscript='" + installscript + "'"
6402 $ WC "installsitearch='" + installsitearch + "'"
6403 $ WC "installsitebin='" + sitebin + "'"
6404 $ WC "installsitelib='" + installsitelib + "'"
6405 $ WC "installusrbinperl='undef'"
6406 $ WC "intsize='" + intsize + "'"
6407 $ WC "ivdformat='" + ivdformat + "'"
6408 $ WC "ivsize='" + ivsize + "'"
6409 $ WC "ivtype='" + ivtype + "'"
6411 $! The known_extensions symbol may be quite long
6413 $ tmp = "known_extensions='" + known_extensions + "'"
6416 $ WC "ld='" + ld + "'"
6417 $ WC "lddlflags='/Share'"
6418 $ WC "ldflags='" + ldflags + "'"
6419 $ WC "ldflags_uselargefiles='" + "'"
6420 $ WC "lib_ext='" + lib_ext + "'"
6421 $ WC "libc='" + libc + "'"
6422 $ WC "libpth='/sys$share /sys$library'"
6423 $ WC "libs='" + libs + "'"
6424 $ WC "libswanted='" + "'"
6425 $ WC "libswanted_uselargefiles='" + "'"
6426 $ WC "longdblsize='" + longdblsize + "'"
6427 $ WC "longlongsize='" + longlongsize + "'"
6428 $ WC "longsize='" + longsize + "'"
6429 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
6431 $ WC "lseeksize='8'"
6432 $ WC "lseektype='off_t'"
6434 $ WC "lseeksize='4'"
6435 $ WC "lseektype='int'"
6439 $ WC "make='" + make + "'"
6440 $ WC "malloctype='void *'"
6441 $ WC "usemallocwrap='" + usemallocwrap + "'"
6442 $ WC "man1ext='rno'"
6443 $ WC "man3ext='rno'"
6444 $ WC "mmaptype='void *'"
6445 $ WC "modetype='unsigned int'"
6446 $ WC "multiarch='undef'"
6447 $ WC "mydomain='" + mydomain + "'"
6448 $ WC "myhostname='" + myhostname + "'"
6449 $ WC "myuname='" + myuname + "'"
6450 $ WC "need_va_copy='undef'"
6451 $ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
6452 $ WC "netdb_host_type='" + netdb_host_type + "'"
6453 $ WC "netdb_name_type='" + netdb_name_type + "'"
6454 $ WC "netdb_net_type='" + netdb_net_type + "'"
6455 $ tmp = "nonxs_ext='" + nonxs_ext + "'"
6458 $ WC "nveformat='" + nveformat + "'"
6459 $ WC "nvfformat='" + nvfformat + "'"
6460 $ WC "nvgformat='" + nvgformat + "'"
6461 $ WC "nvsize='" + nvsize + "'"
6462 $ WC "nvtype='" + nvtype + "'"
6463 $ WC "o_nonblock=' '"
6464 $ WC "obj_ext='" + obj_ext + "'"
6465 $ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
6466 $ WC "oldarchlib='" + oldarchlib + "'"
6467 $ WC "oldarchlibexp='" + oldarchlibexp + "'"
6468 $ WC "optimize='" + optimize + "'"
6469 $ WC "osname='" + osname + "'"
6470 $ WC "osvers='" + osvers + "'"
6471 $ WC "otherlibdirs='" + "'"
6472 $ WC "package='" + package + "'"
6473 $ WC "pager='" + pager + "'"
6474 $ WC "patchlevel='" + patchlevel + "'"
6476 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
6477 $ WC "perladmin='" + perladmin + "'"
6478 $ WC "perllibs='" + perllibs + "'"
6479 $ WC "perlpath='" + "''vms_prefix':[000000]Perl''exe_ext'" + "'"
6480 $ WC "perl_symbol='" + perl_symbol + "'" ! VMS specific
6481 $ WC "perl_verb='" + perl_verb + "'" ! VMS specific
6482 $ WC "pgflquota='" + pgflquota + "'"
6483 $ WC "pidtype='" + pidtype + "'"
6484 $ WC "prefix='" + vms_prefix + "'"
6485 $ WC "prefixexp='" + vms_prefix + ":'"
6486 $ WC "privlib='" + privlib + "'"
6487 $ WC "privlibexp='" + privlibexp + "'"
6488 $ WC "procselfexe=' '"
6489 $ WC "prototype='define'"
6490 $ WC "ptrsize='" + ptrsize + "'"
6491 $ WC "quadkind='" + quadkind + "'"
6492 $ WC "quadtype='" + quadtype + "'"
6493 $ WC "randbits='" + randbits + "'"
6494 $ WC "randfunc='" + randfunc + "'"
6495 $ WC "randseedtype='" + randseedtype + "'"
6496 $ WC "ranlib='" + "'"
6497 $ WC "rd_nodata=' '"
6498 $ WC "revision='" + revision + "'"
6499 $ WC "sGMTIME_max='4294967295'"
6500 $ WC "sGMTIME_min='0'"
6501 $ WC "sLOCALTIME_max='4294967295'"
6502 $ WC "sLOCALTIME_min='0'"
6503 $ WC "sPRId64='" + sPRId64 + "'"
6504 $ WC "sPRIEldbl='" + sPRIEUldbl + "'"
6505 $ WC "sPRIFldbl='" + sPRIFUldbl + "'"
6506 $ WC "sPRIGldbl='" + sPRIGUldbl + "'"
6507 $ WC "sPRIX64='" + sPRIXU64 + "'"
6508 $ WC "sPRIeldbl='" + sPRIeldbl + "'"
6509 $ WC "sPRIfldbl='" + sPRIfldbl + "'"
6510 $ WC "sPRIgldbl='" + sPRIgldbl + "'"
6511 $! WC "sPRIi64='" + sPRIi64 + "'"
6512 $ WC "sPRIo64='" + sPRIo64 + "'"
6513 $ WC "sPRIu64='" + sPRIu64 + "'"
6514 $ WC "sPRIx64='" + sPRIx64 + "'"
6515 $ WC "sSCNfldbl='" + sSCNfldbl + "'"
6516 $ WC "sched_yield='" + sched_yield + "'"
6517 $ WC "scriptdir='" + scriptdir + "'"
6518 $ WC "scriptdirexp='" + scriptdir + "'" ! use scriptdir for now
6519 $ WC "seedfunc='" + seedfunc + "'"
6520 $ WC "selectminbits='32'"
6521 $ WC "selecttype='" + selecttype + "'"
6523 $ WC "sharpbang='#!'"
6524 $ WC "shmattype='" + " '"
6525 $ WC "shortsize='" + shortsize + "'"
6526 $ IF (f$length(sig_name) .GE. 244)
6528 $ tmp = "sig_name='" + sig_name + "'"
6532 $ WC "sig_name='" + sig_name + "'"
6534 $ IF (f$length(sig_name_init) .GE. 244)
6536 $ tmp = "sig_name_init='" + sig_name_init + "'"
6540 $ WC "sig_name_init='" + sig_name_init + "'"
6542 $ WC "sig_num='" + sig_num + "'"
6543 $ WC "sig_num_init='" + sig_num_init + "'"
6544 $ WC "sig_count='" + sig_count + "'"
6545 $ WC "sig_size='" + sig_size + "'"
6546 $ WC "signal_t='" + signal_t + "'"
6547 $ WC "sitearch='" + sitearch + "'"
6548 $ WC "sitearchexp='" + sitearchexp + "'"
6549 $ WC "sitebin='" + sitebin + "'"
6550 $ WC "sitebinexp='" + sitebin + "'"
6551 $ WC "sitelib='" + sitelib + "'"
6552 $ WC "sitelib_stem='" + sitelib_stem + "'"
6553 $ WC "sitelibexp='" + sitelibexp + "'"
6554 $ WC "siteprefix='" + vms_prefix + "'"
6555 $ WC "siteprefixexp='" + vms_prefix + ":'"
6556 $ WC "sizesize='" + sizesize + "'"
6557 $ WC "sizetype='size_t'"
6558 $ WC "so='" + so + "'"
6559 $ WC "socksizetype='" + socksizetype + "'"
6560 $ WC "spitshell='write sys$output '"
6561 $ WC "src='" + src + "'"
6562 $ WC "ssizetype='int'"
6563 $ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
6564 $ WC "static_ext='" + static_ext + "'"
6565 $ WC "stdchar='" + stdchar + "'"
6566 $ WC "stdio_base='((*fp)->_base)'"
6567 $ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
6568 $ WC "stdio_cnt='((*fp)->_cnt)'"
6569 $ WC "stdio_ptr='((*fp)->_ptr)'"
6570 $ WC "stdio_stream_array=' " + "'"
6571 $ WC "subversion='" + subversion + "'"
6572 $ WC "targetarch='" + "'"
6573 $ WC "timetype='" + timetype + "'"
6574 $ WC "u16size='" + u16size + "'"
6575 $ WC "u16type='" + u16type + "'"
6576 $ WC "u32size='" + u32size + "'"
6577 $ WC "u32type='" + u32type + "'"
6578 $ WC "u64size='" + u64size + "'"
6579 $ WC "u64type='" + u64type + "'"
6580 $ WC "u8size='" + u8size + "'"
6581 $ WC "u8type='" + u8type + "'"
6582 $ WC "uidformat='lu'"
6585 $ WC "uidtype='" + uidtype + "'"
6586 $ WC "uquadtype='" + uquadtype + "'"
6587 $ WC "use5005threads='" + use5005threads + "'"
6588 $ WC "use64bitall='" + use64bitall + "'"
6589 $ WC "use64bitint='" + use64bitint + "'"
6590 $ WC "usecasesensitive='" + be_case_sensitive + "'" ! VMS-specific
6591 $ WC "usedebugging_perl='"+use_debugging_perl+"'"
6592 $ WC "usedefaulttypes='" + usedefaulttypes + "'" ! VMS-specific
6593 $ WC "usecrosscompile='undef'"
6594 $ WC "usedevel='" + usedevel + "'"
6595 $ WC "usedl='" + usedl + "'"
6596 $ WC "usedtrace='undef'"
6597 $ WC "usefaststdio='" + usefaststdio + "'"
6598 $ WC "useieee='" + useieee + "'" ! VMS-specific
6599 $ WC "useithreads='" + useithreads + "'"
6600 $ WC "usekernelthreads='" + usekernelthreads + "'" ! VMS-specific
6601 $ WC "uselargefiles='" + uselargefiles + "'"
6602 $ WC "uselongdouble='" + uselongdouble + "'"
6603 $ WC "usemorebits='" + usemorebits + "'"
6604 $ WC "usemultiplicity='" + usemultiplicity + "'"
6605 $ WC "usemymalloc='" + usemymalloc + "'"
6606 $ WC "useperlio='" + useperlio + "'"
6607 $ WC "useposix='false'"
6608 $ WC "usereentrant='undef'"
6609 $ WC "userelocatableinc='undef'"
6610 $ WC "usesecurelog='" + usesecurelog + "'" ! VMS-specific
6611 $ WC "useshrplib='true'"
6612 $ WC "usesitecustomize='" + usesitecustomize + "'"
6613 $ WC "usesocks='undef'"
6614 $ WC "usethreads='" + usethreads + "'"
6615 $ WC "usethreadupcalls='" + usethreadupcalls + "'" ! VMS-specific
6616 $ WC "usevendorprefix='" + "'" ! try to say no, though we'll be ignored as of MM 5.90_01
6617 $ WC "usevfork='true'"
6618 $ WC "usevmsdebug='" + usevmsdebug + "'" ! VMS-specific
6619 $ WC "uvoformat='" + uvoformat + "'"
6620 $ WC "uvsize='" + uvsize + "'"
6621 $ WC "uvtype='" + uvtype + "'"
6622 $ WC "uvuformat='" + uvuformat + "'"
6623 $ WC "uvxformat='" + uvxformat + "'"
6624 $ WC "uvXUformat='" + uvXUformat + "'"
6625 $ WC "vendorarch='" + "'"
6626 $ WC "vendorarchexp='" + "'"
6627 $ WC "vendorbin='" + "'"
6628 $ WC "vendorbinexp='" + "'"
6629 $ WC "vendorlib_stem='" + "'"
6630 $ WC "vendorlib='" + "'"
6631 $ WC "vendorlibexp='" + "'"
6632 $ WC "vendorprefix='" + "'"
6633 $ WC "vendorprefixexp='" + "'"
6634 $ WC "version='" + version + "'"
6635 $ WC "version_patchlevel_string='" + version_patchlevel_string + "'"
6636 $ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific
6637 $ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific
6638 $ WC "vms_ver='" + vms_ver + "'" ! VMS specific
6639 $ WC "voidflags='15'"
6641 $! ## The UNIXy POSIXy reentrantey thingys ##
6642 $! See "Appendix B, Version-Dependency Tables" in the C RTL
6643 $! manual for when assorted _r functions became available.
6645 $ IF use_threads .AND. vms_ver .GES. "7.2"
6647 $ WC "asctime_r_proto='REENTRANT_PROTO_B_SB'"
6648 $ WC "d_asctime_r='define'"
6649 $ WC "ctime_r_proto='REENTRANT_PROTO_B_SB'"
6650 $ WC "d_ctime_r='define'"
6652 $ WC "asctime_r_proto='0'"
6653 $ WC "d_asctime_r='undef'"
6654 $ WC "ctime_r_proto='0'"
6655 $ WC "d_ctime_r='undef'"
6657 $ WC "d_crypt_r='undef'"
6658 $ WC "d_ctermid_r='undef'"
6659 $ WC "d_drand48_r='undef'"
6660 $ WC "d_endgrent_r='undef'"
6661 $ WC "d_endhostent_r='undef'"
6662 $ WC "d_endnetent_r='undef'"
6663 $ WC "d_endprotoent_r='undef'"
6664 $ WC "d_endpwent_r='undef'"
6665 $ WC "d_endservent_r='undef'"
6666 $ WC "d_getgrent_r='undef'"
6667 $ WC "d_getgrgid_r='" + d_getgrgid_r + "'"
6668 $ WC "d_getgrnam_r='" + d_getgrnam_r + "'"
6669 $ WC "d_gethostbyaddr_r='undef'"
6670 $ WC "d_gethostbyname_r='undef'"
6671 $ WC "d_gethostent_r='undef'"
6672 $ WC "d_getlogin_r='undef'"
6673 $ WC "d_getnetbyaddr_r='undef'"
6674 $ WC "d_getnetbyname_r='undef'"
6675 $ WC "d_getnetent_r='undef'"
6676 $ WC "d_getprotobyname_r='undef'"
6677 $ WC "d_getprotobynumber_r='undef'"
6678 $ WC "d_getprotoent_r='undef'"
6679 $ WC "d_getpwent_r='undef'"
6680 $ WC "d_getpwnam_r='" + d_getpwnam_r + "'"
6681 $ WC "d_getpwuid_r='" + d_getpwuid_r + "'"
6682 $ WC "d_getservbyname_r='undef'"
6683 $ WC "d_getservbyport_r='undef'"
6684 $ WC "d_getservent_r='undef'"
6685 $ WC "d_getspnam_r='undef'"
6686 $ WC "d_gmtime_r='undef'" ! leave undef'd; we use my_gmtime
6687 $ WC "d_localtime_r='undef'" ! leave undef'd; we use my_localtime
6688 $ WC "d_localtime_r_needs_tzset='undef'"
6689 $ WC "d_random_r='undef'"
6690 $ WC "d_readdir_r='define'" ! always defined; we roll our own
6691 $ WC "d_readdir64_r='undef'"
6692 $ WC "d_setgrent_r='undef'"
6693 $ WC "d_sethostent_r='undef'"
6694 $ WC "d_setlocale_r='undef'"
6695 $ WC "d_setnetent_r='undef'"
6696 $ WC "d_setprotoent_r='undef'"
6697 $ WC "d_setpwent_r='undef'"
6698 $ WC "d_setservent_r='undef'"
6699 $ WC "d_snprintf='" + d_snprintf + "'"
6700 $ WC "d_srand48_r='undef'"
6701 $ WC "d_srandom_r='undef'"
6702 $ WC "d_strerror_r='undef'"
6703 $ WC "d_tmpnam_r='undef'"
6704 $ WC "d_ttyname_r='" + d_ttyname_r + "'"
6705 $ WC "ctermid_r_proto='0'"
6706 $ WC "crypt_r_proto='0'"
6707 $ WC "drand48_r_proto='0'"
6708 $ WC "endgrent_r_proto='0'"
6709 $ WC "endhostent_r_proto='0'"
6710 $ WC "endnetent_r_proto='0'"
6711 $ WC "endprotoent_r_proto='0'"
6712 $ WC "endpwent_r_proto='0'"
6713 $ WC "endservent_r_proto='0'"
6714 $ WC "getgrent_r_proto='0'"
6715 $ WC "getgrgid_r_proto='" + getgrgid_r_proto + "'"
6716 $ WC "getgrnam_r_proto='" + getgrnam_r_proto + "'"
6717 $ WC "gethostbyaddr_r_proto='0'"
6718 $ WC "gethostbyname_r_proto='0'"
6719 $ WC "gethostent_r_proto='0'"
6720 $ WC "getlogin_r_proto='0'"
6721 $ WC "getnetbyaddr_r_proto='0'"
6722 $ WC "getnetbyname_r_proto='0'"
6723 $ WC "getnetent_r_proto='0'"
6724 $ WC "getprotobyname_r_proto='0'"
6725 $ WC "getprotobynumber_r_proto='0'"
6726 $ WC "getprotoent_r_proto='0'"
6727 $ WC "getpwent_r_proto='0'"
6728 $ WC "getpwnam_r_proto='0'"
6729 $ WC "getpwuid_r_proto='0'"
6730 $ WC "getservbyname_r_proto='0'"
6731 $ WC "getservbyport_r_proto='0'"
6732 $ WC "getservent_r_proto='0'"
6733 $ WC "getspnam_r_proto='0'"
6734 $ WC "gmtime_r_proto='0'"
6735 $ WC "localtime_r_proto='0'"
6736 $ WC "random_r_proto='0'"
6737 $ WC "readdir_r_proto='REENTRANT_PROTO_I_TSR'" ! always defined; we roll our own
6738 $ WC "readdir64_r_proto='0'"
6739 $ WC "setgrent_r_proto='0'"
6740 $ WC "sethostent_r_proto='0'"
6741 $ WC "setlocale_r_proto='0'"
6742 $ WC "setnetent_r_proto='0'"
6743 $ WC "setprotoent_r_proto='0'"
6744 $ WC "setpwent_r_proto='0'"
6745 $ WC "setservent_r_proto='0'"
6746 $ WC "srand48_r_proto='0'"
6747 $ WC "srandom_r_proto='0'"
6748 $ WC "strerror_r_proto='0'"
6749 $ WC "tmpnam_r_proto='0'"
6750 $ WC "ttyname_r_proto='" + ttyname_r_proto + "'"
6752 $! ##END WRITE NEW CONSTANTS HERE##
6756 $! Okay, we've gotten here. Build munchconfig.exe
6757 $ COPY/NOLOG [-.vms]munchconfig.c []
6758 $ COPY/NOLOG [-.vms]'Makefile_SH' []
6759 $ 'Perl_CC' 'ccflags' munchconfig.c
6762 $ OPEN/WRITE CONFIG []munchconfig.opt
6763 $ IF ccname .EQS. "GCC"
6765 $ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library"
6767 $ WRITE CONFIG "Sys$Share:VAXCRTL/Share"
6769 $ 'ld' munchconfig.obj,munchconfig.opt/opt
6770 $ DELETE/NOLOG/NOCONFIRM munchconfig.opt;
6772 $ 'ld' munchconfig.obj
6774 $ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj;
6775 $ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
6776 $ IF ccname .EQS. "CXX"
6778 $ CALL Cxx_demangler_cleanup
6781 $ IF alldone .EQS. ""
6786 If you'd like to make any changes to the config.sh file before I begin
6787 to configure things, answer yes to the following question.
6791 $ rp="Do you wish to edit ''basename_config_sh'? [''bool_dflt'] "
6796 $ echo4 "Be sure to type LOGOUT after you have edited the file,"
6797 $ echo4 "then this procedure will resume."
6799 $ default = F$ENVIRONMENT("DEFAULT")
6800 $ DIRECTORY 'config_sh'
6803 $ SET DEFAULT 'default'
6808 $ echo4 "Adding ''osname' specific preprocessor commands."
6810 $ ! we need an fdl file
6811 $ CREATE [-]CONFIG.FDL
6816 $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
6817 $ ! First spit out the header info with the local defines (to get
6818 $ ! around the 255 character command line limit)
6819 $ OPEN/APPEND CONFIG [-]config.local
6820 $ IF use_debugging_perl THEN WC "#define DEBUGGING"
6821 $ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
6822 $ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
6823 $ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
6824 $ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
6825 $ IF ccname .EQS. "GCC" THEN WC "#define GNUC_ATTRIBUTE_CHECK"
6826 $ IF (Has_Dec_C_Sockets)
6828 $ WC "#define VMS_DO_SOCKETS"
6829 $ WC "#define DECCRTL_SOCKETS"
6831 $ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS"
6833 $! This is VMS-specific for now
6834 $ WC "#''d_setenv' HAS_SETENV"
6835 $ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
6836 $ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
6837 $ IF use64bitint .OR. use64bitint .EQS. "define"
6839 $ WC "#define USE_64_BIT_INT"
6840 $ WC "#define USE_LONG_DOUBLE"
6842 $ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
6843 WC "#define USE_64_BIT_ALL"
6844 $ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
6845 $ IF use_ieee_math THEN WC "#define USE_IEEE"
6846 $ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
6847 $ WC "#define HAS_ENVGETENV"
6848 $ WC "#define PERL_EXTERNAL_GLOB"
6849 $ IF archname .EQS. "VMS_VAX" .AND. -
6850 ccname .EQS. "DEC" .AND. -
6851 ccversion .LE. 50390006
6853 $! Alas this does not help to build Fcntl
6854 $! WC "#define PERL_IGNORE_FPUSIG SIGFPE"
6856 $ IF kill_by_sigprc .EQS. "define" then WC "#define KILL_BY_SIGPRC"
6857 $ IF unlink_all_versions .OR. unlink_all_versions .EQS. "define" THEN -
6858 WC "#define UNLINK_ALL_VERSIONS"
6861 $ echo4 "Doing variable substitutions on .SH files..."
6862 $ echo4 "Extracting config.h (with variable substitutions)"
6864 $! Now build the normal config.h
6865 $ DEFINE/USER_MODE sys$output [-]config.main
6866 $ mcr []munchconfig 'config_sh' [-]config_h.sh
6867 $ ! Concatenate them together
6868 $ copy [-]config.local,[-]config.main [-]config.h
6870 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.MAIN;*
6871 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.LOCAL;*
6872 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;*
6874 $ IF ccname .EQS. "DEC"
6876 $ DECC_REPLACE = "DECC=decc=1"
6878 $ DECC_REPLACE = "DECC="
6880 $ IF ccname .EQS. "CXX"
6882 $ DECCXX_REPLACE = "DECCXX=DECCXX=1"
6884 $ DECCXX_REPLACE = "DECCXX="
6886 $ IF ccname .EQS. "GCC"
6888 $ GNUC_REPLACE = "GNUC=gnuc=1"
6890 $ GNUC_REPLACE = "GNUC="
6892 $ IF Has_Dec_C_Sockets
6894 $ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
6898 $ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
6900 $ SOCKET_REPLACE = "SOCKET="
6905 $ IF (vms_ver .LES. "6.2")
6907 $ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
6909 $ THREAD_REPLACE = "THREAD=THREADED=1"
6912 $ THREAD_REPLACE = "THREAD="
6916 $ MALLOC_REPLACE = "MALLOC=MALLOC=1"
6918 $ MALLOC_REPLACE = "MALLOC="
6920 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
6922 $ IF usestdstat .or. usestdstat .eqs. "define"
6924 $ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_USE_STD_STAT=1"
6926 $ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_LARGEFILE=1"
6929 $ LARGEFILE_REPLACE = "LARGEFILE="
6932 $! In order not to stress the tiny command buffer on pre-7.3-2 systems,
6933 $! we put the following substitutions in a file and pass the file to
6936 $ open/write CONFIG extra_subs.txt
6937 $ WC := write CONFIG
6938 $ WC "''DECC_REPLACE'"
6939 $ WC "''DECCXX_REPLACE'"
6941 $ WC "''GNUC_REPLACE'"
6942 $ WC "''SOCKET_REPLACE'"
6943 $ WC "''THREAD_REPLACE'"
6944 $ WC "''C_Compiler_Replace'"
6945 $ WC "''MALLOC_REPLACE'"
6946 $ WC "''THREAD_UPCALLS'"
6947 $ WC "''THREAD_KERNEL'"
6948 $ WC "PV=''version'"
6949 $ WC "FLAGS=FLAGS=''extra_flags'"
6950 $ WC "''LARGEFILE_REPLACE'"
6953 $ echo4 "Extracting ''defmakefile' (with variable substitutions)"
6954 $ DEFINE/USER_MODE sys$output 'UUmakefile'
6955 $ mcr []munchconfig 'config_sh' 'Makefile_SH' -f extra_subs.txt
6956 $! Clean up after ourselves
6957 $ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
6958 $ DELETE/NOLOG/NOCONFIRM []extra_subs.txt;
6960 $! Note that the /key qualifier to search, as in:
6961 $! search README.* "=head"/key=(position=1)/window=0/output=extra.pods
6962 $! is not supported on VMS V5.5-2, hence not used in extra_pods.com.
6964 $ echo4 "Extracting extra_pods.com (without variable substitutions)"
6965 $ Create Sys$Disk:[-]extra_pods.com
6966 $ Deck/Dollar="$EOExtra_Pods$"
6968 $! NOTE: This file is extracted as part of the VMS configuration process.
6969 $! Any changes made to it directly will be lost. If you need to make any
6970 $! changes, please edit the template in Configure.Com instead.
6971 $! Use FORCE if you've just podified a README.* file on VMS.
6972 $ if f$search("extra.pods") .eqs. "" .or. P1 .eqs. "FORCE" then -
6973 search README.* "=head"/window=0/output=extra.pods
6974 $ open/read/error=extra_close EXTRA extra.pods
6976 $ read/error=extra_close/END_OF_FILE=extra_close EXTRA file
6977 $ file_type = f$edit(f$parse(file,,,"TYPE",),"LOWERCASE") - "."
6978 $ if file_type .nes. "VMS" .and. file_type .nes. "vms"
6980 $ pod_file = "[.pod]perl''file_type'.pod"
6981 $ file = file - "''f$parse(file,,,"VERSION",)'"
6982 $ if p1 .eqs. "CLEAN"
6983 $ then if f$search(pod_file) .nes. "" then delete/log 'pod_file';*
6986 $ if f$search(pod_file) .eqs. ""
6987 $ then do_copy := true
6989 $ file_rdt = f$cvtime(f$file_attributes(file,"RDT"))
6990 $ pod_file_rdt = f$cvtime(f$file_attributes(pod_file,"RDT"))
6991 $ if file_rdt .GTS. pod_file_rdt then do_copy := true
6993 $ ! wacky method to preserve case on ODS-5 even when parse style is traditional
6994 $ if do_copy then mcr sys$disk:[]miniperl.exe -e "exit 0+$^E unless File::Copy::rmscopy(q{''file'}, q{''pod_file'});"
7000 $ if p1 .eqs. "CLEAN" .and. f$search("extra.pods;-1") .nes. "" then -
7001 purge/nolog extra.pods
7005 $! Warn of dangerous symbols or logical names
7007 $Bad_environment: SUBROUTINE
7009 $ IF p2 .eqs. "SYMBOL"
7011 $ IF f$type('p1') .nes. "" THEN Bad_env := SYMBOL
7013 $ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
7015 $ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
7017 $ IF f$search("config.msg") .nes. ""
7019 $ OPEN/APPEND CONFIG config.msg
7021 $ OPEN/WRITE CONFIG config.msg
7023 $ IF Bad_env .eqs. "SYMBOL"
7026 $ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
7027 $ WRITE CONFIG " delete before building ''package' via:"
7028 $ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
7029 $ IF f$locate("""",&p1) .ge. f$length(&p1)
7031 $ WRITE CONFIG " after building, testing, and installing ''package'"
7032 $ WRITE CONFIG " restore the symbol with:"
7033 $ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
7036 $ IF Bad_env .eqs. "LOGICAL"
7039 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
7040 $ WRITE CONFIG " deassign before building ''package'"
7046 $ ENDSUBROUTINE ! Bad_environment
7048 $ echo4 "Checking for dangerous pre-existing global symbols and logical names."
7049 $ CALL Bad_environment "COMP"
7050 $ CALL Bad_environment "EXT"
7051 $ CALL Bad_environment "FOO"
7052 $ CALL Bad_environment "LIB"
7053 $ CALL Bad_environment "LIST"
7054 $ CALL Bad_environment "MIME"
7055 $ CALL Bad_environment "POSIX"
7056 $ CALL Bad_environment "SYS"
7057 $ CALL Bad_environment "T"
7058 $ CALL Bad_environment "THREAD"
7059 $ CALL Bad_environment "THREADS"
7060 $ CALL Bad_environment "TIME"
7061 $ CALL Bad_environment "TMP"
7062 $ CALL Bad_environment "UNICODE"
7063 $ CALL Bad_environment "UTIL"
7064 $ CALL Bad_environment "TEST" "SYMBOL"
7065 $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
7067 $! %Config-I-VMS, write perl_setup.com here
7069 $ IF (.NOT.perl_symbol)
7071 $ file_2_find = "[-]''packageup'.cld"
7073 $ echo4 "The perl.cld file is now being written..."
7074 $ OPEN/WRITE CONFIG 'file_2_find'
7076 $ IF (sharedperl .AND. F$EXTRACT(0,7,archname) .EQS. "VMS_AXP") THEN ext := .AXE
7077 $ IF (sharedperl .AND. F$EXTRACT(0,8,archname) .EQS. "VMS_IA64") THEN ext := .IXE
7078 $ IF (use_vmsdebug_perl)
7080 $ WRITE CONFIG "define verb dbgperl"
7081 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
7082 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7084 $ WRITE CONFIG "define verb perl"
7085 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
7086 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7088 $ WRITE CONFIG "define verb perl"
7089 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
7090 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7093 $ ENDIF ! (.NOT.perl_symbol)
7095 $ echo4 "The perl_setup.com file is now being written..."
7096 $ file_2_find = "[-]perl_setup.com"
7098 $! Folks are likely to want to edit perl_setup.com.
7099 $! STMLF RFM plays nicer with ported editors than does VFC.
7101 $ CREATE [-]CONFIG.FDL
7106 $ CREATE /FDL=[-]CONFIG.FDL 'file_2_find'
7107 $ OPEN/APPEND CONFIG 'file_2_find'
7108 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;
7110 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
7111 $ IF cf_email.NES.perladmin
7113 $ WRITE CONFIG "$! perl configured by ''cf_email'"
7115 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
7118 $! HP hack to make distributing binaries easier
7119 $!----------------------------------------------
7120 $ pcsi_producer = f$trnlnm("PCSI_PRODUCER")
7121 $ if pcsi_producer .eqs. ""
7123 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'"
7125 $ WRITE CONFIG "$ myproc = f$environment(""PROCEDURE"")"
7126 $ WRITE CONFIG "$ myroot_dev = f$parse(myproc,,,""DEVICE"",""NO_CONCEAL"")"
7127 $ WRITE CONFIG "$ myroot_dir = f$parse(myproc,,,""DIRECTORY"",""NO_CONCEAL"")"
7128 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000."" - ""><000000."""
7129 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000]"" - ""><000000>"""
7130 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""]["" - ""><"""
7131 $ WRITE CONFIG "$ myroot_dir = myroot_dir - "".]"" - "".>"" - ""["" - ""]"" - ""<"" - "">"""
7132 $ WRITE CONFIG "$ if f$trnlnm(""HP_BUILD_PERL_BIN_KIT"",""LNM$PROCESS_TABLE"") .EQS. """""
7133 $ WRITE CONFIG "$ then"
7134 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' 'myroot_dev'['myroot_dir'.]"
7135 $ WRITE CONFIG "$ endif"
7137 $ WRITE CONFIG "$ ext = "".exe"""
7140 $ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 2 then ext = "".AXE"""
7141 $ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 3 then ext = "".IXE"""
7145 $ perl_setup_perl = "'" + "'perl'" ! triple quoted foreign command symbol
7146 $ IF (use_vmsdebug_perl)
7148 $ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgperl'ext'"
7149 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgperl'ext'"
7150 $ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
7152 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
7153 $ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
7155 $ ELSE ! .NOT.perl_symbol
7156 $ perl_setup_perl = "perl" ! command verb
7157 $ IF (use_vmsdebug_perl)
7159 $ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
7161 $ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
7163 $ IF perl_verb .EQS. "PROCESS"
7165 $ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
7167 $ ENDIF ! perl_symbol
7171 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
7172 $ ELSE !leave in but commented out (in case setting was from perl :-)
7173 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
7176 $ WRITE CONFIG "$! Symbols for Perl-based utility programs:"
7178 $ WRITE CONFIG "$ c2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]c2ph.com"""
7179 $ WRITE CONFIG "$ config_data== """ + perl_setup_perl + " ''vms_prefix':[utils]config_data.com"""
7180 $ WRITE CONFIG "$ corelist == """ + perl_setup_perl + " ''vms_prefix':[utils]corelist.com"""
7181 $ WRITE CONFIG "$ cpan == """ + perl_setup_perl + " ''vms_prefix':[utils]cpan.com"""
7182 $ WRITE CONFIG "$ cpan2dist == """ + perl_setup_perl + " ''vms_prefix':[utils]cpan2dist.com"""
7183 $! FIXME: "-" is an operator and illegal in a symbol name -- cpanp-run-perl can't work
7184 $!$ WRITE CONFIG "$ cpanp-run-perl == """ + perl_setup_perl + " ''vms_prefix':[utils]cpanp-run-perl.com"""
7185 $ WRITE CONFIG "$ cpanp == """ + perl_setup_perl + " ''vms_prefix':[utils]cpanp.com"""
7186 $ IF F$LOCATE("Devel::DProf",dynamic_ext) .LT. F$LENGTH(dynamic_ext)
7188 $ WRITE CONFIG "$ dprofpp == """ + perl_setup_perl + " ''vms_prefix':[utils]dprofpp.com"""
7190 $ WRITE CONFIG "$ enc2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]enc2xs.com"""
7191 $ WRITE CONFIG "$ find2perl == """ + perl_setup_perl + " ''vms_prefix':[utils]find2perl.com"""
7192 $ WRITE CONFIG "$ h2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]h2ph.com"""
7193 $ WRITE CONFIG "$ h2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]h2xs.com"""
7194 $ WRITE CONFIG "$ instmodsh == """ + perl_setup_perl + " ''vms_prefix':[utils]instmodsh.com"""
7195 $ WRITE CONFIG "$ libnetcfg == """ + perl_setup_perl + " ''vms_prefix':[utils]libnetcfg.com"""
7196 $ WRITE CONFIG "$ perlbug == """ + perl_setup_perl + " ''vms_prefix':[utils]perlbug.com"""
7197 $ WRITE CONFIG "$ perldoc == """ + perl_setup_perl + " ''vms_prefix':[utils]perldoc.com """"-t"""""""
7198 $ WRITE CONFIG "$ perlivp == """ + perl_setup_perl + " ''vms_prefix':[utils]perlivp.com"""
7199 $ WRITE CONFIG "$ piconv == """ + perl_setup_perl + " ''vms_prefix':[utils]piconv.com"""
7200 $ WRITE CONFIG "$ pl2pm == """ + perl_setup_perl + " ''vms_prefix':[utils]pl2pm.com"""
7201 $ WRITE CONFIG "$ pod2html == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2html.com"""
7202 $ WRITE CONFIG "$ pod2latex == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2latex.com"""
7203 $ WRITE CONFIG "$ pod2text == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2text.com"""
7204 $ WRITE CONFIG "$!pod2man == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2man.com"""
7205 $ WRITE CONFIG "$ pod2usage == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2usage.com"""
7206 $ WRITE CONFIG "$ podchecker == """ + perl_setup_perl + " ''vms_prefix':[utils]podchecker.com"""
7207 $ WRITE CONFIG "$ podselect == """ + perl_setup_perl + " ''vms_prefix':[utils]podselect.com"""
7208 $ WRITE CONFIG "$ prove == """ + perl_setup_perl + " ''vms_prefix':[utils]prove.com"""
7209 $ WRITE CONFIG "$ psed == """ + perl_setup_perl + " ''vms_prefix':[utils]psed.com"""
7210 $ WRITE CONFIG "$ pstruct == """ + perl_setup_perl + " ''vms_prefix':[utils]pstruct.com"""
7211 $ WRITE CONFIG "$ s2p == """ + perl_setup_perl + " ''vms_prefix':[utils]s2p.com"""
7212 $ WRITE CONFIG "$ ptar == """ + perl_setup_perl + " ''vms_prefix':[utils]ptar.com"""
7213 $ WRITE CONFIG "$ ptardiff == """ + perl_setup_perl + " ''vms_prefix':[utils]ptardiff.com"""
7214 $ WRITE CONFIG "$ shasum == """ + perl_setup_perl + " ''vms_prefix':[utils]shasum.com"""
7215 $ WRITE CONFIG "$ splain == """ + perl_setup_perl + " ''vms_prefix':[utils]splain.com"""
7216 $ WRITE CONFIG "$ xsubpp == """ + perl_setup_perl + " ''vms_prefix':[utils]xsubpp.com"""
7220 $ echo "The file can be found at:"
7221 $ echo4 " ''F$SEARCH(file_2_find)'"
7222 $ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
7223 $ echo "when you are satisfied with a successful compilation,"
7224 $ echo "testing, and installation of your perl."
7226 $ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
7228 $ file_2_find = "[-]''packageup'_install.com"
7229 $ OPEN/WRITE CONFIG 'file_2_find'
7230 $ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
7231 $ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
7232 $ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
7235 $ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
7236 $ echo4 " @ ''F$SEARCH(file_2_find)'"
7237 $ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
7241 $!figure out where we "are" by parsing 'vms_default_directory_name'
7243 $ set_def_command = ""
7244 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
7245 $ tmp = vms_default_directory_name - dflt - "]"
7247 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
7249 $ tmp1 = F$ELEMENT(i,".",tmp)
7250 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
7252 $ THEN set_def_command = "set default [-"
7253 $ ELSE set_def_command = set_def_command + "-"
7257 $Beyond_set_def_loop:
7258 $ IF set_def_command.NES.""
7260 $ set_def_command = set_def_command - "-" + "]"
7262 $ echo4 "In order to build ''package' you must now issue the commands:"
7264 $ echo4 " ''set_def_command'"
7267 $ echo4 "In order to build ''package' you must now issue the command:"
7270 $ echo4 " ''make'''makefile'", macros
7273 $ IF ( F$SEARCH("config.msg").NES."" )
7275 $ echo4 "Hmm. I also noted the following information while running:"
7277 $ TYPE/OUTPUT=SYS$ERROR: config.msg
7278 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
7279 $ DELETE/NOLOG/NOCONFIRM config.msg;
7286 $ CLOSE/NOLOG STDOUT
7287 $ DEASSIGN SYS$OUTPUT
7289 $ CLOSE/NOLOG CONFIG
7290 $ IF F$GETJPI("","FILCNT").GT.vms_filcnt
7291 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
7293 $ dflt = F$ENVIRONMENT("DEFAULT")
7294 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
7296 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
7298 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
7299 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
7301 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
7303 $!: End of Configure