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 "
45 $ be_case_sensitive = "n"
46 $ use_vmsdebug_perl = "n"
49 $ C_Compiler_Replace = "CC="
50 $ Thread_Live_Dangerously = "MT="
51 $ use_two_pot_malloc = "N"
52 $ use_pack_malloc = "N"
53 $ use_debugmalloc = "N"
55 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
56 $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx]
57 $! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx]
59 $ vms_filcnt = F$GETJPI ("","FILCNT")
61 $!: compute my invocation name
62 $ me = F$ENVIRONMENT("PROCEDURE")
64 $! Many null statements (begin with colon ':') in the Bourne shell version of
65 $! this script serve as comments/placeholders. I have retained some of the ones
66 $! that will help you compare this .COM file to the sh version - as well as
67 $! leave placeholders for future improvements to this .COM file.
68 $! sfn = VMS "skipped for now"
70 $!: Proper PATH separator !sfn
71 $!: Proper PATH setting !sfn
72 $!: Sanity checks !sfn "Say '@''$me''"
73 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
74 $!: Configure runs within the UU subdirectory !->after find MANIFEST
75 $! <big long list of default values (mostly null)>
76 $!: We must find out about Eunice early !(?)
77 $!: list of known cpp symbols, sorted alphabetically !sfn
79 $!: default library list !sfn
80 $! <no hints files in use (yet?)>
81 $!: Extra object files, if any, needed on this platform. !sfn
82 $!: Possible local include directories to search. !sfn
83 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
84 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
85 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
86 $!: no include file wanted by default !sfn
88 $!: Possible local library directories to search. !sfn
89 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
90 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
91 $!: general looking path for locating libraries !sfn
92 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
93 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
94 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
95 $!: Private path used by Configure to find libraries. Its value !sfn
96 $!: is prepended to libpth. This variable takes care of special !sfn
97 $!: machines, like the mips. Usually, it should be empty. !sfn
99 $!: full support for void wanted by default !sfn
100 $!defvoidused=15 !sfn
101 $!: List of libraries we want. !sfn
102 $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
103 $!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
104 $!libswanted="$libswanted ucb bsd BSD PW x" !sfn
105 $!: We probably want to search /usr/shlib before most other libraries. !sfn
106 $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
107 $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
108 $!glibpth="/usr/shlib $glibpth" !sfn
109 $!: Do not use vfork unless overridden by a hint file. !sfn
110 $!usevfork=false !sfn
111 $!: script used to extract .SH files with variable substitutions !sfn
112 $!: produce awk script to parse command line options !sfn
113 $!sfn (assume no sed awk) see below
114 $!: process the command line options
116 $!: set up default values
120 $ IF F$TYPE(config_sh) .EQS. "" THEN config_sh=""
133 $ use_5005_threads = "N"
139 $ THEN !one or more switches was thrown
146 $ config_args = config_args + F$FAO(" !AS",P'i')
149 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
153 $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
154 $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
155 $Remove_quotation_mark:
157 $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
158 $ gotopt = "f" !"alse"
159 $ gotshortopt = "f" !"alse"
160 $ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
163 $ gotopt = "t" !"rue"
165 $ gotshortopt = "t" !"rue"
167 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
174 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f"
178 $ IF (F$SEARCH(config_sh).NES."")
180 $ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
181 $ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
184 $ CONTINUE !at this point check UIC && if test allows...
187 $ echo "''me': cannot read config file ''config_sh'."
191 $ echo "''me': cannot read config file ''config_sh'."
196 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h"
203 $ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m"
210 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r"
217 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s"
224 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E"
229 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K"
236 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O"
243 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S"
245 $ extractsh = "true" !VMS? Yes with munchconfig
250 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D"
253 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
255 $ tmp = P'i' + "=""define"""
259 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
261 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
262 $ echo "''me': use '-Usymbol=val' not '-Dsymbol='."
263 $ echo "''me': ignoring -D",P'i'
265 $ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')
266 $ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """"
273 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U"
276 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
278 $ tmp = P'i' + "="""""
282 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
284 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
285 $ echo "''me': use '-Dsymbol=val' not '-Usymbol=val'."
286 $ echo "''me': ignoring -U",P'i'
288 $ tmp = P'i' + "=""undef"""
295 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
297 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
298 $ echo "''me' generated by an unknown version of EDT."
304 $ echo "''me': unknown option ",P'i'
307 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
309 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
311 $ ENDIF ! (P1 .NES. "")
312 $ config_args = F$EDIT(config_args,"TRIM")
316 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
317 $ echo "Usage: @''me' [-dehmrEKOSV] [-fconfig.sh] [-Dsymbol] [-Dsymbol=value]"
318 $ echo " [-Usymbol] [-Usymbol=]"
320 "-d" : use defaults for all answers.
321 "-e" : go on without questioning past the production of config.sh. *
322 "-f" : specify an alternate default configuration file.
323 "-h" : print this help message and exit (with an error status).
324 "-m" : skip the MANIFEST check to see that all files are present
325 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
326 "-s" : silent mode, only echoes questions and essential information.
327 -"D" : define symbol to have some value: *
328 -"Dsymbol" symbol gets the value 'define'
329 -"Dsymbol=value" symbol gets the value 'value'
330 -E : stop at the end of questions, after having produced config.sh. *
331 -K : do not use unless you know what you are doing.
332 -O : let -D and -U override definitions from loaded configuration file. *
333 -S : perform variable substitutions on all .SH files (can mix with -f) *
334 -"U" : undefine symbol: *
335 -"Usymbol" symbol gets the value 'undef'
336 -"Usymbol=" symbol gets completely empty
337 -V : print version number and exit (with a zero status).
338 $ echo "%Config-I-VMS, lower case switches must be enclosed"
339 $ echo "-Config-I-VMS, in double quotation marks, e.g.:"
340 $ echo "-Config-I-VMS, @Configure ""-des"""
341 $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
342 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
344 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
350 $ IF F$Mode() .eqs. "BATCH"
352 $ STDOUT = F$GetQuI("DISPLAY_JOB","LOG_SPECIFICATION",,"THIS_JOB")
353 $ WRITE SYS$OUTPUT "Warning: Executing in batch mode. To avoid file locking conflicts,"
354 $ WRITE SYS$OUTPUT "output intended for SYS$OUTPUT will be sent to a new version"
355 $ WRITE SYS$OUTPUT STDOUT
357 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
359 $ DEFINE SYS$OUTPUT "_NLA0:"
360 $ echo4 = "write STDOUT "
361 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
362 $ open/write/share=read STDOUT 'STDOUT'
370 $ echo4 = "write SYS$OUTPUT "
374 $!: run the defines and the undefines, if any, but leave the file out there...
375 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
380 $ packageup = F$EDIT((package - "5"),"UPCASE")
382 $!: Eunice requires " " instead of "", can you believe it
385 $ echo "Beginning of configuration questions for ''package'."
388 $!: Some greps do not return status, grrr.
389 $ contains = "SEARCH"
391 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
392 $! echo "Checking ''echo' to see how to suppress newlines..."
393 $! echo "giving up..."
394 $! echo "The star should be here-->*"
396 $!: Now test for existence of everything in MANIFEST
398 $ echo4 "First let's make sure your kit is complete. Checking..."
401 $! Here I assume we are in the [foo.PERL5xxx.VMS...] tree
402 $! because the search routine simply does set def [-] if necessary.
403 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
405 $ manifestfound = F$SEARCH(file_2_find)
406 $ IF (manifestfound .EQS. "")
408 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
411 $ GOTO Research_manifest
414 $ echo "There is no MANIFEST file. I hope your kit is complete !"
416 $ GOTO Beyond_manifest
419 $! MANIFEST. has been found and we have set def'ed there -
420 $! time to bail out before it's too late.
421 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
422 $ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
423 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".")
426 %Config-E-VMS, ERROR:
427 Sorry! It apears as though your perl build sub-directory is already too
428 deep into the VMS file system. Please try moving stuff into a shallower
429 directory (or altering the "max_allowed_dir_depth" parameter).
430 $ echo4 "ABORTING..."
431 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
433 $ EXIT !2 !$STATUS = "%X00000002" (error)
437 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
439 $ IF (manifestfound .NES. "")
441 $ IF ( F$SEARCH("UU.DIR").EQS."" )
443 $ CREATE/DIRECTORY [.UU]
445 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;*
447 $!: Configure runs within the UU subdirectory
450 $! a little redundancy never hurt anybody?
451 $ file_2_find = "[-]" + file_2_find
452 $ manifestfound = F$SEARCH(file_2_find)
454 $ OPEN/WRITE MISSING MISSING.
455 $!change to "FALSE" if you wish to skip the manifest search
456 $!(which after all is rather slow in DCL :-)
459 $ echo "Skipping MANIFEST check as requested"
462 $ OPEN/READ CONFIG 'manifestfound'
464 $ READ/END_OF_FILE = Done_manifest CONFIG line
465 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
466 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
467 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
468 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
469 $ line = F$EDIT(line,"TRIM, COMPRESS")
470 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
471 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
473 $Re_strip_line_manifest:
474 $ loca = F$LOCATE("/",file_2_find)
475 $ ante = F$EXTRACT(0,loca,file_2_find)
476 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
477 $ test_this = ante + "." + (post - "/")
478 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
480 $ file_2_find = ante + "." + (post - "/")
481 $ GOTO Re_strip_line_manifest
483 $ file_2_find = ante + "]" + (post - "/")
485 $ file_2_find = "[-."+file_2_find
487 $ file_2_find = "[-]" + file_2_find
490 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
491 $ file_2_find = file_2_find - dirname
494 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
495 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
497 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
498 $ ELSE basename = basename + dot_ele + "_"
503 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
504 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
505 basename = f$extract(0,f$length(basename)-1,basename)
506 $ file_2_find = dirname + basename
508 $ found = F$SEARCH(file_2_find)
509 $ IF (found .EQS. "" .AND. dots .GT. 2)
511 $! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
512 $! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
513 $! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
514 $ basename[f$locate(".",basename),1] := _
515 $ dot_ele = F$ELEMENT(dots - 1,"_",basename)
517 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
519 $ found = F$SEARCH(dirname + basename)
520 $ file_2_find = file_2_find + "," + basename
522 $ IF (found .EQS. "")
524 $ WRITE MISSING file_2_find
525 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
527 $ miss_list = miss_list + "," + file_2_find
530 $ GOTO Read_loop_manifest
535 $ ENDIF ! (manifestfound .NES. "")
537 $ IF (miss_list .NES. "")
539 $ echo "Some of the files not found include:"
542 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
546 THIS PACKAGE SEEMS TO BE INCOMPLETE.
548 You have the option of continuing the configuration process, despite the
549 distinct possibility that your kit is damaged, by typing 'y'es. If you
550 do, don't blame me if something goes wrong. I advise you to type 'n'o
551 and contact the author (dan@sidhe.org)
553 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
556 $ echo4 "Continuing..."
558 $ echo4 "ABORTING..."
562 $ echo4 "Looks good..."
563 $ DELETE/NOLOG MISSING.;
564 $ ENDIF ! (miss_list .NES. "")
565 $ ENDIF ! (manifestfound .EQS. "") ELSE
567 $! after finding MANIFEST (see above)
568 $!: Configure runs within the UU subdirectory
570 $!: compute the number of columns on the terminal for proper question formatting
571 $! (sfn, will assume 80-ish)
573 $!: set up the echo used in my read !sfn
574 $!: now set up to do reads with possible shell escape and default assignment !sfn
585 $ READ SYS$COMMAND/PROMPT="''rp'" ans
588 $ READ SYS$COMMAND/PROMPT="''rp'" ans
595 $!: create .config dir to save info across Configure sessions
596 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
598 $ CREATE/DIRECTORY [-.CONFIG]
599 $ OPEN/WRITE CONFIG [-.CONFIG]README.
601 "This directory created by Configure to save information that should"
603 "persist across sessions."
606 "You may safely delete it if you wish."
610 $!: general instructions
613 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
614 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
616 $ messages = F$ENVIRONMENT("MESSAGE")
617 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
618 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
619 $ IF .NOT.($status.EQ.%X08D78053)
623 $ rp = "Would you like to see the instructions? [''dflt'] "
625 $ if .NOT.ans THEN needman=""
627 $ SET MESSAGE 'messages'
629 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
635 This installation shell script will examine your system and ask you questions
636 to determine how the perl5 package should be installed. If you get
637 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
638 process, edit something, then restart this process as you just did.
639 Many of the questions will have default answers in square
640 brackets; typing carriage return will give you the default.
642 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
645 In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
646 the questions and use the computed defaults (or the previous answers provided
647 there was already a config.sh file). Type '@Configure "-h"' for a list of
650 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
653 Much effort has been expended to ensure that this shell script will
654 run on any VMS system. If despite that it blows up on yours, your
655 best bet is to edit Configure.com and @ it again. Whatever problems
656 you have with Configure.com, let me (dan@sidhe.org) know how I blew
659 $!This installation script affects things in two ways:
661 $!1) it may do direct variable substitutions on some of the files included
663 $!2) it builds a config.h file for inclusion in C programs. You may edit
664 $! any of these files as the need arises after running this script.
666 $!If you make a mistake on a question, there is no easy way to back up to it
669 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
670 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
672 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
676 $ ENDIF !(needman .EQS. "true")
678 $!: see if sh knows # comments !sfn
680 $!: figure out how to guarantee sh startup !sfn
681 $!: find out where common programs are !sfn
682 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
683 $!trylist="Mcc/byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
684 $! echo "I don't know where '$file' is, and my life depends on it."
685 $! echo "Go find a public domain implementation or fix your PATH setting!"
687 $! echo "Don't worry if any of the following aren't found..."
688 $!: determine whether symbolic links are supported !sfn
689 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
690 $!: set up the translation script tr, must be called with ./tr of course !sfn
692 $!: Try to determine whether config.sh was made on this system
693 $!: Get old answers from old config file if Configure was run on the
694 $!: same system, otherwise use the hints.
695 $ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/"
699 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
701 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
703 $ configshfound = F$SEARCH(config_sh)
704 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
706 $ IF (i.LT.max) THEN GOTO Config_sh_look
707 $! genconfig.pl has "osname='VMS'"
708 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
709 $ IF (configshfound.EQS."")
711 $ config_sh = "[-]config.sh" ! the fallback default
712 $ GOTO Beyond_config_sh
715 $ IF F$TYPE(config_dflt) .EQS. "" THEN config_dflt = "n"
716 $ rp = "Shall I @ ''config_sh' for default answers? [''config_dflt'] "
721 $ echo "Fetching default answers from ''config_sh'..."
723 $! This @ is why config_sh must employ DCL syntax. Note that for
724 $! symbols to be returned to this procedure they must be global.
725 $! Which implies that assignments must be of the :== or == variety.
726 $! Note further that the [-]config.sh file written by this procedure
727 $! employs shell syntax. In order to convert shell syntax to DCL
730 $! perl -ni -e "s/^#/!#/;s/='/==""/;s/'$/""/;print ""\$ $_"";" config.sh
732 $! However, watch out for sig_nam, sig_nam_init, sig_num, startperl
733 $! and any of the lower case double quoted variables such as the *format
734 $! variables in such a config."sh".
739 $ DELETE/SYMBOL config_dflt
741 $!we actually do not have "hints/" for VMS
744 $!First time through, eh? I have some defaults handy for the following systems:
746 $! echo " ","VMS_VAX"
747 $! echo " ","VMS_AXP"
748 $! : Now look for a hint file osname_osvers, unless one has been
749 $! : specified already.
752 $!You may give one or more space-separated answers, or "none" if appropriate.
753 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
755 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
759 $!: Restore computed paths !sfn
761 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
763 $ IF (osname .NES. "VMS")
765 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
768 %Config-E-VMS, ERROR:
770 Err, you do not appear to be running VMS!
771 This procedure is intended to Configure the building of Perl for VMS.
773 $ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans
776 $ echo4 "Continuing..."
778 $ echo4 "ABORTING..."
779 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
781 $ EXIT 2 !$STATUS = "%X00000002" (error)
783 $ ELSE !we are on VMS huzzah!
785 $ THEN TYPE SYS$INPUT:
787 Configure uses the operating system name and version to set some defaults.
788 The default value is probably right if the name rings a bell. Otherwise,
789 since spelling matters for me, either accept the default or answer "none"
792 $ rp = "Operating system name? [''osname'] "
796 $ IF (ans.NES.osname) !.AND.knowitall
798 $ echo4 "I'll go with ''osname' anyway..."
801 $ ENDIF !(osname .NES./.EQS. "VMS")
803 $!: who configured the system
804 $ cf_by = F$EDIT(user,"LOWERCASE")
805 $ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
807 $! Peter Prymmer has seen:
808 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
809 $! "SYS$TIME_ZONE" = "EDT"
811 $! Charles Lane recommended:
812 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
813 $! "NEWS_TIMEZONE" = "-0500"
814 $! "ST_TIMEZONE" = "EDT"
815 $! "JAN_TIME_ZONE" = "EST "
816 $! "MULTINET_TIMEZONE" = "EST"
817 $! "DAYLIGHT_SAVINGS" = "1"
819 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
821 $! "Multinet_Timezone"
822 $! "TCPware_Timezone"
825 $! This snippet o' DCL returns a string in default Unix `date` format,
826 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
828 $ MIN_TZO = -840 !units are minutes here
831 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
832 $ monn = F$CVTIME(,,"MONTH")
833 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
834 $ hour = F$CVTIME(,,"HOUR")
835 $ min = F$CVTIME(,,"MINUTE")
836 $ sec = F$CVTIME(,,"SECOND")
837 $ year = F$CVTIME(,,"YEAR")
839 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
843 $ mon = F$ELEMENT(i,"/",months)
844 $ IF i.LT.monn THEN GOTO Mon_loop
847 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
850 $ tzhour = F$INTEGER(systz)/3600
851 $ tzmins = F$INTEGER(systz)/60
852 $ tzminrem = tzmins - tzhour*60
853 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
855 $ THEN signothetime = "+"
856 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
857 $ THEN direction = "on GMT/"
858 $ ELSE direction = "east of "
860 $ ELSE signothetime = "-"
861 $ tzhour = -1*tzhour !keeps !UL happy
862 $ direction = "west of "
865 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
868 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
870 $ tzspan = "''tzhour' hours"
873 $ echo "Your system is ''tzspan' ''direction'UTC in England."
874 $ rp = "(''systz') Is this UTC Time Zone Offset correct? [''dflt'] "
876 $ IF ans.OR.(ans.EQS."")
880 $ GOTO Beyond_TimeZone
884 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
889 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
890 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
891 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
893 $ rp = "Enter the Time Zone offset: [''dflt'] "
895 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
896 $ IF ans.EQS."" THEN ans = dflt
897 $ tzhour = F$ELEMENT(0,":","''ans'") !first
898 $ IF tzhour.EQS."" THEN tzhour = 0
899 $ tzhour = F$INTEGER(tzhour)
900 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
903 $ tzminrem = F$INTEGER(tzminrem)
904 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
908 $ tzmins = tzhour*60 + tzminrem
909 $ tzd = F$STRING(tzmins*60)
914 $ tzhour = -1*tzhour !keeps !UL happy
917 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
920 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
925 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
926 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
928 $!: determine the architecture name
929 $! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
930 $! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME")
931 $! but does have F$GETSYI("HW_MODEL").
933 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
935 $ archname = "VMS_VAX"
936 $ otherarch = "an Alpha"
938 $ arch_type = "ARCH-TYPE=__VAX__"
940 $ archname = "VMS_AXP"
941 $ otherarch = "a VAX"
943 $ arch_type = "ARCH-TYPE=__AXP__"
945 $ rp = "What is your architecture name? [''archname'] "
949 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
950 $ IF (ans.NES.archname) !.AND.knowitall
952 $ echo4 "I'll go with ''archname' anyway..."
956 $ vms_prefix = "perl_root"
957 $ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
958 $ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''dflt'] "
962 $ ans = F$EXTRACT(0,1,F$EDIT(ans,"COLLAPSE, UPCASE"))
969 $ IF (archname.EQS."VMS_AXP")
971 $ macros = macros + """AXE=1"","
975 $!: is AFS running? !sfn
976 $!: decide how portable to be. Allow command line overrides. !sfn
977 $!: set up shell script to do ~ expansion !sfn
978 $!: expand filename !sfn
979 $!: now set up to get a file name !sfn
981 $ IF F$TYPE(prefix) .EQS. ""
983 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
984 $ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - ".;"
985 $ prefixbase = prefix - "]"
986 $ prefix = prefixbase + ".]"
989 $!: determine root of directory hierarchy where package will be installed.
994 $ echo "By default, ''package' will be installed in ''dflt', pod"
995 $ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
996 $ echo "all installation directories."
997 $ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
998 $ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
1000 $ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
1005 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
1009 $ perl_root = prefix
1011 $! Check here for pre-existing PERL_ROOT.
1012 $! -> ask if removal desired.
1013 $! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
1014 $! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
1016 $ vms_skip_install = "true"
1019 $ rp = "Skip the remaining """"where install"""" questions? [''dflt'] "
1021 $ IF (.NOT.ans).AND.(ans.NES."") THEN vms_skip_install = "false"
1022 $ IF (.NOT.vms_skip_install)
1025 $!: set the prefixit variable, to compute a suitable default value
1027 $!: determine where private library files go
1028 $!: Usual default is /usr/local/lib/perl5. Also allow things like
1029 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
1031 $ THEN TYPE SYS$INPUT:
1033 There are some auxiliary files for perl5 that need to be put into a
1034 private library directory that is accessible by everyone.
1036 $ IF F$TYPE(privlib) .NES. ""
1037 $ THEN dflt = privlib
1038 $ ELSE dflt = "''vms_prefix':[lib]"
1040 $ rp = "Pathname where the private library files will reside? "
1041 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1044 $ THEN privlib = ans
1045 $ ELSE privlib = dflt
1048 $ ENDIF !%Config-I-VMS, skip remaining "where install" questions
1050 $ perl_symbol = "true"
1056 $ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
1057 $ echo "symbol to invoke ''package', which is the usual method."
1058 $ echO "If you do not do so then you would need a DCL command verb at the"
1059 $ echo "process or the system wide level."
1061 $ rp = "Invoke perl as a global symbol foreign command? [''dflt'] "
1063 $ IF (.NOT.ans).AND.(ans.NES."") THEN perl_symbol = "false"
1065 $ IF (.NOT.perl_symbol)
1071 $ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
1072 $ echo "verb in a per-process table or in the system wide DCLTABLES (which"
1073 $ echo "would require write privilege)."
1075 $ rp = "Invoke perl as a per process command verb? [ ''dflt' ] "
1077 $ IF (.NOT.ans).AND.(ans.NES."")
1078 $ THEN perl_verb = "DCLTABLES"
1079 $ ELSE perl_verb = "PROCESS"
1081 $ ENDIF ! (.NOT.perl_symbol)
1083 $!: set the base revision
1085 $ revision = baserev - ".0"
1086 $!: get the patchlevel
1088 $ echo4 "Getting the current patchlevel..."
1089 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1090 $ IF (patchlevel_h.NES."")
1092 $ got_patch = "false"
1094 $ got_api_revision = "false"
1095 $ got_api_version = "false"
1096 $ got_api_subversion = "false"
1097 $ OPEN/READONLY CONFIG 'patchlevel_h'
1099 $ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
1100 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
1102 $ line = F$EDIT(line,"COMPRESS, TRIM")
1103 $ patchlevel = F$ELEMENT(2," ",line)
1104 $ got_patch = "true"
1106 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
1108 $ line = F$EDIT(line,"COMPRESS, TRIM")
1109 $ subversion = F$ELEMENT(2," ",line)
1112 $ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1114 $ line = F$EDIT(line,"COMPRESS, TRIM")
1115 $ api_revision = F$ELEMENT(2," ",line)
1116 $ got_api_revision = "true"
1118 $ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1120 $ line = F$EDIT(line,"COMPRESS, TRIM")
1121 $ api_version = F$ELEMENT(2," ",line)
1122 $ got_api_version = "true"
1124 $ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1126 $ line = F$EDIT(line,"COMPRESS, TRIM")
1127 $ api_subversion = F$ELEMENT(2," ",line)
1128 $ got_api_subversion = "true"
1130 $ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop
1137 $ IF (F$STRING(subversion) .NES. "0")
1139 $ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel' subversion ''subversion'.)"
1141 $ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel'.)"
1144 $ version = revision + "_" + patchlevel + "_" + subversion
1146 $ IF (.NOT.vms_skip_install)
1148 $!: set the prefixup variable, to restore leading tilde escape !sfn
1150 $!: determine where public architecture dependent libraries go
1154 $ echo "''package' contains architecture-dependent library files. If you are"
1157 $ THEN TYPE SYS$INPUT:
1158 sharing libraries in a heterogeneous environment, you might store
1159 these files in a separate location. Otherwise, you can just include
1160 them with the rest of the public library files.
1162 $ IF F$TYPE(archlib) .NES. ""
1163 $ THEN dflt = archlib
1164 $ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
1166 $ rp = "Where do you want to put the public architecture-dependent libraries? "
1167 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1170 $ THEN archlib = ans
1171 $ ELSE archlib = dflt
1174 $ ENDIF !%Config-I-VMS, skip "where install" questions
1176 $! This quotation from Configure has to be included on VMS:
1180 There is, however, a strange, musty smell in the air that reminds me of
1181 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1183 $ IF (.NOT.vms_skip_install)
1185 $!: it so happens the Eunice I know will not run shell scripts in Unix format
1187 $!: see if setuid scripts can be secure !sfn
1188 $!: now see if they want to do setuid emulation !sfn
1190 $!: determine where site specific libraries go.
1192 $ THEN TYPE SYS$INPUT:
1194 The installation process will also create a directory for
1195 site-specific extensions and modules. Some users find it convenient
1196 to place all local files in this directory rather than in the main
1197 distribution directory.
1199 $ IF F$TYPE(sitelib) .NES. ""
1200 $ THEN dflt = sitelib
1201 $ ELSE dflt = privlib - "]" + ".SITE_PERL]"
1203 $ rp = "Pathname for the site-specific library files? "
1204 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1207 $ THEN sitelib = ans
1208 $ ELSE sitelib = dflt
1211 $!: determine where site specific architecture-dependent libraries go.
1213 $ THEN TYPE SYS$INPUT:
1215 The installation process will also create a directory for
1216 architecture-dependent site-specific extensions and modules.
1218 $ IF F$TYPE(sitearch) .NES. ""
1219 $ THEN dflt = sitearch
1220 $ ELSE dflt = sitelib - "]" + "." + archname + "]"
1222 $ rp = "Pathname for the site-specific architecture-dependent library files? "
1223 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1226 $ THEN sitearch = ans
1227 $ ELSE sitearch = dflt
1230 $!: determine where old public architecture dependent libraries might be
1232 $!: determine where public executables go
1233 $ IF F$TYPE(bin) .NES. ""
1235 $! ELSE dflt = prefix - ".]" + ".BIN]"
1236 $ ELSE dflt = "/''vms_prefix'/000000"
1238 $ rp = "Pathname where the public executables will reside? "
1239 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1246 $!: determine where manual pages are on this system
1247 $!: What suffix to use on installed man pages
1248 $!: see if we can have long filenames
1249 $!: determine where library module manual pages go
1250 $!: What suffix to use on installed man pages
1251 $!: see what memory models we can support
1253 $ ELSE ! skipping "where install" questions, we must set some symbols
1254 $ IF F$TYPE(archlib).EQS."" THEN -
1255 archlib="''vms_prefix':[lib.''archname'.''version']"
1256 $ IF F$TYPE(bin) .EQS. "" THEN -
1257 bin="/''vms_prefix'/000000"
1258 $ IF F$TYPE(privlib) .EQS. "" THEN -
1259 privlib ="''vms_prefix':[lib]"
1260 $ IF F$TYPE(sitearch) .EQS. "" THEN -
1261 sitearch="''vms_prefix':[lib.site_perl.''archname']"
1262 $ IF F$TYPE(sitelib) .EQS. "" THEN -
1263 sitelib ="''vms_prefix':[lib.site_perl]"
1264 $ ENDIF !%Config-I-VMS, skip "where install" questions
1266 $! These derived locations can be set whether we've opted to
1267 $! skip the where install questions or not.
1269 $ IF F$TYPE(archlibexp) .EQS. "" THEN -
1270 archlibexp="''vms_prefix':[lib.''archname'.''version']"
1271 $ IF F$TYPE(binexp) .EQS. "" THEN -
1272 binexp ="''vms_prefix':[000000]"
1273 $ IF F$TYPE(builddir) .EQS. "" THEN -
1274 builddir ="''vms_prefix':[000000]"
1275 $ IF F$TYPE(installarchlib) .EQS. "" THEN -
1276 installarchlib="''vms_prefix':[lib.''archname'.''version']"
1277 $ IF F$TYPE(installbin) .EQS. "" THEN -
1278 installbin ="''vms_prefix':[000000]"
1279 $ IF F$TYPE(installscript) .EQS. "" THEN -
1280 installscript ="''vms_prefix':[utils]"
1281 $ IF F$TYPE(installman1dir) .EQS. "" THEN -
1282 installman1dir ="''vms_prefix':[man.man1]"
1283 $ IF F$TYPE(installman3dir) .EQS. "" THEN -
1284 installman3dir ="''vms_prefix':[man.man3]"
1285 $ IF F$TYPE(installprivlib) .EQS. "" THEN -
1286 installprivlib ="''vms_prefix':[lib]"
1287 $ IF F$TYPE(installsitearch) .EQS. "" THEN -
1288 installsitearch="''vms_prefix':[lib.site_perl.''archname']"
1289 $ IF F$TYPE(installsitelib) .EQS. "" THEN -
1290 installsitelib ="''vms_prefix':[lib.site_perl]"
1291 $ IF F$TYPE(oldarchlib) .EQS. "" THEN -
1292 oldarchlib="''vms_prefix':[lib.''archname']"
1293 $ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
1294 oldarchlibexp="''vms_prefix':[lib.''archname']"
1295 $ IF F$TYPE(privlibexp) .EQS. "" THEN -
1296 privlibexp ="''vms_prefix':[lib]"
1297 $ IF F$TYPE(sitearchexp) .EQS. "" THEN -
1298 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
1299 $ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
1300 sitelib_stem ="''vms_prefix':[lib.site_perl]"
1301 $ IF F$TYPE(sitelibexp) .EQS. "" THEN -
1302 sitelibexp ="''vms_prefix':[lib.site_perl]"
1304 $!: see if we need a special compiler
1305 $! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1309 $ vms_cc_available = ""
1311 $ OPEN/WRITE CONFIG ccvms.c
1312 $ WRITE CONFIG "#ifdef __DECC"
1313 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1314 $ WRITE CONFIG "#endif"
1315 $ WRITE CONFIG "#include <stdio.h>"
1316 $ WRITE CONFIG "int main() {"
1317 $ WRITE CONFIG "#ifdef __DECC"
1318 $ WRITE CONFIG " printf(""/DECC\n"");"
1319 $ WRITE CONFIG "#else"
1320 $ WRITE CONFIG " printf(""/VAXC\n"");"
1321 $ WRITE CONFIG "#endif"
1322 $ WRITE CONFIG " exit(0);"
1326 $! DEFINE SYS$ERROR _NLA0:
1327 $! DEFINE SYS$OUTPUT _NLA0:
1328 $ cc/NoObj/list=ccvms.lis ccvms.c
1330 $! DEASSIGN SYS$OUTPUT
1331 $! DEASSIGN SYS$ERROR
1332 $ IF (silent) THEN GOSUB Shut_up
1333 $ IF tmp.NE.%X10B90001
1335 $ IF tmp.NE.%X10000001
1337 $ nocc = "t" !%X10000001 is return from gcc
1338 $ GOTO Gcc_initial_check
1343 $ IF .NOT.silent THEN echo ""
1344 $ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1345 $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1349 $ echo "Will try cc/decc..."
1351 $ DEFINE/USER_MODE SYS$ERROR NL:
1352 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1354 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1357 $ IF (silent) THEN GOSUB Shut_up
1358 $ IF tmp.NE.%X10B90001
1360 $ echo "Apparently you don't have that one."
1363 $ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1364 $ vms_cc_available = vms_cc_available + "cc/decc "
1367 $ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
1369 $ vms_cc_dflt = "/decc"
1370 $ vms_cc_available = vms_cc_available + "cc/decc "
1375 $ echo "Checking for gcc"
1376 $ OPEN/WRITE CONFIG gccvers.lis
1377 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1378 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1379 $ 'gcc_symbol'/noobj/version _nla0:
1381 $ IF (silent) THEN GOSUB Shut_up
1383 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1385 $ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you don't have it."
1386 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1387 $ GOTO Cxx_initial_check
1389 $ OPEN/READ CONFIG gccvers.lis
1391 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1392 $ GOTO GCC_List_Read
1396 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1397 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1401 $! Do note that [vms]perl source files have a ways to go before they will
1402 $! compile under CXX.
1403 $! In order to test Configure.com with CXX swap the '!' comment character
1404 $! between the following two lines.
1411 $ echo "Checking for CXX..."
1412 $ OPEN/WRITE CONFIG ccvms.c
1413 $ WRITE CONFIG "#include <iostream>"
1414 $ WRITE CONFIG "int main() {"
1415 $ WRITE CONFIG "#ifdef __DECCXX"
1416 $ WRITE CONFIG " cout << __DECCXX, endl;"
1417 $ WRITE CONFIG "#else"
1418 $ WRITE CONFIG " cout << 0,endl;"
1419 $ WRITE CONFIG "#endif"
1420 $! Todo: add G++ identifier check ??
1421 $ WRITE CONFIG " return(0);"
1425 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1426 $ DEFINE/USER_MODE SYS$ERROR NL:
1430 $! success $status with:
1431 $! DEC C++ V1.1-001 on VMS VAX V5.5-2
1432 $! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1433 $! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1434 $! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1435 $ IF tmp .eq. %X15F60001
1439 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1440 $ DEFINE/USER_MODE SYS$ERROR NL:
1444 $ ! success $status with:
1445 $ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1446 $ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1447 $ IF tmp .eq. %X10000001
1450 $ vms_cc_available = vms_cc_available + "cxx "
1451 $ echo "CXX and LINK are available."
1453 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1455 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1456 $ DEFINE/USER_MODE SYS$ERROR NL:
1460 $ ! success $status with:
1461 $ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1462 $ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1463 $ IF tmp .eq. %X10000001
1465 $ ld_try = "cxxlink"
1466 $ vms_cc_available = vms_cc_available + "cxx "
1467 $ echo "CXX and CXXLINK are available."
1470 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1474 $ DELETE/NOLOG/NOCONFIRM ccvms.c;
1475 $ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1476 $ CALL Cxx_demangler_cleanup
1478 $ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1481 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1483 $!: see if we need a special compiler
1485 $ echo "Available compiler(s):"
1486 $ echo "( ''vms_cc_available')"
1489 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1493 $ rp = "Use which C compiler? [''dflt'] "
1497 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1499 $ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans))
1503 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1505 $ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1510 $! C_COMPILER_Replace = "CC=cc=''Mcc'"
1514 $ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1515 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt)
1517 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1522 $ IF Mcc .EQS. "cc/decc"
1525 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1530 $ IF Mcc .EQS. "cc/decc"
1533 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1535 $ IF Mcc .EQS. "gcc"
1538 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1541 $Decc_Version_check:
1546 $ echo4 "Checking for Dec C's version number..."
1547 $ OPEN/WRITE CONFIG deccvers.c
1548 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1549 $ WRITE CONFIG "#include <stdio.h>"
1550 $ WRITE CONFIG "int main() {"
1551 $ WRITE CONFIG "#ifdef __DECC"
1552 $ WRITE CONFIG "#ifdef __DECC_VER"
1553 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1554 $ WRITE CONFIG "#else"
1555 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1556 $ WRITE CONFIG "#endif"
1557 $ WRITE CONFIG "#endif"
1558 $ WRITE CONFIG " exit(0);"
1562 $ DEFINE/USER_MODE SYS$ERROR NL:
1563 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1566 $ IF (silent) THEN GOSUB Shut_up
1567 $ DEFINE/USER_MODE SYS$ERROR NL:
1568 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1571 $ IF (silent) THEN GOSUB Shut_up
1572 $ OPEN/WRITE CONFIG deccvers.out
1573 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1574 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1575 $ mcr []deccvers.exe
1579 $ IF (silent) THEN GOSUB Shut_up
1580 $ OPEN/READ CONFIG deccvers.out
1581 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1584 $ echo "You are using Dec C ''line'"
1586 $ Dec_C_Version = F$INTEGER(line)
1587 $ IF Dec_C_Version .GE. 60200000
1589 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1590 $ ccflags = ccflags + "/NOANSI_ALIAS"
1592 $ DELETE/NOLOG/NOCONFIRM deccvers.*;
1598 $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1599 $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1600 $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1601 $ IF gcclib_olb .EQS. ""
1603 $! These objects/libs come w/ gcc 2.7.2 for AXP:
1604 $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1605 $ IF tmp .NES. "" then gcclib_olb = tmp
1606 $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1609 $ IF gcclib_olb .EQS. ""
1610 $ THEN gcclib_olb = tmp
1611 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1614 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1617 $ IF gcclib_olb .EQS. ""
1618 $ THEN gcclib_olb = tmp
1619 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1622 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1625 $ IF gcclib_olb .EQS. ""
1626 $ THEN gcclib_olb = tmp
1627 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1630 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1632 $ gcclib_olb = gcclib_olb + "/lib"
1634 $ IF gcclib_olb .NES. "" .AND. -
1635 (vaxcrtl_olb .NES. "" .OR. -
1636 vaxcrtl_exe .NES. "" )
1639 $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1640 $ OPEN/WRITE CONFIG gccvers.c
1641 $! WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1642 $ WRITE CONFIG "#include <stdio.h>"
1643 $ WRITE CONFIG "int main() {"
1644 $ WRITE CONFIG "#ifdef __GNUC__"
1645 $ WRITE CONFIG "#ifdef __VERSION__"
1646 $ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1647 $ WRITE CONFIG "#else"
1648 $ WRITE CONFIG " printf(""%s\n"", ""1"");"
1649 $ WRITE CONFIG "#endif"
1650 $ WRITE CONFIG "#endif"
1651 $ WRITE CONFIG " exit(0);"
1654 $ DEFINE SYS$ERROR _NLA0:
1655 $ DEFINE SYS$OUTPUT _NLA0:
1658 $ DEASSIGN SYS$ERROR _NLA0:
1659 $ DEASSIGN SYS$OUTPUT _NLA0:
1660 $ IF (silent) THEN GOSUB Shut_up
1661 $ DEFINE SYS$ERROR _NLA0:
1662 $ DEFINE SYS$OUTPUT _NLA0:
1663 $ IF vaxcrtl_exe .EQS. ""
1665 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1667 $ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1670 $ link gccvers.obj,'gcclib_olb'
1674 $ OPEN/WRITE CONFIG GCCVERS.OPT
1675 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1677 $ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1680 $ DEASSIGN SYS$ERROR
1681 $ DEASSIGN SYS$OUTPUT
1682 $ IF (silent) THEN GOSUB Shut_up
1683 $ OPEN/WRITE CONFIG gccvers.out
1684 $ DEFINE SYS$ERROR CONFIG
1685 $ DEFINE SYS$OUTPUT CONFIG
1689 $ DEASSIGN SYS$OUTPUT
1690 $ DEASSIGN SYS$ERROR
1691 $ IF (silent) THEN GOSUB Shut_up
1692 $ OPEN/READ CONFIG gccvers.out
1693 $ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1696 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
1697 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1699 $ echo "You are not using GNU cc."
1702 $ echo "You are using GNU cc ''line'"
1705 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1713 $ OPEN/WRITE CONFIG cxxvers.c
1714 $ WRITE CONFIG "#include <stdio.h>"
1715 $ WRITE CONFIG "int main() {"
1716 $ WRITE CONFIG "#ifdef __DECCXX_VER"
1717 $ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
1718 $ WRITE CONFIG "#else"
1719 $ WRITE CONFIG " printf(""%i\n"", ""0"");"
1720 $ WRITE CONFIG "#endif"
1721 $ WRITE CONFIG " return(0);"
1725 $ DEFINE/USER_MODE SYS$ERROR NL:
1726 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1730 $ IF (silent) THEN GOSUB Shut_up
1732 $ DEFINE/USER_MODE SYS$ERROR NL:
1733 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1737 $ IF (silent) THEN GOSUB Shut_up
1738 $ OPEN/WRITE CONFIG cxxvers.out
1740 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1741 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1746 $ IF (silent) THEN GOSUB Shut_up
1747 $ OPEN/READ CONFIG cxxvers.out
1748 $ READ/END_OF_FILE=Cxx_cleanup CONFIG line
1751 $ DELETE/NOLOG/NOCONFIRM cxxvers.*;
1752 $ echo "You are using CXX ''line'"
1755 $ CALL Cxx_demangler_cleanup
1758 $Cxx_demangler_cleanup: SUBROUTINE
1760 $! If we do build with CXX these demangler Dbs will be left all over.
1761 $! However, configure.com does try to remove the [.UU] sub directory.
1762 $! Be sure to set default to the correct place before calling this sub.
1765 $ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
1766 $ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
1768 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
1769 $ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
1773 $ ENDSUBROUTINE ! Cxx_demangler_cleanup
1778 $ OPEN/READ CONFIG ccvms.lis
1780 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
1788 $ line = F$EDIT(line,"TRIM,COMPRESS")
1789 $ line = line - "Page 1" ! occurs at end all compilers
1790 $ line = line - "CCVMS " ! filename appears w/ VAXC
1791 $ line = line - "Source Listing " ! Seen w/ AXP DECC
1792 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
1794 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1795 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1799 $!: What should the include directory be ? (.TLB text libraries)
1801 $ rp = "Where are the include files you want to use? "
1802 $ IF f$length( rp + "[''dflt'] " ).gt.76
1803 $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
1804 $ ELSE rp = rp + "[''dflt'] "
1809 $!: see if we have to deal with yellow pages, now NIS.
1810 $!: now get the host name
1813 $ echo4 "Figuring out host name..." !>&4
1815 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
1816 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
1817 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
1818 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
1819 $ IF myhostname.eqs."".and. -
1820 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
1821 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
1822 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
1823 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
1824 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
1825 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
1826 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
1827 $!: you do not want to know about this
1829 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
1831 $ IF (.not.ans).and.(ans.NES."")
1833 $ READ SYS$COMMAND/PROMPT= -
1834 "Please type the (one word) name of your host: " ans
1837 $!: translate upper to lower if necessary
1838 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
1839 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
1840 $ IF mylowhostname.NES.myhostname
1842 $ echo "(Normalizing case in your host name)"
1843 $ myhostname = mylowhostname
1846 $ fp = F$LOCATE(".",myhostname)
1847 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
1848 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
1850 $ rp = "What is your domain name? [''mydomain'] "
1852 $ IF ans .nes. "" THEN mydomain = ans
1853 $!: translate upper to lower if necessary
1854 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
1855 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
1856 $ IF mylowdomain.NES.mydomain
1858 $ echo "(Normalizing case in your domain name)"
1859 $ mydomain = mylowdomain
1862 $ myhostname = myhostname - mydomain
1863 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
1865 $ THEN TYPE SYS$INPUT:
1867 I need to get your e-mail address in Internet format if possible, i.e.
1868 something like user@host.domain. Please answer accurately since I have
1869 no easy means to double check it. The default value provided below
1870 is most probably close to the reality but may not be valid from outside
1871 your organization...
1873 $ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
1874 $ rp = "What is your e-mail address? [''dflt'] "
1877 $ THEN cf_email = ans
1878 $ ELSE cf_email = dflt
1882 $ THEN TYPE SYS$INPUT:
1884 If you or somebody else will be maintaining perl at your site, please
1885 fill in the correct e-mail address here so that they may be contacted
1886 if necessary. Currently, the "perlbug" program included with perl
1887 will send mail to this address in addition to perlbug@perl.com. You may
1888 enter "none" for no administrator.
1890 $ dflt = "''cf_email'"
1891 $ rp = "Perl administrator e-mail address [''dflt'] "
1894 $ THEN perladmin = ans
1895 $ ELSE perladmin = dflt
1898 $!: determine where public executable scripts go
1899 $!: determine perl absolute location
1900 $!: figure out how to guarantee perl startup
1902 $!: see how we invoke the C preprocessor
1904 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
1905 $!: Set private lib path
1906 $!: Now check and see which directories actually exist, avoiding duplicates
1907 $!: determine optimize, if desired, or use for debug flag also
1908 $!: We will not override a previous value, but we might want to
1909 $!: augment a hint file
1910 $!: the following weeds options from ccflags that are of no interest to cpp
1911 $!: flags used in final linking phase
1912 $!: Try to guess additional flags to pick up local libraries.
1915 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
1916 $!: compute shared library extension
1917 $!: Looking for optional libraries
1918 $!: see if nm is to be used to determine whether a symbol is defined or not
1919 $!: get list of predefined functions in a handy place
1920 $!: see if we have sigaction
1921 $!: see whether socketshr exists
1922 $ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
1924 $ Has_socketshr = "T"
1926 $ echo4 "Hmm... Looks like you have SOCKETSHR's Berkeley networking support."
1928 $ Has_socketshr = "F"
1930 $ IF (Dec_C_Version .GE. 50200000)
1932 $ Has_Dec_C_Sockets = "T"
1934 $ echo4 "Hmm... Looks like you've got Dec C's Berkeley networking support."
1936 $ Has_Dec_C_Sockets = "F"
1938 $ ! Hey, we've got both. Default to Dec C, then, since it's better
1939 $ IF Has_socketshr .OR. Has_Dec_C_Sockets
1942 $ echo "You've got sockets available. Which socket stack do you want to"
1943 $ echo "build into perl?"
1944 $ IF Has_Dec_C_Sockets
1948 $ dflt = "SOCKETSHR"
1950 $ rp = "Choose socket stack (NONE"
1951 $ IF Has_socketshr THEN rp = rp + ",SOCKETSHR"
1952 $ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
1953 $ rp = rp + ") [''dflt'] "
1955 $ IF ans .EQS. "" THEN ans = "''dflt'"
1956 $ Has_Dec_C_Sockets = "F"
1957 $ Has_socketshr = "F"
1958 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
1959 $ IF ans.eqs."decc" then Has_Dec_C_Sockets = "T"
1960 $ IF ans.eqs."socketshr" then Has_socketshr = "T"
1964 $! Ask if they want to build with VMS_DEBUG perl
1966 $ echo "Perl can be built to run under the VMS debugger."
1967 $ echo "You should only select this option if you are debugging"
1968 $ echo "perl itself. This can be a useful feature if you are "
1969 $ echo "embedding perl in a program."
1971 $ rp = "Build a VMS-DEBUG version of Perl? [''dflt'] "
1973 $ IF ans.eqs."" then ans = dflt
1974 $ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
1976 $ use_vmsdebug_perl = "Y"
1977 $ macros = macros + """__DEBUG__=1"","
1979 $ use_vmsdebug_perl = "N"
1982 $! Ask if they want to build with DEBUGGING
1984 $ echo "Perl can be built with extra runtime debugging enabled. This
1985 $ echo "enables the -D switch, at the cost of some performance. It
1986 $ echo "was mandatory on perl 5.005 and before on VMS, but is now
1987 $ echo "optional. If you don't generally use it you should probably
1988 $ echo "leave this off and gain a bit of extra speed.
1990 $ rp = "Build a DEBUGGING version of Perl? [''dflt'] "
1992 $ IF ans.eqs."" then ans = dflt
1993 $ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
1995 $ use_debugging_perl = "Y"
1997 $ use_debugging_perl = "N"
2000 $! Ask if they want to build with MULTIPLICITY
2002 $ echo "Perl can be built so that multiple Perl interpreters can coexist"
2003 $ echo "within the same Perl executable."
2004 $ echo "There is some performance overhead, however, so you
2005 $ echo "probably don't want to choose this unless you're going to be doing
2006 $ echo "things with embedded perl."
2008 $ rp = "Build Perl for multiplicity? [''dflt'] "
2010 $ IF ans.eqs."" then ans = dflt
2013 $ usemultiplicity="define"
2015 $ usemultiplicity="undef"
2018 $! Ask if they want to build with 64-bit support
2019 $ IF (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2021 $ dflt = use64bitint
2023 $ echo "You can have native 64-bit long integers.
2025 $ echo "Perl can be built to take advantage of 64-bit integer types
2026 $ echo "on some systems, which provide a much larger range for perl's
2027 $ echo "mathematical operations. (Note that does *not* enable 64-bit
2028 $ echo "fileops at the moment, as Dec C doesn't do that yet)."
2029 $ echo "Choosing this option will most probably introduce binary incompatibilities.
2031 $ echo "If this doesn't make any sense to you, just accept the default ''dflt'.
2032 $ rp = "Try to use 64-bit integers, if available? [''dflt'] "
2034 $ IF ans .EQS. "" THEN ans = dflt
2035 $ IF (f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE")) .EQS. "Y")
2043 $ dflt = use64bitall
2045 $ echo "Since you chose 64-bitness you may want to try maximal 64-bitness.
2046 $ echo "What you have chosen is minimal 64-bitness which means just enough
2047 $ echo "to get 64-bit integers. The maximal means using as much 64-bitness
2048 $ echo "as is possible on the platform. This in turn means even more binary
2049 $ echo "incompatibilities. On the other hand, your platform may not have
2050 $ echo "any more maximal 64-bitness than what you already have chosen.
2052 $ echo "If this doesn't make any sense to you, just accept the default ''dflt'.
2053 $ rp = "Try to use full 64-bit support, if available? [''dflt'] "
2055 $ IF ans .EQS. "" THEN ans = dflt
2056 $ IF (f$extract(0, 1, f$edit(ans,"COLLAPSE,UPCASE")) .EQS. "Y")
2063 $ ENDIF ! AXP && >= 7.1
2065 $! Ask about threads, if appropriate
2069 $ echo "This version of Perl can be built with threads. While really nifty,
2070 $ echo "they are a beta feature, and there is a speed penalty for perl
2071 $ echo "programs if you build with threads *even if you don't use them*
2073 $ rp = "Build with threads? [''dflt'] "
2075 $ if ans.eqs."" then ans = dflt
2076 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
2080 $ ! Shall we do the 5.005-stype threads, or IThreads?
2081 $ echo "As of 5.5.640, Perl has two different internal threading
2082 $ echo "implementations, the 5.005 version (5005threads) and an
2083 $ echo "interpreter-based version (ithreads) that has one
2084 $ echo "interpreter per thread. Both are very experimental. This
2085 $ echo "arrangement exists to help developers work out which one
2088 $ echo "If you're a casual user, you probably don't want
2089 $ echo "interpreter-threads at this time. There doesn't yet exist
2090 $ echo "a way to create threads from within Perl in this model,
2091 $ echo "i.e., ""use Thread;"" will NOT work.
2094 $ rp = "Build with Interpreter threads? [''dflt']
2096 $ if ans.eqs."" then ans = dflt
2097 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
2100 $ use_5005_threads="N"
2103 $ use_5005_threads="Y"
2105 $ ! Are they on VMS 7.1 on an alpha?
2106 $ if (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2109 $ echo "Threaded perl can be linked to use multiple kernel threads
2110 $ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature
2111 $ echo "allows multiple threads to execute simultaneously on an SMP
2112 $ echo "system as well as preventing a single thread from blocking
2113 $ echo "all the threads in a program, even on a single-processor
2114 $ echo "machine. Unfortunately this feature isn't safe on an
2115 $ echo "unpatched 7.1 system. (Several OS patches were required when
2116 $ echo "this procedure was written)
2118 $ rp = "Enable multiple kernel threads and upcalls? [''dflt'] "
2120 $ if ans.eqs."" then ans="''dflt'"
2121 $ if f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")).eqs."Y"
2123 $ Thread_Live_Dangerously = "MT=MT=1"
2128 $ if archname .eqs. "VMS_AXP"
2133 $ echo "By default, perl (and pretty much everything else on VMS) uses
2134 $ echo "case-insensitive linker symbols. Which is to say, when the
2135 $ echo "underlying C code makes a call to a routine called Perl_foo in
2136 $ echo "the source, the name in the object modules or shareable images
2137 $ echo "is really PERL_FOO. There are some packages that use an
2138 $ echo "embedded perl interpreter that instead require case-sensitive
2139 $ echo "linker symbols.
2141 $ echo "If you have no idea what this means, and don't have
2142 $ echo "any program requiring anything, choose the default.
2143 $ dflt = be_case_sensitive
2144 $ rp = "Case-sensitive symbols [''dflt'] "
2146 $ if ans.eqs."" then ans="''dflt'"
2147 $ be_case_sensitive = "''ans'"
2151 $ echo "Perl normally uses G_FLOAT format floating point numbers
2152 $ echo "internally, as do most things on VMS. You can, however, build
2153 $ echo "with IEEE floating point numbers instead if you need to.
2154 $ dflt = use_ieee_math
2155 $ rp = "Use IEEE math [''dflt'] "
2157 $ if ans.eqs."" then ans="''dflt'"
2158 $ use_ieee_math = "''ans'"
2162 $ echo "You can, if you need to, pass extra flags on to the C
2163 $ echo "compiler. In general you should only do this if you really,
2164 $ echo "really know what you're doing.
2165 $ dflt = user_c_flags
2166 $ rp = "Extra C flags [''dflt'] "
2168 $ if ans.eqs."" then ans="''dflt'"
2169 $ user_c_flags = "''ans'"
2171 $! Ask whether they want to use secure logical translation when tainting
2173 $ echo "As Perl starts up, it checks several logical names, such as"
2174 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2175 $ echo "of its behavior. For additional security, you may limit this"
2176 $ echo "process to executive- and kernel-mode translation when tainting"
2177 $ echo "is enabled. In this case, logical names normally skipped when"
2178 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2179 $ echo "If you do not choose to do this, the usual order of access modes"
2180 $ echo "is used for logical name translation."
2182 $ echo "This restriction does not apply to the %ENV hash or to implicit"
2183 $ echo "logical name translation during parsing of file specifications;"
2184 $ echo "these always use the normal sequence of access modes for logical"
2185 $ echo "name translation."
2187 $ rp = "Use secure logical name translation? [''dflt'] "
2189 $ IF ans .eqs. "" THEN ans = dflt
2191 $ THEN d_secintgenv := Y
2192 $ ELSE d_secintgenv := N
2195 $! Ask whether they want to default filetypes
2197 $ echo "When you pass the name of a program to Perl on the command line,"
2198 $ echo "it generally doesn't supply any defaults unless the -S command"
2199 $ echo "line switch is specified. In keeping with the VMS tradition of"
2200 $ echo "default file types, however, you can configure Perl to try default"
2201 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2202 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2203 $ echo "finally foo.com)."
2205 $ echo "This is currently broken in some configurations. Only enable it if
2206 $ echo "you know what you're doing. "
2208 $ rp = "Always use default file types? [''dflt'] "
2210 $ IF ans .EQS. "" THEN ans = dflt
2212 $ THEN d_alwdeftype := Y
2213 $ ELSE d_alwdeftype := N
2216 $! Ask if they want to use perl's memory allocator
2218 $ echo "Perl has a built-in memory allocator that's tuned for perl's
2219 $ echo "normal memory usage. It's oftentimes better than the standard
2220 $ echo "system memory allocator. It also has the advantage of providing
2221 $ echo "memory allocation statistics, if you choose to enable them.
2223 $ rp = "Build with perl's memory allocator? [''dflt'] "
2225 $ IF ans .eqs. "" THEN ans = dflt
2227 $ THEN mymalloc := Y
2228 $ ELSE mymalloc := N
2232 $ IF use_debugging_perl
2235 $ echo "Perl can keep statistics on memory usage if you choose to use
2236 $ echo "them. This is useful for debugging, but does have some
2237 $ echo "performance overhead.
2239 $ rp = "Do you want the debugging memory allocator? [''dflt'] "
2241 $ if ans.eqs."" then ans="''dflt'"
2242 $ use_debugmalloc = f$extract(0, 1, f$edit(ans, "COLLAPSE,UPCASE"))
2244 $ ! Check which memory allocator we want
2246 $ echo "There are currently three different memory allocators: the
2247 $ echo "default (which is a pretty good general-purpose memory manager),
2248 $ echo "the TWO_POT allocator (which is optimized to save memory for
2249 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save
2250 $ echo "memory for smaller allocations). They're all good, but if your
2251 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use
2252 $ echo "PACK_MALLOC."
2254 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2256 $ if ans.eqs."" then ans = "''dflt'"
2257 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2258 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2261 $! Ask for their default list of extensions to build
2263 $ echo "It's time to specify which modules you want to build into
2264 $ echo "perl. Most of these are standard and should be chosen, though
2265 $ echo "you might, for example, want to build GDBM_File instead of
2266 $ echo "SDBM_File if you have the GDBM library built on your machine.
2267 $ echo "Whatever you do, make sure the re module is first or things will
2268 $ echo "break badly"
2270 $ echo "Which modules do you want to build into perl?"
2271 $! dflt = "Fcntl Errno File::Glob IO Opcode Byteloader Devel::Peek Devel::DProf Data::Dumper attrs re VMS::Stdio VMS::DCLsym B SDBM_File"
2272 $ dflt = "re Fcntl Errno File::Glob IO Opcode Devel::Peek Devel::DProf Data::Dumper attrs VMS::Stdio VMS::DCLsym B SDBM_File Thread Sys::Hostname"
2275 $ dflt = dflt + " POSIX"
2279 $ if ans.eqs."" then ans = "''dflt'"
2283 $ x = f$elem(j," ",ans)
2285 $ if x .eqs. " " then goto exloop1
2287 $ k = f$locate("::",x)
2288 $ if k .ge. f$len(x) then goto exloop2
2289 $ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$len(x)-2,x)
2295 $ ans = f$edit(a,"trim")
2300 $ x = f$elem(j," ",dflt)
2302 $ if x .eqs. " " then goto exloop3
2304 $ k = f$locate("::",x)
2305 $ if k .ge. f$len(x) then goto exloop4
2306 $ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$len(x)-2,x)
2312 $ dflt = f$edit(a,"trim")
2314 $ extensions = "''ans'"
2315 $ known_extensions = "''dflt'"
2317 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2319 $ echo "Checking your ""make"" utilities..."
2320 $! If the 'build' that you use is not here add it and it's test
2321 $! switch to the _END_ of these strings (and increment max_build)
2322 $! (e.g. builders = builders + "/FOOMAKE"
2323 $! probers = probers + " -fooVersionSwitch"
2324 $! ) & please let me know about it.
2325 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2326 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2332 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2333 $ WRITE CONFIG "dont_make_anything_yet:"
2334 $ WRITE CONFIG F$FAO("!_")
2337 $ messages = F$ENVIRONMENT("MESSAGE")
2339 $ build = F$ELEMENT(n,"/",builders)
2340 $ probe = F$ELEMENT(n,"!",probers)
2341 $ echo "Testing whether you have ''build' on your system..."
2343 $! Noted with GNU Make version 3.60 that the $status and $severity
2344 $! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2345 $! $SEVERITY == "4".
2348 $ ON CONTROL_Y THEN GOTO Reenable_messages_build
2349 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
2351 $ IF ($SEVERITY .EQ. 1) ! not adequate?
2354 $ IF (build .EQS. orig_dflt)
2356 $ default_set = "TRUE"
2359 $ ok_builders = ok_builders + " " + build
2360 $ IF (.NOT. default_set) THEN dflt = build
2364 $Reenable_messages_build:
2365 $ SET MESSAGE 'messages'
2368 $ IF (n .LT. max_build) THEN GOTO Build_probe
2371 $ IF (ok_builders .NES. "")
2373 $ echo "Here is the list of builders you can apparently use:"
2374 $ echo "(",ok_builders," )"
2375 $ rp = "Which """"make"""" utility do you wish to use [''dflt']? "
2377 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2378 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2386 %Config-E-VMS, ERROR:
2387 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
2388 utility of some sort and after checking my "builders" list I cannot find
2389 the symbol or command you use on your system to compile programs.
2391 $ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
2392 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2393 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2396 $ echo "I don't know where 'make' is, and my life depends on it."
2397 $ echo "Go find a make program or fix your DCL$PATH setting!"
2398 $ echo "ABORTING..."
2399 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2401 $ EXIT 2 !$STATUS = "%X00000002" (error)
2407 $ DELETE/NOLOG Makefile.;
2412 There seems to be trouble. I just tried to create a file in
2413 $ echo4 'F$ENVIRONMENT("DEFAULT")'
2415 but was unsuccessful. I am stopping now. Please check that directories'
2416 PROTECTION bits. I will leave you in the directory where you started
2418 $ echo4 "ABORTING..."
2424 $! echo " Very well I will proceed with ""''build'"""
2425 $ make = F$EDIT(build,"UPCASE")
2427 $!: locate the preferred pager for this system
2428 $!pagers = "most|more|less|type/page"
2429 $!rp='What pager is used on your system?'
2431 $! update [.vms]config.vms here
2433 $! update makefile here
2434 $! echo4 "Updating makefile..."
2436 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2438 $ makefile = "" !wrt MANIFEST dir
2439 $ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
2440 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
2441 $ Makefile_SH = "descrip_mms.template"
2443 $ makefile = " -f Makefile." !wrt MANIFEST dir
2444 $ UUmakefile = "[-]Makefile." !wrt CWD dir
2445 $ DEFmakefile = "Makefile." !wrt DEF dir (?)
2446 $ Makefile_SH = "Makefile.in"
2451 $ tmp = F$LENGTH(macros)
2452 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2453 $ macros = "/macro=(" + macros + ")"
2455 $! Build up the extra C flags
2459 $ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm_results"
2461 $ if be_case_sensitive
2463 $ extra_flags = "''extra_flags'" + "/Names=As_Is"
2465 $ extra_flags = "''extra_flags'" + "''user_c_flags'"
2467 $ min_pgflquota = "100000"
2468 $ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
2469 $ IF pgflquota .LES. min_pgflquota
2471 $ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
2472 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
2475 $ echo4 "Continuing..."
2477 $ echo4 "ABORTING..."
2483 $ echo4 "Checking the C run-time library."
2487 $! - build a config.sh for VMS Perl.
2488 $! - use built config.sh to take config_h.SH -> config.h
2489 $! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
2490 $! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
2491 $! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
2492 $! - build Build_Ext.Com extension builder procedure.
2494 $! Note for folks from other platforms changing things in here:
2496 $! Fancy changes (based on compiler capabilities or VMS version or
2497 $! whatever) are tricky, so go ahead and punt on those.
2499 $! Simple changes, though (say, always setting something to 1, or undef,
2500 $! or something like that) are straightforward. Adding a new constant
2501 $! item for the ultimately created config.sh requires at least one
2502 $! (possibly more) line(s) to this file.
2504 $! Add a line in the format:
2506 $! $ WC "foo='undef'"
2508 $! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
2509 $! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
2510 $! is sorted ASCII and corresponds to the output of config.sh in the
2511 $! Bourne shell version of Configure).
2512 $! Be very careful with quoting, as it can be tricky.
2513 $! For example if instead of a constant string like 'undef' or 'define'
2514 $! you wanted to add something to VMS's config.sh that looks like:
2518 $! then add a line that looks like this before the
2519 $! '##END WRITE NEW CONSTANTS HERE##' tagged line:
2521 $! $ WC "blank_string='" + "'"
2523 $! (+ is the string concatenator and "''var'" has the effect
2524 $! of "${var}" in perl or sh, but "'const'" is not interpolated).
2526 $! Note that unitialized variables, such as a line like:
2528 $! $ WC "new_var='" + new_var + "'"
2530 $! should be avoided unless new_var has a value assigned prior
2531 $! to that line (think of perl's -w warnings).
2533 $! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
2537 $ vms_ver = F$EXTRACT(1,3, osvers)
2538 $ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
2539 $ MCC = f$edit(mcc, "UPCASE")
2540 $ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
2543 $ Checkcc := "''Mcc'/prefix=all"
2549 $ Checkcc := "''Mcc'"
2552 $ ccflags = ccflags + extra_flags
2553 $ IF be_case_sensitive
2555 $ d_vms_be_case_sensitive = "define"
2557 $ d_vms_be_case_sensitive = "undef"
2559 $! Some constant defaults.
2560 $ hwname = f$getsyi("HW_NAME")
2561 $ myname = myhostname
2562 $ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
2567 $ IF use64bitint .OR. use64bitint .EQS. "define"
2569 $ use64bitint = "define"
2570 $ uselargefiles = "define"
2571 $ uselongdouble = "define"
2572 $ usemorebits = "define"
2574 $ use64bitint = "undef"
2575 $ uselargefiles = "undef"
2576 $ uselongdouble = "undef"
2577 $ usemorebits = "undef"
2579 $ IF use64bitall .OR. use64bitall .EQS. "define"
2581 $ use64bitall = "define"
2583 $ use64bitall = "undef"
2586 $ usemymalloc=mymalloc
2590 $ IF (sharedperl .AND. F$GETSYI("HW_MODEL") .GE. 1024)
2604 $ dlobj="dl_vms''obj_ext'"
2606 $ cppstdin="''perl_cc'/noobj/preprocess=sys$output sys$input"
2608 $ cpprun="''perl_cc'/noobj/preprocess=sys$output sys$input"
2616 $ THEN d_mymalloc="define"
2617 $ ELSE d_mymalloc="undef"
2621 $ startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !\n$ exit++ + ++$status != 0 and $exit = $status = undef;"""
2622 $!: locate the preferred pager for this system
2623 $! rp="What pager is used on your system?"
2626 $ IF ((Use_Threads) .AND. (vms_ver .LES. "6.2"))
2628 $ 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"
2641 $ IF use64bitint .OR. use64bitint .EQS. "define"
2643 $ d_PRId64 = "define"
2644 $ d_PRIfldbl = "define"
2645 $ d_PRIgldbl = "define"
2646 $ d_PRIu64 = "define"
2647 $ d_PRIo64 = "define"
2648 $ d_PRIx64 = "define"
2649 $ sPRId64 = """Ld"""
2650 $! sPRIeldbl = """Lf"""
2651 $ sPRIfldbl = """Lf"""
2652 $ sPRIgldbl = """Lg"""
2653 $! sPRIi64 = """Li"""
2654 $ sPRIo64 = """Lo"""
2655 $ sPRIu64 = """Lu"""
2656 $ sPRIx64 = """Lx"""
2658 $ quadtype = "long long"
2659 $ uquadtype = "unsigned long long"
2660 $ quadkind = "QUAD_IS_LONG_LONG"
2661 $ d_frexpl = "define"
2662 $ d_isnanl = "define"
2663 $ d_modfl = "define"
2665 $ d_PRId64 = "undef"
2666 $ d_PRIfldbl = "undef"
2667 $ d_PRIgldbl = "undef"
2668 $ d_PRIu64 = "undef"
2669 $ d_PRIo64 = "undef"
2670 $ d_PRIx64 = "undef"
2681 $ uquadtype = "unsigned long"
2682 $ quadkind = "QUAD_IS_LONG"
2683 $ d_frexpl = "undef"
2684 $ d_isnanl = "undef"
2688 $! Now some that we build up
2692 $ IF use_5005_threads
2694 $ arch = "''arch'-thread"
2695 $ archname = "''archname'-thread"
2696 $ d_old_pthread_create_joinable = "undef"
2697 $ old_pthread_create_joinable = " "
2698 $ use5005threads = "define"
2699 $ useithreads = "undef"
2701 $ arch = "''arch'-ithread"
2702 $ archname = "''archname'-ithread"
2703 $ d_old_pthread_create_joinable = "undef"
2704 $ old_pthread_create_joinable = " "
2705 $ use5005threads = "undef"
2706 $ useithreads = "define"
2709 $ d_old_pthread_create_joinable = "undef"
2710 $ old_pthread_create_joinable = " "
2711 $ use5005threads = "undef"
2712 $ useithreads = "undef"
2715 $! Some that we need to invoke the compiler for
2718 $! handy construction aliases/symbols
2720 $ OS := "open/write CONFIG []try.c"
2721 $ WS := "write CONFIG"
2722 $ CS := "close CONFIG"
2723 $ DS := "delete/nolog/noconfirm []try.*;*"
2725 $ good_compile = %X10B90001
2728 $ open/write OPTCHAN []try.opt
2729 $ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
2730 $ write OPTCHAN "Sys$Share:VAXCRTL/Share"
2733 $ good_compile = %X10000001
2737 $ good_compile = %X15F60001
2739 $ good_link = %X10000001
2740 $ tmp = "" ! null string default
2742 $ GOTO beyond_compile_ok
2744 $! Check for type sizes
2750 $ WS "#include <stdlib.h>
2752 $ WS "#include <stdio.h>
2755 $ WS "printf(""%d\n"", sizeof(''tmp'));"
2762 $!: locate header file
2767 $ WS "#include <stdlib.h>
2769 $ WS "#include <stdio.h>
2770 $ WS "#include <''tmp'>"
2773 $ WS "printf(""define\n"");"
2780 $!: define an alternate in-header-list? function
2784 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
2786 $ echo4 "<''tmp'> found."
2789 $ echo4 "<''tmp'> NOT found."
2794 $!: define an is-in-libc? function
2797 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
2799 $ echo4 "''tmp'() found."
2802 $ echo4 "''tmp'() NOT found."
2807 $!: define a shorthand compile call
2811 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
2813 $ OPEN/WRITE CONFIG []try.out
2814 $ DEFINE/USER_MODE SYS$ERROR CONFIG
2815 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
2818 $ OPEN/READ CONFIG []try.out
2821 $ DELETE/NOLOG/NOCONFIRM []try.out;
2822 $ DELETE/NOLOG/NOCONFIRM []try.exe;
2824 $ tmp = "" ! null string default
2830 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
2831 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
2835 $ 'ld' try.obj,try.opt/opt
2836 $ link_status = $status
2839 $ link_status = $status
2842 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
2845 $!: define a shorthand compile call for compilations that should be ok.
2847 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
2848 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
2851 $ compile_status = $status
2853 $ DELETE/NOLOG/NOCONFIRM try.c;
2858 $! Check for __STDC__
2862 $ WS "#include <stdlib.h>
2864 $ WS "#include <stdio.h>
2867 $ WS "#ifdef __STDC__
2868 $ WS "printf(""42\n"");
2870 $ WS "printf(""1\n"");
2877 $ IF F$INTEGER(tmp) .eq. 42
2879 $ echo4 "Your C compiler and pre-processor defines the symbol:"
2883 $! Check for double size
2885 $ echo4 "Checking to see how big your double precision numbers are..."
2887 $ GOSUB type_size_check
2889 $ echo "Your double is ''doublesize' bytes long."
2891 $! Check for long double size
2895 $ WS "#include <stdlib.h>
2897 $ WS "#include <stdio.h>
2900 $ WS "printf(""%d\n"", sizeof(long double));
2904 $ echo4 "Checking to see if you have long double..."
2906 $ IF link_status .NE. good_link
2910 $ echo "You do not have long double."
2912 $ echo "You have long double."
2913 $ echo4 "Checking to see how big your long doubles are..."
2916 $ d_longdbl = "define"
2917 $ echo "Your long doubles are ''longdblsize' bytes long."
2920 $!: check for long long
2923 $ WS "#include <stdlib.h>
2925 $ WS "#include <stdio.h>
2928 $ WS "printf(""%d\n"", sizeof(long long));
2932 $ echo4 "Checking to see if you have long long..."
2934 $ IF link_status .NE. good_link
2937 $ d_longlong="undef"
2938 $ echo "You do not have long long."
2940 $ echo "You have long long."
2941 $ echo4 "Checking to see how big your long longs are..."
2943 $ longlongsize = tmp
2944 $ d_longlong = "define"
2945 $ echo "Your long longs are ''longlongsize' bytes long."
2948 $! Check the prototype for getgid
2950 $ echo "Looking for the type for group ids returned by getgid()."
2953 $ WS "#include <stdlib.h>
2955 $ WS "#include <stdio.h>
2956 $ WS "#include <types.h>
2964 $ IF compile_status .NE. good_compile
2966 $! Okay, gid_t failed. Must be unsigned int
2967 $ gidtype = "unsigned int"
2968 $ echo4 "assuming ""''gidtype'""."
2971 $ echo4 "gid_t found."
2974 $! Check to see if we've got dev_t
2976 $ echo "Looking for the type for dev."
2979 $ WS "#include <stdlib.h>
2981 $ WS "#include <stdio.h>
2982 $ WS "#include <types.h>
2990 $ IF compile_status .NE. good_compile
2992 $! Okay, dev_t failed. Must be unsigned int
2993 $ devtype = "unsigned int"
2994 $ echo4 "assuming ""''devtype'""."
2997 $ echo4 "dev_t found."
3000 $! Check to see if we've got unistd.h (which we ought to, but you never know)
3007 $!: see if this is a libutil.h system
3013 $! Check to see if we've got shadow.h (probably not, but...)
3019 $! Check to see if we've got socks.h (probably not, but...)
3025 $! Check the prototype for select
3027 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3031 $ WS "#include <stdlib.h>
3033 $ WS "#include <stdio.h>
3034 $ WS "#include <types.h>
3035 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>
3038 $ WS "#include <socketshr.h>"
3040 $ WS "#include <time.h>
3041 $ WS "#include <socket.h>
3048 $ WS "bar = select(2, foo, foo, foo, NULL);
3053 $ IF compile_status .NE. good_compile
3055 $! Okay, select failed. Must be an int *
3056 $ selecttype = "int *"
3057 $ echo4 "select() NOT found."
3059 $ selecttype="fd_set *"
3060 $ echo4 "select() found."
3063 $ ! No sockets, so stick in an int * : no select, so pick a harmless default
3064 $ selecttype = "int *"
3067 $! Check to see if fd_set exists
3069 $ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3072 $ WS "#include <stdlib.h>
3074 $ WS "#include <stdio.h>
3075 $ WS "#include <types.h>
3078 $ WS "#include <socketshr.h>"
3080 $ IF Has_Dec_C_Sockets
3082 $ WS "#include <time.h>
3083 $ WS "#include <socket.h>
3093 $ IF compile_status .ne. good_compile
3095 $! Okay, fd_set failed. Must not exist
3096 $ d_fd_set = "undef"
3097 $ echo4 "Hmm, your compiler has some difficulty with fd_set."
3100 $ echo4 "Well, your system knows about the normal fd_set typedef..."
3103 $! Check for inttypes.h
3105 $ tmp = "inttypes.h"
3109 $! Check to see if off64_t exists
3111 $ echo4 "Checking to see if you have off64_t..."
3114 $ WS "#include <stdlib.h>
3116 $ WS "#include <stdio.h>
3117 $ WS "#include <types.h>
3118 $ WS "#''i_inttypes IIH
3120 $ WS "#include <inttypes.h>
3129 $ IF compile_status .EQ. good_compile
3131 $ d_off64_t="define"
3132 $ echo "You have off64_t."
3134 $ d_off64_t = "undef"
3135 $ echo "You do not have off64_t."
3138 $! Check to see if fpos64_t exists
3140 $ echo4 "Checking to see if you have fpos64_t..."
3143 $ WS "#include <stdlib.h>
3145 $ WS "#include <stdio.h>
3146 $ WS "#include <types.h>
3147 $ WS "#''i_inttypes IIH
3149 $ WS "#include <inttypes.h>
3158 $ IF compile_status .EQ. good_compile
3160 $ d_fpos64_t="define"
3161 $ echo "You have fpos64_t."
3163 $ d_fpos64_t = "undef"
3164 $ echo "You do not have fpos64_t."
3167 $! Check to see if int64_t exists
3169 $ echo4 "Checking to see if you have int64_t..."
3172 $ WS "#include <stdlib.h>
3174 $ WS "#include <stdio.h>
3175 $ WS "#include <types.h>
3176 $ WS "#''i_inttypes IIH
3178 $ WS "#include <inttypes.h>
3187 $ IF compile_status .EQ. good_compile
3189 $ d_int64_t="define"
3190 $ echo "You have int64_t."
3192 $ d_int64_t = "undef"
3193 $ echo "You do not have int64_t."
3196 $!: see if this is a netdb.h system
3197 $ IF Has_Dec_C_Sockets
3204 $! Check for h_errno
3206 $ echo4 "Checking to see if you have h_errno..."
3209 $ WS "#include <stdlib.h>
3211 $ WS "#include <stdio.h>
3212 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>
3213 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3221 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3224 $ echo "You have h_errno."
3227 $ echo "You do not have h_errno."
3230 $! Check to see if gethostname exists
3232 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3236 $ WS "#include <stdlib.h>
3238 $ WS "#include <stdio.h>
3239 $ WS "#include <types.h>
3242 $ WS "#include <socketshr.h>"
3244 $ WS "#include <time.h>
3245 $ WS "#include <socket.h>
3249 $ WS "char name[100];
3252 $ WS "baz = gethostname(name, bar);
3257 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3259 $ d_gethname="define"
3260 $ echo4 "gethostname() found."
3262 $ d_gethname="undef"
3265 $ ! No sockets, so no gethname
3266 $ d_gethname = "undef"
3269 $! Check for sys/file.h
3271 $ tmp = "sys/file.h"
3275 $! Check for sys/utsname.h
3277 $ tmp = "sys/utsname.h"
3279 $ i_sysutsname = tmp
3281 $! Check for syslog.h
3293 $! Check for sys/uio.h
3299 $! Check for sys/mode.h
3301 $ tmp = "sys/mode.h"
3305 $! Check for sys/access.h
3307 $ tmp = "sys/access.h"
3311 $! Check for sys/security.h
3313 $ tmp = "sys/security.h"
3317 $! Check for fcntl.h
3327 $ WS "#include <stdlib.h>
3329 $ WS "#include <stdio.h>
3330 $ WS "#include <fcntl.h>
3345 $ WS "#include <stdlib.h>
3347 $ WS "#include <string.h>
3351 $ WS "place = memchr(""foo"", 47, 3)
3359 $! Check for strtoull
3363 $ WS "#include <stdlib.h>
3365 $ WS "#include <string.h>
3368 $ WS "unsigned __int64 result;
3369 $ WS "result = strtoull(""123123"", NULL, 10);
3377 $! Check for strtouq
3381 $ WS "#include <stdlib.h>
3383 $ WS "#include <string.h>
3386 $ WS "unsigned __int64 result;
3387 $ WS "result = strtouq(""123123"", NULL, 10);
3395 $! Check for strtoll
3399 $ WS "#include <stdlib.h>
3401 $ WS "#include <string.h>
3404 $ WS "__int64 result;
3405 $ WS "result = strtoll(""123123"", NULL, 10);
3413 $! Check for strtold
3417 $ WS "#include <stdlib.h>
3419 $ WS "#include <string.h>
3422 $ WS "long double result;
3423 $ WS "result = strtold(""123123"", NULL, 10);
3435 $ WS "#include <stdlib.h>
3437 $ WS "#include <string.h>
3440 $ WS " __int64 result;
3441 $ WS "result = atoll(""123123"");
3453 $ WS "#include <stdlib.h>
3455 $ WS "#include <string.h>
3459 $ WS "result = atolf(""123123"");
3471 $ WS "#include <stdlib.h>
3473 $ WS "#include <stdio.h>
3476 $ WS "access("foo", F_OK);
3488 $ WS "#include <stdlib.h>
3490 $ WS "#include <stdio.h>
3491 $ WS "#include <strings.h>
3495 $ WS "bzero(foo, 10);
3507 $ WS "#include <stdlib.h>
3509 $ WS "#include <stdio.h>
3510 $ WS "#include <strings.h>
3513 $ WS "char foo[10], bar[10];
3514 $ WS "bcopy(""foo"", bar, 3);
3522 $! Check for mkstemp
3526 $ WS "#include <stdlib.h>
3528 $ WS "#include <stdio.h>
3531 $ WS "mkstemp(""foo"");
3539 $! Check for mkstemps
3543 $ WS "#include <stdlib.h>
3545 $ WS "#include <stdio.h>
3548 $ WS "mkstemps(""foo"", 1);
3560 $ WS "#include <stdlib.h>
3562 $ WS "#include <stdio.h>
3563 $ WS "#include <iconv.h>
3566 $ WS " iconv_t cd = (iconv_t)0;"
3567 $ WS " char *inbuf, *outbuf;"
3568 $ WS " size_t inleft, outleft;"
3569 $ WS " iconv(cd, &inbuf, &inleft, &outbuf, &outleft);"
3574 $ IF compile_status .ne. good_compile
3579 $ IF link_status .ne. good_link
3588 $ IF i_iconv .eqs. "define"
3589 $ THEN echo4 "<iconv.h> found."
3590 $ ELSE echo4 "<iconv.h> NOT found."
3593 $! Check for mkdtemp
3597 $ WS "#include <stdlib.h>
3599 $ WS "#include <stdio.h>
3602 $ WS "mkdtemp(""foo"");
3610 $! Check for setvbuf
3614 $ WS "#include <stdlib.h>
3616 $ WS "#include <stdio.h>
3620 $ WS "char Buffer[99];
3621 $ WS "foo = fopen(""foo"", ""r"");
3622 $ WS "setvbuf(foo, Buffer, 0, 0);
3634 $ WS "#include <stdlib.h>
3636 $ WS "#include <stdio.h>
3639 $ WS "setenv(""FOO"", ""BAR"", 0);
3647 $! Check for setproctitle
3651 $ WS "#include <stdlib.h>
3653 $ WS "#include <stdio.h>
3656 $ WS "setproctitle(""%s"", ""FOO"");
3660 $ tmp = "setproctitle"
3662 $ d_setproctitle = tmp
3664 $! Check for <netinet/in.h>
3666 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
3668 $ tmp = "netinet/in.h"
3675 $! Check for <netinet/tcp.h>
3677 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
3679 $ tmp = "netinet/tcp.h"
3681 $ i_netinettcp = tmp
3683 $ i_netinettcp="undef"
3686 $! Check for endhostent
3688 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
3692 $ WS "#include <stdlib.h>
3694 $ WS "#include <stdio.h>
3696 $ THEN WS "#include <socketshr.h>"
3697 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3705 $ tmp = "endhostent"
3712 $! Check for endnetent
3714 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
3718 $ WS "#include <stdlib.h>
3720 $ WS "#include <stdio.h>
3722 $ THEN WS "#include <socketshr.h>"
3723 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3738 $! Check for endprotoent
3740 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3744 $ WS "#include <stdlib.h>
3746 $ WS "#include <stdio.h>
3748 $ THEN WS "#include <socketshr.h>"
3749 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3753 $ WS "endprotoent();
3757 $ tmp = "endprotoent"
3764 $! Check for endservent
3766 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3770 $ WS "#include <stdlib.h>
3772 $ WS "#include <stdio.h>
3774 $ THEN WS "#include <socketshr.h>"
3775 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3783 $ tmp = "endservent"
3790 $! Check for sethostent
3792 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3796 $ WS "#include <stdlib.h>
3798 $ WS "#include <stdio.h>
3800 $ THEN WS "#include <socketshr.h>"
3801 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3805 $ WS "sethostent(1);
3809 $ tmp = "sethostent"
3816 $! Check for setnetent
3818 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3822 $ WS "#include <stdlib.h>
3824 $ WS "#include <stdio.h>
3826 $ THEN WS "#include <socketshr.h>"
3827 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3842 $! Check for setprotoent
3844 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3848 $ WS "#include <stdlib.h>
3850 $ WS "#include <stdio.h>
3852 $ THEN WS "#include <socketshr.h>"
3853 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3857 $ WS "setprotoent(1);
3861 $ tmp = "setprotoent"
3868 $! Check for setservent
3870 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3874 $ WS "#include <stdlib.h>
3876 $ WS "#include <stdio.h>
3878 $ THEN WS "#include <socketshr.h>"
3879 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3883 $ WS "setservent(1);
3887 $ tmp = "setservent"
3894 $! Check for gethostent
3896 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3900 $ WS "#include <stdlib.h>
3902 $ WS "#include <stdio.h>
3904 $ THEN WS "#include <socketshr.h>"
3905 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3913 $ tmp = "gethostent"
3920 $! Check for getnetent
3922 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3926 $ WS "#include <stdlib.h>
3928 $ WS "#include <stdio.h>
3930 $ THEN WS "#include <socketshr.h>"
3931 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3946 $! Check for getprotoent
3948 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3952 $ WS "#include <stdlib.h>
3954 $ WS "#include <stdio.h>
3956 $ THEN WS "#include <socketshr.h>"
3957 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3961 $ WS "getprotoent();
3965 $ tmp = "getprotoent"
3972 $! Check for getservent
3974 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3978 $ WS "#include <stdlib.h>
3980 $ WS "#include <stdio.h>
3982 $ THEN WS "#include <socketshr.h>"
3983 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
3991 $ tmp = "getservent"
3998 $! Check for socklen_t
4000 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4002 $ echo4 "Checking to see if you have socklen_t..."
4005 $ WS "#include <stdlib.h>
4007 $ WS "#include <stdio.h>
4009 $ THEN WS "#include <socketshr.h>"
4010 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>
4014 $ WS "socklen_t x = 16;
4019 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4021 $ d_socklen_t="define"
4022 $ echo "You have socklen_t."
4024 $ d_socklen_t="undef"
4025 $ echo "You do not have socklen_t."
4028 $ d_socklen_t="undef"
4031 $! Check for pthread_yield
4037 $ WS "#include <stdlib.h>
4039 $ WS "#include <pthread.h>
4040 $ WS "#include <stdio.h>
4043 $ WS "pthread_yield();
4047 $ tmp = "pthread_yield"
4049 $ d_pthread_yield = tmp
4051 $ d_pthread_yield="undef"
4054 $! Check for sched_yield
4060 $ WS "#include <stdlib.h>
4062 $ WS "#include <pthread.h>
4063 $ WS "#include <stdio.h>
4066 $ WS "sched_yield();
4070 $ tmp = "sched_yield"
4072 $ d_sched_yield = tmp
4073 $ IF d_sched_yield .EQS. "define"
4074 $ THEN sched_yield = "sched_yield"
4075 $ ELSE sched_yield = " "
4078 $ d_sched_yield="undef"
4082 $! Check for generic pointer size
4084 $ echo4 "Checking to see how big your pointers are..."
4087 $ WS "#include <stdlib.h>
4089 $ WS "#include <stdio.h>
4093 $ WS "foo = sizeof(char *);
4094 $ WS "printf(""%d\n"", foo);
4099 $ GOSUB type_size_check
4101 $ echo "Your pointers are ''ptrsize' bytes long."
4103 $! Check for size_t size
4107 $ echo4 "Checking the size of ''zzz'..."
4108 $ GOSUB type_size_check
4110 $ echo "Your ''zzz' size is ''sizesize' bytes."
4112 $! Check rand48 and its ilk
4114 $ echo4 "Looking for a random number function..."
4117 $ WS "#include <stdlib.h>
4119 $ WS "#include <stdio.h>
4122 $ WS "srand48(12L);"
4127 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4129 $ drand01 = "drand48()"
4130 $ randseedtype = "long int"
4131 $ seedfunc = "srand48"
4132 $ echo4 "Good, found drand48()."
4133 $ d_drand48proto = "define"
4135 $ d_drand48proto = "undef"
4136 $ drand01="random()"
4137 $ randseedtype = "unsigned"
4138 $ seedfunc = "srandom"
4141 $ WS "#include <stdlib.h>
4143 $ WS "#include <stdio.h>
4151 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4153 $ echo4 "OK, found random()."
4155 $ drand01="(((float)rand())/((float)RAND_MAX))"
4156 $ randseedtype = "unsigned"
4157 $ seedfunc = "srand"
4158 $ echo4 "Yick, looks like I have to use rand()."
4162 $! Done with compiler checks. Clean up.
4163 $ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
4164 $ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
4165 $ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
4166 $ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
4167 $ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
4170 $ CALL Cxx_demangler_cleanup
4173 $! Some that are compiler or VMS version sensitive
4178 $ d_attribut="define"
4182 $ d_attribut="undef"
4185 $! Dec C >= 5.2 and VMS ver >= 7.0
4186 $ IF (Using_Dec_C).AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.(vms_ver .GES. "7.0")
4189 $ d_gettimeod="define"
4191 $ d_sigaction="define"
4192 $ d_truncate="define"
4196 $ 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"
4197 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4198 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
4199 $ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
4200 $ sig_name_init = psnwc1 + psnwc2 + psnwc3
4201 $ 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"
4202 $ 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"
4203 $! perl_sig_num_with_commas=sig_num_init
4205 $ d_pathconf="define"
4206 $ d_fpathconf="define"
4207 $ d_sysconf="define"
4208 $ d_sigsetjmp="define"
4210 $ pidtype="unsigned int"
4211 $ d_gettimeod="undef"
4214 $ d_sigaction="undef"
4215 $ d_truncate="undef"
4218 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"",0"
4219 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4220 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
4221 $ sig_name_init = psnwc1 + psnwc2
4222 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"",0"
4223 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
4224 $! perl_sig_num_with_commas=sig_num_init
4225 $ uidtype="unsigned int"
4226 $ d_pathconf="undef"
4227 $ d_fpathconf="undef"
4229 $ d_sigsetjmp="undef"
4235 $ d_mbstowcs="define"
4237 $ d_stdiobase="define"
4238 $ d_stdio_cnt_lval="define"
4239 $ d_stdio_ptr_lval="define"
4240 $ d_stdstdio="define"
4241 $ d_wcstombs="define"
4244 $ d_strcoll="define"
4245 $ d_strxfrm="define"
4248 $ d_locconv="define"
4249 $ d_setlocale="define"
4250 $ vms_cc_type="decc"
4252 $ d_mbstowcs="undef"
4254 $ d_stdiobase="undef"
4255 $ d_stdio_cnt_lval="undef"
4256 $ d_stdio_ptr_lval="undef"
4257 $ d_stdstdio="undef"
4258 $ d_wcstombs="undef"
4266 $ d_setlocale="undef"
4270 $ if Has_Socketshr .OR. Has_Dec_C_Sockets
4272 $ d_vms_do_sockets="define"
4276 $ netdb_hlen_type="int"
4277 $ netdb_host_type="char *"
4278 $ netdb_name_type="char *"
4279 $ netdb_net_type="long"
4280 $ d_gethbyaddr="define"
4281 $ d_gethbyname="define"
4282 $ d_getnbyaddr="define"
4283 $ d_getnbyname="define"
4284 $ d_getpbynumber="define"
4285 $ d_getpbyname="define"
4286 $ d_getsbyport="define"
4287 $ d_getsbyname="define"
4288 $ d_gethostprotos="define"
4289 $ d_getnetprotos="define"
4290 $ d_getprotoprotos="define"
4291 $ d_getservprotos="define"
4294 $ socksizetype="unsigned int"
4296 $ socksizetype="int *"
4299 $ d_vms_do_sockets="undef"
4303 $ netdb_hlen_type="int"
4304 $ netdb_host_type="char *"
4305 $ netdb_name_type="char *"
4306 $ netdb_net_type="long"
4307 $ d_gethbyaddr="undef"
4308 $ d_gethbyname="undef"
4309 $ d_getnbyaddr="undef"
4310 $ d_getnbyname="undef"
4311 $ d_getpbynumber="undef"
4312 $ d_getpbyname="undef"
4313 $ d_getsbyport="undef"
4314 $ d_getsbyname="undef"
4315 $ d_gethostprotos="undef"
4316 $ d_getnetprotos="undef"
4317 $ d_getprotoprotos="undef"
4318 $ d_getservprotos="undef"
4319 $ socksizetype="undef"
4324 $ usethreads="define"
4325 $ d_pthreads_created_joinable="define"
4326 $ if (vms_ver .GES. "7.0")
4328 $ d_oldpthreads="undef"
4330 $ d_oldpthreads="define"
4333 $ d_oldpthreads="undef"
4334 $ usethreads="undef"
4335 $ d_pthreads_created_joinable="undef"
4338 $! new (5.005_62++) typedefs for primitives
4340 $ echo "Choosing the C types to be used for Perl's internal types..."
4342 $ uvtype="unsigned long"
4344 $ u8type="unsigned char"
4346 $ u16type="unsigned short"
4348 $ u32type="unsigned int"
4349 $ i64type="long long"
4350 $ u64type="unsigned long long"
4353 $ IF use64bitint .OR. use64bitint .EQS. "define"
4355 $ ivtype = "''i64type'"
4356 $ uvtype = "''u64type'"
4357 $ nvtype="long double"
4364 $ GOSUB type_size_check
4366 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp
4367 $ IF ivtype .eqs. "long"
4368 $ THEN longsize = tmp
4371 $ GOSUB type_size_check
4376 $ GOSUB type_size_check
4378 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp
4381 $ GOSUB type_size_check
4385 $ GOSUB type_size_check
4388 $ tmp = "''i16type'"
4389 $ GOSUB type_size_check
4391 $ IF i16type .eqs. "short"
4392 $ THEN shortsize = tmp
4395 $ gosub type_size_check
4399 $ tmp = "''u16type'"
4400 $ GOSUB type_size_check
4403 $ tmp = "''i32type'"
4404 $ GOSUB type_size_check
4406 $ IF i32type .eqs. "int"
4407 $ THEN intsize = tmp
4410 $ gosub type_size_check
4414 $ tmp = "''u32type'"
4415 $ gosub type_size_check
4419 $ GOSUB type_size_check
4422 $ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
4423 $ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
4424 $ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
4426 $ echo4 "Checking whether your NVs can preserve your UVs..."
4429 $ WS "#include <stdlib.h>
4431 $ WS "#include <stdio.h>
4433 $ WS " ''uvtype' k = (''uvtype')~0, l;
4436 $ WS " d = (''nvtype')l;
4437 $ WS " l = (''uvtype')d;
4439 $ WS " printf(""preserve\n"");
4444 $ IF tmp .EQS. "preserve"
4446 $ d_nv_preserves_uv = "define"
4447 $ echo "Yes, they can."
4448 $ d_nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8)
4450 $ d_nv_preserves_uv = "undef"
4451 $ echo "No, they can't."
4452 $ echo4 "Checking how many bits of your UVs your NVs can preserve..."
4455 $ WS "#include <stdlib.h>
4457 $ WS "#include <stdio.h>
4459 $ WS " ''uvtype' u = 0;
4460 $ WS " int n = 8 * ''uvsize';
4462 $ WS " for (i = 0; i < n; i++) {
4463 $ WS " u = u << 1 | (''uvtype')1;
4464 $ WS " if ((''uvtype')(''nvtype')u != u)
4467 $ WS " printf(""%d\n"", i);
4471 $ d_nv_preserves_uv_bits = tmp
4475 $ ivdformat="""ld"""
4476 $ uvuformat="""lu"""
4477 $ uvoformat="""lo"""
4478 $ uvxformat="""lx"""
4484 $! Finally the composite ones. All config
4486 $ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
4490 $ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext'/NoList''ccflags'"
4492 $ IF use_vmsdebug_perl
4494 $ optimize="/Debug/NoOpt"
4501 $! Okay, we've got everything configured. Now go write out a config.sh.
4502 $ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
4503 $ echo4 "Creating ''basename_config_sh'..."
4504 $ open/write CONFIG 'config_sh
4505 $ WC := write CONFIG
4507 $! ##BEGIN WRITE NEW CONSTANTS HERE##
4511 $ WC "# This file was produced by Configure.COM on a ''osname' system."
4513 $ WC "# Package name : ''package'"
4514 $ WC "# Source directory : ''src'"
4515 $ WC "# Configuration time: " + cf_time
4516 $ WC "# Configuration by : " + cf_by
4517 $ WC "# Target system : " + myuname
4519 $ WC "CONFIG='true'"
4520 $ WC "Makefile_SH='" + Makefile_SH + "'"
4521 $ WC "Mcc='" + Mcc + "'"
4522 $! WC "PERL_SUBVERSION='" + subversion + "'" ! VMS specific to descrip_mms.template
4523 $ WC "PERL_VERSION='" + patchlevel + "'" ! VMS specific to descrip_mms.template
4524 $ WC "alignbytes='" + alignbytes + "'"
4525 $ WC "aphostname='" + "'"
4527 $ WC "archlib='" + archlib + "'"
4528 $ WC "archlibexp='" + archlibexp + "'"
4529 $ WC "archname='" + archname + "'"
4530 $ WC "baserev='" + baserev + "'"
4531 $ WC "bin='" + bin + "'"
4532 $ WC "binexp='" + binexp + "'"
4533 $ WC "builddir='" + builddir + "'"
4534 $ WC "byteorder='1234'"
4535 $ WC "castflags='0'"
4536 $ WC "cc='" + perl_cc + "'"
4537 $ WC "cccdlflags='" + cccdlflags + "'"
4538 $ WC "ccdlflags='" + ccdlflags + "'"
4539 $ WC "ccflags='" + ccflags + "'"
4540 $ WC "ccversion='" + ccversion + "'" ! VMS specific, oddly enough
4541 $ WC "cf_by='" + cf_by + "'"
4542 $ WC "cf_email='" + cf_email + "'"
4543 $ WC "cf_time='" + cf_time + "'"
4544 $ WC "config_args='" + config_args + "'"
4545 $ WC "config_sh='" + config_sh + "'"
4546 $ WC "cpp_stuff='" + cpp_stuff + "'"
4547 $ WC "cpplast='" + cpplast + "'"
4548 $ WC "cppminus='" + cppminus + "'"
4549 $ WC "cpprun='" + cpprun + "'"
4550 $ WC "cppstdin='" + cppstdin + "'"
4551 $ WC "crosscompile='undef'"
4552 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
4553 $ WC "d_PRId64='" + d_PRId64 + "'"
4554 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
4555 $ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
4556 $ WC "d_PRIo64='" + d_PRIo64 + "'"
4557 $ WC "d_PRIu64='" + d_PRIu64 + "'"
4558 $ WC "d_PRIx64='" + d_PRIx64 + "'"
4559 $ WC "d_access='" + d_access + "'"
4560 $ WC "d_accessx='undef'"
4561 $ WC "d_alarm='define'"
4562 $ WC "d_archlib='define'"
4563 $ WC "d_atolf='" + d_atolf + "'"
4564 $ WC "d_atoll='" + d_atoll + "'"
4565 $ WC "d_attribut='" + d_attribut + "'"
4566 $ WC "d_bcmp='" + d_bcmp + "'"
4567 $ WC "d_bcopy='" + d_bcopy + "'"
4568 $ WC "d_bincompat3='undef'"
4569 $ WC "d_bincompat5005='undef'"
4570 $ WC "d_bsdgetpgrp='undef'"
4571 $! WC "d_bsdpgrp='undef'"
4572 $ WC "d_bsdsetpgrp='undef'"
4573 $ WC "d_bzero='" + d_bzero + "'"
4574 $ WC "d_casti32='define'"
4575 $ WC "d_castneg='define'"
4576 $ WC "d_charvspr='undef'"
4577 $ WC "d_chown='define'"
4578 $ WC "d_chroot='undef'"
4579 $ WC "d_chsize='undef'"
4580 $ WC "d_cmsghdr_s='undef'"
4581 $ WC "d_const='define'"
4582 $ WC "d_crypt='define'"
4583 $ WC "d_csh='undef'"
4584 $ WC "d_cuserid='define'"
4585 $ WC "d_dbl_dig='define'"
4586 $ WC "d_difftime='define'"
4587 $ WC "d_dirnamlen='define'"
4588 $ WC "d_dlerror='undef'"
4589 $ WC "d_dlsymun='undef'"
4590 $ WC "d_dosuid='undef'"
4591 $ WC "d_drand48proto='" + d_drand48proto + "'"
4592 $ WC "d_dup2='define'"
4593 $ WC "d_eaccess='undef'"
4594 $ WC "d_endgrent='define'"
4595 $ WC "d_endhent='" + d_endhent + "'"
4596 $ WC "d_endnent='" + d_endnent + "'"
4597 $ WC "d_endpent='" + d_endpent + "'"
4598 $ WC "d_endpwent='define'"
4599 $ WC "d_endsent='" + d_endsent + "'"
4600 $ WC "d_eofnblk='undef'"
4601 $ WC "d_eunice='undef'"
4602 $ WC "d_fchmod='undef'"
4603 $ WC "d_fchown='undef'"
4604 $ WC "d_fcntl='" + d_fcntl + "'"
4605 $ WC "d_fd_set='" + d_fd_set + "'"
4606 $ WC "d_fgetpos='define'"
4607 $ WC "d_flexfnam='define'"
4608 $ WC "d_flock='undef'"
4609 $ WC "d_fork='undef'"
4610 $ WC "d_fpathconf='" + d_fpathconf + "'"
4611 $ WC "d_fpos64_t='" + d_fpos64_t + "'"
4612 $ WC "d_frexpl='" + d_frexpl + "'"
4613 $ WC "d_fs_data_s='undef'"
4614 $ WC "d_fseeko='undef'"
4615 $ WC "d_fsetpos='define'"
4616 $ WC "d_fstatfs='undef'"
4617 $ WC "d_fstatvfs='undef'"
4618 $ WC "d_ftello='undef'"
4619 $ WC "d_getcwd='undef'"
4620 $ WC "d_getespwnam='undef'"
4621 $ WC "d_getfsstat='undef'"
4622 $ WC "d_getgrent='define'"
4623 $ WC "d_getgrps='undef'"
4624 $ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
4625 $ WC "d_gethbyname='" + d_gethbyname + "'"
4626 $ WC "d_gethent='" + d_gethent + "'"
4627 $ WC "d_gethname='" + d_gethname + "'"
4628 $ WC "d_gethostprotos='" + d_gethostprotos + "'"
4629 $ WC "d_getlogin='define'"
4630 $ WC "d_getmnt='undef'"
4631 $ WC "d_getmntent='undef'"
4632 $ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
4633 $ WC "d_getnbyname='" + d_getnbyname + "'"
4634 $ WC "d_getnent='" + d_getnent + "'"
4635 $ WC "d_getnetprotos='" + d_getnetprotos + "'"
4636 $ WC "d_getpbyname='" + d_getpbyname + "'"
4637 $ WC "d_getpbynumber='" + d_getpbynumber + "'"
4638 $ WC "d_getpent='" + d_getpent + "'"
4639 $ WC "d_getpgid='undef'"
4640 $ WC "d_getpgrp2='undef'"
4641 $ WC "d_getpgrp='undef'"
4642 $ WC "d_getppid='undef'"
4643 $ WC "d_getprior='undef'"
4644 $ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
4645 $ WC "d_getprpwnam='undef'"
4646 $ WC "d_getpwent='define'"
4647 $ WC "d_getsbyname='" + d_getsbyname + "'"
4648 $ WC "d_getsbyport='" + d_getsbyport + "'"
4649 $ WC "d_getsent='" + d_getsent + "'"
4650 $ WC "d_getservprotos='" + d_getservprotos + "'"
4651 $ WC "d_getspnam='undef'"
4652 $ WC "d_gettimeod='" + d_gettimeod + "'"
4653 $ WC "d_gnulibc='undef'"
4654 $ WC "d_grpasswd='undef'"
4655 $ WC "d_hasmntopt='undef'"
4656 $ WC "d_htonl='" + d_htonl + "'"
4657 $ WC "d_iconv='" + d_iconv +"'"
4658 $ WC "d_index='" + d_index + "'"
4659 $ WC "d_inetaton='undef'"
4660 $ WC "d_int64_t='" + d_int64_t + "'"
4661 $ WC "d_isascii='define'"
4662 $ WC "d_isnan='define'"
4663 $ WC "d_isnanl='" + d_isnanl + "'"
4664 $ WC "d_killpg='undef'"
4665 $ WC "d_lchown='undef'"
4666 $ WC "d_ldbl_dig='define'"
4667 $ WC "d_link='undef'"
4668 $ WC "d_llseek='undef'"
4669 $ WC "d_locconv='" + d_locconv + "'"
4670 $ WC "d_lockf='undef'"
4671 $ WC "d_longdbl='" + d_longdbl + "'"
4672 $ WC "d_longlong='" + d_longlong + "'"
4673 $ WC "d_lseekproto='define'"
4674 $ WC "d_lstat='undef'"
4675 $ WC "d_madvise='undef'"
4676 $ WC "d_mblen='" + d_mblen + "'"
4677 $ WC "d_mbstowcs='" + d_mbstowcs + "'"
4678 $ WC "d_mbtowc='" + d_mbtowc + "'"
4679 $ WC "d_memchr='" + d_memchr + "'"
4680 $ WC "d_memcmp='define'"
4681 $ WC "d_memcpy='define'"
4682 $ WC "d_memmove='define'"
4683 $ WC "d_memset='define'"
4684 $ WC "d_mkdir='define'"
4685 $ WC "d_mkdtemp='" + d_mkdtemp + "'"
4686 $ WC "d_mkfifo='undef'"
4687 $ WC "d_mknod='undef'"
4688 $ WC "d_mkstemp='" + d_mkstemp + "'"
4689 $ WC "d_mkstemps='" + d_mkstemps + "'"
4690 $ WC "d_mktime='" + d_mktime + "'"
4691 $ WC "d_mmap='undef'"
4692 $ WC "d_modfl='" + d_modfl + "'"
4693 $ WC "d_mprotect='undef'"
4694 $ WC "d_msg='undef'"
4695 $ WC "d_msg_ctrunc='undef'"
4696 $ WC "d_msg_dontroute='undef'"
4697 $ WC "d_msg_oob='undef'"
4698 $ WC "d_msg_peek='undef'"
4699 $ WC "d_msg_proxy='undef'"
4700 $ WC "d_msghdr_s='undef'"
4701 $ WC "d_msync='undef'"
4702 $ WC "d_munmap='undef'"
4703 $ WC "d_mymalloc='" + d_mymalloc + "'"
4704 $ WC "d_nice='define'"
4705 $ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
4706 $ WC "d_nv_preserves_uv_bits='" + d_nv_preserves_uv_bits + "'"
4707 $ WC "d_off64_t='" + d_off64_t + "'"
4708 $ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
4709 $ WC "d_oldarchlib='define'"
4710 $ WC "d_oldpthreads='" + d_oldpthreads + "'"
4711 $ WC "d_open3='define'"
4712 $ WC "d_pathconf='" + d_pathconf + "'"
4713 $ WC "d_pause='define'"
4714 $ WC "d_perl_otherlibdirs='undef'"
4715 $ WC "d_phostname='undef'"
4716 $ WC "d_pipe='define'"
4717 $ WC "d_poll='undef'"
4718 $ WC "d_pthread_yield='" + d_pthread_yield + "'"
4719 $ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
4720 $ WC "d_pwage='undef'"
4721 $ WC "d_pwchange='undef'"
4722 $ WC "d_pwclass='undef'"
4723 $ WC "d_pwcomment='define'"
4724 $ WC "d_pwexpire='undef'"
4725 $ WC "d_pwgecos='define'"
4726 $ WC "d_pwpasswd='define'"
4727 $ WC "d_pwquota='undef'"
4728 $ WC "d_qgcvt='undef'"
4729 $ WC "d_quad='" + d_quad + "'"
4730 $ WC "d_readdir='define'"
4731 $ WC "d_readlink='undef'"
4732 $ WC "d_readv='undef'"
4733 $ WC "d_recvmsg='undef'"
4734 $ WC "d_rename='define'"
4735 $ WC "d_rewinddir='define'"
4736 $ WC "d_rmdir='define'"
4737 $ WC "d_safebcpy='undef'"
4738 $ WC "d_safemcpy='define'"
4739 $ WC "d_sanemcmp='define'"
4740 $ WC "d_sched_yield='" + d_sched_yield + "'"
4741 $ WC "d_scm_rights='undef'"
4742 $ WC "d_seekdir='define'"
4743 $ WC "d_select='" + d_select + "'"
4744 $ WC "d_sem='undef'"
4745 $ WC "d_semctl_semid_ds='undef'"
4746 $ WC "d_semctl_semun='undef'"
4747 $ WC "d_sendmsg='undef'"
4748 $ WC "d_setegid='undef'"
4749 $ WC "d_setenv='" + d_setenv + "'"
4750 $ WC "d_seteuid='undef'"
4751 $ WC "d_setgrent='undef'"
4752 $ WC "d_setgrps='undef'"
4753 $ WC "d_sethent='" + d_sethent + "'"
4754 $ WC "d_setlinebuf='undef'"
4755 $ WC "d_setlocale='" + d_setlocale + "'"
4756 $ WC "d_setnent='" + d_setnent + "'"
4757 $ WC "d_setpent='" + d_setpent + "'"
4758 $ WC "d_setpgid='undef'"
4759 $ WC "d_setpgrp2='undef'"
4760 $ WC "d_setpgrp='undef'"
4761 $ WC "d_setprior='undef'"
4762 $ WC "d_setproctitle='" + d_setproctitle + "'"
4763 $ WC "d_setpwent='define'"
4764 $ WC "d_setregid='undef'"
4765 $ WC "d_setresgid='undef'"
4766 $ WC "d_setresuid='undef'"
4767 $ WC "d_setreuid='undef'"
4768 $ WC "d_setrgid='undef'"
4769 $ WC "d_setruid='undef'"
4770 $ WC "d_setsent='" + d_setsent + "'"
4771 $ WC "d_setsid='undef'"
4772 $ WC "d_setvbuf='" + d_setvbuf + "'"
4773 $ WC "d_sfio='undef'"
4774 $ WC "d_shm='undef'"
4775 $ WC "d_shmatprototype='undef'"
4776 $ WC "d_sigaction='" + d_sigaction + "'"
4777 $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
4778 $ WC "d_socket='" + d_socket + "'"
4779 $ WC "d_socklen_t='" + d_socklen_t + "'"
4780 $ WC "d_sockpair='undef'"
4781 $ WC "d_sqrtl='define'"
4782 $ WC "d_statblks='undef'"
4783 $ WC "d_statfs_f_flags='undef'"
4784 $ WC "d_statfs_s='undef'"
4785 $ WC "d_statfsflags='undef'"
4786 $ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
4787 $ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
4788 $ WC "d_stdio_stream_array='undef'"
4789 $ WC "d_stdiobase='" + d_stdiobase + "'"
4790 $ WC "d_stdstdio='" + d_stdstdio + "'"
4791 $ WC "d_strchr='define'"
4792 $ WC "d_strcoll='" + d_strcoll + "'"
4793 $ WC "d_strctcpy='define'"
4794 $ WC "d_strerrm='strerror((e),vaxc$errno)'"
4795 $ WC "d_strerror='define'"
4796 $ WC "d_strtod='define'"
4797 $ WC "d_strtol='define'"
4798 $ WC "d_strtold='" + d_strtold + "'"
4799 $ WC "d_strtoll='" + d_strtoll + "'"
4800 $ WC "d_strtoul='define'"
4801 $ WC "d_strtoull='" + d_strtoull + "'"
4802 $ WC "d_strtouq='" + d_strtouq + "'"
4803 $ WC "d_strxfrm='" + d_strxfrm + "'"
4804 $ WC "d_suidsafe='undef'"
4805 $ WC "d_symlink='undef'"
4806 $ WC "d_syscall='undef'"
4807 $ WC "d_sysconf='" + d_sysconf + "'"
4808 $ WC "d_syserrlst='undef'"
4809 $ WC "d_system='define'"
4810 $ WC "d_tcgetpgrp='undef'"
4811 $ WC "d_tcsetpgrp='undef'"
4812 $ WC "d_telldir='define'"
4813 $ WC "d_telldirproto='define'"
4814 $ WC "d_times='define'"
4815 $ WC "d_truncate='" + d_truncate + "'"
4816 $ WC "d_tzname='undef'"
4817 $ WC "d_umask='define'"
4818 $ WC "d_uname='" + d_uname + "'"
4819 $ WC "d_union_semun='undef'"
4820 $ WC "d_unlink_all_versions='undef'"
4821 $ WC "d_ustat='undef'"
4822 $ WC "d_vendorarch='undef'"
4823 $ WC "d_vendorlib='undef'"
4824 $ WC "d_vfork='define'"
4825 $ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
4826 $ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
4827 $ WC "d_void_closedir='define'"
4828 $ WC "d_volatile='define'"
4829 $ WC "d_vprintf='define'"
4830 $ WC "d_wait4='" + d_wait4 + "'"
4831 $ WC "d_waitpid='define'"
4832 $ WC "d_wcstombs='" + d_wcstombs + "'"
4833 $ WC "d_wctomb='" + d_wctomb + "'"
4834 $ WC "d_writev='undef'"
4835 $ WC "db_hashtype=' '"
4836 $ WC "db_prefixtype=' '"
4837 $ WC "dbgprefix='" + dbgprefix + "'"
4838 $ WC "defvoidused='15'"
4839 $ WC "devtype='" + devtype + "'"
4840 $ WC "direntrytype='struct dirent'"
4841 $ WC "dlext='" + dlext + "'"
4842 $ WC "dlobj='" + dlobj + "'"
4843 $ WC "dlsrc='dl_vms.c'"
4844 $ WC "doublesize='" + doublesize + "'"
4845 $ WC "drand01='" + drand01 + "'"
4846 $ WC "dynamic_ext='" + extensions + "'"
4848 $ WC "ebcdic='undef'"
4849 $ WC "eunicefix=':'"
4850 $ WC "exe_ext='" + exe_ext + "'"
4851 $ WC "extensions='" + extensions + "'"
4852 $ WC "fflushNULL='define'"
4853 $ WC "fflushall='undef'"
4854 $ WC "fpostype='fpos_t'"
4855 $ WC "freetype='void'"
4856 $ WC "full_ar='" + "'"
4857 $ WC "full_csh='" + " '"
4858 $ WC "full_sed='_NLA0:'"
4859 $ WC "gccversion='" + gccversion + "'"
4860 $ WC "gidformat='lu'"
4863 $ WC "gidtype='" + gidtype + "'"
4864 $ WC "groupstype='Gid_t'"
4866 $ WC "hintfile='" + "'"
4867 $ WC "i16size='" + i16size + "'"
4868 $ WC "i16type='" + i16type + "'"
4869 $ WC "i32size='" + i32size + "'"
4870 $ WC "i32type='" + i32type + "'"
4871 $ WC "i64size='" + i64size + "'"
4872 $ WC "i64type='" + i64type + "'"
4873 $ WC "i8size='" + i8size + "'"
4874 $ WC "i8type='" + i8type + "'"
4875 $ WC "i_arpainet='undef'"
4876 $ WC "i_dbm='undef'"
4877 $ WC "i_dirent='undef'"
4878 $ WC "i_dlfcn='undef'"
4879 $ WC "i_fcntl='" + i_fcntl + "'"
4880 $ WC "i_float='define'"
4881 $ WC "i_grp='undef'"
4882 $ WC "i_iconv='" + i_iconv +"'"
4883 $ WC "i_ieeefp='undef'"
4884 $ WC "i_inttypes='" + i_inttypes + "'"
4885 $ WC "i_libutil='" + i_libutil + "'"
4886 $ WC "i_limits='define'"
4887 $ WC "i_locale='" + i_locale + "'"
4888 $ WC "i_machcthr='undef'"
4889 $ WC "i_machcthreads='undef'"
4890 $ WC "i_math='define'"
4891 $ WC "i_memory='undef'"
4892 $ WC "i_mntent='undef'"
4893 $ WC "i_ndbm='undef'"
4894 $ WC "i_netdb='" + i_netdb + "'"
4895 $ WC "i_neterrno='define'"
4896 $ WC "i_netinettcp='" + i_netinettcp + "'"
4897 $ WC "i_niin='" + i_niin + "'"
4898 $ WC "i_poll='" + i_poll + "'"
4899 $ WC "i_prot='undef'"
4900 $ WC "i_pthread='define'"
4901 $ WC "i_pwd='undef'"
4902 $ WC "i_rpcsvcdbm='undef'"
4903 $ WC "i_sfio='undef'"
4904 $ WC "i_sgtty='undef'"
4905 $ WC "i_shadow='" + i_shadow + "'"
4906 $ WC "i_socks='" + i_socks + "'"
4907 $ WC "i_stdarg='define'"
4908 $ WC "i_stddef='define'"
4909 $ WC "i_stdlib='define'"
4910 $ WC "i_string='define'"
4911 $ WC "i_sunmath='undef'"
4912 $ WC "i_sysaccess='" + i_sysaccess + "'"
4913 $ WC "i_sysdir='undef'"
4914 $ WC "i_sysfile='" + i_sysfile + "'"
4915 $ WC "i_sysioctl='undef'"
4916 $ WC "i_syslog='" + i_syslog + "'"
4917 $ WC "i_sysmman='undef'"
4918 $ WC "i_sysmode='" + i_sysmode + "'"
4919 $ WC "i_sysmount='undef'"
4920 $ WC "i_sysndir='undef'"
4921 $ WC "i_sysparam='undef'"
4922 $ WC "i_sysresrc='undef'"
4923 $ WC "i_syssecrt='" + i_syssecrt + "'"
4924 $ WC "i_sysselct='undef'"
4925 $ WC "i_sysstat='define'"
4926 $ WC "i_sysstatfs='undef'"
4927 $ WC "i_sysstatvfs='undef'"
4928 $ WC "i_systime='undef'"
4929 $ WC "i_systimek='undef'"
4930 $ WC "i_systimes='undef'"
4931 $ WC "i_systypes='define'"
4932 $ WC "i_sysuio='" + i_sysuio + "'"
4933 $ WC "i_sysun='undef'"
4934 $ WC "i_sysutsname='" + i_sysutsname + "'"
4935 $ WC "i_sysvfs='undef'"
4936 $ WC "i_syswait='undef'"
4937 $ WC "i_termio='undef'"
4938 $ WC "i_termios='undef'"
4939 $ WC "i_time='define'"
4940 $ WC "i_unistd='" + i_unistd + "'"
4941 $ WC "i_ustat='undef'"
4942 $ WC "i_utime='undef'"
4943 $ WC "i_values='undef'"
4944 $ WC "i_varargs='undef'"
4945 $ WC "i_vfork='undef'"
4946 $ WC "inc_version_list='0'"
4947 $ WC "inc_version_list_init='0'"
4948 $ WC "installarchlib='" + installarchlib + "'"
4949 $ WC "installbin='" + installbin + "'"
4950 $ WC "installman1dir='" + installman1dir + "'"
4951 $ WC "installman3dir='" + installman3dir + "'"
4952 $ WC "installprivlib='" + installprivlib + "'"
4953 $ WC "installscript='" + installscript + "'"
4954 $ WC "installsitearch='" + installsitearch + "'"
4955 $ WC "installsitelib='" + installsitelib + "'"
4956 $ WC "installusrbinperl='undef'"
4957 $ WC "intsize='" + intsize + "'"
4958 $ WC "ivdformat='" + ivdformat + "'"
4959 $ WC "ivsize='" + ivsize + "'"
4960 $ WC "ivtype='" + ivtype + "'"
4961 $ WC "known_extensions='" + known_extensions + "'"
4962 $ WC "ld='" + ld + "'"
4963 $ WC "lddlflags='/Share'"
4964 $ WC "ldflags='/NoTrace/NoMap'"
4965 $ WC "lib_ext='" + lib_ext + "'"
4966 $ WC "libc='" + libc + "'"
4967 $ WC "libpth='/sys$share /sys$library'"
4968 $ WC "libs='" + libs + "'"
4969 $ WC "longdblsize='" + longdblsize + "'"
4970 $ WC "longlongsize='" + longlongsize + "'"
4971 $ WC "longsize='" + longsize + "'"
4972 $ WC "lseeksize='4'"
4973 $ WC "lseektype='int'"
4975 $ WC "make='" + make + "'"
4976 $ WC "malloctype='void *'"
4977 $ WC "man1ext='rno'"
4978 $ WC "man3ext='rno'"
4979 $ WC "mmaptype='" + "'"
4980 $ WC "modetype='unsigned int'"
4981 $ WC "multiarch='undef'"
4982 $ WC "mydomain='" + mydomain + "'"
4983 $ WC "myhostname='" + myhostname + "'"
4984 $ WC "myuname='" + myuname + "'"
4985 $ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
4986 $ WC "netdb_host_type='" + netdb_host_type + "'"
4987 $ WC "netdb_name_type='" + netdb_name_type + "'"
4988 $ WC "netdb_net_type='" + netdb_net_type + "'"
4989 $ WC "nveformat='" + nveformat + "'"
4990 $ WC "nvfformat='" + nvfformat + "'"
4991 $ WC "nvgformat='" + nvgformat + "'"
4992 $ WC "nvsize='" + nvsize + "'"
4993 $ WC "nvtype='" + nvtype + "'"
4994 $ WC "o_nonblock=' '"
4995 $ WC "obj_ext='" + obj_ext + "'"
4996 $ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
4997 $ WC "oldarchlib='" + oldarchlib + "'"
4998 $ WC "oldarchlibexp='" + oldarchlibexp + "'"
4999 $ WC "optimize='" + optimize + "'"
5000 $ WC "osname='" + osname + "'"
5001 $ WC "osvers='" + osvers + "'"
5002 $ WC "otherlibdirs='" + "'"
5003 $ WC "package='" + package + "'"
5004 $ WC "pager='" + pager + "'"
5005 $ WC "patchlevel='" + patchlevel + "'"
5007 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
5008 $ WC "perladmin='" + perladmin + "'"
5009 $ WC "pgflquota='" + pgflquota + "'"
5010 $ WC "pidtype='" + pidtype + "'"
5011 $ WC "pm_apiversion='" + version + "'"
5012 $! WC "prefix='" + vms_prefix + "'"
5013 $ WC "prefix='" + prefix + "'"
5014 $ WC "privlib='" + privlib + "'"
5015 $ WC "privlibexp='" + privlibexp + "'"
5016 $ WC "prototype='define'"
5017 $ WC "ptrsize='" + ptrsize + "'"
5018 $ WC "quadkind='" + quadkind + "'"
5019 $ WC "quadtype='" + quadtype + "'"
5020 $ WC "randbits='31'"
5021 $ WC "randseedtype='" + randseedtype + "'"
5022 $ WC "ranlib='" + "'"
5023 $ WC "rd_nodata=' '"
5024 $ WC "revision='" + revision + "'"
5025 $! WC "sPRIEldbl='$sPRIEldbl'
5026 $! WC "sPRIFldbl='$sPRIFldbl'
5027 $! WC "sPRIGldbl='$sPRIGldbl'
5028 $! WC "sPRIX64='$sPRIX64'
5029 $ WC "sPRId64='" + sPRId64 + "'"
5030 $! WC "sPRIeldbl='" + sPRIeldbl + "'"
5031 $ WC "sPRIfldbl='" + sPRIfldbl + "'"
5032 $ WC "sPRIgldbl='" + sPRIgldbl + "'"
5033 $! WC "sPRIi64='" + sPRIi64 + "'"
5034 $ WC "sPRIo64='" + sPRIo64 + "'"
5035 $ WC "sPRIu64='" + sPRIu64 + "'"
5036 $ WC "sPRIx64='" + sPRIx64 + "'"
5037 $ WC "sched_yield='" + sched_yield + "'"
5038 $ WC "seedfunc='" + seedfunc + "'"
5039 $ WC "selectminbits='32'"
5040 $ WC "selecttype='" + selecttype + "'"
5042 $ WC "shmattype='" + "'"
5043 $ WC "shortsize='" + shortsize + "'"
5044 $ WC "shrplib='define'"
5045 $ WC "sig_name='" + sig_name + "'"
5046 $ tmp = "sig_name_init='" + sig_name_init + "'"
5049 $ WC "sig_num='" + sig_num + "'"
5050 $ WC "sig_num_init='" + sig_num_init + "'"
5051 $ WC "signal_t='" + signal_t + "'"
5052 $ WC "sitearch='" + sitearch + "'"
5053 $ WC "sitearchexp='" + sitearchexp + "'"
5054 $ WC "sitelib='" + sitelib + "'"
5055 $ WC "sitelib_stem='" + sitelib_stem + "'"
5056 $ WC "sitelibexp='" + sitelibexp + "'"
5057 $ WC "sizesize='" + sizesize + "'"
5058 $ WC "sizetype='size_t'"
5059 $ WC "so='" + so + "'"
5060 $ WC "socksizetype='" + socksizetype + "'"
5061 $ WC "spitshell='write sys$output '"
5062 $ WC "src='" + src + "'"
5063 $ WC "ssizetype='int'"
5064 $ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
5065 $ WC "static_ext='" + "'"
5066 $ WC "stdchar='" + stdchar + "'"
5067 $ WC "stdio_base='((*fp)->_base)'"
5068 $ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
5069 $ WC "stdio_cnt='((*fp)->_cnt)'"
5070 $ WC "stdio_ptr='((*fp)->_ptr)'"
5071 $ WC "stdio_stream_array='" + "'"
5072 $ WC "subversion='" + subversion + "'"
5073 $ WC "timetype='" + timetype + "'"
5074 $ WC "u16size='" + u16size + "'"
5075 $ WC "u16type='" + u16type + "'"
5076 $ WC "u32size='" + u32size + "'"
5077 $ WC "u32type='" + u32type + "'"
5078 $ WC "u64size='" + u64size + "'"
5079 $ WC "u64type='" + u64type + "'"
5080 $ WC "u8size='" + u8size + "'"
5081 $ WC "u8type='" + u8type + "'"
5082 $ WC "uidformat='lu'"
5085 $ WC "uidtype='" + uidtype + "'"
5086 $ WC "uquadtype='" + uquadtype + "'"
5087 $ WC "use5005threads='" + use5005threads + "'"
5088 $ WC "use64bitall='" + use64bitall + "'"
5089 $ WC "use64bitint='" + use64bitint + "'"
5090 $ WC "usedl='" + usedl + "'"
5091 $ WC "useithreads='" + useithreads + "'"
5092 $ WC "uselargefiles='" + uselargefiles + "'"
5093 $ WC "uselongdouble='" + uselongdouble + "'"
5094 $ WC "usemorebits='" + usemorebits + "'"
5095 $ WC "usemultiplicity='" + usemultiplicity + "'"
5096 $ WC "usemymalloc='" + usemymalloc + "'"
5097 $ WC "useperlio='undef'"
5098 $ WC "useposix='false'"
5099 $ WC "usesocks='undef'"
5100 $ WC "usethreads='" + usethreads + "'"
5101 $ WC "usevfork='true'"
5102 $ WC "uvoformat='" + uvoformat + "'"
5103 $ WC "uvsize='" + uvsize + "'"
5104 $ WC "uvtype='" + uvtype + "'"
5105 $ WC "uvuformat='" + uvuformat + "'"
5106 $ WC "uvxformat='" + uvxformat + "'"
5107 $ WC "vendorarchexp='" + "'"
5108 $ WC "vendorlib_stem='" + "'"
5109 $ WC "vendorlibexp='" + "'"
5110 $ WC "version='" + version + "'"
5111 $ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific
5112 $ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific
5113 $ WC "vms_ver='" + vms_ver + "'" ! VMS specific
5114 $ WC "voidflags='15'"
5115 $ WC "xs_apiversion='" + version + "'"
5116 $ WC "CONFIGDOTSH='true'"
5118 $! ##END WRITE NEW CONSTANTS HERE##
5122 $! Okay, we've gotten here. Build munchconfig.exe
5123 $ COPY/NOLOG [-.vms]munchconfig.c []
5124 $ COPY/NOLOG [-.vms]'Makefile_SH []
5125 $ 'Perl_CC' munchconfig.c
5128 $ OPEN/WRITE CONFIG []munchconfig.opt
5131 $ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library"
5133 $ WRITE CONFIG "Sys$Share:VAXCRTL/Share"
5135 $ 'ld' munchconfig.obj,munchconfig.opt/opt
5136 $ DELETE/NOLOG/NOCONFIRM munchconfig.opt;
5138 $ 'ld' munchconfig.obj
5140 $ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj;
5141 $ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
5144 $ CALL Cxx_demangler_cleanup
5147 $ IF alldone .EQS. ""
5151 If you'd like to make any changes to the config.sh file before I begin
5152 to configure things, answer yes to the following question.
5155 $ rp="Do you wish to edit ''basename_config_sh'? "
5157 $ IF ans .EQS. "" then ans = dflt
5161 $ echo4 "Be sure to type LOGOUT after you have edited the file,"
5162 $ echo4 "then this procedure will resume."
5164 $ default = F$ENVIRONMENT("DEFAULT")
5165 $ DIRECTORY 'config_sh
5168 $ SET DEFAULT 'default
5173 $ echo4 "Adding ''osname' specific preprocessor commands."
5175 $ ! we need an fdl file
5176 $ CREATE [-]CONFIG.FDL
5179 $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
5180 $ ! First spit out the header info with the local defines (to get
5181 $ ! around the 255 character command line limit)
5182 $ OPEN/APPEND CONFIG [-]config.local
5183 $ IF use_debugging_perl THEN WC "#define DEBUGGING"
5184 $ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
5185 $ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
5186 $ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
5187 $ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
5188 $ IF Using_Gnu_C THEN WC "#define GNUC_ATTRIBUTE_CHECK"
5189 $ IF (Has_Dec_C_Sockets)
5191 $ WC "#define VMS_DO_SOCKETS"
5192 $ WC "#define DECCRTL_SOCKETS"
5194 $ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS"
5196 $! This is VMS-specific for now
5197 $ WC "#''d_setenv' HAS_SETENV"
5198 $ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
5199 $ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
5200 $ IF use64bitint .OR. use64bitint .EQS. "define"
5202 $ WC "#define USE_64_BIT_INT"
5203 $ WC "#define USE_LONG_DOUBLE"
5205 $ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
5206 WC "#define USE_64_BIT_ALL"
5207 $ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
5208 $ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
5209 $ WC "#define HAS_ENVGETENV"
5210 $ WC "#define PERL_EXTERNAL_GLOB"
5213 $ echo4 "Doing variable substitutions on .SH files..."
5214 $ echo4 "Extracting config.h (with variable substitutions)"
5216 $! Now build the normal config.h
5217 $ DEFINE/USER_MODE sys$output [-]config.main
5218 $ mcr []munchconfig 'config_sh [-]config_h.sh
5219 $ ! Concatenate them together
5220 $ copy [-]config.local,[-]config.main [-]config.h
5222 $ DELETE/NOLOG [-]CONFIG.MAIN;*
5223 $ DELETE/NOLOG [-]CONFIG.LOCAL;*
5224 $ DELETE/NOLOG [-]CONFIG.FDL;*
5228 $ DECC_REPLACE = "DECC=decc=1"
5230 $ DECC_REPLACE = "DECC="
5234 $ GNUC_REPLACE = "GNUC=gnuc=1"
5236 $ GNUC_REPLACE = "GNUC="
5238 $ IF Has_Dec_C_Sockets
5240 $ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
5244 $ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
5246 $ SOCKET_REPLACE = "SOCKET="
5251 $ IF (vms_ver .LES. "6.2")
5253 $ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
5255 $ THREAD_REPLACE = "THREAD=THREADED=1"
5258 $ THREAD_REPLACE = "THREAD="
5262 $ MALLOC_REPLACE = "MALLOC=MALLOC=1"
5264 $ MALLOC_REPLACE = "MALLOC="
5266 $ echo4 "Extracting ''defmakefile' (with variable substitutions)"
5267 $ DEFINE/USER_MODE sys$output 'UUmakefile
5268 $ mcr []munchconfig 'config_sh 'Makefile_SH "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" -
5269 "''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'"
5270 $ echo4 "Extracting Build_Ext.Com (without variable substitutions)"
5271 $ Create Sys$Disk:[-]Build_Ext.Com
5272 $ Deck/Dollar="$EndOfTpl$"
5274 $! NOTE: This file is extracted as part of the VMS configuration process.
5275 $! Any changes made to it directly will be lost. If you need to make any
5276 $! changes, please edit the template in [.vms]SubConfigure.Com instead.
5277 $ def = F$Environment("Default")
5278 $ exts1 = F$Edit(p1,"Compress")
5279 $ p2 = F$Edit(p2,"Upcase,Compress,Trim")
5280 $ If F$Locate("MCR ",p2).eq.0 Then p2 = F$Extract(3,255,p2)
5281 $ miniperl = "$" + F$Search(F$Parse(p2,".Exe"))
5283 $ if f$type('p3') .nes. "" then makeutil = 'p3'
5284 $ targ = F$Edit(p4,"Lowercase")
5287 $ ext = F$Element(i," ",p1)
5288 $ If ext .eqs. " " Then Goto done
5289 $ Define/User_mode Perl_Env_Tables CLISYM_LOCAL
5291 ($extdir = $ENV{'ext'}) =~ s/::/./g;
5293 if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
5294 else { $extdir = ".ext.$extdir"; }
5295 ($ENV{'extdir'} = "[$extdir]");
5296 ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
5297 $ Set Default &extdir
5299 $ If F$Locate("clean",targ) .eqs. F$Length(targ)
5301 $ Write Sys$Output "Building ''ext' . . ."
5302 $ On Error Then Goto done
5303 $ If F$Search("Descrip.MMS") .eqs. ""
5307 $ If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. -
5308 F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1
5311 $ Write Sys$Output "''targ'ing ''ext' . . ."
5312 $ On Error Then Continue
5315 miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]"
5327 $! Clean up after ourselves
5328 $ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
5330 $! Warn of dangerous symbols or logical names
5332 $Bad_environment: SUBROUTINE
5334 $ IF p2 .eqs. "SYMBOL"
5336 $ IF f$type('p1) .nes. "" THEN Bad_env := SYMBOL
5338 $ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
5340 $ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
5342 $ IF f$search("config.msg") .nes. ""
5344 $ OPEN/APPEND CONFIG config.msg
5346 $ OPEN/WRITE CONFIG config.msg
5348 $ IF Bad_env .eqs. "SYMBOL"
5351 $ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
5352 $ WRITE CONFIG " delete before building ''package' via:"
5353 $ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
5354 $ IF f$locate("""",&p1) .ge. f$length(&p1)
5356 $ WRITE CONFIG " after building, testing, and installing ''package'
5357 $ WRITE CONFIG " restore the symbol with:"
5358 $ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
5361 $ IF Bad_env .eqs. "LOGICAL"
5364 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
5365 $ WRITE CONFIG " deassign before building ''package'"
5371 $ ENDSUBROUTINE ! Bad_environment
5373 $ echo4 "Checking for dangerous pre-existing global symbols and logical names."
5374 $ CALL Bad_environment "TMP"
5375 $ CALL Bad_environment "LIB"
5376 $ CALL Bad_environment "T"
5377 $ CALL Bad_environment "FOO"
5378 $ CALL Bad_environment "EXT"
5379 $ CALL Bad_environment "TEST" "SYMBOL"
5380 $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
5382 $! %Config-I-VMS, write perl_setup.com here
5384 $ IF (.NOT.perl_symbol)
5386 $ file_2_find = "[-]''packageup'.cld"
5388 $ echo4 "The perl.cld file is now being written..."
5389 $ OPEN/WRITE CONFIG 'file_2_find'
5391 $ IF ((sharedperl) .AND. (F$GETSYI("HW_MODEL") .GE. 1024)) THEN ext := .AXE
5392 $ IF (use_vmsdebug_perl)
5394 $ WRITE CONFIG "define verb dbgperl"
5395 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
5396 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5398 $ WRITE CONFIG "define verb perl"
5399 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
5400 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5402 $ WRITE CONFIG "define verb perl"
5403 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
5404 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5407 $ ENDIF ! (.NOT.perl_symbol)
5409 $ echo4 "The perl_setup.com file is now being written..."
5410 $ file_2_find = "[-]perl_setup.com"
5411 $ OPEN/WRITE CONFIG 'file_2_find'
5413 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
5414 $ IF cf_email.NES.perladmin
5416 $ WRITE CONFIG "$! perl configured by ''cf_email'"
5418 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
5421 $ prefix = prefix - "000000."
5422 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
5423 prefix = prefix - "]" + ".]"
5424 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'"
5425 $ WRITE CONFIG "$ ext = "".exe"""
5428 $ write config "$ if f$getsyi(""HW_MODEL"") .ge. 1024 then ext = "".AXE"""
5432 $ IF (use_vmsdebug_perl)
5434 $ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgPerl'ext'"
5435 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgPerl'ext'"
5436 $ WRITE CONFIG "$ define dbgPerlShr ''vms_prefix':[000000]dbgPerlShr'ext'"
5438 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
5439 $ WRITE CONFIG "$ define PerlShr ''vms_prefix':[000000]PerlShr'ext'"
5441 $ ELSE ! .NOT.perl_symbol
5442 $ IF (use_vmsdebug_perl)
5444 $ WRITE CONFIG "$ define dbgPerlShr ''vms_prefix':[000000]dbgPerlShr'ext'"
5446 $ WRITE CONFIG "$ define PerlShr ''vms_prefix':[000000]PerlShr'ext'"
5448 $ IF perl_verb .EQS. "PROCESS"
5450 $ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
5452 $ ENDIF ! perl_symbol
5453 $ WRITE CONFIG "$ define/nolog pod2text ''vms_prefix':[lib.pod]pod2text.com"
5454 $ WRITE CONFIG "$ define/nolog pod2html ''vms_prefix':[lib.pod]pod2html.com"
5455 $ WRITE CONFIG "$ define/nolog pod2man ''vms_prefix':[lib.pod]pod2man.com"
5459 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
5460 $ ELSE !leave in but commented out (in case setting was from perl :-)
5461 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
5464 $ WRITE CONFIG "$! Symbols for commonly used scripts:"
5468 $ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' ''vms_prefix':[lib.pod]Perldoc.com -t"""
5469 $ WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text"""
5470 $ WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html"""
5471 $ WRITE CONFIG "$ pod2latex == ""'"+"'Perl' ''vms_prefix':[lib.pod]pod2latex.com"""
5472 $ WRITE CONFIG "$!pod2man == ""'"+"'Perl' pod2man"""
5473 $ WRITE CONFIG "$!Perlbug == ""'"+"'Perl' ''vms_prefix':[lib]Perlbug.com"""
5474 $ WRITE CONFIG "$ c2ph == ""'"+"'Perl' ''vms_prefix':[utils]c2ph.com"""
5475 $ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
5477 $ WRITE CONFIG "$ dprofpp == ""'"+"'Perl' ''vms_prefix':[utils]dprofpp.com"""
5479 $ WRITE CONFIG "$ h2ph == ""'"+"'Perl' ''vms_prefix':[utils]h2ph.com"""
5480 $ WRITE CONFIG "$ h2xs == ""'"+"'Perl' ''vms_prefix':[utils]h2xs.com"""
5481 $ WRITE CONFIG "$!perlcc == ""'"+"'Perl' ''vms_prefix':[utils]perlcc.com"""
5482 $ WRITE CONFIG "$ splain == ""'"+"'Perl' ''vms_prefix':[utils]splain.com"""
5484 $ WRITE CONFIG "$ Perldoc == ""Perl ''vms_prefix':[lib.pod]Perldoc.com -t"""
5485 $ WRITE CONFIG "$ pod2text == ""Perl pod2text"""
5486 $ WRITE CONFIG "$ pod2html == ""Perl pod2html"""
5487 $ WRITE CONFIG "$ pod2latex == ""Perl ''vms_prefix':[lib.pod]pod2latex.com"""
5488 $ WRITE CONFIG "$!pod2man == ""Perl pod2man"""
5489 $ WRITE CONFIG "$!Perlbug == ""Perl ''vms_prefix':[lib]Perlbug.com"""
5490 $ WRITE CONFIG "$ c2ph == ""Perl ''vms_prefix':[utils]c2ph.com"""
5491 $ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
5493 $ WRITE CONFIG "$ dprofpp == ""Perl ''vms_prefix':[utils]dprofpp.com"""
5495 $ WRITE CONFIG "$ h2ph == ""Perl ''vms_prefix':[utils]h2ph.com"""
5496 $ WRITE CONFIG "$ h2xs == ""Perl ''vms_prefix':[utils]h2xs.com"""
5497 $ WRITE CONFIG "$!perlcc == ""Perl ''vms_prefix':[utils]perlcc.com"""
5498 $ WRITE CONFIG "$ splain == ""Perl ''vms_prefix':[utils]splain.com"""
5503 $ echo "The file can be found at:"
5504 $ echo4 " ''F$SEARCH(file_2_find)'"
5505 $ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
5506 $ echo "when you are satisfied with a successful compilation,"
5507 $ echo "testing, and installation of your perl."
5509 $ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
5511 $ file_2_find = "[-]''packageup'_install.com"
5512 $ OPEN/WRITE CONFIG 'file_2_find
5513 $ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
5514 $ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
5515 $ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
5518 $ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
5519 $ echo4 " @ ''F$SEARCH(file_2_find)'"
5520 $ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
5524 $!figure out where we "are" by parsing 'vms_default_directory_name'
5526 $ set_def_command = ""
5527 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
5528 $ tmp = vms_default_directory_name - dflt - "]"
5530 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
5532 $ tmp1 = F$ELEMENT(i,".",tmp)
5533 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
5535 $ THEN set_def_command = "set default [-"
5536 $ ELSE set_def_command = set_def_command + "-"
5540 $Beyond_set_def_loop:
5541 $ IF set_def_command.NES.""
5543 $ set_def_command = set_def_command - "-" + "]"
5545 $ echo4 "In order to build ''package' you must now issue the commands:"
5547 $ echo4 " ''set_def_command'"
5550 $ echo4 "In order to build ''package' you must now issue the command:"
5553 $ echo4 " ''make'''makefile'", macros
5556 $ IF ( F$SEARCH("config.msg").NES."" )
5558 $ echo "Hmm. I also noted the following information while running:"
5561 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
5562 $ DELETE/NOLOG/NOCONFIRM config.msg;
5568 $ DEASSIGN SYS$OUTPUT
5569 $! DEASSIGN SYS$ERROR
5571 $ IF F$GETJPI("","FILCNT").NE.vms_filcnt THEN CLOSE CONFIG
5572 $ IF F$GETJPI("","FILCNT").NE.vms_filcnt
5573 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
5575 $ dflt = F$ENVIRONMENT("DEFAULT")
5576 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
5578 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
5580 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
5581 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
5583 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
5586 $!: End of Configure