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"
48 $ use_vmsdebug_perl = "n"
51 $ C_Compiler_Replace = "CC="
52 $ Thread_Live_Dangerously = "MT="
53 $ use_two_pot_malloc = "N"
54 $ use_pack_malloc = "N"
55 $ use_debugmalloc = "N"
58 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
59 $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx]
60 $! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx]
62 $! Sebastian Bazley's request: close the CONFIG handle with /NOLOG
63 $! qualifier "just in case" (configure.com is re @ed in a bad state).
64 $! This construct was tested to be not a problem as far back as
65 $! VMS V5.5-2, hopefully earlier versions are OK as well.
69 $! Now keep track of open files
71 $ vms_filcnt = F$GETJPI ("","FILCNT")
73 $!: compute my invocation name
74 $ me = F$ENVIRONMENT("PROCEDURE")
76 $! Many null statements (begin with colon ':') in the Bourne shell version of
77 $! this script serve as comments/placeholders. I have retained some of the ones
78 $! that will help you compare this .COM file to the sh version - as well as
79 $! leave placeholders for future improvements to this .COM file.
80 $! sfn = VMS "skipped for now"
82 $!: Proper PATH separator !sfn
83 $!: Proper PATH setting !sfn
84 $!: Sanity checks !sfn "Say '@''$me''"
85 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
86 $!: Configure runs within the UU subdirectory !->after find MANIFEST
87 $! <big long list of default values (mostly null)>
88 $!: We must find out about Eunice early !(?)
89 $!: list of known cpp symbols, sorted alphabetically !sfn
91 $!: default library list !sfn
92 $! <no hints files in use (yet?)>
93 $!: Extra object files, if any, needed on this platform. !sfn
94 $!: Possible local include directories to search. !sfn
95 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
96 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
97 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
98 $!: no include file wanted by default !sfn
100 $!: Possible local library directories to search. !sfn
101 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
102 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
103 $!: general looking path for locating libraries !sfn
104 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
105 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
106 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
107 $!: Private path used by Configure to find libraries. Its value !sfn
108 $!: is prepended to libpth. This variable takes care of special !sfn
109 $!: machines, like the mips. Usually, it should be empty. !sfn
111 $!: full support for void wanted by default !sfn
112 $!defvoidused=15 !sfn
113 $!: List of libraries we want. !sfn
114 $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
115 $!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
116 $!libswanted="$libswanted ucb bsd BSD PW x" !sfn
117 $!: We probably want to search /usr/shlib before most other libraries. !sfn
118 $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
119 $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
120 $!glibpth="/usr/shlib $glibpth" !sfn
121 $!: Do not use vfork unless overridden by a hint file. !sfn
122 $!usevfork=false !sfn
123 $!: script used to extract .SH files with variable substitutions !sfn
124 $!: produce awk script to parse command line options !sfn
125 $!sfn (assume no sed awk) see below
126 $!: process the command line options
128 $!: set up default values
132 $ IF F$TYPE(config_sh) .EQS. "" THEN config_sh=""
143 $ use_5005_threads = "N"
149 $ THEN !one or more switches was thrown
156 $ config_args = config_args + F$FAO(" !AS",P'i')
159 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
163 $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
164 $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
165 $Remove_quotation_mark:
167 $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
168 $ gotopt = "f" !"alse"
169 $ gotshortopt = "f" !"alse"
170 $ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
173 $ gotopt = "t" !"rue"
175 $ gotshortopt = "t" !"rue"
177 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
184 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f"
188 $ IF (F$SEARCH(config_sh).NES."")
190 $ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
191 $ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
194 $ CONTINUE !at this point check UIC && if test allows...
197 $ echo "''me': cannot read config file ''config_sh'."
201 $ echo "''me': cannot read config file ''config_sh'."
206 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h"
213 $ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m"
220 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r"
227 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s"
234 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E"
239 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K"
246 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O"
253 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S"
255 $ extractsh = "true" !VMS? Yes with munchconfig
260 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D"
263 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
265 $ tmp = P'i' + "=""define"""
269 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
271 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
272 $ echo "''me': use ""-Usymbol=val"" not ""-Dsymbol=""."
273 $ echo "''me': ignoring -D",P'i'
275 $ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')
276 $ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """"
283 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U"
286 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
288 $ tmp = P'i' + "="""""
292 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
294 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
295 $ echo "''me': use ""-Dsymbol=val"" not ""-Usymbol=val""."
296 $ echo "''me': ignoring -U",P'i'
298 $ tmp = P'i' + "=""undef"""
305 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
307 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
308 $ echo "''me' generated by an unknown version of EDT."
314 $ echo "''me': unknown option ",P'i'
317 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
319 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
321 $ ENDIF ! (P1 .NES. "")
322 $ config_args = F$EDIT(config_args,"TRIM")
326 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
327 $ echo "Usage: @''me' [-dehmr""EKOSV""] [-fconfig.sh] [""-Dsymbol""] [""-Dsymbol=value""]"
328 $ echo " [-Usymbol] [-Usymbol=]"
331 "-d" : use defaults for all answers.
332 "-e" : go on without questioning past the production of config.sh. *
333 "-f" : specify an alternate default configuration file.
334 "-h" : print this help message and exit (with an error status).
335 "-m" : skip the MANIFEST check to see that all files are present
336 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
337 "-s" : silent mode, only echoes questions and essential information.
338 -"D" : define symbol to have some value: *
339 -"Dsymbol" symbol gets the value 'define'
340 -"Dsymbol=value" symbol gets the value 'value'
341 -E : stop at the end of questions, after having produced config.sh. *
342 -K : do not use unless you know what you are doing.
343 -O : let -D and -U override definitions from loaded configuration file. *
344 -S : perform variable substitutions on all .SH files (can mix with -f) *
345 -"U" : undefine symbol: *
346 -"Usymbol" symbol gets the value 'undef'
347 -"Usymbol=" symbol gets completely empty
348 -V : print version number and exit (with a zero status).
350 $ echo "%Config-I-VMS, lower case switches must be enclosed"
351 $ echo "-Config-I-VMS, in double quotation marks, e.g.:"
352 $ echo "-Config-I-VMS, @Configure ""-des"""
353 $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
354 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
356 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
362 $ IF F$Mode() .eqs. "BATCH"
364 $ STDOUT = F$PARSE(F$GETQUI("DISPLAY_ENTRY", "JOB_NAME"), -
365 F$GETQUI("DISPLAY_ENTRY", "LOG_SPECIFICATION"), ".LOG")
366 $ WRITE SYS$OUTPUT "Warning: Executing in batch mode. To avoid file locking conflicts,"
367 $ WRITE SYS$OUTPUT "output intended for SYS$OUTPUT will be sent to a new version"
368 $ WRITE SYS$OUTPUT STDOUT
370 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
372 $ DEFINE SYS$OUTPUT "_NLA0:"
373 $ echo4 = "write STDOUT "
374 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
375 $ open/write/share=read STDOUT 'STDOUT'
383 $ echo4 = "write SYS$OUTPUT "
387 $!: run the defines and the undefines, if any, but leave the file out there...
388 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
393 $ packageup = F$EDIT((package - "5"),"UPCASE")
395 $!: Eunice requires " " instead of "", can you believe it
398 $ echo "Beginning of configuration questions for ''package'."
401 $!: Some greps do not return status, grrr.
402 $ contains = "SEARCH"
404 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
405 $! echo "Checking ''echo' to see how to suppress newlines..."
406 $! echo "giving up..."
407 $! echo "The star should be here-->*"
409 $!: Now test for existence of everything in MANIFEST
411 $ echo4 "First let's make sure your kit is complete. Checking..."
414 $! Here I assume we are in the [foo.PERLxxx...] tree
415 $! because the search routine simply does set def [-] if necessary.
416 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
418 $ manifestfound = F$SEARCH(file_2_find)
419 $ IF (manifestfound .EQS. "")
421 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
424 $ GOTO Research_manifest
427 $ echo "There is no MANIFEST file. I hope your kit is complete !"
429 $ GOTO Beyond_manifest
432 $! MANIFEST. has been found and we have set def'ed there.
433 $! Time to bail out before it's too late, i.e. too deep.
434 $! Depth check is unnecessary on Alpha VMS V7.2++ (even for ODS-2).
435 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
436 $ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
437 $! Depth check also unnecessary on ODS 5 (or later) file systems.
438 $ tmp = F$INTEGER(F$GETDVI(F$ENVIRONMENT("DEFAULT"),"ACPTYPE") - "F11V")
439 $ IF (tmp .GE. 5) THEN GOTO Beyond_depth_check
440 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("DEFAULT")).nes.".")
444 %Config-E-VMS, ERROR:
445 Sorry! It apears as though your perl build sub-directory is already too
446 deep into the VMS file system. Please try moving stuff into a shallower
447 directory (or altering the "max_allowed_dir_depth" parameter).
449 $ echo4 "ABORTING..."
450 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
452 $ EXIT !2 !$STATUS = "%X00000002" (error)
456 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
458 $ IF (manifestfound .NES. "")
460 $ IF ( F$SEARCH("UU.DIR").EQS."" )
462 $ CREATE/DIRECTORY [.UU]
464 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM [.UU]*.*;*
466 $!: Configure runs within the UU subdirectory
469 $! a little redundancy never hurt anybody?
470 $ file_2_find = "[-]" + file_2_find
471 $ manifestfound = F$SEARCH(file_2_find)
473 $ OPEN/WRITE MISSING MISSING.
474 $!change to "FALSE" if you wish to skip the manifest search
475 $!(which after all is rather slow in DCL :-)
478 $ echo "Skipping MANIFEST check as requested"
481 $ OPEN/READ CONFIG 'manifestfound'
483 $ READ/END_OF_FILE = Done_manifest CONFIG line
484 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
485 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
486 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
487 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
488 $ line = F$EDIT(line,"TRIM, COMPRESS")
489 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
490 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
492 $Re_strip_line_manifest:
493 $ loca = F$LOCATE("/",file_2_find)
494 $ ante = F$EXTRACT(0,loca,file_2_find)
495 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
496 $ test_this = ante + "." + (post - "/")
497 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
499 $ file_2_find = ante + "." + (post - "/")
500 $ GOTO Re_strip_line_manifest
502 $ file_2_find = ante + "]" + (post - "/")
504 $ file_2_find = "[-."+file_2_find
506 $ file_2_find = "[-]" + file_2_find
509 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
510 $ file_2_find = file_2_find - dirname
512 $! may not need double dot check on ODS-5 volumes
513 $ found = F$SEARCH(dirname + file_2_find)
514 $ IF found .NES. "" THEN GOTO Read_loop_manifest
518 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
519 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
521 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
522 $ ELSE basename = basename + dot_ele + "_"
527 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
528 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
529 basename = f$extract(0,f$length(basename)-1,basename)
530 $ file_2_find = dirname + basename
532 $ found = F$SEARCH(file_2_find)
533 $ IF (found .EQS. "" .AND. dots .GT. 2)
535 $! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
536 $! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
537 $! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
538 $ basename[f$locate(".",basename),1] := _
539 $ dot_ele = F$ELEMENT(dots - 1,"_",basename)
541 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
543 $ found = F$SEARCH(dirname + basename)
544 $ file_2_find = file_2_find + "," + basename
546 $ IF (found .EQS. "")
548 $ WRITE MISSING file_2_find
549 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
551 $ miss_list = miss_list + "," + file_2_find
554 $ GOTO Read_loop_manifest
559 $ ENDIF ! (manifestfound .NES. "")
561 $ IF (miss_list .NES. "")
563 $ echo "Some of the files not found include:"
566 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
572 THIS PACKAGE SEEMS TO BE INCOMPLETE.
574 You have the option of continuing the configuration process, despite the
575 distinct possibility that your kit is damaged, by typing 'y'es. If you
576 do, don't blame me if something goes wrong. I advise you to type 'n'o
577 and contact the author (dan@sidhe.org)
580 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
583 $ echo4 "Continuing..."
585 $ echo4 "ABORTING..."
589 $ echo4 "Looks good..."
590 $ DELETE/NOLOG/NOCONFIRM MISSING.;
591 $ ENDIF ! (miss_list .NES. "")
592 $ ENDIF ! (manifestfound .EQS. "") ELSE
594 $! after finding MANIFEST (see above)
595 $!: Configure runs within the UU subdirectory
597 $!: compute the number of columns on the terminal for proper question formatting
598 $ IF F$MODE() .EQS. "BATCH"
599 $! else it winds up being 512 in batch
601 $ ELSE COLUMNS = F$GETDVI("SYS$OUTPUT","DEVBUFSIZ")
603 $! "-des" sets SYS$OUTPUT to NL: with a DEVBUFSIZ too large (512 again)
604 $ IF COLUMNS .GT. 210 THEN COLUMNS = 80
605 $! not sure if this would actually be needed - it hopefully will not hurt
606 $ IF COLUMNS .LT. 40 THEN COLUMNS = 40
608 $!: set up the echo used in my read !sfn
609 $!: now set up to do reads with possible shell escape and default assignment !sfn
612 $! The sub_rp splitting is intended to handle long symbols such as the dflt for
617 $ len_rp = F$LENGTH(rp)
618 $ If (.NOT. silent) Then echo ""
623 $ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
624 $ i_rp = i_rp + COLUMNS
625 $ if i_rp .LT. len_rp THEN echo4 "''sub_rp'"
626 $ IF i_rp .LT. len_rp THEN GOTO rp_loop
634 $ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
636 $ IF (ans .EQS. "&-d")
638 $ echo4 "(OK, I will run with -d after this question.)"
640 $ deferred_fastread =1
643 $ IF (ans .EQS. "&-s")
645 $ echo4 "(OK, I will run with -s after this question.)"
647 $ deferred_silent = 1
650 $ if (bool_dflt .nes. "")
652 $ if (ans .eqs. "") then ans = bool_dflt
653 $ ans = f$extract(0,1,f$edit(ans,"collapse,upcase"))
654 $ if (ans .eqs. "Y" .or. ans .eqs. "1" .or. ans .eqs. "T")
658 $ if (ans .eqs. "N" .or. ans .eqs. "0" .or. ans .eqs. "F")
662 $ echo4 "Input not understood please answer 'Yes' or 'No'"
668 $ ans = f$edit(ans,"trim,compress")
669 $ if (ans .eqs. "") then ans = dflt
670 $ if (f$edit(ans,"upcase") .eqs. "NONE") then ans = ""
672 $ if f$type(deferred_silent) .nes. ""
676 $ delete/symbol deferred_silent
678 $ if f$type(deferred_fastread) .nes. ""
681 $ delete/symbol deferred_fastread
687 $!: create .config dir to save info across Configure sessions
688 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
690 $ CREATE/DIRECTORY [-.CONFIG]
691 $ OPEN/WRITE CONFIG [-.CONFIG]README.
693 "This directory created by Configure to save information that should"
695 "persist across sessions."
698 "You may safely delete it if you wish."
702 $ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n
703 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
704 $ IF (patchlevel_h.NES."")
706 $ SEARCH 'patchlevel_h' "define","PERL_VERSION","epoch"/match=and/out=[]ver.out
707 $ IF .NOT. usedevel .AND. usedevel .NES. "define"
709 $ OPEN/READ CONFIG []ver.out
712 $ tmp = F$EDIT(line,"TRIM,COMPRESS")
713 $ xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp))
714 $ line = xpatchlevel / 2
715 $ tmp = xpatchlevel - ( line * 2 )
718 $ echo4 "patchlevel is " + F$STRING(xpatchlevel)
721 *** WHOA THERE!!! ***
723 This is an UNSTABLE DEVELOPMENT release.
724 (The patchlevel, is odd--as opposed to even,
725 and that signifies a development release. If you want a
726 maintenance release, you want an even-numbered release.)
728 Do ***NOT*** install this into production use.
729 Data corruption and crashes are possible.
731 It is most seriously suggested that you do not continue any further
732 unless you want to help in developing and debugging Perl.
736 $ rp="Do you really want to continue? [''bool_dflt'] "
737 $ fastread_save = fastread
740 $ fastread = fastread_save
741 $ delete/symbol fastread_save
744 $ echo4 "Okay, continuing."
747 $ DELETE/NOLOG/NOCONFIRM []ver.out;
754 $ DELETE/NOLOG/NOCONFIRM []ver.out;
756 $!: general instructions
759 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
760 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
762 $ messages = F$ENVIRONMENT("MESSAGE")
763 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
764 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
765 $ IF .NOT.($status.EQ.%X08D78053)
769 $ rp = "Would you like to see the instructions? [''bool_dflt'] "
771 $ if .NOT.ans THEN needman=""
773 $ SET MESSAGE 'messages'
775 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
782 This installation shell script will examine your system and ask you questions
783 to determine how the perl5 package should be installed. If you get
784 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
785 process, edit something, then restart this process as you just did.
786 Many of the questions will have default answers in square
787 brackets; typing carriage return will give you the default.
790 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
794 In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
795 the questions and use the computed defaults (or the previous answers provided
796 there was already a config.sh file). Type '@Configure "-h"' for a list of
800 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
804 Much effort has been expended to ensure that this shell script will
805 run on any VMS system. If despite that it blows up on yours, your
806 best bet is to edit Configure.com and @ it again. Whatever problems
807 you have with Configure.com, let me (dan@sidhe.org) know how I blew
811 $!This installation script affects things in two ways:
813 $!1) it may do direct variable substitutions on some of the files included
815 $!2) it builds a config.h file for inclusion in C programs. You may edit
816 $! any of these files as the need arises after running this script.
818 $!If you make a mistake on a question, there is no easy way to back up to it
821 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
822 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
824 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
828 $ ENDIF !(needman .EQS. "true")
830 $!: see if sh knows # comments !sfn
832 $!: figure out how to guarantee sh startup !sfn
833 $!: find out where common programs are !sfn
834 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
835 $!trylist="byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
836 $! echo "I don't know where '$file' is, and my life depends on it."
837 $! echo "Go find a public domain implementation or fix your PATH setting!"
839 $! echo "Don't worry if any of the following aren't found..."
840 $!: determine whether symbolic links are supported !sfn
841 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
842 $!: set up the translation script tr, must be called with ./tr of course !sfn
844 $!: Try to determine whether config.sh was made on this system
845 $!: Get old answers from old config file if Configure was run on the
846 $!: same system, otherwise use the hints.
847 $ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/"
851 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
853 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
855 $ configshfound = F$SEARCH(config_sh)
856 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
858 $ IF (i.LT.max) THEN GOTO Config_sh_look
859 $! genconfig.pl has "osname='VMS'"
860 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
861 $ IF (configshfound.EQS."")
863 $ config_sh = "[-]config.sh" ! the fallback default
864 $ GOTO Beyond_config_sh
867 $ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
869 $ IF F$TYPE(config_dflt) .NES. "" THEN bool_dflt = config_dflt
870 $ rp = "Shall I use ''config_sh' for default answers? [''bool_dflt'] "
875 $ echo "Fetching default answers from ''config_sh'..."
877 $! we do our own parsing of the shell-script stuff
878 $! ...and only accept symbols if they're in the | delimited list below
880 $ config_symbols0 ="|archlib|archlibexp|bin|binexp|builddir|cf_email|config_sh|installarchlib|installbin|installman1dir|installman3dir|"
881 $ config_symbols1 ="|installprivlib|installscript|installsitearch|installsitelib|most|oldarchlib|oldarchlibexp|osname|pager|perl_symbol|perl_verb|"
882 $ config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitebin|sitelib|sitelib_stem|sitelibexp|try_cxx|use64bitall|use64bitint|"
883 $ config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|usemultiplicity|usemymalloc|usedebugging_perl|useperlio|usesecurelog|"
884 $ config_symbols4 ="|usethreads|usevmsdebug|usefaststdio|usemallocwrap|unlink_all_versions|"
886 $ open/read CONFIG 'config_sh'
888 $ read/end=erd_conf_loop CONFIG line
889 $ line = f$edit(line,"trim")
890 $ if line .eqs. "" .or. f$extract(0,1,line) .eqs. "#" then goto rd_conf_loop
891 $ sym = f$element(0,"=",line)
892 $ if sym .eqs. "=" then goto rd_conf_loop
896 $ syms = config_symbols'k'
897 $ j = f$locate(dsym, syms)
898 $ if j .lt. f$length(syms) then goto erd_ck_loop
900 $ if k .lt. 5 then goto rd_ck_loop
903 $ val = f$element(1,"=",line)
904 $ val = f$extract(1,f$length(val)-2,val)
905 $ write sys$output "''sym' = ""''val'"""
910 $ delete/symbol config_symbols0
911 $ delete/symbol config_symbols1
912 $ delete/symbol config_symbols2
913 $ delete/symbol config_symbols3
914 $ delete/symbol config_symbols4
918 $ if f$type(usedebugging_perl) .nes. ""
920 $ useperldebug = usedebugging_perl
921 $ delete/symbol usedebugging_perl
925 $ if f$type(config_dflt) .nes. "" then DELETE/SYMBOL config_dflt
927 $!we actually do not have "hints/" for VMS
931 $!First time through, eh? I have some defaults handy for the following systems:
934 $! echo " ","VMS_VAX"
935 $! echo " ","VMS_AXP"
936 $! echo " ","VMS_IA64"
937 $! : Now look for a hint file osname_osvers, unless one has been
938 $! : specified already.
941 $!You may give one or more space-separated answers, or "none" if appropriate.
942 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
944 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
948 $!: Restore computed paths !sfn
950 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
952 $ IF (osname .NES. "VMS")
954 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
958 %Config-E-VMS, ERROR:
960 Err, you do not appear to be running VMS!
961 This procedure is intended to Configure the building of Perl for VMS.
968 $ echo4 "Continuing..."
970 $ echo4 "ABORTING..."
971 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
973 $ EXIT 2 !$STATUS = "%X00000002" (error)
975 $ ENDIF !(osname .NES./.EQS. "VMS")
977 $!: who configured the system
978 $ cf_by = F$EDIT(user,"LOWERCASE")
979 $ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
981 $! Peter Prymmer has seen:
982 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
983 $! "SYS$TIME_ZONE" = "EDT"
985 $! Charles Lane recommended:
986 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
987 $! "NEWS_TIMEZONE" = "-0500"
988 $! "ST_TIMEZONE" = "EDT"
989 $! "JAN_TIME_ZONE" = "EST "
990 $! "MULTINET_TIMEZONE" = "EST"
991 $! "DAYLIGHT_SAVINGS" = "1"
993 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
995 $! "Multinet_Timezone"
996 $! "TCPware_Timezone"
999 $! This snippet o' DCL returns a string in default Unix `date` format,
1000 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
1002 $ MIN_TZO = -840 !units are minutes here
1005 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
1006 $ monn = F$CVTIME(,,"MONTH")
1007 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
1008 $ hour = F$CVTIME(,,"HOUR")
1009 $ min = F$CVTIME(,,"MINUTE")
1010 $ sec = F$CVTIME(,,"SECOND")
1011 $ year = F$CVTIME(,,"YEAR")
1013 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
1017 $ mon = F$ELEMENT(i,"/",months)
1018 $ IF i.LT.monn THEN GOTO Mon_loop
1021 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
1024 $ tzhour = F$INTEGER(systz)/3600
1025 $ tzmins = F$INTEGER(systz)/60
1026 $ tzminrem = tzmins - tzhour*60
1027 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
1029 $ THEN signothetime = "+"
1030 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
1031 $ THEN direction = "on GMT/"
1032 $ ELSE direction = "east of "
1034 $ ELSE signothetime = "-"
1035 $ tzhour = -1*tzhour !keeps !UL happy
1036 $ direction = "west of "
1039 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
1042 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
1044 $ tzspan = "''tzhour' hours"
1047 $ echo "Your system is ''tzspan' ''direction'UTC in England."
1048 $ rp = "(''systz') Is this UTC Time Zone Offset correct? [''bool_dflt'] "
1054 $ GOTO Beyond_TimeZone
1058 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
1063 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
1064 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
1065 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
1067 $ rp = "Enter the Time Zone offset: [''dflt'] "
1069 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
1070 $ IF ans.EQS."" THEN ans = dflt
1071 $ tzhour = F$ELEMENT(0,":","''ans'") !first
1072 $ IF tzhour.EQS."" THEN tzhour = 0
1073 $ tzhour = F$INTEGER(tzhour)
1074 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
1075 $ IF tzminrem.NES.""
1077 $ tzminrem = F$INTEGER(tzminrem)
1078 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
1082 $ tzmins = tzhour*60 + tzminrem
1083 $ tzd = F$STRING(tzmins*60)
1086 $ signothetime = "+"
1088 $ tzhour = -1*tzhour !keeps !UL happy
1089 $ signothetime = "-"
1091 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
1094 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
1099 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
1100 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
1102 $!: determine the architecture name
1103 $! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
1104 $! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME")
1105 $! but does have F$GETSYI("HW_MODEL").
1106 $! Please try to use either archname .EQS. "VMS_VAX" or archname .EQS.
1107 $! "VMS_AXP" from here on to allow cross-platform configuration (e.g.
1108 $! configure a VAX build on an Alpha).
1110 $ IF (F$GETSYI("HW_MODEL") .LT. 1024 .AND. F$GETSYI("HW_MODEL") .GT. 0)
1112 $ archname = "VMS_VAX"
1113 $ otherarch = "an Alpha or IA64"
1115 $ arch_type = "ARCH-TYPE=__VAX__"
1117 $ IF (F$GETSYI("ARCH_TYPE") .EQ. 2)
1119 $ archname = "VMS_AXP"
1120 $ otherarch = "a VAX or IA64"
1121 $ arch_type = "ARCH-TYPE=__AXP__"
1123 $ archname = "VMS_IA64"
1124 $ otherarch = "a VAX or Alpha"
1125 $ arch_type = "ARCH-TYPE=__IA64__"
1130 $ rp = "What is your architecture name? [''archname'] "
1134 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
1135 $ IF (ans.NES.archname) !.AND.knowitall
1137 $ echo4 "I'll go with ''archname' anyway..."
1141 $ vms_prefix = "perl_root"
1142 $ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
1143 $ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''bool_dflt'] "
1150 $ IF (archname.EQS."VMS_AXP")
1152 $ macros = macros + """AXE=1"","
1154 $ IF (archname.EQS."VMS_IA64")
1156 $ macros = macros + """IXE=1"","
1160 $!: is AFS running? !sfn
1161 $!: decide how portable to be. Allow command line overrides. !sfn
1162 $!: set up shell script to do ~ expansion !sfn
1163 $!: expand filename !sfn
1164 $!: now set up to get a file name !sfn
1166 $ IF F$TYPE(prefix) .EQS. ""
1168 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
1169 $ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - "000000." - ".000000" - ".;"
1170 $ prefixbase = prefix - "]"
1171 $! Add _ROOT to make install PERL_ROOT differ from build directory.
1172 $ prefix = prefixbase + "_ROOT.]"
1175 $!: determine root of directory hierarchy where package will be installed.
1180 $ echo "By default, ''package' will be installed in ''dflt', pod"
1181 $ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
1182 $ echo "all installation directories."
1183 $ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
1184 $ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
1186 $ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
1191 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
1195 $ perl_root = prefix
1197 $! Check here for pre-existing PERL_ROOT.
1198 $! -> ask if removal desired.
1199 $! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
1200 $! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
1202 $ tmp = perl_root - ".]" + "]"
1203 $ dflt = f$parse(tmp,,,,)
1206 $ echo4 "''tmp' does not yet exist."
1207 $! create/directory 'tmp'
1209 $ echo4 "''tmp' already exists."
1212 $ vms_skip_install = "true"
1215 $ rp = "Skip the remaining """"where install"""" questions? [''bool_dflt'] "
1217 $ IF (.NOT.ans) THEN vms_skip_install = "false"
1218 $ IF (.NOT.vms_skip_install)
1221 $!: set the prefixit variable, to compute a suitable default value
1223 $!: determine where private library files go
1224 $!: Usual default is /usr/local/lib/perl5. Also allow things like
1225 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
1231 There are some auxiliary files for perl5 that need to be put into a
1232 private library directory that is accessible by everyone.
1235 $ IF F$TYPE(privlib) .NES. ""
1236 $ THEN dflt = privlib
1237 $ ELSE dflt = "''vms_prefix':[lib]"
1239 $ rp = "Pathname where the private library files will reside? "
1240 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1244 $ ENDIF !%Config-I-VMS, skip remaining "where install" questions
1246 $ IF F$TYPE(perl_symbol) .EQS. "" THEN perl_symbol := true
1247 $ IF F$TYPE(perl_verb) .EQS. "" THEN perl_verb = ""
1249 $ THEN bool_dflt = "y"
1250 $ ELSE bool_dflt = "n"
1255 $ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
1256 $ echo "symbol to invoke ''package', which is the usual method."
1257 $ echO "If you do not do so then you would need a DCL command verb at the"
1258 $ echo "process or the system wide level."
1260 $ rp = "Invoke perl as a global symbol foreign command? [''bool_dflt'] "
1262 $ IF (.NOT.ans) THEN perl_symbol = "false"
1264 $ IF (.NOT.perl_symbol)
1266 $ IF perl_verb .EQS. "DCLTABLES"
1267 $ THEN bool_dflt = "n"
1268 $ ELSE bool_dflt = "y"
1273 $ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
1274 $ echo "verb in a per-process table or in the system wide DCLTABLES (which"
1275 $ echo "would require write privilege)."
1277 $ rp = "Invoke perl as a per process command verb? [ ''bool_dflt' ] "
1280 $ THEN perl_verb = "DCLTABLES"
1281 $ ELSE perl_verb = "PROCESS"
1283 $ ENDIF ! (.NOT.perl_symbol)
1285 $!: set the base revision
1287 $ revision = baserev - ".0"
1288 $!: get the patchlevel
1290 $ echo4 "Getting the current patchlevel..."
1295 $ api_subversion="0"
1296 $ perl_patchlevel="0"
1297 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1298 $ IF (patchlevel_h.NES."")
1300 $ got_patch = "false"
1302 $ got_api_revision = "false"
1303 $ got_api_version = "false"
1304 $ got_api_subversion = "false"
1305 $ got_perl_patchlevel= "false"
1306 $ OPEN/READONLY CONFIG 'patchlevel_h'
1308 $ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
1309 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
1311 $ line = F$EDIT(line,"COMPRESS, TRIM")
1312 $ patchlevel = F$ELEMENT(2," ",line)
1313 $ got_patch = "true"
1315 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
1317 $ line = F$EDIT(line,"COMPRESS, TRIM")
1318 $ subversion = F$ELEMENT(2," ",line)
1321 $ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1323 $ line = F$EDIT(line,"COMPRESS, TRIM")
1324 $ api_revision = F$ELEMENT(2," ",line)
1325 $ got_api_revision = "true"
1327 $ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1329 $ line = F$EDIT(line,"COMPRESS, TRIM")
1330 $ api_version = F$ELEMENT(2," ",line)
1331 $ got_api_version = "true"
1333 $ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1335 $ line = F$EDIT(line,"COMPRESS, TRIM")
1336 $ api_subversion = F$ELEMENT(2," ",line)
1337 $ got_api_subversion = "true"
1339 $ IF ((F$LOCATE("""DEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1341 $ line = F$EDIT(line,"COMPRESS, TRIM")
1342 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1343 $ perl_patchlevel = perl_patchlevel - "DEVEL"
1344 $ got_perl_patchlevel = "true"
1346 $ IF (.NOT. got_patch) .OR. -
1347 (.NOT. got_sub) .OR. -
1348 (.NOT. got_api_revision) .OR. -
1349 (.NOT. got_api_version) .OR. -
1350 (.NOT. got_api_subversion) .OR. -
1351 (.NOT. got_perl_patchlevel) -
1352 THEN GOTO Patchlevel_h_loop
1357 $ IF F$SEARCH("[-].patch") .NES. ""
1360 $ OPEN/READ PATCH [-].patch
1363 $ tmp = F$EDIT(line,"COLLAPSE")
1365 $ IF tmp .GT. perl_patchlevel then perl_patchlevel = tmp
1368 $ version_patchlevel_string = "version ''patchlevel' subversion ''subversion'"
1369 $ IF got_perl_patchlevel .AND. perl_patchlevel .NES. "0"
1371 $ version_patchlevel_string = "''version_patchlevel_string' patch ''perl_patchlevel'"
1373 $ echo "(You have ''package' ''version_patchlevel_string'.)"
1375 $ version = revision + "_" + patchlevel + "_" + subversion
1377 $ IF (.NOT.vms_skip_install)
1379 $!: set the prefixup variable, to restore leading tilde escape !sfn
1381 $!: determine where public architecture dependent libraries go
1385 $ echo "''package' contains architecture-dependent library files. If you are"
1391 sharing libraries in a heterogeneous environment, you might store
1392 these files in a separate location. Otherwise, you can just include
1393 them with the rest of the public library files.
1396 $ IF F$TYPE(archlib) .NES. ""
1397 $ THEN dflt = archlib
1398 $ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
1400 $ rp = "Where do you want to put the public architecture-dependent libraries? "
1401 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1405 $ ENDIF !%Config-I-VMS, skip "where install" questions
1407 $! This quotation from Configure has to be included on VMS:
1412 There is, however, a strange, musty smell in the air that reminds me of
1413 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1415 $ IF (.NOT.vms_skip_install)
1417 $!: it so happens the Eunice I know will not run shell scripts in Unix format
1419 $!: see if setuid scripts can be secure !sfn
1420 $!: now see if they want to do setuid emulation !sfn
1422 $!: determine where site specific libraries go.
1428 The installation process will also create a directory for
1429 site-specific extensions and modules. Some users find it convenient
1430 to place all local files in this directory rather than in the main
1431 distribution directory.
1434 $ IF F$TYPE(sitelib) .NES. ""
1435 $ THEN dflt = sitelib
1436 $ ELSE dflt = privlib - "]" + ".SITE_PERL]"
1438 $ rp = "Pathname for the site-specific library files? "
1439 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1443 $!: determine where site specific architecture-dependent libraries go.
1445 $ THEN TYPE SYS$INPUT:
1448 The installation process will also create a directory for
1449 architecture-dependent site-specific extensions and modules.
1452 $ IF F$TYPE(sitearch) .NES. ""
1453 $ THEN dflt = sitearch
1454 $ ELSE dflt = sitelib - "]" + "." + archname + "]"
1456 $ rp = "Pathname for the site-specific architecture-dependent library files? "
1457 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1461 $!: determine where old public architecture dependent libraries might be
1463 $!: determine where public executables go
1464 $ IF F$TYPE(bin) .NES. ""
1466 $! ELSE dflt = prefix - ".]" + ".BIN]"
1467 $ ELSE dflt = "/''vms_prefix'/000000"
1469 $ rp = "Pathname where the public executables will reside? "
1470 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1474 $!: determine where add-on public executables go
1475 $ IF F$TYPE(sitebin) .NES. ""
1476 $ THEN dflt = sitebin
1477 $ ELSE dflt = "''vms_prefix':[bin.''archname']"
1479 $ rp = "Pathname where the add-on public executables should be installed? "
1480 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1484 $!: determine where manual pages are on this system
1485 $!: What suffix to use on installed man pages
1486 $!: see if we can have long filenames
1487 $!: determine where library module manual pages go
1488 $!: What suffix to use on installed man pages
1489 $!: see what memory models we can support
1491 $ ELSE ! skipping "where install" questions, we must set some symbols
1492 $ IF F$TYPE(archlib).EQS."" THEN -
1493 archlib="''vms_prefix':[lib.''archname'.''version']"
1494 $ IF F$TYPE(bin) .EQS. "" THEN -
1495 bin="/''vms_prefix'/000000"
1496 $ IF F$TYPE(privlib) .EQS. "" THEN -
1497 privlib ="''vms_prefix':[lib]"
1498 $ IF F$TYPE(sitearch) .EQS. "" THEN -
1499 sitearch="''vms_prefix':[lib.site_perl.''archname']"
1500 $ IF F$TYPE(sitelib) .EQS. "" THEN -
1501 sitelib ="''vms_prefix':[lib.site_perl]"
1502 $ IF F$TYPE(sitebin) .EQS. "" THEN -
1503 sitebin="''vms_prefix':[bin.''archname']"
1504 $ ENDIF !%Config-I-VMS, skip "where install" questions
1506 $! These derived locations can be set whether we've opted to
1507 $! skip the where install questions or not.
1509 $ IF F$TYPE(archlibexp) .EQS. "" THEN -
1510 archlibexp="''vms_prefix':[lib.''archname'.''version']"
1511 $ IF F$TYPE(binexp) .EQS. "" THEN -
1512 binexp ="''vms_prefix':[000000]"
1513 $ IF F$TYPE(builddir) .EQS. "" THEN -
1514 builddir ="''vms_prefix':[000000]"
1515 $ IF F$TYPE(installarchlib) .EQS. "" THEN -
1516 installarchlib="''vms_prefix':[lib.''archname'.''version']"
1517 $ IF F$TYPE(installbin) .EQS. "" THEN -
1518 installbin ="''vms_prefix':[000000]"
1519 $ IF F$TYPE(installscript) .EQS. "" THEN -
1520 installscript ="''vms_prefix':[utils]"
1521 $ IF F$TYPE(installman1dir) .EQS. "" THEN -
1522 installman1dir ="''vms_prefix':[man.man1]"
1523 $ IF F$TYPE(installman3dir) .EQS. "" THEN -
1524 installman3dir ="''vms_prefix':[man.man3]"
1525 $ IF F$TYPE(installprivlib) .EQS. "" THEN -
1526 installprivlib ="''vms_prefix':[lib]"
1527 $ IF F$TYPE(installsitearch) .EQS. "" THEN -
1528 installsitearch="''vms_prefix':[lib.site_perl.''archname']"
1529 $ IF F$TYPE(installsitelib) .EQS. "" THEN -
1530 installsitelib ="''vms_prefix':[lib.site_perl]"
1531 $ IF F$TYPE(oldarchlib) .EQS. "" THEN -
1532 oldarchlib="''vms_prefix':[lib.''archname']"
1533 $ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
1534 oldarchlibexp="''vms_prefix':[lib.''archname']"
1535 $ IF F$TYPE(privlibexp) .EQS. "" THEN -
1536 privlibexp ="''vms_prefix':[lib]"
1537 $ IF F$TYPE(scriptdir) .EQS. "" THEN -
1538 scriptdir ="''vms_prefix':[utils]"
1539 $ IF F$TYPE(sitearchexp) .EQS. "" THEN -
1540 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
1541 $ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
1542 sitelib_stem ="''vms_prefix':[lib.site_perl]"
1543 $ IF F$TYPE(sitelibexp) .EQS. "" THEN -
1544 sitelibexp ="''vms_prefix':[lib.site_perl]"
1546 $!: see if we need a special compiler
1547 $! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1551 $ vms_cc_available = ""
1553 $ OPEN/WRITE CONFIG ccvms.c
1554 $ WRITE CONFIG "#ifdef __DECC"
1555 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1556 $ WRITE CONFIG "#endif"
1557 $ WRITE CONFIG "#include <stdio.h>"
1558 $ WRITE CONFIG "int main() {"
1559 $ WRITE CONFIG "#ifdef __DECC"
1560 $ WRITE CONFIG " printf(""/DECC\n"");"
1561 $ WRITE CONFIG "#else"
1562 $ WRITE CONFIG " printf(""/VAXC\n"");"
1563 $ WRITE CONFIG "#endif"
1564 $ WRITE CONFIG " exit(0);"
1569 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
1570 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
1571 $ cc/NoObj/list=ccvms.lis ccvms.c
1574 $ IF (silent) THEN GOSUB Shut_up
1575 $ IF tmp.NE.%X10B90001
1577 $ IF tmp.NE.%X10000001
1579 $ nocc = "t" !%X10000001 is return from gcc
1580 $ GOTO Gcc_initial_check
1585 $ IF .NOT.silent THEN echo ""
1586 $ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1587 $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1591 $ echo "Will try cc/decc..."
1594 $ DEFINE/USER_MODE SYS$ERROR NL:
1595 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1596 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1599 $ IF (silent) THEN GOSUB Shut_up
1600 $ IF tmp.NE.%X10B90001
1602 $ echo "Apparently you don't have that one."
1605 $ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1606 $ vms_cc_available = vms_cc_available + "cc/decc "
1609 $ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line)) -
1610 .or.(F$LOCATE("hp",line).NE.F$LENGTH(line))
1612 $ vms_cc_dflt = "/decc"
1613 $ vms_cc_available = vms_cc_available + "cc/decc "
1618 $ echo "Checking for gcc"
1619 $ OPEN/WRITE CONFIG gccvers.lis
1621 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1622 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1623 $ 'gcc_symbol'/noobj/version _nla0:
1626 $ IF (silent) THEN GOSUB Shut_up
1628 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1630 $ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you do not have it."
1631 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1632 $ GOTO Cxx_initial_check
1634 $ OPEN/READ CONFIG gccvers.lis
1636 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1637 $ GOTO GCC_List_Read
1641 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1642 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1646 $! Do note that [vms]perl source files have a ways to go before they will
1647 $! compile under CXX.
1648 $! In order to test Configure.com with CXX invoke it with "-Dtry_cxx" on
1649 $! the command line.
1651 $ IF F$TYPE(try_cxx) .EQS. "" THEN try_cxx := n
1652 $ IF try_cxx .OR. try_cxx .EQS. "define"
1656 $ echo "Checking for CXX..."
1657 $ OPEN/WRITE CONFIG ccvms.c
1658 $ WRITE CONFIG "#include <iostream>"
1659 $ WRITE CONFIG "int main() {"
1660 $ WRITE CONFIG "#ifdef __DECCXX"
1661 $ WRITE CONFIG " cout << __DECCXX, endl;"
1662 $ WRITE CONFIG "#else"
1663 $ WRITE CONFIG " cout << 0,endl;"
1664 $ WRITE CONFIG "#endif"
1665 $! Todo: add G++ identifier check ??
1666 $ WRITE CONFIG " return(0);"
1670 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1671 $ DEFINE/USER_MODE SYS$ERROR NL:
1675 $! success $status with:
1676 $! DEC C++ V1.1-001 on VMS VAX V5.5-2
1677 $! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1678 $! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1679 $! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1680 $ IF tmp .eq. %X15F60001
1684 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1685 $ DEFINE/USER_MODE SYS$ERROR NL:
1689 $ ! success $status with:
1690 $ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1691 $ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1692 $ IF tmp .eq. %X10000001
1695 $ vms_cc_available = vms_cc_available + "cxx "
1696 $ echo "CXX and LINK are available."
1698 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1700 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1701 $ DEFINE/USER_MODE SYS$ERROR NL:
1705 $ ! success $status with:
1706 $ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1707 $ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1708 $ IF tmp .eq. %X10000001
1710 $ ld_try = "cxxlink"
1711 $ vms_cc_available = vms_cc_available + "cxx "
1712 $ echo "CXX and CXXLINK are available."
1715 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1719 $ DELETE/NOLOG/NOCONFIRM ccvms.c;
1720 $ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1721 $ CALL Cxx_demangler_cleanup
1723 $ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1726 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1728 $!: see if we need a special compiler
1730 $ echo "Available compiler(s):"
1731 $ echo "( ''vms_cc_available')"
1734 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1738 $ rp = "Use which C compiler? [''dflt'] "
1742 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1744 $ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans)) -
1745 .or.(F$LOCATE("hp",ans).NE.F$LENGTH(ans))
1750 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1752 $ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1757 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1761 $ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1762 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt)
1764 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1769 $ IF Mcc .EQS. "cc/decc"
1772 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1778 $ IF Mcc .EQS. "cc/decc"
1781 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1783 $ IF Mcc .EQS. "gcc"
1786 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1789 $Decc_Version_check:
1791 $ IF ccname .EQS. "DEC"
1794 $ echo4 "Checking for the Dec C version number..."
1795 $ OPEN/WRITE CONFIG deccvers.c
1796 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1797 $ WRITE CONFIG "#include <stdio.h>"
1798 $ WRITE CONFIG "int main() {"
1799 $ WRITE CONFIG "#ifdef __DECC"
1800 $ WRITE CONFIG "#ifdef __DECC_VER"
1801 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1802 $ WRITE CONFIG "#else"
1803 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1804 $ WRITE CONFIG "#endif"
1805 $ WRITE CONFIG "#endif"
1806 $ WRITE CONFIG " exit(0);"
1810 $ DEFINE/USER_MODE SYS$ERROR NL:
1811 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1814 $ IF (silent) THEN GOSUB Shut_up
1815 $ DEFINE/USER_MODE SYS$ERROR NL:
1816 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1819 $ IF (silent) THEN GOSUB Shut_up
1820 $ OPEN/WRITE CONFIG deccvers.out
1821 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1822 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1823 $ mcr []deccvers.exe
1827 $ IF (silent) THEN GOSUB Shut_up
1828 $ OPEN/READ CONFIG deccvers.out
1829 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1832 $ echo "You are using Dec C ''line'"
1834 $ Dec_C_Version = F$INTEGER(line)
1835 $ IF Dec_C_Version .GE. 60200000 .AND. archname .NES. "VMS_VAX"
1837 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1838 $ ccflags = ccflags + "/NOANSI_ALIAS"
1840 $ DELETE/NOLOG/NOCONFIRM deccvers.*;
1844 $ IF ccname .EQS. "GCC"
1846 $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1847 $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1848 $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1849 $ IF gcclib_olb .EQS. ""
1851 $! These objects/libs come w/ gcc 2.7.2 for AXP:
1852 $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1853 $ IF tmp .NES. "" then gcclib_olb = tmp
1854 $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1857 $ IF gcclib_olb .EQS. ""
1858 $ THEN gcclib_olb = tmp
1859 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1862 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1865 $ IF gcclib_olb .EQS. ""
1866 $ THEN gcclib_olb = tmp
1867 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1870 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1873 $ IF gcclib_olb .EQS. ""
1874 $ THEN gcclib_olb = tmp
1875 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1878 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1880 $ gcclib_olb = gcclib_olb + "/lib"
1882 $ IF gcclib_olb .NES. "" .AND. -
1883 (vaxcrtl_olb .NES. "" .OR. -
1884 vaxcrtl_exe .NES. "" )
1887 $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1888 $ OPEN/WRITE CONFIG gccvers.c
1889 $ WRITE CONFIG "#include <stdio.h>"
1890 $ WRITE CONFIG "int main() {"
1891 $ WRITE CONFIG "#ifdef __GNUC__"
1892 $ WRITE CONFIG "#ifdef __VERSION__"
1893 $ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1894 $ WRITE CONFIG "#else"
1895 $ WRITE CONFIG " printf(""%s\n"", ""1"");"
1896 $ WRITE CONFIG "#endif"
1897 $ WRITE CONFIG "#endif"
1898 $ WRITE CONFIG " exit(0);"
1901 $ DEFINE SYS$ERROR _NLA0:
1902 $ DEFINE SYS$OUTPUT _NLA0:
1905 $ DEASSIGN SYS$ERROR _NLA0:
1906 $ DEASSIGN SYS$OUTPUT _NLA0:
1907 $ IF (silent) THEN GOSUB Shut_up
1908 $ DEFINE SYS$ERROR _NLA0:
1909 $ DEFINE SYS$OUTPUT _NLA0:
1910 $ IF vaxcrtl_exe .EQS. ""
1912 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1914 $ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1917 $ link gccvers.obj,'gcclib_olb'
1921 $ OPEN/WRITE CONFIG GCCVERS.OPT
1922 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1924 $ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1927 $ DEASSIGN SYS$ERROR
1928 $ DEASSIGN SYS$OUTPUT
1929 $ IF (silent) THEN GOSUB Shut_up
1930 $ OPEN/WRITE CONFIG gccvers.out
1931 $ DEFINE SYS$ERROR CONFIG
1932 $ DEFINE SYS$OUTPUT CONFIG
1936 $ DEASSIGN SYS$OUTPUT
1937 $ DEASSIGN SYS$ERROR
1938 $ IF (silent) THEN GOSUB Shut_up
1939 $ OPEN/READ CONFIG gccvers.out
1940 $ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1943 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
1944 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1946 $ echo "You are not using GNU cc."
1949 $ echo "You are using GNU cc ''line'"
1952 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1958 $ IF ccname .EQS. "CXX"
1960 $ OPEN/WRITE CONFIG cxxvers.c
1961 $ WRITE CONFIG "#include <stdio.h>"
1962 $ WRITE CONFIG "int main() {"
1963 $ WRITE CONFIG "#ifdef __DECCXX_VER"
1964 $ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
1965 $ WRITE CONFIG "#else"
1966 $ WRITE CONFIG " printf(""%i\n"", ""0"");"
1967 $ WRITE CONFIG "#endif"
1968 $ WRITE CONFIG " return(0);"
1972 $ DEFINE/USER_MODE SYS$ERROR NL:
1973 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1977 $ IF (silent) THEN GOSUB Shut_up
1979 $ DEFINE/USER_MODE SYS$ERROR NL:
1980 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1984 $ IF (silent) THEN GOSUB Shut_up
1985 $ OPEN/WRITE CONFIG cxxvers.out
1987 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1988 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1993 $ IF (silent) THEN GOSUB Shut_up
1994 $ OPEN/READ CONFIG cxxvers.out
1995 $ READ/END_OF_FILE=Cxx_cleanup CONFIG line
1998 $ DELETE/NOLOG/NOCONFIRM cxxvers.*;
1999 $ echo "You are using CXX ''line'"
2002 $ CALL Cxx_demangler_cleanup
2005 $Cxx_demangler_cleanup: SUBROUTINE
2007 $! If we do build with CXX these demangler Dbs will be left all over.
2008 $! However, configure.com does try to remove the [.UU] sub directory.
2009 $! Be sure to set default to the correct place before calling this sub.
2012 $ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
2013 $ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
2015 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
2016 $ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
2020 $ ENDSUBROUTINE ! Cxx_demangler_cleanup
2025 $ OPEN/READ CONFIG ccvms.lis
2027 $ IF archname .EQS. "VMS_VAX"
2032 $ IF archname .EQS. "VMS_AXP"
2040 $ line = F$EDIT(line,"TRIM,COMPRESS")
2041 $ line = line - "Page 1" ! occurs at end all compilers
2042 $ line = line - "CCVMS " ! filename appears w/ VAXC
2043 $ line = line - "Source Listing " ! Seen w/ AXP DECC
2044 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
2046 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
2047 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
2051 $!: What should the include directory be ? (.TLB text libraries)
2053 $ rp = "Where are the include files you want to use? "
2054 $ IF f$length( rp + "[''dflt'] " ).gt.76
2055 $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
2056 $ ELSE rp = rp + "[''dflt'] "
2061 $!: see if we have to deal with yellow pages, now NIS.
2062 $!: now get the host name
2065 $ echo4 "Figuring out host name..." !>&4
2067 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
2068 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
2069 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
2070 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
2071 $ IF myhostname.eqs."".and. -
2072 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
2073 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
2074 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
2075 $ IF myhostname.eqs."".and. -
2076 F$TRNLNM("TCPIP$INET_HOST") .nes. "" .and. -
2077 F$TRNLNM("TCPIP$INET_DOMAIN") .nes. "" THEN -
2078 myhostname = F$TRNLNM("TCPIP$INET_HOST") + "." + F$TRNLNM("TCPIP$INET_DOMAIN")
2079 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
2080 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
2081 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
2082 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
2083 $!: you do not want to know about this
2085 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
2090 $ READ SYS$COMMAND/PROMPT= -
2091 "Please type the (one word) name of your host: " ans
2094 $!: translate upper to lower if necessary
2095 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
2096 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
2097 $ IF mylowhostname.NES.myhostname
2099 $ echo "(Normalizing case in your host name)"
2100 $ myhostname = mylowhostname
2103 $ fp = F$LOCATE(".",myhostname)
2104 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
2105 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
2107 $ rp = "What is your domain name? [''mydomain'] "
2111 $!: translate upper to lower if necessary
2112 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
2113 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
2114 $ IF mylowdomain.NES.mydomain
2116 $ echo "(Normalizing case in your domain name)"
2117 $ mydomain = mylowdomain
2120 $ myhostname = myhostname - mydomain
2121 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
2127 I need to get your e-mail address in Internet format if possible, i.e.
2128 something like user@host.domain. Please answer accurately since I have
2129 no easy means to double check it. The default value provided below
2130 is most probably close to the reality but may not be valid from outside
2131 your organization...
2134 $ IF F$TYPE(cf_email) .EQS. ""
2136 $ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
2137 $ rp = "What is your e-mail address? [''dflt'] "
2147 If you or somebody else will be maintaining perl at your site, please
2148 fill in the correct e-mail address here so that they may be contacted
2149 if necessary. Currently, the "perlbug" program included with perl
2150 will send mail to this address in addition to perlbug@perl.com. You may
2151 enter "none" for no administrator.
2154 $ dflt = "''cf_email'"
2155 $ rp = "Perl administrator e-mail address [''dflt'] "
2159 $!: determine where public executable scripts go
2160 $!: determine perl absolute location
2161 $!: figure out how to guarantee perl startup
2163 $!: see how we invoke the C preprocessor
2165 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
2166 $!: Set private lib path
2167 $!: Now check and see which directories actually exist, avoiding duplicates
2168 $!: determine optimize, if desired, or use for debug flag also
2169 $!: We will not override a previous value, but we might want to
2170 $!: augment a hint file
2171 $!: the following weeds options from ccflags that are of no interest to cpp
2172 $!: flags used in final linking phase
2173 $!: Try to guess additional flags to pick up local libraries.
2176 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
2177 $!: compute shared library extension
2178 $!: Looking for optional libraries
2179 $!: see if nm is to be used to determine whether a symbol is defined or not
2180 $!: get list of predefined functions in a handy place
2181 $!: see if we have sigaction or sigprocmask
2182 $!: see whether socketshr exists
2183 $ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
2185 $ Has_socketshr = "T"
2187 $ echo4 "Hmm... Looks like you have SOCKETSHR Berkeley networking support."
2189 $ Has_socketshr = "F"
2191 $ IF (ccname .EQS. "DEC" .AND. Dec_C_Version .GE. 50200000) .OR. (ccname .EQS. "CXX")
2193 $ Has_Dec_C_Sockets = "T"
2195 $ echo4 "Hmm... Looks like you have Dec C Berkeley networking support."
2197 $ Has_Dec_C_Sockets = "F"
2199 $ ! Hey, we've got both. Default to Dec C, then, since it's better
2200 $ IF Has_socketshr .OR. Has_Dec_C_Sockets
2203 $ echo "You have sockets available. Which socket stack do you want to"
2204 $ echo "build into Perl?"
2205 $ IF Has_Dec_C_Sockets
2209 $ dflt = "SOCKETSHR"
2211 $ rp = "Choose socket stack (NONE"
2212 $ IF Has_socketshr THEN rp = rp + ",SOCKETSHR"
2213 $ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
2214 $ rp = rp + ") [''dflt'] "
2216 $ Has_Dec_C_Sockets = "F"
2217 $ Has_socketshr = "F"
2218 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
2219 $ IF ans.eqs."decc" THEN Has_Dec_C_Sockets = "T"
2220 $ IF ans.eqs."socketshr" THEN Has_socketshr = "T"
2224 $! Ask if they want to build with VMS_DEBUG perl
2226 $ echo "Perl can be built to run under the VMS debugger."
2227 $ echo "You should only select this option if you are debugging"
2228 $ echo "perl itself. This can be a useful feature if you are "
2229 $ echo "embedding perl in a program."
2231 $ if f$type(usevmsdebug) .nes. ""
2233 $ if usevmsdebug .or. usevmsdebug .eqs. "define" then bool_dflt="y"
2235 $ rp = "Build a VMS-DEBUG version of Perl? [''bool_dflt'] "
2237 $ use_vmsdebug_perl = ans
2238 $ IF use_vmsdebug_perl
2240 $ usevmsdebug = "define"
2241 $ macros = macros + """__DEBUG__=1"","
2243 $ usevmsdebug = "undef"
2246 $! Ask if they want to build with DEBUGGING
2248 $ echo "Perl can be built with extra runtime debugging enabled. This"
2249 $ echo "enables the -D switch, at the cost of some performance. It"
2250 $ echo "was mandatory on perl 5.005 and before on VMS, but is now"
2251 $ echo "optional. If you do not generally use it you should probably"
2252 $ echo "leave this off and gain a bit of extra speed."
2254 $ if f$type(useperldebug) .nes. ""
2256 $ if f$extract(0,1,f$edit(useperldebug,"collapse,upcase")).eqs."N" .or. useperldebug .eqs. "undef" then bool_dflt="n"
2258 $ rp = "Build a DEBUGGING version of Perl? [''bool_dflt'] "
2260 $ use_debugging_perl = ans
2262 $! Ask if they want to build with MULTIPLICITY
2264 $ echo "Perl can be built so that multiple Perl interpreters can coexist"
2265 $ echo "within the same Perl executable."
2266 $ echo "There is some performance overhead, however, so you"
2267 $ echo "probably do not want to choose this unless you are going to be"
2268 $ echo "doing things with embedded perl."
2270 $ if f$type(usemultiplicity) .nes. ""
2272 $ if usemultiplicity .or. usemultiplicity .eqs. "define" then bool_dflt = "y"
2274 $ rp = "Build Perl for multiplicity? [''bool_dflt'] "
2278 $ usemultiplicity="define"
2280 $ usemultiplicity="undef"
2283 $! Ask if they want to build with 64-bit support
2284 $ IF (archname.NES."VMS_VAX").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2287 $ IF F$TYPE(use64bitint) .NES. ""
2289 $ IF use64bitint .OR. use64bitint .eqs. "define" THEN bool_dflt = "y"
2292 $ echo "You can have native 64-bit long integers."
2294 $ echo "Perl can be built to take advantage of 64-bit integer types"
2295 $ echo "on some systems, which provide a much larger range for perl's"
2296 $ echo "mathematical operations. (Note that does *not* enable 64-bit"
2297 $ echo "fileops at the moment, as Dec C doesn't do that yet)."
2298 $ echo "Choosing this option will most probably introduce binary incompatibilities."
2300 $ echo "If this does not make any sense to you, just accept the default ''dflt'."
2301 $ rp = "Try to use 64-bit integers, if available? [''bool_dflt'] "
2306 $ IF F$TYPE(use64bitall) .NES. ""
2308 $ IF use64bitall .OR. use64bitall .eqs. "define" THEN bool_dflt = "y"
2311 $ echo "You may also choose to try maximal 64-bitness. It means using as much"
2312 $ echo "64-bitness as possible on the platform. This in turn means even more"
2313 $ echo "binary incompatibilities. On the other hand, your platform may not"
2314 $ echo "have any more 64-bitness available than what you already have chosen."
2316 $ echo "If this does not make any sense to you, just accept the default ''dflt'."
2317 $ rp = "Try to use maximal 64-bit support, if available? [''bool_dflt'] "
2320 $ IF use64bitall .AND. .NOT. use64bitint
2323 $ echo "Since you have chosen a maximally 64-bit build, I'm also turning on"
2324 $ echo "the use of 64-bit integers."
2327 $ ENDIF ! AXP && >= 7.1
2329 $! Ask about threads, if appropriate
2330 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
2333 $ echo "Perl can be built to take advantage of threads on some systems."
2334 $ echo "To do so, configure.com can be run with -""Dusethreads""."
2336 $ echo "Note that Perl built with threading support runs slightly slower"
2337 $ echo "and uses more memory than plain Perl. The current implementation"
2338 $ echo "is believed to be stable, but it is fairly new, and so should be"
2339 $ echo "treated with caution."
2342 $ if f$type(usethreads) .nes. ""
2344 $ if usethreads .or. usethreads .eqs. "define" then bool_dflt="y"
2346 $! Catch cases where user specified ithreads or 5005threads but
2347 $! forgot -Dusethreads
2348 $ if f$type(useithreads) .nes. ""
2350 $ if useithreads .or. useithreads .eqs. "define" then bool_dflt="y"
2352 $ if f$type(use5005threads) .nes. ""
2354 $ if use5005threads .or. use5005threads .eqs. "define" then bool_dflt="y"
2356 $ echo "If this doesn't make any sense to you, just accept the default '" + bool_dflt + "'."
2357 $ rp = "Build a threading Perl? [''bool_dflt'] "
2362 $ ! Shall we do the 5.005-type threads, or IThreads?
2363 $ echo "Since release 5.6, Perl has had two different threading implementations,"
2364 $ echo "the newer interpreter-based version (ithreads) with one interpreter per"
2365 $ echo "thread, and the older 5.005 version (5005threads)."
2366 $ echo "The 5005threads version is effectively unmaintained and will probably be"
2367 $ echo "removed in Perl 5.10, so there should be no need to build a Perl using it"
2368 $ echo "unless needed for backwards compatibility with some existing 5.005threads"
2372 $ if f$type(useithreads) .nes. ""
2374 $ if useithreads .eqs. "undef" then bool_dflt="n"
2376 $ if f$type(use5005threads) .nes. ""
2378 $ if use5005threads .or. use5005threads .eqs. "define" then bool_dflt="n"
2380 $ rp = "Use the newer intepreter-based ithreads? [''bool_dflt'] "
2385 $ use_5005_threads="N"
2387 $ use_5005_threads="Y"
2389 $ ! Are they on VMS 7.1 on an alpha or itanium?
2390 $ if (archname.nes."VMS_VAX").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2393 $ echo "Threaded perl can be linked to use multiple kernel threads"
2394 $ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature"
2395 $ echo "allows multiple threads to execute simultaneously on an SMP"
2396 $ echo "system as well as preventing a single thread from blocking"
2397 $ echo "all the threads in a program, even on a single-processor"
2398 $ echo "machine. Unfortunately, this feature isn't safe on an"
2399 $ echo "unpatched 7.1 system (several OS patches were required when"
2400 $ echo "this procedure was written)."
2402 $ rp = "Enable multiple kernel threads and upcalls? [''bool_dflt'] "
2406 $ Thread_Live_Dangerously = "MT=MT=1"
2411 $ IF archname .NES. "VMS_VAX"
2415 $ echo "By default, perl (and pretty much everything else on VMS) uses"
2416 $ echo "case-insensitive linker symbols. Which is to say, when the"
2417 $ echo "underlying C code makes a call to a routine called Perl_foo in"
2418 $ echo "the source, the name in the object modules or shareable images"
2419 $ echo "is really PERL_FOO. There are some packages that use an"
2420 $ echo "embedded perl interpreter that instead require case-sensitive"
2421 $ echo "linker symbols."
2423 $ echo "If you have no idea what this means, and do not have"
2424 $ echo "any program requiring anything, choose the default."
2425 $ bool_dflt = be_case_sensitive
2426 $ if f$type(usecasesensitive) .nes. ""
2428 $ if usecasesensitive .or. usecasesensitive .eqs. "define" then bool_dflt = "y"
2429 $ if f$extract(0,1,f$edit(usecasesensitive,"collapse,upcase")).eqs."N" .or. usecasesensitive .eqs. "undef" then bool_dflt = "n"
2431 $ rp = "Build with case-sensitive symbols? [''bool_dflt'] "
2433 $ be_case_sensitive = ans
2436 $ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers"
2437 $ echo "internally on Alpha, but if you need G_FLOAT for binary compatibility"
2438 $ echo "with an external library or existing data, you may wish to disable"
2439 $ echo "the IEEE math option."
2440 $ bool_dflt = use_ieee_math
2441 $ if f$type(useieee) .nes. ""
2443 $ if useieee .or. useieee .eqs. "define"
2450 $ rp = "Use IEEE math? [''bool_dflt'] "
2452 $ use_ieee_math = ans
2454 $ be_case_sensitive = "n"
2455 $ use_ieee_math = "n"
2458 $ usecasesensitive = "undef"
2459 $ if (use_ieee_math) then useieee = "define"
2460 $ if (be_case_sensitive) then usecasesensitive = "define"
2461 $! Unlink all versions?
2463 $ echo "By default, Perl's unlink() provides VMS-like behavior and only"
2464 $ echo "deletes the latest version of a file. Enabling this option builds"
2465 $ echo "Perl so that unlink() deletes all versions of a file."
2466 $ bool_dflt = unlink_all_versions
2467 $ if f$type(unlink_all_versions) .nes. ""
2469 $ if unlink_all_versions .or. unlink_all_versions .eqs. "define"
2476 $ rp = "Make unlink() delete all versions of a file? [''bool_dflt'] "
2478 $ unlink_all_versions = ans
2479 $ IF unlink_all_versions
2481 $ d_unlink_all_versions = "define"
2483 $ d_unlink_all_versions = "undef"
2487 $ echo "Your compiler may want other flags. For this question you should include"
2488 $ echo "/INCLUDE=(whatever) and /DEFINE=(whatever), flags and any other flags"
2489 $ echo "or qualifiers used by the compiler."
2491 $ echo "To use no flags, specify the word ""none""."
2492 $ dflt = user_c_flags
2493 $ rp = "Any additional cc flags? [''dflt'] "
2495 $ IF ans .EQS. "none" THEN ans = ""
2496 $ user_c_flags = "''ans'"
2498 $! Ask whether they want to use secure logical translation when tainting
2500 $ echo "As Perl starts up, it checks several logical names, such as"
2501 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2502 $ echo "of its behavior. For additional security, you may limit this"
2503 $ echo "process to executive- and kernel-mode translation when tainting"
2504 $ echo "is enabled. In this case, logical names normally skipped when"
2505 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2506 $ echo "If you do not choose to do this, the usual order of access modes"
2507 $ echo "is used for logical name translation."
2509 $ echo "This restriction does not apply to the %ENV hash or to implicit"
2510 $ echo "logical name translation during parsing of file specifications;"
2511 $ echo "these always use the normal sequence of access modes for logical"
2512 $ echo "name translation."
2514 $ if f$type(usesecurelog) .nes. ""
2516 $ if f$extract(0,1,f$edit(usesecurelog,"collapse,upcase")).eqs."N" .or. usesecurelog .eqs. "undef" then bool_dflt = "n"
2518 $ rp = "Use secure logical name translation? [''bool_dflt'] "
2520 $ d_secintgenv = ans
2521 $ usesecurelog = "undef"
2522 $ if (d_secintgenv) then usesecurelog = "define"
2524 $! Ask whether they want to default filetypes
2526 $ echo "When you pass the name of a program to Perl on the command line,"
2527 $ echo "it generally doesn't supply any defaults unless the -S command"
2528 $ echo "line switch is specified. In keeping with the VMS tradition of"
2529 $ echo "default file types, however, you can configure Perl to try default"
2530 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2531 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2532 $ echo "finally foo.com)."
2534 $ echo "This is currently broken in some configurations. Only enable it if"
2535 $ echo "you know what you are doing."
2537 $ if f$type(usedefaulttypes) .nes. ""
2539 $ if usedefaulttypes .or. usedefaulttypes .eqs. "define" then bool_dflt="y"
2541 $ rp = "Always use default file types? [''bool_dflt'] "
2543 $ d_alwdeftype = ans
2544 $ usedefaulttypes = "undef"
2545 $ if (d_alwdeftype) then usedefaulttypes = "define"
2547 $! determine whether to use malloc wrapping
2550 $ IF F$TYPE(usemallocwrap) .nes. ""
2552 $ if .NOT. usemallocwrap .or. usemallocwrap .eqs. "undef" then bool_dflt = "n"
2554 $ rp = "Do you wish to wrap malloc calls to protect against potential overflows? [''bool_dflt'] "
2557 $ THEN usemallocwrap = "define"
2558 $ ELSE usemallocwrap = "undef"
2561 $! Ask if they want to use perl's memory allocator
2563 $ echo "Perl has a built-in memory allocator that is tuned for normal"
2564 $ echo "memory usage. It is oftentimes better than the standard system"
2565 $ echo "memory allocator. It also has the advantage of providing memory"
2566 $ echo "allocation statistics, if you choose to enable them."
2568 $ IF F$TYPE(usemymalloc) .nes. ""
2570 $ if usemymalloc .or. usemymalloc .eqs. "define" then bool_dflt = "y"
2572 $ rp = "Do you wish to attempt to use the malloc that comes with ''package'? [''bool_dflt'] "
2577 $ IF use_debugging_perl
2580 $ echo "Perl can keep statistics on memory usage if you choose to use"
2581 $ echo "them. This is useful for debugging, but does have some"
2582 $ echo "performance overhead."
2584 $ rp = "Do you want the debugging memory allocator? [''bool_dflt'] "
2586 $ use_debugmalloc = ans
2588 $ ! Check which memory allocator we want
2590 $ echo "There are currently three different memory allocators: the"
2591 $ echo "default (which is a pretty good general-purpose memory manager),"
2592 $ echo "the TWO_POT allocator (which is optimized to save memory for"
2593 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save"
2594 $ echo "memory for smaller allocations). They're all good, but if your"
2595 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use"
2596 $ echo "PACK_MALLOC."
2598 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2600 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2601 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2604 $ known_extensions = ""
2606 $ OPEN/READ CONFIG 'manifestfound'
2608 $ READ/END_OF_FILE=end_ext/ERROR=end_ext CONFIG line
2609 $ IF F$EXTRACT(0,4,line) .NES. "ext/" .AND. -
2610 F$EXTRACT(0,8,line) .NES. "vms/ext/" THEN goto ext_loop
2611 $ line = F$EDIT(line,"COMPRESS")
2612 $ line = F$ELEMENT(0," ",line)
2613 $ line_len = F$LENGTH(line)
2614 $ IF F$EXTRACT(line_len - 12,12,line) .NES. "/Makefile.PL" THEN goto ext_loop
2615 $ IF F$EXTRACT(0,4,line) .EQS. "ext/" THEN -
2616 xxx = F$EXTRACT(4,line_len - 16,line)
2617 $ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit
2618 $ IF xxx .EQS. "SDBM_File/sdbm" THEN goto ext_loop ! sub extension - omit
2619 $ IF xxx .EQS. "Devel/PPPort/harness" THEN goto ext_loop ! sub extension - omit
2620 $ IF F$EXTRACT(0,7,xxx) .EQS. "Encode/" THEN goto ext_loop ! sub extension - omit
2621 $ IF xxx .EQS. "B/C" THEN goto ext_loop ! sub extension - omit
2622 $ IF F$EXTRACT(0,8,line) .EQS. "vms/ext/" THEN -
2623 xxx = "VMS/" + F$EXTRACT(8,line_len - 20,line)
2624 $ known_extensions = known_extensions + " ''xxx'"
2629 $ known_extensions = F$EDIT(known_extensions,"TRIM,COMPRESS")
2630 $ dflt = known_extensions
2631 $ IF ccname .NES. "DEC" .AND. ccname .NES. "CXX"
2633 $ dflt = dflt - "POSIX" ! not with VAX C or GCC
2635 $ dflt = dflt - "ByteLoader" ! needs to be ported
2636 $ dflt = dflt - "DB_File" ! needs to be ported
2637 $ dflt = dflt - "GDBM_File" ! needs porting/special library
2638 $ dflt = dflt - "IPC/SysV" ! needs to be ported
2639 $ dflt = dflt - "NDBM_File" ! needs porting/special library
2640 $ dflt = dflt - "ODBM_File" ! needs porting/special library
2641 $ dflt = dflt - "Sys/Syslog" ! needs porting/special library "GDBM_File macro LOG_DEBUG"
2642 $ IF .NOT. Has_socketshr .AND. .NOT. Has_Dec_C_Sockets
2644 $ dflt = dflt - "Socket" ! optional on VMS
2646 $ IF .NOT. use_threads THEN dflt = dflt - "Thread"
2647 $ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
2649 $! Ask for their default list of extensions to build
2651 $ echo "It is time to specify which modules you want to build into"
2652 $ echo "perl. Most of these are standard and should be chosen, though"
2653 $ echo "you might, for example, want to build GDBM_File instead of"
2654 $ echo "SDBM_File if you have the GDBM library built on your machine."
2656 $ echo "Which modules do you want to build into perl?"
2659 $ extensions = F$EDIT(ans,"TRIM,COMPRESS")
2661 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2663 $ echo "Checking your ""make"" utilities..."
2664 $! If the 'build' that you use is not here add it and it's test
2665 $! switch to the _END_ of these strings (and increment max_build)
2666 $! (e.g. builders = builders + "/FOOMAKE"
2667 $! probers = probers + " -fooVersionSwitch"
2668 $! ) & please let me know about it.
2669 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2670 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2676 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2677 $ WRITE CONFIG "dont_make_anything_yet:"
2678 $ WRITE CONFIG F$FAO("!_")
2681 $ messages = F$ENVIRONMENT("MESSAGE")
2683 $ build = F$ELEMENT(n,"/",builders)
2684 $ probe = F$ELEMENT(n,"!",probers)
2685 $ echo "Testing whether you have ''build' on your system..."
2687 $! Noted with GNU Make version 3.60 that the $status and $severity
2688 $! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2689 $! $SEVERITY == "4".
2692 $ ON CONTROL_Y THEN GOTO Reenable_messages_build
2693 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
2695 $ IF ($SEVERITY .EQ. 1) ! not adequate?
2698 $ IF (build .EQS. orig_dflt)
2700 $ default_set = "TRUE"
2703 $ ok_builders = ok_builders + " " + build
2704 $ IF (.NOT. default_set) THEN dflt = build
2708 $Reenable_messages_build:
2709 $ SET MESSAGE 'messages'
2711 $ on control_y then goto clean_up
2713 $ IF (n .LT. max_build) THEN GOTO Build_probe
2716 $ IF (ok_builders .NES. "")
2718 $ echo "Here is the list of builders you can apparently use:"
2719 $ echo "(",ok_builders," )"
2720 $ rp = "Which """"make"""" utility do you wish to use? [''dflt'] "
2722 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2723 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2732 %Config-E-VMS, ERROR:
2733 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
2734 utility of some sort and after checking my "builders" list I cannot find
2735 the symbol or command you use on your system to compile programs.
2738 $ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
2739 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2740 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2743 $ echo "I do not know where ""make"" is, and my life depends on it."
2744 $ echo "Go find a make program or fix your DCL$PATH setting!"
2745 $ echo "ABORTING..."
2746 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2748 $ EXIT 2 !$STATUS = "%X00000002" (error)
2754 $ DELETE/NOLOG/NOCONFIRM Makefile.;
2760 There seems to be trouble. I just tried to create a file in
2762 $ echo4 'F$ENVIRONMENT("DEFAULT")'
2765 but was unsuccessful. I am stopping now. Please check that directories'
2766 PROTECTION bits. I will leave you in the directory where you started
2769 $ echo4 "ABORTING..."
2775 $! echo " Very well I will proceed with ""''build'"""
2776 $ make = F$EDIT(build,"UPCASE")
2778 $!: locate the preferred pager for this system
2779 $!pagers = "most|more|less|type/page"
2780 $ IF osvers .GES. "V6.1"
2782 $ dflt = "type/page=save=10"
2784 $ dflt = "type/page"
2786 $! assume that the presence of a most symbol indicates the presence
2788 $ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most"
2789 $ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager
2790 $ rp="What pager is used on your system? [''dflt'] "
2794 $! update [.vms]config.vms here
2796 $! update makefile here
2797 $! echo4 "Updating makefile..."
2799 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2801 $ makefile = "" !wrt MANIFEST dir
2802 $ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
2803 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
2804 $ Makefile_SH = "descrip_mms.template"
2806 $ makefile = " -f Makefile." !wrt MANIFEST dir
2807 $ UUmakefile = "[-]Makefile." !wrt CWD dir
2808 $ DEFmakefile = "Makefile." !wrt DEF dir (?)
2809 $ Makefile_SH = "Makefile.in"
2812 $ IF macros .NES. ""
2814 $ tmp = F$LENGTH(macros)
2815 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2816 $ macros = "/macro=(" + macros + ")"
2818 $! Build up the extra C flags
2822 $ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm_results"
2824 $ IF be_case_sensitive
2826 $ extra_flags = "''extra_flags'" + "/Names=As_Is"
2828 $ extra_flags = "''extra_flags'" + "''user_c_flags'"
2830 $ min_pgflquota = "100000"
2831 $ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
2832 $ IF pgflquota .LES. min_pgflquota
2834 $ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
2835 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
2838 $ echo4 "Continuing..."
2840 $ echo4 "ABORTING..."
2845 $! PerlIO abstraction
2848 $ IF F$TYPE(useperlio) .NES. ""
2850 $ if f$extract(0,1,f$edit(useperlio,"collapse,upcase")) .eqs. "N" .or. useperlio .eqs. "undef" then bool_dflt = "n"
2854 $ echo "Previous versions of ''package' used the standard IO mechanisms as"
2857 defined in <stdio.h>. Versions 5.003_02 and later of perl allow
2858 alternate IO mechanisms via the PerlIO abstraction layer, but the
2859 stdio mechanism is still available if needed. The abstraction layer
2860 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
2861 Using PerlIO with sfio may cause problems with some extension modules.
2864 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2866 $ rp = "Use the PerlIO abstraction layer? [''bool_dflt'] "
2870 $ useperlio = "define"
2872 $ echo "Ok, doing things the stdio way."
2873 $ useperlio = "undef"
2877 $ echo4 "Checking the C run-time library."
2879 $! Former SUBCONFIGURE.COM
2881 $! - build a config.sh for VMS Perl.
2882 $! - use built config.sh to take config_h.SH -> config.h
2883 $! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
2884 $! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
2885 $! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
2887 $! Note for folks from other platforms changing things in here:
2889 $! Fancy changes (based on compiler capabilities or VMS version or
2890 $! whatever) are tricky, so go ahead and punt on those.
2892 $! Simple changes, though (say, always setting something to 1, or undef,
2893 $! or something like that) are straightforward. Adding a new constant
2894 $! item for the ultimately created config.sh requires at least one
2895 $! (possibly more) line(s) to this file.
2897 $! Add a line in the format:
2899 $! $ WC "foo='undef'"
2901 $! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
2902 $! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
2903 $! is sorted ASCII and corresponds to the output of config.sh in the
2904 $! Bourne shell version of Configure).
2905 $! Be very careful with quoting, as it can be tricky.
2906 $! For example if instead of a constant string like 'undef' or 'define'
2907 $! you wanted to add something to VMS's config.sh that looks like:
2911 $! then add a line that looks like this before the
2912 $! '##END WRITE NEW CONSTANTS HERE##' tagged line:
2914 $! $ WC "blank_string='" + "'"
2916 $! (+ is the string concatenator and "''var'" has the effect
2917 $! of "${var}" in perl or sh, but "'const'" is not interpolated).
2919 $! Note that unitialized variables, such as a line like:
2921 $! $ WC "new_var='" + new_var + "'"
2923 $! should be avoided unless new_var has a value assigned prior
2924 $! to that line (think of perl's -w warnings).
2926 $! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
2930 $ vms_ver = F$EXTRACT(1,3, osvers)
2931 $ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
2932 $ MCC = f$edit(mcc, "UPCASE")
2933 $ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
2934 $ IF ccname .EQS. "DEC"
2936 $ Checkcc := "''Mcc'/prefix=all"
2938 $ IF ccname .EQS. "CXX"
2942 $ Checkcc := "''Mcc'"
2945 $ ccflags = ccflags + extra_flags
2946 $ IF be_case_sensitive
2948 $ d_vms_be_case_sensitive = "define"
2950 $ d_vms_be_case_sensitive = "undef"
2952 $! Some constant defaults.
2953 $ hwname = f$getsyi("HW_NAME")
2954 $ myname = myhostname
2955 $ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
2960 $ IF use64bitint .OR. use64bitint .EQS. "define"
2962 $ use64bitint = "define"
2963 $ uselargefiles = "define"
2964 $ uselongdouble = "define"
2966 $ usemorebits = "define"
2967 $ ivdformat="""Ld"""
2968 $ uvuformat="""Lu"""
2969 $ uvoformat="""Lo"""
2970 $ uvxformat="""Lx"""
2971 $ uvXUformat="""LX"""
2973 $ use64bitint = "undef"
2974 $ uselargefiles = "undef"
2975 $ uselongdouble = "undef"
2976 $ usemorebits = "undef"
2977 $ ivdformat="""ld"""
2978 $ uvuformat="""lu"""
2979 $ uvoformat="""lo"""
2980 $ uvxformat="""lx"""
2981 $ uvXUformat="""lX"""
2983 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
2985 $ nveformat="""Le"""
2986 $ nvfformat="""Lf"""
2987 $ nvgformat="""Lg"""
2993 $ IF use64bitall .OR. use64bitall .EQS. "define"
2995 $ use64bitall = "define"
2997 $ use64bitall = "undef"
3000 $ usemymalloc = "undef"
3001 $ if mymalloc then usemymalloc = "define"
3005 $ IF (sharedperl .AND. archname .EQS. "VMS_AXP")
3013 $ IF (sharedperl .AND. archname .EQS. "VMS_IA64")
3028 $ dlobj="dl_vms''obj_ext'"
3030 $ cppstdin="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
3032 $ cpprun="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
3040 $ THEN d_mymalloc="define"
3041 $ ELSE d_mymalloc="undef"
3045 $ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
3046 $ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
3048 $ IF ((use_threads) .AND. (vms_ver .LES. "6.2"))
3050 $ 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"
3054 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
3061 $! perllibs should be libs with all non-core libs (such as gdbm) removed.
3067 $ IF use64bitint .OR. use64bitint .EQS. "define"
3069 $ d_PRId64 = "define"
3070 $ d_PRIu64 = "define"
3071 $ d_PRIo64 = "define"
3072 $ d_PRIx64 = "define"
3073 $ d_PRIXU64 = "define"
3074 $ sPRId64 = """Ld"""
3075 $ sPRIXU64 = """LX"""
3076 $ sPRIi64 = """Li"""
3077 $ sPRIo64 = """Lo"""
3078 $ sPRIu64 = """Lu"""
3079 $ sPRIx64 = """Lx"""
3081 $ quadtype = "long long"
3082 $ uquadtype = "unsigned long long"
3083 $ quadkind = "QUAD_IS_LONG_LONG"
3084 $ d_frexpl = "define"
3085 $ d_isnan = "define"
3086 $ d_isnanl = "define"
3087 $ d_modfl = "define"
3088 $ d_modflproto = "define"
3090 $ d_PRId64 = "undef"
3091 $ d_PRIXU64 = "undef"
3092 $ d_PRIu64 = "undef"
3093 $ d_PRIo64 = "undef"
3094 $ d_PRIx64 = "undef"
3096 $ sPRIXU64 = """lX"""
3103 $ uquadtype = "unsigned long"
3104 $ quadkind = "QUAD_IS_LONG"
3105 $ d_frexpl = "undef"
3107 $ d_isnanl = "undef"
3109 $ d_modflproto = "undef"
3112 $! Now some that we build up
3116 $ IF use_5005_threads
3118 $ arch = "''arch'-thread"
3119 $ archname = "''archname'-thread"
3120 $ d_old_pthread_create_joinable = "undef"
3121 $ old_pthread_create_joinable = " "
3122 $ use5005threads = "define"
3123 $ useithreads = "undef"
3125 $ arch = "''arch'-ithread"
3126 $ archname = "''archname'-ithread"
3127 $ d_old_pthread_create_joinable = "undef"
3128 $ old_pthread_create_joinable = " "
3129 $ use5005threads = "undef"
3130 $ useithreads = "define"
3133 $ d_old_pthread_create_joinable = "undef"
3134 $ old_pthread_create_joinable = " "
3135 $ use5005threads = "undef"
3136 $ useithreads = "undef"
3139 $! Some that we need to invoke the compiler for
3142 $! handy construction aliases/symbols
3144 $ OS := "open/write CONFIG []try.c"
3145 $ WS := "write CONFIG"
3146 $ CS := "close CONFIG"
3147 $ DS := "delete/nolog/noconfirm []try.*;*"
3149 $ good_compile = %X10B90001
3150 $ IF ccname .EQS. "GCC"
3152 $ open/write OPTCHAN []try.opt
3153 $ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
3154 $ write OPTCHAN "Sys$Share:VAXCRTL/Share"
3157 $ good_compile = %X10000001
3159 $ IF ccname .EQS. "CXX"
3161 $ good_compile = %X15F60001
3163 $ good_link = %X10000001
3164 $ tmp = "" ! null string default
3166 $ GOTO beyond_compile_ok
3168 $! Check for type sizes
3173 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3174 $ WS "#include <stdlib.h>"
3176 $ WS "#include <stdio.h>"
3179 $ WS "printf(""%d\n"", sizeof(''tmp'));"
3186 $!: locate header file
3190 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3191 $ WS "#include <stdlib.h>"
3193 $ WS "#include <stdio.h>"
3194 $ WS "#include <''tmp'>"
3197 $ WS "printf(""define\n"");"
3204 $!: define an alternate in-header-list? function
3208 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3210 $ echo4 "<''tmp'> found."
3213 $ echo4 "<''tmp'> NOT found."
3218 $!: define an is-in-libc? function
3221 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3223 $ echo4 "''tmp'() found."
3226 $ echo4 "''tmp'() NOT found."
3231 $!: define a shorthand compile call
3235 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3237 $ OPEN/WRITE CONFIG []try.out
3238 $ DEFINE/USER_MODE SYS$ERROR CONFIG
3239 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
3242 $ OPEN/READ CONFIG []try.out
3245 $ DELETE/NOLOG/NOCONFIRM []try.out;
3246 $ DELETE/NOLOG/NOCONFIRM []try.exe;
3248 $ tmp = "" ! null string default
3254 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3255 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3259 $ 'ld' try.obj,try.opt/opt
3260 $ link_status = $status
3263 $ link_status = $status
3266 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
3269 $!: define a shorthand compile call for compilations that should be ok.
3271 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3272 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3275 $ compile_status = $status
3277 $ DELETE/NOLOG/NOCONFIRM try.c;
3282 $! Check for __STDC__
3285 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3286 $ WS "#include <stdlib.h>"
3288 $ WS "#include <stdio.h>"
3291 $ WS "#ifdef __STDC__"
3292 $ WS "printf(""42\n"");"
3294 $ WS "printf(""1\n"");"
3301 $ IF F$INTEGER(tmp) .eq. 42
3303 $ echo4 "Your C compiler and pre-processor defines the symbol:"
3307 $! Check for double size
3309 $ echo4 "Checking to see how big your double precision numbers are..."
3311 $ GOSUB type_size_check
3313 $ echo "Your double is ''doublesize' bytes long."
3315 $! Check for long double size
3318 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3319 $ WS "#pragma message disable ALL" ! VAX compilers may have distracting informationals
3320 $ WS "#include <stdlib.h>"
3322 $ WS "#include <stdio.h>"
3325 $ WS "printf(""%d\n"", sizeof(long double));"
3329 $ echo4 "Checking to see if you have long double..."
3331 $ IF link_status .NE. good_link
3335 $ echo "You do not have long double."
3337 $ echo "You have long double."
3338 $ echo4 "Checking to see how big your long doubles are..."
3341 $ d_longdbl = "define"
3342 $ echo "Your long doubles are ''longdblsize' bytes long."
3345 $ IF d_longdbl .OR. d_longdbl .EQS. "define"
3347 $ d_PRIEUldbl = "define"
3348 $ d_PRIFUldbl = "define"
3349 $ d_PRIGUldbl = "define"
3350 $ d_PRIeldbl = "define"
3351 $ d_PRIfldbl = "define"
3352 $ d_PRIgldbl = "define"
3353 $ sPRIEUldbl = """LE"""
3354 $ sPRIFUldbl = """LF"""
3355 $ sPRIGUldbl = """LG"""
3356 $ sPRIeldbl = """Le"""
3357 $ sPRIfldbl = """Lf"""
3358 $ sPRIgldbl = """Lg"""
3360 $ d_PRIEUldbl = "undef"
3361 $ d_PRIFUldbl = "undef"
3362 $ d_PRIGUldbl = "undef"
3363 $ d_PRIeldbl = "undef"
3364 $ d_PRIfldbl = "undef"
3365 $ d_PRIgldbl = "undef"
3373 $ d_SCNfldbl = d_PRIfldbl
3374 $ sSCNfldbl = sPRIfldbl ! expect consistency
3376 $!: check for long long
3378 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3379 $ WS "#include <stdlib.h>"
3381 $ WS "#include <stdio.h>"
3384 $ WS "printf(""%d\n"", sizeof(long long));"
3388 $ echo4 "Checking to see if you have long long..."
3390 $ IF link_status .NE. good_link
3393 $ d_longlong="undef"
3394 $ echo "You do not have long long."
3396 $ echo "You have long long."
3397 $ echo4 "Checking to see how big your long longs are..."
3399 $ longlongsize = tmp
3400 $ d_longlong = "define"
3401 $ echo "Your long longs are ''longlongsize' bytes long."
3404 $! Check the prototype for getgid
3406 $ echo "Looking for the type for group ids returned by getgid()."
3408 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3409 $ WS "#include <stdlib.h>"
3411 $ WS "#include <stdio.h>"
3412 $ WS "#include <types.h>"
3420 $ IF compile_status .NE. good_compile
3422 $! Okay, gid_t failed. Must be unsigned int
3423 $ gidtype = "unsigned int"
3424 $ echo4 "assuming ""''gidtype'""."
3427 $ echo4 "gid_t found."
3430 $! Check to see if we've got dev_t
3432 $ echo "Looking for the type for dev."
3434 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3435 $ WS "#include <stdlib.h>"
3437 $ WS "#include <stdio.h>"
3438 $ WS "#include <types.h>"
3446 $ IF compile_status .NE. good_compile
3448 $! Okay, dev_t failed. Must be unsigned int
3449 $ devtype = "unsigned int"
3450 $ echo4 "assuming ""''devtype'""."
3453 $ echo4 "dev_t found."
3456 $! Check to see if we've got unistd.h (which we ought to, but you never know)
3463 $! do we have getppid()?
3465 $ IF i_unistd .EQS. "define"
3468 $ WS "#include <stdio.h>"
3469 $ WS "#include <unistd.h>"
3471 $ WS "printf(""%d\n"",getppid());"
3479 $ d_getppid = "undef"
3482 $!: see if this is a libutil.h system
3488 $! Check to see if we've got shadow.h (probably not, but...)
3494 $! Check to see if we've got socks.h (probably not, but...)
3500 $! Check the prototype for select
3502 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3505 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3506 $ WS "#include <stdlib.h>"
3508 $ WS "#include <stdio.h>"
3509 $ WS "#include <types.h>"
3510 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3513 $ WS "#include <socketshr.h>"
3515 $ WS "#include <time.h>"
3516 $ WS "#include <socket.h>"
3523 $ WS "bar = select(2, foo, foo, foo, NULL);"
3528 $ IF compile_status .NE. good_compile
3530 $! Okay, select failed. Must be an int *
3531 $ selecttype = "int *"
3532 $ echo4 "select() NOT found."
3534 $ selecttype="fd_set *"
3535 $ echo4 "select() found."
3538 $ ! No sockets, so stick in an int * : no select, so pick a harmless default
3539 $ selecttype = "int *"
3542 $! Check to see if fd_set exists
3544 $ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3546 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3547 $ WS "#include <stdlib.h>"
3549 $ WS "#include <stdio.h>"
3550 $ WS "#include <types.h>"
3553 $ WS "#include <socketshr.h>"
3555 $ IF Has_Dec_C_Sockets
3557 $ WS "#include <time.h>"
3558 $ WS "#include <socket.h>"
3568 $ IF compile_status .ne. good_compile
3570 $! Okay, fd_set failed. Must not exist
3571 $ d_fd_set = "undef"
3572 $ echo4 "Hmm, your compiler has some difficulty with fd_set."
3575 $ echo4 "Well, your system knows about the normal fd_set typedef..."
3578 $! Check for inttypes.h
3580 $ tmp = "inttypes.h"
3584 $! Check to see if off64_t exists
3586 $ echo4 "Checking to see if you have off64_t..."
3588 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3589 $ WS "#include <stdlib.h>"
3591 $ WS "#include <stdio.h>"
3592 $ WS "#include <types.h>"
3593 $ WS "#''i_inttypes' IIH"
3595 $ WS "#include <inttypes.h>"
3604 $ IF compile_status .EQ. good_compile
3606 $ d_off64_t="define"
3607 $ echo "You have off64_t."
3609 $ d_off64_t = "undef"
3610 $ echo "You do not have off64_t."
3613 $! Check to see if fpos64_t exists
3615 $ echo4 "Checking to see if you have fpos64_t..."
3617 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3618 $ WS "#include <stdlib.h>"
3620 $ WS "#include <stdio.h>"
3621 $ WS "#include <types.h>"
3622 $ WS "#''i_inttypes' IIH"
3624 $ WS "#include <inttypes.h>"
3628 $ WS "fpos64_t bar;"
3633 $ IF compile_status .EQ. good_compile
3635 $ d_fpos64_t="define"
3636 $ echo "You have fpos64_t."
3638 $ d_fpos64_t = "undef"
3639 $ echo "You do not have fpos64_t."
3642 $! Check to see if int64_t exists
3644 $ echo4 "Checking to see if you have int64_t..."
3646 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3647 $ WS "#include <stdlib.h>"
3649 $ WS "#include <stdio.h>"
3650 $ WS "#include <types.h>"
3651 $ WS "#''i_inttypes' IIH"
3653 $ WS "#include <inttypes.h>"
3662 $ IF compile_status .EQ. good_compile
3664 $ d_int64_t="define"
3665 $ echo "You have int64_t."
3667 $ d_int64_t = "undef"
3668 $ echo "You do not have int64_t."
3671 $!: see if this is a netdb.h system
3672 $ IF Has_Dec_C_Sockets
3679 $! Check for h_errno
3681 $ echo4 "Checking to see if you have h_errno..."
3683 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3684 $ WS "#include <stdlib.h>"
3686 $ WS "#include <stdio.h>"
3687 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3688 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
3696 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3699 $ echo "You have h_errno."
3702 $ echo "You do not have h_errno."
3705 $! Check to see if gethostname exists
3707 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3710 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3711 $ WS "#include <stdlib.h>"
3713 $ WS "#include <stdio.h>"
3714 $ WS "#include <types.h>"
3717 $ WS "#include <socketshr.h>"
3719 $ WS "#include <time.h>"
3720 $ WS "#include <socket.h>"
3724 $ WS "char name[100];"
3725 $ WS "int bar, baz;"
3727 $ WS "baz = gethostname(name, bar);"
3732 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3734 $ d_gethname="define"
3735 $ echo4 "gethostname() found."
3737 $ d_gethname="undef"
3740 $ ! No sockets, so no gethname
3741 $ d_gethname = "undef"
3744 $! Check for sys/file.h
3746 $ tmp = "sys/file.h"
3751 $! Check for sys/ioctl.h
3753 $ tmp = "sys/ioctl.h"
3757 $! Check for sys/utsname.h
3759 $ tmp = "sys/utsname.h"
3761 $ i_sysutsname = tmp
3763 $! Check for syslog.h
3775 $! Check for sys/uio.h
3781 $! Check for sys/mode.h
3783 $ tmp = "sys/mode.h"
3787 $! Check for sys/access.h
3789 $ tmp = "sys/access.h"
3793 $! Check for sys/security.h
3795 $ tmp = "sys/security.h"
3799 $! Check for fcntl.h
3808 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3809 $ WS "#include <stdlib.h>"
3811 $ WS "#include <stdio.h>"
3812 $ WS "#include <fcntl.h>"
3815 $ WS "fcntl(1,2,3);"
3823 $! Check for fcntl locking capability
3825 $ echo4 "Checking if fcntl-based file locking works... "
3827 $ IF d_fcntl .EQS. "define"
3830 $ WS "#include <stdio.h>"
3831 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3832 $ WS "#include <stdlib.h>"
3834 $ WS "#include <fcntl.h>"
3835 $ WS "#include <unistd.h>"
3837 $ WS "#if defined(F_SETLK) && defined(F_SETLKW)"
3838 $ WS " struct flock flock;"
3839 $ WS " int retval, fd;"
3840 $ WS " fd = open(""try.c"", O_RDONLY);"
3841 $ WS " flock.l_type = F_RDLCK;"
3842 $ WS " flock.l_whence = SEEK_SET;"
3843 $ WS " flock.l_start = flock.l_len = 0;"
3844 $ WS " retval = fcntl(fd, F_SETLK, &flock);"
3846 $ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));"
3848 $ WS " printf(""undef\n"");"
3853 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3856 $ IF tmp .EQS. "define"
3858 $ echo4 "Yes, it seems to work."
3860 $ echo4 "Nope, it didn't work."
3863 $ echo4 "I'm unable to compile the test program, so I'll assume not."
3867 $ echo4 "Nope, since you don't even have fcntl()."
3869 $ d_fcntl_can_lock = tmp
3874 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3875 $ WS "#include <stdlib.h>"
3877 $ WS "#include <string.h>"
3880 $ WS "char * place;"
3881 $ WS "place = memchr(""foo"", 47, 3);"
3889 $! Check for strtoull
3892 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3893 $ WS "#include <stdlib.h>"
3895 $ WS "#include <string.h>"
3898 $ WS "unsigned __int64 result;"
3899 $ WS "result = strtoull(""123123"", NULL, 10);"
3907 $! Check for strtouq
3910 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3911 $ WS "#include <stdlib.h>"
3913 $ WS "#include <string.h>"
3916 $ WS "unsigned __int64 result;"
3917 $ WS "result = strtouq(""123123"", NULL, 10);"
3925 $! Check for strtoll
3928 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3929 $ WS "#include <stdlib.h>"
3931 $ WS "#include <string.h>"
3934 $ WS "__int64 result;"
3935 $ WS "result = strtoll(""123123"", NULL, 10);"
3946 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3947 $ WS "#include <stdlib.h>"
3949 $ WS "#include <string.h>"
3952 $ WS "__int64 result;"
3953 $ WS "result = strtoq(""123123"", NULL, 10);"
3964 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3965 $ WS "#include <stdlib.h>"
3967 $ WS "#include <string.h>"
3970 $ WS "__int64 result;"
3971 $ WS "result = strtoq(""123123"", NULL, 10);"
3979 $! Check for strtold
3982 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3983 $ WS "#include <stdlib.h>"
3985 $ WS "#include <string.h>"
3988 $ WS "long double result;"
3989 $ WS "result = strtold(""123123"", NULL, 10);"
4000 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4001 $ WS "#include <stdlib.h>"
4003 $ WS "#include <string.h>"
4006 $ WS " __int64 result;"
4007 $ WS "result = atoll(""123123"");"
4018 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4019 $ WS "#include <stdlib.h>"
4021 $ WS "#include <string.h>"
4025 $ WS "result = atolf(""123123"");"
4036 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4037 $ WS "#include <stdlib.h>"
4039 $ WS "#include <stdio.h>"
4042 $ WS "access(""foo"", F_OK);"
4053 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4054 $ WS "#include <stdlib.h>"
4056 $ WS "#include <stdio.h>"
4057 $ WS "#include <strings.h>"
4060 $ WS "char foo[10];"
4061 $ WS "bzero(foo, 10);"
4072 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4073 $ WS "#include <stdlib.h>"
4075 $ WS "#include <stdio.h>"
4076 $ WS "#include <strings.h>"
4079 $ WS "char foo[10], bar[10];"
4080 $ WS "bcopy(""foo"", bar, 3);"
4088 $! Check for mkstemp
4091 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4092 $ WS "#include <stdlib.h>"
4094 $ WS "#include <stdio.h>"
4097 $ WS "mkstemp(""foo"");"
4105 $! Check for mkstemps
4108 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4109 $ WS "#include <stdlib.h>"
4111 $ WS "#include <stdio.h>"
4114 $ WS "mkstemps(""foo"", 1);"
4122 $! Check for mkdtemp
4125 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4126 $ WS "#include <stdlib.h>"
4128 $ WS "#include <stdio.h>"
4131 $ WS "mkdtemp(""foo"");"
4141 $ if i_poll .eqs. "define"
4144 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4145 $ WS "#include <stdlib.h>"
4147 $ WS "#include <poll.h>"
4150 $ WS "struct pollfd pfd;"
4151 $ WS "int count=poll(&pfd,1,0);"
4162 $! Check for setvbuf
4165 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4166 $ WS "#include <stdlib.h>"
4168 $ WS "#include <stdio.h>"
4172 $ WS "char Buffer[99];"
4173 $ WS "foo = fopen(""foo"", ""r"");"
4174 $ WS "setvbuf(foo, Buffer, 0, 0);"
4182 $! see if sfio.h is available
4183 $! see if sfio library is available
4184 $! Ok, but do we want to use it.
4185 $! IF F$TYPE(usesfio) .EQS. "" THEN usesfio = "undef"
4186 $! IF val .EQS. "define"
4188 $! IF usesfio .EQS. "define"
4192 $! echo "''package' can use the sfio library, but it is experimental."
4193 $! IF useperlio .EQS. "undef"
4195 $! echo "For sfio also the PerlIO abstraction layer is needed."
4196 $! echo "Earlier you said you would not want that."
4198 $! rp="You seem to have sfio available, do you want to try using it? [''dflt'] "
4200 $! IF ans .EQS. "" THEN ans = dflt
4203 $! echo "Ok, turning on both sfio and PerlIO, then."
4204 $! useperlio="define"
4207 $! echo "Ok, avoiding sfio this time. I'll use stdio instead."
4211 $! IF usesfio .EQS. "define"
4213 $! echo4 "Sorry, cannot find sfio on this machine."
4214 $! echo4 "Ignoring your setting of usesfio=''usesfio'."
4222 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4223 $ WS "#include <stdlib.h>"
4225 $ WS "#include <stdio.h>"
4228 $ WS "setenv(""FOO"", ""BAR"", 0);"
4236 $! Check for setproctitle
4239 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4240 $ WS "#include <stdlib.h>"
4242 $ WS "#include <stdio.h>"
4245 $ WS "setproctitle(""%s"", ""FOO"");"
4249 $ tmp = "setproctitle"
4251 $ d_setproctitle = tmp
4253 $! Check for <netinet/in.h>
4255 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4257 $ tmp = "netinet/in.h"
4264 $! Check for <netinet/tcp.h>
4266 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4268 $ tmp = "netinet/tcp.h"
4270 $ i_netinettcp = tmp
4272 $ i_netinettcp="undef"
4275 $! Check for endhostent
4277 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4280 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4281 $ WS "#include <stdlib.h>"
4283 $ WS "#include <stdio.h>"
4285 $ THEN WS "#include <socketshr.h>"
4286 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4290 $ WS "endhostent();"
4294 $ tmp = "endhostent"
4301 $! Check for endnetent
4303 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4306 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4307 $ WS "#include <stdlib.h>"
4309 $ WS "#include <stdio.h>"
4311 $ THEN WS "#include <socketshr.h>"
4312 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4327 $! Check for endprotoent
4329 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4332 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4333 $ WS "#include <stdlib.h>"
4335 $ WS "#include <stdio.h>"
4337 $ THEN WS "#include <socketshr.h>"
4338 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4342 $ WS "endprotoent();"
4346 $ tmp = "endprotoent"
4353 $! Check for endservent
4355 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4358 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4359 $ WS "#include <stdlib.h>"
4361 $ WS "#include <stdio.h>"
4363 $ THEN WS "#include <socketshr.h>"
4364 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4368 $ WS "endservent();"
4372 $ tmp = "endservent"
4379 $! Check for sethostent
4381 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4384 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4385 $ WS "#include <stdlib.h>"
4387 $ WS "#include <stdio.h>"
4389 $ THEN WS "#include <socketshr.h>"
4390 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4394 $ WS "sethostent(1);"
4398 $ tmp = "sethostent"
4405 $! Check for setnetent
4407 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4410 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4411 $ WS "#include <stdlib.h>"
4413 $ WS "#include <stdio.h>"
4415 $ THEN WS "#include <socketshr.h>"
4416 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4420 $ WS "setnetent(1);"
4431 $! Check for setprotoent
4433 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4436 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4437 $ WS "#include <stdlib.h>"
4439 $ WS "#include <stdio.h>"
4441 $ THEN WS "#include <socketshr.h>"
4442 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4446 $ WS "setprotoent(1);"
4450 $ tmp = "setprotoent"
4457 $! Check for setservent
4459 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4462 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4463 $ WS "#include <stdlib.h>"
4465 $ WS "#include <stdio.h>"
4467 $ THEN WS "#include <socketshr.h>"
4468 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4472 $ WS "setservent(1);"
4476 $ tmp = "setservent"
4483 $! Check for gethostent
4485 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4488 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4489 $ WS "#include <stdlib.h>"
4491 $ WS "#include <stdio.h>"
4493 $ THEN WS "#include <socketshr.h>"
4494 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4498 $ WS "gethostent();"
4502 $ tmp = "gethostent"
4509 $! Check for getnetent
4511 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4514 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4515 $ WS "#include <stdlib.h>"
4517 $ WS "#include <stdio.h>"
4519 $ THEN WS "#include <socketshr.h>"
4520 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4535 $! Check for getprotoent
4537 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4540 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4541 $ WS "#include <stdlib.h>"
4543 $ WS "#include <stdio.h>"
4545 $ THEN WS "#include <socketshr.h>"
4546 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4550 $ WS "getprotoent();"
4554 $ tmp = "getprotoent"
4561 $! Check for getservent
4563 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4566 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4567 $ WS "#include <stdlib.h>"
4569 $ WS "#include <stdio.h>"
4571 $ THEN WS "#include <socketshr.h>"
4572 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4576 $ WS "getservent();"
4580 $ tmp = "getservent"
4587 $! Check for nanosleep
4590 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4591 $ WS "#include <stdlib.h>"
4593 $ WS "#include <time.h>"
4596 $ WS "int asleep = nanosleep(NULL,NULL);"
4604 $! Check for socklen_t
4606 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4608 $ echo4 "Checking to see if you have socklen_t..."
4610 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4611 $ WS "#include <stdlib.h>"
4613 $ WS "#include <stdio.h>"
4615 $ THEN WS "#include <socketshr.h>"
4616 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4620 $ WS "socklen_t x = 16;"
4625 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4627 $ d_socklen_t="define"
4628 $ echo "You have socklen_t."
4630 $ d_socklen_t="undef"
4631 $ echo "You do not have socklen_t."
4634 $ d_socklen_t="undef"
4637 $! Check for pthread_yield
4642 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4643 $ WS "#include <stdlib.h>"
4645 $ WS "#include <pthread.h>"
4646 $ WS "#include <stdio.h>"
4649 $ WS "pthread_yield();"
4653 $ tmp = "pthread_yield"
4655 $ d_pthread_yield = tmp
4657 $ d_pthread_yield="undef"
4660 $! Check for sched_yield
4665 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4666 $ WS "#include <stdlib.h>"
4668 $ WS "#include <pthread.h>"
4669 $ WS "#include <stdio.h>"
4672 $ WS "sched_yield();"
4676 $ tmp = "sched_yield"
4678 $ d_sched_yield = tmp
4679 $ IF d_sched_yield .EQS. "define"
4680 $ THEN sched_yield = "sched_yield"
4681 $ ELSE sched_yield = " "
4684 $ d_sched_yield="undef"
4688 $! Check for pthread_attr_setscope and PTHREAD_SCOPE_SYSTEM.
4689 $! (The actual test is to be written.)
4691 $ d_pthread_attr_setscope="undef"
4693 $! Check for generic pointer size
4695 $ echo4 "Checking to see how big your pointers are..."
4697 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4698 $ WS "#include <stdlib.h>"
4700 $ WS "#include <stdio.h>"
4704 $ WS "foo = sizeof(char *);"
4705 $ WS "printf(""%d\n"", foo);"
4710 $ GOSUB type_size_check
4712 $ echo "Your pointers are ''ptrsize' bytes long."
4714 $! Check for size_t size
4718 $ echo4 "Checking the size of ''zzz'..."
4719 $ GOSUB type_size_check
4721 $ echo "Your ''zzz' size is ''sizesize' bytes."
4723 $! Check rand48 and its ilk
4725 $ echo4 "Looking for a random number function..."
4727 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4728 $ WS "#include <stdlib.h>"
4730 $ WS "#include <stdio.h>"
4733 $ WS "srand48(12L);"
4738 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4740 $ drand01 = "drand48()"
4741 $ randseedtype = "long int"
4742 $ seedfunc = "srand48"
4743 $ echo4 "Good, found drand48()."
4744 $ d_drand48proto = "define"
4746 $ d_drand48proto = "undef"
4747 $ drand01="random()"
4748 $ randseedtype = "unsigned"
4749 $ seedfunc = "srandom"
4751 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4752 $ WS "#include <stdlib.h>"
4754 $ WS "#include <stdio.h>"
4762 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4764 $ echo4 "OK, found random()."
4766 $ drand01="(((float)rand())*MY_INV_RAND_MAX)"
4767 $ randseedtype = "unsigned"
4768 $ seedfunc = "srand"
4769 $ echo4 "Yick, looks like I have to use rand()."
4772 $! Done with compiler checks. Clean up.
4773 $ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
4774 $ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
4775 $ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
4776 $ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
4777 $ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
4778 $ IF ccname .EQS. "CXX"
4780 $ CALL Cxx_demangler_cleanup
4783 $! Some that are compiler or VMS version sensitive
4786 $ IF ccname .EQS. "GCC"
4788 $ d_attribut="define"
4792 $ d_attribut="undef"
4795 $! Dec C >= 5.2 and VMS ver >= 7.0
4796 $ IF (ccname .EQS. "DEC") .AND. -
4797 (F$INTEGER(Dec_C_Version).GE.50200000) .AND. (vms_ver .GES. "7.0")
4800 $ d_getitimer="define"
4801 $ d_gettimeod="define"
4803 $ d_mprotect="define"
4809 $ d_setitimer="define"
4810 $ d_sigaction="define"
4811 $ d_sigprocmask="define"
4812 $ d_truncate="define"
4816 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2 SPARE18 SPARE19 CHLD CONT STOP TSTP TTIN TTOU DEBUG SPARE27 SPARE28 SPARE29 SPARE30 SPARE31 SPARE32 RTMIN RTMAX"
4817 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4818 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
4819 $ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
4820 $ sig_name_init = psnwc1 + psnwc2 + psnwc3
4821 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 64"
4822 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,64,0"
4825 $ d_pathconf="define"
4826 $ d_fpathconf="define"
4827 $ d_sysconf="define"
4828 $ d_sigsetjmp="define"
4830 $ pidtype="unsigned int"
4832 $ d_getitimer="undef"
4833 $ d_gettimeod="undef"
4835 $ d_mprotect="undef"
4841 $ d_setitimer="undef"
4842 $ d_sigaction="undef"
4843 $ d_sigprocmask="undef"
4844 $ d_truncate="undef"
4847 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"
4848 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4849 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
4850 $ sig_name_init = psnwc1 + psnwc2
4851 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"
4852 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
4854 $ uidtype="unsigned int"
4855 $ d_pathconf="undef"
4856 $ d_fpathconf="undef"
4858 $ d_sigsetjmp="undef"
4860 $!: see if tzname[] exists
4862 $ WS "#include <stdio.h>"
4863 $ WS "#include <time.h>"
4864 $ WS "int main() { extern short tzname[]; printf(""%hd"", tzname[0]); }"
4867 $ IF compile_status .EQ. good_compile
4869 $ d_tzname = "undef"
4870 $ echo4 "tzname[] NOT found."
4872 $ d_tzname = "define"
4873 $ echo4 "tzname[] found."
4875 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
4877 $ IF d_gethname .EQS. "undef" .AND. d_uname .EQS. "undef"
4879 $ d_phostname="define"
4881 $ d_phostname="undef"
4885 $ IF ccname .EQS. "DEC"
4887 $ d_mbstowcs="define"
4889 $ d_stdiobase="define"
4890 $ d_stdio_cnt_lval="define"
4891 $ d_stdio_ptr_lval="define"
4892 $ d_stdstdio="define"
4893 $ d_faststdio="define"
4894 $ d_wcstombs="define"
4897 $ d_strcoll="define"
4898 $ d_strxfrm="define"
4901 $ i_langinfo="define"
4902 $ d_locconv="define"
4903 $ IF vms_ver .GES. "6.2"
4905 $ d_nl_langinfo="define"
4907 $ d_nl_langinfo="undef"
4909 $ d_setlocale="define"
4910 $ vms_cc_type="decc"
4912 $ d_mbstowcs="undef"
4914 $ d_stdiobase="undef"
4915 $ d_stdio_cnt_lval="undef"
4916 $ d_stdio_ptr_lval="undef"
4917 $ d_stdstdio="undef"
4918 $ d_faststdio="undef"
4919 $ d_wcstombs="undef"
4926 $ i_langinfo="undef"
4928 $ d_nl_langinfo="undef"
4929 $ d_setlocale="undef"
4931 $ d_stdio_ptr_lval_sets_cnt="undef"
4932 $ d_stdio_ptr_lval_nochange_cnt="define"
4933 $ usefaststdio="undef"
4936 $ if Has_Socketshr .OR. Has_Dec_C_Sockets
4938 $ d_vms_do_sockets="define"
4942 $ netdb_hlen_type="int"
4943 $ netdb_host_type="char *"
4944 $ netdb_name_type="char *"
4945 $ netdb_net_type="long"
4946 $ d_gethbyaddr="define"
4947 $ d_gethbyname="define"
4948 $ d_getnbyaddr="define"
4949 $ d_getnbyname="define"
4950 $ d_getpbynumber="define"
4951 $ d_getpbyname="define"
4952 $ d_getsbyport="define"
4953 $ d_getsbyname="define"
4954 $ d_gethostprotos="define"
4955 $ d_getnetprotos="define"
4956 $ d_getprotoprotos="define"
4957 $ d_getservprotos="define"
4958 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
4960 $ socksizetype="unsigned int"
4962 $ socksizetype="int *"
4965 $ d_vms_do_sockets="undef"
4969 $ netdb_hlen_type="int"
4970 $ netdb_host_type="char *"
4971 $ netdb_name_type="char *"
4972 $ netdb_net_type="long"
4973 $ d_gethbyaddr="undef"
4974 $ d_gethbyname="undef"
4975 $ d_getnbyaddr="undef"
4976 $ d_getnbyname="undef"
4977 $ d_getpbynumber="undef"
4978 $ d_getpbyname="undef"
4979 $ d_getsbyport="undef"
4980 $ d_getsbyname="undef"
4981 $ d_gethostprotos="undef"
4982 $ d_getnetprotos="undef"
4983 $ d_getprotoprotos="undef"
4984 $ d_getservprotos="undef"
4985 $ socksizetype="undef"
4990 $ usethreads="define"
4991 $ d_pthreads_created_joinable="define"
4992 $ if (vms_ver .GES. "7.0")
4994 $ d_oldpthreads="undef"
4996 $ d_oldpthreads="define"
4999 $ d_oldpthreads="undef"
5000 $ usethreads="undef"
5001 $ d_pthreads_created_joinable="undef"
5004 $! new (5.005_62++) typedefs for primitives
5006 $ echo "Choosing the C types to be used for Perl's internal types..."
5008 $ uvtype="unsigned long"
5010 $ u8type="unsigned char"
5012 $ u16type="unsigned short"
5014 $ u32type="unsigned int"
5015 $ i64type="long long"
5016 $ u64type="unsigned long long"
5019 $ IF use64bitint .OR. use64bitint .EQS. "define"
5021 $ ivtype = "''i64type'"
5022 $ uvtype = "''u64type'"
5023 $ nvtype="long double"
5030 $ GOSUB type_size_check
5032 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp
5033 $ IF ivtype .eqs. "long"
5034 $ THEN longsize = tmp
5037 $ GOSUB type_size_check
5042 $ GOSUB type_size_check
5044 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp
5047 $ GOSUB type_size_check
5051 $ GOSUB type_size_check
5054 $ tmp = "''i16type'"
5055 $ GOSUB type_size_check
5057 $ IF i16type .eqs. "short"
5058 $ THEN shortsize = tmp
5061 $ gosub type_size_check
5065 $ tmp = "''u16type'"
5066 $ GOSUB type_size_check
5069 $ tmp = "''i32type'"
5070 $ GOSUB type_size_check
5072 $ IF i32type .eqs. "int"
5073 $ THEN intsize = tmp
5076 $ gosub type_size_check
5080 $ tmp = "''u32type'"
5081 $ gosub type_size_check
5085 $ GOSUB type_size_check
5088 $ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
5089 $ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
5090 $ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
5092 $ echo4 "Checking whether your NVs can preserve your UVs..."
5094 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5095 $ WS "#include <stdlib.h>"
5097 $ WS "#include <stdio.h>"
5099 $ WS " ''uvtype' k = (''uvtype')~0, l;"
5100 $ WS " ''nvtype' d;"
5102 $ WS " d = (''nvtype')l;"
5103 $ WS " l = (''uvtype')d;"
5105 $ WS " printf(""preserve\n"");"
5110 $ IF tmp .EQS. "preserve"
5112 $ d_nv_preserves_uv = "define"
5113 $ echo "Yes, they can."
5114 $ nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8)
5116 $ d_nv_preserves_uv = "undef"
5117 $ echo "No, they can't."
5118 $ echo4 "Checking how many bits of your UVs your NVs can preserve..."
5120 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5121 $ WS "#include <stdlib.h>"
5123 $ WS "#include <stdio.h>"
5125 $ WS " ''uvtype' u = 0;"
5126 $ WS " int n = 8 * ''uvsize';"
5128 $ WS " for (i = 0; i < n; i++) {"
5129 $ WS " u = u << 1 | (''uvtype')1;"
5130 $ WS " if ((''uvtype')(''nvtype')u != u)"
5133 $ WS " printf(""%d\n"", i);"
5138 $ nv_preserves_uv_bits = tmp
5141 $ echo4 "Checking if kill() uses SYS$FORCEX or can't be called from a signal handler..."
5142 $ kill_by_sigprc = "undef"
5144 $ WS "#include <stdio.h>"
5145 $ WS "#include <signal.h>"
5146 $ WS "#include <unistd.h>"
5147 $ WS "void handler1(int s) { printf(""%d"",s); kill(getpid(),2); }"
5148 $ WS "void handler2(int s) { printf(""%d"",s); }"
5150 $ WS " printf(""0"");"
5151 $ WS " signal(1,handler1);"
5152 $ WS " signal(2,handler2);"
5153 $ WS " kill(getpid(),1);"
5155 $ WS " printf(""\n"");"
5158 $ ON ERROR THEN CONTINUE
5160 $ IF tmp .NES. "012"
5162 $ echo4 "Yes, it has at least one of those limitations."
5163 $ echo4 "Checking whether we can use SYS$SIGPRC instead..."
5165 $ WS "#include <stdio.h>"
5166 $ WS "#include <lib$routines.h>"
5167 $ WS "unsigned long code = 0;"
5168 $ WS "int handler(unsigned long *args) {"
5169 $ WS " code = args[1];"
5173 $ WS " int iss, sys$sigprc();"
5174 $ WS " lib$establish(handler);"
5175 $ WS " iss = sys$sigprc(0,0,0x1234);"
5176 $ WS " iss = ((iss&1)==1 && code == 0x1234);"
5177 $ WS " printf(""%d\n"",iss);"
5180 $ ON ERROR THEN CONTINUE
5184 $ echo4 "Yep, we can."
5185 $ kill_by_sigprc = "define"
5187 $! since SIGBUS and SIGSEGV indistinguishable, make them the same here.
5188 $! sigusr1 and sigusr2 show up in VMS6.2 and later
5190 $ if vms_ver .GES. "6.2"
5192 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"
5193 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
5194 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
5195 $ sig_name_init = psnwc1 + psnwc2
5196 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"
5197 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
5200 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT"
5201 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
5202 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",0"
5203 $ sig_name_init = psnwc1 + psnwc2
5204 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6"
5205 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,0"
5209 $ echo4 "Nope, we can't."
5212 $ echo4 "Nope, it doesn't."
5216 $! Finally the composite ones. All config
5218 $ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
5220 $ IF ccname .EQS. "DEC"
5222 $ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
5224 $ i_dirent = "undef"
5225 $ IF ccname .EQS. "CXX"
5227 $ i_dirent = "define"
5228 $ ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
5230 $ IF use_vmsdebug_perl
5232 $ optimize="/List/Debug/NoOpt"
5233 $ ldflags="/Debug/Trace/Map"
5236 $ optimize= "/NoList"
5237 $ ldflags="/NoTrace/NoMap"
5241 $! Okay, we've got everything configured. Now go write out a config.sh.
5242 $ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
5243 $ echo4 "Creating ''basename_config_sh'..."
5244 $ open/write CONFIG 'config_sh'
5245 $ WC := write CONFIG
5247 $! ##BEGIN WRITE NEW CONSTANTS HERE##
5251 $ WC "# This file was produced by Configure.COM on a ''osname' system."
5253 $ WC "# Package name : ''package'"
5254 $ WC "# Source directory : ''src'"
5255 $ WC "# Configuration time: " + cf_time
5256 $ WC "# Configuration by : " + cf_by
5257 $ WC "# Target system : " + myuname
5259 $ WC "Makefile_SH='" + Makefile_SH + "'"
5260 $ WC "Mcc='" + Mcc + "'"
5261 $ WC "PERL_REVISION='" + revision + "'"
5262 $ WC "PERL_VERSION='" + patchlevel + "'"
5263 $ WC "PERL_SUBVERSION='" + subversion + "'"
5264 $ WC "PERL_API_REVISION='" + api_revision + "'"
5265 $ WC "PERL_API_VERSION='" + api_version + "'"
5266 $ WC "PERL_API_SUBVERSION='" + api_subversion + "'"
5267 $ WC "PERL_PATCHLEVEL='" + perl_patchlevel + "'"
5268 $ WC "PERL_CONFIG_SH='true'"
5269 $ WC "_a='" + lib_ext + "'"
5270 $ WC "_exe='" + exe_ext + "'"
5271 $ WC "_o='" + obj_ext + "'"
5272 $ WC "alignbytes='" + alignbytes + "'"
5273 $ WC "aphostname='write sys$output f$edit(f$getsyi(\""SCSNODE\""),\""TRIM,LOWERCASE\"")'"
5275 $ WC "archlib='" + archlib + "'"
5276 $ WC "archlibexp='" + archlibexp + "'"
5277 $ WC "archname='" + archname + "'"
5278 $ WC "baserev='" + baserev + "'"
5279 $ WC "bin='" + bin + "'"
5280 $ WC "binexp='" + binexp + "'"
5281 $ WC "builddir='" + builddir + "'"
5282 $ WC "byteorder='1234'"
5283 $ WC "castflags='0'"
5284 $ WC "cc='" + perl_cc + "'"
5285 $ WC "cccdlflags='" + cccdlflags + "'"
5286 $ WC "ccdlflags='" + ccdlflags + "'"
5287 $ WC "ccflags='" + ccflags + "'"
5288 $ WC "ccname='" + ccname + "'"
5289 $ WC "ccversion='" + ccversion + "'"
5290 $ WC "cf_by='" + cf_by + "'"
5291 $ WC "cf_email='" + cf_email + "'"
5292 $ WC "cf_time='" + cf_time + "'"
5293 $ WC "config_args='" + config_args + "'"
5294 $ WC "config_sh='" + config_sh + "'"
5295 $ WC "cpp_stuff='" + cpp_stuff + "'"
5296 $ WC "cpplast='" + cpplast + "'"
5297 $ WC "cppminus='" + cppminus + "'"
5298 $ WC "cpprun='" + cpprun + "'"
5299 $ WC "cppstdin='" + cppstdin + "'"
5300 $ IF use64bitint .OR. use64bitint .EQS. "define"
5302 $! gcvt() does not work for > 16 decimal places; fallback to sprintf
5303 $ WC "d_Gconvert='sprintf((b),""%.*" + (nvgformat-"""") + ",(n),(x))'"
5305 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
5307 $ WC "d_PRIEldbl='" + d_PRIEUldbl + "'"
5308 $ WC "d_PRIFldbl='" + d_PRIFUldbl + "'"
5309 $ WC "d_PRIGldbl='" + d_PRIGUldbl + "'"
5310 $ WC "d_PRIXU64='" + d_PRIXU64 + "'"
5311 $ WC "d_PRId64='" + d_PRId64 + "'"
5312 $ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
5313 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
5314 $ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
5315 $ WC "d_PRIo64='" + d_PRIo64 + "'"
5316 $ WC "d_PRIu64='" + d_PRIu64 + "'"
5317 $ WC "d_PRIx64='" + d_PRIx64 + "'"
5318 $ WC "d_SCNfldbl='" + d_SCNfldbl + "'"
5319 $ WC "d__fwalk='undef'"
5320 $ WC "d_access='" + d_access + "'"
5321 $ WC "d_accessx='undef'"
5322 $ WC "d_aintl='undef'"
5323 $ WC "d_alarm='define'"
5324 $ WC "d_archlib='define'"
5325 $ WC "d_atolf='" + d_atolf + "'"
5326 $ WC "d_atoll='" + d_atoll + "'"
5327 $ WC "d_attribut='" + d_attribut + "'"
5328 $ WC "d_bcmp='" + d_bcmp + "'"
5329 $ WC "d_bcopy='" + d_bcopy + "'"
5330 $ WC "d_bincompat3='undef'"
5331 $! WC "d_bsdpgrp='undef'"
5332 $ WC "d_bsdgetpgrp='undef'"
5333 $ WC "d_bsdsetpgrp='undef'"
5334 $ WC "d_bzero='" + d_bzero + "'"
5335 $ WC "d_casti32='define'"
5336 $ WC "d_castneg='define'"
5337 $ WC "d_charvspr='undef'"
5338 $ WC "d_chown='define'"
5339 $ WC "d_chroot='undef'"
5340 $ WC "d_chsize='undef'"
5341 $ WC "d_class='undef'"
5342 $ WC "d_cmsghdr_s='undef'"
5343 $ WC "d_const='define'"
5344 $ WC "d_copysignl='define'"
5345 $ WC "d_crypt='define'"
5346 $ WC "d_csh='undef'"
5347 $ WC "d_cuserid='define'"
5348 $ WC "d_dbl_dig='define'"
5349 $ WC "d_dbminitproto='undef'"
5350 $ WC "d_difftime='define'"
5351 $ WC "d_dirfd='undef'"
5352 $ WC "d_dirnamlen='define'"
5353 $ WC "d_dlerror='undef'"
5354 $ WC "d_dlsymun='undef'"
5355 $ WC "d_dosuid='undef'"
5356 $ WC "d_drand48proto='" + d_drand48proto + "'"
5357 $ WC "d_dup2='define'"
5358 $ WC "d_eaccess='undef'"
5359 $ WC "d_endgrent='define'"
5360 $ WC "d_endhent='" + d_endhent + "'"
5361 $ WC "d_endnent='" + d_endnent + "'"
5362 $ WC "d_endpent='" + d_endpent + "'"
5363 $ WC "d_endpwent='define'"
5364 $ WC "d_endsent='" + d_endsent + "'"
5365 $ WC "d_eofnblk='undef'"
5366 $ WC "d_eunice='undef'"
5367 $ WC "d_fchmod='undef'"
5368 $ WC "d_fchdir='undef'"
5369 $ WC "d_fchown='undef'"
5370 $ WC "d_fcntl='" + d_fcntl + "'"
5371 $ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
5372 $ WC "d_fd_set='" + d_fd_set + "'"
5373 $ WC "d_fgetpos='define'"
5374 $ WC "d_finite='undef'"
5375 $ WC "d_finitel='undef'"
5376 $ WC "d_flexfnam='define'"
5377 $ WC "d_flock='undef'"
5378 $ WC "d_flockproto='undef'"
5379 $ WC "d_fork='undef'"
5380 $ WC "d_fp_class='undef'"
5381 $ WC "d_fpathconf='" + d_fpathconf + "'"
5382 $ WC "d_fpclass='undef'"
5383 $ WC "d_fpclassify='undef'"
5384 $ WC "d_fpclassl='undef'"
5385 $ WC "d_fpos64_t='" + d_fpos64_t + "'"
5386 $ WC "d_frexpl='" + d_frexpl + "'"
5387 $ WC "d_fs_data_s='undef'"
5388 $ WC "d_fseeko='undef'"
5389 $ WC "d_fsetpos='define'"
5390 $ WC "d_fstatfs='undef'"
5391 $ WC "d_fstatvfs='undef'"
5392 $ WC "d_fsync='undef'"
5393 $ WC "d_ftello='undef'"
5394 $ WC "d_getcwd='define'"
5395 $ WC "d_getespwnam='undef'"
5396 $ WC "d_getfsstat='undef'"
5397 $ WC "d_getgrent='define'"
5398 $ WC "d_getgrps='undef'"
5399 $ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
5400 $ WC "d_gethbyname='" + d_gethbyname + "'"
5401 $ WC "d_gethent='" + d_gethent + "'"
5402 $ WC "d_gethname='" + d_gethname + "'"
5403 $ WC "d_gethostprotos='" + d_gethostprotos + "'"
5404 $ WC "d_getitimer='" + d_getitimer + "'"
5405 $ WC "d_getlogin='define'"
5406 $ WC "d_getmnt='undef'"
5407 $ WC "d_getmntent='undef'"
5408 $ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
5409 $ WC "d_getnbyname='" + d_getnbyname + "'"
5410 $ WC "d_getnent='" + d_getnent + "'"
5411 $ WC "d_getnetprotos='" + d_getnetprotos + "'"
5412 $ WC "d_getpagsz='undef'"
5413 $ WC "d_getpbyname='" + d_getpbyname + "'"
5414 $ WC "d_getpbynumber='" + d_getpbynumber + "'"
5415 $ WC "d_getpent='" + d_getpent + "'"
5416 $ WC "d_getpgid='undef'"
5417 $ WC "d_getpgrp2='undef'"
5418 $ WC "d_getpgrp='undef'"
5419 $ WC "d_getppid='" + d_getppid + "'"
5420 $ WC "d_getprior='undef'"
5421 $ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
5422 $ WC "d_getprpwnam='undef'"
5423 $ WC "d_getpwent='define'"
5424 $ WC "d_getsbyname='" + d_getsbyname + "'"
5425 $ WC "d_getsbyport='" + d_getsbyport + "'"
5426 $ WC "d_getsent='" + d_getsent + "'"
5427 $ WC "d_getservprotos='" + d_getservprotos + "'"
5428 $ WC "d_getspnam='undef'"
5429 $ WC "d_gettimeod='" + d_gettimeod + "'"
5430 $ WC "d_gnulibc='undef'"
5431 $ WC "d_grpasswd='undef'"
5432 $ WC "d_hasmntopt='undef'"
5433 $ WC "d_htonl='" + d_htonl + "'"
5434 $ WC "d_ilogbl='undef'"
5435 $ WC "d_index='" + d_index + "'"
5436 $ WC "d_inetaton='undef'"
5437 $ WC "d_int64_t='" + d_int64_t + "'"
5438 $ WC "d_isascii='define'"
5439 $ WC "d_isfinite='undef'"
5440 $ WC "d_isinf='undef'"
5441 $ WC "d_isnan='" + d_isnan + "'"
5442 $ WC "d_isnanl='" + d_isnanl + "'"
5443 $ WC "d_killpg='undef'"
5444 $ WC "d_lchown='undef'"
5445 $ WC "d_ldbl_dig='define'"
5446 $ WC "d_link='undef'"
5447 $ WC "d_llseek='undef'"
5448 $ WC "d_locconv='" + d_locconv + "'"
5449 $ WC "d_lockf='undef'"
5450 $ WC "d_longdbl='" + d_longdbl + "'"
5451 $ WC "d_longlong='" + d_longlong + "'"
5452 $ WC "d_lseekproto='define'"
5453 $ WC "d_lstat='undef'"
5454 $ WC "d_madvise='undef'"
5455 $ WC "d_mblen='" + d_mblen + "'"
5456 $ WC "d_mbstowcs='" + d_mbstowcs + "'"
5457 $ WC "d_mbtowc='" + d_mbtowc + "'"
5458 $ WC "d_memchr='" + d_memchr + "'"
5459 $ WC "d_memcmp='define'"
5460 $ WC "d_memcpy='define'"
5461 $ WC "d_memmove='define'"
5462 $ WC "d_memset='define'"
5463 $ WC "d_mkdir='define'"
5464 $ WC "d_mkdtemp='" + d_mkdtemp + "'"
5465 $ WC "d_mkfifo='undef'"
5466 $ WC "d_mknod='undef'"
5467 $ WC "d_mkstemp='" + d_mkstemp + "'"
5468 $ WC "d_mkstemps='" + d_mkstemps + "'"
5469 $ WC "d_mktime='" + d_mktime + "'"
5470 $ WC "d_mmap='" + d_mmap + "'"
5471 $ WC "d_modfl='" + d_modfl + "'"
5472 $ WC "d_modflproto='" + d_modflproto + "'"
5473 $ WC "d_modfl_pow32_bug='undef'"
5474 $ WC "d_mprotect='" + d_mprotect + "'"
5475 $ WC "d_msg='undef'"
5476 $ WC "d_msg_ctrunc='undef'"
5477 $ WC "d_msg_dontroute='undef'"
5478 $ WC "d_msg_oob='undef'"
5479 $ WC "d_msg_peek='undef'"
5480 $ WC "d_msg_proxy='undef'"
5481 $ WC "d_msghdr_s='undef'"
5482 $ WC "d_msync='" + d_msync + "'"
5483 $ WC "d_munmap='" + d_munmap + "'"
5484 $ WC "d_mymalloc='" + d_mymalloc + "'"
5485 $ WC "d_nanosleep='" + d_nanosleep + "'"
5486 $ WC "d_nice='define'"
5487 $ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
5488 $ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
5489 $ WC "nv_preserves_uv_bits='" + nv_preserves_uv_bits + "'"
5490 $ WC "d_off64_t='" + d_off64_t + "'"
5491 $ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
5492 $ WC "d_oldarchlib='define'"
5493 $ WC "d_oldpthreads='" + d_oldpthreads + "'"
5494 $ WC "d_open3='define'"
5495 $ WC "d_pathconf='" + d_pathconf + "'"
5496 $ WC "d_pause='define'"
5497 $ WC "d_perl_otherlibdirs='undef'"
5498 $ WC "d_phostname='" + d_phostname + "'"
5499 $ WC "d_pipe='define'"
5500 $ WC "d_poll='" + d_poll + "'"
5501 $ WC "d_procselfexe='undef'"
5502 $ WC "d_pthread_atfork='undef'"
5503 $ WC "d_pthread_attr_setscope='" + d_pthread_attr_setscope + "'"
5504 $ WC "d_pthread_yield='" + d_pthread_yield + "'"
5505 $ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
5506 $ WC "d_pwage='undef'"
5507 $ WC "d_pwchange='undef'"
5508 $ WC "d_pwclass='undef'"
5509 $ WC "d_pwcomment='define'"
5510 $ WC "d_pwexpire='undef'"
5511 $ WC "d_pwgecos='define'"
5512 $ WC "d_pwpasswd='define'"
5513 $ WC "d_pwquota='undef'"
5514 $ WC "d_qgcvt='undef'"
5515 $ WC "d_quad='" + d_quad + "'"
5516 $ WC "d_readdir='define'"
5517 $ WC "d_readlink='undef'"
5518 $ WC "d_readv='undef'"
5519 $ WC "d_realpath='undef'"
5520 $ WC "d_recvmsg='undef'"
5521 $ WC "d_rename='define'"
5522 $ WC "d_rewinddir='define'"
5523 $ WC "d_rmdir='define'"
5524 $ WC "d_safebcpy='undef'"
5525 $ WC "d_safemcpy='define'"
5526 $ WC "d_sanemcmp='define'"
5527 $ WC "d_sbrkproto='define'"
5528 $ WC "d_scalbnl='undef'"
5529 $ WC "d_sched_yield='" + d_sched_yield + "'"
5530 $ WC "d_scm_rights='undef'"
5531 $ WC "d_seekdir='define'"
5532 $ WC "d_select='" + d_select + "'"
5533 $ WC "d_sem='undef'"
5534 $ WC "d_semctl_semid_ds='undef'"
5535 $ WC "d_semctl_semun='undef'"
5536 $ WC "d_sendmsg='undef'"
5537 $ WC "d_setegid='undef'"
5538 $ WC "d_setenv='" + d_setenv + "'"
5539 $ WC "d_seteuid='undef'"
5540 $ WC "d_setgrent='undef'"
5541 $ WC "d_setgrps='undef'"
5542 $ WC "d_sethent='" + d_sethent + "'"
5543 $ WC "d_setitimer='" + d_setitimer + "'"
5544 $ WC "d_setlinebuf='undef'"
5545 $ WC "d_setlocale='" + d_setlocale + "'"
5546 $ WC "d_setnent='" + d_setnent + "'"
5547 $ WC "d_setpent='" + d_setpent + "'"
5548 $ WC "d_setpgid='undef'"
5549 $ WC "d_setpgrp2='undef'"
5550 $ WC "d_setpgrp='undef'"
5551 $ WC "d_setprior='undef'"
5552 $ WC "d_setproctitle='" + d_setproctitle + "'"
5553 $ WC "d_setpwent='define'"
5554 $ WC "d_setregid='undef'"
5555 $ WC "d_setresgid='undef'"
5556 $ WC "d_setresuid='undef'"
5557 $ WC "d_setreuid='undef'"
5558 $ WC "d_setrgid='undef'"
5559 $ WC "d_setruid='undef'"
5560 $ WC "d_setsent='" + d_setsent + "'"
5561 $ WC "d_setsid='undef'"
5562 $ WC "d_setvbuf='" + d_setvbuf + "'"
5563 $ WC "d_sfio='undef'"
5564 $ WC "d_shm='undef'"
5565 $ WC "d_shmatprototype='undef'"
5566 $ WC "d_sigaction='" + d_sigaction + "'"
5567 $ WC "d_sigprocmask='" + d_sigprocmask + "'"
5568 $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
5569 $ WC "d_sockatmark='undef'"
5570 $ WC "d_sockatmarkproto='undef'"
5571 $ WC "d_socket='" + d_socket + "'"
5572 $ WC "d_socklen_t='" + d_socklen_t + "'"
5573 $ WC "d_sockpair='undef'"
5574 $ WC "d_socks5_init='undef'"
5575 $ WC "d_sqrtl='define'"
5576 $ WC "d_sresgproto='undef'"
5577 $ WC "d_sresgproto='undef'"
5578 $ WC "d_sresproto='undef'"
5579 $ WC "d_sresuproto='undef'"
5580 $ WC "d_statblks='undef'"
5581 $ WC "d_statfs_f_flags='undef'"
5582 $ WC "d_statfs_s='undef'"
5583 $ WC "d_statfsflags='undef'"
5584 $ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
5585 $ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
5586 $ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'"
5587 $ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'"
5588 $ WC "d_stdio_stream_array='undef'"
5589 $ WC "d_stdiobase='" + d_stdiobase + "'"
5590 $ WC "d_stdstdio='" + d_stdstdio + "'"
5591 $ WC "d_faststdio='" + d_faststdio + "'"
5592 $ WC "d_strchr='define'"
5593 $ WC "d_strcoll='" + d_strcoll + "'"
5594 $ WC "d_strctcpy='define'"
5595 $ WC "d_strerrm='strerror((e),vaxc$errno)'"
5596 $ WC "d_strerror='define'"
5597 $ WC "d_strftime='define'"
5598 $ WC "d_strlcat='undef'"
5599 $ WC "d_strlcpy='undef'"
5600 $ WC "d_strtod='define'"
5601 $ WC "d_strtol='define'"
5602 $ WC "d_strtold='" + d_strtold + "'"
5603 $ WC "d_strtoll='" + d_strtoll + "'"
5604 $ WC "d_strtoq='define'"
5605 $ WC "d_strtoul='define'"
5606 $ WC "d_strtoull='" + d_strtoull + "'"
5607 $ WC "d_strtouq='" + d_strtouq + "'"
5608 $ WC "d_strxfrm='" + d_strxfrm + "'"
5609 $ WC "d_suidsafe='undef'"
5610 $ WC "d_symlink='undef'"
5611 $ WC "d_syscall='undef'"
5612 $ WC "d_syscallproto='undef'"
5613 $ WC "d_sysconf='" + d_sysconf + "'"
5614 $ WC "d_syserrlst='undef'"
5615 $ WC "d_system='define'"
5616 $ WC "d_tcgetpgrp='undef'"
5617 $ WC "d_tcsetpgrp='undef'"
5618 $ WC "d_telldir='define'"
5619 $ WC "d_telldirproto='define'"
5620 $ WC "d_time='define'"
5621 $ WC "d_times='define'"
5622 $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.0")
5624 $ WC "d_tm_tm_gmtoff='define'"
5625 $ WC "d_tm_tm_zone='define'"
5627 $ WC "d_tm_tm_gmtoff='undef'"
5628 $ WC "d_tm_tm_zone='undef'"
5630 $ WC "d_truncate='" + d_truncate + "'"
5631 $ WC "d_tzname='" + d_tzname + "'"
5632 $ WC "d_u32align='define'"
5633 $ WC "d_ualarm='" + d_ualarm + "'"
5634 $ WC "d_umask='define'"
5635 $ WC "d_uname='" + d_uname + "'"
5636 $ WC "d_union_semun='undef'"
5637 $ WC "d_unlink_all_versions='" + d_unlink_all_versions + "'" ! VMS-specific
5638 $ WC "d_unordered='undef'"
5639 $ WC "d_usleep='" + d_usleep + "'"
5640 $ WC "d_usleepproto='" + d_usleep + "'"
5641 $ WC "d_ustat='undef'"
5642 $ WC "d_vendorarch='undef'"
5643 $ WC "d_vendorlib='undef'"
5644 $ WC "d_vfork='define'"
5645 $ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
5646 $ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
5647 $ WC "d_void_closedir='define'"
5648 $ WC "d_volatile='define'"
5649 $ WC "d_vprintf='define'"
5650 $ WC "d_wait4='" + d_wait4 + "'"
5651 $ WC "d_waitpid='define'"
5652 $ WC "d_wcstombs='" + d_wcstombs + "'"
5653 $ WC "d_wctomb='" + d_wctomb + "'"
5654 $ WC "d_writev='undef'"
5655 $ WC "db_hashtype=' '"
5656 $ WC "db_prefixtype=' '"
5657 $ WC "db_version_major='" + "'"
5658 $ WC "db_version_minor='" + "'"
5659 $ WC "db_version_patch='" + "'"
5660 $ WC "dbgprefix='" + dbgprefix + "'"
5661 $ WC "defvoidused='15'"
5662 $ WC "devtype='" + devtype + "'"
5663 $ WC "direntrytype='struct dirent'"
5664 $ WC "dlext='" + dlext + "'"
5665 $ WC "dlobj='" + dlobj + "'"
5666 $ WC "dlsrc='dl_vms.c'"
5667 $ WC "doublesize='" + doublesize + "'"
5668 $ WC "drand01='" + drand01 + "'"
5670 $! The extensions symbol may be quite long
5672 $ tmp = "dynamic_ext='" + extensions + "'"
5676 $ WC "ebcdic='undef'"
5677 $ WC "embedmymalloc='" + usemymalloc + "'"
5678 $ WC "eunicefix=':'"
5679 $ WC "exe_ext='" + exe_ext + "'"
5681 $! The extensions symbol may be quite long
5683 $ tmp = "extensions='" + extensions + "'"
5686 $ WC "fflushNULL='define'"
5687 $ WC "fflushall='undef'"
5688 $ WC "fpostype='fpos_t'"
5689 $ WC "freetype='void'"
5690 $ WC "full_ar='" + "'"
5691 $ WC "full_csh='" + " '"
5692 $ WC "full_sed='_NLA0:'"
5693 $ WC "gccversion='" + gccversion + "'"
5694 $ WC "gidformat='lu'"
5697 $ WC "gidtype='" + gidtype + "'"
5698 $ WC "groupstype='Gid_t'"
5700 $ WC "hintfile='" + "'"
5701 $ WC "i16size='" + i16size + "'"
5702 $ WC "i16type='" + i16type + "'"
5703 $ WC "i32size='" + i32size + "'"
5704 $ WC "i32type='" + i32type + "'"
5705 $ WC "i64size='" + i64size + "'"
5706 $ WC "i64type='" + i64type + "'"
5707 $ WC "i8size='" + i8size + "'"
5708 $ WC "i8type='" + i8type + "'"
5709 $ WC "i_arpainet='undef'"
5710 $ WC "i_crypt='undef'"
5712 $ WC "i_dbm='undef'"
5713 $ WC "i_dirent='" + i_dirent + "'"
5714 $ WC "i_dlfcn='undef'"
5715 $ WC "i_fcntl='" + i_fcntl + "'"
5716 $ WC "i_float='define'"
5718 $ WC "i_fp_class='undef'"
5719 $ WC "i_grp='undef'"
5720 $ WC "i_ieeefp='undef'"
5721 $ WC "i_inttypes='" + i_inttypes + "'"
5722 $ WC "i_langinfo='" + i_langinfo + "'"
5723 $ WC "i_libutil='" + i_libutil + "'"
5724 $ WC "i_limits='define'"
5725 $ WC "i_locale='" + i_locale + "'"
5726 $ WC "i_machcthr='undef'"
5727 $ WC "i_machcthreads='undef'"
5728 $ WC "i_math='define'"
5729 $ WC "i_memory='undef'"
5730 $ WC "i_mntent='undef'"
5731 $ WC "i_ndbm='undef'"
5732 $ WC "i_netdb='" + i_netdb + "'"
5733 $ WC "i_neterrno='define'"
5734 $ WC "i_netinettcp='" + i_netinettcp + "'"
5735 $ WC "i_niin='" + i_niin + "'"
5736 $ WC "i_poll='" + i_poll + "'"
5737 $ WC "i_prot='undef'"
5738 $ WC "i_pthread='define'"
5739 $ WC "i_pwd='undef'"
5740 $ WC "i_rpcsvcdbm='undef'"
5741 $ WC "i_sfio='undef'"
5742 $ WC "i_sgtty='undef'"
5743 $ WC "i_shadow='" + i_shadow + "'"
5744 $ WC "i_socks='" + i_socks + "'"
5745 $ WC "i_stdarg='define'"
5746 $ WC "i_stddef='define'"
5747 $ WC "i_stdlib='define'"
5748 $ WC "i_string='define'"
5749 $ WC "i_sunmath='undef'"
5750 $ WC "i_sysaccess='" + i_sysaccess + "'"
5751 $ WC "i_sysdir='undef'"
5752 $ WC "i_sysfile='" + i_sysfile + "'"
5753 $ WC "i_sysioctl='" + i_sysioctl + "'"
5754 $ WC "i_syslog='" + i_syslog + "'"
5755 $ WC "i_sysmman='undef'"
5756 $ WC "i_sysmode='" + i_sysmode + "'"
5757 $ WC "i_sysmount='undef'"
5758 $ WC "i_sysndir='undef'"
5759 $ WC "i_sysparam='undef'"
5760 $ WC "i_sysresrc='undef'"
5761 $ WC "i_syssecrt='" + i_syssecrt + "'"
5762 $ WC "i_sysselct='undef'"
5763 $ WC "i_syssockio='undef'"
5764 $ WC "i_sysstat='define'"
5765 $ WC "i_sysstatfs='undef'"
5766 $ WC "i_sysstatvfs='undef'"
5767 $ WC "i_systime='undef'"
5768 $ WC "i_systimek='undef'"
5769 $ WC "i_systimes='undef'"
5770 $ WC "i_systypes='define'"
5771 $ WC "i_sysuio='" + i_sysuio + "'"
5772 $ WC "i_sysun='undef'"
5773 $ WC "i_sysutsname='" + i_sysutsname + "'"
5774 $ WC "i_sysvfs='undef'"
5775 $ WC "i_syswait='undef'"
5776 $ WC "i_termio='undef'"
5777 $ WC "i_termios='undef'"
5778 $ WC "i_time='define'"
5779 $ WC "i_unistd='" + i_unistd + "'"
5780 $ WC "i_ustat='undef'"
5781 $ WC "i_utime='undef'"
5782 $ WC "i_values='undef'"
5783 $ WC "i_varargs='undef'"
5784 $ WC "i_vfork='undef'"
5785 $ WC "inc_version_list='0'"
5786 $ WC "inc_version_list_init='0'"
5787 $ WC "installarchlib='" + installarchlib + "'"
5788 $ WC "installbin='" + installbin + "'"
5789 $ WC "installman1dir='" + installman1dir + "'"
5790 $ WC "installman3dir='" + installman3dir + "'"
5791 $ WC "installprefix='" + vms_prefix + "'"
5792 $ WC "installprefixexp='" + vms_prefix + ":'"
5793 $ WC "installprivlib='" + installprivlib + "'"
5794 $ WC "installscript='" + installscript + "'"
5795 $ WC "installsitearch='" + installsitearch + "'"
5796 $ WC "installsitebin='" + sitebin + "'"
5797 $ WC "installsitelib='" + installsitelib + "'"
5798 $ WC "installusrbinperl='undef'"
5799 $ WC "intsize='" + intsize + "'"
5800 $ WC "ivdformat='" + ivdformat + "'"
5801 $ WC "ivsize='" + ivsize + "'"
5802 $ WC "ivtype='" + ivtype + "'"
5804 $! The known_extensions symbol may be quite long
5806 $ tmp = "known_extensions='" + known_extensions + "'"
5809 $ WC "ld='" + ld + "'"
5810 $ WC "lddlflags='/Share'"
5811 $ WC "ldflags='" + ldflags + "'"
5812 $ WC "lib_ext='" + lib_ext + "'"
5813 $ WC "libc='" + libc + "'"
5814 $ WC "libpth='/sys$share /sys$library'"
5815 $ WC "libs='" + libs + "'"
5816 $ WC "longdblsize='" + longdblsize + "'"
5817 $ WC "longlongsize='" + longlongsize + "'"
5818 $ WC "longsize='" + longsize + "'"
5819 $ WC "lseeksize='4'"
5820 $ WC "lseektype='int'"
5822 $ WC "make='" + make + "'"
5823 $ WC "malloctype='void *'"
5824 $ WC "usemallocwrap='" + usemallocwrap + "'"
5825 $ WC "man1ext='rno'"
5826 $ WC "man3ext='rno'"
5827 $ WC "mmaptype='void *'"
5828 $ WC "modetype='unsigned int'"
5829 $ WC "multiarch='undef'"
5830 $ WC "mydomain='" + mydomain + "'"
5831 $ WC "myhostname='" + myhostname + "'"
5832 $ WC "myuname='" + myuname + "'"
5833 $ WC "need_va_copy='undef'"
5834 $ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
5835 $ WC "netdb_host_type='" + netdb_host_type + "'"
5836 $ WC "netdb_name_type='" + netdb_name_type + "'"
5837 $ WC "netdb_net_type='" + netdb_net_type + "'"
5838 $ WC "nveformat='" + nveformat + "'"
5839 $ WC "nvfformat='" + nvfformat + "'"
5840 $ WC "nvgformat='" + nvgformat + "'"
5841 $ WC "nvsize='" + nvsize + "'"
5842 $ WC "nvtype='" + nvtype + "'"
5843 $ WC "o_nonblock=' '"
5844 $ WC "obj_ext='" + obj_ext + "'"
5845 $ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
5846 $ WC "oldarchlib='" + oldarchlib + "'"
5847 $ WC "oldarchlibexp='" + oldarchlibexp + "'"
5848 $ WC "optimize='" + optimize + "'"
5849 $ WC "osname='" + osname + "'"
5850 $ WC "osvers='" + osvers + "'"
5851 $ WC "otherlibdirs='" + "'"
5852 $ WC "package='" + package + "'"
5853 $ WC "pager='" + pager + "'"
5854 $ WC "patchlevel='" + patchlevel + "'"
5856 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
5857 $ WC "perladmin='" + perladmin + "'"
5858 $ WC "perllibs='" + perllibs + "'"
5859 $ WC "perlpath='" + "''vms_prefix':[000000]Perl''exe_ext'" + "'"
5860 $ WC "perl_symbol='" + perl_symbol + "'" ! VMS specific
5861 $ WC "perl_verb='" + perl_verb + "'" ! VMS specific
5862 $ WC "pgflquota='" + pgflquota + "'"
5863 $ WC "pidtype='" + pidtype + "'"
5864 $ WC "prefix='" + vms_prefix + "'"
5865 $ WC "prefixexp='" + vms_prefix + ":'"
5866 $ WC "privlib='" + privlib + "'"
5867 $ WC "privlibexp='" + privlibexp + "'"
5868 $ WC "procselfexe=' '"
5869 $ WC "prototype='define'"
5870 $ WC "ptrsize='" + ptrsize + "'"
5871 $ WC "quadkind='" + quadkind + "'"
5872 $ WC "quadtype='" + quadtype + "'"
5873 $ WC "randbits='31'"
5874 $ WC "randseedtype='" + randseedtype + "'"
5875 $ WC "ranlib='" + "'"
5876 $ WC "rd_nodata=' '"
5877 $ WC "revision='" + revision + "'"
5878 $ WC "sPRId64='" + sPRId64 + "'"
5879 $ WC "sPRIEldbl='" + sPRIEUldbl + "'"
5880 $ WC "sPRIFldbl='" + sPRIFUldbl + "'"
5881 $ WC "sPRIGldbl='" + sPRIGUldbl + "'"
5882 $ WC "sPRIX64='" + sPRIXU64 + "'"
5883 $ WC "sPRIeldbl='" + sPRIeldbl + "'"
5884 $ WC "sPRIfldbl='" + sPRIfldbl + "'"
5885 $ WC "sPRIgldbl='" + sPRIgldbl + "'"
5886 $! WC "sPRIi64='" + sPRIi64 + "'"
5887 $ WC "sPRIo64='" + sPRIo64 + "'"
5888 $ WC "sPRIu64='" + sPRIu64 + "'"
5889 $ WC "sPRIx64='" + sPRIx64 + "'"
5890 $ WC "sSCNfldbl='" + sSCNfldbl + "'"
5891 $ WC "sched_yield='" + sched_yield + "'"
5892 $ WC "scriptdir='" + scriptdir + "'"
5893 $ WC "scriptdirexp='" + scriptdir + "'" ! use scriptdir for now
5894 $ WC "seedfunc='" + seedfunc + "'"
5895 $ WC "selectminbits='32'"
5896 $ WC "selecttype='" + selecttype + "'"
5898 $ WC "shmattype='" + " '"
5899 $ WC "shortsize='" + shortsize + "'"
5900 $ WC "shrplib='define'"
5901 $ WC "sig_name='" + sig_name + "'"
5902 $ tmp = "sig_name_init='" + sig_name_init + "'"
5905 $ WC "sig_num='" + sig_num + "'"
5906 $ WC "sig_num_init='" + sig_num_init + "'"
5907 $ WC "sig_size='" + sig_size + "'"
5908 $ WC "signal_t='" + signal_t + "'"
5909 $ WC "sitearch='" + sitearch + "'"
5910 $ WC "sitearchexp='" + sitearchexp + "'"
5911 $ WC "sitebin='" + sitebin + "'"
5912 $ WC "sitebinexp='" + sitebin + "'"
5913 $ WC "sitelib='" + sitelib + "'"
5914 $ WC "sitelib_stem='" + sitelib_stem + "'"
5915 $ WC "sitelibexp='" + sitelibexp + "'"
5916 $ WC "siteprefix='" + vms_prefix + "'"
5917 $ WC "siteprefixexp='" + vms_prefix + ":'"
5918 $ WC "sizesize='" + sizesize + "'"
5919 $ WC "sizetype='size_t'"
5920 $ WC "so='" + so + "'"
5921 $ WC "socksizetype='" + socksizetype + "'"
5922 $ WC "spitshell='write sys$output '"
5923 $ WC "src='" + src + "'"
5924 $ WC "ssizetype='int'"
5925 $ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
5926 $ WC "static_ext='" + static_ext + "'"
5927 $ WC "stdchar='" + stdchar + "'"
5928 $ WC "stdio_base='((*fp)->_base)'"
5929 $ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
5930 $ WC "stdio_cnt='((*fp)->_cnt)'"
5931 $ WC "stdio_ptr='((*fp)->_ptr)'"
5932 $ WC "stdio_stream_array=' " + "'"
5933 $ WC "subversion='" + subversion + "'"
5934 $ WC "timetype='" + timetype + "'"
5935 $ WC "u16size='" + u16size + "'"
5936 $ WC "u16type='" + u16type + "'"
5937 $ WC "u32size='" + u32size + "'"
5938 $ WC "u32type='" + u32type + "'"
5939 $ WC "u64size='" + u64size + "'"
5940 $ WC "u64type='" + u64type + "'"
5941 $ WC "u8size='" + u8size + "'"
5942 $ WC "u8type='" + u8type + "'"
5943 $ WC "uidformat='lu'"
5946 $ WC "uidtype='" + uidtype + "'"
5947 $ WC "uquadtype='" + uquadtype + "'"
5948 $ WC "use5005threads='" + use5005threads + "'"
5949 $ WC "use64bitall='" + use64bitall + "'"
5950 $ WC "use64bitint='" + use64bitint + "'"
5951 $ WC "usecasesensitive='" + be_case_sensitive + "'" ! VMS-specific
5952 $ WC "usedebugging_perl='"+use_debugging_perl+"'"
5953 $ WC "usedefaulttypes='" + usedefaulttypes + "'" ! VMS-specific
5954 $ WC "usecrosscompile='undef'"
5955 $ WC "usedl='" + usedl + "'"
5956 $ WC "usefaststdio='" + usefaststdio + "'"
5957 $ WC "useieee='" + useieee + "'" ! VMS-specific
5958 $ WC "useithreads='" + useithreads + "'"
5959 $ WC "uselargefiles='" + uselargefiles + "'"
5960 $ WC "uselongdouble='" + uselongdouble + "'"
5961 $ WC "usemorebits='" + usemorebits + "'"
5962 $ WC "usemultiplicity='" + usemultiplicity + "'"
5963 $ WC "usemymalloc='" + usemymalloc + "'"
5964 $ WC "useperlio='" + useperlio + "'"
5965 $ WC "useposix='false'"
5966 $ WC "usereentrant='undef'"
5967 $ WC "usesecurelog='" + usesecurelog + "'" ! VMS-specific
5968 $ WC "usesocks='undef'"
5969 $ WC "usethreads='" + usethreads + "'"
5970 $ WC "usevendorprefix='" + "'" ! try to say no, though we'll be ignored as of MM 5.90_01
5971 $ WC "usevfork='true'"
5972 $ WC "usevmsdebug='" + usevmsdebug + "'" ! VMS-specific
5973 $ WC "uvoformat='" + uvoformat + "'"
5974 $ WC "uvsize='" + uvsize + "'"
5975 $ WC "uvtype='" + uvtype + "'"
5976 $ WC "uvuformat='" + uvuformat + "'"
5977 $ WC "uvxformat='" + uvxformat + "'"
5978 $ WC "uvXUformat='" + uvXUformat + "'"
5979 $ WC "vendorarch='" + "'"
5980 $ WC "vendorarchexp='" + "'"
5981 $ WC "vendorbin='" + "'"
5982 $ WC "vendorbinexp='" + "'"
5983 $ WC "vendorlib_stem='" + "'"
5984 $ WC "vendorlib='" + "'"
5985 $ WC "vendorlibexp='" + "'"
5986 $ WC "vendorprefix='" + "'"
5987 $ WC "vendorprefixexp='" + "'"
5988 $ WC "version='" + version + "'"
5989 $ WC "version_patchlevel_string='" + version_patchlevel_string + "'"
5990 $ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific
5991 $ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific
5992 $ WC "vms_ver='" + vms_ver + "'" ! VMS specific
5993 $ WC "voidflags='15'"
5995 $! ## The UNIXy POSIXy reentrantey thingys ##
5996 $! See "Appendix B, Version-Dependency Tables" in the C RTL
5997 $! manual for when assorted _r functions became available.
5999 $ IF use_threads .AND. vms_ver .GES. "7.2"
6001 $ WC "asctime_r_proto='REENTRANT_PROTO_B_SB'"
6002 $ WC "d_asctime_r='define'"
6003 $ WC "ctime_r_proto='REENTRANT_PROTO_B_SB'"
6004 $ WC "d_ctime_r='define'"
6006 $ WC "asctime_r_proto='0'"
6007 $ WC "d_asctime_r='undef'"
6008 $ WC "ctime_r_proto='0'"
6009 $ WC "d_ctime_r='undef'"
6011 $ WC "d_crypt_r='undef'"
6012 $ WC "d_ctermid_r='undef'"
6013 $ WC "d_drand48_r='undef'"
6014 $ WC "d_endgrent_r='undef'"
6015 $ WC "d_endhostent_r='undef'"
6016 $ WC "d_endnetent_r='undef'"
6017 $ WC "d_endprotoent_r='undef'"
6018 $ WC "d_endpwent_r='undef'"
6019 $ WC "d_endservent_r='undef'"
6020 $ WC "d_getgrent_r='undef'"
6021 $ WC "d_getgrgid_r='undef'"
6022 $ WC "d_getgrnam_r='undef'"
6023 $ WC "d_gethostbyaddr_r='undef'"
6024 $ WC "d_gethostbyname_r='undef'"
6025 $ WC "d_gethostent_r='undef'"
6026 $ WC "d_getlogin_r='undef'"
6027 $ WC "d_getnetbyaddr_r='undef'"
6028 $ WC "d_getnetbyname_r='undef'"
6029 $ WC "d_getnetent_r='undef'"
6030 $ WC "d_getprotobyname_r='undef'"
6031 $ WC "d_getprotobynumber_r='undef'"
6032 $ WC "d_getprotoent_r='undef'"
6033 $ WC "d_getpwent_r='undef'"
6034 $ WC "d_getpwnam_r='undef'"
6035 $ WC "d_getpwuid_r='undef'"
6036 $ WC "d_getservbyname_r='undef'"
6037 $ WC "d_getservbyport_r='undef'"
6038 $ WC "d_getservent_r='undef'"
6039 $ WC "d_getspnam_r='undef'"
6040 $ WC "d_gmtime_r='undef'" ! leave undef'd; we use my_gmtime
6041 $ WC "d_localtime_r='undef'" ! leave undef'd; we use my_localtime
6042 $ WC "d_random_r='undef'"
6043 $ WC "d_readdir_r='define'" ! always defined; we roll our own
6044 $ WC "d_readdir64_r='undef'"
6045 $ WC "d_setgrent_r='undef'"
6046 $ WC "d_sethostent_r='undef'"
6047 $ WC "d_setlocale_r='undef'"
6048 $ WC "d_setnetent_r='undef'"
6049 $ WC "d_setprotoent_r='undef'"
6050 $ WC "d_setpwent_r='undef'"
6051 $ WC "d_setservent_r='undef'"
6052 $ WC "d_srand48_r='undef'"
6053 $ WC "d_srandom_r='undef'"
6054 $ WC "d_strerror_r='undef'"
6055 $ WC "d_tmpnam_r='undef'"
6056 $ WC "d_ttyname_r='undef'"
6057 $ WC "ctermid_r_proto='0'"
6058 $ WC "crypt_r_proto='0'"
6059 $ WC "drand48_r_proto='0'"
6060 $ WC "endgrent_r_proto='0'"
6061 $ WC "endhostent_r_proto='0'"
6062 $ WC "endnetent_r_proto='0'"
6063 $ WC "endprotoent_r_proto='0'"
6064 $ WC "endpwent_r_proto='0'"
6065 $ WC "endservent_r_proto='0'"
6066 $ WC "getgrent_r_proto='0'"
6067 $ WC "getgrgid_r_proto='0'"
6068 $ WC "getgrnam_r_proto='0'"
6069 $ WC "gethostbyaddr_r_proto='0'"
6070 $ WC "gethostbyname_r_proto='0'"
6071 $ WC "gethostent_r_proto='0'"
6072 $ WC "getlogin_r_proto='0'"
6073 $ WC "getnetbyaddr_r_proto='0'"
6074 $ WC "getnetbyname_r_proto='0'"
6075 $ WC "getnetent_r_proto='0'"
6076 $ WC "getprotobyname_r_proto='0'"
6077 $ WC "getprotobynumber_r_proto='0'"
6078 $ WC "getprotoent_r_proto='0'"
6079 $ WC "getpwent_r_proto='0'"
6080 $ WC "getpwnam_r_proto='0'"
6081 $ WC "getpwuid_r_proto='0'"
6082 $ WC "getservbyname_r_proto='0'"
6083 $ WC "getservbyport_r_proto='0'"
6084 $ WC "getservent_r_proto='0'"
6085 $ WC "getspnam_r_proto='0'"
6086 $ WC "gmtime_r_proto='0'"
6087 $ WC "localtime_r_proto='0'"
6088 $ WC "random_r_proto='0'"
6089 $ WC "readdir_r_proto='REENTRANT_PROTO_I_TSR'" ! always defined; we roll our own
6090 $ WC "readdir64_r_proto='0'"
6091 $ WC "setgrent_r_proto='0'"
6092 $ WC "sethostent_r_proto='0'"
6093 $ WC "setlocale_r_proto='0'"
6094 $ WC "setnetent_r_proto='0'"
6095 $ WC "setprotoent_r_proto='0'"
6096 $ WC "setpwent_r_proto='0'"
6097 $ WC "setservent_r_proto='0'"
6098 $ WC "srand48_r_proto='0'"
6099 $ WC "srandom_r_proto='0'"
6100 $ WC "strerror_r_proto='0'"
6101 $ WC "tmpnam_r_proto='0'"
6102 $ WC "ttyname_r_proto='0'"
6104 $! ##END WRITE NEW CONSTANTS HERE##
6108 $! Okay, we've gotten here. Build munchconfig.exe
6109 $ COPY/NOLOG [-.vms]munchconfig.c []
6110 $ COPY/NOLOG [-.vms]'Makefile_SH' []
6111 $ 'Perl_CC' munchconfig.c
6114 $ OPEN/WRITE CONFIG []munchconfig.opt
6115 $ IF ccname .EQS. "GCC"
6117 $ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library"
6119 $ WRITE CONFIG "Sys$Share:VAXCRTL/Share"
6121 $ 'ld' munchconfig.obj,munchconfig.opt/opt
6122 $ DELETE/NOLOG/NOCONFIRM munchconfig.opt;
6124 $ 'ld' munchconfig.obj
6126 $ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj;
6127 $ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
6128 $ IF ccname .EQS. "CXX"
6130 $ CALL Cxx_demangler_cleanup
6133 $ IF alldone .EQS. ""
6138 If you'd like to make any changes to the config.sh file before I begin
6139 to configure things, answer yes to the following question.
6143 $ rp="Do you wish to edit ''basename_config_sh'? [''bool_dflt'] "
6148 $ echo4 "Be sure to type LOGOUT after you have edited the file,"
6149 $ echo4 "then this procedure will resume."
6151 $ default = F$ENVIRONMENT("DEFAULT")
6152 $ DIRECTORY 'config_sh'
6155 $ SET DEFAULT 'default'
6160 $ echo4 "Adding ''osname' specific preprocessor commands."
6162 $ ! we need an fdl file
6163 $ CREATE [-]CONFIG.FDL
6168 $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
6169 $ ! First spit out the header info with the local defines (to get
6170 $ ! around the 255 character command line limit)
6171 $ OPEN/APPEND CONFIG [-]config.local
6172 $ IF use_debugging_perl THEN WC "#define DEBUGGING"
6173 $ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
6174 $ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
6175 $ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
6176 $ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
6177 $ IF ccname .EQS. "GCC" THEN WC "#define GNUC_ATTRIBUTE_CHECK"
6178 $ IF (Has_Dec_C_Sockets)
6180 $ WC "#define VMS_DO_SOCKETS"
6181 $ WC "#define DECCRTL_SOCKETS"
6183 $ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS"
6185 $! This is VMS-specific for now
6186 $ WC "#''d_setenv' HAS_SETENV"
6187 $ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
6188 $ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
6189 $ IF use64bitint .OR. use64bitint .EQS. "define"
6191 $ WC "#define USE_64_BIT_INT"
6192 $ WC "#define USE_LONG_DOUBLE"
6194 $ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
6195 WC "#define USE_64_BIT_ALL"
6196 $ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
6197 $ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
6198 $ WC "#define HAS_ENVGETENV"
6199 $ WC "#define PERL_EXTERNAL_GLOB"
6200 $ IF archname .EQS. "VMS_VAX" .AND. -
6201 ccname .EQS. "DEC" .AND. -
6202 ccversion .LE. 50390006
6204 $! Alas this does not help to build Fcntl
6205 $! WC "#define PERL_IGNORE_FPUSIG SIGFPE"
6207 $ IF kill_by_sigprc .EQS. "define" then WC "#define KILL_BY_SIGPRC"
6208 $ IF unlink_all_versions .OR. unlink_all_versions .EQS. "define" THEN -
6209 WC "#define UNLINK_ALL_VERSIONS"
6212 $ echo4 "Doing variable substitutions on .SH files..."
6213 $ echo4 "Extracting config.h (with variable substitutions)"
6215 $! Now build the normal config.h
6216 $ DEFINE/USER_MODE sys$output [-]config.main
6217 $ mcr []munchconfig 'config_sh' [-]config_h.sh
6218 $ ! Concatenate them together
6219 $ copy [-]config.local,[-]config.main [-]config.h
6221 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.MAIN;*
6222 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.LOCAL;*
6223 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;*
6225 $ IF ccname .EQS. "DEC"
6227 $ DECC_REPLACE = "DECC=decc=1"
6229 $ DECC_REPLACE = "DECC="
6231 $ IF ccname .EQS. "CXX"
6233 $ DECCXX_REPLACE = "DECCXX=DECCXX=1"
6235 $ DECCXX_REPLACE = "DECCXX="
6237 $ IF ccname .EQS. "GCC"
6239 $ GNUC_REPLACE = "GNUC=gnuc=1"
6241 $ GNUC_REPLACE = "GNUC="
6243 $ IF Has_Dec_C_Sockets
6245 $ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
6249 $ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
6251 $ SOCKET_REPLACE = "SOCKET="
6256 $ IF (vms_ver .LES. "6.2")
6258 $ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
6260 $ THREAD_REPLACE = "THREAD=THREADED=1"
6263 $ THREAD_REPLACE = "THREAD="
6267 $ MALLOC_REPLACE = "MALLOC=MALLOC=1"
6269 $ MALLOC_REPLACE = "MALLOC="
6271 $ echo4 "Extracting ''defmakefile' (with variable substitutions)"
6272 $ DEFINE/USER_MODE sys$output 'UUmakefile'
6273 $ mcr []munchconfig 'config_sh' 'Makefile_SH' "''DECC_REPLACE'" -
6274 "''DECCXX_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" -
6275 "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" -
6276 "''Thread_Live_Dangerously'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'"
6277 $! Clean up after ourselves
6278 $ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
6280 $ echo4 "Extracting make_ext.com (without variable substitutions)"
6281 $ Create Sys$Disk:[-]make_ext.com
6282 $ Deck/Dollar="$EndOfTpl$"
6284 $! NOTE: This file is extracted as part of the VMS configuration process.
6285 $! Any changes made to it directly will be lost. If you need to make any
6286 $! changes, please edit the template in Configure.Com instead.
6287 $ def = F$Environment("Default")
6288 $! p1 - how to invoke miniperl (passed in from descrip.mms)
6289 $ p1 = F$Edit(p1,"Upcase,Compress,Trim")
6290 $ If F$Locate("MCR ",p1).eq.0 Then p1 = F$Extract(3,255,p1)
6291 $ miniperl = "$" + F$Search(F$Parse(p1,".Exe"))
6292 $! p2 - how to invoke local make utility (passed in from descrip.mms)
6294 $ if f$type('p2') .nes. "" then makeutil = 'p2'
6295 $! p3 - make target (passed in from descrip.mms)
6296 $ targ = F$Edit(p3,"Lowercase")
6299 $ open/read CONFIG config.sh
6301 $ read/end=end_ext_loop CONFIG line
6302 $ if (f$extract(0,12,line) .NES. "extensions='")
6303 $ then goto find_ext_loop
6304 $ else extensions = f$extract(12,f$length(line),line) - "'"
6308 $ extensions = f$edit(extensions,"TRIM,COMPRESS")
6311 $ ext = f$element(i," ",extensions)
6312 $ If ext .eqs. " " .or. ext .eqs. "" Then Goto done
6313 $ Define/User_mode Perl_Env_Tables CLISYM_LOCAL
6316 ($extdir = $ENV{'ext'}) =~ s/::/./g;
6318 if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
6319 else { $extdir = ".ext.$extdir"; }
6320 ($ENV{'extdir'} = "[$extdir]");
6321 ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
6323 $ Set Default &extdir
6325 $ If F$Locate("clean",targ) .eqs. F$Length(targ)
6327 $ Write Sys$Output ""
6328 $ Write Sys$Output " Making ''ext' (dynamic)"
6329 $ On Error Then Goto done
6330 $ If F$Search("Descrip.MMS") .eqs. ""
6334 $ If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. -
6335 F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1
6338 $ Write Sys$Output "''targ'ing ''ext' . . ."
6339 $ On Error Then Continue
6342 miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]" "PERL_CORE=1"
6354 $! Note that the /key qualifier to search, as in:
6355 $! search README.* "=head"/key=(position=1)/window=0/output=extra.pods
6356 $! is not supported on VMS V5.5-2, hence not used in extra_pods.com.
6358 $ echo4 "Extracting extra_pods.com (without variable substitutions)"
6359 $ Create Sys$Disk:[-]extra_pods.com
6360 $ Deck/Dollar="$EOExtra_Pods$"
6362 $! NOTE: This file is extracted as part of the VMS configuration process.
6363 $! Any changes made to it directly will be lost. If you need to make any
6364 $! changes, please edit the template in Configure.Com instead.
6365 $! Use FORCE if you've just podified a README.* file on VMS.
6366 $ if f$search("extra.pods") .eqs. "" .or. P1 .eqs. "FORCE" then -
6367 search README.* "=head"/window=0/output=extra.pods
6368 $ open/read/error=extra_close EXTRA extra.pods
6370 $ read/error=extra_close/END_OF_FILE=extra_close EXTRA file
6371 $ file_type = f$edit(f$parse(file,,,"TYPE",),"LOWERCASE") - "."
6372 $ if file_type .nes. "VMS" .and. file_type .nes. "vms"
6374 $ pod_file = "[.pod]perl''file_type'.pod"
6375 $ file = file - "''f$parse(file,,,"VERSION",)'"
6376 $ if p1 .eqs. "CLEAN"
6377 $ then if f$search(pod_file) .nes. "" then delete/log 'pod_file';*
6380 $ if f$search(pod_file) .eqs. ""
6381 $ then do_copy := true
6383 $ file_rdt = f$cvtime(f$file_attributes(file,"RDT"))
6384 $ pod_file_rdt = f$cvtime(f$file_attributes(pod_file,"RDT"))
6385 $ if file_rdt .GTS. pod_file_rdt then do_copy := true
6387 $ ! wacky method to preserve case on ODS-5 even when parse style is traditional
6388 $ if do_copy then mcr sys$disk:[]miniperl.exe -e "exit 0+$^E unless File::Copy::rmscopy(q{''file'}, q{''pod_file'});"
6394 $ if p1 .eqs. "CLEAN" .and. f$search("extra.pods;-1") .nes. "" then -
6395 purge/nolog extra.pods
6399 $! Warn of dangerous symbols or logical names
6401 $Bad_environment: SUBROUTINE
6403 $ IF p2 .eqs. "SYMBOL"
6405 $ IF f$type('p1') .nes. "" THEN Bad_env := SYMBOL
6407 $ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
6409 $ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
6411 $ IF f$search("config.msg") .nes. ""
6413 $ OPEN/APPEND CONFIG config.msg
6415 $ OPEN/WRITE CONFIG config.msg
6417 $ IF Bad_env .eqs. "SYMBOL"
6420 $ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
6421 $ WRITE CONFIG " delete before building ''package' via:"
6422 $ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
6423 $ IF f$locate("""",&p1) .ge. f$length(&p1)
6425 $ WRITE CONFIG " after building, testing, and installing ''package'"
6426 $ WRITE CONFIG " restore the symbol with:"
6427 $ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
6430 $ IF Bad_env .eqs. "LOGICAL"
6433 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
6434 $ WRITE CONFIG " deassign before building ''package'"
6440 $ ENDSUBROUTINE ! Bad_environment
6442 $ echo4 "Checking for dangerous pre-existing global symbols and logical names."
6443 $ CALL Bad_environment "COMP"
6444 $ CALL Bad_environment "EXT"
6445 $ CALL Bad_environment "FOO"
6446 $ CALL Bad_environment "LIB"
6447 $ CALL Bad_environment "LIST"
6448 $ CALL Bad_environment "MIME"
6449 $ CALL Bad_environment "POSIX"
6450 $ CALL Bad_environment "SYS"
6451 $ CALL Bad_environment "T"
6452 $ CALL Bad_environment "THREAD"
6453 $ CALL Bad_environment "THREADS"
6454 $ CALL Bad_environment "TIME"
6455 $ CALL Bad_environment "TMP"
6456 $ CALL Bad_environment "UNICODE"
6457 $ CALL Bad_environment "UTIL"
6458 $ CALL Bad_environment "TEST" "SYMBOL"
6459 $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
6461 $! %Config-I-VMS, write perl_setup.com here
6463 $ IF (.NOT.perl_symbol)
6465 $ file_2_find = "[-]''packageup'.cld"
6467 $ echo4 "The perl.cld file is now being written..."
6468 $ OPEN/WRITE CONFIG 'file_2_find'
6470 $ IF (sharedperl .AND. F$EXTRACT(0,7,archname) .EQS. "VMS_AXP") THEN ext := .AXE
6471 $ IF (sharedperl .AND. F$EXTRACT(0,8,archname) .EQS. "VMS_IA64") THEN ext := .IXE
6472 $ IF (use_vmsdebug_perl)
6474 $ WRITE CONFIG "define verb dbgperl"
6475 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
6476 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
6478 $ WRITE CONFIG "define verb perl"
6479 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
6480 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
6482 $ WRITE CONFIG "define verb perl"
6483 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
6484 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
6487 $ ENDIF ! (.NOT.perl_symbol)
6489 $ echo4 "The perl_setup.com file is now being written..."
6490 $ file_2_find = "[-]perl_setup.com"
6492 $! Folks are likely to want to edit perl_setup.com.
6493 $! STMLF RFM plays nicer with ported editors than does VFC.
6495 $ CREATE [-]CONFIG.FDL
6500 $ CREATE /FDL=[-]CONFIG.FDL 'file_2_find'
6501 $ OPEN/APPEND CONFIG 'file_2_find'
6502 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;
6504 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
6505 $ IF cf_email.NES.perladmin
6507 $ WRITE CONFIG "$! perl configured by ''cf_email'"
6509 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
6512 $ prefix = prefix - "000000."
6513 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN prefix = prefix - "]" + ".]"
6514 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'"
6515 $ WRITE CONFIG "$ ext = "".exe"""
6518 $ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 2 then ext = "".AXE"""
6519 $ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 3 then ext = "".IXE"""
6523 $ perl_setup_perl = "'" + "'perl'" ! triple quoted foreign command symbol
6524 $ IF (use_vmsdebug_perl)
6526 $ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgperl'ext'"
6527 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgperl'ext'"
6528 $ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
6530 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
6531 $ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
6533 $ ELSE ! .NOT.perl_symbol
6534 $ perl_setup_perl = "perl" ! command verb
6535 $ IF (use_vmsdebug_perl)
6537 $ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
6539 $ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
6541 $ IF perl_verb .EQS. "PROCESS"
6543 $ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
6545 $ ENDIF ! perl_symbol
6546 $ WRITE CONFIG "$ define/nolog pod2text ''vms_prefix':[lib.pod]pod2text.com"
6547 $ WRITE CONFIG "$ define/nolog pod2html ''vms_prefix':[lib.pod]pod2html.com"
6548 $ WRITE CONFIG "$ define/nolog pod2man ''vms_prefix':[lib.pod]pod2man.com"
6552 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
6553 $ ELSE !leave in but commented out (in case setting was from perl :-)
6554 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
6557 $ WRITE CONFIG "$! Symbols for commonly used programs:"
6559 $ WRITE CONFIG "$ c2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]c2ph.com"""
6560 $ WRITE CONFIG "$ cpan == """ + perl_setup_perl + " ''vms_prefix':[utils]cpan.com"""
6561 $ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
6563 $ WRITE CONFIG "$ dprofpp == """ + perl_setup_perl + " ''vms_prefix':[utils]dprofpp.com"""
6565 $ WRITE CONFIG "$ enc2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]enc2xs.com"""
6566 $ WRITE CONFIG "$ find2perl == """ + perl_setup_perl + " ''vms_prefix':[utils]find2perl.com"""
6567 $ WRITE CONFIG "$ h2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]h2ph.com"""
6568 $ WRITE CONFIG "$ h2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]h2xs.com"""
6569 $ WRITE CONFIG "$ instmodsh == """ + perl_setup_perl + " ''vms_prefix':[utils]instmodsh.com"""
6570 $ WRITE CONFIG "$ libnetcfg == """ + perl_setup_perl + " ''vms_prefix':[utils]libnetcfg.com"""
6571 $ WRITE CONFIG "$ perlbug == """ + perl_setup_perl + " ''vms_prefix':[lib]perlbug.com"""
6572 $ WRITE CONFIG "$!perlcc == """ + perl_setup_perl + " ''vms_prefix':[utils]perlcc.com"""
6573 $ WRITE CONFIG "$ perldoc == """ + perl_setup_perl + " ''vms_prefix':[lib.pod]perldoc.com -t"""
6574 $ WRITE CONFIG "$ perlivp == """ + perl_setup_perl + " ''vms_prefix':[utils]perlivp.com"""
6575 $ WRITE CONFIG "$ piconv == """ + perl_setup_perl + " ''vms_prefix':[utils]piconv.com"""
6576 $ WRITE CONFIG "$ pl2pm == """ + perl_setup_perl + " ''vms_prefix':[utils]pl2pm.com"""
6577 $ WRITE CONFIG "$ pod2html == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2html"""
6578 $ WRITE CONFIG "$ pod2latex == """ + perl_setup_perl + " ''vms_prefix':[lib.pod]pod2latex.com"""
6579 $ WRITE CONFIG "$ pod2text == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2text"""
6580 $ WRITE CONFIG "$!pod2man == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2man"""
6581 $ WRITE CONFIG "$ pod2usage == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2usage.com"""
6582 $ WRITE CONFIG "$ podchecker == """ + perl_setup_perl + " ''vms_prefix':[utils]podchecker.com"""
6583 $ WRITE CONFIG "$ podselect == """ + perl_setup_perl + " ''vms_prefix':[utils]podselect.com"""
6584 $ WRITE CONFIG "$ psed == """ + perl_setup_perl + " ''vms_prefix':[utils]psed.com"""
6585 $ WRITE CONFIG "$ pstruct == """ + perl_setup_perl + " ''vms_prefix':[utils]pstruct.com"""
6586 $ WRITE CONFIG "$ s2p == """ + perl_setup_perl + " ''vms_prefix':[utils]s2p.com"""
6587 $ WRITE CONFIG "$ splain == """ + perl_setup_perl + " ''vms_prefix':[utils]splain.com"""
6588 $ WRITE CONFIG "$ xsubpp == """ + perl_setup_perl + " ''vms_prefix':[utils]xsubpp.com"""
6592 $ echo "The file can be found at:"
6593 $ echo4 " ''F$SEARCH(file_2_find)'"
6594 $ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
6595 $ echo "when you are satisfied with a successful compilation,"
6596 $ echo "testing, and installation of your perl."
6598 $ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
6600 $ file_2_find = "[-]''packageup'_install.com"
6601 $ OPEN/WRITE CONFIG 'file_2_find'
6602 $ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
6603 $ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
6604 $ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
6607 $ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
6608 $ echo4 " @ ''F$SEARCH(file_2_find)'"
6609 $ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
6613 $!figure out where we "are" by parsing 'vms_default_directory_name'
6615 $ set_def_command = ""
6616 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
6617 $ tmp = vms_default_directory_name - dflt - "]"
6619 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
6621 $ tmp1 = F$ELEMENT(i,".",tmp)
6622 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
6624 $ THEN set_def_command = "set default [-"
6625 $ ELSE set_def_command = set_def_command + "-"
6629 $Beyond_set_def_loop:
6630 $ IF set_def_command.NES.""
6632 $ set_def_command = set_def_command - "-" + "]"
6634 $ echo4 "In order to build ''package' you must now issue the commands:"
6636 $ echo4 " ''set_def_command'"
6639 $ echo4 "In order to build ''package' you must now issue the command:"
6642 $ echo4 " ''make'''makefile'", macros
6645 $ IF ( F$SEARCH("config.msg").NES."" )
6647 $ echo4 "Hmm. I also noted the following information while running:"
6649 $ TYPE/OUTPUT=SYS$ERROR: config.msg
6650 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
6651 $ DELETE/NOLOG/NOCONFIRM config.msg;
6658 $ CLOSE/NOLOG STDOUT
6659 $ DEASSIGN SYS$OUTPUT
6661 $ CLOSE/NOLOG CONFIG
6662 $ IF F$GETJPI("","FILCNT").GT.vms_filcnt
6663 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
6665 $ dflt = F$ENVIRONMENT("DEFAULT")
6666 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
6668 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
6670 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
6671 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
6673 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
6675 $!: End of Configure