1 $ sav_ver = 'F$VERIFY(0)
4 $! For example, if you unpacked perl into: [USER.PERL-5n...] then you will
5 $! want to cd into the tree and execute Configure:
7 $! $ SET DEFAULT [USER.PERL5_xxx]
12 $! $ SET DEFAULT [USER.PERL5_xxx]
13 $! $ @Configure "-des"
15 $! That's it. If you get into a bind trying to build perl on VMS then
16 $! definitely read through the README.VMS file.
17 $! Beyond that send email to vmsperl@perl.org
19 $! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21 $! send suggestions to:
22 $! Dan Sugalski <dan@sidhe.org>
25 $! Adapted and converted from Larry Wall & Andy Dougherty's
26 $! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer
27 $! (a Bourne sh[ell] script for configuring the installation of perl
28 $! on non-VMS systems) in the perl5.002|3 epoch (spring/summer 1996)
29 $! with much valuable help from Charles Bailey &
30 $! the whole VMSPerl crew.
31 $! Extended and messed about with by Dan Sugalski
33 $ sav_ver = F$VERIFY(0)
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 $ use_vmsdebug_perl = "n"
50 $ C_Compiler_Replace = "CC="
51 $ Thread_Live_Dangerously = "MT="
52 $ use_two_pot_malloc = "N"
53 $ use_pack_malloc = "N"
54 $ use_debugmalloc = "N"
56 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
57 $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx]
58 $! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx]
60 $ vms_filcnt = F$GETJPI ("","FILCNT")
62 $!: compute my invocation name
63 $ me = F$ENVIRONMENT("PROCEDURE")
65 $! Many null statements (begin with colon ':') in the Bourne shell version of
66 $! this script serve as comments/placeholders. I have retained some of the ones
67 $! that will help you compare this .COM file to the sh version - as well as
68 $! leave placeholders for future improvements to this .COM file.
69 $! sfn = VMS "skipped for now"
71 $!: Proper PATH separator !sfn
72 $!: Proper PATH setting !sfn
73 $!: Sanity checks !sfn "Say '@''$me''"
74 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
75 $!: Configure runs within the UU subdirectory !->after find MANIFEST
76 $! <big long list of default values (mostly null)>
77 $!: We must find out about Eunice early !(?)
78 $!: list of known cpp symbols, sorted alphabetically !sfn
80 $!: default library list !sfn
81 $! <no hints files in use (yet?)>
82 $!: Extra object files, if any, needed on this platform. !sfn
83 $!: Possible local include directories to search. !sfn
84 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
85 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
86 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
87 $!: no include file wanted by default !sfn
89 $!: Possible local library directories to search. !sfn
90 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
91 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
92 $!: general looking path for locating libraries !sfn
93 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
94 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
95 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
96 $!: Private path used by Configure to find libraries. Its value !sfn
97 $!: is prepended to libpth. This variable takes care of special !sfn
98 $!: machines, like the mips. Usually, it should be empty. !sfn
100 $!: full support for void wanted by default !sfn
101 $!defvoidused=15 !sfn
102 $!: List of libraries we want. !sfn
103 $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
104 $!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
105 $!libswanted="$libswanted ucb bsd BSD PW x" !sfn
106 $!: We probably want to search /usr/shlib before most other libraries. !sfn
107 $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
108 $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
109 $!glibpth="/usr/shlib $glibpth" !sfn
110 $!: Do not use vfork unless overridden by a hint file. !sfn
111 $!usevfork=false !sfn
112 $!: script used to extract .SH files with variable substitutions !sfn
113 $!: produce awk script to parse command line options !sfn
114 $!sfn (assume no sed awk) see below
115 $!: process the command line options
117 $!: set up default values
121 $ IF F$TYPE(config_sh) .EQS. "" THEN config_sh=""
134 $ use_5005_threads = "N"
140 $ THEN !one or more switches was thrown
147 $ config_args = config_args + F$FAO(" !AS",P'i')
150 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
154 $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
155 $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
156 $Remove_quotation_mark:
158 $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
159 $ gotopt = "f" !"alse"
160 $ gotshortopt = "f" !"alse"
161 $ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
164 $ gotopt = "t" !"rue"
166 $ gotshortopt = "t" !"rue"
168 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
175 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f"
179 $ IF (F$SEARCH(config_sh).NES."")
181 $ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
182 $ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
185 $ CONTINUE !at this point check UIC && if test allows...
188 $ echo "''me': cannot read config file ''config_sh'."
192 $ echo "''me': cannot read config file ''config_sh'."
197 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h"
204 $ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m"
211 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r"
218 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s"
225 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E"
230 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K"
237 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O"
244 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S"
246 $ extractsh = "true" !VMS? Yes with munchconfig
251 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D"
254 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
256 $ tmp = P'i' + "=""define"""
260 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
262 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
263 $ echo "''me': use '-Usymbol=val' not '-Dsymbol='."
264 $ echo "''me': ignoring -D",P'i'
266 $ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')
267 $ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """"
274 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U"
277 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
279 $ tmp = P'i' + "="""""
283 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
285 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
286 $ echo "''me': use '-Dsymbol=val' not '-Usymbol=val'."
287 $ echo "''me': ignoring -U",P'i'
289 $ tmp = P'i' + "=""undef"""
296 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
298 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
299 $ echo "''me' generated by an unknown version of EDT."
305 $ echo "''me': unknown option ",P'i'
308 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
310 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
312 $ ENDIF ! (P1 .NES. "")
313 $ config_args = F$EDIT(config_args,"TRIM")
317 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
318 $ echo "Usage: @''me' [-dehmrEKOSV] [-fconfig.sh] [-Dsymbol] [-Dsymbol=value]"
319 $ echo " [-Usymbol] [-Usymbol=]"
321 "-d" : use defaults for all answers.
322 "-e" : go on without questioning past the production of config.sh. *
323 "-f" : specify an alternate default configuration file.
324 "-h" : print this help message and exit (with an error status).
325 "-m" : skip the MANIFEST check to see that all files are present
326 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
327 "-s" : silent mode, only echoes questions and essential information.
328 -"D" : define symbol to have some value: *
329 -"Dsymbol" symbol gets the value 'define'
330 -"Dsymbol=value" symbol gets the value 'value'
331 -E : stop at the end of questions, after having produced config.sh. *
332 -K : do not use unless you know what you are doing.
333 -O : let -D and -U override definitions from loaded configuration file. *
334 -S : perform variable substitutions on all .SH files (can mix with -f) *
335 -"U" : undefine symbol: *
336 -"Usymbol" symbol gets the value 'undef'
337 -"Usymbol=" symbol gets completely empty
338 -V : print version number and exit (with a zero status).
339 $ echo "%Config-I-VMS, lower case switches must be enclosed"
340 $ echo "-Config-I-VMS, in double quotation marks, e.g.:"
341 $ echo "-Config-I-VMS, @Configure ""-des"""
342 $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
343 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
345 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
351 $ IF F$Mode() .eqs. "BATCH"
353 $ STDOUT = F$GetQuI("DISPLAY_JOB","LOG_SPECIFICATION",,"THIS_JOB")
354 $ WRITE SYS$OUTPUT "Warning: Executing in batch mode. To avoid file locking conflicts,"
355 $ WRITE SYS$OUTPUT "output intended for SYS$OUTPUT will be sent to a new version"
356 $ WRITE SYS$OUTPUT STDOUT
358 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
360 $ DEFINE SYS$OUTPUT "_NLA0:"
361 $ echo4 = "write STDOUT "
362 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
363 $ open/write/share=read STDOUT 'STDOUT'
371 $ echo4 = "write SYS$OUTPUT "
375 $!: run the defines and the undefines, if any, but leave the file out there...
376 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
381 $ packageup = F$EDIT((package - "5"),"UPCASE")
383 $!: Eunice requires " " instead of "", can you believe it
386 $ echo "Beginning of configuration questions for ''package'."
389 $!: Some greps do not return status, grrr.
390 $ contains = "SEARCH"
392 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
393 $! echo "Checking ''echo' to see how to suppress newlines..."
394 $! echo "giving up..."
395 $! echo "The star should be here-->*"
397 $!: Now test for existence of everything in MANIFEST
399 $ echo4 "First let's make sure your kit is complete. Checking..."
402 $! Here I assume we are in the [foo.PERLxxx...] tree
403 $! because the search routine simply does set def [-] if necessary.
404 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
406 $ manifestfound = F$SEARCH(file_2_find)
407 $ IF (manifestfound .EQS. "")
409 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
412 $ GOTO Research_manifest
415 $ echo "There is no MANIFEST file. I hope your kit is complete !"
417 $ GOTO Beyond_manifest
420 $! MANIFEST. has been found and we have set def'ed there -
421 $! time to bail out before it's too late.
422 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
423 $ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
424 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".")
427 %Config-E-VMS, ERROR:
428 Sorry! It apears as though your perl build sub-directory is already too
429 deep into the VMS file system. Please try moving stuff into a shallower
430 directory (or altering the "max_allowed_dir_depth" parameter).
431 $ echo4 "ABORTING..."
432 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
434 $ EXIT !2 !$STATUS = "%X00000002" (error)
438 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
440 $ IF (manifestfound .NES. "")
442 $ IF ( F$SEARCH("UU.DIR").EQS."" )
444 $ CREATE/DIRECTORY [.UU]
446 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;*
448 $!: Configure runs within the UU subdirectory
451 $! a little redundancy never hurt anybody?
452 $ file_2_find = "[-]" + file_2_find
453 $ manifestfound = F$SEARCH(file_2_find)
455 $ OPEN/WRITE MISSING MISSING.
456 $!change to "FALSE" if you wish to skip the manifest search
457 $!(which after all is rather slow in DCL :-)
460 $ echo "Skipping MANIFEST check as requested"
463 $ OPEN/READ CONFIG 'manifestfound'
465 $ READ/END_OF_FILE = Done_manifest CONFIG line
466 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
467 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
468 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
469 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
470 $ line = F$EDIT(line,"TRIM, COMPRESS")
471 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
472 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
474 $Re_strip_line_manifest:
475 $ loca = F$LOCATE("/",file_2_find)
476 $ ante = F$EXTRACT(0,loca,file_2_find)
477 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
478 $ test_this = ante + "." + (post - "/")
479 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
481 $ file_2_find = ante + "." + (post - "/")
482 $ GOTO Re_strip_line_manifest
484 $ file_2_find = ante + "]" + (post - "/")
486 $ file_2_find = "[-."+file_2_find
488 $ file_2_find = "[-]" + file_2_find
491 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
492 $ file_2_find = file_2_find - dirname
495 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
496 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
498 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
499 $ ELSE basename = basename + dot_ele + "_"
504 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
505 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
506 basename = f$extract(0,f$length(basename)-1,basename)
507 $ file_2_find = dirname + basename
509 $ found = F$SEARCH(file_2_find)
510 $ IF (found .EQS. "" .AND. dots .GT. 2)
512 $! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
513 $! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
514 $! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
515 $ basename[f$locate(".",basename),1] := _
516 $ dot_ele = F$ELEMENT(dots - 1,"_",basename)
518 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
520 $ found = F$SEARCH(dirname + basename)
521 $ file_2_find = file_2_find + "," + basename
523 $ IF (found .EQS. "")
525 $ WRITE MISSING file_2_find
526 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
528 $ miss_list = miss_list + "," + file_2_find
531 $ GOTO Read_loop_manifest
536 $ ENDIF ! (manifestfound .NES. "")
538 $ IF (miss_list .NES. "")
540 $ echo "Some of the files not found include:"
543 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
547 THIS PACKAGE SEEMS TO BE INCOMPLETE.
549 You have the option of continuing the configuration process, despite the
550 distinct possibility that your kit is damaged, by typing 'y'es. If you
551 do, don't blame me if something goes wrong. I advise you to type 'n'o
552 and contact the author (dan@sidhe.org)
554 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
557 $ echo4 "Continuing..."
559 $ echo4 "ABORTING..."
563 $ echo4 "Looks good..."
564 $ DELETE/NOLOG MISSING.;
565 $ ENDIF ! (miss_list .NES. "")
566 $ ENDIF ! (manifestfound .EQS. "") ELSE
568 $! after finding MANIFEST (see above)
569 $!: Configure runs within the UU subdirectory
571 $!: compute the number of columns on the terminal for proper question formatting
572 $! (sfn, will assume 80-ish)
574 $!: set up the echo used in my read !sfn
575 $!: now set up to do reads with possible shell escape and default assignment !sfn
584 $ If (.NOT. silent) Then echo ""
585 $ READ SYS$COMMAND/PROMPT="''rp'" ans
586 $ IF (ans .EQS. "&-d")
588 $ echo4 "(OK, I will run with -d after this question.)"
589 $ IF (.NOT. silent) THEN echo ""
590 $ READ SYS$COMMAND/PROMPT="''rp'" ans
593 $ IF (ans .EQS. "&-s")
595 $ echo4 "(OK, I will run with -s after this question.)"
597 $ READ SYS$COMMAND/PROMPT="''rp'" ans
606 $!: create .config dir to save info across Configure sessions
607 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
609 $ CREATE/DIRECTORY [-.CONFIG]
610 $ OPEN/WRITE CONFIG [-.CONFIG]README.
612 "This directory created by Configure to save information that should"
614 "persist across sessions."
617 "You may safely delete it if you wish."
621 $!: general instructions
624 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
625 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
627 $ messages = F$ENVIRONMENT("MESSAGE")
628 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
629 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
630 $ IF .NOT.($status.EQ.%X08D78053)
634 $ rp = "Would you like to see the instructions? [''dflt'] "
636 $ if .NOT.ans THEN needman=""
638 $ SET MESSAGE 'messages'
640 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
646 This installation shell script will examine your system and ask you questions
647 to determine how the perl5 package should be installed. If you get
648 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
649 process, edit something, then restart this process as you just did.
650 Many of the questions will have default answers in square
651 brackets; typing carriage return will give you the default.
653 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
656 In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
657 the questions and use the computed defaults (or the previous answers provided
658 there was already a config.sh file). Type '@Configure "-h"' for a list of
661 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
664 Much effort has been expended to ensure that this shell script will
665 run on any VMS system. If despite that it blows up on yours, your
666 best bet is to edit Configure.com and @ it again. Whatever problems
667 you have with Configure.com, let me (dan@sidhe.org) know how I blew
670 $!This installation script affects things in two ways:
672 $!1) it may do direct variable substitutions on some of the files included
674 $!2) it builds a config.h file for inclusion in C programs. You may edit
675 $! any of these files as the need arises after running this script.
677 $!If you make a mistake on a question, there is no easy way to back up to it
680 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
681 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
683 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
687 $ ENDIF !(needman .EQS. "true")
689 $!: see if sh knows # comments !sfn
691 $!: figure out how to guarantee sh startup !sfn
692 $!: find out where common programs are !sfn
693 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
694 $!trylist="Mcc/byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
695 $! echo "I don't know where '$file' is, and my life depends on it."
696 $! echo "Go find a public domain implementation or fix your PATH setting!"
698 $! echo "Don't worry if any of the following aren't found..."
699 $!: determine whether symbolic links are supported !sfn
700 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
701 $!: set up the translation script tr, must be called with ./tr of course !sfn
703 $!: Try to determine whether config.sh was made on this system
704 $!: Get old answers from old config file if Configure was run on the
705 $!: same system, otherwise use the hints.
706 $ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/"
710 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
712 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
714 $ configshfound = F$SEARCH(config_sh)
715 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
717 $ IF (i.LT.max) THEN GOTO Config_sh_look
718 $! genconfig.pl has "osname='VMS'"
719 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
720 $ IF (configshfound.EQS."")
722 $ config_sh = "[-]config.sh" ! the fallback default
723 $ GOTO Beyond_config_sh
726 $ IF F$TYPE(config_dflt) .EQS. "" THEN config_dflt = "n"
727 $ rp = "Shall I @ ''config_sh' for default answers? [''config_dflt'] "
732 $ echo "Fetching default answers from ''config_sh'..."
734 $! This @ is why config_sh must employ DCL syntax. Note that for
735 $! symbols to be returned to this procedure they must be global.
736 $! Which implies that assignments must be of the :== or == variety.
737 $! Note further that the [-]config.sh file written by this procedure
738 $! employs shell syntax. In order to convert shell syntax to DCL
741 $! perl -ni -e "s/^#/!#/;s/='/==""/;s/'$/""/;print ""\$ $_"";" config.sh
743 $! However, watch out for sig_nam, sig_nam_init, sig_num, startperl
744 $! and any of the lower case double quoted variables such as the *format
745 $! variables in such a config."sh".
750 $ DELETE/SYMBOL config_dflt
752 $!we actually do not have "hints/" for VMS
755 $!First time through, eh? I have some defaults handy for the following systems:
757 $! echo " ","VMS_VAX"
758 $! echo " ","VMS_AXP"
759 $! : Now look for a hint file osname_osvers, unless one has been
760 $! : specified already.
763 $!You may give one or more space-separated answers, or "none" if appropriate.
764 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
766 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
770 $!: Restore computed paths !sfn
772 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
774 $ IF (osname .NES. "VMS")
776 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
779 %Config-E-VMS, ERROR:
781 Err, you do not appear to be running VMS!
782 This procedure is intended to Configure the building of Perl for VMS.
784 $ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans
787 $ echo4 "Continuing..."
789 $ echo4 "ABORTING..."
790 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
792 $ EXIT 2 !$STATUS = "%X00000002" (error)
794 $ ELSE !we are on VMS huzzah!
796 $ THEN TYPE SYS$INPUT:
798 Configure uses the operating system name and version to set some defaults.
799 The default value is probably right if the name rings a bell. Otherwise,
800 since spelling matters for me, either accept the default or answer "none"
803 $ rp = "Operating system name? [''osname'] "
807 $ IF (ans.NES.osname) !.AND.knowitall
809 $ echo4 "I'll go with ''osname' anyway..."
812 $ ENDIF !(osname .NES./.EQS. "VMS")
814 $!: who configured the system
815 $ cf_by = F$EDIT(user,"LOWERCASE")
816 $ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
818 $! Peter Prymmer has seen:
819 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
820 $! "SYS$TIME_ZONE" = "EDT"
822 $! Charles Lane recommended:
823 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
824 $! "NEWS_TIMEZONE" = "-0500"
825 $! "ST_TIMEZONE" = "EDT"
826 $! "JAN_TIME_ZONE" = "EST "
827 $! "MULTINET_TIMEZONE" = "EST"
828 $! "DAYLIGHT_SAVINGS" = "1"
830 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
832 $! "Multinet_Timezone"
833 $! "TCPware_Timezone"
836 $! This snippet o' DCL returns a string in default Unix `date` format,
837 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
839 $ MIN_TZO = -840 !units are minutes here
842 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
843 $ monn = F$CVTIME(,,"MONTH")
844 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
845 $ hour = F$CVTIME(,,"HOUR")
846 $ min = F$CVTIME(,,"MINUTE")
847 $ sec = F$CVTIME(,,"SECOND")
848 $ year = F$CVTIME(,,"YEAR")
850 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
854 $ mon = F$ELEMENT(i,"/",months)
855 $ IF i.LT.monn THEN GOTO Mon_loop
858 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
861 $ tzhour = F$INTEGER(systz)/3600
862 $ tzmins = F$INTEGER(systz)/60
863 $ tzminrem = tzmins - tzhour*60
864 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
866 $ THEN signothetime = "+"
867 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
868 $ THEN direction = "on GMT/"
869 $ ELSE direction = "east of "
871 $ ELSE signothetime = "-"
872 $ tzhour = -1*tzhour !keeps !UL happy
873 $ direction = "west of "
876 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
879 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
881 $ tzspan = "''tzhour' hours"
884 $ echo "Your system is ''tzspan' ''direction'UTC in England."
885 $ rp = "(''systz') Is this UTC Time Zone Offset correct? [''dflt'] "
887 $ IF ans.OR.(ans.EQS."")
891 $ GOTO Beyond_TimeZone
895 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
900 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
901 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
902 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
904 $ rp = "Enter the Time Zone offset: [''dflt'] "
906 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
907 $ IF ans.EQS."" THEN ans = dflt
908 $ tzhour = F$ELEMENT(0,":","''ans'") !first
909 $ IF tzhour.EQS."" THEN tzhour = 0
910 $ tzhour = F$INTEGER(tzhour)
911 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
914 $ tzminrem = F$INTEGER(tzminrem)
915 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
919 $ tzmins = tzhour*60 + tzminrem
920 $ tzd = F$STRING(tzmins*60)
925 $ tzhour = -1*tzhour !keeps !UL happy
928 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
931 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
936 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
937 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
939 $!: determine the architecture name
940 $! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
941 $! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME")
942 $! but does have F$GETSYI("HW_MODEL").
944 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
946 $ archname = "VMS_VAX"
947 $ otherarch = "an Alpha"
949 $ arch_type = "ARCH-TYPE=__VAX__"
951 $ archname = "VMS_AXP"
952 $ otherarch = "a VAX"
954 $ arch_type = "ARCH-TYPE=__AXP__"
956 $ rp = "What is your architecture name? [''archname'] "
960 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
961 $ IF (ans.NES.archname) !.AND.knowitall
963 $ echo4 "I'll go with ''archname' anyway..."
967 $ vms_prefix = "perl_root"
968 $ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
969 $ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''dflt'] "
973 $ ans = F$EXTRACT(0,1,F$EDIT(ans,"COLLAPSE, UPCASE"))
980 $ IF (archname.EQS."VMS_AXP")
982 $ macros = macros + """AXE=1"","
986 $!: is AFS running? !sfn
987 $!: decide how portable to be. Allow command line overrides. !sfn
988 $!: set up shell script to do ~ expansion !sfn
989 $!: expand filename !sfn
990 $!: now set up to get a file name !sfn
992 $ IF F$TYPE(prefix) .EQS. ""
994 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
995 $ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - ".;"
996 $ prefixbase = prefix - "]"
997 $ prefix = prefixbase + ".]"
1000 $!: determine root of directory hierarchy where package will be installed.
1005 $ echo "By default, ''package' will be installed in ''dflt', pod"
1006 $ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
1007 $ echo "all installation directories."
1008 $ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
1009 $ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
1011 $ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
1016 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
1020 $ perl_root = prefix
1022 $! Check here for pre-existing PERL_ROOT.
1023 $! -> ask if removal desired.
1024 $! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
1025 $! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
1027 $ vms_skip_install = "true"
1030 $ rp = "Skip the remaining """"where install"""" questions? [''dflt'] "
1032 $ IF (.NOT.ans).AND.(ans.NES."") THEN vms_skip_install = "false"
1033 $ IF (.NOT.vms_skip_install)
1036 $!: set the prefixit variable, to compute a suitable default value
1038 $!: determine where private library files go
1039 $!: Usual default is /usr/local/lib/perl5. Also allow things like
1040 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
1042 $ THEN TYPE SYS$INPUT:
1044 There are some auxiliary files for perl5 that need to be put into a
1045 private library directory that is accessible by everyone.
1047 $ IF F$TYPE(privlib) .NES. ""
1048 $ THEN dflt = privlib
1049 $ ELSE dflt = "''vms_prefix':[lib]"
1051 $ rp = "Pathname where the private library files will reside? "
1052 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1055 $ THEN privlib = ans
1056 $ ELSE privlib = dflt
1059 $ ENDIF !%Config-I-VMS, skip remaining "where install" questions
1061 $ perl_symbol = "true"
1067 $ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
1068 $ echo "symbol to invoke ''package', which is the usual method."
1069 $ echO "If you do not do so then you would need a DCL command verb at the"
1070 $ echo "process or the system wide level."
1072 $ rp = "Invoke perl as a global symbol foreign command? [''dflt'] "
1074 $ IF (.NOT.ans).AND.(ans.NES."") THEN perl_symbol = "false"
1076 $ IF (.NOT.perl_symbol)
1082 $ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
1083 $ echo "verb in a per-process table or in the system wide DCLTABLES (which"
1084 $ echo "would require write privilege)."
1086 $ rp = "Invoke perl as a per process command verb? [ ''dflt' ] "
1088 $ IF (.NOT.ans).AND.(ans.NES."")
1089 $ THEN perl_verb = "DCLTABLES"
1090 $ ELSE perl_verb = "PROCESS"
1092 $ ENDIF ! (.NOT.perl_symbol)
1094 $!: set the base revision
1096 $ revision = baserev - ".0"
1097 $!: get the patchlevel
1099 $ echo4 "Getting the current patchlevel..."
1100 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1101 $ IF (patchlevel_h.NES."")
1103 $ got_patch = "false"
1105 $ got_api_revision = "false"
1106 $ got_api_version = "false"
1107 $ got_api_subversion = "false"
1108 $ OPEN/READONLY CONFIG 'patchlevel_h'
1110 $ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
1111 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
1113 $ line = F$EDIT(line,"COMPRESS, TRIM")
1114 $ patchlevel = F$ELEMENT(2," ",line)
1115 $ got_patch = "true"
1117 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
1119 $ line = F$EDIT(line,"COMPRESS, TRIM")
1120 $ subversion = F$ELEMENT(2," ",line)
1123 $ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1125 $ line = F$EDIT(line,"COMPRESS, TRIM")
1126 $ api_revision = F$ELEMENT(2," ",line)
1127 $ got_api_revision = "true"
1129 $ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1131 $ line = F$EDIT(line,"COMPRESS, TRIM")
1132 $ api_version = F$ELEMENT(2," ",line)
1133 $ got_api_version = "true"
1135 $ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1137 $ line = F$EDIT(line,"COMPRESS, TRIM")
1138 $ api_subversion = F$ELEMENT(2," ",line)
1139 $ got_api_subversion = "true"
1141 $ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop
1148 $ IF (F$STRING(subversion) .NES. "0")
1150 $ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel' subversion ''subversion'.)"
1152 $ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel'.)"
1155 $ version = revision + "_" + patchlevel + "_" + subversion
1157 $ IF (.NOT.vms_skip_install)
1159 $!: set the prefixup variable, to restore leading tilde escape !sfn
1161 $!: determine where public architecture dependent libraries go
1165 $ echo "''package' contains architecture-dependent library files. If you are"
1168 $ THEN TYPE SYS$INPUT:
1169 sharing libraries in a heterogeneous environment, you might store
1170 these files in a separate location. Otherwise, you can just include
1171 them with the rest of the public library files.
1173 $ IF F$TYPE(archlib) .NES. ""
1174 $ THEN dflt = archlib
1175 $ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
1177 $ rp = "Where do you want to put the public architecture-dependent libraries? "
1178 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1181 $ THEN archlib = ans
1182 $ ELSE archlib = dflt
1185 $ ENDIF !%Config-I-VMS, skip "where install" questions
1187 $! This quotation from Configure has to be included on VMS:
1191 There is, however, a strange, musty smell in the air that reminds me of
1192 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1194 $ IF (.NOT.vms_skip_install)
1196 $!: it so happens the Eunice I know will not run shell scripts in Unix format
1198 $!: see if setuid scripts can be secure !sfn
1199 $!: now see if they want to do setuid emulation !sfn
1201 $!: determine where site specific libraries go.
1203 $ THEN TYPE SYS$INPUT:
1205 The installation process will also create a directory for
1206 site-specific extensions and modules. Some users find it convenient
1207 to place all local files in this directory rather than in the main
1208 distribution directory.
1210 $ IF F$TYPE(sitelib) .NES. ""
1211 $ THEN dflt = sitelib
1212 $ ELSE dflt = privlib - "]" + ".SITE_PERL]"
1214 $ rp = "Pathname for the site-specific library files? "
1215 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1218 $ THEN sitelib = ans
1219 $ ELSE sitelib = dflt
1222 $!: determine where site specific architecture-dependent libraries go.
1224 $ THEN TYPE SYS$INPUT:
1226 The installation process will also create a directory for
1227 architecture-dependent site-specific extensions and modules.
1229 $ IF F$TYPE(sitearch) .NES. ""
1230 $ THEN dflt = sitearch
1231 $ ELSE dflt = sitelib - "]" + "." + archname + "]"
1233 $ rp = "Pathname for the site-specific architecture-dependent library files? "
1234 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1237 $ THEN sitearch = ans
1238 $ ELSE sitearch = dflt
1241 $!: determine where old public architecture dependent libraries might be
1243 $!: determine where public executables go
1244 $ IF F$TYPE(bin) .NES. ""
1246 $! ELSE dflt = prefix - ".]" + ".BIN]"
1247 $ ELSE dflt = "/''vms_prefix'/000000"
1249 $ rp = "Pathname where the public executables will reside? "
1250 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1257 $!: determine where manual pages are on this system
1258 $!: What suffix to use on installed man pages
1259 $!: see if we can have long filenames
1260 $!: determine where library module manual pages go
1261 $!: What suffix to use on installed man pages
1262 $!: see what memory models we can support
1264 $ ELSE ! skipping "where install" questions, we must set some symbols
1265 $ IF F$TYPE(archlib).EQS."" THEN -
1266 archlib="''vms_prefix':[lib.''archname'.''version']"
1267 $ IF F$TYPE(bin) .EQS. "" THEN -
1268 bin="/''vms_prefix'/000000"
1269 $ IF F$TYPE(privlib) .EQS. "" THEN -
1270 privlib ="''vms_prefix':[lib]"
1271 $ IF F$TYPE(sitearch) .EQS. "" THEN -
1272 sitearch="''vms_prefix':[lib.site_perl.''archname']"
1273 $ IF F$TYPE(sitelib) .EQS. "" THEN -
1274 sitelib ="''vms_prefix':[lib.site_perl]"
1275 $ ENDIF !%Config-I-VMS, skip "where install" questions
1277 $! These derived locations can be set whether we've opted to
1278 $! skip the where install questions or not.
1280 $ IF F$TYPE(archlibexp) .EQS. "" THEN -
1281 archlibexp="''vms_prefix':[lib.''archname'.''version']"
1282 $ IF F$TYPE(binexp) .EQS. "" THEN -
1283 binexp ="''vms_prefix':[000000]"
1284 $ IF F$TYPE(builddir) .EQS. "" THEN -
1285 builddir ="''vms_prefix':[000000]"
1286 $ IF F$TYPE(installarchlib) .EQS. "" THEN -
1287 installarchlib="''vms_prefix':[lib.''archname'.''version']"
1288 $ IF F$TYPE(installbin) .EQS. "" THEN -
1289 installbin ="''vms_prefix':[000000]"
1290 $ IF F$TYPE(installscript) .EQS. "" THEN -
1291 installscript ="''vms_prefix':[utils]"
1292 $ IF F$TYPE(installman1dir) .EQS. "" THEN -
1293 installman1dir ="''vms_prefix':[man.man1]"
1294 $ IF F$TYPE(installman3dir) .EQS. "" THEN -
1295 installman3dir ="''vms_prefix':[man.man3]"
1296 $ IF F$TYPE(installprivlib) .EQS. "" THEN -
1297 installprivlib ="''vms_prefix':[lib]"
1298 $ IF F$TYPE(installsitearch) .EQS. "" THEN -
1299 installsitearch="''vms_prefix':[lib.site_perl.''archname']"
1300 $ IF F$TYPE(installsitelib) .EQS. "" THEN -
1301 installsitelib ="''vms_prefix':[lib.site_perl]"
1302 $ IF F$TYPE(oldarchlib) .EQS. "" THEN -
1303 oldarchlib="''vms_prefix':[lib.''archname']"
1304 $ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
1305 oldarchlibexp="''vms_prefix':[lib.''archname']"
1306 $ IF F$TYPE(privlibexp) .EQS. "" THEN -
1307 privlibexp ="''vms_prefix':[lib]"
1308 $ IF F$TYPE(sitearchexp) .EQS. "" THEN -
1309 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
1310 $ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
1311 sitelib_stem ="''vms_prefix':[lib.site_perl]"
1312 $ IF F$TYPE(sitelibexp) .EQS. "" THEN -
1313 sitelibexp ="''vms_prefix':[lib.site_perl]"
1315 $!: see if we need a special compiler
1316 $! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1320 $ vms_cc_available = ""
1322 $ OPEN/WRITE CONFIG ccvms.c
1323 $ WRITE CONFIG "#ifdef __DECC"
1324 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1325 $ WRITE CONFIG "#endif"
1326 $ WRITE CONFIG "#include <stdio.h>"
1327 $ WRITE CONFIG "int main() {"
1328 $ WRITE CONFIG "#ifdef __DECC"
1329 $ WRITE CONFIG " printf(""/DECC\n"");"
1330 $ WRITE CONFIG "#else"
1331 $ WRITE CONFIG " printf(""/VAXC\n"");"
1332 $ WRITE CONFIG "#endif"
1333 $ WRITE CONFIG " exit(0);"
1337 $! DEFINE SYS$ERROR _NLA0:
1338 $! DEFINE SYS$OUTPUT _NLA0:
1339 $ cc/NoObj/list=ccvms.lis ccvms.c
1341 $! DEASSIGN SYS$OUTPUT
1342 $! DEASSIGN SYS$ERROR
1343 $ IF (silent) THEN GOSUB Shut_up
1344 $ IF tmp.NE.%X10B90001
1346 $ IF tmp.NE.%X10000001
1348 $ nocc = "t" !%X10000001 is return from gcc
1349 $ GOTO Gcc_initial_check
1354 $ IF .NOT.silent THEN echo ""
1355 $ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1356 $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1360 $ echo "Will try cc/decc..."
1362 $ DEFINE/USER_MODE SYS$ERROR NL:
1363 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1365 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1368 $ IF (silent) THEN GOSUB Shut_up
1369 $ IF tmp.NE.%X10B90001
1371 $ echo "Apparently you don't have that one."
1374 $ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1375 $ vms_cc_available = vms_cc_available + "cc/decc "
1378 $ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
1380 $ vms_cc_dflt = "/decc"
1381 $ vms_cc_available = vms_cc_available + "cc/decc "
1386 $ echo "Checking for gcc"
1387 $ OPEN/WRITE CONFIG gccvers.lis
1388 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1389 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1390 $ 'gcc_symbol'/noobj/version _nla0:
1392 $ IF (silent) THEN GOSUB Shut_up
1394 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1396 $ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you don't have it."
1397 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1398 $ GOTO Cxx_initial_check
1400 $ OPEN/READ CONFIG gccvers.lis
1402 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1403 $ GOTO GCC_List_Read
1407 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1408 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1412 $! Do note that [vms]perl source files have a ways to go before they will
1413 $! compile under CXX.
1414 $! In order to test Configure.com with CXX swap the '!' comment character
1415 $! between the following two lines.
1422 $ echo "Checking for CXX..."
1423 $ OPEN/WRITE CONFIG ccvms.c
1424 $ WRITE CONFIG "#include <iostream>"
1425 $ WRITE CONFIG "int main() {"
1426 $ WRITE CONFIG "#ifdef __DECCXX"
1427 $ WRITE CONFIG " cout << __DECCXX, endl;"
1428 $ WRITE CONFIG "#else"
1429 $ WRITE CONFIG " cout << 0,endl;"
1430 $ WRITE CONFIG "#endif"
1431 $! Todo: add G++ identifier check ??
1432 $ WRITE CONFIG " return(0);"
1436 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1437 $ DEFINE/USER_MODE SYS$ERROR NL:
1441 $! success $status with:
1442 $! DEC C++ V1.1-001 on VMS VAX V5.5-2
1443 $! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1444 $! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1445 $! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1446 $ IF tmp .eq. %X15F60001
1450 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1451 $ DEFINE/USER_MODE SYS$ERROR NL:
1455 $ ! success $status with:
1456 $ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1457 $ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1458 $ IF tmp .eq. %X10000001
1461 $ vms_cc_available = vms_cc_available + "cxx "
1462 $ echo "CXX and LINK are available."
1464 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1466 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1467 $ DEFINE/USER_MODE SYS$ERROR NL:
1471 $ ! success $status with:
1472 $ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1473 $ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1474 $ IF tmp .eq. %X10000001
1476 $ ld_try = "cxxlink"
1477 $ vms_cc_available = vms_cc_available + "cxx "
1478 $ echo "CXX and CXXLINK are available."
1481 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1485 $ DELETE/NOLOG/NOCONFIRM ccvms.c;
1486 $ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1487 $ CALL Cxx_demangler_cleanup
1489 $ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1492 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1494 $!: see if we need a special compiler
1496 $ echo "Available compiler(s):"
1497 $ echo "( ''vms_cc_available')"
1500 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1504 $ rp = "Use which C compiler? [''dflt'] "
1508 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1510 $ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans))
1514 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1516 $ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1521 $! C_COMPILER_Replace = "CC=cc=''Mcc'"
1525 $ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1526 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt)
1528 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1533 $ IF Mcc .EQS. "cc/decc"
1536 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1541 $ IF Mcc .EQS. "cc/decc"
1544 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1546 $ IF Mcc .EQS. "gcc"
1549 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1552 $Decc_Version_check:
1557 $ echo4 "Checking for Dec C's version number..."
1558 $ OPEN/WRITE CONFIG deccvers.c
1559 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1560 $ WRITE CONFIG "#include <stdio.h>"
1561 $ WRITE CONFIG "int main() {"
1562 $ WRITE CONFIG "#ifdef __DECC"
1563 $ WRITE CONFIG "#ifdef __DECC_VER"
1564 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1565 $ WRITE CONFIG "#else"
1566 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1567 $ WRITE CONFIG "#endif"
1568 $ WRITE CONFIG "#endif"
1569 $ WRITE CONFIG " exit(0);"
1573 $ DEFINE/USER_MODE SYS$ERROR NL:
1574 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1577 $ IF (silent) THEN GOSUB Shut_up
1578 $ DEFINE/USER_MODE SYS$ERROR NL:
1579 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1582 $ IF (silent) THEN GOSUB Shut_up
1583 $ OPEN/WRITE CONFIG deccvers.out
1584 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1585 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1586 $ mcr []deccvers.exe
1590 $ IF (silent) THEN GOSUB Shut_up
1591 $ OPEN/READ CONFIG deccvers.out
1592 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1595 $ echo "You are using Dec C ''line'"
1597 $ Dec_C_Version = F$INTEGER(line)
1598 $ IF Dec_C_Version .GE. 60200000
1600 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1601 $ ccflags = ccflags + "/NOANSI_ALIAS"
1603 $ DELETE/NOLOG/NOCONFIRM deccvers.*;
1609 $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1610 $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1611 $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1612 $ IF gcclib_olb .EQS. ""
1614 $! These objects/libs come w/ gcc 2.7.2 for AXP:
1615 $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1616 $ IF tmp .NES. "" then gcclib_olb = tmp
1617 $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1620 $ IF gcclib_olb .EQS. ""
1621 $ THEN gcclib_olb = tmp
1622 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1625 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1628 $ IF gcclib_olb .EQS. ""
1629 $ THEN gcclib_olb = tmp
1630 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1633 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1636 $ IF gcclib_olb .EQS. ""
1637 $ THEN gcclib_olb = tmp
1638 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1641 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1643 $ gcclib_olb = gcclib_olb + "/lib"
1645 $ IF gcclib_olb .NES. "" .AND. -
1646 (vaxcrtl_olb .NES. "" .OR. -
1647 vaxcrtl_exe .NES. "" )
1650 $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1651 $ OPEN/WRITE CONFIG gccvers.c
1652 $! WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1653 $ WRITE CONFIG "#include <stdio.h>"
1654 $ WRITE CONFIG "int main() {"
1655 $ WRITE CONFIG "#ifdef __GNUC__"
1656 $ WRITE CONFIG "#ifdef __VERSION__"
1657 $ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1658 $ WRITE CONFIG "#else"
1659 $ WRITE CONFIG " printf(""%s\n"", ""1"");"
1660 $ WRITE CONFIG "#endif"
1661 $ WRITE CONFIG "#endif"
1662 $ WRITE CONFIG " exit(0);"
1665 $ DEFINE SYS$ERROR _NLA0:
1666 $ DEFINE SYS$OUTPUT _NLA0:
1669 $ DEASSIGN SYS$ERROR _NLA0:
1670 $ DEASSIGN SYS$OUTPUT _NLA0:
1671 $ IF (silent) THEN GOSUB Shut_up
1672 $ DEFINE SYS$ERROR _NLA0:
1673 $ DEFINE SYS$OUTPUT _NLA0:
1674 $ IF vaxcrtl_exe .EQS. ""
1676 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1678 $ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1681 $ link gccvers.obj,'gcclib_olb'
1685 $ OPEN/WRITE CONFIG GCCVERS.OPT
1686 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1688 $ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1691 $ DEASSIGN SYS$ERROR
1692 $ DEASSIGN SYS$OUTPUT
1693 $ IF (silent) THEN GOSUB Shut_up
1694 $ OPEN/WRITE CONFIG gccvers.out
1695 $ DEFINE SYS$ERROR CONFIG
1696 $ DEFINE SYS$OUTPUT CONFIG
1700 $ DEASSIGN SYS$OUTPUT
1701 $ DEASSIGN SYS$ERROR
1702 $ IF (silent) THEN GOSUB Shut_up
1703 $ OPEN/READ CONFIG gccvers.out
1704 $ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1707 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
1708 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1710 $ echo "You are not using GNU cc."
1713 $ echo "You are using GNU cc ''line'"
1716 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1724 $ OPEN/WRITE CONFIG cxxvers.c
1725 $ WRITE CONFIG "#include <stdio.h>"
1726 $ WRITE CONFIG "int main() {"
1727 $ WRITE CONFIG "#ifdef __DECCXX_VER"
1728 $ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
1729 $ WRITE CONFIG "#else"
1730 $ WRITE CONFIG " printf(""%i\n"", ""0"");"
1731 $ WRITE CONFIG "#endif"
1732 $ WRITE CONFIG " return(0);"
1736 $ DEFINE/USER_MODE SYS$ERROR NL:
1737 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1741 $ IF (silent) THEN GOSUB Shut_up
1743 $ DEFINE/USER_MODE SYS$ERROR NL:
1744 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1748 $ IF (silent) THEN GOSUB Shut_up
1749 $ OPEN/WRITE CONFIG cxxvers.out
1751 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1752 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1757 $ IF (silent) THEN GOSUB Shut_up
1758 $ OPEN/READ CONFIG cxxvers.out
1759 $ READ/END_OF_FILE=Cxx_cleanup CONFIG line
1762 $ DELETE/NOLOG/NOCONFIRM cxxvers.*;
1763 $ echo "You are using CXX ''line'"
1766 $ CALL Cxx_demangler_cleanup
1769 $Cxx_demangler_cleanup: SUBROUTINE
1771 $! If we do build with CXX these demangler Dbs will be left all over.
1772 $! However, configure.com does try to remove the [.UU] sub directory.
1773 $! Be sure to set default to the correct place before calling this sub.
1776 $ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
1777 $ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
1779 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
1780 $ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
1784 $ ENDSUBROUTINE ! Cxx_demangler_cleanup
1789 $ OPEN/READ CONFIG ccvms.lis
1791 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
1799 $ line = F$EDIT(line,"TRIM,COMPRESS")
1800 $ line = line - "Page 1" ! occurs at end all compilers
1801 $ line = line - "CCVMS " ! filename appears w/ VAXC
1802 $ line = line - "Source Listing " ! Seen w/ AXP DECC
1803 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
1805 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1806 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1810 $!: What should the include directory be ? (.TLB text libraries)
1812 $ rp = "Where are the include files you want to use? "
1813 $ IF f$length( rp + "[''dflt'] " ).gt.76
1814 $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
1815 $ ELSE rp = rp + "[''dflt'] "
1820 $!: see if we have to deal with yellow pages, now NIS.
1821 $!: now get the host name
1824 $ echo4 "Figuring out host name..." !>&4
1826 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
1827 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
1828 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
1829 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
1830 $ IF myhostname.eqs."".and. -
1831 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
1832 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
1833 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
1834 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
1835 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
1836 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
1837 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
1838 $!: you do not want to know about this
1840 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
1842 $ IF (.not.ans).and.(ans.NES."")
1844 $ READ SYS$COMMAND/PROMPT= -
1845 "Please type the (one word) name of your host: " ans
1848 $!: translate upper to lower if necessary
1849 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
1850 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
1851 $ IF mylowhostname.NES.myhostname
1853 $ echo "(Normalizing case in your host name)"
1854 $ myhostname = mylowhostname
1857 $ fp = F$LOCATE(".",myhostname)
1858 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
1859 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
1861 $ rp = "What is your domain name? [''mydomain'] "
1863 $ IF ans .nes. "" THEN mydomain = ans
1864 $!: translate upper to lower if necessary
1865 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
1866 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
1867 $ IF mylowdomain.NES.mydomain
1869 $ echo "(Normalizing case in your domain name)"
1870 $ mydomain = mylowdomain
1873 $ myhostname = myhostname - mydomain
1874 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
1876 $ THEN TYPE SYS$INPUT:
1878 I need to get your e-mail address in Internet format if possible, i.e.
1879 something like user@host.domain. Please answer accurately since I have
1880 no easy means to double check it. The default value provided below
1881 is most probably close to the reality but may not be valid from outside
1882 your organization...
1884 $ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
1885 $ rp = "What is your e-mail address? [''dflt'] "
1888 $ THEN cf_email = ans
1889 $ ELSE cf_email = dflt
1893 $ THEN TYPE SYS$INPUT:
1895 If you or somebody else will be maintaining perl at your site, please
1896 fill in the correct e-mail address here so that they may be contacted
1897 if necessary. Currently, the "perlbug" program included with perl
1898 will send mail to this address in addition to perlbug@perl.com. You may
1899 enter "none" for no administrator.
1901 $ dflt = "''cf_email'"
1902 $ rp = "Perl administrator e-mail address [''dflt'] "
1905 $ THEN perladmin = ans
1906 $ ELSE perladmin = dflt
1909 $!: determine where public executable scripts go
1910 $!: determine perl absolute location
1911 $!: figure out how to guarantee perl startup
1913 $!: see how we invoke the C preprocessor
1915 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
1916 $!: Set private lib path
1917 $!: Now check and see which directories actually exist, avoiding duplicates
1918 $!: determine optimize, if desired, or use for debug flag also
1919 $!: We will not override a previous value, but we might want to
1920 $!: augment a hint file
1921 $!: the following weeds options from ccflags that are of no interest to cpp
1922 $!: flags used in final linking phase
1923 $!: Try to guess additional flags to pick up local libraries.
1926 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
1927 $!: compute shared library extension
1928 $!: Looking for optional libraries
1929 $!: see if nm is to be used to determine whether a symbol is defined or not
1930 $!: get list of predefined functions in a handy place
1931 $!: see if we have sigaction
1932 $!: see whether socketshr exists
1933 $ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
1935 $ Has_socketshr = "T"
1937 $ echo4 "Hmm... Looks like you have SOCKETSHR's Berkeley networking support."
1939 $ Has_socketshr = "F"
1941 $ IF (Dec_C_Version .GE. 50200000)
1943 $ Has_Dec_C_Sockets = "T"
1945 $ echo4 "Hmm... Looks like you've got Dec C's Berkeley networking support."
1947 $ Has_Dec_C_Sockets = "F"
1949 $ ! Hey, we've got both. Default to Dec C, then, since it's better
1950 $ IF Has_socketshr .OR. Has_Dec_C_Sockets
1953 $ echo "You've got sockets available. Which socket stack do you want to"
1954 $ echo "build into perl?"
1955 $ IF Has_Dec_C_Sockets
1959 $ dflt = "SOCKETSHR"
1961 $ rp = "Choose socket stack (NONE"
1962 $ IF Has_socketshr THEN rp = rp + ",SOCKETSHR"
1963 $ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
1964 $ rp = rp + ") [''dflt'] "
1966 $ IF ans .EQS. "" THEN ans = "''dflt'"
1967 $ Has_Dec_C_Sockets = "F"
1968 $ Has_socketshr = "F"
1969 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
1970 $ IF ans.eqs."decc" then Has_Dec_C_Sockets = "T"
1971 $ IF ans.eqs."socketshr" then Has_socketshr = "T"
1975 $! Ask if they want to build with VMS_DEBUG perl
1977 $ echo "Perl can be built to run under the VMS debugger."
1978 $ echo "You should only select this option if you are debugging"
1979 $ echo "perl itself. This can be a useful feature if you are "
1980 $ echo "embedding perl in a program."
1982 $ rp = "Build a VMS-DEBUG version of Perl? [''dflt'] "
1984 $ IF ans.eqs."" then ans = dflt
1985 $ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
1987 $ use_vmsdebug_perl = "Y"
1988 $ macros = macros + """__DEBUG__=1"","
1990 $ use_vmsdebug_perl = "N"
1993 $! Ask if they want to build with DEBUGGING
1995 $ echo "Perl can be built with extra runtime debugging enabled. This
1996 $ echo "enables the -D switch, at the cost of some performance. It
1997 $ echo "was mandatory on perl 5.005 and before on VMS, but is now
1998 $ echo "optional. If you don't generally use it you should probably
1999 $ echo "leave this off and gain a bit of extra speed.
2001 $ rp = "Build a DEBUGGING version of Perl? [''dflt'] "
2003 $ IF ans.eqs."" then ans = dflt
2004 $ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
2006 $ use_debugging_perl = "Y"
2008 $ use_debugging_perl = "N"
2011 $! Ask if they want to build with MULTIPLICITY
2013 $ echo "Perl can be built so that multiple Perl interpreters can coexist"
2014 $ echo "within the same Perl executable."
2015 $ echo "There is some performance overhead, however, so you
2016 $ echo "probably don't want to choose this unless you're going to be doing
2017 $ echo "things with embedded perl."
2019 $ rp = "Build Perl for multiplicity? [''dflt'] "
2021 $ IF ans.eqs."" then ans = dflt
2024 $ usemultiplicity="define"
2026 $ usemultiplicity="undef"
2029 $! Ask if they want to build with 64-bit support
2030 $ IF (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2032 $ dflt = use64bitint
2034 $ echo "You can have native 64-bit long integers.
2036 $ echo "Perl can be built to take advantage of 64-bit integer types
2037 $ echo "on some systems, which provide a much larger range for perl's
2038 $ echo "mathematical operations. (Note that does *not* enable 64-bit
2039 $ echo "fileops at the moment, as Dec C doesn't do that yet)."
2040 $ echo "Choosing this option will most probably introduce binary incompatibilities.
2042 $ echo "If this doesn't make any sense to you, just accept the default ''dflt'.
2043 $ rp = "Try to use 64-bit integers, if available? [''dflt'] "
2045 $ IF ans .EQS. "" THEN ans = dflt
2046 $ IF (f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE")) .EQS. "Y")
2054 $ dflt = use64bitall
2056 $ echo "Since you chose 64-bitness you may want to try maximal 64-bitness.
2057 $ echo "What you have chosen is minimal 64-bitness which means just enough
2058 $ echo "to get 64-bit integers. The maximal means using as much 64-bitness
2059 $ echo "as is possible on the platform. This in turn means even more binary
2060 $ echo "incompatibilities. On the other hand, your platform may not have
2061 $ echo "any more maximal 64-bitness than what you already have chosen.
2063 $ echo "If this doesn't make any sense to you, just accept the default ''dflt'.
2064 $ rp = "Try to use full 64-bit support, if available? [''dflt'] "
2066 $ IF ans .EQS. "" THEN ans = dflt
2067 $ IF (f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE")) .EQS. "Y")
2074 $ ENDIF ! AXP && >= 7.1
2076 $! Ask about threads, if appropriate
2080 $ echo "This version of Perl can be built with threads. While really nifty,
2081 $ echo "they are a beta feature, and there is a speed penalty for perl
2082 $ echo "programs if you build with threads *even if you don't use them*
2084 $ rp = "Build with threads? [''dflt'] "
2086 $ if ans.eqs."" then ans = dflt
2087 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
2091 $ ! Shall we do the 5.005-stype threads, or IThreads?
2092 $ echo "As of 5.5.640, Perl has two different internal threading
2093 $ echo "implementations, the 5.005 version (5005threads) and an
2094 $ echo "interpreter-based version (ithreads) that has one
2095 $ echo "interpreter per thread. Both are very experimental. This
2096 $ echo "arrangement exists to help developers work out which one
2099 $ echo "If you're a casual user, you probably don't want
2100 $ echo "interpreter-threads at this time. There doesn't yet exist
2101 $ echo "a way to create threads from within Perl in this model,
2102 $ echo "i.e., ""use Thread;"" will NOT work.
2105 $ rp = "Build with Interpreter threads? [''dflt']
2107 $ if ans.eqs."" then ans = dflt
2108 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
2111 $ use_5005_threads="N"
2114 $ use_5005_threads="Y"
2116 $ ! Are they on VMS 7.1 on an alpha?
2117 $ if (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2120 $ echo "Threaded perl can be linked to use multiple kernel threads
2121 $ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature
2122 $ echo "allows multiple threads to execute simultaneously on an SMP
2123 $ echo "system as well as preventing a single thread from blocking
2124 $ echo "all the threads in a program, even on a single-processor
2125 $ echo "machine. Unfortunately this feature isn't safe on an
2126 $ echo "unpatched 7.1 system. (Several OS patches were required when
2127 $ echo "this procedure was written)
2129 $ rp = "Enable multiple kernel threads and upcalls? [''dflt'] "
2131 $ if ans.eqs."" then ans="''dflt'"
2132 $ if f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")).eqs."Y"
2134 $ Thread_Live_Dangerously = "MT=MT=1"
2139 $ if archname .eqs. "VMS_AXP"
2144 $ echo "By default, perl (and pretty much everything else on VMS) uses
2145 $ echo "case-insensitive linker symbols. Which is to say, when the
2146 $ echo "underlying C code makes a call to a routine called Perl_foo in
2147 $ echo "the source, the name in the object modules or shareable images
2148 $ echo "is really PERL_FOO. There are some packages that use an
2149 $ echo "embedded perl interpreter that instead require case-sensitive
2150 $ echo "linker symbols.
2152 $ echo "If you have no idea what this means, and don't have
2153 $ echo "any program requiring anything, choose the default.
2154 $ dflt = be_case_sensitive
2155 $ rp = "Build with case-sensitive symbols? [''dflt'] "
2157 $ if ans.eqs."" then ans="''dflt'"
2158 $ be_case_sensitive = "''ans'"
2162 $ echo "Perl normally uses G_FLOAT format floating point numbers
2163 $ echo "internally, as do most things on VMS. You can, however, build
2164 $ echo "with IEEE floating point numbers instead if you need to.
2165 $ dflt = use_ieee_math
2166 $ rp = "Use IEEE math? [''dflt'] "
2168 $ if ans.eqs."" then ans="''dflt'"
2169 $ use_ieee_math = "''ans'"
2173 $ echo "You can, if you need to, pass extra flags on to the C
2174 $ echo "compiler. In general you should only do this if you really,
2175 $ echo "really know what you're doing.
2176 $ dflt = user_c_flags
2177 $ rp = "Extra C flags [''dflt'] "
2179 $ if ans.eqs."" then ans="''dflt'"
2180 $ user_c_flags = "''ans'"
2182 $! Ask whether they want to use secure logical translation when tainting
2184 $ echo "As Perl starts up, it checks several logical names, such as"
2185 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2186 $ echo "of its behavior. For additional security, you may limit this"
2187 $ echo "process to executive- and kernel-mode translation when tainting"
2188 $ echo "is enabled. In this case, logical names normally skipped when"
2189 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2190 $ echo "If you do not choose to do this, the usual order of access modes"
2191 $ echo "is used for logical name translation."
2193 $ echo "This restriction does not apply to the %ENV hash or to implicit"
2194 $ echo "logical name translation during parsing of file specifications;"
2195 $ echo "these always use the normal sequence of access modes for logical"
2196 $ echo "name translation."
2198 $ rp = "Use secure logical name translation? [''dflt'] "
2200 $ IF ans .eqs. "" THEN ans = dflt
2202 $ THEN d_secintgenv := Y
2203 $ ELSE d_secintgenv := N
2206 $! Ask whether they want to default filetypes
2208 $ echo "When you pass the name of a program to Perl on the command line,"
2209 $ echo "it generally doesn't supply any defaults unless the -S command"
2210 $ echo "line switch is specified. In keeping with the VMS tradition of"
2211 $ echo "default file types, however, you can configure Perl to try default"
2212 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2213 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2214 $ echo "finally foo.com)."
2216 $ echo "This is currently broken in some configurations. Only enable it if
2217 $ echo "you know what you're doing. "
2219 $ rp = "Always use default file types? [''dflt'] "
2221 $ IF ans .EQS. "" THEN ans = dflt
2223 $ THEN d_alwdeftype := Y
2224 $ ELSE d_alwdeftype := N
2227 $! Ask if they want to use perl's memory allocator
2229 $ echo "Perl has a built-in memory allocator that's tuned for perl's
2230 $ echo "normal memory usage. It's oftentimes better than the standard
2231 $ echo "system memory allocator. It also has the advantage of providing
2232 $ echo "memory allocation statistics, if you choose to enable them.
2234 $ rp = "Build with perl's memory allocator? [''dflt'] "
2236 $ IF ans .eqs. "" THEN ans = dflt
2238 $ THEN mymalloc := Y
2239 $ ELSE mymalloc := N
2243 $ IF use_debugging_perl
2246 $ echo "Perl can keep statistics on memory usage if you choose to use
2247 $ echo "them. This is useful for debugging, but does have some
2248 $ echo "performance overhead.
2250 $ rp = "Do you want the debugging memory allocator? [''dflt'] "
2252 $ if ans.eqs."" then ans="''dflt'"
2253 $ use_debugmalloc = f$extract(0, 1, f$edit(ans, "COLLAPSE,UPCASE"))
2255 $ ! Check which memory allocator we want
2257 $ echo "There are currently three different memory allocators: the
2258 $ echo "default (which is a pretty good general-purpose memory manager),
2259 $ echo "the TWO_POT allocator (which is optimized to save memory for
2260 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save
2261 $ echo "memory for smaller allocations). They're all good, but if your
2262 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use
2263 $ echo "PACK_MALLOC."
2265 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2267 $ if ans.eqs."" then ans = "''dflt'"
2268 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2269 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2272 $! Ask for their default list of extensions to build
2274 $ echo "It's time to specify which modules you want to build into
2275 $ echo "perl. Most of these are standard and should be chosen, though
2276 $ echo "you might, for example, want to build GDBM_File instead of
2277 $ echo "SDBM_File if you have the GDBM library built on your machine.
2278 $ echo "Whatever you do, make sure the re module is first or things will
2279 $ echo "break badly"
2281 $ echo "Which modules do you want to build into perl?"
2282 $! dflt = "Fcntl Errno File::Glob IO Opcode Byteloader Devel::Peek Devel::DProf Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File"
2283 $ dflt = "re Fcntl Errno File::Glob IO Opcode Devel::Peek Devel::DProf Data::Dumper attrs VMS::Stdio VMS::DCLsym B SDBM_File Storable Thread Sys::Hostname"
2286 $ dflt = dflt + " POSIX"
2290 $ if ans.eqs."" then ans = "''dflt'"
2294 $ x = f$elem(j," ",ans)
2296 $ if x .eqs. " " then goto exloop1
2298 $ k = f$locate("::",x)
2299 $ if k .ge. f$len(x) then goto exloop2
2300 $ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$len(x)-2,x)
2306 $ ans = f$edit(a,"trim")
2311 $ x = f$elem(j," ",dflt)
2313 $ if x .eqs. " " then goto exloop3
2315 $ k = f$locate("::",x)
2316 $ if k .ge. f$len(x) then goto exloop4
2317 $ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$len(x)-2,x)
2323 $ dflt = f$edit(a,"trim")
2325 $ extensions = "''ans'"
2326 $ known_extensions = "''dflt'"
2328 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2330 $ echo "Checking your ""make"" utilities..."
2331 $! If the 'build' that you use is not here add it and it's test
2332 $! switch to the _END_ of these strings (and increment max_build)
2333 $! (e.g. builders = builders + "/FOOMAKE"
2334 $! probers = probers + " -fooVersionSwitch"
2335 $! ) & please let me know about it.
2336 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2337 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2343 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2344 $ WRITE CONFIG "dont_make_anything_yet:"
2345 $ WRITE CONFIG F$FAO("!_")
2348 $ messages = F$ENVIRONMENT("MESSAGE")
2350 $ build = F$ELEMENT(n,"/",builders)
2351 $ probe = F$ELEMENT(n,"!",probers)
2352 $ echo "Testing whether you have ''build' on your system..."
2354 $! Noted with GNU Make version 3.60 that the $status and $severity
2355 $! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2356 $! $SEVERITY == "4".
2359 $ ON CONTROL_Y THEN GOTO Reenable_messages_build
2360 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
2362 $ IF ($SEVERITY .EQ. 1) ! not adequate?
2365 $ IF (build .EQS. orig_dflt)
2367 $ default_set = "TRUE"
2370 $ ok_builders = ok_builders + " " + build
2371 $ IF (.NOT. default_set) THEN dflt = build
2375 $Reenable_messages_build:
2376 $ SET MESSAGE 'messages'
2379 $ IF (n .LT. max_build) THEN GOTO Build_probe
2382 $ IF (ok_builders .NES. "")
2384 $ echo "Here is the list of builders you can apparently use:"
2385 $ echo "(",ok_builders," )"
2386 $ rp = "Which """"make"""" utility do you wish to use? [''dflt'] "
2388 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2389 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2397 %Config-E-VMS, ERROR:
2398 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
2399 utility of some sort and after checking my "builders" list I cannot find
2400 the symbol or command you use on your system to compile programs.
2402 $ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
2403 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2404 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2407 $ echo "I don't know where 'make' is, and my life depends on it."
2408 $ echo "Go find a make program or fix your DCL$PATH setting!"
2409 $ echo "ABORTING..."
2410 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2412 $ EXIT 2 !$STATUS = "%X00000002" (error)
2418 $ DELETE/NOLOG Makefile.;
2423 There seems to be trouble. I just tried to create a file in
2424 $ echo4 'F$ENVIRONMENT("DEFAULT")'
2426 but was unsuccessful. I am stopping now. Please check that directories'
2427 PROTECTION bits. I will leave you in the directory where you started
2429 $ echo4 "ABORTING..."
2435 $! echo " Very well I will proceed with ""''build'"""
2436 $ make = F$EDIT(build,"UPCASE")
2438 $!: locate the preferred pager for this system
2439 $!pagers = "most|more|less|type/page"
2440 $!rp="What pager is used on your system? [''dflt'] "
2443 $! update [.vms]config.vms here
2445 $! update makefile here
2446 $! echo4 "Updating makefile..."
2448 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2450 $ makefile = "" !wrt MANIFEST dir
2451 $ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
2452 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
2453 $ Makefile_SH = "descrip_mms.template"
2455 $ makefile = " -f Makefile." !wrt MANIFEST dir
2456 $ UUmakefile = "[-]Makefile." !wrt CWD dir
2457 $ DEFmakefile = "Makefile." !wrt DEF dir (?)
2458 $ Makefile_SH = "Makefile.in"
2463 $ tmp = F$LENGTH(macros)
2464 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2465 $ macros = "/macro=(" + macros + ")"
2467 $! Build up the extra C flags
2471 $ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm_results"
2473 $ if be_case_sensitive
2475 $ extra_flags = "''extra_flags'" + "/Names=As_Is"
2477 $ extra_flags = "''extra_flags'" + "''user_c_flags'"
2479 $ min_pgflquota = "100000"
2480 $ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
2481 $ IF pgflquota .LES. min_pgflquota
2483 $ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
2484 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
2487 $ echo4 "Continuing..."
2489 $ echo4 "ABORTING..."
2495 $ echo4 "Checking the C run-time library."
2499 $! - build a config.sh for VMS Perl.
2500 $! - use built config.sh to take config_h.SH -> config.h
2501 $! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
2502 $! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
2503 $! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
2504 $! - build Build_Ext.Com extension builder procedure.
2506 $! Note for folks from other platforms changing things in here:
2508 $! Fancy changes (based on compiler capabilities or VMS version or
2509 $! whatever) are tricky, so go ahead and punt on those.
2511 $! Simple changes, though (say, always setting something to 1, or undef,
2512 $! or something like that) are straightforward. Adding a new constant
2513 $! item for the ultimately created config.sh requires at least one
2514 $! (possibly more) line(s) to this file.
2516 $! Add a line in the format:
2518 $! $ WC "foo='undef'"
2520 $! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
2521 $! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
2522 $! is sorted ASCII and corresponds to the output of config.sh in the
2523 $! Bourne shell version of Configure).
2524 $! Be very careful with quoting, as it can be tricky.
2525 $! For example if instead of a constant string like 'undef' or 'define'
2526 $! you wanted to add something to VMS's config.sh that looks like:
2530 $! then add a line that looks like this before the
2531 $! '##END WRITE NEW CONSTANTS HERE##' tagged line:
2533 $! $ WC "blank_string='" + "'"
2535 $! (+ is the string concatenator and "''var'" has the effect
2536 $! of "${var}" in perl or sh, but "'const'" is not interpolated).
2538 $! Note that unitialized variables, such as a line like:
2540 $! $ WC "new_var='" + new_var + "'"
2542 $! should be avoided unless new_var has a value assigned prior
2543 $! to that line (think of perl's -w warnings).
2545 $! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
2549 $ vms_ver = F$EXTRACT(1,3, osvers)
2550 $ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
2551 $ MCC = f$edit(mcc, "UPCASE")
2552 $ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
2555 $ Checkcc := "''Mcc'/prefix=all"
2561 $ Checkcc := "''Mcc'"
2564 $ ccflags = ccflags + extra_flags
2565 $ IF be_case_sensitive
2567 $ d_vms_be_case_sensitive = "define"
2569 $ d_vms_be_case_sensitive = "undef"
2571 $! Some constant defaults.
2572 $ hwname = f$getsyi("HW_NAME")
2573 $ myname = myhostname
2574 $ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
2579 $ IF use64bitint .OR. use64bitint .EQS. "define"
2581 $ use64bitint = "define"
2582 $ uselargefiles = "define"
2583 $ uselongdouble = "define"
2584 $ usemorebits = "define"
2586 $ use64bitint = "undef"
2587 $ uselargefiles = "undef"
2588 $ uselongdouble = "undef"
2589 $ usemorebits = "undef"
2591 $ IF use64bitall .OR. use64bitall .EQS. "define"
2593 $ use64bitall = "define"
2595 $ use64bitall = "undef"
2598 $ usemymalloc=mymalloc
2602 $ IF (sharedperl .AND. F$GETSYI("HW_MODEL") .GE. 1024)
2616 $ dlobj="dl_vms''obj_ext'"
2618 $ cppstdin="''perl_cc'/noobj/preprocess=sys$output sys$input"
2620 $ cpprun="''perl_cc'/noobj/preprocess=sys$output sys$input"
2628 $ THEN d_mymalloc="define"
2629 $ ELSE d_mymalloc="undef"
2633 $ startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !\n$ exit++ + ++$status != 0 and $exit = $status = undef;"""
2635 $ IF ((Use_Threads) .AND. (vms_ver .LES. "6.2"))
2637 $ 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"
2650 $ IF use64bitint .OR. use64bitint .EQS. "define"
2652 $ d_PRId64 = "define"
2653 $ d_PRIfldbl = "define"
2654 $ d_PRIgldbl = "define"
2655 $ d_PRIu64 = "define"
2656 $ d_PRIo64 = "define"
2657 $ d_PRIx64 = "define"
2658 $ sPRId64 = """Ld"""
2659 $! sPRIeldbl = """Lf"""
2660 $ sPRIfldbl = """Lf"""
2661 $ sPRIgldbl = """Lg"""
2662 $! sPRIi64 = """Li"""
2663 $ sPRIo64 = """Lo"""
2664 $ sPRIu64 = """Lu"""
2665 $ sPRIx64 = """Lx"""
2667 $ quadtype = "long long"
2668 $ uquadtype = "unsigned long long"
2669 $ quadkind = "QUAD_IS_LONG_LONG"
2670 $ d_frexpl = "define"
2671 $ d_isnanl = "define"
2672 $ d_modfl = "define"
2674 $ d_PRId64 = "undef"
2675 $ d_PRIfldbl = "undef"
2676 $ d_PRIgldbl = "undef"
2677 $ d_PRIu64 = "undef"
2678 $ d_PRIo64 = "undef"
2679 $ d_PRIx64 = "undef"
2690 $ uquadtype = "unsigned long"
2691 $ quadkind = "QUAD_IS_LONG"
2692 $ d_frexpl = "undef"
2693 $ d_isnanl = "undef"
2697 $! Now some that we build up
2701 $ IF use_5005_threads
2703 $ arch = "''arch'-thread"
2704 $ archname = "''archname'-thread"
2705 $ d_old_pthread_create_joinable = "undef"
2706 $ old_pthread_create_joinable = " "
2707 $ use5005threads = "define"
2708 $ useithreads = "undef"
2710 $ arch = "''arch'-ithread"
2711 $ archname = "''archname'-ithread"
2712 $ d_old_pthread_create_joinable = "undef"
2713 $ old_pthread_create_joinable = " "
2714 $ use5005threads = "undef"
2715 $ useithreads = "define"
2718 $ d_old_pthread_create_joinable = "undef"
2719 $ old_pthread_create_joinable = " "
2720 $ use5005threads = "undef"
2721 $ useithreads = "undef"
2724 $! Some that we need to invoke the compiler for
2727 $! handy construction aliases/symbols
2729 $ OS := "open/write CONFIG []try.c"
2730 $ WS := "write CONFIG"
2731 $ CS := "close CONFIG"
2732 $ DS := "delete/nolog/noconfirm []try.*;*"
2734 $ good_compile = %X10B90001
2737 $ open/write OPTCHAN []try.opt
2738 $ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
2739 $ write OPTCHAN "Sys$Share:VAXCRTL/Share"
2742 $ good_compile = %X10000001
2746 $ good_compile = %X15F60001
2748 $ good_link = %X10000001
2749 $ tmp = "" ! null string default
2751 $ GOTO beyond_compile_ok
2753 $! Check for type sizes
2759 $ WS "#include <stdlib.h>
2761 $ WS "#include <stdio.h>
2764 $ WS "printf(""%d\n"", sizeof(''tmp'));"
2771 $!: locate header file
2776 $ WS "#include <stdlib.h>
2778 $ WS "#include <stdio.h>
2779 $ WS "#include <''tmp'>"
2782 $ WS "printf(""define\n"");"
2789 $!: define an alternate in-header-list? function
2793 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
2795 $ echo4 "<''tmp'> found."
2798 $ echo4 "<''tmp'> NOT found."
2803 $!: define an is-in-libc? function
2806 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
2808 $ echo4 "''tmp'() found."
2811 $ echo4 "''tmp'() NOT found."
2816 $!: define a shorthand compile call
2820 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
2822 $ OPEN/WRITE CONFIG []try.out
2823 $ DEFINE/USER_MODE SYS$ERROR CONFIG
2824 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
2827 $ OPEN/READ CONFIG []try.out
2830 $ DELETE/NOLOG/NOCONFIRM []try.out;
2831 $ DELETE/NOLOG/NOCONFIRM []try.exe;
2833 $ tmp = "" ! null string default
2839 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
2840 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
2844 $ 'ld' try.obj,try.opt/opt
2845 $ link_status = $status
2848 $ link_status = $status
2851 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
2854 $!: define a shorthand compile call for compilations that should be ok.
2856 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
2857 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
2860 $ compile_status = $status
2862 $ DELETE/NOLOG/NOCONFIRM try.c;
2867 $! Check for __STDC__
2871 $ WS "#include <stdlib.h>
2873 $ WS "#include <stdio.h>
2876 $ WS "#ifdef __STDC__
2877 $ WS "printf(""42\n"");
2879 $ WS "printf(""1\n"");
2886 $ IF F$INTEGER(tmp) .eq. 42
2888 $ echo4 "Your C compiler and pre-processor defines the symbol:"
2892 $! Check for double size
2894 $ echo4 "Checking to see how big your double precision numbers are..."
2896 $ GOSUB type_size_check
2898 $ echo "Your double is ''doublesize' bytes long."
2900 $! Check for long double size
2904 $ WS "#include <stdlib.h>
2906 $ WS "#include <stdio.h>
2909 $ WS "printf(""%d\n"", sizeof(long double));
2913 $ echo4 "Checking to see if you have long double..."
2915 $ IF link_status .NE. good_link
2919 $ echo "You do not have long double."
2921 $ echo "You have long double."
2922 $ echo4 "Checking to see how big your long doubles are..."
2925 $ d_longdbl = "define"
2926 $ echo "Your long doubles are ''longdblsize' bytes long."
2929 $!: check for long long
2932 $ WS "#include <stdlib.h>
2934 $ WS "#include <stdio.h>
2937 $ WS "printf(""%d\n"", sizeof(long long));
2941 $ echo4 "Checking to see if you have long long..."
2943 $ IF link_status .NE. good_link
2946 $ d_longlong="undef"
2947 $ echo "You do not have long long."
2949 $ echo "You have long long."
2950 $ echo4 "Checking to see how big your long longs are..."
2952 $ longlongsize = tmp
2953 $ d_longlong = "define"
2954 $ echo "Your long longs are ''longlongsize' bytes long."
2957 $! Check the prototype for getgid
2959 $ echo "Looking for the type for group ids returned by getgid()."
2962 $ WS "#include <stdlib.h>
2964 $ WS "#include <stdio.h>
2965 $ WS "#include <types.h>
2973 $ IF compile_status .NE. good_compile
2975 $! Okay, gid_t failed. Must be unsigned int
2976 $ gidtype = "unsigned int"
2977 $ echo4 "assuming ""''gidtype'""."
2980 $ echo4 "gid_t found."
2983 $! Check to see if we've got dev_t
2985 $ echo "Looking for the type for dev."
2988 $ WS "#include <stdlib.h>
2990 $ WS "#include <stdio.h>
2991 $ WS "#include <types.h>
2999 $ IF compile_status .NE. good_compile
3001 $! Okay, dev_t failed. Must be unsigned int
3002 $ devtype = "unsigned int"
3003 $ echo4 "assuming ""''devtype'""."
3006 $ echo4 "dev_t found."
3009 $! Check to see if we've got unistd.h (which we ought to, but you never know)
3016 $!: see if this is a libutil.h system
3022 $! Check to see if we've got shadow.h (probably not, but...)
3028 $! Check to see if we've got socks.h (probably not, but...)
3034 $! Check the prototype for select
3036 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3040 $ WS "#include <stdlib.h>
3042 $ WS "#include <stdio.h>
3043 $ WS "#include <types.h>
3044 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>
3047 $ WS "#include <socketshr.h>"
3049 $ WS "#include <time.h>
3050 $ WS "#include <socket.h>
3057 $ WS "bar = select(2, foo, foo, foo, NULL);
3062 $ IF compile_status .NE. good_compile
3064 $! Okay, select failed. Must be an int *
3065 $ selecttype = "int *"
3066 $ echo4 "select() NOT found."
3068 $ selecttype="fd_set *"
3069 $ echo4 "select() found."
3072 $ ! No sockets, so stick in an int * : no select, so pick a harmless default
3073 $ selecttype = "int *"
3076 $! Check to see if fd_set exists
3078 $ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3081 $ WS "#include <stdlib.h>
3083 $ WS "#include <stdio.h>
3084 $ WS "#include <types.h>
3087 $ WS "#include <socketshr.h>"
3089 $ IF Has_Dec_C_Sockets
3091 $ WS "#include <time.h>
3092 $ WS "#include <socket.h>
3102 $ IF compile_status .ne. good_compile
3104 $! Okay, fd_set failed. Must not exist
3105 $ d_fd_set = "undef"
3106 $ echo4 "Hmm, your compiler has some difficulty with fd_set."
3109 $ echo4 "Well, your system knows about the normal fd_set typedef..."
3112 $! Check for inttypes.h
3114 $ tmp = "inttypes.h"
3118 $! Check to see if off64_t exists
3120 $ echo4 "Checking to see if you have off64_t..."
3123 $ WS "#include <stdlib.h>
3125 $ WS "#include <stdio.h>
3126 $ WS "#include <types.h>
3127 $ WS "#''i_inttypes IIH
3129 $ WS "#include <inttypes.h>
3138 $ IF compile_status .EQ. good_compile
3140 $ d_off64_t="define"
3141 $ echo "You have off64_t."
3143 $ d_off64_t = "undef"
3144 $ echo "You do not have off64_t."
3147 $! Check to see if fpos64_t exists
3149 $ echo4 "Checking to see if you have fpos64_t..."
3152 $ WS "#include <stdlib.h>
3154 $ WS "#include <stdio.h>
3155 $ WS "#include <types.h>
3156 $ WS "#''i_inttypes IIH
3158 $ WS "#include <inttypes.h>
3167 $ IF compile_status .EQ. good_compile
3169 $ d_fpos64_t="define"
3170 $ echo "You have fpos64_t."
3172 $ d_fpos64_t = "undef"
3173 $ echo "You do not have fpos64_t."
3176 $! Check to see if int64_t exists
3178 $ echo4 "Checking to see if you have int64_t..."
3181 $ WS "#include <stdlib.h>
3183 $ WS "#include <stdio.h>
3184 $ WS "#include <types.h>
3185 $ WS "#''i_inttypes IIH
3187 $ WS "#include <inttypes.h>
3196 $ IF compile_status .EQ. good_compile
3198 $ d_int64_t="define"
3199 $ echo "You have int64_t."
3201 $ d_int64_t = "undef"
3202 $ echo "You do not have int64_t."
3205 $!: see if this is a netdb.h system
3206 $ IF Has_Dec_C_Sockets
3213 $! Check for h_errno
3215 $ echo4 "Checking to see if you have h_errno..."
3218 $ WS "#include <stdlib.h>
3220 $ WS "#include <stdio.h>
3221 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>
3222 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3230 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3233 $ echo "You have h_errno."
3236 $ echo "You do not have h_errno."
3239 $! Check to see if gethostname exists
3241 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3245 $ WS "#include <stdlib.h>
3247 $ WS "#include <stdio.h>
3248 $ WS "#include <types.h>
3251 $ WS "#include <socketshr.h>"
3253 $ WS "#include <time.h>
3254 $ WS "#include <socket.h>
3258 $ WS "char name[100];
3261 $ WS "baz = gethostname(name, bar);
3266 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3268 $ d_gethname="define"
3269 $ echo4 "gethostname() found."
3271 $ d_gethname="undef"
3274 $ ! No sockets, so no gethname
3275 $ d_gethname = "undef"
3278 $! Check for sys/file.h
3280 $ tmp = "sys/file.h"
3284 $! Check for sys/utsname.h
3286 $ tmp = "sys/utsname.h"
3288 $ i_sysutsname = tmp
3290 $! Check for syslog.h
3302 $! Check for sys/uio.h
3308 $! Check for sys/mode.h
3310 $ tmp = "sys/mode.h"
3314 $! Check for sys/access.h
3316 $ tmp = "sys/access.h"
3320 $! Check for sys/security.h
3322 $ tmp = "sys/security.h"
3326 $! Check for fcntl.h
3336 $ WS "#include <stdlib.h>
3338 $ WS "#include <stdio.h>
3339 $ WS "#include <fcntl.h>
3354 $ WS "#include <stdlib.h>
3356 $ WS "#include <string.h>
3360 $ WS "place = memchr(""foo"", 47, 3)
3368 $! Check for strtoull
3372 $ WS "#include <stdlib.h>
3374 $ WS "#include <string.h>
3377 $ WS "unsigned __int64 result;
3378 $ WS "result = strtoull(""123123"", NULL, 10);
3386 $! Check for strtouq
3390 $ WS "#include <stdlib.h>
3392 $ WS "#include <string.h>
3395 $ WS "unsigned __int64 result;
3396 $ WS "result = strtouq(""123123"", NULL, 10);
3404 $! Check for strtoll
3408 $ WS "#include <stdlib.h>
3410 $ WS "#include <string.h>
3413 $ WS "__int64 result;
3414 $ WS "result = strtoll(""123123"", NULL, 10);
3422 $! Check for strtold
3426 $ WS "#include <stdlib.h>
3428 $ WS "#include <string.h>
3431 $ WS "long double result;
3432 $ WS "result = strtold(""123123"", NULL, 10);
3444 $ WS "#include <stdlib.h>
3446 $ WS "#include <string.h>
3449 $ WS " __int64 result;
3450 $ WS "result = atoll(""123123"");
3462 $ WS "#include <stdlib.h>
3464 $ WS "#include <string.h>
3468 $ WS "result = atolf(""123123"");
3480 $ WS "#include <stdlib.h>
3482 $ WS "#include <stdio.h>
3485 $ WS "access("foo", F_OK);
3497 $ WS "#include <stdlib.h>
3499 $ WS "#include <stdio.h>
3500 $ WS "#include <strings.h>
3504 $ WS "bzero(foo, 10);
3516 $ WS "#include <stdlib.h>
3518 $ WS "#include <stdio.h>
3519 $ WS "#include <strings.h>
3522 $ WS "char foo[10], bar[10];
3523 $ WS "bcopy(""foo"", bar, 3);
3531 $! Check for mkstemp
3535 $ WS "#include <stdlib.h>
3537 $ WS "#include <stdio.h>
3540 $ WS "mkstemp(""foo"");
3548 $! Check for mkstemps
3552 $ WS "#include <stdlib.h>
3554 $ WS "#include <stdio.h>
3557 $ WS "mkstemps(""foo"", 1);
3569 $ WS "#include <stdlib.h>
3571 $ WS "#include <stdio.h>
3572 $ WS "#include <iconv.h>
3575 $ WS " iconv_t cd = (iconv_t)0;"
3576 $ WS " char *inbuf, *outbuf;"
3577 $ WS " size_t inleft, outleft;"
3578 $ WS " iconv(cd, &inbuf, &inleft, &outbuf, &outleft);"
3583 $ IF compile_status .ne. good_compile
3588 $ IF link_status .ne. good_link
3597 $ IF i_iconv .eqs. "define"
3598 $ THEN echo4 "<iconv.h> found."
3599 $ ELSE echo4 "<iconv.h> NOT found."
3602 $! Check for mkdtemp
3606 $ WS "#include <stdlib.h>
3608 $ WS "#include <stdio.h>
3611 $ WS "mkdtemp(""foo"");
3619 $! Check for setvbuf
3623 $ WS "#include <stdlib.h>
3625 $ WS "#include <stdio.h>
3629 $ WS "char Buffer[99];
3630 $ WS "foo = fopen(""foo"", ""r"");
3631 $ WS "setvbuf(foo, Buffer, 0, 0);
3643 $ WS "#include <stdlib.h>
3645 $ WS "#include <stdio.h>
3648 $ WS "setenv(""FOO"", ""BAR"", 0);
3656 $! Check for setproctitle
3660 $ WS "#include <stdlib.h>
3662 $ WS "#include <stdio.h>
3665 $ WS "setproctitle(""%s"", ""FOO"");
3669 $ tmp = "setproctitle"
3671 $ d_setproctitle = tmp
3673 $! Check for <netinet/in.h>
3675 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
3677 $ tmp = "netinet/in.h"
3684 $! Check for <netinet/tcp.h>
3686 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
3688 $ tmp = "netinet/tcp.h"
3690 $ i_netinettcp = tmp
3692 $ i_netinettcp="undef"
3695 $! Check for endhostent
3697 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
3701 $ WS "#include <stdlib.h>
3703 $ WS "#include <stdio.h>
3705 $ THEN WS "#include <socketshr.h>"
3706 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3714 $ tmp = "endhostent"
3721 $! Check for endnetent
3723 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
3727 $ WS "#include <stdlib.h>
3729 $ WS "#include <stdio.h>
3731 $ THEN WS "#include <socketshr.h>"
3732 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3747 $! Check for endprotoent
3749 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3753 $ WS "#include <stdlib.h>
3755 $ WS "#include <stdio.h>
3757 $ THEN WS "#include <socketshr.h>"
3758 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3762 $ WS "endprotoent();
3766 $ tmp = "endprotoent"
3773 $! Check for endservent
3775 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3779 $ WS "#include <stdlib.h>
3781 $ WS "#include <stdio.h>
3783 $ THEN WS "#include <socketshr.h>"
3784 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3792 $ tmp = "endservent"
3799 $! Check for sethostent
3801 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3805 $ WS "#include <stdlib.h>
3807 $ WS "#include <stdio.h>
3809 $ THEN WS "#include <socketshr.h>"
3810 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3814 $ WS "sethostent(1);
3818 $ tmp = "sethostent"
3825 $! Check for setnetent
3827 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3831 $ WS "#include <stdlib.h>
3833 $ WS "#include <stdio.h>
3835 $ THEN WS "#include <socketshr.h>"
3836 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3851 $! Check for setprotoent
3853 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3857 $ WS "#include <stdlib.h>
3859 $ WS "#include <stdio.h>
3861 $ THEN WS "#include <socketshr.h>"
3862 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3866 $ WS "setprotoent(1);
3870 $ tmp = "setprotoent"
3877 $! Check for setservent
3879 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3883 $ WS "#include <stdlib.h>
3885 $ WS "#include <stdio.h>
3887 $ THEN WS "#include <socketshr.h>"
3888 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3892 $ WS "setservent(1);
3896 $ tmp = "setservent"
3903 $! Check for gethostent
3905 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3909 $ WS "#include <stdlib.h>
3911 $ WS "#include <stdio.h>
3913 $ THEN WS "#include <socketshr.h>"
3914 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3922 $ tmp = "gethostent"
3929 $! Check for getnetent
3931 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3935 $ WS "#include <stdlib.h>
3937 $ WS "#include <stdio.h>
3939 $ THEN WS "#include <socketshr.h>"
3940 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3955 $! Check for getprotoent
3957 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3961 $ WS "#include <stdlib.h>
3963 $ WS "#include <stdio.h>
3965 $ THEN WS "#include <socketshr.h>"
3966 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3970 $ WS "getprotoent();
3974 $ tmp = "getprotoent"
3981 $! Check for getservent
3983 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3987 $ WS "#include <stdlib.h>
3989 $ WS "#include <stdio.h>
3991 $ THEN WS "#include <socketshr.h>"
3992 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
4000 $ tmp = "getservent"
4007 $! Check for socklen_t
4009 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4011 $ echo4 "Checking to see if you have socklen_t..."
4014 $ WS "#include <stdlib.h>
4016 $ WS "#include <stdio.h>
4018 $ THEN WS "#include <socketshr.h>"
4019 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
4023 $ WS "socklen_t x = 16;
4028 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4030 $ d_socklen_t="define"
4031 $ echo "You have socklen_t."
4033 $ d_socklen_t="undef"
4034 $ echo "You do not have socklen_t."
4037 $ d_socklen_t="undef"
4040 $! Check for pthread_yield
4046 $ WS "#include <stdlib.h>
4048 $ WS "#include <pthread.h>
4049 $ WS "#include <stdio.h>
4052 $ WS "pthread_yield();
4056 $ tmp = "pthread_yield"
4058 $ d_pthread_yield = tmp
4060 $ d_pthread_yield="undef"
4063 $! Check for sched_yield
4069 $ WS "#include <stdlib.h>
4071 $ WS "#include <pthread.h>
4072 $ WS "#include <stdio.h>
4075 $ WS "sched_yield();
4079 $ tmp = "sched_yield"
4081 $ d_sched_yield = tmp
4082 $ IF d_sched_yield .EQS. "define"
4083 $ THEN sched_yield = "sched_yield"
4084 $ ELSE sched_yield = " "
4087 $ d_sched_yield="undef"
4091 $! Check for generic pointer size
4093 $ echo4 "Checking to see how big your pointers are..."
4096 $ WS "#include <stdlib.h>
4098 $ WS "#include <stdio.h>
4102 $ WS "foo = sizeof(char *);
4103 $ WS "printf(""%d\n"", foo);
4108 $ GOSUB type_size_check
4110 $ echo "Your pointers are ''ptrsize' bytes long."
4112 $! Check for size_t size
4116 $ echo4 "Checking the size of ''zzz'..."
4117 $ GOSUB type_size_check
4119 $ echo "Your ''zzz' size is ''sizesize' bytes."
4121 $! Check rand48 and its ilk
4123 $ echo4 "Looking for a random number function..."
4126 $ WS "#include <stdlib.h>
4128 $ WS "#include <stdio.h>
4131 $ WS "srand48(12L);"
4136 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4138 $ drand01 = "drand48()"
4139 $ randseedtype = "long int"
4140 $ seedfunc = "srand48"
4141 $ echo4 "Good, found drand48()."
4142 $ d_drand48proto = "define"
4144 $ d_drand48proto = "undef"
4145 $ drand01="random()"
4146 $ randseedtype = "unsigned"
4147 $ seedfunc = "srandom"
4150 $ WS "#include <stdlib.h>
4152 $ WS "#include <stdio.h>
4160 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4162 $ echo4 "OK, found random()."
4164 $ drand01="(((float)rand())/((float)RAND_MAX))"
4165 $ randseedtype = "unsigned"
4166 $ seedfunc = "srand"
4167 $ echo4 "Yick, looks like I have to use rand()."
4171 $! Done with compiler checks. Clean up.
4172 $ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
4173 $ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
4174 $ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
4175 $ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
4176 $ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
4179 $ CALL Cxx_demangler_cleanup
4182 $! Some that are compiler or VMS version sensitive
4187 $ d_attribut="define"
4191 $ d_attribut="undef"
4194 $! Dec C >= 5.2 and VMS ver >= 7.0
4195 $ IF (Using_Dec_C).AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.(vms_ver .GES. "7.0")
4198 $ d_gettimeod="define"
4200 $ d_sigaction="define"
4201 $ d_truncate="define"
4205 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2 SPARE18 SPARE19 CHLD CONT STOP TSTP TTIN TTOU DEBUG SPARE27 SPARE28 SPARE29 SPARE30 SPARE31 SPARE32 RTMIN RTMAX"",0"
4206 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4207 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
4208 $ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
4209 $ sig_name_init = psnwc1 + psnwc2 + psnwc3
4210 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 64"","0"
4211 $ 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"
4212 $! perl_sig_num_with_commas=sig_num_init
4214 $ d_pathconf="define"
4215 $ d_fpathconf="define"
4216 $ d_sysconf="define"
4217 $ d_sigsetjmp="define"
4219 $ pidtype="unsigned int"
4220 $ d_gettimeod="undef"
4223 $ d_sigaction="undef"
4224 $ d_truncate="undef"
4227 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"",0"
4228 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4229 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
4230 $ sig_name_init = psnwc1 + psnwc2
4231 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"",0"
4232 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
4233 $! perl_sig_num_with_commas=sig_num_init
4234 $ uidtype="unsigned int"
4235 $ d_pathconf="undef"
4236 $ d_fpathconf="undef"
4238 $ d_sigsetjmp="undef"
4244 $ d_mbstowcs="define"
4246 $ d_stdiobase="define"
4247 $ d_stdio_cnt_lval="define"
4248 $ d_stdio_ptr_lval="define"
4249 $ d_stdstdio="define"
4250 $ d_wcstombs="define"
4253 $ d_strcoll="define"
4254 $ d_strxfrm="define"
4257 $ d_locconv="define"
4258 $ d_setlocale="define"
4259 $ vms_cc_type="decc"
4261 $ d_mbstowcs="undef"
4263 $ d_stdiobase="undef"
4264 $ d_stdio_cnt_lval="undef"
4265 $ d_stdio_ptr_lval="undef"
4266 $ d_stdstdio="undef"
4267 $ d_wcstombs="undef"
4275 $ d_setlocale="undef"
4279 $ if Has_Socketshr .OR. Has_Dec_C_Sockets
4281 $ d_vms_do_sockets="define"
4285 $ netdb_hlen_type="int"
4286 $ netdb_host_type="char *"
4287 $ netdb_name_type="char *"
4288 $ netdb_net_type="long"
4289 $ d_gethbyaddr="define"
4290 $ d_gethbyname="define"
4291 $ d_getnbyaddr="define"
4292 $ d_getnbyname="define"
4293 $ d_getpbynumber="define"
4294 $ d_getpbyname="define"
4295 $ d_getsbyport="define"
4296 $ d_getsbyname="define"
4297 $ d_gethostprotos="define"
4298 $ d_getnetprotos="define"
4299 $ d_getprotoprotos="define"
4300 $ d_getservprotos="define"
4303 $ socksizetype="unsigned int"
4305 $ socksizetype="int *"
4308 $ d_vms_do_sockets="undef"
4312 $ netdb_hlen_type="int"
4313 $ netdb_host_type="char *"
4314 $ netdb_name_type="char *"
4315 $ netdb_net_type="long"
4316 $ d_gethbyaddr="undef"
4317 $ d_gethbyname="undef"
4318 $ d_getnbyaddr="undef"
4319 $ d_getnbyname="undef"
4320 $ d_getpbynumber="undef"
4321 $ d_getpbyname="undef"
4322 $ d_getsbyport="undef"
4323 $ d_getsbyname="undef"
4324 $ d_gethostprotos="undef"
4325 $ d_getnetprotos="undef"
4326 $ d_getprotoprotos="undef"
4327 $ d_getservprotos="undef"
4328 $ socksizetype="undef"
4333 $ usethreads="define"
4334 $ d_pthreads_created_joinable="define"
4335 $ if (vms_ver .GES. "7.0")
4337 $ d_oldpthreads="undef"
4339 $ d_oldpthreads="define"
4342 $ d_oldpthreads="undef"
4343 $ usethreads="undef"
4344 $ d_pthreads_created_joinable="undef"
4347 $! new (5.005_62++) typedefs for primitives
4349 $ echo "Choosing the C types to be used for Perl's internal types..."
4351 $ uvtype="unsigned long"
4353 $ u8type="unsigned char"
4355 $ u16type="unsigned short"
4357 $ u32type="unsigned int"
4358 $ i64type="long long"
4359 $ u64type="unsigned long long"
4362 $ IF use64bitint .OR. use64bitint .EQS. "define"
4364 $ ivtype = "''i64type'"
4365 $ uvtype = "''u64type'"
4366 $ nvtype="long double"
4373 $ GOSUB type_size_check
4375 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp
4376 $ IF ivtype .eqs. "long"
4377 $ THEN longsize = tmp
4380 $ GOSUB type_size_check
4385 $ GOSUB type_size_check
4387 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp
4390 $ GOSUB type_size_check
4394 $ GOSUB type_size_check
4397 $ tmp = "''i16type'"
4398 $ GOSUB type_size_check
4400 $ IF i16type .eqs. "short"
4401 $ THEN shortsize = tmp
4404 $ gosub type_size_check
4408 $ tmp = "''u16type'"
4409 $ GOSUB type_size_check
4412 $ tmp = "''i32type'"
4413 $ GOSUB type_size_check
4415 $ IF i32type .eqs. "int"
4416 $ THEN intsize = tmp
4419 $ gosub type_size_check
4423 $ tmp = "''u32type'"
4424 $ gosub type_size_check
4428 $ GOSUB type_size_check
4431 $ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
4432 $ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
4433 $ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
4435 $ echo4 "Checking whether your NVs can preserve your UVs..."
4438 $ WS "#include <stdlib.h>
4440 $ WS "#include <stdio.h>
4442 $ WS " ''uvtype' k = (''uvtype')~0, l;
4445 $ WS " d = (''nvtype')l;
4446 $ WS " l = (''uvtype')d;
4448 $ WS " printf(""preserve\n"");
4453 $ IF tmp .EQS. "preserve"
4455 $ d_nv_preserves_uv = "define"
4456 $ echo "Yes, they can."
4457 $ d_nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8)
4459 $ d_nv_preserves_uv = "undef"
4460 $ echo "No, they can't."
4461 $ echo4 "Checking how many bits of your UVs your NVs can preserve..."
4464 $ WS "#include <stdlib.h>
4466 $ WS "#include <stdio.h>
4468 $ WS " ''uvtype' u = 0;
4469 $ WS " int n = 8 * ''uvsize';
4471 $ WS " for (i = 0; i < n; i++) {
4472 $ WS " u = u << 1 | (''uvtype')1;
4473 $ WS " if ((''uvtype')(''nvtype')u != u)
4476 $ WS " printf(""%d\n"", i);
4480 $ d_nv_preserves_uv_bits = tmp
4484 $ ivdformat="""ld"""
4485 $ uvuformat="""lu"""
4486 $ uvoformat="""lo"""
4487 $ uvxformat="""lx"""
4493 $! Finally the composite ones. All config
4495 $ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
4499 $ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext'/NoList''ccflags'"
4501 $ IF use_vmsdebug_perl
4503 $ optimize="/Debug/NoOpt"
4510 $! Okay, we've got everything configured. Now go write out a config.sh.
4511 $ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
4512 $ echo4 "Creating ''basename_config_sh'..."
4513 $ open/write CONFIG 'config_sh
4514 $ WC := write CONFIG
4516 $! ##BEGIN WRITE NEW CONSTANTS HERE##
4520 $ WC "# This file was produced by Configure.COM on a ''osname' system."
4522 $ WC "# Package name : ''package'"
4523 $ WC "# Source directory : ''src'"
4524 $ WC "# Configuration time: " + cf_time
4525 $ WC "# Configuration by : " + cf_by
4526 $ WC "# Target system : " + myuname
4528 $ WC "CONFIG='true'"
4529 $ WC "Makefile_SH='" + Makefile_SH + "'"
4530 $ WC "Mcc='" + Mcc + "'"
4531 $! WC "PERL_SUBVERSION='" + subversion + "'" ! VMS specific to descrip_mms.template
4532 $ WC "PERL_VERSION='" + patchlevel + "'" ! VMS specific to descrip_mms.template
4533 $ WC "alignbytes='" + alignbytes + "'"
4534 $ WC "aphostname='" + "'"
4536 $ WC "archlib='" + archlib + "'"
4537 $ WC "archlibexp='" + archlibexp + "'"
4538 $ WC "archname='" + archname + "'"
4539 $ WC "baserev='" + baserev + "'"
4540 $ WC "bin='" + bin + "'"
4541 $ WC "binexp='" + binexp + "'"
4542 $ WC "builddir='" + builddir + "'"
4543 $ WC "byteorder='1234'"
4544 $ WC "castflags='0'"
4545 $ WC "cc='" + perl_cc + "'"
4546 $ WC "cccdlflags='" + cccdlflags + "'"
4547 $ WC "ccdlflags='" + ccdlflags + "'"
4548 $ WC "ccflags='" + ccflags + "'"
4549 $ WC "ccversion='" + ccversion + "'" ! VMS specific, oddly enough
4550 $ WC "cf_by='" + cf_by + "'"
4551 $ WC "cf_email='" + cf_email + "'"
4552 $ WC "cf_time='" + cf_time + "'"
4553 $ WC "config_args='" + config_args + "'"
4554 $ WC "config_sh='" + config_sh + "'"
4555 $ WC "cpp_stuff='" + cpp_stuff + "'"
4556 $ WC "cpplast='" + cpplast + "'"
4557 $ WC "cppminus='" + cppminus + "'"
4558 $ WC "cpprun='" + cpprun + "'"
4559 $ WC "cppstdin='" + cppstdin + "'"
4560 $ WC "crosscompile='undef'"
4561 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
4562 $ WC "d_PRId64='" + d_PRId64 + "'"
4563 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
4564 $ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
4565 $ WC "d_PRIo64='" + d_PRIo64 + "'"
4566 $ WC "d_PRIu64='" + d_PRIu64 + "'"
4567 $ WC "d_PRIx64='" + d_PRIx64 + "'"
4568 $ WC "d_access='" + d_access + "'"
4569 $ WC "d_accessx='undef'"
4570 $ WC "d_alarm='define'"
4571 $ WC "d_archlib='define'"
4572 $ WC "d_atolf='" + d_atolf + "'"
4573 $ WC "d_atoll='" + d_atoll + "'"
4574 $ WC "d_attribut='" + d_attribut + "'"
4575 $ WC "d_bcmp='" + d_bcmp + "'"
4576 $ WC "d_bcopy='" + d_bcopy + "'"
4577 $ WC "d_bincompat3='undef'"
4578 $ WC "d_bincompat5005='undef'"
4579 $ WC "d_bsdgetpgrp='undef'"
4580 $! WC "d_bsdpgrp='undef'"
4581 $ WC "d_bsdsetpgrp='undef'"
4582 $ WC "d_bzero='" + d_bzero + "'"
4583 $ WC "d_casti32='define'"
4584 $ WC "d_castneg='define'"
4585 $ WC "d_charvspr='undef'"
4586 $ WC "d_chown='define'"
4587 $ WC "d_chroot='undef'"
4588 $ WC "d_chsize='undef'"
4589 $ WC "d_cmsghdr_s='undef'"
4590 $ WC "d_const='define'"
4591 $ WC "d_crypt='define'"
4592 $ WC "d_csh='undef'"
4593 $ WC "d_cuserid='define'"
4594 $ WC "d_dbl_dig='define'"
4595 $ WC "d_difftime='define'"
4596 $ WC "d_dirnamlen='define'"
4597 $ WC "d_dlerror='undef'"
4598 $ WC "d_dlsymun='undef'"
4599 $ WC "d_dosuid='undef'"
4600 $ WC "d_drand48proto='" + d_drand48proto + "'"
4601 $ WC "d_dup2='define'"
4602 $ WC "d_eaccess='undef'"
4603 $ WC "d_endgrent='define'"
4604 $ WC "d_endhent='" + d_endhent + "'"
4605 $ WC "d_endnent='" + d_endnent + "'"
4606 $ WC "d_endpent='" + d_endpent + "'"
4607 $ WC "d_endpwent='define'"
4608 $ WC "d_endsent='" + d_endsent + "'"
4609 $ WC "d_eofnblk='undef'"
4610 $ WC "d_eunice='undef'"
4611 $ WC "d_fchmod='undef'"
4612 $ WC "d_fchown='undef'"
4613 $ WC "d_fcntl='" + d_fcntl + "'"
4614 $ WC "d_fd_set='" + d_fd_set + "'"
4615 $ WC "d_fgetpos='define'"
4616 $ WC "d_flexfnam='define'"
4617 $ WC "d_flock='undef'"
4618 $ WC "d_fork='undef'"
4619 $ WC "d_fpathconf='" + d_fpathconf + "'"
4620 $ WC "d_fpos64_t='" + d_fpos64_t + "'"
4621 $ WC "d_frexpl='" + d_frexpl + "'"
4622 $ WC "d_fs_data_s='undef'"
4623 $ WC "d_fseeko='undef'"
4624 $ WC "d_fsetpos='define'"
4625 $ WC "d_fstatfs='undef'"
4626 $ WC "d_fstatvfs='undef'"
4627 $ WC "d_ftello='undef'"
4628 $ WC "d_getcwd='undef'"
4629 $ WC "d_getespwnam='undef'"
4630 $ WC "d_getfsstat='undef'"
4631 $ WC "d_getgrent='define'"
4632 $ WC "d_getgrps='undef'"
4633 $ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
4634 $ WC "d_gethbyname='" + d_gethbyname + "'"
4635 $ WC "d_gethent='" + d_gethent + "'"
4636 $ WC "d_gethname='" + d_gethname + "'"
4637 $ WC "d_gethostprotos='" + d_gethostprotos + "'"
4638 $ WC "d_getlogin='define'"
4639 $ WC "d_getmnt='undef'"
4640 $ WC "d_getmntent='undef'"
4641 $ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
4642 $ WC "d_getnbyname='" + d_getnbyname + "'"
4643 $ WC "d_getnent='" + d_getnent + "'"
4644 $ WC "d_getnetprotos='" + d_getnetprotos + "'"
4645 $ WC "d_getpbyname='" + d_getpbyname + "'"
4646 $ WC "d_getpbynumber='" + d_getpbynumber + "'"
4647 $ WC "d_getpent='" + d_getpent + "'"
4648 $ WC "d_getpgid='undef'"
4649 $ WC "d_getpgrp2='undef'"
4650 $ WC "d_getpgrp='undef'"
4651 $ WC "d_getppid='undef'"
4652 $ WC "d_getprior='undef'"
4653 $ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
4654 $ WC "d_getprpwnam='undef'"
4655 $ WC "d_getpwent='define'"
4656 $ WC "d_getsbyname='" + d_getsbyname + "'"
4657 $ WC "d_getsbyport='" + d_getsbyport + "'"
4658 $ WC "d_getsent='" + d_getsent + "'"
4659 $ WC "d_getservprotos='" + d_getservprotos + "'"
4660 $ WC "d_getspnam='undef'"
4661 $ WC "d_gettimeod='" + d_gettimeod + "'"
4662 $ WC "d_gnulibc='undef'"
4663 $ WC "d_grpasswd='undef'"
4664 $ WC "d_hasmntopt='undef'"
4665 $ WC "d_htonl='" + d_htonl + "'"
4666 $ WC "d_iconv='" + d_iconv +"'"
4667 $ WC "d_index='" + d_index + "'"
4668 $ WC "d_inetaton='undef'"
4669 $ WC "d_int64_t='" + d_int64_t + "'"
4670 $ WC "d_isascii='define'"
4671 $ WC "d_isnan='define'"
4672 $ WC "d_isnanl='" + d_isnanl + "'"
4673 $ WC "d_killpg='undef'"
4674 $ WC "d_lchown='undef'"
4675 $ WC "d_ldbl_dig='define'"
4676 $ WC "d_link='undef'"
4677 $ WC "d_llseek='undef'"
4678 $ WC "d_locconv='" + d_locconv + "'"
4679 $ WC "d_lockf='undef'"
4680 $ WC "d_longdbl='" + d_longdbl + "'"
4681 $ WC "d_longlong='" + d_longlong + "'"
4682 $ WC "d_lseekproto='define'"
4683 $ WC "d_lstat='undef'"
4684 $ WC "d_madvise='undef'"
4685 $ WC "d_mblen='" + d_mblen + "'"
4686 $ WC "d_mbstowcs='" + d_mbstowcs + "'"
4687 $ WC "d_mbtowc='" + d_mbtowc + "'"
4688 $ WC "d_memchr='" + d_memchr + "'"
4689 $ WC "d_memcmp='define'"
4690 $ WC "d_memcpy='define'"
4691 $ WC "d_memmove='define'"
4692 $ WC "d_memset='define'"
4693 $ WC "d_mkdir='define'"
4694 $ WC "d_mkdtemp='" + d_mkdtemp + "'"
4695 $ WC "d_mkfifo='undef'"
4696 $ WC "d_mknod='undef'"
4697 $ WC "d_mkstemp='" + d_mkstemp + "'"
4698 $ WC "d_mkstemps='" + d_mkstemps + "'"
4699 $ WC "d_mktime='" + d_mktime + "'"
4700 $ WC "d_mmap='undef'"
4701 $ WC "d_modfl='" + d_modfl + "'"
4702 $ WC "d_mprotect='undef'"
4703 $ WC "d_msg='undef'"
4704 $ WC "d_msg_ctrunc='undef'"
4705 $ WC "d_msg_dontroute='undef'"
4706 $ WC "d_msg_oob='undef'"
4707 $ WC "d_msg_peek='undef'"
4708 $ WC "d_msg_proxy='undef'"
4709 $ WC "d_msghdr_s='undef'"
4710 $ WC "d_msync='undef'"
4711 $ WC "d_munmap='undef'"
4712 $ WC "d_mymalloc='" + d_mymalloc + "'"
4713 $ WC "d_nice='define'"
4714 $ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
4715 $ WC "d_nv_preserves_uv_bits='" + d_nv_preserves_uv_bits + "'"
4716 $ WC "d_off64_t='" + d_off64_t + "'"
4717 $ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
4718 $ WC "d_oldarchlib='define'"
4719 $ WC "d_oldpthreads='" + d_oldpthreads + "'"
4720 $ WC "d_open3='define'"
4721 $ WC "d_pathconf='" + d_pathconf + "'"
4722 $ WC "d_pause='define'"
4723 $ WC "d_perl_otherlibdirs='undef'"
4724 $ WC "d_phostname='undef'"
4725 $ WC "d_pipe='define'"
4726 $ WC "d_poll='undef'"
4727 $ WC "d_pthread_yield='" + d_pthread_yield + "'"
4728 $ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
4729 $ WC "d_pwage='undef'"
4730 $ WC "d_pwchange='undef'"
4731 $ WC "d_pwclass='undef'"
4732 $ WC "d_pwcomment='define'"
4733 $ WC "d_pwexpire='undef'"
4734 $ WC "d_pwgecos='define'"
4735 $ WC "d_pwpasswd='define'"
4736 $ WC "d_pwquota='undef'"
4737 $ WC "d_qgcvt='undef'"
4738 $ WC "d_quad='" + d_quad + "'"
4739 $ WC "d_readdir='define'"
4740 $ WC "d_readlink='undef'"
4741 $ WC "d_readv='undef'"
4742 $ WC "d_recvmsg='undef'"
4743 $ WC "d_rename='define'"
4744 $ WC "d_rewinddir='define'"
4745 $ WC "d_rmdir='define'"
4746 $ WC "d_safebcpy='undef'"
4747 $ WC "d_safemcpy='define'"
4748 $ WC "d_sanemcmp='define'"
4749 $ WC "d_sched_yield='" + d_sched_yield + "'"
4750 $ WC "d_scm_rights='undef'"
4751 $ WC "d_seekdir='define'"
4752 $ WC "d_select='" + d_select + "'"
4753 $ WC "d_sem='undef'"
4754 $ WC "d_semctl_semid_ds='undef'"
4755 $ WC "d_semctl_semun='undef'"
4756 $ WC "d_sendmsg='undef'"
4757 $ WC "d_setegid='undef'"
4758 $ WC "d_setenv='" + d_setenv + "'"
4759 $ WC "d_seteuid='undef'"
4760 $ WC "d_setgrent='undef'"
4761 $ WC "d_setgrps='undef'"
4762 $ WC "d_sethent='" + d_sethent + "'"
4763 $ WC "d_setlinebuf='undef'"
4764 $ WC "d_setlocale='" + d_setlocale + "'"
4765 $ WC "d_setnent='" + d_setnent + "'"
4766 $ WC "d_setpent='" + d_setpent + "'"
4767 $ WC "d_setpgid='undef'"
4768 $ WC "d_setpgrp2='undef'"
4769 $ WC "d_setpgrp='undef'"
4770 $ WC "d_setprior='undef'"
4771 $ WC "d_setproctitle='" + d_setproctitle + "'"
4772 $ WC "d_setpwent='define'"
4773 $ WC "d_setregid='undef'"
4774 $ WC "d_setresgid='undef'"
4775 $ WC "d_setresuid='undef'"
4776 $ WC "d_setreuid='undef'"
4777 $ WC "d_setrgid='undef'"
4778 $ WC "d_setruid='undef'"
4779 $ WC "d_setsent='" + d_setsent + "'"
4780 $ WC "d_setsid='undef'"
4781 $ WC "d_setvbuf='" + d_setvbuf + "'"
4782 $ WC "d_sfio='undef'"
4783 $ WC "d_shm='undef'"
4784 $ WC "d_shmatprototype='undef'"
4785 $ WC "d_sigaction='" + d_sigaction + "'"
4786 $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
4787 $ WC "d_socket='" + d_socket + "'"
4788 $ WC "d_socklen_t='" + d_socklen_t + "'"
4789 $ WC "d_sockpair='undef'"
4790 $ WC "d_sqrtl='define'"
4791 $ WC "d_statblks='undef'"
4792 $ WC "d_statfs_f_flags='undef'"
4793 $ WC "d_statfs_s='undef'"
4794 $ WC "d_statfsflags='undef'"
4795 $ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
4796 $ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
4797 $ WC "d_stdio_stream_array='undef'"
4798 $ WC "d_stdiobase='" + d_stdiobase + "'"
4799 $ WC "d_stdstdio='" + d_stdstdio + "'"
4800 $ WC "d_strchr='define'"
4801 $ WC "d_strcoll='" + d_strcoll + "'"
4802 $ WC "d_strctcpy='define'"
4803 $ WC "d_strerrm='strerror((e),vaxc$errno)'"
4804 $ WC "d_strerror='define'"
4805 $ WC "d_strtod='define'"
4806 $ WC "d_strtol='define'"
4807 $ WC "d_strtold='" + d_strtold + "'"
4808 $ WC "d_strtoll='" + d_strtoll + "'"
4809 $ WC "d_strtoul='define'"
4810 $ WC "d_strtoull='" + d_strtoull + "'"
4811 $ WC "d_strtouq='" + d_strtouq + "'"
4812 $ WC "d_strxfrm='" + d_strxfrm + "'"
4813 $ WC "d_suidsafe='undef'"
4814 $ WC "d_symlink='undef'"
4815 $ WC "d_syscall='undef'"
4816 $ WC "d_sysconf='" + d_sysconf + "'"
4817 $ WC "d_syserrlst='undef'"
4818 $ WC "d_system='define'"
4819 $ WC "d_tcgetpgrp='undef'"
4820 $ WC "d_tcsetpgrp='undef'"
4821 $ WC "d_telldir='define'"
4822 $ WC "d_telldirproto='define'"
4823 $ WC "d_times='define'"
4824 $ WC "d_truncate='" + d_truncate + "'"
4825 $ WC "d_tzname='undef'"
4826 $ WC "d_umask='define'"
4827 $ WC "d_uname='" + d_uname + "'"
4828 $ WC "d_union_semun='undef'"
4829 $ WC "d_unlink_all_versions='undef'"
4830 $ WC "d_ustat='undef'"
4831 $ WC "d_vendorarch='undef'"
4832 $ WC "d_vendorlib='undef'"
4833 $ WC "d_vfork='define'"
4834 $ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
4835 $ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
4836 $ WC "d_void_closedir='define'"
4837 $ WC "d_volatile='define'"
4838 $ WC "d_vprintf='define'"
4839 $ WC "d_wait4='" + d_wait4 + "'"
4840 $ WC "d_waitpid='define'"
4841 $ WC "d_wcstombs='" + d_wcstombs + "'"
4842 $ WC "d_wctomb='" + d_wctomb + "'"
4843 $ WC "d_writev='undef'"
4844 $ WC "db_hashtype=' '"
4845 $ WC "db_prefixtype=' '"
4846 $ WC "dbgprefix='" + dbgprefix + "'"
4847 $ WC "defvoidused='15'"
4848 $ WC "devtype='" + devtype + "'"
4849 $ WC "direntrytype='struct dirent'"
4850 $ WC "dlext='" + dlext + "'"
4851 $ WC "dlobj='" + dlobj + "'"
4852 $ WC "dlsrc='dl_vms.c'"
4853 $ WC "doublesize='" + doublesize + "'"
4854 $ WC "drand01='" + drand01 + "'"
4855 $ WC "dynamic_ext='" + extensions + "'"
4857 $ WC "ebcdic='undef'"
4858 $ WC "eunicefix=':'"
4859 $ WC "exe_ext='" + exe_ext + "'"
4860 $ WC "extensions='" + extensions + "'"
4861 $ WC "fflushNULL='define'"
4862 $ WC "fflushall='undef'"
4863 $ WC "fpostype='fpos_t'"
4864 $ WC "freetype='void'"
4865 $ WC "full_ar='" + "'"
4866 $ WC "full_csh='" + " '"
4867 $ WC "full_sed='_NLA0:'"
4868 $ WC "gccversion='" + gccversion + "'"
4869 $ WC "gidformat='lu'"
4872 $ WC "gidtype='" + gidtype + "'"
4873 $ WC "groupstype='Gid_t'"
4875 $ WC "hintfile='" + "'"
4876 $ WC "i16size='" + i16size + "'"
4877 $ WC "i16type='" + i16type + "'"
4878 $ WC "i32size='" + i32size + "'"
4879 $ WC "i32type='" + i32type + "'"
4880 $ WC "i64size='" + i64size + "'"
4881 $ WC "i64type='" + i64type + "'"
4882 $ WC "i8size='" + i8size + "'"
4883 $ WC "i8type='" + i8type + "'"
4884 $ WC "i_arpainet='undef'"
4885 $ WC "i_dbm='undef'"
4886 $ WC "i_dirent='undef'"
4887 $ WC "i_dlfcn='undef'"
4888 $ WC "i_fcntl='" + i_fcntl + "'"
4889 $ WC "i_float='define'"
4890 $ WC "i_grp='undef'"
4891 $ WC "i_iconv='" + i_iconv +"'"
4892 $ WC "i_ieeefp='undef'"
4893 $ WC "i_inttypes='" + i_inttypes + "'"
4894 $ WC "i_libutil='" + i_libutil + "'"
4895 $ WC "i_limits='define'"
4896 $ WC "i_locale='" + i_locale + "'"
4897 $ WC "i_machcthr='undef'"
4898 $ WC "i_machcthreads='undef'"
4899 $ WC "i_math='define'"
4900 $ WC "i_memory='undef'"
4901 $ WC "i_mntent='undef'"
4902 $ WC "i_ndbm='undef'"
4903 $ WC "i_netdb='" + i_netdb + "'"
4904 $ WC "i_neterrno='define'"
4905 $ WC "i_netinettcp='" + i_netinettcp + "'"
4906 $ WC "i_niin='" + i_niin + "'"
4907 $ WC "i_poll='" + i_poll + "'"
4908 $ WC "i_prot='undef'"
4909 $ WC "i_pthread='define'"
4910 $ WC "i_pwd='undef'"
4911 $ WC "i_rpcsvcdbm='undef'"
4912 $ WC "i_sfio='undef'"
4913 $ WC "i_sgtty='undef'"
4914 $ WC "i_shadow='" + i_shadow + "'"
4915 $ WC "i_socks='" + i_socks + "'"
4916 $ WC "i_stdarg='define'"
4917 $ WC "i_stddef='define'"
4918 $ WC "i_stdlib='define'"
4919 $ WC "i_string='define'"
4920 $ WC "i_sunmath='undef'"
4921 $ WC "i_sysaccess='" + i_sysaccess + "'"
4922 $ WC "i_sysdir='undef'"
4923 $ WC "i_sysfile='" + i_sysfile + "'"
4924 $ WC "i_sysioctl='undef'"
4925 $ WC "i_syslog='" + i_syslog + "'"
4926 $ WC "i_sysmman='undef'"
4927 $ WC "i_sysmode='" + i_sysmode + "'"
4928 $ WC "i_sysmount='undef'"
4929 $ WC "i_sysndir='undef'"
4930 $ WC "i_sysparam='undef'"
4931 $ WC "i_sysresrc='undef'"
4932 $ WC "i_syssecrt='" + i_syssecrt + "'"
4933 $ WC "i_sysselct='undef'"
4934 $ WC "i_sysstat='define'"
4935 $ WC "i_sysstatfs='undef'"
4936 $ WC "i_sysstatvfs='undef'"
4937 $ WC "i_systime='undef'"
4938 $ WC "i_systimek='undef'"
4939 $ WC "i_systimes='undef'"
4940 $ WC "i_systypes='define'"
4941 $ WC "i_sysuio='" + i_sysuio + "'"
4942 $ WC "i_sysun='undef'"
4943 $ WC "i_sysutsname='" + i_sysutsname + "'"
4944 $ WC "i_sysvfs='undef'"
4945 $ WC "i_syswait='undef'"
4946 $ WC "i_termio='undef'"
4947 $ WC "i_termios='undef'"
4948 $ WC "i_time='define'"
4949 $ WC "i_unistd='" + i_unistd + "'"
4950 $ WC "i_ustat='undef'"
4951 $ WC "i_utime='undef'"
4952 $ WC "i_values='undef'"
4953 $ WC "i_varargs='undef'"
4954 $ WC "i_vfork='undef'"
4955 $ WC "inc_version_list='0'"
4956 $ WC "inc_version_list_init='0'"
4957 $ WC "installarchlib='" + installarchlib + "'"
4958 $ WC "installbin='" + installbin + "'"
4959 $ WC "installman1dir='" + installman1dir + "'"
4960 $ WC "installman3dir='" + installman3dir + "'"
4961 $ WC "installprivlib='" + installprivlib + "'"
4962 $ WC "installscript='" + installscript + "'"
4963 $ WC "installsitearch='" + installsitearch + "'"
4964 $ WC "installsitelib='" + installsitelib + "'"
4965 $ WC "installusrbinperl='undef'"
4966 $ WC "intsize='" + intsize + "'"
4967 $ WC "ivdformat='" + ivdformat + "'"
4968 $ WC "ivsize='" + ivsize + "'"
4969 $ WC "ivtype='" + ivtype + "'"
4970 $ WC "known_extensions='" + known_extensions + "'"
4971 $ WC "ld='" + ld + "'"
4972 $ WC "lddlflags='/Share'"
4973 $ WC "ldflags='/NoTrace/NoMap'"
4974 $ WC "lib_ext='" + lib_ext + "'"
4975 $ WC "libc='" + libc + "'"
4976 $ WC "libpth='/sys$share /sys$library'"
4977 $ WC "libs='" + libs + "'"
4978 $ WC "longdblsize='" + longdblsize + "'"
4979 $ WC "longlongsize='" + longlongsize + "'"
4980 $ WC "longsize='" + longsize + "'"
4981 $ WC "lseeksize='4'"
4982 $ WC "lseektype='int'"
4984 $ WC "make='" + make + "'"
4985 $ WC "malloctype='void *'"
4986 $ WC "man1ext='rno'"
4987 $ WC "man3ext='rno'"
4988 $ WC "mmaptype='" + "'"
4989 $ WC "modetype='unsigned int'"
4990 $ WC "multiarch='undef'"
4991 $ WC "mydomain='" + mydomain + "'"
4992 $ WC "myhostname='" + myhostname + "'"
4993 $ WC "myuname='" + myuname + "'"
4994 $ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
4995 $ WC "netdb_host_type='" + netdb_host_type + "'"
4996 $ WC "netdb_name_type='" + netdb_name_type + "'"
4997 $ WC "netdb_net_type='" + netdb_net_type + "'"
4998 $ WC "nveformat='" + nveformat + "'"
4999 $ WC "nvfformat='" + nvfformat + "'"
5000 $ WC "nvgformat='" + nvgformat + "'"
5001 $ WC "nvsize='" + nvsize + "'"
5002 $ WC "nvtype='" + nvtype + "'"
5003 $ WC "o_nonblock=' '"
5004 $ WC "obj_ext='" + obj_ext + "'"
5005 $ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
5006 $ WC "oldarchlib='" + oldarchlib + "'"
5007 $ WC "oldarchlibexp='" + oldarchlibexp + "'"
5008 $ WC "optimize='" + optimize + "'"
5009 $ WC "osname='" + osname + "'"
5010 $ WC "osvers='" + osvers + "'"
5011 $ WC "otherlibdirs='" + "'"
5012 $ WC "package='" + package + "'"
5013 $ WC "pager='" + pager + "'"
5014 $ WC "patchlevel='" + patchlevel + "'"
5016 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
5017 $ WC "perladmin='" + perladmin + "'"
5018 $ WC "pgflquota='" + pgflquota + "'"
5019 $ WC "pidtype='" + pidtype + "'"
5020 $ WC "pm_apiversion='" + version + "'"
5021 $! WC "prefix='" + vms_prefix + "'"
5022 $ WC "prefix='" + prefix + "'"
5023 $ WC "privlib='" + privlib + "'"
5024 $ WC "privlibexp='" + privlibexp + "'"
5025 $ WC "prototype='define'"
5026 $ WC "ptrsize='" + ptrsize + "'"
5027 $ WC "quadkind='" + quadkind + "'"
5028 $ WC "quadtype='" + quadtype + "'"
5029 $ WC "randbits='31'"
5030 $ WC "randseedtype='" + randseedtype + "'"
5031 $ WC "ranlib='" + "'"
5032 $ WC "rd_nodata=' '"
5033 $ WC "revision='" + revision + "'"
5034 $! WC "sPRIEldbl='$sPRIEldbl'
5035 $! WC "sPRIFldbl='$sPRIFldbl'
5036 $! WC "sPRIGldbl='$sPRIGldbl'
5037 $! WC "sPRIX64='$sPRIX64'
5038 $ WC "sPRId64='" + sPRId64 + "'"
5039 $! WC "sPRIeldbl='" + sPRIeldbl + "'"
5040 $ WC "sPRIfldbl='" + sPRIfldbl + "'"
5041 $ WC "sPRIgldbl='" + sPRIgldbl + "'"
5042 $! WC "sPRIi64='" + sPRIi64 + "'"
5043 $ WC "sPRIo64='" + sPRIo64 + "'"
5044 $ WC "sPRIu64='" + sPRIu64 + "'"
5045 $ WC "sPRIx64='" + sPRIx64 + "'"
5046 $ WC "sched_yield='" + sched_yield + "'"
5047 $ WC "seedfunc='" + seedfunc + "'"
5048 $ WC "selectminbits='32'"
5049 $ WC "selecttype='" + selecttype + "'"
5051 $ WC "shmattype='" + "'"
5052 $ WC "shortsize='" + shortsize + "'"
5053 $ WC "shrplib='define'"
5054 $ WC "sig_name='" + sig_name + "'"
5055 $ tmp = "sig_name_init='" + sig_name_init + "'"
5058 $ WC "sig_num='" + sig_num + "'"
5059 $ WC "sig_num_init='" + sig_num_init + "'"
5060 $ WC "signal_t='" + signal_t + "'"
5061 $ WC "sitearch='" + sitearch + "'"
5062 $ WC "sitearchexp='" + sitearchexp + "'"
5063 $ WC "sitelib='" + sitelib + "'"
5064 $ WC "sitelib_stem='" + sitelib_stem + "'"
5065 $ WC "sitelibexp='" + sitelibexp + "'"
5066 $ WC "sizesize='" + sizesize + "'"
5067 $ WC "sizetype='size_t'"
5068 $ WC "so='" + so + "'"
5069 $ WC "socksizetype='" + socksizetype + "'"
5070 $ WC "spitshell='write sys$output '"
5071 $ WC "src='" + src + "'"
5072 $ WC "ssizetype='int'"
5073 $ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
5074 $ WC "static_ext='" + "'"
5075 $ WC "stdchar='" + stdchar + "'"
5076 $ WC "stdio_base='((*fp)->_base)'"
5077 $ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
5078 $ WC "stdio_cnt='((*fp)->_cnt)'"
5079 $ WC "stdio_ptr='((*fp)->_ptr)'"
5080 $ WC "stdio_stream_array='" + "'"
5081 $ WC "subversion='" + subversion + "'"
5082 $ WC "timetype='" + timetype + "'"
5083 $ WC "u16size='" + u16size + "'"
5084 $ WC "u16type='" + u16type + "'"
5085 $ WC "u32size='" + u32size + "'"
5086 $ WC "u32type='" + u32type + "'"
5087 $ WC "u64size='" + u64size + "'"
5088 $ WC "u64type='" + u64type + "'"
5089 $ WC "u8size='" + u8size + "'"
5090 $ WC "u8type='" + u8type + "'"
5091 $ WC "uidformat='lu'"
5094 $ WC "uidtype='" + uidtype + "'"
5095 $ WC "uquadtype='" + uquadtype + "'"
5096 $ WC "use5005threads='" + use5005threads + "'"
5097 $ WC "use64bitall='" + use64bitall + "'"
5098 $ WC "use64bitint='" + use64bitint + "'"
5099 $ WC "usedl='" + usedl + "'"
5100 $ WC "useithreads='" + useithreads + "'"
5101 $ WC "uselargefiles='" + uselargefiles + "'"
5102 $ WC "uselongdouble='" + uselongdouble + "'"
5103 $ WC "usemorebits='" + usemorebits + "'"
5104 $ WC "usemultiplicity='" + usemultiplicity + "'"
5105 $ WC "usemymalloc='" + usemymalloc + "'"
5106 $ WC "useperlio='undef'"
5107 $ WC "useposix='false'"
5108 $ WC "usesocks='undef'"
5109 $ WC "usethreads='" + usethreads + "'"
5110 $ WC "usevfork='true'"
5111 $ WC "uvoformat='" + uvoformat + "'"
5112 $ WC "uvsize='" + uvsize + "'"
5113 $ WC "uvtype='" + uvtype + "'"
5114 $ WC "uvuformat='" + uvuformat + "'"
5115 $ WC "uvxformat='" + uvxformat + "'"
5116 $ WC "vendorarchexp='" + "'"
5117 $ WC "vendorlib_stem='" + "'"
5118 $ WC "vendorlibexp='" + "'"
5119 $ WC "version='" + version + "'"
5120 $ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific
5121 $ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific
5122 $ WC "vms_ver='" + vms_ver + "'" ! VMS specific
5123 $ WC "voidflags='15'"
5124 $ WC "xs_apiversion='" + version + "'"
5125 $ WC "CONFIGDOTSH='true'"
5127 $! ##END WRITE NEW CONSTANTS HERE##
5131 $! Okay, we've gotten here. Build munchconfig.exe
5132 $ COPY/NOLOG [-.vms]munchconfig.c []
5133 $ COPY/NOLOG [-.vms]'Makefile_SH []
5134 $ 'Perl_CC' munchconfig.c
5137 $ OPEN/WRITE CONFIG []munchconfig.opt
5140 $ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library"
5142 $ WRITE CONFIG "Sys$Share:VAXCRTL/Share"
5144 $ 'ld' munchconfig.obj,munchconfig.opt/opt
5145 $ DELETE/NOLOG/NOCONFIRM munchconfig.opt;
5147 $ 'ld' munchconfig.obj
5149 $ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj;
5150 $ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
5153 $ CALL Cxx_demangler_cleanup
5156 $ IF alldone .EQS. ""
5160 If you'd like to make any changes to the config.sh file before I begin
5161 to configure things, answer yes to the following question.
5164 $ rp="Do you wish to edit ''basename_config_sh'? [''dflt'] "
5166 $ IF ans .EQS. "" then ans = dflt
5170 $ echo4 "Be sure to type LOGOUT after you have edited the file,"
5171 $ echo4 "then this procedure will resume."
5173 $ default = F$ENVIRONMENT("DEFAULT")
5174 $ DIRECTORY 'config_sh
5177 $ SET DEFAULT 'default
5182 $ echo4 "Adding ''osname' specific preprocessor commands."
5184 $ ! we need an fdl file
5185 $ CREATE [-]CONFIG.FDL
5188 $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
5189 $ ! First spit out the header info with the local defines (to get
5190 $ ! around the 255 character command line limit)
5191 $ OPEN/APPEND CONFIG [-]config.local
5192 $ IF use_debugging_perl THEN WC "#define DEBUGGING"
5193 $ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
5194 $ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
5195 $ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
5196 $ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
5197 $ IF Using_Gnu_C THEN WC "#define GNUC_ATTRIBUTE_CHECK"
5198 $ IF (Has_Dec_C_Sockets)
5200 $ WC "#define VMS_DO_SOCKETS"
5201 $ WC "#define DECCRTL_SOCKETS"
5203 $ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS"
5205 $! This is VMS-specific for now
5206 $ WC "#''d_setenv' HAS_SETENV"
5207 $ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
5208 $ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
5209 $ IF use64bitint .OR. use64bitint .EQS. "define"
5211 $ WC "#define USE_64_BIT_INT"
5212 $ WC "#define USE_LONG_DOUBLE"
5214 $ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
5215 WC "#define USE_64_BIT_ALL"
5216 $ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
5217 $ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
5218 $ WC "#define HAS_ENVGETENV"
5219 $ WC "#define PERL_EXTERNAL_GLOB"
5222 $ echo4 "Doing variable substitutions on .SH files..."
5223 $ echo4 "Extracting config.h (with variable substitutions)"
5225 $! Now build the normal config.h
5226 $ DEFINE/USER_MODE sys$output [-]config.main
5227 $ mcr []munchconfig 'config_sh [-]config_h.sh
5228 $ ! Concatenate them together
5229 $ copy [-]config.local,[-]config.main [-]config.h
5231 $ DELETE/NOLOG [-]CONFIG.MAIN;*
5232 $ DELETE/NOLOG [-]CONFIG.LOCAL;*
5233 $ DELETE/NOLOG [-]CONFIG.FDL;*
5237 $ DECC_REPLACE = "DECC=decc=1"
5239 $ DECC_REPLACE = "DECC="
5243 $ GNUC_REPLACE = "GNUC=gnuc=1"
5245 $ GNUC_REPLACE = "GNUC="
5247 $ IF Has_Dec_C_Sockets
5249 $ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
5253 $ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
5255 $ SOCKET_REPLACE = "SOCKET="
5260 $ IF (vms_ver .LES. "6.2")
5262 $ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
5264 $ THREAD_REPLACE = "THREAD=THREADED=1"
5267 $ THREAD_REPLACE = "THREAD="
5271 $ MALLOC_REPLACE = "MALLOC=MALLOC=1"
5273 $ MALLOC_REPLACE = "MALLOC="
5275 $ echo4 "Extracting ''defmakefile' (with variable substitutions)"
5276 $ DEFINE/USER_MODE sys$output 'UUmakefile
5277 $ mcr []munchconfig 'config_sh 'Makefile_SH "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" -
5278 "''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'"
5279 $ echo4 "Extracting Build_Ext.Com (without variable substitutions)"
5280 $ Create Sys$Disk:[-]Build_Ext.Com
5281 $ Deck/Dollar="$EndOfTpl$"
5283 $! NOTE: This file is extracted as part of the VMS configuration process.
5284 $! Any changes made to it directly will be lost. If you need to make any
5285 $! changes, please edit the template in [.vms]SubConfigure.Com instead.
5286 $ def = F$Environment("Default")
5287 $ exts1 = F$Edit(p1,"Compress")
5288 $ p2 = F$Edit(p2,"Upcase,Compress,Trim")
5289 $ If F$Locate("MCR ",p2).eq.0 Then p2 = F$Extract(3,255,p2)
5290 $ miniperl = "$" + F$Search(F$Parse(p2,".Exe"))
5292 $ if f$type('p3') .nes. "" then makeutil = 'p3'
5293 $ targ = F$Edit(p4,"Lowercase")
5296 $ ext = F$Element(i," ",p1)
5297 $ If ext .eqs. " " Then Goto done
5298 $ Define/User_mode Perl_Env_Tables CLISYM_LOCAL
5300 ($extdir = $ENV{'ext'}) =~ s/::/./g;
5302 if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
5303 else { $extdir = ".ext.$extdir"; }
5304 ($ENV{'extdir'} = "[$extdir]");
5305 ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
5306 $ Set Default &extdir
5308 $ If F$Locate("clean",targ) .eqs. F$Length(targ)
5310 $ Write Sys$Output "Building ''ext' . . ."
5311 $ On Error Then Goto done
5312 $ If F$Search("Descrip.MMS") .eqs. ""
5316 $ If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. -
5317 F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1
5320 $ Write Sys$Output "''targ'ing ''ext' . . ."
5321 $ On Error Then Continue
5324 miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]"
5336 $! Clean up after ourselves
5337 $ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
5339 $! Warn of dangerous symbols or logical names
5341 $Bad_environment: SUBROUTINE
5343 $ IF p2 .eqs. "SYMBOL"
5345 $ IF f$type('p1) .nes. "" THEN Bad_env := SYMBOL
5347 $ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
5349 $ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
5351 $ IF f$search("config.msg") .nes. ""
5353 $ OPEN/APPEND CONFIG config.msg
5355 $ OPEN/WRITE CONFIG config.msg
5357 $ IF Bad_env .eqs. "SYMBOL"
5360 $ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
5361 $ WRITE CONFIG " delete before building ''package' via:"
5362 $ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
5363 $ IF f$locate("""",&p1) .ge. f$length(&p1)
5365 $ WRITE CONFIG " after building, testing, and installing ''package'
5366 $ WRITE CONFIG " restore the symbol with:"
5367 $ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
5370 $ IF Bad_env .eqs. "LOGICAL"
5373 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
5374 $ WRITE CONFIG " deassign before building ''package'"
5380 $ ENDSUBROUTINE ! Bad_environment
5382 $ echo4 "Checking for dangerous pre-existing global symbols and logical names."
5383 $ CALL Bad_environment "TMP"
5384 $ CALL Bad_environment "LIB"
5385 $ CALL Bad_environment "T"
5386 $ CALL Bad_environment "FOO"
5387 $ CALL Bad_environment "EXT"
5388 $ CALL Bad_environment "TEST" "SYMBOL"
5389 $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
5391 $! %Config-I-VMS, write perl_setup.com here
5393 $ IF (.NOT.perl_symbol)
5395 $ file_2_find = "[-]''packageup'.cld"
5397 $ echo4 "The perl.cld file is now being written..."
5398 $ OPEN/WRITE CONFIG 'file_2_find'
5400 $ IF ((sharedperl) .AND. (F$GETSYI("HW_MODEL") .GE. 1024)) THEN ext := .AXE
5401 $ IF (use_vmsdebug_perl)
5403 $ WRITE CONFIG "define verb dbgperl"
5404 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
5405 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5407 $ WRITE CONFIG "define verb perl"
5408 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
5409 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5411 $ WRITE CONFIG "define verb perl"
5412 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
5413 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5416 $ ENDIF ! (.NOT.perl_symbol)
5418 $ echo4 "The perl_setup.com file is now being written..."
5419 $ file_2_find = "[-]perl_setup.com"
5420 $ OPEN/WRITE CONFIG 'file_2_find'
5422 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
5423 $ IF cf_email.NES.perladmin
5425 $ WRITE CONFIG "$! perl configured by ''cf_email'"
5427 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
5430 $ prefix = prefix - "000000."
5431 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
5432 prefix = prefix - "]" + ".]"
5433 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'"
5434 $ WRITE CONFIG "$ ext = "".exe"""
5437 $ write config "$ if f$getsyi(""HW_MODEL"") .ge. 1024 then ext = "".AXE"""
5441 $ IF (use_vmsdebug_perl)
5443 $ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgPerl'ext'"
5444 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgPerl'ext'"
5445 $ WRITE CONFIG "$ define dbgPerlShr ''vms_prefix':[000000]dbgPerlShr'ext'"
5447 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
5448 $ WRITE CONFIG "$ define PerlShr ''vms_prefix':[000000]PerlShr'ext'"
5450 $ ELSE ! .NOT.perl_symbol
5451 $ IF (use_vmsdebug_perl)
5453 $ WRITE CONFIG "$ define dbgPerlShr ''vms_prefix':[000000]dbgPerlShr'ext'"
5455 $ WRITE CONFIG "$ define PerlShr ''vms_prefix':[000000]PerlShr'ext'"
5457 $ IF perl_verb .EQS. "PROCESS"
5459 $ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
5461 $ ENDIF ! perl_symbol
5462 $ WRITE CONFIG "$ define/nolog pod2text ''vms_prefix':[lib.pod]pod2text.com"
5463 $ WRITE CONFIG "$ define/nolog pod2html ''vms_prefix':[lib.pod]pod2html.com"
5464 $ WRITE CONFIG "$ define/nolog pod2man ''vms_prefix':[lib.pod]pod2man.com"
5468 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
5469 $ ELSE !leave in but commented out (in case setting was from perl :-)
5470 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
5473 $ WRITE CONFIG "$! Symbols for commonly used scripts:"
5477 $ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' ''vms_prefix':[lib.pod]Perldoc.com -t"""
5478 $ WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text"""
5479 $ WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html"""
5480 $ WRITE CONFIG "$ pod2latex == ""'"+"'Perl' ''vms_prefix':[lib.pod]pod2latex.com"""
5481 $ WRITE CONFIG "$!pod2man == ""'"+"'Perl' pod2man"""
5482 $ WRITE CONFIG "$!Perlbug == ""'"+"'Perl' ''vms_prefix':[lib]Perlbug.com"""
5483 $ WRITE CONFIG "$ c2ph == ""'"+"'Perl' ''vms_prefix':[utils]c2ph.com"""
5484 $ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
5486 $ WRITE CONFIG "$ dprofpp == ""'"+"'Perl' ''vms_prefix':[utils]dprofpp.com"""
5488 $ WRITE CONFIG "$ h2ph == ""'"+"'Perl' ''vms_prefix':[utils]h2ph.com"""
5489 $ WRITE CONFIG "$ h2xs == ""'"+"'Perl' ''vms_prefix':[utils]h2xs.com"""
5490 $ WRITE CONFIG "$!perlcc == ""'"+"'Perl' ''vms_prefix':[utils]perlcc.com"""
5491 $ WRITE CONFIG "$ splain == ""'"+"'Perl' ''vms_prefix':[utils]splain.com"""
5493 $ WRITE CONFIG "$ Perldoc == ""Perl ''vms_prefix':[lib.pod]Perldoc.com -t"""
5494 $ WRITE CONFIG "$ pod2text == ""Perl pod2text"""
5495 $ WRITE CONFIG "$ pod2html == ""Perl pod2html"""
5496 $ WRITE CONFIG "$ pod2latex == ""Perl ''vms_prefix':[lib.pod]pod2latex.com"""
5497 $ WRITE CONFIG "$!pod2man == ""Perl pod2man"""
5498 $ WRITE CONFIG "$!Perlbug == ""Perl ''vms_prefix':[lib]Perlbug.com"""
5499 $ WRITE CONFIG "$ c2ph == ""Perl ''vms_prefix':[utils]c2ph.com"""
5500 $ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
5502 $ WRITE CONFIG "$ dprofpp == ""Perl ''vms_prefix':[utils]dprofpp.com"""
5504 $ WRITE CONFIG "$ h2ph == ""Perl ''vms_prefix':[utils]h2ph.com"""
5505 $ WRITE CONFIG "$ h2xs == ""Perl ''vms_prefix':[utils]h2xs.com"""
5506 $ WRITE CONFIG "$!perlcc == ""Perl ''vms_prefix':[utils]perlcc.com"""
5507 $ WRITE CONFIG "$ splain == ""Perl ''vms_prefix':[utils]splain.com"""
5512 $ echo "The file can be found at:"
5513 $ echo4 " ''F$SEARCH(file_2_find)'"
5514 $ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
5515 $ echo "when you are satisfied with a successful compilation,"
5516 $ echo "testing, and installation of your perl."
5518 $ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
5520 $ file_2_find = "[-]''packageup'_install.com"
5521 $ OPEN/WRITE CONFIG 'file_2_find
5522 $ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
5523 $ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
5524 $ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
5527 $ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
5528 $ echo4 " @ ''F$SEARCH(file_2_find)'"
5529 $ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
5533 $!figure out where we "are" by parsing 'vms_default_directory_name'
5535 $ set_def_command = ""
5536 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
5537 $ tmp = vms_default_directory_name - dflt - "]"
5539 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
5541 $ tmp1 = F$ELEMENT(i,".",tmp)
5542 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
5544 $ THEN set_def_command = "set default [-"
5545 $ ELSE set_def_command = set_def_command + "-"
5549 $Beyond_set_def_loop:
5550 $ IF set_def_command.NES.""
5552 $ set_def_command = set_def_command - "-" + "]"
5554 $ echo4 "In order to build ''package' you must now issue the commands:"
5556 $ echo4 " ''set_def_command'"
5559 $ echo4 "In order to build ''package' you must now issue the command:"
5562 $ echo4 " ''make'''makefile'", macros
5565 $ IF ( F$SEARCH("config.msg").NES."" )
5567 $ echo "Hmm. I also noted the following information while running:"
5570 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
5571 $ DELETE/NOLOG/NOCONFIRM config.msg;
5577 $ DEASSIGN SYS$OUTPUT
5578 $! DEASSIGN SYS$ERROR
5580 $ IF F$GETJPI("","FILCNT").NE.vms_filcnt THEN CLOSE CONFIG
5581 $ IF F$GETJPI("","FILCNT").NE.vms_filcnt
5582 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
5584 $ dflt = F$ENVIRONMENT("DEFAULT")
5585 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
5587 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
5589 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
5590 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
5592 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
5595 $!: End of Configure