1 $! OpenVMS configuration procedure for Perl -- do not attempt to run under DOS
2 $ sav_ver = 'F$VERIFY(0)'
3 $ on control_y then goto clean_up
6 $! For example, if you unpacked perl into: [USER.PERL-5n...] then you will
7 $! want to cd into the tree and execute Configure:
9 $! $ SET DEFAULT [USER.PERL5_xxx]
14 $! $ SET DEFAULT [USER.PERL5_xxx]
15 $! $ @Configure "-des"
17 $! That's it. If you get into a bind trying to build perl on VMS then
18 $! definitely read through the README.VMS file.
19 $! Beyond that send email to vmsperl@perl.org
21 $! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 $! send suggestions to:
24 $! Dan Sugalski <dan@sidhe.org>
27 $! Adapted and converted from Larry Wall & Andy Dougherty's
28 $! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer
29 $! (a Bourne sh[ell] script for configuring the installation of perl
30 $! on non-VMS systems) in the perl5.002|3 epoch (spring/summer 1996)
31 $! with much valuable help from Charles Bailey &
32 $! the whole VMSPerl crew.
33 $! Extended and messed about with by Dan Sugalski
35 $! VMS-isms we will need:
36 $ echo = "write sys$output "
38 $ delete := delete ! local symbol overrides globals with qualifiers
46 $ be_case_sensitive = "n"
47 $ use_vmsdebug_perl = "n"
50 $ C_Compiler_Replace = "CC="
51 $ Thread_Live_Dangerously = "MT="
52 $ use_two_pot_malloc = "N"
53 $ use_pack_malloc = "N"
54 $ use_debugmalloc = "N"
57 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
58 $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx]
59 $! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx]
61 $! Sebastian Bazley's request: close the CONFIG handle with /NOLOG
62 $! qualifier "just in case" (configure.com is re @ed in a bad state).
63 $! This construct was tested to be not a problem as far back as
64 $! VMS V5.5-2, hopefully earlier versions are OK as well.
68 $! Now keep track of open files
70 $ vms_filcnt = F$GETJPI ("","FILCNT")
72 $!: compute my invocation name
73 $ me = F$ENVIRONMENT("PROCEDURE")
75 $! Many null statements (begin with colon ':') in the Bourne shell version of
76 $! this script serve as comments/placeholders. I have retained some of the ones
77 $! that will help you compare this .COM file to the sh version - as well as
78 $! leave placeholders for future improvements to this .COM file.
79 $! sfn = VMS "skipped for now"
81 $!: Proper PATH separator !sfn
82 $!: Proper PATH setting !sfn
83 $!: Sanity checks !sfn "Say '@''$me''"
84 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
85 $!: Configure runs within the UU subdirectory !->after find MANIFEST
86 $! <big long list of default values (mostly null)>
87 $!: We must find out about Eunice early !(?)
88 $!: list of known cpp symbols, sorted alphabetically !sfn
90 $!: default library list !sfn
91 $! <no hints files in use (yet?)>
92 $!: Extra object files, if any, needed on this platform. !sfn
93 $!: Possible local include directories to search. !sfn
94 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
95 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
96 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
97 $!: no include file wanted by default !sfn
99 $!: Possible local library directories to search. !sfn
100 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
101 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
102 $!: general looking path for locating libraries !sfn
103 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
104 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
105 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
106 $!: Private path used by Configure to find libraries. Its value !sfn
107 $!: is prepended to libpth. This variable takes care of special !sfn
108 $!: machines, like the mips. Usually, it should be empty. !sfn
110 $!: full support for void wanted by default !sfn
111 $!defvoidused=15 !sfn
112 $!: List of libraries we want. !sfn
113 $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
114 $!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
115 $!libswanted="$libswanted ucb bsd BSD PW x" !sfn
116 $!: We probably want to search /usr/shlib before most other libraries. !sfn
117 $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
118 $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
119 $!glibpth="/usr/shlib $glibpth" !sfn
120 $!: Do not use vfork unless overridden by a hint file. !sfn
121 $!usevfork=false !sfn
122 $!: script used to extract .SH files with variable substitutions !sfn
123 $!: produce awk script to parse command line options !sfn
124 $!sfn (assume no sed awk) see below
125 $!: process the command line options
127 $!: set up default values
131 $ IF F$TYPE(config_sh) .EQS. "" THEN config_sh=""
142 $ use_5005_threads = "N"
148 $ THEN !one or more switches was thrown
155 $ config_args = config_args + F$FAO(" !AS",P'i')
158 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
162 $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
163 $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
164 $Remove_quotation_mark:
166 $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
167 $ gotopt = "f" !"alse"
168 $ gotshortopt = "f" !"alse"
169 $ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
172 $ gotopt = "t" !"rue"
174 $ gotshortopt = "t" !"rue"
176 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
183 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f"
187 $ IF (F$SEARCH(config_sh).NES."")
189 $ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
190 $ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
193 $ CONTINUE !at this point check UIC && if test allows...
196 $ echo "''me': cannot read config file ''config_sh'."
200 $ echo "''me': cannot read config file ''config_sh'."
205 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h"
212 $ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m"
219 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r"
226 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s"
233 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E"
238 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K"
245 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O"
252 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S"
254 $ extractsh = "true" !VMS? Yes with munchconfig
259 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D"
262 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
264 $ tmp = P'i' + "=""define"""
268 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
270 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
271 $ echo "''me': use ""-Usymbol=val"" not ""-Dsymbol=""."
272 $ echo "''me': ignoring -D",P'i'
274 $ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')
275 $ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """"
282 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U"
285 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
287 $ tmp = P'i' + "="""""
291 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
293 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
294 $ echo "''me': use ""-Dsymbol=val"" not ""-Usymbol=val""."
295 $ echo "''me': ignoring -U",P'i'
297 $ tmp = P'i' + "=""undef"""
304 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
306 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
307 $ echo "''me' generated by an unknown version of EDT."
313 $ echo "''me': unknown option ",P'i'
316 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
318 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
320 $ ENDIF ! (P1 .NES. "")
321 $ config_args = F$EDIT(config_args,"TRIM")
325 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
326 $ echo "Usage: @''me' [-dehmr""EKOSV""] [-fconfig.sh] [""-Dsymbol""] [""-Dsymbol=value""]"
327 $ echo " [-Usymbol] [-Usymbol=]"
330 "-d" : use defaults for all answers.
331 "-e" : go on without questioning past the production of config.sh. *
332 "-f" : specify an alternate default configuration file.
333 "-h" : print this help message and exit (with an error status).
334 "-m" : skip the MANIFEST check to see that all files are present
335 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
336 "-s" : silent mode, only echoes questions and essential information.
337 -"D" : define symbol to have some value: *
338 -"Dsymbol" symbol gets the value 'define'
339 -"Dsymbol=value" symbol gets the value 'value'
340 -E : stop at the end of questions, after having produced config.sh. *
341 -K : do not use unless you know what you are doing.
342 -O : let -D and -U override definitions from loaded configuration file. *
343 -S : perform variable substitutions on all .SH files (can mix with -f) *
344 -"U" : undefine symbol: *
345 -"Usymbol" symbol gets the value 'undef'
346 -"Usymbol=" symbol gets completely empty
347 -V : print version number and exit (with a zero status).
349 $ echo "%Config-I-VMS, lower case switches must be enclosed"
350 $ echo "-Config-I-VMS, in double quotation marks, e.g.:"
351 $ echo "-Config-I-VMS, @Configure ""-des"""
352 $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
353 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
355 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
361 $ IF F$Mode() .eqs. "BATCH"
363 $ STDOUT = F$PARSE(F$GETQUI("DISPLAY_ENTRY", "JOB_NAME"), -
364 F$GETQUI("DISPLAY_ENTRY", "LOG_SPECIFICATION"), ".LOG")
365 $ WRITE SYS$OUTPUT "Warning: Executing in batch mode. To avoid file locking conflicts,"
366 $ WRITE SYS$OUTPUT "output intended for SYS$OUTPUT will be sent to a new version"
367 $ WRITE SYS$OUTPUT STDOUT
369 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
371 $ DEFINE SYS$OUTPUT "_NLA0:"
372 $ echo4 = "write STDOUT "
373 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
374 $ open/write/share=read STDOUT 'STDOUT'
382 $ echo4 = "write SYS$OUTPUT "
386 $!: run the defines and the undefines, if any, but leave the file out there...
387 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
392 $ packageup = F$EDIT((package - "5"),"UPCASE")
394 $!: Eunice requires " " instead of "", can you believe it
397 $ echo "Beginning of configuration questions for ''package'."
400 $!: Some greps do not return status, grrr.
401 $ contains = "SEARCH"
403 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
404 $! echo "Checking ''echo' to see how to suppress newlines..."
405 $! echo "giving up..."
406 $! echo "The star should be here-->*"
408 $!: Now test for existence of everything in MANIFEST
410 $ echo4 "First let's make sure your kit is complete. Checking..."
413 $! Here I assume we are in the [foo.PERLxxx...] tree
414 $! because the search routine simply does set def [-] if necessary.
415 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
417 $ manifestfound = F$SEARCH(file_2_find)
418 $ IF (manifestfound .EQS. "")
420 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
423 $ GOTO Research_manifest
426 $ echo "There is no MANIFEST file. I hope your kit is complete !"
428 $ GOTO Beyond_manifest
431 $! MANIFEST. has been found and we have set def'ed there.
432 $! Time to bail out before it's too late, i.e. too deep.
433 $! Depth check is unnecessary on Alpha VMS V7.2++ (even for ODS-2).
434 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
435 $ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
436 $! Depth check also unnecessary on ODS 5 (or later) file systems.
437 $ tmp = F$INTEGER(F$GETDVI(F$ENVIRONMENT("DEFAULT"),"ACPTYPE") - "F11V")
438 $ IF (tmp .GE. 5) THEN GOTO Beyond_depth_check
439 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("DEFAULT")).nes.".")
443 %Config-E-VMS, ERROR:
444 Sorry! It apears as though your perl build sub-directory is already too
445 deep into the VMS file system. Please try moving stuff into a shallower
446 directory (or altering the "max_allowed_dir_depth" parameter).
448 $ echo4 "ABORTING..."
449 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
451 $ EXIT !2 !$STATUS = "%X00000002" (error)
455 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
457 $ IF (manifestfound .NES. "")
459 $ IF ( F$SEARCH("UU.DIR").EQS."" )
461 $ CREATE/DIRECTORY [.UU]
463 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;*
465 $!: Configure runs within the UU subdirectory
468 $! a little redundancy never hurt anybody?
469 $ file_2_find = "[-]" + file_2_find
470 $ manifestfound = F$SEARCH(file_2_find)
472 $ OPEN/WRITE MISSING MISSING.
473 $!change to "FALSE" if you wish to skip the manifest search
474 $!(which after all is rather slow in DCL :-)
477 $ echo "Skipping MANIFEST check as requested"
480 $ OPEN/READ CONFIG 'manifestfound'
482 $ READ/END_OF_FILE = Done_manifest CONFIG line
483 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
484 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
485 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
486 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
487 $ line = F$EDIT(line,"TRIM, COMPRESS")
488 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
489 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
491 $Re_strip_line_manifest:
492 $ loca = F$LOCATE("/",file_2_find)
493 $ ante = F$EXTRACT(0,loca,file_2_find)
494 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
495 $ test_this = ante + "." + (post - "/")
496 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
498 $ file_2_find = ante + "." + (post - "/")
499 $ GOTO Re_strip_line_manifest
501 $ file_2_find = ante + "]" + (post - "/")
503 $ file_2_find = "[-."+file_2_find
505 $ file_2_find = "[-]" + file_2_find
508 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
509 $ file_2_find = file_2_find - dirname
512 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
513 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
515 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
516 $ ELSE basename = basename + dot_ele + "_"
521 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
522 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
523 basename = f$extract(0,f$length(basename)-1,basename)
524 $ file_2_find = dirname + basename
526 $ found = F$SEARCH(file_2_find)
527 $ IF (found .EQS. "" .AND. dots .GT. 2)
529 $! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
530 $! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
531 $! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
532 $ basename[f$locate(".",basename),1] := _
533 $ dot_ele = F$ELEMENT(dots - 1,"_",basename)
535 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
537 $ found = F$SEARCH(dirname + basename)
538 $ file_2_find = file_2_find + "," + basename
540 $ IF (found .EQS. "")
542 $ WRITE MISSING file_2_find
543 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
545 $ miss_list = miss_list + "," + file_2_find
548 $ GOTO Read_loop_manifest
553 $ ENDIF ! (manifestfound .NES. "")
555 $ IF (miss_list .NES. "")
557 $ echo "Some of the files not found include:"
560 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
566 THIS PACKAGE SEEMS TO BE INCOMPLETE.
568 You have the option of continuing the configuration process, despite the
569 distinct possibility that your kit is damaged, by typing 'y'es. If you
570 do, don't blame me if something goes wrong. I advise you to type 'n'o
571 and contact the author (dan@sidhe.org)
574 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
577 $ echo4 "Continuing..."
579 $ echo4 "ABORTING..."
583 $ echo4 "Looks good..."
584 $ DELETE/NOLOG MISSING.;
585 $ ENDIF ! (miss_list .NES. "")
586 $ ENDIF ! (manifestfound .EQS. "") ELSE
588 $! after finding MANIFEST (see above)
589 $!: Configure runs within the UU subdirectory
591 $!: compute the number of columns on the terminal for proper question formatting
592 $ IF F$MODE() .EQS. "BATCH"
593 $! else it winds up being 512 in batch
595 $ ELSE COLUMNS = F$GETDVI("SYS$OUTPUT","DEVBUFSIZ")
597 $! "-des" sets SYS$OUTPUT to NL: with a DEVBUFSIZ too large (512 again)
598 $ IF COLUMNS .GT. 210 THEN COLUMNS = 80
599 $! not sure if this would actually be needed - it hopefully will not hurt
600 $ IF COLUMNS .LT. 40 THEN COLUMNS = 40
602 $!: set up the echo used in my read !sfn
603 $!: now set up to do reads with possible shell escape and default assignment !sfn
606 $! The sub_rp splitting is intended to handle long symbols such as the dflt for
611 $ len_rp = F$LENGTH(rp)
612 $ If (.NOT. silent) Then echo ""
617 $ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
618 $ i_rp = i_rp + COLUMNS
619 $ if i_rp .LT. len_rp THEN echo4 "''sub_rp'"
620 $ IF i_rp .LT. len_rp THEN GOTO rp_loop
628 $ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
630 $ IF (ans .EQS. "&-d")
632 $ echo4 "(OK, I will run with -d after this question.)"
634 $ deferred_fastread =1
637 $ IF (ans .EQS. "&-s")
639 $ echo4 "(OK, I will run with -s after this question.)"
641 $ deferred_silent = 1
644 $ if (bool_dflt .nes. "")
646 $ if (ans .eqs. "") then ans = bool_dflt
647 $ ans = f$extract(0,1,f$edit(ans,"collapse,upcase"))
648 $ if (ans .eqs. "Y" .or. ans .eqs. "1" .or. ans .eqs. "T")
652 $ if (ans .eqs. "N" .or. ans .eqs. "0" .or. ans .eqs. "F")
656 $ echo4 "Input not understood please answer 'Yes' or 'No'"
662 $ ans = f$edit(ans,"trim,compress")
663 $ if (ans .eqs. "") then ans = dflt
664 $ if (f$edit(ans,"upcase") .eqs. "NONE") then ans = ""
666 $ if f$type(deferred_silent) .nes. ""
670 $ delete/symbol deferred_silent
672 $ if f$type(deferred_fastread) .nes. ""
675 $ delete/symbol deferred_fastread
681 $!: create .config dir to save info across Configure sessions
682 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
684 $ CREATE/DIRECTORY [-.CONFIG]
685 $ OPEN/WRITE CONFIG [-.CONFIG]README.
687 "This directory created by Configure to save information that should"
689 "persist across sessions."
692 "You may safely delete it if you wish."
696 $ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n
697 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
698 $ IF (patchlevel_h.NES."")
700 $ SEARCH 'patchlevel_h' "define","PERL_VERSION","epoch"/match=and/out=[]ver.out
701 $ IF .NOT. usedevel .AND. usedevel .NES. "define"
703 $ OPEN/READ CONFIG []ver.out
706 $ tmp = F$EDIT(line,"TRIM,COMPRESS")
707 $ xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp))
708 $ line = xpatchlevel / 2
709 $ tmp = xpatchlevel - ( line * 2 )
712 $ echo4 "patchlevel is " + F$STRING(xpatchlevel)
715 *** WHOA THERE!!! ***
717 This is an UNSTABLE DEVELOPMENT release.
718 (The patchlevel, is odd--as opposed to even,
719 and that signifies a development release. If you want a
720 maintenance release, you want an even-numbered release.)
722 Do ***NOT*** install this into production use.
723 Data corruption and crashes are possible.
725 It is most seriously suggested that you do not continue any further
726 unless you want to help in developing and debugging Perl.
730 $ rp="Do you really want to continue? [''bool_dflt'] "
731 $ fastread_save = fastread
734 $ fastread = fastread_save
735 $ delete/symbol fastread_save
738 $ echo4 "Okay, continuing."
741 $ DELETE/NOLOG/NOCONFIRM []ver.out;
748 $ DELETE/NOLOG/NOCONFIRM []ver.out;
750 $!: general instructions
753 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
754 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
756 $ messages = F$ENVIRONMENT("MESSAGE")
757 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
758 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
759 $ IF .NOT.($status.EQ.%X08D78053)
763 $ rp = "Would you like to see the instructions? [''bool_dflt'] "
765 $ if .NOT.ans THEN needman=""
767 $ SET MESSAGE 'messages'
769 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
776 This installation shell script will examine your system and ask you questions
777 to determine how the perl5 package should be installed. If you get
778 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
779 process, edit something, then restart this process as you just did.
780 Many of the questions will have default answers in square
781 brackets; typing carriage return will give you the default.
784 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
788 In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
789 the questions and use the computed defaults (or the previous answers provided
790 there was already a config.sh file). Type '@Configure "-h"' for a list of
794 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
798 Much effort has been expended to ensure that this shell script will
799 run on any VMS system. If despite that it blows up on yours, your
800 best bet is to edit Configure.com and @ it again. Whatever problems
801 you have with Configure.com, let me (dan@sidhe.org) know how I blew
805 $!This installation script affects things in two ways:
807 $!1) it may do direct variable substitutions on some of the files included
809 $!2) it builds a config.h file for inclusion in C programs. You may edit
810 $! any of these files as the need arises after running this script.
812 $!If you make a mistake on a question, there is no easy way to back up to it
815 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
816 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
818 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
822 $ ENDIF !(needman .EQS. "true")
824 $!: see if sh knows # comments !sfn
826 $!: figure out how to guarantee sh startup !sfn
827 $!: find out where common programs are !sfn
828 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
829 $!trylist="byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
830 $! echo "I don't know where '$file' is, and my life depends on it."
831 $! echo "Go find a public domain implementation or fix your PATH setting!"
833 $! echo "Don't worry if any of the following aren't found..."
834 $!: determine whether symbolic links are supported !sfn
835 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
836 $!: set up the translation script tr, must be called with ./tr of course !sfn
838 $!: Try to determine whether config.sh was made on this system
839 $!: Get old answers from old config file if Configure was run on the
840 $!: same system, otherwise use the hints.
841 $ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/"
845 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
847 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
849 $ configshfound = F$SEARCH(config_sh)
850 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
852 $ IF (i.LT.max) THEN GOTO Config_sh_look
853 $! genconfig.pl has "osname='VMS'"
854 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
855 $ IF (configshfound.EQS."")
857 $ config_sh = "[-]config.sh" ! the fallback default
858 $ GOTO Beyond_config_sh
861 $ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
863 $ IF F$TYPE(config_dflt) .NES. "" THEN bool_dflt = config_dflt
864 $ rp = "Shall I use ''config_sh' for default answers? [''bool_dflt'] "
869 $ echo "Fetching default answers from ''config_sh'..."
871 $! we do our own parsing of the shell-script stuff
872 $! ...and only accept symbols if they're in the | delimited list below
874 $ config_symbols0 ="|archlib|archlibexp|bin|binexp|builddir|cf_email|config_sh|installarchlib|installbin|installman1dir|installman3dir|"
875 $ config_symbols1 ="|installprivlib|installscript|installsitearch|installsitelib|most|oldarchlib|oldarchlibexp|osname|pager|perl_symbol|perl_verb|"
876 $ config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitelib|sitelib_stem|sitelibexp|try_cxx|use64bitall|use64bitint|"
877 $ config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|usemultiplicity|usemymalloc|usedebugging_perl|useperlio|usesecurelog|"
878 $ config_symbols4 ="|usethreads|usevmsdebug|"
880 $ open/read CONFIG 'config_sh'
882 $ read/end=erd_conf_loop CONFIG line
883 $ line = f$edit(line,"trim")
884 $ if line .eqs. "" .or. f$extract(0,1,line) .eqs. "#" then goto rd_conf_loop
885 $ sym = f$element(0,"=",line)
886 $ if sym .eqs. "=" then goto rd_conf_loop
890 $ syms = config_symbols'k'
891 $ j = f$locate(dsym, syms)
892 $ if j .lt. f$length(syms) then goto erd_ck_loop
894 $ if k .lt. 5 then goto rd_ck_loop
897 $ val = f$element(1,"=",line)
898 $ val = f$extract(1,f$length(val)-2,val)
899 $ write sys$output "''sym' = ""''val'"""
904 $ delete/symbol config_symbols0
905 $ delete/symbol config_symbols1
906 $ delete/symbol config_symbols2
907 $ delete/symbol config_symbols3
908 $ delete/symbol config_symbols4
912 $ if f$type(usedebugging_perl) .nes. ""
914 $ useperldebug = usedebugging_perl
915 $ delete/symbol usedebugging_perl
919 $ if f$type(config_dflt) .nes. "" then DELETE/SYMBOL config_dflt
921 $!we actually do not have "hints/" for VMS
925 $!First time through, eh? I have some defaults handy for the following systems:
928 $! echo " ","VMS_VAX"
929 $! echo " ","VMS_AXP"
930 $! : Now look for a hint file osname_osvers, unless one has been
931 $! : specified already.
934 $!You may give one or more space-separated answers, or "none" if appropriate.
935 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
937 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
941 $!: Restore computed paths !sfn
943 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
945 $ IF (osname .NES. "VMS")
947 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
951 %Config-E-VMS, ERROR:
953 Err, you do not appear to be running VMS!
954 This procedure is intended to Configure the building of Perl for VMS.
961 $ echo4 "Continuing..."
963 $ echo4 "ABORTING..."
964 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
966 $ EXIT 2 !$STATUS = "%X00000002" (error)
968 $ ENDIF !(osname .NES./.EQS. "VMS")
970 $!: who configured the system
971 $ cf_by = F$EDIT(user,"LOWERCASE")
972 $ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
974 $! Peter Prymmer has seen:
975 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
976 $! "SYS$TIME_ZONE" = "EDT"
978 $! Charles Lane recommended:
979 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
980 $! "NEWS_TIMEZONE" = "-0500"
981 $! "ST_TIMEZONE" = "EDT"
982 $! "JAN_TIME_ZONE" = "EST "
983 $! "MULTINET_TIMEZONE" = "EST"
984 $! "DAYLIGHT_SAVINGS" = "1"
986 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
988 $! "Multinet_Timezone"
989 $! "TCPware_Timezone"
992 $! This snippet o' DCL returns a string in default Unix `date` format,
993 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
995 $ MIN_TZO = -840 !units are minutes here
998 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
999 $ monn = F$CVTIME(,,"MONTH")
1000 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
1001 $ hour = F$CVTIME(,,"HOUR")
1002 $ min = F$CVTIME(,,"MINUTE")
1003 $ sec = F$CVTIME(,,"SECOND")
1004 $ year = F$CVTIME(,,"YEAR")
1006 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
1010 $ mon = F$ELEMENT(i,"/",months)
1011 $ IF i.LT.monn THEN GOTO Mon_loop
1014 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
1017 $ tzhour = F$INTEGER(systz)/3600
1018 $ tzmins = F$INTEGER(systz)/60
1019 $ tzminrem = tzmins - tzhour*60
1020 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
1022 $ THEN signothetime = "+"
1023 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
1024 $ THEN direction = "on GMT/"
1025 $ ELSE direction = "east of "
1027 $ ELSE signothetime = "-"
1028 $ tzhour = -1*tzhour !keeps !UL happy
1029 $ direction = "west of "
1032 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
1035 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
1037 $ tzspan = "''tzhour' hours"
1040 $ echo "Your system is ''tzspan' ''direction'UTC in England."
1041 $ rp = "(''systz') Is this UTC Time Zone Offset correct? [''bool_dflt'] "
1047 $ GOTO Beyond_TimeZone
1051 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
1056 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
1057 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
1058 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
1060 $ rp = "Enter the Time Zone offset: [''dflt'] "
1062 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
1063 $ IF ans.EQS."" THEN ans = dflt
1064 $ tzhour = F$ELEMENT(0,":","''ans'") !first
1065 $ IF tzhour.EQS."" THEN tzhour = 0
1066 $ tzhour = F$INTEGER(tzhour)
1067 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
1068 $ IF tzminrem.NES.""
1070 $ tzminrem = F$INTEGER(tzminrem)
1071 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
1075 $ tzmins = tzhour*60 + tzminrem
1076 $ tzd = F$STRING(tzmins*60)
1079 $ signothetime = "+"
1081 $ tzhour = -1*tzhour !keeps !UL happy
1082 $ signothetime = "-"
1084 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
1087 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
1092 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
1093 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
1095 $!: determine the architecture name
1096 $! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
1097 $! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME")
1098 $! but does have F$GETSYI("HW_MODEL").
1099 $! Please try to use either archname .EQS. "VMS_VAX" or archname .EQS.
1100 $! "VMS_AXP" from here on to allow cross-platform configuration (e.g.
1101 $! configure a VAX build on an Alpha).
1103 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
1105 $ archname = "VMS_VAX"
1106 $ otherarch = "an Alpha"
1108 $ arch_type = "ARCH-TYPE=__VAX__"
1110 $ archname = "VMS_AXP"
1111 $ otherarch = "a VAX"
1113 $ arch_type = "ARCH-TYPE=__AXP__"
1116 $ rp = "What is your architecture name? [''archname'] "
1120 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
1121 $ IF (ans.NES.archname) !.AND.knowitall
1123 $ echo4 "I'll go with ''archname' anyway..."
1127 $ vms_prefix = "perl_root"
1128 $ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
1129 $ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''bool_dflt'] "
1136 $ IF (archname.EQS."VMS_AXP")
1138 $ macros = macros + """AXE=1"","
1142 $!: is AFS running? !sfn
1143 $!: decide how portable to be. Allow command line overrides. !sfn
1144 $!: set up shell script to do ~ expansion !sfn
1145 $!: expand filename !sfn
1146 $!: now set up to get a file name !sfn
1148 $ IF F$TYPE(prefix) .EQS. ""
1150 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
1151 $ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - "000000." - ".000000" - ".;"
1152 $ prefixbase = prefix - "]"
1153 $! Add _ROOT to make install PERL_ROOT differ from build directory.
1154 $ prefix = prefixbase + "_ROOT.]"
1157 $!: determine root of directory hierarchy where package will be installed.
1162 $ echo "By default, ''package' will be installed in ''dflt', pod"
1163 $ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
1164 $ echo "all installation directories."
1165 $ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
1166 $ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
1168 $ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
1173 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
1177 $ perl_root = prefix
1179 $! Check here for pre-existing PERL_ROOT.
1180 $! -> ask if removal desired.
1181 $! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
1182 $! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
1184 $ tmp = perl_root - ".]" + "]"
1185 $ dflt = f$parse(tmp,,,,)
1188 $ echo4 "''tmp' does not yet exist."
1189 $! create/directory 'tmp'
1191 $ echo4 "''tmp' already exists."
1194 $ vms_skip_install = "true"
1197 $ rp = "Skip the remaining """"where install"""" questions? [''bool_dflt'] "
1199 $ IF (.NOT.ans) THEN vms_skip_install = "false"
1200 $ IF (.NOT.vms_skip_install)
1203 $!: set the prefixit variable, to compute a suitable default value
1205 $!: determine where private library files go
1206 $!: Usual default is /usr/local/lib/perl5. Also allow things like
1207 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
1213 There are some auxiliary files for perl5 that need to be put into a
1214 private library directory that is accessible by everyone.
1217 $ IF F$TYPE(privlib) .NES. ""
1218 $ THEN dflt = privlib
1219 $ ELSE dflt = "''vms_prefix':[lib]"
1221 $ rp = "Pathname where the private library files will reside? "
1222 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1226 $ ENDIF !%Config-I-VMS, skip remaining "where install" questions
1228 $ IF F$TYPE(perl_symbol) .EQS. "" THEN perl_symbol := true
1229 $ IF F$TYPE(perl_verb) .EQS. "" THEN perl_verb = ""
1231 $ THEN bool_dflt = "y"
1232 $ ELSE bool_dflt = "n"
1237 $ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
1238 $ echo "symbol to invoke ''package', which is the usual method."
1239 $ echO "If you do not do so then you would need a DCL command verb at the"
1240 $ echo "process or the system wide level."
1242 $ rp = "Invoke perl as a global symbol foreign command? [''bool_dflt'] "
1244 $ IF (.NOT.ans) THEN perl_symbol = "false"
1246 $ IF (.NOT.perl_symbol)
1248 $ IF perl_verb .EQS. "DCLTABLES"
1249 $ THEN bool_dflt = "n"
1250 $ ELSE bool_dflt = "y"
1255 $ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
1256 $ echo "verb in a per-process table or in the system wide DCLTABLES (which"
1257 $ echo "would require write privilege)."
1259 $ rp = "Invoke perl as a per process command verb? [ ''bool_dflt' ] "
1262 $ THEN perl_verb = "DCLTABLES"
1263 $ ELSE perl_verb = "PROCESS"
1265 $ ENDIF ! (.NOT.perl_symbol)
1267 $!: set the base revision
1269 $ revision = baserev - ".0"
1270 $!: get the patchlevel
1272 $ echo4 "Getting the current patchlevel..."
1273 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1274 $ IF (patchlevel_h.NES."")
1276 $ got_patch = "false"
1278 $ got_api_revision = "false"
1279 $ got_api_version = "false"
1280 $ got_api_subversion = "false"
1281 $ OPEN/READONLY CONFIG 'patchlevel_h'
1283 $ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
1284 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
1286 $ line = F$EDIT(line,"COMPRESS, TRIM")
1287 $ patchlevel = F$ELEMENT(2," ",line)
1288 $ got_patch = "true"
1290 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
1292 $ line = F$EDIT(line,"COMPRESS, TRIM")
1293 $ subversion = F$ELEMENT(2," ",line)
1296 $ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1298 $ line = F$EDIT(line,"COMPRESS, TRIM")
1299 $ api_revision = F$ELEMENT(2," ",line)
1300 $ got_api_revision = "true"
1302 $ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1304 $ line = F$EDIT(line,"COMPRESS, TRIM")
1305 $ api_version = F$ELEMENT(2," ",line)
1306 $ got_api_version = "true"
1308 $ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1310 $ line = F$EDIT(line,"COMPRESS, TRIM")
1311 $ api_subversion = F$ELEMENT(2," ",line)
1312 $ got_api_subversion = "true"
1314 $ IF (.NOT. got_patch) .OR. -
1315 (.NOT. got_sub) .OR. -
1316 (.NOT. got_api_revision) .OR. -
1317 (.NOT. got_api_version) .OR. -
1318 (.NOT. got_api_subversion) -
1319 THEN GOTO Patchlevel_h_loop
1327 $ api_subversion="0"
1329 $ IF (F$STRING(subversion) .NES. "0")
1331 $ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel' subversion ''subversion'.)"
1333 $ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel'.)"
1336 $ version = revision + "_" + patchlevel + "_" + subversion
1338 $ IF (.NOT.vms_skip_install)
1340 $!: set the prefixup variable, to restore leading tilde escape !sfn
1342 $!: determine where public architecture dependent libraries go
1346 $ echo "''package' contains architecture-dependent library files. If you are"
1352 sharing libraries in a heterogeneous environment, you might store
1353 these files in a separate location. Otherwise, you can just include
1354 them with the rest of the public library files.
1357 $ IF F$TYPE(archlib) .NES. ""
1358 $ THEN dflt = archlib
1359 $ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
1361 $ rp = "Where do you want to put the public architecture-dependent libraries? "
1362 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1366 $ ENDIF !%Config-I-VMS, skip "where install" questions
1368 $! This quotation from Configure has to be included on VMS:
1373 There is, however, a strange, musty smell in the air that reminds me of
1374 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1376 $ IF (.NOT.vms_skip_install)
1378 $!: it so happens the Eunice I know will not run shell scripts in Unix format
1380 $!: see if setuid scripts can be secure !sfn
1381 $!: now see if they want to do setuid emulation !sfn
1383 $!: determine where site specific libraries go.
1389 The installation process will also create a directory for
1390 site-specific extensions and modules. Some users find it convenient
1391 to place all local files in this directory rather than in the main
1392 distribution directory.
1395 $ IF F$TYPE(sitelib) .NES. ""
1396 $ THEN dflt = sitelib
1397 $ ELSE dflt = privlib - "]" + ".SITE_PERL]"
1399 $ rp = "Pathname for the site-specific library files? "
1400 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1404 $!: determine where site specific architecture-dependent libraries go.
1406 $ THEN TYPE SYS$INPUT:
1409 The installation process will also create a directory for
1410 architecture-dependent site-specific extensions and modules.
1413 $ IF F$TYPE(sitearch) .NES. ""
1414 $ THEN dflt = sitearch
1415 $ ELSE dflt = sitelib - "]" + "." + archname + "]"
1417 $ rp = "Pathname for the site-specific architecture-dependent library files? "
1418 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1422 $!: determine where old public architecture dependent libraries might be
1424 $!: determine where public executables go
1425 $ IF F$TYPE(bin) .NES. ""
1427 $! ELSE dflt = prefix - ".]" + ".BIN]"
1428 $ ELSE dflt = "/''vms_prefix'/000000"
1430 $ rp = "Pathname where the public executables will reside? "
1431 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1435 $!: determine where manual pages are on this system
1436 $!: What suffix to use on installed man pages
1437 $!: see if we can have long filenames
1438 $!: determine where library module manual pages go
1439 $!: What suffix to use on installed man pages
1440 $!: see what memory models we can support
1442 $ ELSE ! skipping "where install" questions, we must set some symbols
1443 $ IF F$TYPE(archlib).EQS."" THEN -
1444 archlib="''vms_prefix':[lib.''archname'.''version']"
1445 $ IF F$TYPE(bin) .EQS. "" THEN -
1446 bin="/''vms_prefix'/000000"
1447 $ IF F$TYPE(privlib) .EQS. "" THEN -
1448 privlib ="''vms_prefix':[lib]"
1449 $ IF F$TYPE(sitearch) .EQS. "" THEN -
1450 sitearch="''vms_prefix':[lib.site_perl.''archname']"
1451 $ IF F$TYPE(sitelib) .EQS. "" THEN -
1452 sitelib ="''vms_prefix':[lib.site_perl]"
1453 $ ENDIF !%Config-I-VMS, skip "where install" questions
1455 $! These derived locations can be set whether we've opted to
1456 $! skip the where install questions or not.
1458 $ IF F$TYPE(archlibexp) .EQS. "" THEN -
1459 archlibexp="''vms_prefix':[lib.''archname'.''version']"
1460 $ IF F$TYPE(binexp) .EQS. "" THEN -
1461 binexp ="''vms_prefix':[000000]"
1462 $ IF F$TYPE(builddir) .EQS. "" THEN -
1463 builddir ="''vms_prefix':[000000]"
1464 $ IF F$TYPE(installarchlib) .EQS. "" THEN -
1465 installarchlib="''vms_prefix':[lib.''archname'.''version']"
1466 $ IF F$TYPE(installbin) .EQS. "" THEN -
1467 installbin ="''vms_prefix':[000000]"
1468 $ IF F$TYPE(installscript) .EQS. "" THEN -
1469 installscript ="''vms_prefix':[utils]"
1470 $ IF F$TYPE(installman1dir) .EQS. "" THEN -
1471 installman1dir ="''vms_prefix':[man.man1]"
1472 $ IF F$TYPE(installman3dir) .EQS. "" THEN -
1473 installman3dir ="''vms_prefix':[man.man3]"
1474 $ IF F$TYPE(installprivlib) .EQS. "" THEN -
1475 installprivlib ="''vms_prefix':[lib]"
1476 $ IF F$TYPE(installsitearch) .EQS. "" THEN -
1477 installsitearch="''vms_prefix':[lib.site_perl.''archname']"
1478 $ IF F$TYPE(installsitelib) .EQS. "" THEN -
1479 installsitelib ="''vms_prefix':[lib.site_perl]"
1480 $ IF F$TYPE(oldarchlib) .EQS. "" THEN -
1481 oldarchlib="''vms_prefix':[lib.''archname']"
1482 $ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
1483 oldarchlibexp="''vms_prefix':[lib.''archname']"
1484 $ IF F$TYPE(privlibexp) .EQS. "" THEN -
1485 privlibexp ="''vms_prefix':[lib]"
1486 $ IF F$TYPE(scriptdir) .EQS. "" THEN -
1487 scriptdir ="''vms_prefix':[utils]"
1488 $ IF F$TYPE(sitearchexp) .EQS. "" THEN -
1489 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
1490 $ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
1491 sitelib_stem ="''vms_prefix':[lib.site_perl]"
1492 $ IF F$TYPE(sitelibexp) .EQS. "" THEN -
1493 sitelibexp ="''vms_prefix':[lib.site_perl]"
1495 $!: see if we need a special compiler
1496 $! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1500 $ vms_cc_available = ""
1502 $ OPEN/WRITE CONFIG ccvms.c
1503 $ WRITE CONFIG "#ifdef __DECC"
1504 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1505 $ WRITE CONFIG "#endif"
1506 $ WRITE CONFIG "#include <stdio.h>"
1507 $ WRITE CONFIG "int main() {"
1508 $ WRITE CONFIG "#ifdef __DECC"
1509 $ WRITE CONFIG " printf(""/DECC\n"");"
1510 $ WRITE CONFIG "#else"
1511 $ WRITE CONFIG " printf(""/VAXC\n"");"
1512 $ WRITE CONFIG "#endif"
1513 $ WRITE CONFIG " exit(0);"
1517 $! DEFINE SYS$ERROR _NLA0:
1518 $! DEFINE SYS$OUTPUT _NLA0:
1519 $ cc/NoObj/list=ccvms.lis ccvms.c
1521 $! DEASSIGN SYS$OUTPUT
1522 $! DEASSIGN SYS$ERROR
1523 $ IF (silent) THEN GOSUB Shut_up
1524 $ IF tmp.NE.%X10B90001
1526 $ IF tmp.NE.%X10000001
1528 $ nocc = "t" !%X10000001 is return from gcc
1529 $ GOTO Gcc_initial_check
1534 $ IF .NOT.silent THEN echo ""
1535 $ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1536 $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1540 $ echo "Will try cc/decc..."
1542 $ DEFINE/USER_MODE SYS$ERROR NL:
1543 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1545 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1548 $ IF (silent) THEN GOSUB Shut_up
1549 $ IF tmp.NE.%X10B90001
1551 $ echo "Apparently you don't have that one."
1554 $ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1555 $ vms_cc_available = vms_cc_available + "cc/decc "
1558 $ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
1560 $ vms_cc_dflt = "/decc"
1561 $ vms_cc_available = vms_cc_available + "cc/decc "
1566 $ echo "Checking for gcc"
1567 $ OPEN/WRITE CONFIG gccvers.lis
1568 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1569 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1570 $ 'gcc_symbol'/noobj/version _nla0:
1572 $ IF (silent) THEN GOSUB Shut_up
1574 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1576 $ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you do not have it."
1577 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1578 $ GOTO Cxx_initial_check
1580 $ OPEN/READ CONFIG gccvers.lis
1582 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1583 $ GOTO GCC_List_Read
1587 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1588 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1592 $! Do note that [vms]perl source files have a ways to go before they will
1593 $! compile under CXX.
1594 $! In order to test Configure.com with CXX invoke it with "-Dtry_cxx" on
1595 $! the command line.
1597 $ IF F$TYPE(try_cxx) .EQS. "" THEN try_cxx := n
1598 $ IF try_cxx .OR. try_cxx .EQS. "define"
1602 $ echo "Checking for CXX..."
1603 $ OPEN/WRITE CONFIG ccvms.c
1604 $ WRITE CONFIG "#include <iostream>"
1605 $ WRITE CONFIG "int main() {"
1606 $ WRITE CONFIG "#ifdef __DECCXX"
1607 $ WRITE CONFIG " cout << __DECCXX, endl;"
1608 $ WRITE CONFIG "#else"
1609 $ WRITE CONFIG " cout << 0,endl;"
1610 $ WRITE CONFIG "#endif"
1611 $! Todo: add G++ identifier check ??
1612 $ WRITE CONFIG " return(0);"
1616 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1617 $ DEFINE/USER_MODE SYS$ERROR NL:
1621 $! success $status with:
1622 $! DEC C++ V1.1-001 on VMS VAX V5.5-2
1623 $! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1624 $! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1625 $! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1626 $ IF tmp .eq. %X15F60001
1630 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1631 $ DEFINE/USER_MODE SYS$ERROR NL:
1635 $ ! success $status with:
1636 $ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1637 $ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1638 $ IF tmp .eq. %X10000001
1641 $ vms_cc_available = vms_cc_available + "cxx "
1642 $ echo "CXX and LINK are available."
1644 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1646 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1647 $ DEFINE/USER_MODE SYS$ERROR NL:
1651 $ ! success $status with:
1652 $ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1653 $ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1654 $ IF tmp .eq. %X10000001
1656 $ ld_try = "cxxlink"
1657 $ vms_cc_available = vms_cc_available + "cxx "
1658 $ echo "CXX and CXXLINK are available."
1661 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1665 $ DELETE/NOLOG/NOCONFIRM ccvms.c;
1666 $ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1667 $ CALL Cxx_demangler_cleanup
1669 $ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1672 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1674 $!: see if we need a special compiler
1676 $ echo "Available compiler(s):"
1677 $ echo "( ''vms_cc_available')"
1680 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1684 $ rp = "Use which C compiler? [''dflt'] "
1688 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1690 $ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans))
1695 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1697 $ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1702 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1706 $ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1707 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt)
1709 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1714 $ IF Mcc .EQS. "cc/decc"
1717 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1723 $ IF Mcc .EQS. "cc/decc"
1726 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1728 $ IF Mcc .EQS. "gcc"
1731 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1734 $Decc_Version_check:
1736 $ IF ccname .EQS. "DEC"
1739 $ echo4 "Checking for the Dec C version number..."
1740 $ OPEN/WRITE CONFIG deccvers.c
1741 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1742 $ WRITE CONFIG "#include <stdio.h>"
1743 $ WRITE CONFIG "int main() {"
1744 $ WRITE CONFIG "#ifdef __DECC"
1745 $ WRITE CONFIG "#ifdef __DECC_VER"
1746 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1747 $ WRITE CONFIG "#else"
1748 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1749 $ WRITE CONFIG "#endif"
1750 $ WRITE CONFIG "#endif"
1751 $ WRITE CONFIG " exit(0);"
1755 $ DEFINE/USER_MODE SYS$ERROR NL:
1756 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1759 $ IF (silent) THEN GOSUB Shut_up
1760 $ DEFINE/USER_MODE SYS$ERROR NL:
1761 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1764 $ IF (silent) THEN GOSUB Shut_up
1765 $ OPEN/WRITE CONFIG deccvers.out
1766 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1767 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1768 $ mcr []deccvers.exe
1772 $ IF (silent) THEN GOSUB Shut_up
1773 $ OPEN/READ CONFIG deccvers.out
1774 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1777 $ echo "You are using Dec C ''line'"
1779 $ Dec_C_Version = F$INTEGER(line)
1780 $ IF Dec_C_Version .GE. 60200000
1782 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1783 $ ccflags = ccflags + "/NOANSI_ALIAS"
1785 $ DELETE/NOLOG/NOCONFIRM deccvers.*;
1789 $ IF ccname .EQS. "GCC"
1791 $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1792 $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1793 $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1794 $ IF gcclib_olb .EQS. ""
1796 $! These objects/libs come w/ gcc 2.7.2 for AXP:
1797 $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1798 $ IF tmp .NES. "" then gcclib_olb = tmp
1799 $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1802 $ IF gcclib_olb .EQS. ""
1803 $ THEN gcclib_olb = tmp
1804 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1807 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1810 $ IF gcclib_olb .EQS. ""
1811 $ THEN gcclib_olb = tmp
1812 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1815 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1818 $ IF gcclib_olb .EQS. ""
1819 $ THEN gcclib_olb = tmp
1820 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1823 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1825 $ gcclib_olb = gcclib_olb + "/lib"
1827 $ IF gcclib_olb .NES. "" .AND. -
1828 (vaxcrtl_olb .NES. "" .OR. -
1829 vaxcrtl_exe .NES. "" )
1832 $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1833 $ OPEN/WRITE CONFIG gccvers.c
1834 $ WRITE CONFIG "#include <stdio.h>"
1835 $ WRITE CONFIG "int main() {"
1836 $ WRITE CONFIG "#ifdef __GNUC__"
1837 $ WRITE CONFIG "#ifdef __VERSION__"
1838 $ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1839 $ WRITE CONFIG "#else"
1840 $ WRITE CONFIG " printf(""%s\n"", ""1"");"
1841 $ WRITE CONFIG "#endif"
1842 $ WRITE CONFIG "#endif"
1843 $ WRITE CONFIG " exit(0);"
1846 $ DEFINE SYS$ERROR _NLA0:
1847 $ DEFINE SYS$OUTPUT _NLA0:
1850 $ DEASSIGN SYS$ERROR _NLA0:
1851 $ DEASSIGN SYS$OUTPUT _NLA0:
1852 $ IF (silent) THEN GOSUB Shut_up
1853 $ DEFINE SYS$ERROR _NLA0:
1854 $ DEFINE SYS$OUTPUT _NLA0:
1855 $ IF vaxcrtl_exe .EQS. ""
1857 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1859 $ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1862 $ link gccvers.obj,'gcclib_olb'
1866 $ OPEN/WRITE CONFIG GCCVERS.OPT
1867 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1869 $ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1872 $ DEASSIGN SYS$ERROR
1873 $ DEASSIGN SYS$OUTPUT
1874 $ IF (silent) THEN GOSUB Shut_up
1875 $ OPEN/WRITE CONFIG gccvers.out
1876 $ DEFINE SYS$ERROR CONFIG
1877 $ DEFINE SYS$OUTPUT CONFIG
1881 $ DEASSIGN SYS$OUTPUT
1882 $ DEASSIGN SYS$ERROR
1883 $ IF (silent) THEN GOSUB Shut_up
1884 $ OPEN/READ CONFIG gccvers.out
1885 $ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1888 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
1889 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1891 $ echo "You are not using GNU cc."
1894 $ echo "You are using GNU cc ''line'"
1897 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1903 $ IF ccname .EQS. "CXX"
1905 $ OPEN/WRITE CONFIG cxxvers.c
1906 $ WRITE CONFIG "#include <stdio.h>"
1907 $ WRITE CONFIG "int main() {"
1908 $ WRITE CONFIG "#ifdef __DECCXX_VER"
1909 $ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
1910 $ WRITE CONFIG "#else"
1911 $ WRITE CONFIG " printf(""%i\n"", ""0"");"
1912 $ WRITE CONFIG "#endif"
1913 $ WRITE CONFIG " return(0);"
1917 $ DEFINE/USER_MODE SYS$ERROR NL:
1918 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1922 $ IF (silent) THEN GOSUB Shut_up
1924 $ DEFINE/USER_MODE SYS$ERROR NL:
1925 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1929 $ IF (silent) THEN GOSUB Shut_up
1930 $ OPEN/WRITE CONFIG cxxvers.out
1932 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1933 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1938 $ IF (silent) THEN GOSUB Shut_up
1939 $ OPEN/READ CONFIG cxxvers.out
1940 $ READ/END_OF_FILE=Cxx_cleanup CONFIG line
1943 $ DELETE/NOLOG/NOCONFIRM cxxvers.*;
1944 $ echo "You are using CXX ''line'"
1947 $ CALL Cxx_demangler_cleanup
1950 $Cxx_demangler_cleanup: SUBROUTINE
1952 $! If we do build with CXX these demangler Dbs will be left all over.
1953 $! However, configure.com does try to remove the [.UU] sub directory.
1954 $! Be sure to set default to the correct place before calling this sub.
1957 $ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
1958 $ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
1960 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
1961 $ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
1965 $ ENDSUBROUTINE ! Cxx_demangler_cleanup
1970 $ OPEN/READ CONFIG ccvms.lis
1972 $ IF archname .EQS. "VMS_VAX"
1980 $ line = F$EDIT(line,"TRIM,COMPRESS")
1981 $ line = line - "Page 1" ! occurs at end all compilers
1982 $ line = line - "CCVMS " ! filename appears w/ VAXC
1983 $ line = line - "Source Listing " ! Seen w/ AXP DECC
1984 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
1986 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1987 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1991 $!: What should the include directory be ? (.TLB text libraries)
1993 $ rp = "Where are the include files you want to use? "
1994 $ IF f$length( rp + "[''dflt'] " ).gt.76
1995 $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
1996 $ ELSE rp = rp + "[''dflt'] "
2001 $!: see if we have to deal with yellow pages, now NIS.
2002 $!: now get the host name
2005 $ echo4 "Figuring out host name..." !>&4
2007 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
2008 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
2009 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
2010 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
2011 $ IF myhostname.eqs."".and. -
2012 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
2013 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
2014 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
2015 $ IF myhostname.eqs."".and. -
2016 F$TRNLNM("TCPIP$INET_HOST") .nes. "" .and. -
2017 F$TRNLNM("TCPIP$INET_DOMAIN") .nes. "" THEN -
2018 myhostname = F$TRNLNM("TCPIP$INET_HOST") + "." + F$TRNLNM("TCPIP$INET_DOMAIN")
2019 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
2020 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
2021 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
2022 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
2023 $!: you do not want to know about this
2025 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
2030 $ READ SYS$COMMAND/PROMPT= -
2031 "Please type the (one word) name of your host: " ans
2034 $!: translate upper to lower if necessary
2035 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
2036 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
2037 $ IF mylowhostname.NES.myhostname
2039 $ echo "(Normalizing case in your host name)"
2040 $ myhostname = mylowhostname
2043 $ fp = F$LOCATE(".",myhostname)
2044 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
2045 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
2047 $ rp = "What is your domain name? [''mydomain'] "
2051 $!: translate upper to lower if necessary
2052 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
2053 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
2054 $ IF mylowdomain.NES.mydomain
2056 $ echo "(Normalizing case in your domain name)"
2057 $ mydomain = mylowdomain
2060 $ myhostname = myhostname - mydomain
2061 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
2067 I need to get your e-mail address in Internet format if possible, i.e.
2068 something like user@host.domain. Please answer accurately since I have
2069 no easy means to double check it. The default value provided below
2070 is most probably close to the reality but may not be valid from outside
2071 your organization...
2074 $ IF F$TYPE(cf_email) .EQS. ""
2076 $ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
2077 $ rp = "What is your e-mail address? [''dflt'] "
2087 If you or somebody else will be maintaining perl at your site, please
2088 fill in the correct e-mail address here so that they may be contacted
2089 if necessary. Currently, the "perlbug" program included with perl
2090 will send mail to this address in addition to perlbug@perl.com. You may
2091 enter "none" for no administrator.
2094 $ dflt = "''cf_email'"
2095 $ rp = "Perl administrator e-mail address [''dflt'] "
2099 $!: determine where public executable scripts go
2100 $!: determine perl absolute location
2101 $!: figure out how to guarantee perl startup
2103 $!: see how we invoke the C preprocessor
2105 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
2106 $!: Set private lib path
2107 $!: Now check and see which directories actually exist, avoiding duplicates
2108 $!: determine optimize, if desired, or use for debug flag also
2109 $!: We will not override a previous value, but we might want to
2110 $!: augment a hint file
2111 $!: the following weeds options from ccflags that are of no interest to cpp
2112 $!: flags used in final linking phase
2113 $!: Try to guess additional flags to pick up local libraries.
2116 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
2117 $!: compute shared library extension
2118 $!: Looking for optional libraries
2119 $!: see if nm is to be used to determine whether a symbol is defined or not
2120 $!: get list of predefined functions in a handy place
2121 $!: see if we have sigaction or sigprocmask
2122 $!: see whether socketshr exists
2123 $ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
2125 $ Has_socketshr = "T"
2127 $ echo4 "Hmm... Looks like you have SOCKETSHR Berkeley networking support."
2129 $ Has_socketshr = "F"
2131 $ IF (ccname .EQS. "DEC" .AND. Dec_C_Version .GE. 50200000) .OR. -
2132 (ccname .EQS. "CXX")
2134 $ Has_Dec_C_Sockets = "T"
2136 $ echo4 "Hmm... Looks like you have Dec C Berkeley networking support."
2138 $ Has_Dec_C_Sockets = "F"
2140 $ ! Hey, we've got both. Default to Dec C, then, since it's better
2141 $ IF Has_socketshr .OR. Has_Dec_C_Sockets
2144 $ echo "You have sockets available. Which socket stack do you want to"
2145 $ echo "build into Perl?"
2146 $ IF Has_Dec_C_Sockets
2150 $ dflt = "SOCKETSHR"
2152 $ rp = "Choose socket stack (NONE"
2153 $ IF Has_socketshr THEN rp = rp + ",SOCKETSHR"
2154 $ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
2155 $ rp = rp + ") [''dflt'] "
2157 $ Has_Dec_C_Sockets = "F"
2158 $ Has_socketshr = "F"
2159 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
2160 $ IF ans.eqs."decc" then Has_Dec_C_Sockets = "T"
2161 $ IF ans.eqs."socketshr" then Has_socketshr = "T"
2165 $! Ask if they want to build with VMS_DEBUG perl
2167 $ echo "Perl can be built to run under the VMS debugger."
2168 $ echo "You should only select this option if you are debugging"
2169 $ echo "perl itself. This can be a useful feature if you are "
2170 $ echo "embedding perl in a program."
2172 $ if f$type(usevmsdebug) .nes. ""
2174 $ if usevmsdebug .or. usevmsdebug .eqs. "define" then bool_dflt="y"
2176 $ rp = "Build a VMS-DEBUG version of Perl? [''bool_dflt'] "
2178 $ use_vmsdebug_perl = ans
2179 $ IF use_vmsdebug_perl
2181 $ usevmsdebug = "define"
2182 $ macros = macros + """__DEBUG__=1"","
2184 $ usevmsdebug = "undef"
2187 $! Ask if they want to build with DEBUGGING
2189 $ echo "Perl can be built with extra runtime debugging enabled. This"
2190 $ echo "enables the -D switch, at the cost of some performance. It"
2191 $ echo "was mandatory on perl 5.005 and before on VMS, but is now"
2192 $ echo "optional. If you do not generally use it you should probably"
2193 $ echo "leave this off and gain a bit of extra speed."
2195 $ if f$type(useperldebug) .nes. ""
2197 $ if f$extract(0,1,f$edit(useperldebug,"collapse,upcase")).eqs."N" .or. useperldebug .eqs. "undef" then bool_dflt="n"
2199 $ rp = "Build a DEBUGGING version of Perl? [''bool_dflt'] "
2201 $ use_debugging_perl = ans
2203 $! Ask if they want to build with MULTIPLICITY
2205 $ echo "Perl can be built so that multiple Perl interpreters can coexist"
2206 $ echo "within the same Perl executable."
2207 $ echo "There is some performance overhead, however, so you"
2208 $ echo "probably do not want to choose this unless you are going to be"
2209 $ echo "doing things with embedded perl."
2211 $ if f$type(usemultiplicity) .nes. ""
2213 $ if usemultiplicity .or. usemultiplicity .eqs. "define" then bool_dflt = "y"
2215 $ rp = "Build Perl for multiplicity? [''bool_dflt'] "
2219 $ usemultiplicity="define"
2221 $ usemultiplicity="undef"
2224 $! Ask if they want to build with 64-bit support
2225 $ IF (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2228 $ IF F$TYPE(use64bitint) .NES. ""
2230 $ IF use64bitint .OR. use64bitint .eqs. "define" THEN bool_dflt = "y"
2233 $ echo "You can have native 64-bit long integers."
2235 $ echo "Perl can be built to take advantage of 64-bit integer types"
2236 $ echo "on some systems, which provide a much larger range for perl's"
2237 $ echo "mathematical operations. (Note that does *not* enable 64-bit"
2238 $ echo "fileops at the moment, as Dec C doesn't do that yet)."
2239 $ echo "Choosing this option will most probably introduce binary incompatibilities."
2241 $ echo "If this does not make any sense to you, just accept the default ''dflt'."
2242 $ rp = "Try to use 64-bit integers, if available? [''bool_dflt'] "
2247 $ IF F$TYPE(use64bitall) .NES. ""
2249 $ IF use64bitall .OR. use64bitall .eqs. "define" THEN bool_dflt = "y"
2252 $ echo "You may also choose to try maximal 64-bitness. It means using as much"
2253 $ echo "64-bitness as possible on the platform. This in turn means even more"
2254 $ echo "binary incompatibilities. On the other hand, your platform may not"
2255 $ echo "have any more 64-bitness available than what you already have chosen."
2257 $ echo "If this does not make any sense to you, just accept the default ''dflt'."
2258 $ rp = "Try to use maximal 64-bit support, if available? [''bool_dflt'] "
2261 $ IF use64bitall .AND. .NOT. use64bitint
2264 $ echo "Since you have chosen a maximally 64-bit build, I'm also turning on"
2265 $ echo "the use of 64-bit integers."
2268 $ ENDIF ! AXP && >= 7.1
2270 $! Ask about threads, if appropriate
2271 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
2274 $ echo "This version of Perl can be built with threads. While really nifty,"
2275 $ echo "they are a beta feature, and there is a speed penalty for perl"
2276 $ echo "programs if you build with threads *even if you do not use them*."
2278 $ if f$type(usethreads) .nes. ""
2280 $ if usethreads .or. usethreads .eqs. "define" then bool_dflt="y"
2282 $ rp = "Build with threads? [''bool_dflt'] "
2287 $ ! Shall we do the 5.005-stype threads, or IThreads?
2288 $ echo "As of 5.5.640, Perl has two different internal threading"
2289 $ echo "implementations, the 5.005 version (5005threads) and an"
2290 $ echo "interpreter-based version (ithreads) that has one"
2291 $ echo "interpreter per thread. Both are very experimental. This"
2292 $ echo "arrangement exists to help developers work out which one"
2295 $ echo "If you are a casual user, you probably do not want"
2296 $ echo "interpreter-threads at this time. There doesn't yet exist"
2297 $ echo "a way to create threads from within Perl in this model,"
2298 $ echo "i.e., ""use Thread;"" will NOT work."
2301 $ if f$type(useithreads) .nes. ""
2303 $ if useithreads .eqs. "define" then bool_dflt="y"
2305 $ rp = "Build with Interpreter threads? [''bool_dflt'] "
2310 $ use_5005_threads="N"
2312 $ use_5005_threads="Y"
2314 $ ! Are they on VMS 7.1 on an alpha?
2315 $ if (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2318 $ echo "Threaded perl can be linked to use multiple kernel threads"
2319 $ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature"
2320 $ echo "allows multiple threads to execute simultaneously on an SMP"
2321 $ echo "system as well as preventing a single thread from blocking"
2322 $ echo "all the threads in a program, even on a single-processor"
2323 $ echo "machine. Unfortunately, this feature isn't safe on an"
2324 $ echo "unpatched 7.1 system (several OS patches were required when"
2325 $ echo "this procedure was written)."
2327 $ rp = "Enable multiple kernel threads and upcalls? [''bool_dflt'] "
2331 $ Thread_Live_Dangerously = "MT=MT=1"
2336 $ IF archname .EQS. "VMS_AXP"
2340 $ echo "By default, perl (and pretty much everything else on VMS) uses"
2341 $ echo "case-insensitive linker symbols. Which is to say, when the"
2342 $ echo "underlying C code makes a call to a routine called Perl_foo in"
2343 $ echo "the source, the name in the object modules or shareable images"
2344 $ echo "is really PERL_FOO. There are some packages that use an"
2345 $ echo "embedded perl interpreter that instead require case-sensitive"
2346 $ echo "linker symbols."
2348 $ echo "If you have no idea what this means, and do not have"
2349 $ echo "any program requiring anything, choose the default."
2350 $ bool_dflt = be_case_sensitive
2351 $ if f$type(usecasesensitive) .nes. ""
2353 $ if usecasesensitive .or. usecasesensitive .eqs. "define" then bool_dflt = "y"
2354 $ if f$extract(0,1,f$edit(usecasesensitive,"collapse,upcase")).eqs."N" .or. usecasesensitive .eqs. "undef" then bool_dflt = "n"
2356 $ rp = "Build with case-sensitive symbols? [''bool_dflt'] "
2358 $ be_case_sensitive = ans
2361 $ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers"
2362 $ echo "internally on Alpha, but if you need G_FLOAT for binary compatibility"
2363 $ echo "with an external library or existing data, you may wish to disable"
2364 $ echo "the IEEE math option."
2365 $ bool_dflt = use_ieee_math
2366 $ if f$type(useieee) .nes. ""
2368 $ if useieee .or. useieee .eqs. "define" then bool_dflt="y"
2370 $ rp = "Use IEEE math? [''bool_dflt'] "
2372 $ use_ieee_math = ans
2374 $ be_case_sensitive = "n"
2375 $ use_ieee_math = "n"
2378 $ usecasesensitive = "undef"
2379 $ if (use_ieee_math) then useieee = "define"
2380 $ if (be_case_sensitive) then usecasesensitive = "define"
2383 $ echo "Your compiler may want other flags. For this question you should include"
2384 $ echo "/INCLUDE=(whatever) and /DEFINE=(whatever), flags and any other flags"
2385 $ echo "or qualifiers used by the compiler."
2387 $ echo "To use no flags, specify the word ""none""."
2388 $ dflt = user_c_flags
2389 $ rp = "Any additional cc flags? [''dflt'] "
2391 $ IF ans .EQS. "none" THEN ans = ""
2392 $ user_c_flags = "''ans'"
2394 $! Ask whether they want to use secure logical translation when tainting
2396 $ echo "As Perl starts up, it checks several logical names, such as"
2397 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2398 $ echo "of its behavior. For additional security, you may limit this"
2399 $ echo "process to executive- and kernel-mode translation when tainting"
2400 $ echo "is enabled. In this case, logical names normally skipped when"
2401 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2402 $ echo "If you do not choose to do this, the usual order of access modes"
2403 $ echo "is used for logical name translation."
2405 $ echo "This restriction does not apply to the %ENV hash or to implicit"
2406 $ echo "logical name translation during parsing of file specifications;"
2407 $ echo "these always use the normal sequence of access modes for logical"
2408 $ echo "name translation."
2410 $ if f$type(usesecurelog) .nes. ""
2412 $ if f$extract(0,1,f$edit(usesecurelog,"collapse,upcase")).eqs."N" .or. usesecurelog .eqs. "undef" then bool_dflt = "n"
2414 $ rp = "Use secure logical name translation? [''bool_dflt'] "
2416 $ d_secintgenv = ans
2417 $ usesecurelog = "undef"
2418 $ if (d_secintgenv) then usesecurelog = "define"
2420 $! Ask whether they want to default filetypes
2422 $ echo "When you pass the name of a program to Perl on the command line,"
2423 $ echo "it generally doesn't supply any defaults unless the -S command"
2424 $ echo "line switch is specified. In keeping with the VMS tradition of"
2425 $ echo "default file types, however, you can configure Perl to try default"
2426 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2427 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2428 $ echo "finally foo.com)."
2430 $ echo "This is currently broken in some configurations. Only enable it if"
2431 $ echo "you know what you are doing."
2433 $ if f$type(usedefaulttypes) .nes. ""
2435 $ if usedefaulttypes .or. usedefaulttypes .eqs. "define" then bool_dflt="y"
2437 $ rp = "Always use default file types? [''bool_dflt'] "
2439 $ d_alwdeftype = ans
2440 $ usedefaulttypes = "undef"
2441 $ if (d_alwdeftype) then usedefaulttypes = "define"
2443 $! Ask if they want to use perl's memory allocator
2445 $ echo "Perl has a built-in memory allocator that is tuned for normal"
2446 $ echo "memory usage. It is oftentimes better than the standard system"
2447 $ echo "memory allocator. It also has the advantage of providing memory"
2448 $ echo "allocation statistics, if you choose to enable them."
2450 $ IF F$TYPE(usemymalloc) .nes. ""
2452 $ if usemymalloc .or. usemymalloc .eqs. "define" then bool_dflt = "y"
2454 $ rp = "Do you wish to attempt to use the malloc that comes with ''package'? [''bool_dflt'] "
2459 $ IF use_debugging_perl
2462 $ echo "Perl can keep statistics on memory usage if you choose to use"
2463 $ echo "them. This is useful for debugging, but does have some"
2464 $ echo "performance overhead."
2466 $ rp = "Do you want the debugging memory allocator? [''bool_dflt'] "
2468 $ use_debugmalloc = ans
2470 $ ! Check which memory allocator we want
2472 $ echo "There are currently three different memory allocators: the"
2473 $ echo "default (which is a pretty good general-purpose memory manager),"
2474 $ echo "the TWO_POT allocator (which is optimized to save memory for"
2475 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save"
2476 $ echo "memory for smaller allocations). They're all good, but if your"
2477 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use"
2478 $ echo "PACK_MALLOC."
2480 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2482 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2483 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2486 $ known_extensions = ""
2488 $ OPEN/READ CONFIG 'manifestfound'
2490 $ READ/END_OF_FILE=end_ext/ERROR=end_ext CONFIG line
2491 $ IF F$EXTRACT(0,4,line) .NES. "ext/" .AND. -
2492 F$EXTRACT(0,8,line) .NES. "vms/ext/" THEN goto ext_loop
2493 $ line = F$EDIT(line,"COMPRESS")
2494 $ line = F$ELEMENT(0," ",line)
2495 $ line_len = F$LENGTH(line)
2496 $ IF F$EXTRACT(line_len - 12,12,line) .NES. "/Makefile.PL" THEN goto ext_loop
2497 $ IF F$EXTRACT(0,4,line) .EQS. "ext/" THEN -
2498 xxx = F$EXTRACT(4,line_len - 16,line)
2499 $ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit
2500 $ IF xxx .EQS. "SDBM_File/sdbm" THEN goto ext_loop ! sub extension - omit
2501 $ IF F$EXTRACT(0,8,line) .EQS. "vms/ext/" THEN -
2502 xxx = "VMS/" + F$EXTRACT(8,line_len - 20,line)
2503 $ known_extensions = known_extensions + " ''xxx'"
2508 $ known_extensions = F$EDIT(known_extensions,"TRIM,COMPRESS")
2509 $ dflt = known_extensions
2510 $ IF ccname .NES. "DEC" .AND. ccname .NES. "CXX"
2512 $ dflt = dflt - "POSIX" ! not with VAX C or GCC
2514 $ dflt = dflt - "ByteLoader" ! needs to be ported
2515 $ dflt = dflt - "DB_File" ! needs to be ported
2516 $ dflt = dflt - "GDBM_File" ! needs porting/special library
2517 $ dflt = dflt - "IPC/SysV" ! needs to be ported
2518 $ dflt = dflt - "NDBM_File" ! needs porting/special library
2519 $ dflt = dflt - "ODBM_File" ! needs porting/special library
2520 $ dflt = dflt - "Sys/Syslog" ! needs porting/special library "GDBM_File macro LOG_DEBUG"
2521 $ IF .NOT. Has_socketshr .AND. .NOT. Has_Dec_C_Sockets
2523 $ dflt = dflt - "Socket" ! optional on VMS
2525 $ IF .NOT. use_ithreads THEN dflt = dflt - "threads/shared"
2526 $ IF .NOT. use_ithreads THEN dflt = dflt - "threads"
2527 $ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
2529 $! Ask for their default list of extensions to build
2531 $ echo "It is time to specify which modules you want to build into"
2532 $ echo "perl. Most of these are standard and should be chosen, though"
2533 $ echo "you might, for example, want to build GDBM_File instead of"
2534 $ echo "SDBM_File if you have the GDBM library built on your machine."
2536 $ echo "Which modules do you want to build into perl?"
2539 $ extensions = F$EDIT(ans,"TRIM,COMPRESS")
2541 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2543 $ echo "Checking your ""make"" utilities..."
2544 $! If the 'build' that you use is not here add it and it's test
2545 $! switch to the _END_ of these strings (and increment max_build)
2546 $! (e.g. builders = builders + "/FOOMAKE"
2547 $! probers = probers + " -fooVersionSwitch"
2548 $! ) & please let me know about it.
2549 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2550 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2556 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2557 $ WRITE CONFIG "dont_make_anything_yet:"
2558 $ WRITE CONFIG F$FAO("!_")
2561 $ messages = F$ENVIRONMENT("MESSAGE")
2563 $ build = F$ELEMENT(n,"/",builders)
2564 $ probe = F$ELEMENT(n,"!",probers)
2565 $ echo "Testing whether you have ''build' on your system..."
2567 $! Noted with GNU Make version 3.60 that the $status and $severity
2568 $! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2569 $! $SEVERITY == "4".
2572 $ ON CONTROL_Y THEN GOTO Reenable_messages_build
2573 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
2575 $ IF ($SEVERITY .EQ. 1) ! not adequate?
2578 $ IF (build .EQS. orig_dflt)
2580 $ default_set = "TRUE"
2583 $ ok_builders = ok_builders + " " + build
2584 $ IF (.NOT. default_set) THEN dflt = build
2588 $Reenable_messages_build:
2589 $ SET MESSAGE 'messages'
2591 $ on control_y then goto clean_up
2593 $ IF (n .LT. max_build) THEN GOTO Build_probe
2596 $ IF (ok_builders .NES. "")
2598 $ echo "Here is the list of builders you can apparently use:"
2599 $ echo "(",ok_builders," )"
2600 $ rp = "Which """"make"""" utility do you wish to use? [''dflt'] "
2602 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2603 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2612 %Config-E-VMS, ERROR:
2613 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
2614 utility of some sort and after checking my "builders" list I cannot find
2615 the symbol or command you use on your system to compile programs.
2618 $ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
2619 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2620 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2623 $ echo "I do not know where ""make"" is, and my life depends on it."
2624 $ echo "Go find a make program or fix your DCL$PATH setting!"
2625 $ echo "ABORTING..."
2626 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2628 $ EXIT 2 !$STATUS = "%X00000002" (error)
2634 $ DELETE/NOLOG Makefile.;
2640 There seems to be trouble. I just tried to create a file in
2642 $ echo4 'F$ENVIRONMENT("DEFAULT")'
2645 but was unsuccessful. I am stopping now. Please check that directories'
2646 PROTECTION bits. I will leave you in the directory where you started
2649 $ echo4 "ABORTING..."
2655 $! echo " Very well I will proceed with ""''build'"""
2656 $ make = F$EDIT(build,"UPCASE")
2658 $!: locate the preferred pager for this system
2659 $!pagers = "most|more|less|type/page"
2660 $ dflt = "type/page"
2661 $! assume that the presence of a most symbol indicates the presence
2663 $ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most"
2664 $ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager
2665 $ rp="What pager is used on your system? [''dflt'] "
2669 $! update [.vms]config.vms here
2671 $! update makefile here
2672 $! echo4 "Updating makefile..."
2674 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2676 $ makefile = "" !wrt MANIFEST dir
2677 $ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
2678 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
2679 $ Makefile_SH = "descrip_mms.template"
2681 $ makefile = " -f Makefile." !wrt MANIFEST dir
2682 $ UUmakefile = "[-]Makefile." !wrt CWD dir
2683 $ DEFmakefile = "Makefile." !wrt DEF dir (?)
2684 $ Makefile_SH = "Makefile.in"
2687 $ IF macros .NES. ""
2689 $ tmp = F$LENGTH(macros)
2690 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2691 $ macros = "/macro=(" + macros + ")"
2693 $! Build up the extra C flags
2697 $ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm_results"
2699 $ IF be_case_sensitive
2701 $ extra_flags = "''extra_flags'" + "/Names=As_Is"
2703 $ extra_flags = "''extra_flags'" + "''user_c_flags'"
2705 $ min_pgflquota = "100000"
2706 $ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
2707 $ IF pgflquota .LES. min_pgflquota
2709 $ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
2710 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
2713 $ echo4 "Continuing..."
2715 $ echo4 "ABORTING..."
2720 $! PerlIO abstraction
2723 $ IF F$TYPE(useperlio) .NES. ""
2725 $ if f$extract(0,1,f$edit(useperlio,"collapse,upcase")) .eqs. "N" .or. useperlio .eqs. "undef" then bool_dflt = "n"
2729 $ echo "Previous versions of ''package' used the standard IO mechanisms as"
2732 defined in <stdio.h>. Versions 5.003_02 and later of perl allow
2733 alternate IO mechanisms via the PerlIO abstraction layer, but the
2734 stdio mechanism is still available if needed. The abstraction layer
2735 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
2736 Using PerlIO with sfio may cause problems with some extension modules.
2739 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2741 $ rp = "Use the PerlIO abstraction layer? [''bool_dflt'] "
2745 $ useperlio = "define"
2747 $ echo "Ok, doing things the stdio way."
2748 $ useperlio = "undef"
2752 $ echo4 "Checking the C run-time library."
2754 $! Former SUBCONFIGURE.COM
2756 $! - build a config.sh for VMS Perl.
2757 $! - use built config.sh to take config_h.SH -> config.h
2758 $! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
2759 $! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
2760 $! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
2762 $! Note for folks from other platforms changing things in here:
2764 $! Fancy changes (based on compiler capabilities or VMS version or
2765 $! whatever) are tricky, so go ahead and punt on those.
2767 $! Simple changes, though (say, always setting something to 1, or undef,
2768 $! or something like that) are straightforward. Adding a new constant
2769 $! item for the ultimately created config.sh requires at least one
2770 $! (possibly more) line(s) to this file.
2772 $! Add a line in the format:
2774 $! $ WC "foo='undef'"
2776 $! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
2777 $! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
2778 $! is sorted ASCII and corresponds to the output of config.sh in the
2779 $! Bourne shell version of Configure).
2780 $! Be very careful with quoting, as it can be tricky.
2781 $! For example if instead of a constant string like 'undef' or 'define'
2782 $! you wanted to add something to VMS's config.sh that looks like:
2786 $! then add a line that looks like this before the
2787 $! '##END WRITE NEW CONSTANTS HERE##' tagged line:
2789 $! $ WC "blank_string='" + "'"
2791 $! (+ is the string concatenator and "''var'" has the effect
2792 $! of "${var}" in perl or sh, but "'const'" is not interpolated).
2794 $! Note that unitialized variables, such as a line like:
2796 $! $ WC "new_var='" + new_var + "'"
2798 $! should be avoided unless new_var has a value assigned prior
2799 $! to that line (think of perl's -w warnings).
2801 $! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
2805 $ vms_ver = F$EXTRACT(1,3, osvers)
2806 $ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
2807 $ MCC = f$edit(mcc, "UPCASE")
2808 $ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
2809 $ IF ccname .EQS. "DEC"
2811 $ Checkcc := "''Mcc'/prefix=all"
2813 $ IF ccname .EQS. "CXX"
2817 $ Checkcc := "''Mcc'"
2820 $ ccflags = ccflags + extra_flags
2821 $ IF be_case_sensitive
2823 $ d_vms_be_case_sensitive = "define"
2825 $ d_vms_be_case_sensitive = "undef"
2827 $! Some constant defaults.
2828 $ hwname = f$getsyi("HW_NAME")
2829 $ myname = myhostname
2830 $ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
2835 $ IF use64bitint .OR. use64bitint .EQS. "define"
2837 $ use64bitint = "define"
2838 $ uselargefiles = "define"
2839 $ uselongdouble = "define"
2841 $ usemorebits = "define"
2842 $ ivdformat="""Ld"""
2843 $ uvuformat="""Lu"""
2844 $ uvoformat="""Lo"""
2845 $ uvxformat="""Lx"""
2846 $ uvXUformat="""LX"""
2848 $ use64bitint = "undef"
2849 $ uselargefiles = "undef"
2850 $ uselongdouble = "undef"
2851 $ usemorebits = "undef"
2852 $ ivdformat="""ld"""
2853 $ uvuformat="""lu"""
2854 $ uvoformat="""lo"""
2855 $ uvxformat="""lx"""
2856 $ uvXUformat="""lX"""
2858 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
2860 $ nveformat="""Le"""
2861 $ nvfformat="""Lf"""
2862 $ nvgformat="""Lg"""
2868 $ IF use64bitall .OR. use64bitall .EQS. "define"
2870 $ use64bitall = "define"
2872 $ use64bitall = "undef"
2875 $ usemymalloc = "undef"
2876 $ if mymalloc then usemymalloc = "define"
2880 $ IF (sharedperl .AND. archname .EQS. "VMS_AXP")
2894 $ dlobj="dl_vms''obj_ext'"
2896 $ cppstdin="''perl_cc'/noobj/preprocess=sys$output sys$input"
2898 $ cpprun="''perl_cc'/noobj/preprocess=sys$output sys$input"
2906 $ THEN d_mymalloc="define"
2907 $ ELSE d_mymalloc="undef"
2911 $ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
2912 $ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
2914 $ IF ((Use_Threads) .AND. (vms_ver .LES. "6.2"))
2916 $ 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"
2920 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
2927 $! perllibs should be libs with all non-core libs (such as gdbm) removed.
2933 $ IF use64bitint .OR. use64bitint .EQS. "define"
2935 $ d_PRId64 = "define"
2936 $ d_PRIEUldbl = "define"
2937 $ d_PRIFUldbl = "define"
2938 $ d_PRIGUldbl = "define"
2939 $ d_PRIeldbl = "define"
2940 $ d_PRIfldbl = "define"
2941 $ d_PRIgldbl = "define"
2942 $ d_PRIu64 = "define"
2943 $ d_PRIo64 = "define"
2944 $ d_PRIx64 = "define"
2945 $ d_PRIXU64 = "define"
2946 $ sPRId64 = """Ld"""
2947 $ sPRIEUldbl = """LE"""
2948 $ sPRIFUldbl = """LF"""
2949 $ sPRIGUldbl = """LG"""
2950 $ sPRIXU64 = """LX"""
2951 $ sPRIeldbl = """Le"""
2952 $ sPRIfldbl = """Lf"""
2953 $ sPRIgldbl = """Lg"""
2954 $ sPRIi64 = """Li"""
2955 $ sPRIo64 = """Lo"""
2956 $ sPRIu64 = """Lu"""
2957 $ sPRIx64 = """Lx"""
2959 $ quadtype = "long long"
2960 $ uquadtype = "unsigned long long"
2961 $ quadkind = "QUAD_IS_LONG_LONG"
2962 $ d_frexpl = "define"
2963 $ d_isnan = "define"
2964 $ d_isnanl = "define"
2965 $ d_modfl = "define"
2967 $ d_PRId64 = "undef"
2968 $ d_PRIEUldbl = "define"
2969 $ d_PRIFUldbl = "define"
2970 $ d_PRIGUldbl = "define"
2971 $ d_PRIXU64 = "undef"
2972 $ d_PRIeldbl = "define"
2973 $ d_PRIfldbl = "undef"
2974 $ d_PRIgldbl = "undef"
2975 $ d_PRIu64 = "undef"
2976 $ d_PRIo64 = "undef"
2977 $ d_PRIx64 = "undef"
2979 $ sPRIEUldbl = """E"""
2980 $ sPRIFUldbl = """F"""
2981 $ sPRIGUldbl = """G"""
2982 $ sPRIXU64 = """lX"""
2983 $ sPRIeldbl = """e"""
2984 $ sPRIfldbl = """f"""
2985 $ sPRIgldbl = """g"""
2992 $ uquadtype = "unsigned long"
2993 $ quadkind = "QUAD_IS_LONG"
2994 $ d_frexpl = "undef"
2996 $ d_isnanl = "undef"
2999 $ d_SCNfldbl = d_PRIfldbl
3000 $ sSCNfldbl = sPRIfldbl ! expect consistency
3002 $! Now some that we build up
3006 $ IF use_5005_threads
3008 $ arch = "''arch'-thread"
3009 $ archname = "''archname'-thread"
3010 $ d_old_pthread_create_joinable = "undef"
3011 $ old_pthread_create_joinable = " "
3012 $ use5005threads = "define"
3013 $ useithreads = "undef"
3015 $ arch = "''arch'-ithread"
3016 $ archname = "''archname'-ithread"
3017 $ d_old_pthread_create_joinable = "undef"
3018 $ old_pthread_create_joinable = " "
3019 $ use5005threads = "undef"
3020 $ useithreads = "define"
3023 $ d_old_pthread_create_joinable = "undef"
3024 $ old_pthread_create_joinable = " "
3025 $ use5005threads = "undef"
3026 $ useithreads = "undef"
3029 $! Some that we need to invoke the compiler for
3032 $! handy construction aliases/symbols
3034 $ OS := "open/write CONFIG []try.c"
3035 $ WS := "write CONFIG"
3036 $ CS := "close CONFIG"
3037 $ DS := "delete/nolog/noconfirm []try.*;*"
3039 $ good_compile = %X10B90001
3040 $ IF ccname .EQS. "GCC"
3042 $ open/write OPTCHAN []try.opt
3043 $ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
3044 $ write OPTCHAN "Sys$Share:VAXCRTL/Share"
3047 $ good_compile = %X10000001
3049 $ IF ccname .EQS. "CXX"
3051 $ good_compile = %X15F60001
3053 $ good_link = %X10000001
3054 $ tmp = "" ! null string default
3056 $ GOTO beyond_compile_ok
3058 $! Check for type sizes
3063 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3064 $ WS "#include <stdlib.h>"
3066 $ WS "#include <stdio.h>"
3069 $ WS "printf(""%d\n"", sizeof(''tmp'));"
3076 $!: locate header file
3080 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3081 $ WS "#include <stdlib.h>"
3083 $ WS "#include <stdio.h>"
3084 $ WS "#include <''tmp'>"
3087 $ WS "printf(""define\n"");"
3094 $!: define an alternate in-header-list? function
3098 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3100 $ echo4 "<''tmp'> found."
3103 $ echo4 "<''tmp'> NOT found."
3108 $!: define an is-in-libc? function
3111 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3113 $ echo4 "''tmp'() found."
3116 $ echo4 "''tmp'() NOT found."
3121 $!: define a shorthand compile call
3125 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3127 $ OPEN/WRITE CONFIG []try.out
3128 $ DEFINE/USER_MODE SYS$ERROR CONFIG
3129 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
3132 $ OPEN/READ CONFIG []try.out
3135 $ DELETE/NOLOG/NOCONFIRM []try.out;
3136 $ DELETE/NOLOG/NOCONFIRM []try.exe;
3138 $ tmp = "" ! null string default
3144 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3145 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3149 $ 'ld' try.obj,try.opt/opt
3150 $ link_status = $status
3153 $ link_status = $status
3156 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
3159 $!: define a shorthand compile call for compilations that should be ok.
3161 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3162 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3165 $ compile_status = $status
3167 $ DELETE/NOLOG/NOCONFIRM try.c;
3172 $! Check for __STDC__
3175 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3176 $ WS "#include <stdlib.h>"
3178 $ WS "#include <stdio.h>"
3181 $ WS "#ifdef __STDC__"
3182 $ WS "printf(""42\n"");"
3184 $ WS "printf(""1\n"");"
3191 $ IF F$INTEGER(tmp) .eq. 42
3193 $ echo4 "Your C compiler and pre-processor defines the symbol:"
3197 $! Check for double size
3199 $ echo4 "Checking to see how big your double precision numbers are..."
3201 $ GOSUB type_size_check
3203 $ echo "Your double is ''doublesize' bytes long."
3205 $! Check for long double size
3208 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3209 $ WS "#include <stdlib.h>"
3211 $ WS "#include <stdio.h>"
3214 $ WS "printf(""%d\n"", sizeof(long double));"
3218 $ echo4 "Checking to see if you have long double..."
3220 $ IF link_status .NE. good_link
3224 $ echo "You do not have long double."
3226 $ echo "You have long double."
3227 $ echo4 "Checking to see how big your long doubles are..."
3230 $ d_longdbl = "define"
3231 $ echo "Your long doubles are ''longdblsize' bytes long."
3234 $!: check for long long
3236 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3237 $ WS "#include <stdlib.h>"
3239 $ WS "#include <stdio.h>"
3242 $ WS "printf(""%d\n"", sizeof(long long));"
3246 $ echo4 "Checking to see if you have long long..."
3248 $ IF link_status .NE. good_link
3251 $ d_longlong="undef"
3252 $ echo "You do not have long long."
3254 $ echo "You have long long."
3255 $ echo4 "Checking to see how big your long longs are..."
3257 $ longlongsize = tmp
3258 $ d_longlong = "define"
3259 $ echo "Your long longs are ''longlongsize' bytes long."
3262 $! Check the prototype for getgid
3264 $ echo "Looking for the type for group ids returned by getgid()."
3266 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3267 $ WS "#include <stdlib.h>"
3269 $ WS "#include <stdio.h>"
3270 $ WS "#include <types.h>"
3278 $ IF compile_status .NE. good_compile
3280 $! Okay, gid_t failed. Must be unsigned int
3281 $ gidtype = "unsigned int"
3282 $ echo4 "assuming ""''gidtype'""."
3285 $ echo4 "gid_t found."
3288 $! Check to see if we've got dev_t
3290 $ echo "Looking for the type for dev."
3292 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3293 $ WS "#include <stdlib.h>"
3295 $ WS "#include <stdio.h>"
3296 $ WS "#include <types.h>"
3304 $ IF compile_status .NE. good_compile
3306 $! Okay, dev_t failed. Must be unsigned int
3307 $ devtype = "unsigned int"
3308 $ echo4 "assuming ""''devtype'""."
3311 $ echo4 "dev_t found."
3314 $! Check to see if we've got unistd.h (which we ought to, but you never know)
3321 $!: see if this is a libutil.h system
3327 $! Check to see if we've got shadow.h (probably not, but...)
3333 $! Check to see if we've got socks.h (probably not, but...)
3339 $! Check the prototype for select
3341 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3344 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3345 $ WS "#include <stdlib.h>"
3347 $ WS "#include <stdio.h>"
3348 $ WS "#include <types.h>"
3349 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3352 $ WS "#include <socketshr.h>"
3354 $ WS "#include <time.h>"
3355 $ WS "#include <socket.h>"
3362 $ WS "bar = select(2, foo, foo, foo, NULL);"
3367 $ IF compile_status .NE. good_compile
3369 $! Okay, select failed. Must be an int *
3370 $ selecttype = "int *"
3371 $ echo4 "select() NOT found."
3373 $ selecttype="fd_set *"
3374 $ echo4 "select() found."
3377 $ ! No sockets, so stick in an int * : no select, so pick a harmless default
3378 $ selecttype = "int *"
3381 $! Check to see if fd_set exists
3383 $ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3385 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3386 $ WS "#include <stdlib.h>"
3388 $ WS "#include <stdio.h>"
3389 $ WS "#include <types.h>"
3392 $ WS "#include <socketshr.h>"
3394 $ IF Has_Dec_C_Sockets
3396 $ WS "#include <time.h>"
3397 $ WS "#include <socket.h>"
3407 $ IF compile_status .ne. good_compile
3409 $! Okay, fd_set failed. Must not exist
3410 $ d_fd_set = "undef"
3411 $ echo4 "Hmm, your compiler has some difficulty with fd_set."
3414 $ echo4 "Well, your system knows about the normal fd_set typedef..."
3417 $! Check for inttypes.h
3419 $ tmp = "inttypes.h"
3423 $! Check to see if off64_t exists
3425 $ echo4 "Checking to see if you have off64_t..."
3427 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3428 $ WS "#include <stdlib.h>"
3430 $ WS "#include <stdio.h>"
3431 $ WS "#include <types.h>"
3432 $ WS "#''i_inttypes' IIH"
3434 $ WS "#include <inttypes.h>"
3443 $ IF compile_status .EQ. good_compile
3445 $ d_off64_t="define"
3446 $ echo "You have off64_t."
3448 $ d_off64_t = "undef"
3449 $ echo "You do not have off64_t."
3452 $! Check to see if fpos64_t exists
3454 $ echo4 "Checking to see if you have fpos64_t..."
3456 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3457 $ WS "#include <stdlib.h>"
3459 $ WS "#include <stdio.h>"
3460 $ WS "#include <types.h>"
3461 $ WS "#''i_inttypes' IIH"
3463 $ WS "#include <inttypes.h>"
3467 $ WS "fpos64_t bar;"
3472 $ IF compile_status .EQ. good_compile
3474 $ d_fpos64_t="define"
3475 $ echo "You have fpos64_t."
3477 $ d_fpos64_t = "undef"
3478 $ echo "You do not have fpos64_t."
3481 $! Check to see if int64_t exists
3483 $ echo4 "Checking to see if you have int64_t..."
3485 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3486 $ WS "#include <stdlib.h>"
3488 $ WS "#include <stdio.h>"
3489 $ WS "#include <types.h>"
3490 $ WS "#''i_inttypes' IIH"
3492 $ WS "#include <inttypes.h>"
3501 $ IF compile_status .EQ. good_compile
3503 $ d_int64_t="define"
3504 $ echo "You have int64_t."
3506 $ d_int64_t = "undef"
3507 $ echo "You do not have int64_t."
3510 $!: see if this is a netdb.h system
3511 $ IF Has_Dec_C_Sockets
3518 $! Check for h_errno
3520 $ echo4 "Checking to see if you have h_errno..."
3522 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3523 $ WS "#include <stdlib.h>"
3525 $ WS "#include <stdio.h>"
3526 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3527 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
3535 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3538 $ echo "You have h_errno."
3541 $ echo "You do not have h_errno."
3544 $! Check to see if gethostname exists
3546 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3549 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3550 $ WS "#include <stdlib.h>"
3552 $ WS "#include <stdio.h>"
3553 $ WS "#include <types.h>"
3556 $ WS "#include <socketshr.h>"
3558 $ WS "#include <time.h>"
3559 $ WS "#include <socket.h>"
3563 $ WS "char name[100];"
3564 $ WS "int bar, baz;"
3566 $ WS "baz = gethostname(name, bar);"
3571 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3573 $ d_gethname="define"
3574 $ echo4 "gethostname() found."
3576 $ d_gethname="undef"
3579 $ ! No sockets, so no gethname
3580 $ d_gethname = "undef"
3583 $! Check for sys/file.h
3585 $ tmp = "sys/file.h"
3589 $! Check for sys/utsname.h
3591 $ tmp = "sys/utsname.h"
3593 $ i_sysutsname = tmp
3595 $! Check for syslog.h
3607 $! Check for sys/uio.h
3613 $! Check for sys/mode.h
3615 $ tmp = "sys/mode.h"
3619 $! Check for sys/access.h
3621 $ tmp = "sys/access.h"
3625 $! Check for sys/security.h
3627 $ tmp = "sys/security.h"
3631 $! Check for fcntl.h
3640 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3641 $ WS "#include <stdlib.h>"
3643 $ WS "#include <stdio.h>"
3644 $ WS "#include <fcntl.h>"
3647 $ WS "fcntl(1,2,3);"
3655 $! Check for fcntl locking capability
3657 $ echo4 "Checking if fcntl-based file locking works... "
3659 $ IF d_fcntl .EQS. "define"
3662 $ WS "#include <stdio.h>"
3663 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3664 $ WS "#include <stdlib.h>"
3666 $ WS "#include <fcntl.h>"
3667 $ WS "#include <unistd.h>"
3669 $ WS "#if defined(F_SETLK) && defined(F_SETLKW)"
3670 $ WS " struct flock flock;"
3671 $ WS " int retval, fd;"
3672 $ WS " fd = open(""try.c"", O_RDONLY);"
3673 $ WS " flock.l_type = F_RDLCK;"
3674 $ WS " flock.l_whence = SEEK_SET;"
3675 $ WS " flock.l_start = flock.l_len = 0;"
3676 $ WS " retval = fcntl(fd, F_SETLK, &flock);"
3678 $ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));"
3680 $ WS " printf(""undef\n"");"
3685 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3688 $ IF tmp .EQS. "define"
3690 $ echo4 "Yes, it seems to work."
3692 $ echo4 "Nope, it didn't work."
3695 $ echo4 "I'm unable to compile the test program, so I'll assume not."
3699 $ echo4 "Nope, since you don't even have fcntl()."
3701 $ d_fcntl_can_lock = tmp
3706 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3707 $ WS "#include <stdlib.h>"
3709 $ WS "#include <string.h>"
3712 $ WS "char * place;"
3713 $ WS "place = memchr(""foo"", 47, 3);"
3721 $! Check for strtoull
3724 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3725 $ WS "#include <stdlib.h>"
3727 $ WS "#include <string.h>"
3730 $ WS "unsigned __int64 result;"
3731 $ WS "result = strtoull(""123123"", NULL, 10);"
3739 $! Check for strtouq
3742 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3743 $ WS "#include <stdlib.h>"
3745 $ WS "#include <string.h>"
3748 $ WS "unsigned __int64 result;"
3749 $ WS "result = strtouq(""123123"", NULL, 10);"
3757 $! Check for strtoll
3760 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3761 $ WS "#include <stdlib.h>"
3763 $ WS "#include <string.h>"
3766 $ WS "__int64 result;"
3767 $ WS "result = strtoll(""123123"", NULL, 10);"
3778 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3779 $ WS "#include <stdlib.h>"
3781 $ WS "#include <string.h>"
3784 $ WS "__int64 result;"
3785 $ WS "result = strtoq(""123123"", NULL, 10);"
3796 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3797 $ WS "#include <stdlib.h>"
3799 $ WS "#include <string.h>"
3802 $ WS "__int64 result;"
3803 $ WS "result = strtoq(""123123"", NULL, 10);"
3811 $! Check for strtold
3814 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3815 $ WS "#include <stdlib.h>"
3817 $ WS "#include <string.h>"
3820 $ WS "long double result;"
3821 $ WS "result = strtold(""123123"", NULL, 10);"
3832 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3833 $ WS "#include <stdlib.h>"
3835 $ WS "#include <string.h>"
3838 $ WS " __int64 result;"
3839 $ WS "result = atoll(""123123"");"
3850 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3851 $ WS "#include <stdlib.h>"
3853 $ WS "#include <string.h>"
3857 $ WS "result = atolf(""123123"");"
3868 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3869 $ WS "#include <stdlib.h>"
3871 $ WS "#include <stdio.h>"
3874 $ WS "access(""foo"", F_OK);"
3885 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3886 $ WS "#include <stdlib.h>"
3888 $ WS "#include <stdio.h>"
3889 $ WS "#include <strings.h>"
3892 $ WS "char foo[10];"
3893 $ WS "bzero(foo, 10);"
3904 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3905 $ WS "#include <stdlib.h>"
3907 $ WS "#include <stdio.h>"
3908 $ WS "#include <strings.h>"
3911 $ WS "char foo[10], bar[10];"
3912 $ WS "bcopy(""foo"", bar, 3);"
3920 $! Check for mkstemp
3923 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3924 $ WS "#include <stdlib.h>"
3926 $ WS "#include <stdio.h>"
3929 $ WS "mkstemp(""foo"");"
3937 $! Check for mkstemps
3940 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3941 $ WS "#include <stdlib.h>"
3943 $ WS "#include <stdio.h>"
3946 $ WS "mkstemps(""foo"", 1);"
3954 $! Check for mkdtemp
3957 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3958 $ WS "#include <stdlib.h>"
3960 $ WS "#include <stdio.h>"
3963 $ WS "mkdtemp(""foo"");"
3971 $! Check for setvbuf
3974 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3975 $ WS "#include <stdlib.h>"
3977 $ WS "#include <stdio.h>"
3981 $ WS "char Buffer[99];"
3982 $ WS "foo = fopen(""foo"", ""r"");"
3983 $ WS "setvbuf(foo, Buffer, 0, 0);"
3991 $! see if sfio.h is available
3992 $! see if sfio library is available
3993 $! Ok, but do we want to use it.
3994 $! IF F$TYPE(usesfio) .EQS. "" THEN usesfio = "undef"
3995 $! IF val .EQS. "define"
3997 $! IF usesfio .EQS. "define"
4001 $! echo "''package' can use the sfio library, but it is experimental."
4002 $! IF useperlio .EQS. "undef"
4004 $! echo "For sfio also the PerlIO abstraction layer is needed."
4005 $! echo "Earlier you said you would not want that."
4007 $! rp="You seem to have sfio available, do you want to try using it? [''dflt'] "
4009 $! IF ans .EQS. "" THEN ans = dflt
4012 $! echo "Ok, turning on both sfio and PerlIO, then."
4013 $! useperlio="define"
4016 $! echo "Ok, avoiding sfio this time. I'll use stdio instead."
4020 $! IF usesfio .EQS. "define"
4022 $! echo4 "Sorry, cannot find sfio on this machine."
4023 $! echo4 "Ignoring your setting of usesfio=''usesfio'."
4031 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4032 $ WS "#include <stdlib.h>"
4034 $ WS "#include <stdio.h>"
4037 $ WS "setenv(""FOO"", ""BAR"", 0);"
4045 $! Check for setproctitle
4048 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4049 $ WS "#include <stdlib.h>"
4051 $ WS "#include <stdio.h>"
4054 $ WS "setproctitle(""%s"", ""FOO"");"
4058 $ tmp = "setproctitle"
4060 $ d_setproctitle = tmp
4062 $! Check for <netinet/in.h>
4064 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4066 $ tmp = "netinet/in.h"
4073 $! Check for <netinet/tcp.h>
4075 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4077 $ tmp = "netinet/tcp.h"
4079 $ i_netinettcp = tmp
4081 $ i_netinettcp="undef"
4084 $! Check for endhostent
4086 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4089 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4090 $ WS "#include <stdlib.h>"
4092 $ WS "#include <stdio.h>"
4094 $ THEN WS "#include <socketshr.h>"
4095 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4099 $ WS "endhostent();"
4103 $ tmp = "endhostent"
4110 $! Check for endnetent
4112 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4115 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4116 $ WS "#include <stdlib.h>"
4118 $ WS "#include <stdio.h>"
4120 $ THEN WS "#include <socketshr.h>"
4121 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4136 $! Check for endprotoent
4138 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4141 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4142 $ WS "#include <stdlib.h>"
4144 $ WS "#include <stdio.h>"
4146 $ THEN WS "#include <socketshr.h>"
4147 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4151 $ WS "endprotoent();"
4155 $ tmp = "endprotoent"
4162 $! Check for endservent
4164 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4167 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4168 $ WS "#include <stdlib.h>"
4170 $ WS "#include <stdio.h>"
4172 $ THEN WS "#include <socketshr.h>"
4173 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4177 $ WS "endservent();"
4181 $ tmp = "endservent"
4188 $! Check for sethostent
4190 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4193 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4194 $ WS "#include <stdlib.h>"
4196 $ WS "#include <stdio.h>"
4198 $ THEN WS "#include <socketshr.h>"
4199 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4203 $ WS "sethostent(1);"
4207 $ tmp = "sethostent"
4214 $! Check for setnetent
4216 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4219 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4220 $ WS "#include <stdlib.h>"
4222 $ WS "#include <stdio.h>"
4224 $ THEN WS "#include <socketshr.h>"
4225 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4229 $ WS "setnetent(1);"
4240 $! Check for setprotoent
4242 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4245 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4246 $ WS "#include <stdlib.h>"
4248 $ WS "#include <stdio.h>"
4250 $ THEN WS "#include <socketshr.h>"
4251 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4255 $ WS "setprotoent(1);"
4259 $ tmp = "setprotoent"
4266 $! Check for setservent
4268 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4271 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4272 $ WS "#include <stdlib.h>"
4274 $ WS "#include <stdio.h>"
4276 $ THEN WS "#include <socketshr.h>"
4277 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4281 $ WS "setservent(1);"
4285 $ tmp = "setservent"
4292 $! Check for gethostent
4294 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4297 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4298 $ WS "#include <stdlib.h>"
4300 $ WS "#include <stdio.h>"
4302 $ THEN WS "#include <socketshr.h>"
4303 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4307 $ WS "gethostent();"
4311 $ tmp = "gethostent"
4318 $! Check for getnetent
4320 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4323 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4324 $ WS "#include <stdlib.h>"
4326 $ WS "#include <stdio.h>"
4328 $ THEN WS "#include <socketshr.h>"
4329 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4344 $! Check for getprotoent
4346 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4349 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4350 $ WS "#include <stdlib.h>"
4352 $ WS "#include <stdio.h>"
4354 $ THEN WS "#include <socketshr.h>"
4355 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4359 $ WS "getprotoent();"
4363 $ tmp = "getprotoent"
4370 $! Check for getservent
4372 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4375 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4376 $ WS "#include <stdlib.h>"
4378 $ WS "#include <stdio.h>"
4380 $ THEN WS "#include <socketshr.h>"
4381 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4385 $ WS "getservent();"
4389 $ tmp = "getservent"
4396 $! Check for socklen_t
4398 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4400 $ echo4 "Checking to see if you have socklen_t..."
4402 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4403 $ WS "#include <stdlib.h>"
4405 $ WS "#include <stdio.h>"
4407 $ THEN WS "#include <socketshr.h>"
4408 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4412 $ WS "socklen_t x = 16;"
4417 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4419 $ d_socklen_t="define"
4420 $ echo "You have socklen_t."
4422 $ d_socklen_t="undef"
4423 $ echo "You do not have socklen_t."
4426 $ d_socklen_t="undef"
4429 $! Check for pthread_yield
4434 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4435 $ WS "#include <stdlib.h>"
4437 $ WS "#include <pthread.h>"
4438 $ WS "#include <stdio.h>"
4441 $ WS "pthread_yield();"
4445 $ tmp = "pthread_yield"
4447 $ d_pthread_yield = tmp
4449 $ d_pthread_yield="undef"
4452 $! Check for sched_yield
4457 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4458 $ WS "#include <stdlib.h>"
4460 $ WS "#include <pthread.h>"
4461 $ WS "#include <stdio.h>"
4464 $ WS "sched_yield();"
4468 $ tmp = "sched_yield"
4470 $ d_sched_yield = tmp
4471 $ IF d_sched_yield .EQS. "define"
4472 $ THEN sched_yield = "sched_yield"
4473 $ ELSE sched_yield = " "
4476 $ d_sched_yield="undef"
4480 $! Check for generic pointer size
4482 $ echo4 "Checking to see how big your pointers are..."
4484 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4485 $ WS "#include <stdlib.h>"
4487 $ WS "#include <stdio.h>"
4491 $ WS "foo = sizeof(char *);"
4492 $ WS "printf(""%d\n"", foo);"
4497 $ GOSUB type_size_check
4499 $ echo "Your pointers are ''ptrsize' bytes long."
4501 $! Check for size_t size
4505 $ echo4 "Checking the size of ''zzz'..."
4506 $ GOSUB type_size_check
4508 $ echo "Your ''zzz' size is ''sizesize' bytes."
4510 $! Check rand48 and its ilk
4512 $ echo4 "Looking for a random number function..."
4514 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4515 $ WS "#include <stdlib.h>"
4517 $ WS "#include <stdio.h>"
4520 $ WS "srand48(12L);"
4525 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4527 $ drand01 = "drand48()"
4528 $ randseedtype = "long int"
4529 $ seedfunc = "srand48"
4530 $ echo4 "Good, found drand48()."
4531 $ d_drand48proto = "define"
4533 $ d_drand48proto = "undef"
4534 $ drand01="random()"
4535 $ randseedtype = "unsigned"
4536 $ seedfunc = "srandom"
4538 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4539 $ WS "#include <stdlib.h>"
4541 $ WS "#include <stdio.h>"
4549 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4551 $ echo4 "OK, found random()."
4553 $ drand01="(((float)rand())*MY_INV_RAND_MAX)"
4554 $ randseedtype = "unsigned"
4555 $ seedfunc = "srand"
4556 $ echo4 "Yick, looks like I have to use rand()."
4559 $! Done with compiler checks. Clean up.
4560 $ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
4561 $ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
4562 $ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
4563 $ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
4564 $ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
4565 $ IF ccname .EQS. "CXX"
4567 $ CALL Cxx_demangler_cleanup
4570 $! Some that are compiler or VMS version sensitive
4573 $ IF ccname .EQS. "GCC"
4575 $ d_attribut="define"
4579 $ d_attribut="undef"
4582 $! Dec C >= 5.2 and VMS ver >= 7.0
4583 $ IF (ccname .EQS. "DEC") .AND. -
4584 (F$INTEGER(Dec_C_Version).GE.50200000) .AND. (vms_ver .GES. "7.0")
4587 $ d_getitimer="define"
4588 $ d_gettimeod="define"
4590 $ d_mprotect="define"
4596 $ d_setitimer="define"
4597 $ d_sigaction="define"
4598 $ d_sigprocmask="define"
4599 $ d_truncate="define"
4603 $ 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"
4604 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4605 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
4606 $ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
4607 $ sig_name_init = psnwc1 + psnwc2 + psnwc3
4608 $ 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"
4609 $ 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"
4610 $! perl_sig_num_with_commas=sig_num_init
4613 $ d_pathconf="define"
4614 $ d_fpathconf="define"
4615 $ d_sysconf="define"
4616 $ d_sigsetjmp="define"
4618 $ pidtype="unsigned int"
4620 $ d_getitimer="undef"
4621 $ d_gettimeod="undef"
4623 $ d_mprotect="undef"
4629 $ d_setitimer="undef"
4630 $ d_sigaction="undef"
4631 $ d_sigprocmask="undef"
4632 $ d_truncate="undef"
4635 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"",0"
4636 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4637 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
4638 $ sig_name_init = psnwc1 + psnwc2
4639 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"",0"
4640 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
4641 $! perl_sig_num_with_commas=sig_num_init
4643 $ uidtype="unsigned int"
4644 $ d_pathconf="undef"
4645 $ d_fpathconf="undef"
4647 $ d_sigsetjmp="undef"
4649 $!: see if tzname[] exists
4651 $ WS "#include <stdio.h>"
4652 $ WS "#include <time.h>"
4653 $ WS "int main() { extern short tzname[]; printf(""%hd"", tzname[0]); }"
4656 $ IF compile_status .EQ. good_compile
4658 $ d_tzname = "undef"
4659 $ echo4 "tzname[] NOT found."
4661 $ d_tzname = "define"
4662 $ echo4 "tzname[] found."
4664 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
4666 $ IF d_gethname .EQS. "undef" .AND. d_uname .EQS. "undef"
4668 $ d_phostname="define"
4670 $ d_phostname="undef"
4674 $ IF ccname .EQS. "DEC"
4676 $ d_mbstowcs="define"
4678 $ d_stdiobase="define"
4679 $ d_stdio_cnt_lval="define"
4680 $ d_stdio_ptr_lval="define"
4681 $ d_stdstdio="define"
4682 $ d_wcstombs="define"
4685 $ d_strcoll="define"
4686 $ d_strxfrm="define"
4689 $ i_langinfo="define"
4690 $ d_locconv="define"
4691 $ d_nl_langinfo="define"
4692 $ d_setlocale="define"
4693 $ vms_cc_type="decc"
4695 $ d_mbstowcs="undef"
4697 $ d_stdiobase="undef"
4698 $ d_stdio_cnt_lval="undef"
4699 $ d_stdio_ptr_lval="undef"
4700 $ d_stdstdio="undef"
4701 $ d_wcstombs="undef"
4708 $ i_langinfo="undef"
4710 $ d_nl_langinfo="undef"
4711 $ d_setlocale="undef"
4713 $ d_stdio_ptr_lval_sets_cnt="undef"
4714 $ d_stdio_ptr_lval_nochange_cnt="define"
4717 $ if Has_Socketshr .OR. Has_Dec_C_Sockets
4719 $ d_vms_do_sockets="define"
4723 $ netdb_hlen_type="int"
4724 $ netdb_host_type="char *"
4725 $ netdb_name_type="char *"
4726 $ netdb_net_type="long"
4727 $ d_gethbyaddr="define"
4728 $ d_gethbyname="define"
4729 $ d_getnbyaddr="define"
4730 $ d_getnbyname="define"
4731 $ d_getpbynumber="define"
4732 $ d_getpbyname="define"
4733 $ d_getsbyport="define"
4734 $ d_getsbyname="define"
4735 $ d_gethostprotos="define"
4736 $ d_getnetprotos="define"
4737 $ d_getprotoprotos="define"
4738 $ d_getservprotos="define"
4739 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
4741 $ socksizetype="unsigned int"
4743 $ socksizetype="int *"
4746 $ d_vms_do_sockets="undef"
4750 $ netdb_hlen_type="int"
4751 $ netdb_host_type="char *"
4752 $ netdb_name_type="char *"
4753 $ netdb_net_type="long"
4754 $ d_gethbyaddr="undef"
4755 $ d_gethbyname="undef"
4756 $ d_getnbyaddr="undef"
4757 $ d_getnbyname="undef"
4758 $ d_getpbynumber="undef"
4759 $ d_getpbyname="undef"
4760 $ d_getsbyport="undef"
4761 $ d_getsbyname="undef"
4762 $ d_gethostprotos="undef"
4763 $ d_getnetprotos="undef"
4764 $ d_getprotoprotos="undef"
4765 $ d_getservprotos="undef"
4766 $ socksizetype="undef"
4771 $ usethreads="define"
4772 $ d_pthreads_created_joinable="define"
4773 $ if (vms_ver .GES. "7.0")
4775 $ d_oldpthreads="undef"
4777 $ d_oldpthreads="define"
4780 $ d_oldpthreads="undef"
4781 $ usethreads="undef"
4782 $ d_pthreads_created_joinable="undef"
4785 $! new (5.005_62++) typedefs for primitives
4787 $ echo "Choosing the C types to be used for Perl's internal types..."
4789 $ uvtype="unsigned long"
4791 $ u8type="unsigned char"
4793 $ u16type="unsigned short"
4795 $ u32type="unsigned int"
4796 $ i64type="long long"
4797 $ u64type="unsigned long long"
4800 $ IF use64bitint .OR. use64bitint .EQS. "define"
4802 $ ivtype = "''i64type'"
4803 $ uvtype = "''u64type'"
4804 $ nvtype="long double"
4811 $ GOSUB type_size_check
4813 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp
4814 $ IF ivtype .eqs. "long"
4815 $ THEN longsize = tmp
4818 $ GOSUB type_size_check
4823 $ GOSUB type_size_check
4825 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp
4828 $ GOSUB type_size_check
4832 $ GOSUB type_size_check
4835 $ tmp = "''i16type'"
4836 $ GOSUB type_size_check
4838 $ IF i16type .eqs. "short"
4839 $ THEN shortsize = tmp
4842 $ gosub type_size_check
4846 $ tmp = "''u16type'"
4847 $ GOSUB type_size_check
4850 $ tmp = "''i32type'"
4851 $ GOSUB type_size_check
4853 $ IF i32type .eqs. "int"
4854 $ THEN intsize = tmp
4857 $ gosub type_size_check
4861 $ tmp = "''u32type'"
4862 $ gosub type_size_check
4866 $ GOSUB type_size_check
4869 $ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
4870 $ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
4871 $ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
4873 $ echo4 "Checking whether your NVs can preserve your UVs..."
4875 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4876 $ WS "#include <stdlib.h>"
4878 $ WS "#include <stdio.h>"
4880 $ WS " ''uvtype' k = (''uvtype')~0, l;"
4881 $ WS " ''nvtype' d;"
4883 $ WS " d = (''nvtype')l;"
4884 $ WS " l = (''uvtype')d;"
4886 $ WS " printf(""preserve\n"");"
4891 $ IF tmp .EQS. "preserve"
4893 $ d_nv_preserves_uv = "define"
4894 $ echo "Yes, they can."
4895 $ d_nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8)
4897 $ d_nv_preserves_uv = "undef"
4898 $ echo "No, they can't."
4899 $ echo4 "Checking how many bits of your UVs your NVs can preserve..."
4901 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4902 $ WS "#include <stdlib.h>"
4904 $ WS "#include <stdio.h>"
4906 $ WS " ''uvtype' u = 0;"
4907 $ WS " int n = 8 * ''uvsize';"
4909 $ WS " for (i = 0; i < n; i++) {"
4910 $ WS " u = u << 1 | (''uvtype')1;"
4911 $ WS " if ((''uvtype')(''nvtype')u != u)"
4914 $ WS " printf(""%d\n"", i);"
4918 $ d_nv_preserves_uv_bits = tmp
4922 $! Finally the composite ones. All config
4924 $ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
4926 $ IF ccname .EQS. "DEC"
4928 $ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
4930 $ i_dirent = "undef"
4931 $ IF ccname .EQS. "CXX"
4933 $ i_dirent = "define"
4934 $ ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
4936 $ IF use_vmsdebug_perl
4938 $ optimize="/List/Debug/NoOpt"
4939 $ ldflags="/Debug/Trace/Map"
4942 $ optimize= "/NoList"
4943 $ ldflags="/NoTrace/NoMap"
4947 $! Okay, we've got everything configured. Now go write out a config.sh.
4948 $ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
4949 $ echo4 "Creating ''basename_config_sh'..."
4950 $ open/write CONFIG 'config_sh'
4951 $ WC := write CONFIG
4953 $! ##BEGIN WRITE NEW CONSTANTS HERE##
4957 $ WC "# This file was produced by Configure.COM on a ''osname' system."
4959 $ WC "# Package name : ''package'"
4960 $ WC "# Source directory : ''src'"
4961 $ WC "# Configuration time: " + cf_time
4962 $ WC "# Configuration by : " + cf_by
4963 $ WC "# Target system : " + myuname
4965 $ WC "CONFIG='true'"
4966 $ WC "Makefile_SH='" + Makefile_SH + "'"
4967 $ WC "Mcc='" + Mcc + "'"
4968 $ WC "PERL_REVISION='" + revision + "'"
4969 $ WC "PERL_VERSION='" + patchlevel + "'"
4970 $ WC "PERL_SUBVERSION='" + subversion + "'"
4971 $ WC "PERL_API_VERSION='" + api_version + "'"
4972 $ WC "PERL_API_SUBVERSION='" + api_subversion + "'"
4973 $ WC "alignbytes='" + alignbytes + "'"
4974 $ WC "aphostname='write sys$output f$edit(f$getsyi(\""SCSNODE\""),\""TRIM,LOWERCASE\"")'"
4976 $ WC "archlib='" + archlib + "'"
4977 $ WC "archlibexp='" + archlibexp + "'"
4978 $ WC "archname='" + archname + "'"
4979 $ WC "baserev='" + baserev + "'"
4980 $ WC "bin='" + bin + "'"
4981 $ WC "binexp='" + binexp + "'"
4982 $ WC "builddir='" + builddir + "'"
4983 $ WC "byteorder='1234'"
4984 $ WC "castflags='0'"
4985 $ WC "cc='" + perl_cc + "'"
4986 $ WC "cccdlflags='" + cccdlflags + "'"
4987 $ WC "ccdlflags='" + ccdlflags + "'"
4988 $ WC "ccflags='" + ccflags + "'"
4989 $ WC "ccname='" + ccname + "'"
4990 $ WC "ccversion='" + ccversion + "'"
4991 $ WC "cf_by='" + cf_by + "'"
4992 $ WC "cf_email='" + cf_email + "'"
4993 $ WC "cf_time='" + cf_time + "'"
4994 $ WC "config_args='" + config_args + "'"
4995 $ WC "config_sh='" + config_sh + "'"
4996 $ WC "cpp_stuff='" + cpp_stuff + "'"
4997 $ WC "cpplast='" + cpplast + "'"
4998 $ WC "cppminus='" + cppminus + "'"
4999 $ WC "cpprun='" + cpprun + "'"
5000 $ WC "cppstdin='" + cppstdin + "'"
5001 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
5002 $ WC "d_PRIEldbl='" + d_PRIEUldbl + "'"
5003 $ WC "d_PRIFldbl='" + d_PRIFUldbl + "'"
5004 $ WC "d_PRIGldbl='" + d_PRIGUldbl + "'"
5005 $ WC "d_PRIXU64='" + d_PRIXU64 + "'"
5006 $ WC "d_PRId64='" + d_PRId64 + "'"
5007 $ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
5008 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
5009 $ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
5010 $ WC "d_PRIo64='" + d_PRIo64 + "'"
5011 $ WC "d_PRIu64='" + d_PRIu64 + "'"
5012 $ WC "d_PRIx64='" + d_PRIx64 + "'"
5013 $ WC "d_SCNfldbl='" + d_SCNfldbl + "'"
5014 $ WC "d__fwalk='undef'"
5015 $ WC "d_access='" + d_access + "'"
5016 $ WC "d_accessx='undef'"
5017 $ WC "d_alarm='define'"
5018 $ WC "d_archlib='define'"
5019 $ WC "d_atolf='" + d_atolf + "'"
5020 $ WC "d_atoll='" + d_atoll + "'"
5021 $ WC "d_attribut='" + d_attribut + "'"
5022 $ WC "d_bcmp='" + d_bcmp + "'"
5023 $ WC "d_bcopy='" + d_bcopy + "'"
5024 $ WC "d_bincompat3='undef'"
5025 $ WC "d_bincompat5005='undef'"
5026 $! WC "d_bsdpgrp='undef'"
5027 $ WC "d_bsdgetpgrp='undef'"
5028 $ WC "d_bsdsetpgrp='undef'"
5029 $ WC "d_bzero='" + d_bzero + "'"
5030 $ WC "d_casti32='define'"
5031 $ WC "d_castneg='define'"
5032 $ WC "d_charvspr='undef'"
5033 $ WC "d_chown='define'"
5034 $ WC "d_chroot='undef'"
5035 $ WC "d_chsize='undef'"
5036 $ WC "d_class='undef'"
5037 $ WC "d_cmsghdr_s='undef'"
5038 $ WC "d_const='define'"
5039 $ WC "d_crypt='define'"
5040 $ WC "d_csh='undef'"
5041 $ WC "d_cuserid='define'"
5042 $ WC "d_dbl_dig='define'"
5043 $ WC "d_dbminitproto='undef'"
5044 $ WC "d_difftime='define'"
5045 $ WC "d_dirnamlen='define'"
5046 $ WC "d_dlerror='undef'"
5047 $ WC "d_dlsymun='undef'"
5048 $ WC "d_dosuid='undef'"
5049 $ WC "d_drand48proto='" + d_drand48proto + "'"
5050 $ WC "d_dup2='define'"
5051 $ WC "d_eaccess='undef'"
5052 $ WC "d_endgrent='define'"
5053 $ WC "d_endhent='" + d_endhent + "'"
5054 $ WC "d_endnent='" + d_endnent + "'"
5055 $ WC "d_endpent='" + d_endpent + "'"
5056 $ WC "d_endpwent='define'"
5057 $ WC "d_endsent='" + d_endsent + "'"
5058 $ WC "d_eofnblk='undef'"
5059 $ WC "d_eunice='undef'"
5060 $ WC "d_fchmod='undef'"
5061 $ WC "d_fchdir='undef'"
5062 $ WC "d_fchown='undef'"
5063 $ WC "d_fcntl='" + d_fcntl + "'"
5064 $ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
5065 $ WC "d_fd_set='" + d_fd_set + "'"
5066 $ WC "d_fgetpos='define'"
5067 $ WC "d_finite='undef'"
5068 $ WC "d_finitel='undef'"
5069 $ WC "d_flexfnam='define'"
5070 $ WC "d_flock='undef'"
5071 $ WC "d_flockproto='undef'"
5072 $ WC "d_fork='undef'"
5073 $ WC "d_fp_class='undef'"
5074 $ WC "d_fpathconf='" + d_fpathconf + "'"
5075 $ WC "d_fpclass='undef'"
5076 $ WC "d_fpclassify='undef'"
5077 $ WC "d_fpclassl='undef'"
5078 $ WC "d_fpos64_t='" + d_fpos64_t + "'"
5079 $ WC "d_frexpl='" + d_frexpl + "'"
5080 $ WC "d_fs_data_s='undef'"
5081 $ WC "d_fseeko='undef'"
5082 $ WC "d_fsetpos='define'"
5083 $ WC "d_fstatfs='undef'"
5084 $ WC "d_fstatvfs='undef'"
5085 $ WC "d_fsync='undef'"
5086 $ WC "d_ftello='undef'"
5087 $ WC "d_getcwd='define'"
5088 $ WC "d_getespwnam='undef'"
5089 $ WC "d_getfsstat='undef'"
5090 $ WC "d_getgrent='define'"
5091 $ WC "d_getgrps='undef'"
5092 $ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
5093 $ WC "d_gethbyname='" + d_gethbyname + "'"
5094 $ WC "d_gethent='" + d_gethent + "'"
5095 $ WC "d_gethname='" + d_gethname + "'"
5096 $ WC "d_gethostprotos='" + d_gethostprotos + "'"
5097 $ WC "d_getitimer='" + d_getitimer + "'"
5098 $ WC "d_getlogin='define'"
5099 $ WC "d_getmnt='undef'"
5100 $ WC "d_getmntent='undef'"
5101 $ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
5102 $ WC "d_getnbyname='" + d_getnbyname + "'"
5103 $ WC "d_getnent='" + d_getnent + "'"
5104 $ WC "d_getnetprotos='" + d_getnetprotos + "'"
5105 $ WC "d_getpagsz='undef'"
5106 $ WC "d_getpbyname='" + d_getpbyname + "'"
5107 $ WC "d_getpbynumber='" + d_getpbynumber + "'"
5108 $ WC "d_getpent='" + d_getpent + "'"
5109 $ WC "d_getpgid='undef'"
5110 $ WC "d_getpgrp2='undef'"
5111 $ WC "d_getpgrp='undef'"
5112 $ WC "d_getppid='undef'"
5113 $ WC "d_getprior='undef'"
5114 $ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
5115 $ WC "d_getprpwnam='undef'"
5116 $ WC "d_getpwent='define'"
5117 $ WC "d_getsbyname='" + d_getsbyname + "'"
5118 $ WC "d_getsbyport='" + d_getsbyport + "'"
5119 $ WC "d_getsent='" + d_getsent + "'"
5120 $ WC "d_getservprotos='" + d_getservprotos + "'"
5121 $ WC "d_getspnam='undef'"
5122 $ WC "d_gettimeod='" + d_gettimeod + "'"
5123 $ WC "d_gnulibc='undef'"
5124 $ WC "d_grpasswd='undef'"
5125 $ WC "d_hasmntopt='undef'"
5126 $ WC "d_htonl='" + d_htonl + "'"
5127 $ WC "d_index='" + d_index + "'"
5128 $ WC "d_inetaton='undef'"
5129 $ WC "d_int64_t='" + d_int64_t + "'"
5130 $ WC "d_isascii='define'"
5131 $ WC "d_isfinite='undef'"
5132 $ WC "d_isinf='undef'"
5133 $ WC "d_isnan='" + d_isnan + "'"
5134 $ WC "d_isnanl='" + d_isnanl + "'"
5135 $ WC "d_killpg='undef'"
5136 $ WC "d_lchown='undef'"
5137 $ WC "d_ldbl_dig='define'"
5138 $ WC "d_link='undef'"
5139 $ WC "d_llseek='undef'"
5140 $ WC "d_locconv='" + d_locconv + "'"
5141 $ WC "d_lockf='undef'"
5142 $ WC "d_longdbl='" + d_longdbl + "'"
5143 $ WC "d_longlong='" + d_longlong + "'"
5144 $ WC "d_lseekproto='define'"
5145 $ WC "d_lstat='undef'"
5146 $ WC "d_madvise='undef'"
5147 $ WC "d_mblen='" + d_mblen + "'"
5148 $ WC "d_mbstowcs='" + d_mbstowcs + "'"
5149 $ WC "d_mbtowc='" + d_mbtowc + "'"
5150 $ WC "d_memchr='" + d_memchr + "'"
5151 $ WC "d_memcmp='define'"
5152 $ WC "d_memcpy='define'"
5153 $ WC "d_memmove='define'"
5154 $ WC "d_memset='define'"
5155 $ WC "d_mkdir='define'"
5156 $ WC "d_mkdtemp='" + d_mkdtemp + "'"
5157 $ WC "d_mkfifo='undef'"
5158 $ WC "d_mknod='undef'"
5159 $ WC "d_mkstemp='" + d_mkstemp + "'"
5160 $ WC "d_mkstemps='" + d_mkstemps + "'"
5161 $ WC "d_mktime='" + d_mktime + "'"
5162 $ WC "d_mmap='" + d_mmap + "'"
5163 $ WC "d_modfl='" + d_modfl + "'"
5164 $ WC "d_modfl_pow32_bug='undef'"
5165 $ WC "d_mprotect='" + d_mprotect + "'"
5166 $ WC "d_msg='undef'"
5167 $ WC "d_msg_ctrunc='undef'"
5168 $ WC "d_msg_dontroute='undef'"
5169 $ WC "d_msg_oob='undef'"
5170 $ WC "d_msg_peek='undef'"
5171 $ WC "d_msg_proxy='undef'"
5172 $ WC "d_msghdr_s='undef'"
5173 $ WC "d_msync='" + d_msync + "'"
5174 $ WC "d_munmap='" + d_munmap + "'"
5175 $ WC "d_mymalloc='" + d_mymalloc + "'"
5176 $ WC "d_nice='define'"
5177 $ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
5178 $ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
5179 $ WC "d_nv_preserves_uv_bits='" + d_nv_preserves_uv_bits + "'"
5180 $ WC "d_off64_t='" + d_off64_t + "'"
5181 $ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
5182 $ WC "d_oldarchlib='define'"
5183 $ WC "d_oldpthreads='" + d_oldpthreads + "'"
5184 $ WC "d_open3='define'"
5185 $ WC "d_pathconf='" + d_pathconf + "'"
5186 $ WC "d_pause='define'"
5187 $ WC "d_perl_otherlibdirs='undef'"
5188 $ WC "d_phostname='" + d_phostname + "'"
5189 $ WC "d_pipe='define'"
5190 $ WC "d_poll='undef'"
5191 $ WC "d_pthread_atfork='undef'"
5192 $ WC "d_pthread_yield='" + d_pthread_yield + "'"
5193 $ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
5194 $ WC "d_pwage='undef'"
5195 $ WC "d_pwchange='undef'"
5196 $ WC "d_pwclass='undef'"
5197 $ WC "d_pwcomment='define'"
5198 $ WC "d_pwexpire='undef'"
5199 $ WC "d_pwgecos='define'"
5200 $ WC "d_pwpasswd='define'"
5201 $ WC "d_pwquota='undef'"
5202 $ WC "d_qgcvt='undef'"
5203 $ WC "d_quad='" + d_quad + "'"
5204 $ WC "d_readdir='define'"
5205 $ WC "d_readlink='undef'"
5206 $ WC "d_readv='undef'"
5207 $ WC "d_realpath='undef'"
5208 $ WC "d_recvmsg='undef'"
5209 $ WC "d_rename='define'"
5210 $ WC "d_rewinddir='define'"
5211 $ WC "d_rmdir='define'"
5212 $ WC "d_safebcpy='undef'"
5213 $ WC "d_safemcpy='define'"
5214 $ WC "d_sanemcmp='define'"
5215 $ WC "d_sbrkproto='define'"
5216 $ WC "d_sched_yield='" + d_sched_yield + "'"
5217 $ WC "d_scm_rights='undef'"
5218 $ WC "d_seekdir='define'"
5219 $ WC "d_select='" + d_select + "'"
5220 $ WC "d_sem='undef'"
5221 $ WC "d_semctl_semid_ds='undef'"
5222 $ WC "d_semctl_semun='undef'"
5223 $ WC "d_sendmsg='undef'"
5224 $ WC "d_setegid='undef'"
5225 $ WC "d_setenv='" + d_setenv + "'"
5226 $ WC "d_seteuid='undef'"
5227 $ WC "d_setgrent='undef'"
5228 $ WC "d_setgrps='undef'"
5229 $ WC "d_sethent='" + d_sethent + "'"
5230 $ WC "d_setitimer='" + d_setitimer + "'"
5231 $ WC "d_setlinebuf='undef'"
5232 $ WC "d_setlocale='" + d_setlocale + "'"
5233 $ WC "d_setnent='" + d_setnent + "'"
5234 $ WC "d_setpent='" + d_setpent + "'"
5235 $ WC "d_setpgid='undef'"
5236 $ WC "d_setpgrp2='undef'"
5237 $ WC "d_setpgrp='undef'"
5238 $ WC "d_setprior='undef'"
5239 $ WC "d_setproctitle='" + d_setproctitle + "'"
5240 $ WC "d_setpwent='define'"
5241 $ WC "d_setregid='undef'"
5242 $ WC "d_setresgid='undef'"
5243 $ WC "d_setresuid='undef'"
5244 $ WC "d_setreuid='undef'"
5245 $ WC "d_setrgid='undef'"
5246 $ WC "d_setruid='undef'"
5247 $ WC "d_setsent='" + d_setsent + "'"
5248 $ WC "d_setsid='undef'"
5249 $ WC "d_setvbuf='" + d_setvbuf + "'"
5250 $ WC "d_sfio='undef'"
5251 $ WC "d_shm='undef'"
5252 $ WC "d_shmatprototype='undef'"
5253 $ WC "d_sigaction='" + d_sigaction + "'"
5254 $ WC "d_sigprocmask='" + d_sigprocmask + "'"
5255 $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
5256 $ WC "d_sockatmark='undef'"
5257 $ WC "d_sockatmarkproto='undef'"
5258 $ WC "d_socket='" + d_socket + "'"
5259 $ WC "d_socklen_t='" + d_socklen_t + "'"
5260 $ WC "d_sockpair='undef'"
5261 $ WC "d_socks5_init='undef'"
5262 $ WC "d_sqrtl='define'"
5263 $ WC "d_sresgproto='undef'"
5264 $ WC "d_sresgproto='undef'"
5265 $ WC "d_sresproto='undef'"
5266 $ WC "d_sresuproto='undef'"
5267 $ WC "d_statblks='undef'"
5268 $ WC "d_statfs_f_flags='undef'"
5269 $ WC "d_statfs_s='undef'"
5270 $ WC "d_statfsflags='undef'"
5271 $ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
5272 $ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
5273 $ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'"
5274 $ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'"
5275 $ WC "d_stdio_stream_array='undef'"
5276 $ WC "d_stdiobase='" + d_stdiobase + "'"
5277 $ WC "d_stdstdio='" + d_stdstdio + "'"
5278 $ WC "d_strchr='define'"
5279 $ WC "d_strcoll='" + d_strcoll + "'"
5280 $ WC "d_strctcpy='define'"
5281 $ WC "d_strerrm='strerror((e),vaxc$errno)'"
5282 $ WC "d_strerror='define'"
5283 $ WC "d_strftime='define'"
5284 $ WC "d_strtod='define'"
5285 $ WC "d_strtol='define'"
5286 $ WC "d_strtold='" + d_strtold + "'"
5287 $ WC "d_strtoll='" + d_strtoll + "'"
5288 $ WC "d_strtoq='define'"
5289 $ WC "d_strtoul='define'"
5290 $ WC "d_strtoull='" + d_strtoull + "'"
5291 $ WC "d_strtouq='" + d_strtouq + "'"
5292 $ WC "d_strxfrm='" + d_strxfrm + "'"
5293 $ WC "d_suidsafe='undef'"
5294 $ WC "d_symlink='undef'"
5295 $ WC "d_syscall='undef'"
5296 $ WC "d_syscallproto='undef'"
5297 $ WC "d_sysconf='" + d_sysconf + "'"
5298 $ WC "d_syserrlst='undef'"
5299 $ WC "d_system='define'"
5300 $ WC "d_tcgetpgrp='undef'"
5301 $ WC "d_tcsetpgrp='undef'"
5302 $ WC "d_telldir='define'"
5303 $ WC "d_telldirproto='define'"
5304 $ WC "d_times='define'"
5305 $ WC "d_truncate='" + d_truncate + "'"
5306 $ WC "d_tzname='" + d_tzname + "'"
5307 $ WC "d_u32align='define'"
5308 $ WC "d_ualarm='" + d_ualarm + "'"
5309 $ WC "d_umask='define'"
5310 $ WC "d_uname='" + d_uname + "'"
5311 $ WC "d_union_semun='undef'"
5312 $ WC "d_unlink_all_versions='undef'"
5313 $ WC "d_unordered='undef'"
5314 $ WC "d_usleep='" + d_usleep + "'"
5315 $ WC "d_usleepproto='" + d_usleep + "'"
5316 $ WC "d_ustat='undef'"
5317 $ WC "d_vendorarch='undef'"
5318 $ WC "d_vendorlib='undef'"
5319 $ WC "d_vfork='define'"
5320 $ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
5321 $ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
5322 $ WC "d_void_closedir='define'"
5323 $ WC "d_volatile='define'"
5324 $ WC "d_vprintf='define'"
5325 $ WC "d_wait4='" + d_wait4 + "'"
5326 $ WC "d_waitpid='define'"
5327 $ WC "d_wcstombs='" + d_wcstombs + "'"
5328 $ WC "d_wctomb='" + d_wctomb + "'"
5329 $ WC "d_writev='undef'"
5330 $ WC "db_hashtype=' '"
5331 $ WC "db_prefixtype=' '"
5332 $ WC "dbgprefix='" + dbgprefix + "'"
5333 $ WC "defvoidused='15'"
5334 $ WC "devtype='" + devtype + "'"
5335 $ WC "direntrytype='struct dirent'"
5336 $ WC "dlext='" + dlext + "'"
5337 $ WC "dlobj='" + dlobj + "'"
5338 $ WC "dlsrc='dl_vms.c'"
5339 $ WC "doublesize='" + doublesize + "'"
5340 $ WC "drand01='" + drand01 + "'"
5342 $! The extensions symbol may be quite long
5344 $ tmp = "dynamic_ext='" + extensions + "'"
5348 $ WC "ebcdic='undef'"
5349 $ WC "embedmymalloc='" + usemymalloc + "'"
5350 $ WC "eunicefix=':'"
5351 $ WC "exe_ext='" + exe_ext + "'"
5353 $! The extensions symbol may be quite long
5355 $ tmp = "extensions='" + extensions + "'"
5358 $ WC "fflushNULL='define'"
5359 $ WC "fflushall='undef'"
5360 $ WC "fpostype='fpos_t'"
5361 $ WC "freetype='void'"
5362 $ WC "full_ar='" + "'"
5363 $ WC "full_csh='" + " '"
5364 $ WC "full_sed='_NLA0:'"
5365 $ WC "gccversion='" + gccversion + "'"
5366 $ WC "gidformat='lu'"
5369 $ WC "gidtype='" + gidtype + "'"
5370 $ WC "groupstype='Gid_t'"
5372 $ WC "hintfile='" + "'"
5373 $ WC "i16size='" + i16size + "'"
5374 $ WC "i16type='" + i16type + "'"
5375 $ WC "i32size='" + i32size + "'"
5376 $ WC "i32type='" + i32type + "'"
5377 $ WC "i64size='" + i64size + "'"
5378 $ WC "i64type='" + i64type + "'"
5379 $ WC "i8size='" + i8size + "'"
5380 $ WC "i8type='" + i8type + "'"
5381 $ WC "i_arpainet='undef'"
5382 $ WC "i_dbm='undef'"
5383 $ WC "i_dirent='" + i_dirent + "'"
5384 $ WC "i_dlfcn='undef'"
5385 $ WC "i_fcntl='" + i_fcntl + "'"
5386 $ WC "i_float='define'"
5388 $ WC "i_fp_class='undef'"
5389 $ WC "i_grp='undef'"
5390 $ WC "i_ieeefp='undef'"
5391 $ WC "i_inttypes='" + i_inttypes + "'"
5392 $ WC "i_langinfo='" + i_langinfo + "'"
5393 $ WC "i_libutil='" + i_libutil + "'"
5394 $ WC "i_limits='define'"
5395 $ WC "i_locale='" + i_locale + "'"
5396 $ WC "i_machcthr='undef'"
5397 $ WC "i_machcthreads='undef'"
5398 $ WC "i_math='define'"
5399 $ WC "i_memory='undef'"
5400 $ WC "i_mntent='undef'"
5401 $ WC "i_ndbm='undef'"
5402 $ WC "i_netdb='" + i_netdb + "'"
5403 $ WC "i_neterrno='define'"
5404 $ WC "i_netinettcp='" + i_netinettcp + "'"
5405 $ WC "i_niin='" + i_niin + "'"
5406 $ WC "i_poll='" + i_poll + "'"
5407 $ WC "i_prot='undef'"
5408 $ WC "i_pthread='define'"
5409 $ WC "i_pwd='undef'"
5410 $ WC "i_rpcsvcdbm='undef'"
5411 $ WC "i_sfio='undef'"
5412 $ WC "i_sgtty='undef'"
5413 $ WC "i_shadow='" + i_shadow + "'"
5414 $ WC "i_socks='" + i_socks + "'"
5415 $ WC "i_stdarg='define'"
5416 $ WC "i_stddef='define'"
5417 $ WC "i_stdlib='define'"
5418 $ WC "i_string='define'"
5419 $ WC "i_sunmath='undef'"
5420 $ WC "i_sysaccess='" + i_sysaccess + "'"
5421 $ WC "i_sysdir='undef'"
5422 $ WC "i_sysfile='" + i_sysfile + "'"
5423 $ WC "i_sysioctl='undef'"
5424 $ WC "i_syslog='" + i_syslog + "'"
5425 $ WC "i_sysmman='undef'"
5426 $ WC "i_sysmode='" + i_sysmode + "'"
5427 $ WC "i_sysmount='undef'"
5428 $ WC "i_sysndir='undef'"
5429 $ WC "i_sysparam='undef'"
5430 $ WC "i_sysresrc='undef'"
5431 $ WC "i_syssecrt='" + i_syssecrt + "'"
5432 $ WC "i_sysselct='undef'"
5433 $ WC "i_syssockio='undef'"
5434 $ WC "i_sysstat='define'"
5435 $ WC "i_sysstatfs='undef'"
5436 $ WC "i_sysstatvfs='undef'"
5437 $ WC "i_systime='undef'"
5438 $ WC "i_systimek='undef'"
5439 $ WC "i_systimes='undef'"
5440 $ WC "i_systypes='define'"
5441 $ WC "i_sysuio='" + i_sysuio + "'"
5442 $ WC "i_sysun='undef'"
5443 $ WC "i_sysutsname='" + i_sysutsname + "'"
5444 $ WC "i_sysvfs='undef'"
5445 $ WC "i_syswait='undef'"
5446 $ WC "i_termio='undef'"
5447 $ WC "i_termios='undef'"
5448 $ WC "i_time='define'"
5449 $ WC "i_unistd='" + i_unistd + "'"
5450 $ WC "i_ustat='undef'"
5451 $ WC "i_utime='undef'"
5452 $ WC "i_values='undef'"
5453 $ WC "i_varargs='undef'"
5454 $ WC "i_vfork='undef'"
5455 $ WC "inc_version_list='0'"
5456 $ WC "inc_version_list_init='0'"
5457 $ WC "installarchlib='" + installarchlib + "'"
5458 $ WC "installbin='" + installbin + "'"
5459 $ WC "installman1dir='" + installman1dir + "'"
5460 $ WC "installman3dir='" + installman3dir + "'"
5461 $ WC "installprivlib='" + installprivlib + "'"
5462 $ WC "installscript='" + installscript + "'"
5463 $ WC "installsitearch='" + installsitearch + "'"
5464 $ WC "installsitelib='" + installsitelib + "'"
5465 $ WC "installusrbinperl='undef'"
5466 $ WC "intsize='" + intsize + "'"
5467 $ WC "ivdformat='" + ivdformat + "'"
5468 $ WC "ivsize='" + ivsize + "'"
5469 $ WC "ivtype='" + ivtype + "'"
5471 $! The known_extensions symbol may be quite long
5473 $ tmp = "known_extensions='" + known_extensions + "'"
5476 $ WC "ld='" + ld + "'"
5477 $ WC "lddlflags='/Share'"
5478 $ WC "ldflags='" + ldflags + "'"
5479 $ WC "lib_ext='" + lib_ext + "'"
5480 $ WC "libc='" + libc + "'"
5481 $ WC "libpth='/sys$share /sys$library'"
5482 $ WC "libs='" + libs + "'"
5483 $ WC "longdblsize='" + longdblsize + "'"
5484 $ WC "longlongsize='" + longlongsize + "'"
5485 $ WC "longsize='" + longsize + "'"
5486 $ WC "lseeksize='4'"
5487 $ WC "lseektype='int'"
5489 $ WC "make='" + make + "'"
5490 $ WC "malloctype='void *'"
5491 $ WC "man1ext='rno'"
5492 $ WC "man3ext='rno'"
5493 $ WC "mmaptype='void *'"
5494 $ WC "modetype='unsigned int'"
5495 $ WC "multiarch='undef'"
5496 $ WC "mydomain='" + mydomain + "'"
5497 $ WC "myhostname='" + myhostname + "'"
5498 $ WC "myuname='" + myuname + "'"
5499 $ WC "need_va_copy='undef'"
5500 $ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
5501 $ WC "netdb_host_type='" + netdb_host_type + "'"
5502 $ WC "netdb_name_type='" + netdb_name_type + "'"
5503 $ WC "netdb_net_type='" + netdb_net_type + "'"
5504 $ WC "nveformat='" + nveformat + "'"
5505 $ WC "nvfformat='" + nvfformat + "'"
5506 $ WC "nvgformat='" + nvgformat + "'"
5507 $ WC "nvsize='" + nvsize + "'"
5508 $ WC "nvtype='" + nvtype + "'"
5509 $ WC "o_nonblock=' '"
5510 $ WC "obj_ext='" + obj_ext + "'"
5511 $ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
5512 $ WC "oldarchlib='" + oldarchlib + "'"
5513 $ WC "oldarchlibexp='" + oldarchlibexp + "'"
5514 $ WC "optimize='" + optimize + "'"
5515 $ WC "osname='" + osname + "'"
5516 $ WC "osvers='" + osvers + "'"
5517 $ WC "otherlibdirs='" + "'"
5518 $ WC "package='" + package + "'"
5519 $ WC "pager='" + pager + "'"
5520 $ WC "patchlevel='" + patchlevel + "'"
5522 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
5523 $ WC "perladmin='" + perladmin + "'"
5524 $ WC "perllibs='" + perllibs + "'"
5525 $ WC "perl_symbol='" + perl_symbol + "'" ! VMS specific
5526 $ WC "perl_verb='" + perl_verb + "'" ! VMS specific
5527 $ WC "pgflquota='" + pgflquota + "'"
5528 $ WC "pidtype='" + pidtype + "'"
5529 $ WC "pm_apiversion='" + version + "'"
5530 $! WC "prefix='" + vms_prefix + "'"
5531 $ WC "prefix='" + prefix + "'"
5532 $ WC "privlib='" + privlib + "'"
5533 $ WC "privlibexp='" + privlibexp + "'"
5534 $ WC "prototype='define'"
5535 $ WC "ptrsize='" + ptrsize + "'"
5536 $ WC "quadkind='" + quadkind + "'"
5537 $ WC "quadtype='" + quadtype + "'"
5538 $ WC "randbits='31'"
5539 $ WC "randseedtype='" + randseedtype + "'"
5540 $ WC "ranlib='" + "'"
5541 $ WC "rd_nodata=' '"
5542 $ WC "revision='" + revision + "'"
5543 $ WC "sPRId64='" + sPRId64 + "'"
5544 $ WC "sPRIEldbl='" + sPRIEUldbl + "'"
5545 $ WC "sPRIFldbl='" + sPRIFUldbl + "'"
5546 $ WC "sPRIGldbl='" + sPRIGUldbl + "'"
5547 $ WC "sPRIX64='" + sPRIXU64 + "'"
5548 $ WC "sPRIeldbl='" + sPRIeldbl + "'"
5549 $ WC "sPRIfldbl='" + sPRIfldbl + "'"
5550 $ WC "sPRIgldbl='" + sPRIgldbl + "'"
5551 $! WC "sPRIi64='" + sPRIi64 + "'"
5552 $ WC "sPRIo64='" + sPRIo64 + "'"
5553 $ WC "sPRIu64='" + sPRIu64 + "'"
5554 $ WC "sPRIx64='" + sPRIx64 + "'"
5555 $ WC "sSCNfldbl='" + sSCNfldbl + "'"
5556 $ WC "sched_yield='" + sched_yield + "'"
5557 $ WC "scriptdir='" + scriptdir + "'"
5558 $ WC "seedfunc='" + seedfunc + "'"
5559 $ WC "selectminbits='32'"
5560 $ WC "selecttype='" + selecttype + "'"
5562 $ WC "shmattype='" + " '"
5563 $ WC "shortsize='" + shortsize + "'"
5564 $ WC "shrplib='define'"
5565 $ WC "sig_name='" + sig_name + "'"
5566 $ tmp = "sig_name_init='" + sig_name_init + "'"
5569 $ WC "sig_num='" + sig_num + "'"
5570 $ WC "sig_num_init='" + sig_num_init + "'"
5571 $ WC "sig_size='" + sig_size + "'"
5572 $ WC "signal_t='" + signal_t + "'"
5573 $ WC "sitearch='" + sitearch + "'"
5574 $ WC "sitearchexp='" + sitearchexp + "'"
5575 $ WC "sitelib='" + sitelib + "'"
5576 $ WC "sitelib_stem='" + sitelib_stem + "'"
5577 $ WC "sitelibexp='" + sitelibexp + "'"
5578 $ WC "sizesize='" + sizesize + "'"
5579 $ WC "sizetype='size_t'"
5580 $ WC "so='" + so + "'"
5581 $ WC "socksizetype='" + socksizetype + "'"
5582 $ WC "spitshell='write sys$output '"
5583 $ WC "src='" + src + "'"
5584 $ WC "ssizetype='int'"
5585 $ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
5586 $ WC "static_ext='" + static_ext + "'"
5587 $ WC "stdchar='" + stdchar + "'"
5588 $ WC "stdio_base='((*fp)->_base)'"
5589 $ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
5590 $ WC "stdio_cnt='((*fp)->_cnt)'"
5591 $ WC "stdio_ptr='((*fp)->_ptr)'"
5592 $ WC "stdio_stream_array=' " + "'"
5593 $ WC "subversion='" + subversion + "'"
5594 $ WC "timetype='" + timetype + "'"
5595 $ WC "u16size='" + u16size + "'"
5596 $ WC "u16type='" + u16type + "'"
5597 $ WC "u32size='" + u32size + "'"
5598 $ WC "u32type='" + u32type + "'"
5599 $ WC "u64size='" + u64size + "'"
5600 $ WC "u64type='" + u64type + "'"
5601 $ WC "u8size='" + u8size + "'"
5602 $ WC "u8type='" + u8type + "'"
5603 $ WC "uidformat='lu'"
5606 $ WC "uidtype='" + uidtype + "'"
5607 $ WC "uquadtype='" + uquadtype + "'"
5608 $ WC "use5005threads='" + use5005threads + "'"
5609 $ WC "use64bitall='" + use64bitall + "'"
5610 $ WC "use64bitint='" + use64bitint + "'"
5611 $ WC "usecasesensitive='" + be_case_sensitive + "'" ! VMS-specific
5612 $ WC "usedebugging_perl='"+use_debugging_perl+"'"
5613 $ WC "usedefaulttypes='" + usedefaulttypes + "'" ! VMS-specific
5614 $ WC "usecrosscompile='undef'"
5615 $ WC "usedl='" + usedl + "'"
5616 $ WC "useieee='" + useieee + "'" ! VMS-specific
5617 $ WC "useithreads='" + useithreads + "'"
5618 $ WC "uselargefiles='" + uselargefiles + "'"
5619 $ WC "uselongdouble='" + uselongdouble + "'"
5620 $ WC "usemorebits='" + usemorebits + "'"
5621 $ WC "usemultiplicity='" + usemultiplicity + "'"
5622 $ WC "usemymalloc='" + usemymalloc + "'"
5623 $ WC "useperlio='" + useperlio + "'"
5624 $ WC "useposix='false'"
5625 $ WC "usereentrant='undef'"
5626 $ WC "usesecurelog='" + usesecurelog + "'" ! VMS-specific
5627 $ WC "usesocks='undef'"
5628 $ WC "usethreads='" + usethreads + "'"
5629 $ WC "usevfork='true'"
5630 $ WC "usevmsdebug='" + usevmsdebug + "'" ! VMS-specific
5631 $ WC "uvoformat='" + uvoformat + "'"
5632 $ WC "uvsize='" + uvsize + "'"
5633 $ WC "uvtype='" + uvtype + "'"
5634 $ WC "uvuformat='" + uvuformat + "'"
5635 $ WC "uvxformat='" + uvxformat + "'"
5636 $ WC "uvXUformat='" + uvXUformat + "'"
5637 $ WC "vendorarchexp='" + "'"
5638 $ WC "vendorlib_stem='" + "'"
5639 $ WC "vendorlibexp='" + "'"
5640 $ WC "version='" + version + "'"
5641 $ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific
5642 $ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific
5643 $ WC "vms_ver='" + vms_ver + "'" ! VMS specific
5644 $ WC "voidflags='15'"
5645 $ WC "xs_apiversion='" + version + "'"
5646 $ WC "PERL_CONFIG_SH='true'"
5648 $! ##END WRITE NEW CONSTANTS HERE##
5652 $! Okay, we've gotten here. Build munchconfig.exe
5653 $ COPY/NOLOG [-.vms]munchconfig.c []
5654 $ COPY/NOLOG [-.vms]'Makefile_SH' []
5655 $ 'Perl_CC' munchconfig.c
5658 $ OPEN/WRITE CONFIG []munchconfig.opt
5659 $ IF ccname .EQS. "GCC"
5661 $ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library"
5663 $ WRITE CONFIG "Sys$Share:VAXCRTL/Share"
5665 $ 'ld' munchconfig.obj,munchconfig.opt/opt
5666 $ DELETE/NOLOG/NOCONFIRM munchconfig.opt;
5668 $ 'ld' munchconfig.obj
5670 $ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj;
5671 $ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
5672 $ IF ccname .EQS. "CXX"
5674 $ CALL Cxx_demangler_cleanup
5677 $ IF alldone .EQS. ""
5682 If you'd like to make any changes to the config.sh file before I begin
5683 to configure things, answer yes to the following question.
5687 $ rp="Do you wish to edit ''basename_config_sh'? [''bool_dflt'] "
5692 $ echo4 "Be sure to type LOGOUT after you have edited the file,"
5693 $ echo4 "then this procedure will resume."
5695 $ default = F$ENVIRONMENT("DEFAULT")
5696 $ DIRECTORY 'config_sh'
5699 $ SET DEFAULT 'default'
5704 $ echo4 "Adding ''osname' specific preprocessor commands."
5706 $ ! we need an fdl file
5707 $ CREATE [-]CONFIG.FDL
5712 $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
5713 $ ! First spit out the header info with the local defines (to get
5714 $ ! around the 255 character command line limit)
5715 $ OPEN/APPEND CONFIG [-]config.local
5716 $ IF use_debugging_perl THEN WC "#define DEBUGGING"
5717 $ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
5718 $ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
5719 $ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
5720 $ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
5721 $ IF ccname .EQS. "GCC" THEN WC "#define GNUC_ATTRIBUTE_CHECK"
5722 $ IF (Has_Dec_C_Sockets)
5724 $ WC "#define VMS_DO_SOCKETS"
5725 $ WC "#define DECCRTL_SOCKETS"
5727 $ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS"
5729 $! This is VMS-specific for now
5730 $ WC "#''d_setenv' HAS_SETENV"
5731 $ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
5732 $ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
5733 $ IF use64bitint .OR. use64bitint .EQS. "define"
5735 $ WC "#define USE_64_BIT_INT"
5736 $ WC "#define USE_LONG_DOUBLE"
5738 $ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
5739 WC "#define USE_64_BIT_ALL"
5740 $ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
5741 $ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
5742 $ WC "#define HAS_ENVGETENV"
5743 $ WC "#define PERL_EXTERNAL_GLOB"
5744 $ IF archname .EQS. "VMS_VAX" .AND. -
5745 ccname .EQS. "DEC" .AND. -
5746 ccversion .LE. 50390006
5748 $! Alas this does not help to build Fcntl
5749 $! WC "#define PERL_IGNORE_FPUSIG SIGFPE"
5753 $ echo4 "Doing variable substitutions on .SH files..."
5754 $ echo4 "Extracting config.h (with variable substitutions)"
5756 $! Now build the normal config.h
5757 $ DEFINE/USER_MODE sys$output [-]config.main
5758 $ mcr []munchconfig 'config_sh' [-]config_h.sh
5759 $ ! Concatenate them together
5760 $ copy [-]config.local,[-]config.main [-]config.h
5762 $ DELETE/NOLOG [-]CONFIG.MAIN;*
5763 $ DELETE/NOLOG [-]CONFIG.LOCAL;*
5764 $ DELETE/NOLOG [-]CONFIG.FDL;*
5766 $ IF ccname .EQS. "DEC"
5768 $ DECC_REPLACE = "DECC=decc=1"
5770 $ DECC_REPLACE = "DECC="
5772 $ IF ccname .EQS. "CXX"
5774 $ DECCXX_REPLACE = "DECCXX=DECCXX=1"
5776 $ DECCXX_REPLACE = "DECCXX="
5778 $ IF ccname .EQS. "GCC"
5780 $ GNUC_REPLACE = "GNUC=gnuc=1"
5782 $ GNUC_REPLACE = "GNUC="
5784 $ IF Has_Dec_C_Sockets
5786 $ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
5790 $ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
5792 $ SOCKET_REPLACE = "SOCKET="
5797 $ IF (vms_ver .LES. "6.2")
5799 $ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
5801 $ THREAD_REPLACE = "THREAD=THREADED=1"
5804 $ THREAD_REPLACE = "THREAD="
5808 $ MALLOC_REPLACE = "MALLOC=MALLOC=1"
5810 $ MALLOC_REPLACE = "MALLOC="
5812 $ echo4 "Extracting ''defmakefile' (with variable substitutions)"
5813 $ DEFINE/USER_MODE sys$output 'UUmakefile'
5814 $ mcr []munchconfig 'config_sh' 'Makefile_SH' "''DECC_REPLACE'" -
5815 "''DECCXX_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" -
5816 "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" -
5817 "''Thread_Live_Dangerously'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'"
5818 $! Clean up after ourselves
5819 $ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
5821 $ echo4 "Extracting make_ext.com (without variable substitutions)"
5822 $ Create Sys$Disk:[-]make_ext.com
5823 $ Deck/Dollar="$EndOfTpl$"
5825 $! NOTE: This file is extracted as part of the VMS configuration process.
5826 $! Any changes made to it directly will be lost. If you need to make any
5827 $! changes, please edit the template in Configure.Com instead.
5828 $ def = F$Environment("Default")
5829 $! p1 - how to invoke miniperl (passed in from descrip.mms)
5830 $ p1 = F$Edit(p1,"Upcase,Compress,Trim")
5831 $ If F$Locate("MCR ",p1).eq.0 Then p1 = F$Extract(3,255,p1)
5832 $ miniperl = "$" + F$Search(F$Parse(p1,".Exe"))
5833 $! p2 - how to invoke local make utility (passed in from descrip.mms)
5835 $ if f$type('p2') .nes. "" then makeutil = 'p2'
5836 $! p3 - make target (passed in from descrip.mms)
5837 $ targ = F$Edit(p3,"Lowercase")
5840 $ open/read CONFIG config.sh
5842 $ read/end=end_ext_loop CONFIG line
5843 $ if (f$extract(0,12,line) .NES. "extensions='")
5844 $ then goto find_ext_loop
5845 $ else extensions = f$extract(12,f$length(line),line) - "'"
5849 $ extensions = f$edit(extensions,"TRIM,COMPRESS")
5852 $ ext = f$element(i," ",extensions)
5853 $ If ext .eqs. " " .or. ext .eqs. "" Then Goto done
5854 $ Define/User_mode Perl_Env_Tables CLISYM_LOCAL
5857 ($extdir = $ENV{'ext'}) =~ s/::/./g;
5859 if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
5860 else { $extdir = ".ext.$extdir"; }
5861 ($ENV{'extdir'} = "[$extdir]");
5862 ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
5864 $ Set Default &extdir
5866 $ If F$Locate("clean",targ) .eqs. F$Length(targ)
5868 $ Write Sys$Output ""
5869 $ Write Sys$Output " Making ''ext' (dynamic)"
5870 $ On Error Then Goto done
5871 $ If F$Search("Descrip.MMS") .eqs. ""
5875 $ If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. -
5876 F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1
5879 $ Write Sys$Output "''targ'ing ''ext' . . ."
5880 $ On Error Then Continue
5883 miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]"
5895 $! Note that the /key qualifier to search, as in:
5896 $! search README.* "=head"/key=(position=1)/window=0/output=extra.pods
5897 $! is not supported on VMS V5.5-2, hence not used in extra_pods.com.
5899 $ echo4 "Extracting extra_pods.com (without variable substitutions)"
5900 $ Create Sys$Disk:[-]extra_pods.com
5901 $ Deck/Dollar="$EOExtra_Pods$"
5903 $! NOTE: This file is extracted as part of the VMS configuration process.
5904 $! Any changes made to it directly will be lost. If you need to make any
5905 $! changes, please edit the template in Configure.Com instead.
5906 $! Use FORCE if you've just podified a README.* file on VMS.
5907 $ if f$search("extra.pods") .eqs. "" .or. P1 .eqs. "FORCE" then -
5908 search README.* "=head"/window=0/output=extra.pods
5909 $ open/read/error=extra_close EXTRA extra.pods
5911 $ read/error=extra_close/END_OF_FILE=extra_close EXTRA file
5912 $ file_type = f$parse(file,,,"TYPE",) - "."
5913 $ if file_type .nes. "VMS" .and. file_type .nes. "vms"
5915 $ pod_file = "[.pod]perl''file_type'.pod"
5916 $ file = file - "''f$parse(file,,,"VERSION",)'"
5917 $ if p1 .eqs. "CLEAN"
5918 $ then if f$search(pod_file) .nes. "" then delete/log 'pod_file';*
5921 $ if f$search(pod_file) .eqs. ""
5922 $ then do_copy := true
5924 $ file_rdt = f$cvtime(f$file_attributes(file,"RDT"))
5925 $ pod_file_rdt = f$cvtime(f$file_attributes(pod_file,"RDT"))
5926 $ if file_rdt .GTS. pod_file_rdt then do_copy := true
5928 $ if do_copy then copy/log/noconfirm 'file' 'pod_file'
5934 $ if p1 .eqs. "CLEAN" .and. f$search("extra.pods;-1") .nes. "" then -
5935 purge/nolog extra.pods
5939 $! Warn of dangerous symbols or logical names
5941 $Bad_environment: SUBROUTINE
5943 $ IF p2 .eqs. "SYMBOL"
5945 $ IF f$type('p1') .nes. "" THEN Bad_env := SYMBOL
5947 $ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
5949 $ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
5951 $ IF f$search("config.msg") .nes. ""
5953 $ OPEN/APPEND CONFIG config.msg
5955 $ OPEN/WRITE CONFIG config.msg
5957 $ IF Bad_env .eqs. "SYMBOL"
5960 $ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
5961 $ WRITE CONFIG " delete before building ''package' via:"
5962 $ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
5963 $ IF f$locate("""",&p1) .ge. f$length(&p1)
5965 $ WRITE CONFIG " after building, testing, and installing ''package'"
5966 $ WRITE CONFIG " restore the symbol with:"
5967 $ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
5970 $ IF Bad_env .eqs. "LOGICAL"
5973 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
5974 $ WRITE CONFIG " deassign before building ''package'"
5980 $ ENDSUBROUTINE ! Bad_environment
5982 $ echo4 "Checking for dangerous pre-existing global symbols and logical names."
5983 $ CALL Bad_environment "TMP"
5984 $ CALL Bad_environment "LIB"
5985 $ CALL Bad_environment "T"
5986 $ CALL Bad_environment "FOO"
5987 $ CALL Bad_environment "EXT"
5988 $ CALL Bad_environment "SOME_LOGICAL_NAME_NOT_LIKELY"
5989 $ CALL Bad_environment "DOWN_LOGICAL_NAME_NOT_LIKELY"
5990 $ CALL Bad_environment "TEST" "SYMBOL"
5991 $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
5993 $! %Config-I-VMS, write perl_setup.com here
5995 $ IF (.NOT.perl_symbol)
5997 $ file_2_find = "[-]''packageup'.cld"
5999 $ echo4 "The perl.cld file is now being written..."
6000 $ OPEN/WRITE CONFIG 'file_2_find'
6002 $ IF (sharedperl .AND. archname .EQS. "VMS_AXP") THEN ext := .AXE
6003 $ IF (use_vmsdebug_perl)
6005 $ WRITE CONFIG "define verb dbgperl"
6006 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
6007 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
6009 $ WRITE CONFIG "define verb perl"
6010 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
6011 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
6013 $ WRITE CONFIG "define verb perl"
6014 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
6015 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
6018 $ ENDIF ! (.NOT.perl_symbol)
6020 $ echo4 "The perl_setup.com file is now being written..."
6021 $ file_2_find = "[-]perl_setup.com"
6022 $ OPEN/WRITE CONFIG 'file_2_find'
6024 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
6025 $ IF cf_email.NES.perladmin
6027 $ WRITE CONFIG "$! perl configured by ''cf_email'"
6029 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
6032 $ prefix = prefix - "000000."
6033 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
6034 prefix = prefix - "]" + ".]"
6035 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'"
6036 $ WRITE CONFIG "$ ext = "".exe"""
6039 $ write config "$ if f$getsyi(""HW_MODEL"") .ge. 1024 then ext = "".AXE"""
6043 $ IF (use_vmsdebug_perl)
6045 $ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgPerl'ext'"
6046 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgPerl'ext'"
6047 $ WRITE CONFIG "$ define dbgPerlShr ''vms_prefix':[000000]dbgPerlShr'ext'"
6049 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
6050 $ WRITE CONFIG "$ define PerlShr ''vms_prefix':[000000]PerlShr'ext'"
6052 $ ELSE ! .NOT.perl_symbol
6053 $ IF (use_vmsdebug_perl)
6055 $ WRITE CONFIG "$ define dbgPerlShr ''vms_prefix':[000000]dbgPerlShr'ext'"
6057 $ WRITE CONFIG "$ define PerlShr ''vms_prefix':[000000]PerlShr'ext'"
6059 $ IF perl_verb .EQS. "PROCESS"
6061 $ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
6063 $ ENDIF ! perl_symbol
6064 $ WRITE CONFIG "$ define/nolog pod2text ''vms_prefix':[lib.pod]pod2text.com"
6065 $ WRITE CONFIG "$ define/nolog pod2html ''vms_prefix':[lib.pod]pod2html.com"
6066 $ WRITE CONFIG "$ define/nolog pod2man ''vms_prefix':[lib.pod]pod2man.com"
6070 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
6071 $ ELSE !leave in but commented out (in case setting was from perl :-)
6072 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
6075 $ WRITE CONFIG "$! Symbols for commonly used programs:"
6079 $ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' ''vms_prefix':[lib.pod]Perldoc.com -t"""
6080 $ WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text"""
6081 $ WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html"""
6082 $ WRITE CONFIG "$ pod2latex == ""'"+"'Perl' ''vms_prefix':[lib.pod]pod2latex.com"""
6083 $ WRITE CONFIG "$!pod2man == ""'"+"'Perl' pod2man"""
6084 $ WRITE CONFIG "$!Perlbug == ""'"+"'Perl' ''vms_prefix':[lib]Perlbug.com"""
6085 $ WRITE CONFIG "$ c2ph == ""'"+"'Perl' ''vms_prefix':[utils]c2ph.com"""
6086 $ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
6088 $ WRITE CONFIG "$ dprofpp == ""'"+"'Perl' ''vms_prefix':[utils]dprofpp.com"""
6090 $ WRITE CONFIG "$ h2ph == ""'"+"'Perl' ''vms_prefix':[utils]h2ph.com"""
6091 $ WRITE CONFIG "$ h2xs == ""'"+"'Perl' ''vms_prefix':[utils]h2xs.com"""
6092 $ WRITE CONFIG "$!perlcc == ""'"+"'Perl' ''vms_prefix':[utils]perlcc.com"""
6093 $ WRITE CONFIG "$ perlivp == ""'"+"'Perl' ''vms_prefix':[utils]perlivp.com"""
6094 $ WRITE CONFIG "$ splain == ""'"+"'Perl' ''vms_prefix':[utils]splain.com"""
6096 $ WRITE CONFIG "$ Perldoc == ""Perl ''vms_prefix':[lib.pod]Perldoc.com -t"""
6097 $ WRITE CONFIG "$ pod2text == ""Perl pod2text"""
6098 $ WRITE CONFIG "$ pod2html == ""Perl pod2html"""
6099 $ WRITE CONFIG "$ pod2latex == ""Perl ''vms_prefix':[lib.pod]pod2latex.com"""
6100 $ WRITE CONFIG "$!pod2man == ""Perl pod2man"""
6101 $ WRITE CONFIG "$!Perlbug == ""Perl ''vms_prefix':[lib]Perlbug.com"""
6102 $ WRITE CONFIG "$ c2ph == ""Perl ''vms_prefix':[utils]c2ph.com"""
6103 $ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
6105 $ WRITE CONFIG "$ dprofpp == ""Perl ''vms_prefix':[utils]dprofpp.com"""
6107 $ WRITE CONFIG "$ h2ph == ""Perl ''vms_prefix':[utils]h2ph.com"""
6108 $ WRITE CONFIG "$ h2xs == ""Perl ''vms_prefix':[utils]h2xs.com"""
6109 $ WRITE CONFIG "$!perlcc == ""Perl ''vms_prefix':[utils]perlcc.com"""
6110 $ WRITE CONFIG "$ perlivp == ""Perl ''vms_prefix':[utils]perlivp.com"""
6111 $ WRITE CONFIG "$ splain == ""Perl ''vms_prefix':[utils]splain.com"""
6116 $ echo "The file can be found at:"
6117 $ echo4 " ''F$SEARCH(file_2_find)'"
6118 $ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
6119 $ echo "when you are satisfied with a successful compilation,"
6120 $ echo "testing, and installation of your perl."
6122 $ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
6124 $ file_2_find = "[-]''packageup'_install.com"
6125 $ OPEN/WRITE CONFIG 'file_2_find'
6126 $ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
6127 $ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
6128 $ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
6131 $ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
6132 $ echo4 " @ ''F$SEARCH(file_2_find)'"
6133 $ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
6137 $!figure out where we "are" by parsing 'vms_default_directory_name'
6139 $ set_def_command = ""
6140 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
6141 $ tmp = vms_default_directory_name - dflt - "]"
6143 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
6145 $ tmp1 = F$ELEMENT(i,".",tmp)
6146 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
6148 $ THEN set_def_command = "set default [-"
6149 $ ELSE set_def_command = set_def_command + "-"
6153 $Beyond_set_def_loop:
6154 $ IF set_def_command.NES.""
6156 $ set_def_command = set_def_command - "-" + "]"
6158 $ echo4 "In order to build ''package' you must now issue the commands:"
6160 $ echo4 " ''set_def_command'"
6163 $ echo4 "In order to build ''package' you must now issue the command:"
6166 $ echo4 " ''make'''makefile'", macros
6169 $ IF ( F$SEARCH("config.msg").NES."" )
6171 $ echo "Hmm. I also noted the following information while running:"
6174 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
6175 $ DELETE/NOLOG/NOCONFIRM config.msg;
6181 $ DEASSIGN SYS$OUTPUT
6182 $! DEASSIGN SYS$ERROR
6184 $ IF F$GETJPI("","FILCNT").GT.vms_filcnt THEN CLOSE CONFIG
6185 $ IF F$GETJPI("","FILCNT").GT.vms_filcnt
6186 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
6188 $ dflt = F$ENVIRONMENT("DEFAULT")
6189 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
6191 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
6193 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
6194 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
6196 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
6198 $!: End of Configure