1 $! OpenVMS configuration procedure for Perl -- do not attempt to run under DOS
2 $ sav_ver = 'F$VERIFY(0)'
5 $! For example, if you unpacked perl into: [USER.PERL-5n...] then you will
6 $! want to cd into the tree and execute Configure:
8 $! $ SET DEFAULT [USER.PERL5_xxx]
13 $! $ SET DEFAULT [USER.PERL5_xxx]
14 $! $ @Configure "-des"
16 $! That's it. If you get into a bind trying to build perl on VMS then
17 $! definitely read through the README.VMS file.
18 $! Beyond that send email to vmsperl@perl.org
20 $! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 $! send suggestions to:
23 $! Dan Sugalski <dan@sidhe.org>
26 $! Adapted and converted from Larry Wall & Andy Dougherty's
27 $! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer
28 $! (a Bourne sh[ell] script for configuring the installation of perl
29 $! on non-VMS systems) in the perl5.002|3 epoch (spring/summer 1996)
30 $! with much valuable help from Charles Bailey &
31 $! the whole VMSPerl crew.
32 $! Extended and messed about with by Dan Sugalski
34 $! VMS-isms we will need:
35 $ echo = "write sys$output "
37 $ delete := delete ! local symbol overrides globals with qualifiers
45 $ be_case_sensitive = "n"
46 $ use_vmsdebug_perl = "n"
49 $ C_Compiler_Replace = "CC="
50 $ Thread_Live_Dangerously = "MT="
51 $ use_two_pot_malloc = "N"
52 $ use_pack_malloc = "N"
53 $ use_debugmalloc = "N"
56 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
57 $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx]
58 $! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx]
60 $! Sebastian Bazley's request: close the CONFIG handle with /NOLOG
61 $! qualifier "just in case" (configure.com is re @ed in a bad state).
62 $! This construct was tested to be not a problem as far back as
63 $! VMS V5.5-2, hopefully earlier versions are OK as well.
67 $! Now keep track of open files
69 $ vms_filcnt = F$GETJPI ("","FILCNT")
71 $!: compute my invocation name
72 $ me = F$ENVIRONMENT("PROCEDURE")
74 $! Many null statements (begin with colon ':') in the Bourne shell version of
75 $! this script serve as comments/placeholders. I have retained some of the ones
76 $! that will help you compare this .COM file to the sh version - as well as
77 $! leave placeholders for future improvements to this .COM file.
78 $! sfn = VMS "skipped for now"
80 $!: Proper PATH separator !sfn
81 $!: Proper PATH setting !sfn
82 $!: Sanity checks !sfn "Say '@''$me''"
83 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
84 $!: Configure runs within the UU subdirectory !->after find MANIFEST
85 $! <big long list of default values (mostly null)>
86 $!: We must find out about Eunice early !(?)
87 $!: list of known cpp symbols, sorted alphabetically !sfn
89 $!: default library list !sfn
90 $! <no hints files in use (yet?)>
91 $!: Extra object files, if any, needed on this platform. !sfn
92 $!: Possible local include directories to search. !sfn
93 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
94 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
95 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
96 $!: no include file wanted by default !sfn
98 $!: Possible local library directories to search. !sfn
99 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
100 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
101 $!: general looking path for locating libraries !sfn
102 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
103 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
104 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
105 $!: Private path used by Configure to find libraries. Its value !sfn
106 $!: is prepended to libpth. This variable takes care of special !sfn
107 $!: machines, like the mips. Usually, it should be empty. !sfn
109 $!: full support for void wanted by default !sfn
110 $!defvoidused=15 !sfn
111 $!: List of libraries we want. !sfn
112 $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
113 $!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
114 $!libswanted="$libswanted ucb bsd BSD PW x" !sfn
115 $!: We probably want to search /usr/shlib before most other libraries. !sfn
116 $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
117 $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
118 $!glibpth="/usr/shlib $glibpth" !sfn
119 $!: Do not use vfork unless overridden by a hint file. !sfn
120 $!usevfork=false !sfn
121 $!: script used to extract .SH files with variable substitutions !sfn
122 $!: produce awk script to parse command line options !sfn
123 $!sfn (assume no sed awk) see below
124 $!: process the command line options
126 $!: set up default values
130 $ IF F$TYPE(config_sh) .EQS. "" THEN config_sh=""
141 $ use_5005_threads = "N"
147 $ THEN !one or more switches was thrown
154 $ config_args = config_args + F$FAO(" !AS",P'i')
157 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
161 $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
162 $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
163 $Remove_quotation_mark:
165 $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
166 $ gotopt = "f" !"alse"
167 $ gotshortopt = "f" !"alse"
168 $ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
171 $ gotopt = "t" !"rue"
173 $ gotshortopt = "t" !"rue"
175 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
182 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f"
186 $ IF (F$SEARCH(config_sh).NES."")
188 $ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
189 $ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
192 $ CONTINUE !at this point check UIC && if test allows...
195 $ echo "''me': cannot read config file ''config_sh'."
199 $ echo "''me': cannot read config file ''config_sh'."
204 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h"
211 $ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m"
218 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r"
225 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s"
232 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E"
237 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K"
244 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O"
251 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S"
253 $ extractsh = "true" !VMS? Yes with munchconfig
258 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D"
261 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
263 $ tmp = P'i' + "=""define"""
267 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
269 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
270 $ echo "''me': use ""-Usymbol=val"" not ""-Dsymbol=""."
271 $ echo "''me': ignoring -D",P'i'
273 $ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')
274 $ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """"
281 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U"
284 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
286 $ tmp = P'i' + "="""""
290 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
292 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
293 $ echo "''me': use ""-Dsymbol=val"" not ""-Usymbol=val""."
294 $ echo "''me': ignoring -U",P'i'
296 $ tmp = P'i' + "=""undef"""
303 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
305 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
306 $ echo "''me' generated by an unknown version of EDT."
312 $ echo "''me': unknown option ",P'i'
315 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
317 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
319 $ ENDIF ! (P1 .NES. "")
320 $ config_args = F$EDIT(config_args,"TRIM")
324 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
325 $ echo "Usage: @''me' [-dehmr""EKOSV""] [-fconfig.sh] [""-Dsymbol""] [""-Dsymbol=value""]"
326 $ echo " [-Usymbol] [-Usymbol=]"
329 "-d" : use defaults for all answers.
330 "-e" : go on without questioning past the production of config.sh. *
331 "-f" : specify an alternate default configuration file.
332 "-h" : print this help message and exit (with an error status).
333 "-m" : skip the MANIFEST check to see that all files are present
334 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
335 "-s" : silent mode, only echoes questions and essential information.
336 -"D" : define symbol to have some value: *
337 -"Dsymbol" symbol gets the value 'define'
338 -"Dsymbol=value" symbol gets the value 'value'
339 -E : stop at the end of questions, after having produced config.sh. *
340 -K : do not use unless you know what you are doing.
341 -O : let -D and -U override definitions from loaded configuration file. *
342 -S : perform variable substitutions on all .SH files (can mix with -f) *
343 -"U" : undefine symbol: *
344 -"Usymbol" symbol gets the value 'undef'
345 -"Usymbol=" symbol gets completely empty
346 -V : print version number and exit (with a zero status).
348 $ echo "%Config-I-VMS, lower case switches must be enclosed"
349 $ echo "-Config-I-VMS, in double quotation marks, e.g.:"
350 $ echo "-Config-I-VMS, @Configure ""-des"""
351 $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
352 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
354 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
360 $ IF F$Mode() .eqs. "BATCH"
362 $ STDOUT = F$PARSE(F$GETQUI("DISPLAY_ENTRY", "JOB_NAME"), -
363 F$GETQUI("DISPLAY_ENTRY", "LOG_SPECIFICATION"), ".LOG")
364 $ WRITE SYS$OUTPUT "Warning: Executing in batch mode. To avoid file locking conflicts,"
365 $ WRITE SYS$OUTPUT "output intended for SYS$OUTPUT will be sent to a new version"
366 $ WRITE SYS$OUTPUT STDOUT
368 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
370 $ DEFINE SYS$OUTPUT "_NLA0:"
371 $ echo4 = "write STDOUT "
372 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
373 $ open/write/share=read STDOUT 'STDOUT'
381 $ echo4 = "write SYS$OUTPUT "
385 $!: run the defines and the undefines, if any, but leave the file out there...
386 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
391 $ packageup = F$EDIT((package - "5"),"UPCASE")
393 $!: Eunice requires " " instead of "", can you believe it
396 $ echo "Beginning of configuration questions for ''package'."
399 $!: Some greps do not return status, grrr.
400 $ contains = "SEARCH"
402 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
403 $! echo "Checking ''echo' to see how to suppress newlines..."
404 $! echo "giving up..."
405 $! echo "The star should be here-->*"
407 $!: Now test for existence of everything in MANIFEST
409 $ echo4 "First let's make sure your kit is complete. Checking..."
412 $! Here I assume we are in the [foo.PERLxxx...] tree
413 $! because the search routine simply does set def [-] if necessary.
414 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
416 $ manifestfound = F$SEARCH(file_2_find)
417 $ IF (manifestfound .EQS. "")
419 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
422 $ GOTO Research_manifest
425 $ echo "There is no MANIFEST file. I hope your kit is complete !"
427 $ GOTO Beyond_manifest
430 $! MANIFEST. has been found and we have set def'ed there.
431 $! Time to bail out before it's too late, i.e. too deep.
432 $! Depth check is unnecessary on Alpha VMS V7.2++ (even for ODS-2).
433 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
434 $ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
435 $! Depth check also unnecessary on ODS 5 (or later) file systems.
436 $ tmp = F$INTEGER(F$GETDVI(F$ENVIRONMENT("DEFAULT"),"ACPTYPE") - "F11V")
437 $ IF (tmp .GE. 5) THEN GOTO Beyond_depth_check
438 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("DEFAULT")).nes.".")
442 %Config-E-VMS, ERROR:
443 Sorry! It apears as though your perl build sub-directory is already too
444 deep into the VMS file system. Please try moving stuff into a shallower
445 directory (or altering the "max_allowed_dir_depth" parameter).
447 $ echo4 "ABORTING..."
448 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
450 $ EXIT !2 !$STATUS = "%X00000002" (error)
454 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
456 $ IF (manifestfound .NES. "")
458 $ IF ( F$SEARCH("UU.DIR").EQS."" )
460 $ CREATE/DIRECTORY [.UU]
462 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;*
464 $!: Configure runs within the UU subdirectory
467 $! a little redundancy never hurt anybody?
468 $ file_2_find = "[-]" + file_2_find
469 $ manifestfound = F$SEARCH(file_2_find)
471 $ OPEN/WRITE MISSING MISSING.
472 $!change to "FALSE" if you wish to skip the manifest search
473 $!(which after all is rather slow in DCL :-)
476 $ echo "Skipping MANIFEST check as requested"
479 $ OPEN/READ CONFIG 'manifestfound'
481 $ READ/END_OF_FILE = Done_manifest CONFIG line
482 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
483 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
484 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
485 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
486 $ line = F$EDIT(line,"TRIM, COMPRESS")
487 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
488 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
490 $Re_strip_line_manifest:
491 $ loca = F$LOCATE("/",file_2_find)
492 $ ante = F$EXTRACT(0,loca,file_2_find)
493 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
494 $ test_this = ante + "." + (post - "/")
495 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
497 $ file_2_find = ante + "." + (post - "/")
498 $ GOTO Re_strip_line_manifest
500 $ file_2_find = ante + "]" + (post - "/")
502 $ file_2_find = "[-."+file_2_find
504 $ file_2_find = "[-]" + file_2_find
507 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
508 $ file_2_find = file_2_find - dirname
511 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
512 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
514 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
515 $ ELSE basename = basename + dot_ele + "_"
520 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
521 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
522 basename = f$extract(0,f$length(basename)-1,basename)
523 $ file_2_find = dirname + basename
525 $ found = F$SEARCH(file_2_find)
526 $ IF (found .EQS. "" .AND. dots .GT. 2)
528 $! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
529 $! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
530 $! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
531 $ basename[f$locate(".",basename),1] := _
532 $ dot_ele = F$ELEMENT(dots - 1,"_",basename)
534 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
536 $ found = F$SEARCH(dirname + basename)
537 $ file_2_find = file_2_find + "," + basename
539 $ IF (found .EQS. "")
541 $ WRITE MISSING file_2_find
542 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
544 $ miss_list = miss_list + "," + file_2_find
547 $ GOTO Read_loop_manifest
552 $ ENDIF ! (manifestfound .NES. "")
554 $ IF (miss_list .NES. "")
556 $ echo "Some of the files not found include:"
559 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
565 THIS PACKAGE SEEMS TO BE INCOMPLETE.
567 You have the option of continuing the configuration process, despite the
568 distinct possibility that your kit is damaged, by typing 'y'es. If you
569 do, don't blame me if something goes wrong. I advise you to type 'n'o
570 and contact the author (dan@sidhe.org)
573 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
576 $ echo4 "Continuing..."
578 $ echo4 "ABORTING..."
582 $ echo4 "Looks good..."
583 $ DELETE/NOLOG MISSING.;
584 $ ENDIF ! (miss_list .NES. "")
585 $ ENDIF ! (manifestfound .EQS. "") ELSE
587 $! after finding MANIFEST (see above)
588 $!: Configure runs within the UU subdirectory
590 $!: compute the number of columns on the terminal for proper question formatting
591 $ IF F$MODE() .EQS. "BATCH"
592 $! else it winds up being 512 in batch
594 $ ELSE COLUMNS = F$GETDVI("SYS$OUTPUT","DEVBUFSIZ")
596 $! "-des" sets SYS$OUTPUT to NL: with a DEVBUFSIZ too large (512 again)
597 $ IF COLUMNS .GT. 210 THEN COLUMNS = 80
598 $! not sure if this would actually be needed - it hopefully will not hurt
599 $ IF COLUMNS .LT. 40 THEN COLUMNS = 40
601 $!: set up the echo used in my read !sfn
602 $!: now set up to do reads with possible shell escape and default assignment !sfn
605 $! The sub_rp splitting is intended to handle long symbols such as the dflt for
610 $ len_rp = F$LENGTH(rp)
617 $ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
619 $ i_rp = i_rp + COLUMNS
620 $ IF i_rp .LT. len_rp THEN GOTO fastread_rp_loop
625 $ If (.NOT. silent) Then echo ""
630 $ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
632 $ i_rp = i_rp + COLUMNS
633 $ IF i_rp .LT. len_rp THEN GOTO firstread_rp_loop
634 $ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
636 $ READ SYS$COMMAND/PROMPT="''rp'" ans
638 $ IF (ans .EQS. "&-d")
640 $ echo4 "(OK, I will run with -d after this question.)"
641 $ IF (.NOT. silent) THEN echo ""
645 $ secondread_rp_loop:
646 $ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
648 $ i_rp = i_rp + COLUMNS
649 $ IF i_rp .LT. len_rp THEN GOTO secondread_rp_loop
650 $ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
652 $ READ SYS$COMMAND/PROMPT="''rp'" ans
656 $ IF (ans .EQS. "&-s")
658 $ echo4 "(OK, I will run with -s after this question.)"
664 $ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
666 $ i_rp = i_rp + COLUMNS
667 $ IF i_rp .LT. len_rp THEN GOTO thirdread_rp_loop
668 $ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
670 $ READ SYS$COMMAND/PROMPT="''rp'" ans
680 $!: create .config dir to save info across Configure sessions
681 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
683 $ CREATE/DIRECTORY [-.CONFIG]
684 $ OPEN/WRITE CONFIG [-.CONFIG]README.
686 "This directory created by Configure to save information that should"
688 "persist across sessions."
691 "You may safely delete it if you wish."
695 $ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n
696 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
697 $ IF (patchlevel_h.NES."")
699 $ SEARCH 'patchlevel_h' "define","PERL_VERSION","epoch"/match=and/out=[]ver.out
700 $ IF .NOT. usedevel .AND. usedevel .NES. "define"
702 $ OPEN/READ CONFIG []ver.out
705 $ tmp = F$EDIT(line,"TRIM,COMPRESS")
706 $ xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp))
707 $ line = xpatchlevel / 2
708 $ tmp = xpatchlevel - ( line * 2 )
711 $ echo4 "patchlevel is " + F$STRING(xpatchlevel)
714 *** WHOA THERE!!! ***
716 This is an UNSTABLE DEVELOPMENT release.
717 (The patchlevel, is odd--as opposed to even,
718 and that signifies a development release. If you want a
719 maintenance release, you want an even-numbered release.)
721 Do ***NOT*** install this into production use.
722 Data corruption and crashes are possible.
724 It is most seriously suggested that you do not continue any further
725 unless you want to help in developing and debugging Perl.
729 $ rp="Do you really want to continue? [''dflt'] "
730 $ IF (fastread) THEN fastread := FALSE
732 $ IF ans .EQS. "" THEN ans = dflt
735 $ echo4 "Okay, continuing."
738 $ DELETE/NOLOG/NOCONFIRM []ver.out;
745 $ DELETE/NOLOG/NOCONFIRM []ver.out;
747 $!: general instructions
750 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
751 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
753 $ messages = F$ENVIRONMENT("MESSAGE")
754 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
755 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
756 $ IF .NOT.($status.EQ.%X08D78053)
760 $ rp = "Would you like to see the instructions? [''dflt'] "
762 $ if .NOT.ans THEN needman=""
764 $ SET MESSAGE 'messages'
766 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
773 This installation shell script will examine your system and ask you questions
774 to determine how the perl5 package should be installed. If you get
775 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
776 process, edit something, then restart this process as you just did.
777 Many of the questions will have default answers in square
778 brackets; typing carriage return will give you the default.
781 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
785 In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
786 the questions and use the computed defaults (or the previous answers provided
787 there was already a config.sh file). Type '@Configure "-h"' for a list of
791 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
795 Much effort has been expended to ensure that this shell script will
796 run on any VMS system. If despite that it blows up on yours, your
797 best bet is to edit Configure.com and @ it again. Whatever problems
798 you have with Configure.com, let me (dan@sidhe.org) know how I blew
802 $!This installation script affects things in two ways:
804 $!1) it may do direct variable substitutions on some of the files included
806 $!2) it builds a config.h file for inclusion in C programs. You may edit
807 $! any of these files as the need arises after running this script.
809 $!If you make a mistake on a question, there is no easy way to back up to it
812 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
813 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
815 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
819 $ ENDIF !(needman .EQS. "true")
821 $!: see if sh knows # comments !sfn
823 $!: figure out how to guarantee sh startup !sfn
824 $!: find out where common programs are !sfn
825 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
826 $!trylist="byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
827 $! echo "I don't know where '$file' is, and my life depends on it."
828 $! echo "Go find a public domain implementation or fix your PATH setting!"
830 $! echo "Don't worry if any of the following aren't found..."
831 $!: determine whether symbolic links are supported !sfn
832 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
833 $!: set up the translation script tr, must be called with ./tr of course !sfn
835 $!: Try to determine whether config.sh was made on this system
836 $!: Get old answers from old config file if Configure was run on the
837 $!: same system, otherwise use the hints.
838 $ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/"
842 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
844 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
846 $ configshfound = F$SEARCH(config_sh)
847 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
849 $ IF (i.LT.max) THEN GOTO Config_sh_look
850 $! genconfig.pl has "osname='VMS'"
851 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
852 $ IF (configshfound.EQS."")
854 $ config_sh = "[-]config.sh" ! the fallback default
855 $ GOTO Beyond_config_sh
858 $ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
859 $ IF F$TYPE(config_dflt) .EQS. "" THEN config_dflt = "n"
860 $ rp = "Shall I @ ''config_sh' for default answers? [''config_dflt'] "
862 $ IF ans .EQS. "" THEN ans = config_dflt
866 $ echo "Fetching default answers from ''config_sh'..."
868 $! This @ is why config_sh must employ DCL syntax. Note that for
869 $! symbols to be returned to this procedure they must be global.
870 $! Which implies that assignments must be of the :== or == variety.
871 $! Note further that the [-]config.sh file written by this procedure
872 $! employs shell syntax. In order to convert shell syntax to DCL
875 $! perl -ni -e "s/^#/!#/;s/='/==""/;s/'$/""/;print ""\$ $_"";" config.sh
877 $! However, watch out for sig_nam, sig_nam_init, sig_num, startperl
878 $! and any of the lower case double quoted variables such as the *format
879 $! variables in such a config."sh".
884 $ DELETE/SYMBOL config_dflt
886 $!we actually do not have "hints/" for VMS
890 $!First time through, eh? I have some defaults handy for the following systems:
893 $! echo " ","VMS_VAX"
894 $! echo " ","VMS_AXP"
895 $! : Now look for a hint file osname_osvers, unless one has been
896 $! : specified already.
899 $!You may give one or more space-separated answers, or "none" if appropriate.
900 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
902 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
906 $!: Restore computed paths !sfn
908 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
910 $ IF (osname .NES. "VMS")
912 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
916 %Config-E-VMS, ERROR:
918 Err, you do not appear to be running VMS!
919 This procedure is intended to Configure the building of Perl for VMS.
922 $ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans
925 $ echo4 "Continuing..."
927 $ echo4 "ABORTING..."
928 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
930 $ EXIT 2 !$STATUS = "%X00000002" (error)
932 $ ELSE !we are on VMS huzzah!
934 $ THEN TYPE SYS$INPUT:
937 Configure uses the operating system name and version to set some defaults.
938 The default value is probably right if the name rings a bell. Otherwise,
939 since spelling matters for me, either accept the default or answer "none"
943 $ rp = "Operating system name? [''osname'] "
947 $ IF (ans.NES.osname) !.AND.knowitall
949 $ echo4 "I'll go with ''osname' anyway..."
952 $ ENDIF !(osname .NES./.EQS. "VMS")
954 $!: who configured the system
955 $ cf_by = F$EDIT(user,"LOWERCASE")
956 $ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
958 $! Peter Prymmer has seen:
959 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
960 $! "SYS$TIME_ZONE" = "EDT"
962 $! Charles Lane recommended:
963 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
964 $! "NEWS_TIMEZONE" = "-0500"
965 $! "ST_TIMEZONE" = "EDT"
966 $! "JAN_TIME_ZONE" = "EST "
967 $! "MULTINET_TIMEZONE" = "EST"
968 $! "DAYLIGHT_SAVINGS" = "1"
970 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
972 $! "Multinet_Timezone"
973 $! "TCPware_Timezone"
976 $! This snippet o' DCL returns a string in default Unix `date` format,
977 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
979 $ MIN_TZO = -840 !units are minutes here
982 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
983 $ monn = F$CVTIME(,,"MONTH")
984 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
985 $ hour = F$CVTIME(,,"HOUR")
986 $ min = F$CVTIME(,,"MINUTE")
987 $ sec = F$CVTIME(,,"SECOND")
988 $ year = F$CVTIME(,,"YEAR")
990 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
994 $ mon = F$ELEMENT(i,"/",months)
995 $ IF i.LT.monn THEN GOTO Mon_loop
998 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
1001 $ tzhour = F$INTEGER(systz)/3600
1002 $ tzmins = F$INTEGER(systz)/60
1003 $ tzminrem = tzmins - tzhour*60
1004 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
1006 $ THEN signothetime = "+"
1007 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
1008 $ THEN direction = "on GMT/"
1009 $ ELSE direction = "east of "
1011 $ ELSE signothetime = "-"
1012 $ tzhour = -1*tzhour !keeps !UL happy
1013 $ direction = "west of "
1016 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
1019 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
1021 $ tzspan = "''tzhour' hours"
1024 $ echo "Your system is ''tzspan' ''direction'UTC in England."
1025 $ rp = "(''systz') Is this UTC Time Zone Offset correct? [''dflt'] "
1027 $ IF ans.OR.(ans.EQS."")
1031 $ GOTO Beyond_TimeZone
1035 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
1040 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
1041 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
1042 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
1044 $ rp = "Enter the Time Zone offset: [''dflt'] "
1046 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
1047 $ IF ans.EQS."" THEN ans = dflt
1048 $ tzhour = F$ELEMENT(0,":","''ans'") !first
1049 $ IF tzhour.EQS."" THEN tzhour = 0
1050 $ tzhour = F$INTEGER(tzhour)
1051 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
1052 $ IF tzminrem.NES.""
1054 $ tzminrem = F$INTEGER(tzminrem)
1055 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
1059 $ tzmins = tzhour*60 + tzminrem
1060 $ tzd = F$STRING(tzmins*60)
1063 $ signothetime = "+"
1065 $ tzhour = -1*tzhour !keeps !UL happy
1066 $ signothetime = "-"
1068 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
1071 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
1076 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
1077 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
1079 $!: determine the architecture name
1080 $! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
1081 $! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME")
1082 $! but does have F$GETSYI("HW_MODEL").
1083 $! Please try to use either archname .EQS. "VMS_VAX" or archname .EQS.
1084 $! "VMS_AXP" from here on to allow cross-platform configuration (e.g.
1085 $! configure a VAX build on an Alpha).
1087 $ IF (F$GETSYI("HW_MODEL") .LT. 1024)
1089 $ archname = "VMS_VAX"
1090 $ otherarch = "an Alpha"
1092 $ arch_type = "ARCH-TYPE=__VAX__"
1094 $ archname = "VMS_AXP"
1095 $ otherarch = "a VAX"
1097 $ arch_type = "ARCH-TYPE=__AXP__"
1099 $ rp = "What is your architecture name? [''archname'] "
1103 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
1104 $ IF (ans.NES.archname) !.AND.knowitall
1106 $ echo4 "I'll go with ''archname' anyway..."
1110 $ vms_prefix = "perl_root"
1111 $ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
1112 $ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''dflt'] "
1114 $ if ans .EQS. "" THEN ans = dflt
1120 $ IF (archname.EQS."VMS_AXP")
1122 $ macros = macros + """AXE=1"","
1126 $!: is AFS running? !sfn
1127 $!: decide how portable to be. Allow command line overrides. !sfn
1128 $!: set up shell script to do ~ expansion !sfn
1129 $!: expand filename !sfn
1130 $!: now set up to get a file name !sfn
1132 $ IF F$TYPE(prefix) .EQS. ""
1134 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
1135 $ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - ".;"
1136 $ prefixbase = prefix - "]"
1137 $! Add _ROOT to make install PERL_ROOT differ from build directory.
1138 $ prefix = prefixbase + "_ROOT.]"
1141 $!: determine root of directory hierarchy where package will be installed.
1146 $ echo "By default, ''package' will be installed in ''dflt', pod"
1147 $ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
1148 $ echo "all installation directories."
1149 $ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
1150 $ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
1152 $ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
1157 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
1161 $ perl_root = prefix
1163 $! Check here for pre-existing PERL_ROOT.
1164 $! -> ask if removal desired.
1165 $! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
1166 $! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
1168 $ IF .NOT. F$GETDVI(perl_root,"MNT")
1170 $ tmp = F$PARSE(perl_root,,,"DEVICE",)
1171 $ echo4 "''tmp' is not mounted."
1173 $ tmp = perl_root - ".]" + "]"
1174 $ dflt = F$PARSE(tmp,,,,)
1177 $ echo4 "''tmp' does not yet exist."
1178 $! create/directory 'tmp'
1180 $ echo4 "''tmp' already exists."
1184 $ vms_skip_install = "true"
1187 $ rp = "Skip the remaining """"where install"""" questions? [''dflt'] "
1189 $ IF (.NOT.ans).AND.(ans.NES."") THEN vms_skip_install = "false"
1190 $ IF (.NOT.vms_skip_install)
1193 $!: set the prefixit variable, to compute a suitable default value
1195 $!: determine where private library files go
1196 $!: Usual default is /usr/local/lib/perl5. Also allow things like
1197 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
1203 There are some auxiliary files for perl5 that need to be put into a
1204 private library directory that is accessible by everyone.
1207 $ IF F$TYPE(privlib) .NES. ""
1208 $ THEN dflt = privlib
1209 $ ELSE dflt = "''vms_prefix':[lib]"
1211 $ rp = "Pathname where the private library files will reside? "
1212 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1215 $ THEN privlib = ans
1216 $ ELSE privlib = dflt
1219 $ ENDIF !%Config-I-VMS, skip remaining "where install" questions
1221 $ IF F$TYPE(perl_symbol) .EQS. "" THEN perl_symbol := true
1222 $ IF F$TYPE(perl_verb) .EQS. "" THEN perl_verb = ""
1230 $ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
1231 $ echo "symbol to invoke ''package', which is the usual method."
1232 $ echO "If you do not do so then you would need a DCL command verb at the"
1233 $ echo "process or the system wide level."
1235 $ rp = "Invoke perl as a global symbol foreign command? [''dflt'] "
1237 $ IF (ans.EQS."") THEN ans = dflt
1238 $ IF (.NOT.ans) THEN perl_symbol = "false"
1240 $ IF (.NOT.perl_symbol)
1242 $ IF perl_verb .EQS. "DCLTABLES"
1249 $ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
1250 $ echo "verb in a per-process table or in the system wide DCLTABLES (which"
1251 $ echo "would require write privilege)."
1253 $ rp = "Invoke perl as a per process command verb? [ ''dflt' ] "
1255 $ IF (ans.EQS."") THEN ans = dflt
1257 $ THEN perl_verb = "DCLTABLES"
1258 $ ELSE perl_verb = "PROCESS"
1260 $ ENDIF ! (.NOT.perl_symbol)
1262 $!: set the base revision
1264 $ revision = baserev - ".0"
1265 $!: get the patchlevel
1267 $ echo4 "Getting the current patchlevel..."
1268 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1269 $ IF (patchlevel_h.NES."")
1271 $ got_patch = "false"
1273 $ got_api_revision = "false"
1274 $ got_api_version = "false"
1275 $ got_api_subversion = "false"
1276 $ OPEN/READONLY CONFIG 'patchlevel_h'
1278 $ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
1279 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
1281 $ line = F$EDIT(line,"COMPRESS, TRIM")
1282 $ patchlevel = F$ELEMENT(2," ",line)
1283 $ got_patch = "true"
1285 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
1287 $ line = F$EDIT(line,"COMPRESS, TRIM")
1288 $ subversion = F$ELEMENT(2," ",line)
1291 $ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1293 $ line = F$EDIT(line,"COMPRESS, TRIM")
1294 $ api_revision = F$ELEMENT(2," ",line)
1295 $ got_api_revision = "true"
1297 $ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1299 $ line = F$EDIT(line,"COMPRESS, TRIM")
1300 $ api_version = F$ELEMENT(2," ",line)
1301 $ got_api_version = "true"
1303 $ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1305 $ line = F$EDIT(line,"COMPRESS, TRIM")
1306 $ api_subversion = F$ELEMENT(2," ",line)
1307 $ got_api_subversion = "true"
1309 $ IF (.NOT. got_patch) .OR. -
1310 (.NOT. got_sub) .OR. -
1311 (.NOT. got_api_revision) .OR. -
1312 (.NOT. got_api_version) .OR. -
1313 (.NOT. got_api_subversion) -
1314 THEN GOTO Patchlevel_h_loop
1322 $ api_subversion="0"
1324 $ IF (F$STRING(subversion) .NES. "0")
1326 $ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel' subversion ''subversion'.)"
1328 $ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel'.)"
1331 $ version = revision + "_" + patchlevel + "_" + subversion
1333 $ IF (.NOT.vms_skip_install)
1335 $!: set the prefixup variable, to restore leading tilde escape !sfn
1337 $!: determine where public architecture dependent libraries go
1341 $ echo "''package' contains architecture-dependent library files. If you are"
1347 sharing libraries in a heterogeneous environment, you might store
1348 these files in a separate location. Otherwise, you can just include
1349 them with the rest of the public library files.
1352 $ IF F$TYPE(archlib) .NES. ""
1353 $ THEN dflt = archlib
1354 $ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
1356 $ rp = "Where do you want to put the public architecture-dependent libraries? "
1357 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1360 $ THEN archlib = ans
1361 $ ELSE archlib = dflt
1364 $ ENDIF !%Config-I-VMS, skip "where install" questions
1366 $! This quotation from Configure has to be included on VMS:
1371 There is, however, a strange, musty smell in the air that reminds me of
1372 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1374 $ IF (.NOT.vms_skip_install)
1376 $!: it so happens the Eunice I know will not run shell scripts in Unix format
1378 $!: see if setuid scripts can be secure !sfn
1379 $!: now see if they want to do setuid emulation !sfn
1381 $!: determine where site specific libraries go.
1387 The installation process will also create a directory for
1388 site-specific extensions and modules. Some users find it convenient
1389 to place all local files in this directory rather than in the main
1390 distribution directory.
1393 $ IF F$TYPE(sitelib) .NES. ""
1394 $ THEN dflt = sitelib
1395 $ ELSE dflt = privlib - "]" + ".SITE_PERL]"
1397 $ rp = "Pathname for the site-specific library files? "
1398 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1401 $ THEN sitelib = ans
1402 $ ELSE sitelib = dflt
1405 $!: determine where site specific architecture-dependent libraries go.
1407 $ THEN TYPE SYS$INPUT:
1410 The installation process will also create a directory for
1411 architecture-dependent site-specific extensions and modules.
1414 $ IF F$TYPE(sitearch) .NES. ""
1415 $ THEN dflt = sitearch
1416 $ ELSE dflt = sitelib - "]" + "." + archname + "]"
1418 $ rp = "Pathname for the site-specific architecture-dependent library files? "
1419 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1422 $ THEN sitearch = ans
1423 $ ELSE sitearch = dflt
1426 $!: determine where old public architecture dependent libraries might be
1428 $!: determine where public executables go
1429 $ IF F$TYPE(bin) .NES. ""
1431 $! ELSE dflt = prefix - ".]" + ".BIN]"
1432 $ ELSE dflt = "/''vms_prefix'/000000"
1434 $ rp = "Pathname where the public executables will reside? "
1435 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1442 $!: determine where manual pages are on this system
1443 $!: What suffix to use on installed man pages
1444 $!: see if we can have long filenames
1445 $!: determine where library module manual pages go
1446 $!: What suffix to use on installed man pages
1447 $!: see what memory models we can support
1449 $ ELSE ! skipping "where install" questions, we must set some symbols
1450 $ IF F$TYPE(archlib).EQS."" THEN -
1451 archlib="''vms_prefix':[lib.''archname'.''version']"
1452 $ IF F$TYPE(bin) .EQS. "" THEN -
1453 bin="/''vms_prefix'/000000"
1454 $ IF F$TYPE(privlib) .EQS. "" THEN -
1455 privlib ="''vms_prefix':[lib]"
1456 $ IF F$TYPE(sitearch) .EQS. "" THEN -
1457 sitearch="''vms_prefix':[lib.site_perl.''archname']"
1458 $ IF F$TYPE(sitelib) .EQS. "" THEN -
1459 sitelib ="''vms_prefix':[lib.site_perl]"
1460 $ ENDIF !%Config-I-VMS, skip "where install" questions
1462 $! These derived locations can be set whether we've opted to
1463 $! skip the where install questions or not.
1465 $ IF F$TYPE(archlibexp) .EQS. "" THEN -
1466 archlibexp="''vms_prefix':[lib.''archname'.''version']"
1467 $ IF F$TYPE(binexp) .EQS. "" THEN -
1468 binexp ="''vms_prefix':[000000]"
1469 $ IF F$TYPE(builddir) .EQS. "" THEN -
1470 builddir ="''vms_prefix':[000000]"
1471 $ IF F$TYPE(installarchlib) .EQS. "" THEN -
1472 installarchlib="''vms_prefix':[lib.''archname'.''version']"
1473 $ IF F$TYPE(installbin) .EQS. "" THEN -
1474 installbin ="''vms_prefix':[000000]"
1475 $ IF F$TYPE(installscript) .EQS. "" THEN -
1476 installscript ="''vms_prefix':[utils]"
1477 $ IF F$TYPE(installman1dir) .EQS. "" THEN -
1478 installman1dir ="''vms_prefix':[man.man1]"
1479 $ IF F$TYPE(installman3dir) .EQS. "" THEN -
1480 installman3dir ="''vms_prefix':[man.man3]"
1481 $ IF F$TYPE(installprivlib) .EQS. "" THEN -
1482 installprivlib ="''vms_prefix':[lib]"
1483 $ IF F$TYPE(installsitearch) .EQS. "" THEN -
1484 installsitearch="''vms_prefix':[lib.site_perl.''archname']"
1485 $ IF F$TYPE(installsitelib) .EQS. "" THEN -
1486 installsitelib ="''vms_prefix':[lib.site_perl]"
1487 $ IF F$TYPE(oldarchlib) .EQS. "" THEN -
1488 oldarchlib="''vms_prefix':[lib.''archname']"
1489 $ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
1490 oldarchlibexp="''vms_prefix':[lib.''archname']"
1491 $ IF F$TYPE(privlibexp) .EQS. "" THEN -
1492 privlibexp ="''vms_prefix':[lib]"
1493 $ IF F$TYPE(scriptdir) .EQS. "" THEN -
1494 scriptdir ="''vms_prefix':[utils]"
1495 $ IF F$TYPE(sitearchexp) .EQS. "" THEN -
1496 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
1497 $ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
1498 sitelib_stem ="''vms_prefix':[lib.site_perl]"
1499 $ IF F$TYPE(sitelibexp) .EQS. "" THEN -
1500 sitelibexp ="''vms_prefix':[lib.site_perl]"
1502 $!: see if we need a special compiler
1503 $! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1507 $ vms_cc_available = ""
1509 $ OPEN/WRITE CONFIG ccvms.c
1510 $ WRITE CONFIG "#ifdef __DECC"
1511 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1512 $ WRITE CONFIG "#endif"
1513 $ WRITE CONFIG "#include <stdio.h>"
1514 $ WRITE CONFIG "int main() {"
1515 $ WRITE CONFIG "#ifdef __DECC"
1516 $ WRITE CONFIG " printf(""/DECC\n"");"
1517 $ WRITE CONFIG "#else"
1518 $ WRITE CONFIG " printf(""/VAXC\n"");"
1519 $ WRITE CONFIG "#endif"
1520 $ WRITE CONFIG " exit(0);"
1524 $! DEFINE SYS$ERROR _NLA0:
1525 $! DEFINE SYS$OUTPUT _NLA0:
1526 $ cc/NoObj/list=ccvms.lis ccvms.c
1528 $! DEASSIGN SYS$OUTPUT
1529 $! DEASSIGN SYS$ERROR
1530 $ IF (silent) THEN GOSUB Shut_up
1531 $ IF tmp.NE.%X10B90001
1533 $ IF tmp.NE.%X10000001
1535 $ nocc = "t" !%X10000001 is return from gcc
1536 $ GOTO Gcc_initial_check
1541 $ IF .NOT.silent THEN echo ""
1542 $ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1543 $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1547 $ echo "Will try cc/decc..."
1549 $ DEFINE/USER_MODE SYS$ERROR NL:
1550 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1552 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1555 $ IF (silent) THEN GOSUB Shut_up
1556 $ IF tmp.NE.%X10B90001
1558 $ echo "Apparently you don't have that one."
1561 $ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1562 $ vms_cc_available = vms_cc_available + "cc/decc "
1565 $ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
1567 $ vms_cc_dflt = "/decc"
1568 $ vms_cc_available = vms_cc_available + "cc/decc "
1573 $ echo "Checking for gcc"
1574 $ OPEN/WRITE CONFIG gccvers.lis
1575 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1576 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1577 $ 'gcc_symbol'/noobj/version _nla0:
1579 $ IF (silent) THEN GOSUB Shut_up
1581 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1583 $ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you do not have it."
1584 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1585 $ GOTO Cxx_initial_check
1587 $ OPEN/READ CONFIG gccvers.lis
1589 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1590 $ GOTO GCC_List_Read
1594 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1595 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1599 $! Do note that [vms]perl source files have a ways to go before they will
1600 $! compile under CXX.
1601 $! In order to test Configure.com with CXX invoke it with "-Dtry_cxx" on
1602 $! the command line.
1604 $ IF F$TYPE(try_cxx) .EQS. "" THEN try_cxx := n
1605 $ IF try_cxx .OR. try_cxx .EQS. "define"
1609 $ echo "Checking for CXX..."
1610 $ OPEN/WRITE CONFIG ccvms.c
1611 $ WRITE CONFIG "#include <iostream>"
1612 $ WRITE CONFIG "int main() {"
1613 $ WRITE CONFIG "#ifdef __DECCXX"
1614 $ WRITE CONFIG " cout << __DECCXX, endl;"
1615 $ WRITE CONFIG "#else"
1616 $ WRITE CONFIG " cout << 0,endl;"
1617 $ WRITE CONFIG "#endif"
1618 $! Todo: add G++ identifier check ??
1619 $ WRITE CONFIG " return(0);"
1623 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1624 $ DEFINE/USER_MODE SYS$ERROR NL:
1628 $! success $status with:
1629 $! DEC C++ V1.1-001 on VMS VAX V5.5-2
1630 $! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1631 $! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1632 $! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1633 $ IF tmp .eq. %X15F60001
1637 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1638 $ DEFINE/USER_MODE SYS$ERROR NL:
1642 $ ! success $status with:
1643 $ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1644 $ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1645 $ IF tmp .eq. %X10000001
1648 $ vms_cc_available = vms_cc_available + "cxx "
1649 $ echo "CXX and LINK are available."
1651 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1653 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1654 $ DEFINE/USER_MODE SYS$ERROR NL:
1658 $ ! success $status with:
1659 $ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1660 $ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1661 $ IF tmp .eq. %X10000001
1663 $ ld_try = "cxxlink"
1664 $ vms_cc_available = vms_cc_available + "cxx "
1665 $ echo "CXX and CXXLINK are available."
1668 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1672 $ DELETE/NOLOG/NOCONFIRM ccvms.c;
1673 $ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1674 $ CALL Cxx_demangler_cleanup
1676 $ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1679 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1681 $!: see if we need a special compiler
1683 $ echo "Available compiler(s):"
1684 $ echo "( ''vms_cc_available')"
1687 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1691 $ rp = "Use which C compiler? [''dflt'] "
1695 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1697 $ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans))
1702 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1704 $ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1709 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1713 $ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1714 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt)
1716 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1721 $ IF Mcc .EQS. "cc/decc"
1724 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1730 $ IF Mcc .EQS. "cc/decc"
1733 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1735 $ IF Mcc .EQS. "gcc"
1738 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1741 $Decc_Version_check:
1743 $ IF ccname .EQS. "DEC"
1746 $ echo4 "Checking for the Dec C version number..."
1747 $ OPEN/WRITE CONFIG deccvers.c
1748 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1749 $ WRITE CONFIG "#include <stdio.h>"
1750 $ WRITE CONFIG "int main() {"
1751 $ WRITE CONFIG "#ifdef __DECC"
1752 $ WRITE CONFIG "#ifdef __DECC_VER"
1753 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1754 $ WRITE CONFIG "#else"
1755 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1756 $ WRITE CONFIG "#endif"
1757 $ WRITE CONFIG "#endif"
1758 $ WRITE CONFIG " exit(0);"
1762 $ DEFINE/USER_MODE SYS$ERROR NL:
1763 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1766 $ IF (silent) THEN GOSUB Shut_up
1767 $ DEFINE/USER_MODE SYS$ERROR NL:
1768 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1771 $ IF (silent) THEN GOSUB Shut_up
1772 $ OPEN/WRITE CONFIG deccvers.out
1773 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1774 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1775 $ mcr []deccvers.exe
1779 $ IF (silent) THEN GOSUB Shut_up
1780 $ OPEN/READ CONFIG deccvers.out
1781 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1784 $ echo "You are using Dec C ''line'"
1786 $ Dec_C_Version = F$INTEGER(line)
1787 $ IF Dec_C_Version .GE. 60200000
1789 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1790 $ ccflags = ccflags + "/NOANSI_ALIAS"
1792 $ DELETE/NOLOG/NOCONFIRM deccvers.*;
1796 $ IF ccname .EQS. "GCC"
1798 $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1799 $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1800 $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1801 $ IF gcclib_olb .EQS. ""
1803 $! These objects/libs come w/ gcc 2.7.2 for AXP:
1804 $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1805 $ IF tmp .NES. "" then gcclib_olb = tmp
1806 $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1809 $ IF gcclib_olb .EQS. ""
1810 $ THEN gcclib_olb = tmp
1811 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1814 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1817 $ IF gcclib_olb .EQS. ""
1818 $ THEN gcclib_olb = tmp
1819 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1822 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1825 $ IF gcclib_olb .EQS. ""
1826 $ THEN gcclib_olb = tmp
1827 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1830 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1832 $ gcclib_olb = gcclib_olb + "/lib"
1834 $ IF gcclib_olb .NES. "" .AND. -
1835 (vaxcrtl_olb .NES. "" .OR. -
1836 vaxcrtl_exe .NES. "" )
1839 $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1840 $ OPEN/WRITE CONFIG gccvers.c
1841 $ WRITE CONFIG "#include <stdio.h>"
1842 $ WRITE CONFIG "int main() {"
1843 $ WRITE CONFIG "#ifdef __GNUC__"
1844 $ WRITE CONFIG "#ifdef __VERSION__"
1845 $ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1846 $ WRITE CONFIG "#else"
1847 $ WRITE CONFIG " printf(""%s\n"", ""1"");"
1848 $ WRITE CONFIG "#endif"
1849 $ WRITE CONFIG "#endif"
1850 $ WRITE CONFIG " exit(0);"
1853 $ DEFINE SYS$ERROR _NLA0:
1854 $ DEFINE SYS$OUTPUT _NLA0:
1857 $ DEASSIGN SYS$ERROR _NLA0:
1858 $ DEASSIGN SYS$OUTPUT _NLA0:
1859 $ IF (silent) THEN GOSUB Shut_up
1860 $ DEFINE SYS$ERROR _NLA0:
1861 $ DEFINE SYS$OUTPUT _NLA0:
1862 $ IF vaxcrtl_exe .EQS. ""
1864 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1866 $ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1869 $ link gccvers.obj,'gcclib_olb'
1873 $ OPEN/WRITE CONFIG GCCVERS.OPT
1874 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1876 $ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1879 $ DEASSIGN SYS$ERROR
1880 $ DEASSIGN SYS$OUTPUT
1881 $ IF (silent) THEN GOSUB Shut_up
1882 $ OPEN/WRITE CONFIG gccvers.out
1883 $ DEFINE SYS$ERROR CONFIG
1884 $ DEFINE SYS$OUTPUT CONFIG
1888 $ DEASSIGN SYS$OUTPUT
1889 $ DEASSIGN SYS$ERROR
1890 $ IF (silent) THEN GOSUB Shut_up
1891 $ OPEN/READ CONFIG gccvers.out
1892 $ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1895 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
1896 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1898 $ echo "You are not using GNU cc."
1901 $ echo "You are using GNU cc ''line'"
1904 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1910 $ IF ccname .EQS. "CXX"
1912 $ OPEN/WRITE CONFIG cxxvers.c
1913 $ WRITE CONFIG "#include <stdio.h>"
1914 $ WRITE CONFIG "int main() {"
1915 $ WRITE CONFIG "#ifdef __DECCXX_VER"
1916 $ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
1917 $ WRITE CONFIG "#else"
1918 $ WRITE CONFIG " printf(""%i\n"", ""0"");"
1919 $ WRITE CONFIG "#endif"
1920 $ WRITE CONFIG " return(0);"
1924 $ DEFINE/USER_MODE SYS$ERROR NL:
1925 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1929 $ IF (silent) THEN GOSUB Shut_up
1931 $ DEFINE/USER_MODE SYS$ERROR NL:
1932 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1936 $ IF (silent) THEN GOSUB Shut_up
1937 $ OPEN/WRITE CONFIG cxxvers.out
1939 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1940 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1945 $ IF (silent) THEN GOSUB Shut_up
1946 $ OPEN/READ CONFIG cxxvers.out
1947 $ READ/END_OF_FILE=Cxx_cleanup CONFIG line
1950 $ DELETE/NOLOG/NOCONFIRM cxxvers.*;
1951 $ echo "You are using CXX ''line'"
1954 $ CALL Cxx_demangler_cleanup
1957 $Cxx_demangler_cleanup: SUBROUTINE
1959 $! If we do build with CXX these demangler Dbs will be left all over.
1960 $! However, configure.com does try to remove the [.UU] sub directory.
1961 $! Be sure to set default to the correct place before calling this sub.
1964 $ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
1965 $ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
1967 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
1968 $ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
1972 $ ENDSUBROUTINE ! Cxx_demangler_cleanup
1977 $ OPEN/READ CONFIG ccvms.lis
1979 $ IF archname .EQS. "VMS_VAX"
1987 $ line = F$EDIT(line,"TRIM,COMPRESS")
1988 $ line = line - "Page 1" ! occurs at end all compilers
1989 $ line = line - "CCVMS " ! filename appears w/ VAXC
1990 $ line = line - "Source Listing " ! Seen w/ AXP DECC
1991 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
1993 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1994 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1998 $!: What should the include directory be ? (.TLB text libraries)
2000 $ rp = "Where are the include files you want to use? "
2001 $ IF f$length( rp + "[''dflt'] " ).gt.76
2002 $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
2003 $ ELSE rp = rp + "[''dflt'] "
2008 $!: see if we have to deal with yellow pages, now NIS.
2009 $!: now get the host name
2012 $ echo4 "Figuring out host name..." !>&4
2014 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
2015 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
2016 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
2017 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
2018 $ IF myhostname.eqs."".and. -
2019 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
2020 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
2021 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
2022 $ IF myhostname.eqs."".and. -
2023 F$TRNLNM("TCPIP$INET_HOST") .nes. "" .and. -
2024 F$TRNLNM("TCPIP$INET_DOMAIN") .nes. "" THEN -
2025 myhostname = F$TRNLNM("TCPIP$INET_HOST") + "." + F$TRNLNM("TCPIP$INET_DOMAIN")
2026 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
2027 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
2028 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
2029 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
2030 $!: you do not want to know about this
2032 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
2034 $ IF (.not.ans).and.(ans.NES."")
2036 $ READ SYS$COMMAND/PROMPT= -
2037 "Please type the (one word) name of your host: " ans
2040 $!: translate upper to lower if necessary
2041 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
2042 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
2043 $ IF mylowhostname.NES.myhostname
2045 $ echo "(Normalizing case in your host name)"
2046 $ myhostname = mylowhostname
2049 $ fp = F$LOCATE(".",myhostname)
2050 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
2051 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
2053 $ rp = "What is your domain name? [''mydomain'] "
2055 $ IF ans .nes. "" THEN mydomain = ans
2056 $!: translate upper to lower if necessary
2057 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
2058 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
2059 $ IF mylowdomain.NES.mydomain
2061 $ echo "(Normalizing case in your domain name)"
2062 $ mydomain = mylowdomain
2065 $ myhostname = myhostname - mydomain
2066 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
2072 I need to get your e-mail address in Internet format if possible, i.e.
2073 something like user@host.domain. Please answer accurately since I have
2074 no easy means to double check it. The default value provided below
2075 is most probably close to the reality but may not be valid from outside
2076 your organization...
2079 $ IF F$TYPE(cf_email) .EQS. ""
2081 $ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
2082 $ rp = "What is your e-mail address? [''dflt'] "
2085 $ THEN cf_email = ans
2086 $ ELSE cf_email = dflt
2095 If you or somebody else will be maintaining perl at your site, please
2096 fill in the correct e-mail address here so that they may be contacted
2097 if necessary. Currently, the "perlbug" program included with perl
2098 will send mail to this address in addition to perlbug@perl.com. You may
2099 enter "none" for no administrator.
2102 $ dflt = "''cf_email'"
2103 $ rp = "Perl administrator e-mail address [''dflt'] "
2106 $ THEN perladmin = ans
2107 $ ELSE perladmin = dflt
2110 $!: determine where public executable scripts go
2111 $!: determine perl absolute location
2112 $!: figure out how to guarantee perl startup
2114 $!: see how we invoke the C preprocessor
2116 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
2117 $!: Set private lib path
2118 $!: Now check and see which directories actually exist, avoiding duplicates
2119 $!: determine optimize, if desired, or use for debug flag also
2120 $!: We will not override a previous value, but we might want to
2121 $!: augment a hint file
2122 $!: the following weeds options from ccflags that are of no interest to cpp
2123 $!: flags used in final linking phase
2124 $!: Try to guess additional flags to pick up local libraries.
2127 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
2128 $!: compute shared library extension
2129 $!: Looking for optional libraries
2130 $!: see if nm is to be used to determine whether a symbol is defined or not
2131 $!: get list of predefined functions in a handy place
2132 $!: see if we have sigaction or sigprocmask
2133 $!: see whether socketshr exists
2134 $ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
2136 $ Has_socketshr = "T"
2138 $ echo4 "Hmm... Looks like you have SOCKETSHR Berkeley networking support."
2140 $ Has_socketshr = "F"
2142 $ IF (ccname .EQS. "DEC" .AND. Dec_C_Version .GE. 50200000) .OR. -
2143 (ccname .EQS. "CXX")
2145 $ Has_Dec_C_Sockets = "T"
2147 $ echo4 "Hmm... Looks like you have Dec C Berkeley networking support."
2149 $ Has_Dec_C_Sockets = "F"
2151 $ ! Hey, we've got both. Default to Dec C, then, since it's better
2152 $ IF Has_socketshr .OR. Has_Dec_C_Sockets
2155 $ echo "You have sockets available. Which socket stack do you want to"
2156 $ echo "build into Perl?"
2157 $ IF Has_Dec_C_Sockets
2161 $ dflt = "SOCKETSHR"
2163 $ rp = "Choose socket stack (NONE"
2164 $ IF Has_socketshr THEN rp = rp + ",SOCKETSHR"
2165 $ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
2166 $ rp = rp + ") [''dflt'] "
2168 $ IF ans .EQS. "" THEN ans = "''dflt'"
2169 $ Has_Dec_C_Sockets = "F"
2170 $ Has_socketshr = "F"
2171 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
2172 $ IF ans.eqs."decc" then Has_Dec_C_Sockets = "T"
2173 $ IF ans.eqs."socketshr" then Has_socketshr = "T"
2177 $! Ask if they want to build with VMS_DEBUG perl
2179 $ echo "Perl can be built to run under the VMS debugger."
2180 $ echo "You should only select this option if you are debugging"
2181 $ echo "perl itself. This can be a useful feature if you are "
2182 $ echo "embedding perl in a program."
2184 $ rp = "Build a VMS-DEBUG version of Perl? [''dflt'] "
2186 $ IF ans.eqs."" then ans = dflt
2187 $ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
2189 $ use_vmsdebug_perl = "Y"
2190 $ macros = macros + """__DEBUG__=1"","
2192 $ use_vmsdebug_perl = "N"
2195 $! Ask if they want to build with DEBUGGING
2197 $ echo "Perl can be built with extra runtime debugging enabled. This"
2198 $ echo "enables the -D switch, at the cost of some performance. It"
2199 $ echo "was mandatory on perl 5.005 and before on VMS, but is now"
2200 $ echo "optional. If you do not generally use it you should probably"
2201 $ echo "leave this off and gain a bit of extra speed."
2203 $ rp = "Build a DEBUGGING version of Perl? [''dflt'] "
2205 $ IF ans.eqs."" then ans = dflt
2206 $ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
2208 $ use_debugging_perl = "Y"
2210 $ use_debugging_perl = "N"
2213 $! Ask if they want to build with MULTIPLICITY
2215 $ echo "Perl can be built so that multiple Perl interpreters can coexist"
2216 $ echo "within the same Perl executable."
2217 $ echo "There is some performance overhead, however, so you"
2218 $ echo "probably do not want to choose this unless you are going to be"
2219 $ echo "doing things with embedded perl."
2221 $ rp = "Build Perl for multiplicity? [''dflt'] "
2223 $ IF ans.eqs."" then ans = dflt
2226 $ usemultiplicity="define"
2228 $ usemultiplicity="undef"
2231 $! Ask if they want to build with 64-bit support
2232 $ IF (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2234 $ dflt = use64bitint
2236 $ echo "You can have native 64-bit long integers."
2238 $ echo "Perl can be built to take advantage of 64-bit integer types"
2239 $ echo "on some systems, which provide a much larger range for perl's"
2240 $ echo "mathematical operations. (Note that does *not* enable 64-bit"
2241 $ echo "fileops at the moment, as Dec C doesn't do that yet)."
2242 $ echo "Choosing this option will most probably introduce binary incompatibilities."
2244 $ echo "If this does not make any sense to you, just accept the default ''dflt'."
2245 $ rp = "Try to use 64-bit integers, if available? [''dflt'] "
2247 $ IF ans .EQS. "" THEN ans = dflt
2249 $ THEN use64bitint="Y"
2250 $ ELSE use64bitint="N"
2254 $ dflt = use64bitall
2256 $ echo "Since you chose 64-bitness you may want to try maximal 64-bitness."
2257 $ echo "What you have chosen is minimal 64-bitness which means just enough"
2258 $ echo "to get 64-bit integers. The maximal means using as much 64-bitness"
2259 $ echo "as is possible on the platform. This in turn means even more binary"
2260 $ echo "incompatibilities. On the other hand, your platform may not have"
2261 $ echo "any more maximal 64-bitness than what you already have chosen."
2263 $ echo "If this does not make any sense to you, just accept the default ''dflt'."
2264 $ rp = "Try to use full 64-bit support, if available? [''dflt'] "
2266 $ IF ans .EQS. "" THEN ans = dflt
2268 $ THEN use64bitall="Y"
2269 $ ELSE use64bitall="N"
2272 $ ENDIF ! AXP && >= 7.1
2274 $! Ask about threads, if appropriate
2275 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
2278 $ echo "This version of Perl can be built with threads. While really nifty,"
2279 $ echo "they are a beta feature, and there is a speed penalty for perl"
2280 $ echo "programs if you build with threads *even if you do not use them*."
2282 $ rp = "Build with threads? [''dflt'] "
2284 $ if ans.eqs."" then ans = dflt
2285 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
2288 $ ! Shall we do the 5.005-stype threads, or IThreads?
2289 $ echo "As of 5.5.640, Perl has two different internal threading"
2290 $ echo "implementations, the 5.005 version (5005threads) and an"
2291 $ echo "interpreter-based version (ithreads) that has one"
2292 $ echo "interpreter per thread. Both are very experimental. This"
2293 $ echo "arrangement exists to help developers work out which one"
2296 $ echo "If you are a casual user, you probably do not want"
2297 $ echo "interpreter-threads at this time. There doesn't yet exist"
2298 $ echo "a way to create threads from within Perl in this model,"
2299 $ echo "i.e., ""use Thread;"" will NOT work."
2302 $ rp = "Build with Interpreter threads? [''dflt'] "
2304 $ if ans.eqs."" then ans = dflt
2305 $ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
2308 $ use_5005_threads="N"
2311 $ use_5005_threads="Y"
2313 $ ! Are they on VMS 7.1 on an alpha?
2314 $ if (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2317 $ echo "Threaded perl can be linked to use multiple kernel threads"
2318 $ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature"
2319 $ echo "allows multiple threads to execute simultaneously on an SMP"
2320 $ echo "system as well as preventing a single thread from blocking"
2321 $ echo "all the threads in a program, even on a single-processor"
2322 $ echo "machine. Unfortunately, this feature isn't safe on an"
2323 $ echo "unpatched 7.1 system (several OS patches were required when"
2324 $ echo "this procedure was written)."
2326 $ rp = "Enable multiple kernel threads and upcalls? [''dflt'] "
2328 $ if ans.eqs."" then ans="''dflt'"
2329 $ if f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")).eqs."Y"
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 $ dflt = be_case_sensitive
2351 $ rp = "Build with case-sensitive symbols? [''dflt'] "
2353 $ IF ans .EQS. "" THEN ans="''dflt'"
2354 $ be_case_sensitive = "''ans'"
2357 $ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers"
2358 $ echo "internally on Alpha, but if you need G_FLOAT for binary compatibility"
2359 $ echo "with an external library or existing data, you may wish to disable"
2360 $ echo "the IEEE math option."
2361 $ dflt = use_ieee_math
2362 $ rp = "Use IEEE math? [''dflt'] "
2364 $ IF ans .eqs. "" THEN ans = "''dflt'"
2365 $ use_ieee_math = "''ans'"
2369 $ echo "Your compiler may want other flags. For this question you should include"
2370 $ echo "/INCLUDE=(whatever) and /DEFINE=(whatever), flags and any other flags"
2371 $ echo "or qualifiers used by the compiler."
2373 $ echo "To use no flags, specify the word ""none""."
2374 $ dflt = user_c_flags
2375 $ rp = "Any additional cc flags? [''dflt'] "
2377 $ IF ans .EQS. "" THEN ans = "''dflt'"
2378 $ IF ans .EQS. "none" THEN ans = ""
2379 $ user_c_flags = "''ans'"
2381 $! Ask whether they want to use secure logical translation when tainting
2383 $ echo "As Perl starts up, it checks several logical names, such as"
2384 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2385 $ echo "of its behavior. For additional security, you may limit this"
2386 $ echo "process to executive- and kernel-mode translation when tainting"
2387 $ echo "is enabled. In this case, logical names normally skipped when"
2388 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2389 $ echo "If you do not choose to do this, the usual order of access modes"
2390 $ echo "is used for logical name translation."
2392 $ echo "This restriction does not apply to the %ENV hash or to implicit"
2393 $ echo "logical name translation during parsing of file specifications;"
2394 $ echo "these always use the normal sequence of access modes for logical"
2395 $ echo "name translation."
2397 $ rp = "Use secure logical name translation? [''dflt'] "
2399 $ IF ans .eqs. "" THEN ans = dflt
2401 $ THEN d_secintgenv := Y
2402 $ ELSE d_secintgenv := N
2405 $! Ask whether they want to default filetypes
2407 $ echo "When you pass the name of a program to Perl on the command line,"
2408 $ echo "it generally doesn't supply any defaults unless the -S command"
2409 $ echo "line switch is specified. In keeping with the VMS tradition of"
2410 $ echo "default file types, however, you can configure Perl to try default"
2411 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2412 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2413 $ echo "finally foo.com)."
2415 $ echo "This is currently broken in some configurations. Only enable it if"
2416 $ echo "you know what you are doing."
2418 $ rp = "Always use default file types? [''dflt'] "
2420 $ IF ans .EQS. "" THEN ans = dflt
2422 $ THEN d_alwdeftype := Y
2423 $ ELSE d_alwdeftype := N
2425 $! Ask if they want to use perl's memory allocator
2427 $ echo "Perl has a built-in memory allocator that is tuned for normal"
2428 $ echo "memory usage. It is oftentimes better than the standard system"
2429 $ echo "memory allocator. It also has the advantage of providing memory"
2430 $ echo "allocation statistics, if you choose to enable them."
2432 $ IF F$TYPE(usemymalloc) .EQS. "STRING"
2434 $ IF usemymalloc THEN dflt = "y"
2436 $ rp = "Do you wish to attempt to use the malloc that comes with ''package'? [''dflt'] "
2438 $ IF ans .eqs. "" THEN ans = dflt
2440 $ THEN mymalloc := Y
2441 $ ELSE mymalloc := N
2445 $ IF use_debugging_perl
2448 $ echo "Perl can keep statistics on memory usage if you choose to use"
2449 $ echo "them. This is useful for debugging, but does have some"
2450 $ echo "performance overhead."
2452 $ rp = "Do you want the debugging memory allocator? [''dflt'] "
2454 $ IF ans .eqs. "" THEN ans = "''dflt'"
2455 $ use_debugmalloc = f$extract(0, 1, f$edit(ans, "COLLAPSE,UPCASE"))
2457 $ ! Check which memory allocator we want
2459 $ echo "There are currently three different memory allocators: the"
2460 $ echo "default (which is a pretty good general-purpose memory manager),"
2461 $ echo "the TWO_POT allocator (which is optimized to save memory for"
2462 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save"
2463 $ echo "memory for smaller allocations). They're all good, but if your"
2464 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use"
2465 $ echo "PACK_MALLOC."
2467 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2469 $ if ans.eqs."" then ans = "''dflt'"
2470 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2471 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2474 $ known_extensions = ""
2476 $ OPEN/READ CONFIG 'manifestfound'
2478 $ READ/END_OF_FILE=end_ext/ERROR=end_ext CONFIG line
2479 $ IF F$EXTRACT(0,4,line) .NES. "ext/" .AND. -
2480 F$EXTRACT(0,8,line) .NES. "vms/ext/" THEN goto ext_loop
2481 $ line = F$EDIT(line,"COMPRESS")
2482 $ line = F$ELEMENT(0," ",line)
2483 $ line_len = F$LENGTH(line)
2484 $ IF F$EXTRACT(line_len - 12,12,line) .NES. "/Makefile.PL" THEN goto ext_loop
2485 $ IF F$EXTRACT(0,4,line) .EQS. "ext/" THEN -
2486 xxx = F$EXTRACT(4,line_len - 16,line)
2487 $ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit
2488 $ IF xxx .EQS. "SDBM_File/sdbm" THEN goto ext_loop ! sub extension - omit
2489 $ IF F$EXTRACT(0,8,line) .EQS. "vms/ext/" THEN -
2490 xxx = "VMS/" + F$EXTRACT(8,line_len - 20,line)
2491 $ known_extensions = known_extensions + " ''xxx'"
2496 $ known_extensions = F$EDIT(known_extensions,"TRIM,COMPRESS")
2497 $ dflt = known_extensions
2498 $ IF ccname .NES. "DEC" .AND. ccname .NES. "CXX"
2500 $ dflt = dflt - "POSIX" ! not with VAX C or GCC
2502 $ dflt = dflt - "ByteLoader" ! needs to be ported
2503 $ dflt = dflt - "DB_File" ! needs to be ported
2504 $ dflt = dflt - "GDBM_File" ! needs porting/special library
2505 $ dflt = dflt - "IPC/SysV" ! needs to be ported
2506 $ dflt = dflt - "NDBM_File" ! needs porting/special library
2507 $ dflt = dflt - "ODBM_File" ! needs porting/special library
2508 $ dflt = dflt - "Sys/Syslog" ! needs porting/special library "GDBM_File macro LOG_DEBUG"
2509 $ IF .NOT. Has_socketshr .AND. .NOT. Has_Dec_C_Sockets
2511 $ dflt = dflt - "Socket" ! optional on VMS
2513 $ IF .NOT. use_ithreads THEN dflt = dflt - "threads"
2514 $ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
2516 $! Ask for their default list of extensions to build
2518 $ echo "It is time to specify which modules you want to build into"
2519 $ echo "perl. Most of these are standard and should be chosen, though"
2520 $ echo "you might, for example, want to build GDBM_File instead of"
2521 $ echo "SDBM_File if you have the GDBM library built on your machine."
2523 $ echo "Which modules do you want to build into perl?"
2526 $ if ans .eqs. "" then ans = "''dflt'"
2527 $ extensions = F$EDIT(ans,"TRIM,COMPRESS")
2529 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2531 $ echo "Checking your ""make"" utilities..."
2532 $! If the 'build' that you use is not here add it and it's test
2533 $! switch to the _END_ of these strings (and increment max_build)
2534 $! (e.g. builders = builders + "/FOOMAKE"
2535 $! probers = probers + " -fooVersionSwitch"
2536 $! ) & please let me know about it.
2537 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2538 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2544 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2545 $ WRITE CONFIG "dont_make_anything_yet:"
2546 $ WRITE CONFIG F$FAO("!_")
2549 $ messages = F$ENVIRONMENT("MESSAGE")
2551 $ build = F$ELEMENT(n,"/",builders)
2552 $ probe = F$ELEMENT(n,"!",probers)
2553 $ echo "Testing whether you have ''build' on your system..."
2555 $! Noted with GNU Make version 3.60 that the $status and $severity
2556 $! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2557 $! $SEVERITY == "4".
2560 $ ON CONTROL_Y THEN GOTO Reenable_messages_build
2561 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
2563 $ IF ($SEVERITY .EQ. 1) ! not adequate?
2566 $ IF (build .EQS. orig_dflt)
2568 $ default_set = "TRUE"
2571 $ ok_builders = ok_builders + " " + build
2572 $ IF (.NOT. default_set) THEN dflt = build
2576 $Reenable_messages_build:
2577 $ SET MESSAGE 'messages'
2580 $ IF (n .LT. max_build) THEN GOTO Build_probe
2583 $ IF (ok_builders .NES. "")
2585 $ echo "Here is the list of builders you can apparently use:"
2586 $ echo "(",ok_builders," )"
2587 $ rp = "Which """"make"""" utility do you wish to use? [''dflt'] "
2589 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2590 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2599 %Config-E-VMS, ERROR:
2600 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
2601 utility of some sort and after checking my "builders" list I cannot find
2602 the symbol or command you use on your system to compile programs.
2605 $ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
2606 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2607 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2610 $ echo "I do not know where ""make"" is, and my life depends on it."
2611 $ echo "Go find a make program or fix your DCL$PATH setting!"
2612 $ echo "ABORTING..."
2613 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2615 $ EXIT 2 !$STATUS = "%X00000002" (error)
2621 $ DELETE/NOLOG Makefile.;
2627 There seems to be trouble. I just tried to create a file in
2629 $ echo4 'F$ENVIRONMENT("DEFAULT")'
2632 but was unsuccessful. I am stopping now. Please check that directories'
2633 PROTECTION bits. I will leave you in the directory where you started
2636 $ echo4 "ABORTING..."
2642 $! echo " Very well I will proceed with ""''build'"""
2643 $ make = F$EDIT(build,"UPCASE")
2645 $!: locate the preferred pager for this system
2646 $!pagers = "most|more|less|type/page"
2647 $ dflt = "type/page"
2648 $! assume that the presence of a most symbol indicates the presence
2650 $ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most"
2651 $ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager
2652 $ rp="What pager is used on your system? [''dflt'] "
2659 $! update [.vms]config.vms here
2661 $! update makefile here
2662 $! echo4 "Updating makefile..."
2664 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2666 $ makefile = "" !wrt MANIFEST dir
2667 $ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
2668 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
2669 $ Makefile_SH = "descrip_mms.template"
2671 $ makefile = " -f Makefile." !wrt MANIFEST dir
2672 $ UUmakefile = "[-]Makefile." !wrt CWD dir
2673 $ DEFmakefile = "Makefile." !wrt DEF dir (?)
2674 $ Makefile_SH = "Makefile.in"
2677 $ IF macros .NES. ""
2679 $ tmp = F$LENGTH(macros)
2680 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2681 $ macros = "/macro=(" + macros + ")"
2683 $! Build up the extra C flags
2687 $ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm_results"
2689 $ IF be_case_sensitive
2691 $ extra_flags = "''extra_flags'" + "/Names=As_Is"
2693 $ extra_flags = "''extra_flags'" + "''user_c_flags'"
2695 $ min_pgflquota = "100000"
2696 $ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
2697 $ IF pgflquota .LES. min_pgflquota
2699 $ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
2700 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
2703 $ echo4 "Continuing..."
2705 $ echo4 "ABORTING..."
2710 $! PerlIO abstraction
2713 $ IF F$TYPE(useperlio) .NES. ""
2715 $ IF useperlio THEN dflt = "y"
2716 $ IF useperlio .EQS. "define" THEN dflt = "y"
2720 $ echo "Previous version of ''package' used the standard IO mechanisms as"
2723 defined in <stdio.h>. Versions 5.003_02 and later of perl allow
2724 alternate IO mechanisms via the PerlIO abstraction layer, but the
2725 stdio mechanism is still the default. This abstraction layer can
2726 use AT&T's sfio (if you already have sfio installed) or regular stdio.
2727 Using PerlIO with sfio may cause problems with some extension modules.
2730 $ echo "If this does not make any sense to you, just accept the default '" + dflt + "'."
2732 $ rp = "Use the experimental PerlIO abstraction layer? [''dflt'] "
2734 $ IF ans .EQS. "" THEN ans = dflt
2737 $ useperlio = "define"
2739 $ echo "Ok, doing things the stdio way."
2740 $ useperlio = "undef"
2744 $ echo4 "Checking the C run-time library."
2746 $! Former SUBCONFIGURE.COM
2748 $! - build a config.sh for VMS Perl.
2749 $! - use built config.sh to take config_h.SH -> config.h
2750 $! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
2751 $! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
2752 $! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
2754 $! Note for folks from other platforms changing things in here:
2756 $! Fancy changes (based on compiler capabilities or VMS version or
2757 $! whatever) are tricky, so go ahead and punt on those.
2759 $! Simple changes, though (say, always setting something to 1, or undef,
2760 $! or something like that) are straightforward. Adding a new constant
2761 $! item for the ultimately created config.sh requires at least one
2762 $! (possibly more) line(s) to this file.
2764 $! Add a line in the format:
2766 $! $ WC "foo='undef'"
2768 $! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
2769 $! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
2770 $! is sorted ASCII and corresponds to the output of config.sh in the
2771 $! Bourne shell version of Configure).
2772 $! Be very careful with quoting, as it can be tricky.
2773 $! For example if instead of a constant string like 'undef' or 'define'
2774 $! you wanted to add something to VMS's config.sh that looks like:
2778 $! then add a line that looks like this before the
2779 $! '##END WRITE NEW CONSTANTS HERE##' tagged line:
2781 $! $ WC "blank_string='" + "'"
2783 $! (+ is the string concatenator and "''var'" has the effect
2784 $! of "${var}" in perl or sh, but "'const'" is not interpolated).
2786 $! Note that unitialized variables, such as a line like:
2788 $! $ WC "new_var='" + new_var + "'"
2790 $! should be avoided unless new_var has a value assigned prior
2791 $! to that line (think of perl's -w warnings).
2793 $! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
2797 $ vms_ver = F$EXTRACT(1,3, osvers)
2798 $ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
2799 $ MCC = f$edit(mcc, "UPCASE")
2800 $ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
2801 $ IF ccname .EQS. "DEC"
2803 $ Checkcc := "''Mcc'/prefix=all"
2805 $ IF ccname .EQS. "CXX"
2809 $ Checkcc := "''Mcc'"
2812 $ ccflags = ccflags + extra_flags
2813 $ IF be_case_sensitive
2815 $ d_vms_be_case_sensitive = "define"
2817 $ d_vms_be_case_sensitive = "undef"
2819 $! Some constant defaults.
2820 $ hwname = f$getsyi("HW_NAME")
2821 $ myname = myhostname
2822 $ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
2827 $ IF use64bitint .OR. use64bitint .EQS. "define"
2829 $ use64bitint = "define"
2830 $ uselargefiles = "define"
2831 $ uselongdouble = "define"
2833 $ usemorebits = "define"
2835 $ use64bitint = "undef"
2836 $ uselargefiles = "undef"
2837 $ uselongdouble = "undef"
2838 $ usemorebits = "undef"
2840 $ IF use64bitall .OR. use64bitall .EQS. "define"
2842 $ use64bitall = "define"
2844 $ use64bitall = "undef"
2847 $ usemymalloc=mymalloc
2851 $ IF (sharedperl .AND. archname .EQS. "VMS_AXP")
2865 $ dlobj="dl_vms''obj_ext'"
2867 $ cppstdin="''perl_cc'/noobj/preprocess=sys$output sys$input"
2869 $ cpprun="''perl_cc'/noobj/preprocess=sys$output sys$input"
2877 $ THEN d_mymalloc="define"
2878 $ ELSE d_mymalloc="undef"
2882 $ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
2883 $ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
2885 $ IF ((Use_Threads) .AND. (vms_ver .LES. "6.2"))
2887 $ 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"
2891 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
2898 $! perllibs should be libs with all non-core libs (such as gdbm) removed.
2904 $ IF use64bitint .OR. use64bitint .EQS. "define"
2906 $ d_PRId64 = "define"
2907 $ d_PRIEUldbl = "define"
2908 $ d_PRIFUldbl = "define"
2909 $ d_PRIGUldbl = "define"
2910 $ d_PRIeldbl = "define"
2911 $ d_PRIfldbl = "define"
2912 $ d_PRIgldbl = "define"
2913 $ d_PRIu64 = "define"
2914 $ d_PRIo64 = "define"
2915 $ d_PRIx64 = "define"
2916 $ sPRId64 = """Ld"""
2917 $ sPRIEUldbl = """LE"""
2918 $ sPRIFUldbl = """LF"""
2919 $ sPRIGUldbl = """LG"""
2920 $ sPRIXU64 = """LX"""
2921 $ sPRIeldbl = """Le"""
2922 $ sPRIfldbl = """Lf"""
2923 $ sPRIgldbl = """Lg"""
2924 $ sPRIi64 = """Li"""
2925 $ sPRIo64 = """Lo"""
2926 $ sPRIu64 = """Lu"""
2927 $ sPRIx64 = """Lx"""
2929 $ quadtype = "long long"
2930 $ uquadtype = "unsigned long long"
2931 $ quadkind = "QUAD_IS_LONG_LONG"
2932 $ d_frexpl = "define"
2933 $ d_isnan = "define"
2934 $ d_isnanl = "define"
2935 $ d_modfl = "define"
2937 $ d_PRId64 = "undef"
2938 $ d_PRIEUldbl = "define"
2939 $ d_PRIFUldbl = "define"
2940 $ d_PRIGUldbl = "define"
2941 $ d_PRIXU64 = "undef"
2942 $ d_PRIeldbl = "define"
2943 $ d_PRIfldbl = "undef"
2944 $ d_PRIgldbl = "undef"
2945 $ d_PRIu64 = "undef"
2946 $ d_PRIo64 = "undef"
2947 $ d_PRIx64 = "undef"
2949 $ sPRIEUldbl = """E"""
2950 $ sPRIFUldbl = """F"""
2951 $ sPRIGUldbl = """G"""
2952 $ sPRIXU64 = """lX"""
2953 $ sPRIeldbl = """e"""
2954 $ sPRIfldbl = """f"""
2955 $ sPRIgldbl = """g"""
2962 $ uquadtype = "unsigned long"
2963 $ quadkind = "QUAD_IS_LONG"
2964 $ d_frexpl = "undef"
2966 $ d_isnanl = "undef"
2969 $ d_SCNfldbl = d_PRIfldbl
2970 $ sSCNfldbl = sPRIfldbl ! expect consistency
2972 $! Now some that we build up
2976 $ IF use_5005_threads
2978 $ arch = "''arch'-thread"
2979 $ archname = "''archname'-thread"
2980 $ d_old_pthread_create_joinable = "undef"
2981 $ old_pthread_create_joinable = " "
2982 $ use5005threads = "define"
2983 $ useithreads = "undef"
2985 $ arch = "''arch'-ithread"
2986 $ archname = "''archname'-ithread"
2987 $ d_old_pthread_create_joinable = "undef"
2988 $ old_pthread_create_joinable = " "
2989 $ use5005threads = "undef"
2990 $ useithreads = "define"
2993 $ d_old_pthread_create_joinable = "undef"
2994 $ old_pthread_create_joinable = " "
2995 $ use5005threads = "undef"
2996 $ useithreads = "undef"
2999 $! Some that we need to invoke the compiler for
3002 $! handy construction aliases/symbols
3004 $ OS := "open/write CONFIG []try.c"
3005 $ WS := "write CONFIG"
3006 $ CS := "close CONFIG"
3007 $ DS := "delete/nolog/noconfirm []try.*;*"
3009 $ good_compile = %X10B90001
3010 $ IF ccname .EQS. "GCC"
3012 $ open/write OPTCHAN []try.opt
3013 $ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
3014 $ write OPTCHAN "Sys$Share:VAXCRTL/Share"
3017 $ good_compile = %X10000001
3019 $ IF ccname .EQS. "CXX"
3021 $ good_compile = %X15F60001
3023 $ good_link = %X10000001
3024 $ tmp = "" ! null string default
3026 $ GOTO beyond_compile_ok
3028 $! Check for type sizes
3033 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3034 $ WS "#include <stdlib.h>"
3036 $ WS "#include <stdio.h>"
3039 $ WS "printf(""%d\n"", sizeof(''tmp'));"
3046 $!: locate header file
3050 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3051 $ WS "#include <stdlib.h>"
3053 $ WS "#include <stdio.h>"
3054 $ WS "#include <''tmp'>"
3057 $ WS "printf(""define\n"");"
3064 $!: define an alternate in-header-list? function
3068 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3070 $ echo4 "<''tmp'> found."
3073 $ echo4 "<''tmp'> NOT found."
3078 $!: define an is-in-libc? function
3081 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3083 $ echo4 "''tmp'() found."
3086 $ echo4 "''tmp'() NOT found."
3091 $!: define a shorthand compile call
3095 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3097 $ OPEN/WRITE CONFIG []try.out
3098 $ DEFINE/USER_MODE SYS$ERROR CONFIG
3099 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
3102 $ OPEN/READ CONFIG []try.out
3105 $ DELETE/NOLOG/NOCONFIRM []try.out;
3106 $ DELETE/NOLOG/NOCONFIRM []try.exe;
3108 $ tmp = "" ! null string default
3114 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3115 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3119 $ 'ld' try.obj,try.opt/opt
3120 $ link_status = $status
3123 $ link_status = $status
3126 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
3129 $!: define a shorthand compile call for compilations that should be ok.
3131 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3132 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3135 $ compile_status = $status
3137 $ DELETE/NOLOG/NOCONFIRM try.c;
3142 $! Check for __STDC__
3145 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3146 $ WS "#include <stdlib.h>"
3148 $ WS "#include <stdio.h>"
3151 $ WS "#ifdef __STDC__"
3152 $ WS "printf(""42\n"");"
3154 $ WS "printf(""1\n"");"
3161 $ IF F$INTEGER(tmp) .eq. 42
3163 $ echo4 "Your C compiler and pre-processor defines the symbol:"
3167 $! Check for double size
3169 $ echo4 "Checking to see how big your double precision numbers are..."
3171 $ GOSUB type_size_check
3173 $ echo "Your double is ''doublesize' bytes long."
3175 $! Check for long double size
3178 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3179 $ WS "#include <stdlib.h>"
3181 $ WS "#include <stdio.h>"
3184 $ WS "printf(""%d\n"", sizeof(long double));"
3188 $ echo4 "Checking to see if you have long double..."
3190 $ IF link_status .NE. good_link
3194 $ echo "You do not have long double."
3196 $ echo "You have long double."
3197 $ echo4 "Checking to see how big your long doubles are..."
3200 $ d_longdbl = "define"
3201 $ echo "Your long doubles are ''longdblsize' bytes long."
3204 $!: check for long long
3206 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3207 $ WS "#include <stdlib.h>"
3209 $ WS "#include <stdio.h>"
3212 $ WS "printf(""%d\n"", sizeof(long long));"
3216 $ echo4 "Checking to see if you have long long..."
3218 $ IF link_status .NE. good_link
3221 $ d_longlong="undef"
3222 $ echo "You do not have long long."
3224 $ echo "You have long long."
3225 $ echo4 "Checking to see how big your long longs are..."
3227 $ longlongsize = tmp
3228 $ d_longlong = "define"
3229 $ echo "Your long longs are ''longlongsize' bytes long."
3232 $! Check the prototype for getgid
3234 $ echo "Looking for the type for group ids returned by getgid()."
3236 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3237 $ WS "#include <stdlib.h>"
3239 $ WS "#include <stdio.h>"
3240 $ WS "#include <types.h>"
3248 $ IF compile_status .NE. good_compile
3250 $! Okay, gid_t failed. Must be unsigned int
3251 $ gidtype = "unsigned int"
3252 $ echo4 "assuming ""''gidtype'""."
3255 $ echo4 "gid_t found."
3258 $! Check to see if we've got dev_t
3260 $ echo "Looking for the type for dev."
3262 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3263 $ WS "#include <stdlib.h>"
3265 $ WS "#include <stdio.h>"
3266 $ WS "#include <types.h>"
3274 $ IF compile_status .NE. good_compile
3276 $! Okay, dev_t failed. Must be unsigned int
3277 $ devtype = "unsigned int"
3278 $ echo4 "assuming ""''devtype'""."
3281 $ echo4 "dev_t found."
3284 $! Check to see if we've got unistd.h (which we ought to, but you never know)
3291 $!: see if this is a libutil.h system
3297 $! Check to see if we've got shadow.h (probably not, but...)
3303 $! Check to see if we've got socks.h (probably not, but...)
3309 $! Check the prototype for select
3311 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3314 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3315 $ WS "#include <stdlib.h>"
3317 $ WS "#include <stdio.h>"
3318 $ WS "#include <types.h>"
3319 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3322 $ WS "#include <socketshr.h>"
3324 $ WS "#include <time.h>"
3325 $ WS "#include <socket.h>"
3332 $ WS "bar = select(2, foo, foo, foo, NULL);"
3337 $ IF compile_status .NE. good_compile
3339 $! Okay, select failed. Must be an int *
3340 $ selecttype = "int *"
3341 $ echo4 "select() NOT found."
3343 $ selecttype="fd_set *"
3344 $ echo4 "select() found."
3347 $ ! No sockets, so stick in an int * : no select, so pick a harmless default
3348 $ selecttype = "int *"
3351 $! Check to see if fd_set exists
3353 $ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3355 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3356 $ WS "#include <stdlib.h>"
3358 $ WS "#include <stdio.h>"
3359 $ WS "#include <types.h>"
3362 $ WS "#include <socketshr.h>"
3364 $ IF Has_Dec_C_Sockets
3366 $ WS "#include <time.h>"
3367 $ WS "#include <socket.h>"
3377 $ IF compile_status .ne. good_compile
3379 $! Okay, fd_set failed. Must not exist
3380 $ d_fd_set = "undef"
3381 $ echo4 "Hmm, your compiler has some difficulty with fd_set."
3384 $ echo4 "Well, your system knows about the normal fd_set typedef..."
3387 $! Check for inttypes.h
3389 $ tmp = "inttypes.h"
3393 $! Check to see if off64_t exists
3395 $ echo4 "Checking to see if you have off64_t..."
3397 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3398 $ WS "#include <stdlib.h>"
3400 $ WS "#include <stdio.h>"
3401 $ WS "#include <types.h>"
3402 $ WS "#''i_inttypes' IIH"
3404 $ WS "#include <inttypes.h>"
3413 $ IF compile_status .EQ. good_compile
3415 $ d_off64_t="define"
3416 $ echo "You have off64_t."
3418 $ d_off64_t = "undef"
3419 $ echo "You do not have off64_t."
3422 $! Check to see if fpos64_t exists
3424 $ echo4 "Checking to see if you have fpos64_t..."
3426 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3427 $ WS "#include <stdlib.h>"
3429 $ WS "#include <stdio.h>"
3430 $ WS "#include <types.h>"
3431 $ WS "#''i_inttypes' IIH"
3433 $ WS "#include <inttypes.h>"
3437 $ WS "fpos64_t bar;"
3442 $ IF compile_status .EQ. good_compile
3444 $ d_fpos64_t="define"
3445 $ echo "You have fpos64_t."
3447 $ d_fpos64_t = "undef"
3448 $ echo "You do not have fpos64_t."
3451 $! Check to see if int64_t exists
3453 $ echo4 "Checking to see if you have int64_t..."
3455 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3456 $ WS "#include <stdlib.h>"
3458 $ WS "#include <stdio.h>"
3459 $ WS "#include <types.h>"
3460 $ WS "#''i_inttypes' IIH"
3462 $ WS "#include <inttypes.h>"
3471 $ IF compile_status .EQ. good_compile
3473 $ d_int64_t="define"
3474 $ echo "You have int64_t."
3476 $ d_int64_t = "undef"
3477 $ echo "You do not have int64_t."
3480 $!: see if this is a netdb.h system
3481 $ IF Has_Dec_C_Sockets
3488 $! Check for h_errno
3490 $ echo4 "Checking to see if you have h_errno..."
3492 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3493 $ WS "#include <stdlib.h>"
3495 $ WS "#include <stdio.h>"
3496 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3497 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
3505 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3508 $ echo "You have h_errno."
3511 $ echo "You do not have h_errno."
3514 $! Check to see if gethostname exists
3516 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3519 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3520 $ WS "#include <stdlib.h>"
3522 $ WS "#include <stdio.h>"
3523 $ WS "#include <types.h>"
3526 $ WS "#include <socketshr.h>"
3528 $ WS "#include <time.h>"
3529 $ WS "#include <socket.h>"
3533 $ WS "char name[100];"
3534 $ WS "int bar, baz;"
3536 $ WS "baz = gethostname(name, bar);"
3541 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3543 $ d_gethname="define"
3544 $ echo4 "gethostname() found."
3546 $ d_gethname="undef"
3549 $ ! No sockets, so no gethname
3550 $ d_gethname = "undef"
3553 $! Check for sys/file.h
3555 $ tmp = "sys/file.h"
3559 $! Check for sys/utsname.h
3561 $ tmp = "sys/utsname.h"
3563 $ i_sysutsname = tmp
3565 $! Check for syslog.h
3577 $! Check for sys/uio.h
3583 $! Check for sys/mode.h
3585 $ tmp = "sys/mode.h"
3589 $! Check for sys/access.h
3591 $ tmp = "sys/access.h"
3595 $! Check for sys/security.h
3597 $ tmp = "sys/security.h"
3601 $! Check for fcntl.h
3610 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3611 $ WS "#include <stdlib.h>"
3613 $ WS "#include <stdio.h>"
3614 $ WS "#include <fcntl.h>"
3617 $ WS "fcntl(1,2,3);"
3625 $! Check for fcntl locking capability
3627 $ echo4 "Checking if fcntl-based file locking works... "
3629 $ IF d_fcntl .EQS. "define"
3632 $ WS "#include <stdio.h>"
3633 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3634 $ WS "#include <stdlib.h>"
3636 $ WS "#include <fcntl.h>"
3637 $ WS "#include <unistd.h>"
3639 $ WS "#if defined(F_SETLK) && defined(F_SETLKW)"
3640 $ WS " struct flock flock;"
3641 $ WS " int retval, fd;"
3642 $ WS " fd = open(""try.c"", O_RDONLY);"
3643 $ WS " flock.l_type = F_RDLCK;"
3644 $ WS " flock.l_whence = SEEK_SET;"
3645 $ WS " flock.l_start = flock.l_len = 0;"
3646 $ WS " retval = fcntl(fd, F_SETLK, &flock);"
3648 $ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));"
3650 $ WS " printf(""undef\n"");"
3655 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3658 $ IF tmp .EQS. "define"
3660 $ echo4 "Yes, it seems to work."
3662 $ echo4 "Nope, it didn't work."
3665 $ echo4 "I'm unable to compile the test program, so I'll assume not."
3669 $ echo4 "Nope, since you don't even have fcntl()."
3671 $ d_fcntl_can_lock = tmp
3676 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3677 $ WS "#include <stdlib.h>"
3679 $ WS "#include <string.h>"
3682 $ WS "char * place;"
3683 $ WS "place = memchr(""foo"", 47, 3);"
3691 $! Check for strtoull
3694 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3695 $ WS "#include <stdlib.h>"
3697 $ WS "#include <string.h>"
3700 $ WS "unsigned __int64 result;"
3701 $ WS "result = strtoull(""123123"", NULL, 10);"
3709 $! Check for strtouq
3712 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3713 $ WS "#include <stdlib.h>"
3715 $ WS "#include <string.h>"
3718 $ WS "unsigned __int64 result;"
3719 $ WS "result = strtouq(""123123"", NULL, 10);"
3727 $! Check for strtoll
3730 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3731 $ WS "#include <stdlib.h>"
3733 $ WS "#include <string.h>"
3736 $ WS "__int64 result;"
3737 $ WS "result = strtoll(""123123"", NULL, 10);"
3748 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3749 $ WS "#include <stdlib.h>"
3751 $ WS "#include <string.h>"
3754 $ WS "__int64 result;"
3755 $ WS "result = strtoq(""123123"", NULL, 10);"
3766 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3767 $ WS "#include <stdlib.h>"
3769 $ WS "#include <string.h>"
3772 $ WS "__int64 result;"
3773 $ WS "result = strtoq(""123123"", NULL, 10);"
3781 $! Check for strtold
3784 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3785 $ WS "#include <stdlib.h>"
3787 $ WS "#include <string.h>"
3790 $ WS "long double result;"
3791 $ WS "result = strtold(""123123"", NULL, 10);"
3802 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3803 $ WS "#include <stdlib.h>"
3805 $ WS "#include <string.h>"
3808 $ WS " __int64 result;"
3809 $ WS "result = atoll(""123123"");"
3820 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3821 $ WS "#include <stdlib.h>"
3823 $ WS "#include <string.h>"
3827 $ WS "result = atolf(""123123"");"
3838 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3839 $ WS "#include <stdlib.h>"
3841 $ WS "#include <stdio.h>"
3844 $ WS "access(""foo"", F_OK);"
3855 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3856 $ WS "#include <stdlib.h>"
3858 $ WS "#include <stdio.h>"
3859 $ WS "#include <strings.h>"
3862 $ WS "char foo[10];"
3863 $ WS "bzero(foo, 10);"
3874 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3875 $ WS "#include <stdlib.h>"
3877 $ WS "#include <stdio.h>"
3878 $ WS "#include <strings.h>"
3881 $ WS "char foo[10], bar[10];"
3882 $ WS "bcopy(""foo"", bar, 3);"
3890 $! Check for mkstemp
3893 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3894 $ WS "#include <stdlib.h>"
3896 $ WS "#include <stdio.h>"
3899 $ WS "mkstemp(""foo"");"
3907 $! Check for mkstemps
3910 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3911 $ WS "#include <stdlib.h>"
3913 $ WS "#include <stdio.h>"
3916 $ WS "mkstemps(""foo"", 1);"
3924 $! Check for mkdtemp
3927 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3928 $ WS "#include <stdlib.h>"
3930 $ WS "#include <stdio.h>"
3933 $ WS "mkdtemp(""foo"");"
3941 $! Check for setvbuf
3944 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3945 $ WS "#include <stdlib.h>"
3947 $ WS "#include <stdio.h>"
3951 $ WS "char Buffer[99];"
3952 $ WS "foo = fopen(""foo"", ""r"");"
3953 $ WS "setvbuf(foo, Buffer, 0, 0);"
3961 $! see if sfio.h is available
3962 $! see if sfio library is available
3963 $! Ok, but do we want to use it.
3964 $! IF F$TYPE(usesfio) .EQS. "" THEN usesfio = "undef"
3965 $! IF val .EQS. "define"
3967 $! IF usesfio .EQS. "define"
3971 $! echo "''package' can use the sfio library, but it is experimental."
3972 $! IF useperlio .EQS. "undef"
3974 $! echo "For sfio also the PerlIO abstraction layer is needed."
3975 $! echo "Earlier you said you would not want that."
3977 $! rp="You seem to have sfio available, do you want to try using it? [''dflt'] "
3979 $! IF ans .EQS. "" THEN ans = dflt
3982 $! echo "Ok, turning on both sfio and PerlIO, then."
3983 $! useperlio="define"
3986 $! echo "Ok, avoiding sfio this time. I'll use stdio instead."
3990 $! IF usesfio .EQS. "define"
3992 $! echo4 "Sorry, cannot find sfio on this machine."
3993 $! echo4 "Ignoring your setting of usesfio=''usesfio'."
4001 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4002 $ WS "#include <stdlib.h>"
4004 $ WS "#include <stdio.h>"
4007 $ WS "setenv(""FOO"", ""BAR"", 0);"
4015 $! Check for setproctitle
4018 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4019 $ WS "#include <stdlib.h>"
4021 $ WS "#include <stdio.h>"
4024 $ WS "setproctitle(""%s"", ""FOO"");"
4028 $ tmp = "setproctitle"
4030 $ d_setproctitle = tmp
4032 $! Check for <netinet/in.h>
4034 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4036 $ tmp = "netinet/in.h"
4043 $! Check for <netinet/tcp.h>
4045 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4047 $ tmp = "netinet/tcp.h"
4049 $ i_netinettcp = tmp
4051 $ i_netinettcp="undef"
4054 $! Check for endhostent
4056 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4059 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4060 $ WS "#include <stdlib.h>"
4062 $ WS "#include <stdio.h>"
4064 $ THEN WS "#include <socketshr.h>"
4065 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4069 $ WS "endhostent();"
4073 $ tmp = "endhostent"
4080 $! Check for endnetent
4082 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4085 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4086 $ WS "#include <stdlib.h>"
4088 $ WS "#include <stdio.h>"
4090 $ THEN WS "#include <socketshr.h>"
4091 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4106 $! Check for endprotoent
4108 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4111 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4112 $ WS "#include <stdlib.h>"
4114 $ WS "#include <stdio.h>"
4116 $ THEN WS "#include <socketshr.h>"
4117 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4121 $ WS "endprotoent();"
4125 $ tmp = "endprotoent"
4132 $! Check for endservent
4134 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4137 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4138 $ WS "#include <stdlib.h>"
4140 $ WS "#include <stdio.h>"
4142 $ THEN WS "#include <socketshr.h>"
4143 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4147 $ WS "endservent();"
4151 $ tmp = "endservent"
4158 $! Check for sethostent
4160 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4163 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4164 $ WS "#include <stdlib.h>"
4166 $ WS "#include <stdio.h>"
4168 $ THEN WS "#include <socketshr.h>"
4169 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4173 $ WS "sethostent(1);"
4177 $ tmp = "sethostent"
4184 $! Check for setnetent
4186 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4189 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4190 $ WS "#include <stdlib.h>"
4192 $ WS "#include <stdio.h>"
4194 $ THEN WS "#include <socketshr.h>"
4195 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4199 $ WS "setnetent(1);"
4210 $! Check for setprotoent
4212 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4215 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4216 $ WS "#include <stdlib.h>"
4218 $ WS "#include <stdio.h>"
4220 $ THEN WS "#include <socketshr.h>"
4221 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4225 $ WS "setprotoent(1);"
4229 $ tmp = "setprotoent"
4236 $! Check for setservent
4238 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4241 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4242 $ WS "#include <stdlib.h>"
4244 $ WS "#include <stdio.h>"
4246 $ THEN WS "#include <socketshr.h>"
4247 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4251 $ WS "setservent(1);"
4255 $ tmp = "setservent"
4262 $! Check for gethostent
4264 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4267 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4268 $ WS "#include <stdlib.h>"
4270 $ WS "#include <stdio.h>"
4272 $ THEN WS "#include <socketshr.h>"
4273 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4277 $ WS "gethostent();"
4281 $ tmp = "gethostent"
4288 $! Check for getnetent
4290 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4293 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4294 $ WS "#include <stdlib.h>"
4296 $ WS "#include <stdio.h>"
4298 $ THEN WS "#include <socketshr.h>"
4299 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4314 $! Check for getprotoent
4316 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4319 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4320 $ WS "#include <stdlib.h>"
4322 $ WS "#include <stdio.h>"
4324 $ THEN WS "#include <socketshr.h>"
4325 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4329 $ WS "getprotoent();"
4333 $ tmp = "getprotoent"
4340 $! Check for getservent
4342 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4345 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4346 $ WS "#include <stdlib.h>"
4348 $ WS "#include <stdio.h>"
4350 $ THEN WS "#include <socketshr.h>"
4351 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4355 $ WS "getservent();"
4359 $ tmp = "getservent"
4366 $! Check for socklen_t
4368 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4370 $ echo4 "Checking to see if you have socklen_t..."
4372 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4373 $ WS "#include <stdlib.h>"
4375 $ WS "#include <stdio.h>"
4377 $ THEN WS "#include <socketshr.h>"
4378 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4382 $ WS "socklen_t x = 16;"
4387 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4389 $ d_socklen_t="define"
4390 $ echo "You have socklen_t."
4392 $ d_socklen_t="undef"
4393 $ echo "You do not have socklen_t."
4396 $ d_socklen_t="undef"
4399 $! Check for pthread_yield
4404 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4405 $ WS "#include <stdlib.h>"
4407 $ WS "#include <pthread.h>"
4408 $ WS "#include <stdio.h>"
4411 $ WS "pthread_yield();"
4415 $ tmp = "pthread_yield"
4417 $ d_pthread_yield = tmp
4419 $ d_pthread_yield="undef"
4422 $! Check for sched_yield
4427 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4428 $ WS "#include <stdlib.h>"
4430 $ WS "#include <pthread.h>"
4431 $ WS "#include <stdio.h>"
4434 $ WS "sched_yield();"
4438 $ tmp = "sched_yield"
4440 $ d_sched_yield = tmp
4441 $ IF d_sched_yield .EQS. "define"
4442 $ THEN sched_yield = "sched_yield"
4443 $ ELSE sched_yield = " "
4446 $ d_sched_yield="undef"
4450 $! Check for generic pointer size
4452 $ echo4 "Checking to see how big your pointers are..."
4454 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4455 $ WS "#include <stdlib.h>"
4457 $ WS "#include <stdio.h>"
4461 $ WS "foo = sizeof(char *);"
4462 $ WS "printf(""%d\n"", foo);"
4467 $ GOSUB type_size_check
4469 $ echo "Your pointers are ''ptrsize' bytes long."
4471 $! Check for size_t size
4475 $ echo4 "Checking the size of ''zzz'..."
4476 $ GOSUB type_size_check
4478 $ echo "Your ''zzz' size is ''sizesize' bytes."
4480 $! Check rand48 and its ilk
4482 $ echo4 "Looking for a random number function..."
4484 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4485 $ WS "#include <stdlib.h>"
4487 $ WS "#include <stdio.h>"
4490 $ WS "srand48(12L);"
4495 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4497 $ drand01 = "drand48()"
4498 $ randseedtype = "long int"
4499 $ seedfunc = "srand48"
4500 $ echo4 "Good, found drand48()."
4501 $ d_drand48proto = "define"
4503 $ d_drand48proto = "undef"
4504 $ drand01="random()"
4505 $ randseedtype = "unsigned"
4506 $ seedfunc = "srandom"
4508 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4509 $ WS "#include <stdlib.h>"
4511 $ WS "#include <stdio.h>"
4519 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4521 $ echo4 "OK, found random()."
4523 $ drand01="(((float)rand())/((float)RAND_MAX))"
4524 $ randseedtype = "unsigned"
4525 $ seedfunc = "srand"
4526 $ echo4 "Yick, looks like I have to use rand()."
4529 $! Done with compiler checks. Clean up.
4530 $ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
4531 $ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
4532 $ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
4533 $ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
4534 $ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
4535 $ IF ccname .EQS. "CXX"
4537 $ CALL Cxx_demangler_cleanup
4540 $! Some that are compiler or VMS version sensitive
4543 $ IF ccname .EQS. "GCC"
4545 $ d_attribut="define"
4549 $ d_attribut="undef"
4552 $! Dec C >= 5.2 and VMS ver >= 7.0
4553 $ IF (ccname .EQS. "DEC") .AND. -
4554 (F$INTEGER(Dec_C_Version).GE.50200000) .AND. (vms_ver .GES. "7.0")
4557 $ d_gettimeod="define"
4559 $ d_sigaction="define"
4560 $ d_sigprocmask="define"
4561 $ d_truncate="define"
4565 $ 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"
4566 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4567 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
4568 $ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
4569 $ sig_name_init = psnwc1 + psnwc2 + psnwc3
4570 $ 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"
4571 $ 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"
4572 $! perl_sig_num_with_commas=sig_num_init
4575 $ d_pathconf="define"
4576 $ d_fpathconf="define"
4577 $ d_sysconf="define"
4578 $ d_sigsetjmp="define"
4580 $ pidtype="unsigned int"
4581 $ d_gettimeod="undef"
4584 $ d_sigaction="undef"
4585 $ d_sigprocmask="undef"
4586 $ d_truncate="undef"
4589 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"",0"
4590 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4591 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
4592 $ sig_name_init = psnwc1 + psnwc2
4593 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"",0"
4594 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
4595 $! perl_sig_num_with_commas=sig_num_init
4597 $ uidtype="unsigned int"
4598 $ d_pathconf="undef"
4599 $ d_fpathconf="undef"
4601 $ d_sigsetjmp="undef"
4603 $!: see if tzname[] exists
4605 $ WS "#include <stdio.h>"
4606 $ WS "#include <time.h>"
4607 $ WS "int main() { extern short tzname[]; printf(""%hd"", tzname[0]); }"
4610 $ IF compile_status .EQ. good_compile
4612 $ d_tzname = "undef"
4613 $ echo4 "tzname[] NOT found."
4615 $ d_tzname = "define"
4616 $ echo4 "tzname[] found."
4618 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
4620 $ IF d_gethname .EQS. "undef" .AND. d_uname .EQS. "undef"
4622 $ d_phostname="define"
4624 $ d_phostname="undef"
4628 $ IF ccname .EQS. "DEC"
4630 $ d_mbstowcs="define"
4632 $ d_stdiobase="define"
4633 $ d_stdio_cnt_lval="define"
4634 $ d_stdio_ptr_lval="define"
4635 $ d_stdstdio="define"
4636 $ d_wcstombs="define"
4639 $ d_strcoll="define"
4640 $ d_strxfrm="define"
4643 $ i_langinfo="define"
4644 $ d_locconv="define"
4645 $ d_nl_langinfo="define"
4646 $ d_setlocale="define"
4647 $ vms_cc_type="decc"
4649 $ d_mbstowcs="undef"
4651 $ d_stdiobase="undef"
4652 $ d_stdio_cnt_lval="undef"
4653 $ d_stdio_ptr_lval="undef"
4654 $ d_stdstdio="undef"
4655 $ d_wcstombs="undef"
4662 $ i_langinfo="undef"
4664 $ d_nl_langinfo="undef"
4665 $ d_setlocale="undef"
4667 $ d_stdio_ptr_lval_sets_cnt="undef"
4668 $ d_stdio_ptr_lval_nochange_cnt="define"
4671 $ if Has_Socketshr .OR. Has_Dec_C_Sockets
4673 $ d_vms_do_sockets="define"
4677 $ netdb_hlen_type="int"
4678 $ netdb_host_type="char *"
4679 $ netdb_name_type="char *"
4680 $ netdb_net_type="long"
4681 $ d_gethbyaddr="define"
4682 $ d_gethbyname="define"
4683 $ d_getnbyaddr="define"
4684 $ d_getnbyname="define"
4685 $ d_getpbynumber="define"
4686 $ d_getpbyname="define"
4687 $ d_getsbyport="define"
4688 $ d_getsbyname="define"
4689 $ d_gethostprotos="define"
4690 $ d_getnetprotos="define"
4691 $ d_getprotoprotos="define"
4692 $ d_getservprotos="define"
4693 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
4695 $ socksizetype="unsigned int"
4697 $ socksizetype="int *"
4700 $ d_vms_do_sockets="undef"
4704 $ netdb_hlen_type="int"
4705 $ netdb_host_type="char *"
4706 $ netdb_name_type="char *"
4707 $ netdb_net_type="long"
4708 $ d_gethbyaddr="undef"
4709 $ d_gethbyname="undef"
4710 $ d_getnbyaddr="undef"
4711 $ d_getnbyname="undef"
4712 $ d_getpbynumber="undef"
4713 $ d_getpbyname="undef"
4714 $ d_getsbyport="undef"
4715 $ d_getsbyname="undef"
4716 $ d_gethostprotos="undef"
4717 $ d_getnetprotos="undef"
4718 $ d_getprotoprotos="undef"
4719 $ d_getservprotos="undef"
4720 $ socksizetype="undef"
4725 $ usethreads="define"
4726 $ d_pthreads_created_joinable="define"
4727 $ if (vms_ver .GES. "7.0")
4729 $ d_oldpthreads="undef"
4731 $ d_oldpthreads="define"
4734 $ d_oldpthreads="undef"
4735 $ usethreads="undef"
4736 $ d_pthreads_created_joinable="undef"
4739 $! new (5.005_62++) typedefs for primitives
4741 $ echo "Choosing the C types to be used for Perl's internal types..."
4743 $ uvtype="unsigned long"
4745 $ u8type="unsigned char"
4747 $ u16type="unsigned short"
4749 $ u32type="unsigned int"
4750 $ i64type="long long"
4751 $ u64type="unsigned long long"
4754 $ IF use64bitint .OR. use64bitint .EQS. "define"
4756 $ ivtype = "''i64type'"
4757 $ uvtype = "''u64type'"
4758 $ nvtype="long double"
4765 $ GOSUB type_size_check
4767 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp
4768 $ IF ivtype .eqs. "long"
4769 $ THEN longsize = tmp
4772 $ GOSUB type_size_check
4777 $ GOSUB type_size_check
4779 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp
4782 $ GOSUB type_size_check
4786 $ GOSUB type_size_check
4789 $ tmp = "''i16type'"
4790 $ GOSUB type_size_check
4792 $ IF i16type .eqs. "short"
4793 $ THEN shortsize = tmp
4796 $ gosub type_size_check
4800 $ tmp = "''u16type'"
4801 $ GOSUB type_size_check
4804 $ tmp = "''i32type'"
4805 $ GOSUB type_size_check
4807 $ IF i32type .eqs. "int"
4808 $ THEN intsize = tmp
4811 $ gosub type_size_check
4815 $ tmp = "''u32type'"
4816 $ gosub type_size_check
4820 $ GOSUB type_size_check
4823 $ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
4824 $ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
4825 $ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
4827 $ echo4 "Checking whether your NVs can preserve your UVs..."
4829 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4830 $ WS "#include <stdlib.h>"
4832 $ WS "#include <stdio.h>"
4834 $ WS " ''uvtype' k = (''uvtype')~0, l;"
4835 $ WS " ''nvtype' d;"
4837 $ WS " d = (''nvtype')l;"
4838 $ WS " l = (''uvtype')d;"
4840 $ WS " printf(""preserve\n"");"
4845 $ IF tmp .EQS. "preserve"
4847 $ d_nv_preserves_uv = "define"
4848 $ echo "Yes, they can."
4849 $ d_nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8)
4851 $ d_nv_preserves_uv = "undef"
4852 $ echo "No, they can't."
4853 $ echo4 "Checking how many bits of your UVs your NVs can preserve..."
4855 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4856 $ WS "#include <stdlib.h>"
4858 $ WS "#include <stdio.h>"
4860 $ WS " ''uvtype' u = 0;"
4861 $ WS " int n = 8 * ''uvsize';"
4863 $ WS " for (i = 0; i < n; i++) {"
4864 $ WS " u = u << 1 | (''uvtype')1;"
4865 $ WS " if ((''uvtype')(''nvtype')u != u)"
4868 $ WS " printf(""%d\n"", i);"
4872 $ d_nv_preserves_uv_bits = tmp
4876 $ ivdformat="""ld"""
4877 $ uvuformat="""lu"""
4878 $ uvoformat="""lo"""
4879 $ uvxformat="""lx"""
4880 $ uvXUformat="""lX"""
4886 $! Finally the composite ones. All config
4888 $ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
4890 $ IF ccname .EQS. "DEC"
4892 $ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext'/NoList''ccflags'"
4894 $ i_dirent = "undef"
4895 $ IF ccname .EQS. "CXX"
4897 $ i_dirent = "define"
4898 $ ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext'/NoList''ccflags'"
4900 $ IF use_vmsdebug_perl
4902 $ optimize="/Debug/NoOpt"
4903 $ ldflags="/Debug/Trace/Map"
4907 $ ldflags="/NoTrace/NoMap"
4911 $! Okay, we've got everything configured. Now go write out a config.sh.
4912 $ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
4913 $ echo4 "Creating ''basename_config_sh'..."
4914 $ open/write CONFIG 'config_sh'
4915 $ WC := write CONFIG
4917 $! ##BEGIN WRITE NEW CONSTANTS HERE##
4921 $ WC "# This file was produced by Configure.COM on a ''osname' system."
4923 $ WC "# Package name : ''package'"
4924 $ WC "# Source directory : ''src'"
4925 $ WC "# Configuration time: " + cf_time
4926 $ WC "# Configuration by : " + cf_by
4927 $ WC "# Target system : " + myuname
4929 $ WC "CONFIG='true'"
4930 $ WC "Makefile_SH='" + Makefile_SH + "'"
4931 $ WC "Mcc='" + Mcc + "'"
4932 $ WC "PERL_REVISION='" + revision + "'"
4933 $ WC "PERL_VERSION='" + patchlevel + "'"
4934 $ WC "PERL_SUBVERSION='" + subversion + "'"
4935 $ WC "PERL_API_VERSION='" + api_version + "'"
4936 $ WC "PERL_API_SUBVERSION='" + api_subversion + "'"
4937 $ WC "alignbytes='" + alignbytes + "'"
4938 $ WC "aphostname='write sys$output f$edit(f$getsyi(\""SCSNODE\""),\""TRIM,LOWERCASE\"")'"
4940 $ WC "archlib='" + archlib + "'"
4941 $ WC "archlibexp='" + archlibexp + "'"
4942 $ WC "archname='" + archname + "'"
4943 $ WC "baserev='" + baserev + "'"
4944 $ WC "bin='" + bin + "'"
4945 $ WC "binexp='" + binexp + "'"
4946 $ WC "builddir='" + builddir + "'"
4947 $ WC "byteorder='1234'"
4948 $ WC "castflags='0'"
4949 $ WC "cc='" + perl_cc + "'"
4950 $ WC "cccdlflags='" + cccdlflags + "'"
4951 $ WC "ccdlflags='" + ccdlflags + "'"
4952 $ WC "ccflags='" + ccflags + "'"
4953 $ WC "ccname='" + ccname + "'"
4954 $ WC "ccversion='" + ccversion + "'"
4955 $ WC "cf_by='" + cf_by + "'"
4956 $ WC "cf_email='" + cf_email + "'"
4957 $ WC "cf_time='" + cf_time + "'"
4958 $ WC "config_args='" + config_args + "'"
4959 $ WC "config_sh='" + config_sh + "'"
4960 $ WC "cpp_stuff='" + cpp_stuff + "'"
4961 $ WC "cpplast='" + cpplast + "'"
4962 $ WC "cppminus='" + cppminus + "'"
4963 $ WC "cpprun='" + cpprun + "'"
4964 $ WC "cppstdin='" + cppstdin + "'"
4965 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
4966 $ WC "d_PRIEldbl='" + d_PRIEUldbl + "'"
4967 $ WC "d_PRIFldbl='" + d_PRIFUldbl + "'"
4968 $ WC "d_PRIGldbl='" + d_PRIGUldbl + "'"
4969 $ WC "d_PRIX64='" + d_PRIXU64 + "'"
4970 $ WC "d_PRId64='" + d_PRId64 + "'"
4971 $ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
4972 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
4973 $ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
4974 $ WC "d_PRIo64='" + d_PRIo64 + "'"
4975 $ WC "d_PRIu64='" + d_PRIu64 + "'"
4976 $ WC "d_PRIx64='" + d_PRIx64 + "'"
4977 $ WC "d_SCNfldbl='" + d_SCNfldbl + "'"
4978 $ WC "d__fwalk='undef'"
4979 $ WC "d_access='" + d_access + "'"
4980 $ WC "d_accessx='undef'"
4981 $ WC "d_alarm='define'"
4982 $ WC "d_archlib='define'"
4983 $ WC "d_atolf='" + d_atolf + "'"
4984 $ WC "d_atoll='" + d_atoll + "'"
4985 $ WC "d_attribut='" + d_attribut + "'"
4986 $ WC "d_bcmp='" + d_bcmp + "'"
4987 $ WC "d_bcopy='" + d_bcopy + "'"
4988 $ WC "d_bincompat3='undef'"
4989 $ WC "d_bincompat5005='undef'"
4990 $! WC "d_bsdpgrp='undef'"
4991 $ WC "d_bsdgetpgrp='undef'"
4992 $ WC "d_bsdsetpgrp='undef'"
4993 $ WC "d_bzero='" + d_bzero + "'"
4994 $ WC "d_casti32='define'"
4995 $ WC "d_castneg='define'"
4996 $ WC "d_charvspr='undef'"
4997 $ WC "d_chown='define'"
4998 $ WC "d_chroot='undef'"
4999 $ WC "d_chsize='undef'"
5000 $ WC "d_class='undef'"
5001 $ WC "d_cmsghdr_s='undef'"
5002 $ WC "d_const='define'"
5003 $ WC "d_crypt='define'"
5004 $ WC "d_csh='undef'"
5005 $ WC "d_cuserid='define'"
5006 $ WC "d_dbl_dig='define'"
5007 $ WC "d_dbminitproto='undef'"
5008 $ WC "d_difftime='define'"
5009 $ WC "d_dirnamlen='define'"
5010 $ WC "d_dlerror='undef'"
5011 $ WC "d_dlsymun='undef'"
5012 $ WC "d_dosuid='undef'"
5013 $ WC "d_drand48proto='" + d_drand48proto + "'"
5014 $ WC "d_dup2='define'"
5015 $ WC "d_eaccess='undef'"
5016 $ WC "d_endgrent='define'"
5017 $ WC "d_endhent='" + d_endhent + "'"
5018 $ WC "d_endnent='" + d_endnent + "'"
5019 $ WC "d_endpent='" + d_endpent + "'"
5020 $ WC "d_endpwent='define'"
5021 $ WC "d_endsent='" + d_endsent + "'"
5022 $ WC "d_eofnblk='undef'"
5023 $ WC "d_eunice='undef'"
5024 $ WC "d_fchmod='undef'"
5025 $ WC "d_fchdir='undef'"
5026 $ WC "d_fchown='undef'"
5027 $ WC "d_fcntl='" + d_fcntl + "'"
5028 $ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
5029 $ WC "d_fd_set='" + d_fd_set + "'"
5030 $ WC "d_fgetpos='define'"
5031 $ WC "d_finite='undef'"
5032 $ WC "d_finitel='undef'"
5033 $ WC "d_flexfnam='define'"
5034 $ WC "d_flock='undef'"
5035 $ WC "d_flockproto='undef'"
5036 $ WC "d_fork='undef'"
5037 $ WC "d_fp_class='undef'"
5038 $ WC "d_fpathconf='" + d_fpathconf + "'"
5039 $ WC "d_fpclass='undef'"
5040 $ WC "d_fpclassify='undef'"
5041 $ WC "d_fpclassl='undef'"
5042 $ WC "d_fpos64_t='" + d_fpos64_t + "'"
5043 $ WC "d_frexpl='" + d_frexpl + "'"
5044 $ WC "d_fs_data_s='undef'"
5045 $ WC "d_fseeko='undef'"
5046 $ WC "d_fsetpos='define'"
5047 $ WC "d_fstatfs='undef'"
5048 $ WC "d_fstatvfs='undef'"
5049 $ WC "d_fsync='undef'"
5050 $ WC "d_ftello='undef'"
5051 $ WC "d_getcwd='define'"
5052 $ WC "d_getespwnam='undef'"
5053 $ WC "d_getfsstat='undef'"
5054 $ WC "d_getgrent='define'"
5055 $ WC "d_getgrps='undef'"
5056 $ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
5057 $ WC "d_gethbyname='" + d_gethbyname + "'"
5058 $ WC "d_gethent='" + d_gethent + "'"
5059 $ WC "d_gethname='" + d_gethname + "'"
5060 $ WC "d_gethostprotos='" + d_gethostprotos + "'"
5061 $ WC "d_getitimer='undef'"
5062 $ WC "d_getlogin='define'"
5063 $ WC "d_getmnt='undef'"
5064 $ WC "d_getmntent='undef'"
5065 $ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
5066 $ WC "d_getnbyname='" + d_getnbyname + "'"
5067 $ WC "d_getnent='" + d_getnent + "'"
5068 $ WC "d_getnetprotos='" + d_getnetprotos + "'"
5069 $ WC "d_getpagsz='undef'"
5070 $ WC "d_getpbyname='" + d_getpbyname + "'"
5071 $ WC "d_getpbynumber='" + d_getpbynumber + "'"
5072 $ WC "d_getpent='" + d_getpent + "'"
5073 $ WC "d_getpgid='undef'"
5074 $ WC "d_getpgrp2='undef'"
5075 $ WC "d_getpgrp='undef'"
5076 $ WC "d_getppid='undef'"
5077 $ WC "d_getprior='undef'"
5078 $ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
5079 $ WC "d_getprpwnam='undef'"
5080 $ WC "d_getpwent='define'"
5081 $ WC "d_getsbyname='" + d_getsbyname + "'"
5082 $ WC "d_getsbyport='" + d_getsbyport + "'"
5083 $ WC "d_getsent='" + d_getsent + "'"
5084 $ WC "d_getservprotos='" + d_getservprotos + "'"
5085 $ WC "d_getspnam='undef'"
5086 $ WC "d_gettimeod='" + d_gettimeod + "'"
5087 $ WC "d_gnulibc='undef'"
5088 $ WC "d_grpasswd='undef'"
5089 $ WC "d_hasmntopt='undef'"
5090 $ WC "d_htonl='" + d_htonl + "'"
5091 $ WC "d_index='" + d_index + "'"
5092 $ WC "d_inetaton='undef'"
5093 $ WC "d_int64_t='" + d_int64_t + "'"
5094 $ WC "d_isascii='define'"
5095 $ WC "d_isfinite='undef'"
5096 $ WC "d_isinf='undef'"
5097 $ WC "d_isnan='" + d_isnan + "'"
5098 $ WC "d_isnanl='" + d_isnanl + "'"
5099 $ WC "d_killpg='undef'"
5100 $ WC "d_lchown='undef'"
5101 $ WC "d_ldbl_dig='define'"
5102 $ WC "d_link='undef'"
5103 $ WC "d_llseek='undef'"
5104 $ WC "d_locconv='" + d_locconv + "'"
5105 $ WC "d_lockf='undef'"
5106 $ WC "d_longdbl='" + d_longdbl + "'"
5107 $ WC "d_longlong='" + d_longlong + "'"
5108 $ WC "d_lseekproto='define'"
5109 $ WC "d_lstat='undef'"
5110 $ WC "d_madvise='undef'"
5111 $ WC "d_mblen='" + d_mblen + "'"
5112 $ WC "d_mbstowcs='" + d_mbstowcs + "'"
5113 $ WC "d_mbtowc='" + d_mbtowc + "'"
5114 $ WC "d_memchr='" + d_memchr + "'"
5115 $ WC "d_memcmp='define'"
5116 $ WC "d_memcpy='define'"
5117 $ WC "d_memmove='define'"
5118 $ WC "d_memset='define'"
5119 $ WC "d_mkdir='define'"
5120 $ WC "d_mkdtemp='" + d_mkdtemp + "'"
5121 $ WC "d_mkfifo='undef'"
5122 $ WC "d_mknod='undef'"
5123 $ WC "d_mkstemp='" + d_mkstemp + "'"
5124 $ WC "d_mkstemps='" + d_mkstemps + "'"
5125 $ WC "d_mktime='" + d_mktime + "'"
5126 $ WC "d_mmap='undef'"
5127 $ WC "d_modfl='" + d_modfl + "'"
5128 $ WC "d_modfl_pow32_bug='undef'"
5129 $ WC "d_mprotect='undef'"
5130 $ WC "d_msg='undef'"
5131 $ WC "d_msg_ctrunc='undef'"
5132 $ WC "d_msg_dontroute='undef'"
5133 $ WC "d_msg_oob='undef'"
5134 $ WC "d_msg_peek='undef'"
5135 $ WC "d_msg_proxy='undef'"
5136 $ WC "d_msghdr_s='undef'"
5137 $ WC "d_msync='undef'"
5138 $ WC "d_munmap='undef'"
5139 $ WC "d_mymalloc='" + d_mymalloc + "'"
5140 $ WC "d_nice='define'"
5141 $ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
5142 $ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
5143 $ WC "d_nv_preserves_uv_bits='" + d_nv_preserves_uv_bits + "'"
5144 $ WC "d_off64_t='" + d_off64_t + "'"
5145 $ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
5146 $ WC "d_oldarchlib='define'"
5147 $ WC "d_oldpthreads='" + d_oldpthreads + "'"
5148 $ WC "d_open3='define'"
5149 $ WC "d_pathconf='" + d_pathconf + "'"
5150 $ WC "d_pause='define'"
5151 $ WC "d_perl_otherlibdirs='undef'"
5152 $ WC "d_phostname='" + d_phostname + "'"
5153 $ WC "d_pipe='define'"
5154 $ WC "d_poll='undef'"
5155 $ WC "d_pthread_atfork='undef'"
5156 $ WC "d_pthread_yield='" + d_pthread_yield + "'"
5157 $ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
5158 $ WC "d_pwage='undef'"
5159 $ WC "d_pwchange='undef'"
5160 $ WC "d_pwclass='undef'"
5161 $ WC "d_pwcomment='define'"
5162 $ WC "d_pwexpire='undef'"
5163 $ WC "d_pwgecos='define'"
5164 $ WC "d_pwpasswd='define'"
5165 $ WC "d_pwquota='undef'"
5166 $ WC "d_qgcvt='undef'"
5167 $ WC "d_quad='" + d_quad + "'"
5168 $ WC "d_readdir='define'"
5169 $ WC "d_readlink='undef'"
5170 $ WC "d_readv='undef'"
5171 $ WC "d_realpath='undef'"
5172 $ WC "d_recvmsg='undef'"
5173 $ WC "d_rename='define'"
5174 $ WC "d_rewinddir='define'"
5175 $ WC "d_rmdir='define'"
5176 $ WC "d_safebcpy='undef'"
5177 $ WC "d_safemcpy='define'"
5178 $ WC "d_sanemcmp='define'"
5179 $ WC "d_sbrkproto='define'"
5180 $ WC "d_sched_yield='" + d_sched_yield + "'"
5181 $ WC "d_scm_rights='undef'"
5182 $ WC "d_seekdir='define'"
5183 $ WC "d_select='" + d_select + "'"
5184 $ WC "d_sem='undef'"
5185 $ WC "d_semctl_semid_ds='undef'"
5186 $ WC "d_semctl_semun='undef'"
5187 $ WC "d_sendmsg='undef'"
5188 $ WC "d_setegid='undef'"
5189 $ WC "d_setenv='" + d_setenv + "'"
5190 $ WC "d_seteuid='undef'"
5191 $ WC "d_setgrent='undef'"
5192 $ WC "d_setgrps='undef'"
5193 $ WC "d_sethent='" + d_sethent + "'"
5194 $ WC "d_setitimer='undef'"
5195 $ WC "d_setlinebuf='undef'"
5196 $ WC "d_setlocale='" + d_setlocale + "'"
5197 $ WC "d_setnent='" + d_setnent + "'"
5198 $ WC "d_setpent='" + d_setpent + "'"
5199 $ WC "d_setpgid='undef'"
5200 $ WC "d_setpgrp2='undef'"
5201 $ WC "d_setpgrp='undef'"
5202 $ WC "d_setprior='undef'"
5203 $ WC "d_setproctitle='" + d_setproctitle + "'"
5204 $ WC "d_setpwent='define'"
5205 $ WC "d_setregid='undef'"
5206 $ WC "d_setresgid='undef'"
5207 $ WC "d_setresuid='undef'"
5208 $ WC "d_setreuid='undef'"
5209 $ WC "d_setrgid='undef'"
5210 $ WC "d_setruid='undef'"
5211 $ WC "d_setsent='" + d_setsent + "'"
5212 $ WC "d_setsid='undef'"
5213 $ WC "d_setvbuf='" + d_setvbuf + "'"
5214 $ WC "d_sfio='undef'"
5215 $ WC "d_shm='undef'"
5216 $ WC "d_shmatprototype='undef'"
5217 $ WC "d_sigaction='" + d_sigaction + "'"
5218 $ WC "d_sigprocmask='" + d_sigprocmask + "'"
5219 $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
5220 $ WC "d_sockatmark='undef'"
5221 $ WC "d_sockatmarkproto='undef'"
5222 $ WC "d_socket='" + d_socket + "'"
5223 $ WC "d_socklen_t='" + d_socklen_t + "'"
5224 $ WC "d_sockpair='undef'"
5225 $ WC "d_socks5_init='undef'"
5226 $ WC "d_sqrtl='define'"
5227 $ WC "d_sresgproto='undef'"
5228 $ WC "d_sresgproto='undef'"
5229 $ WC "d_sresproto='undef'"
5230 $ WC "d_sresuproto='undef'"
5231 $ WC "d_statblks='undef'"
5232 $ WC "d_statfs_f_flags='undef'"
5233 $ WC "d_statfs_s='undef'"
5234 $ WC "d_statfsflags='undef'"
5235 $ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
5236 $ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
5237 $ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'"
5238 $ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'"
5239 $ WC "d_stdio_stream_array='undef'"
5240 $ WC "d_stdiobase='" + d_stdiobase + "'"
5241 $ WC "d_stdstdio='" + d_stdstdio + "'"
5242 $ WC "d_strchr='define'"
5243 $ WC "d_strcoll='" + d_strcoll + "'"
5244 $ WC "d_strctcpy='define'"
5245 $ WC "d_strerrm='strerror((e),vaxc$errno)'"
5246 $ WC "d_strerror='define'"
5247 $ WC "d_strftime='define'"
5248 $ WC "d_strtod='define'"
5249 $ WC "d_strtol='define'"
5250 $ WC "d_strtold='" + d_strtold + "'"
5251 $ WC "d_strtoll='" + d_strtoll + "'"
5252 $ WC "d_strtoq='define'"
5253 $ WC "d_strtoul='define'"
5254 $ WC "d_strtoull='" + d_strtoull + "'"
5255 $ WC "d_strtouq='" + d_strtouq + "'"
5256 $ WC "d_strxfrm='" + d_strxfrm + "'"
5257 $ WC "d_suidsafe='undef'"
5258 $ WC "d_symlink='undef'"
5259 $ WC "d_syscall='undef'"
5260 $ WC "d_syscallproto='undef'"
5261 $ WC "d_sysconf='" + d_sysconf + "'"
5262 $ WC "d_syserrlst='undef'"
5263 $ WC "d_system='define'"
5264 $ WC "d_tcgetpgrp='undef'"
5265 $ WC "d_tcsetpgrp='undef'"
5266 $ WC "d_telldir='define'"
5267 $ WC "d_telldirproto='define'"
5268 $ WC "d_times='define'"
5269 $ WC "d_truncate='" + d_truncate + "'"
5270 $ WC "d_tzname='" + d_tzname + "'"
5271 $ WC "d_u32align='define'"
5272 $ WC "d_ualarm='undef'"
5273 $ WC "d_umask='define'"
5274 $ WC "d_uname='" + d_uname + "'"
5275 $ WC "d_union_semun='undef'"
5276 $ WC "d_unlink_all_versions='undef'"
5277 $ WC "d_unordered='undef'"
5278 $ WC "d_usleep='undef'"
5279 $ WC "d_usleepproto='undef'"
5280 $ WC "d_ustat='undef'"
5281 $ WC "d_vendorarch='undef'"
5282 $ WC "d_vendorlib='undef'"
5283 $ WC "d_vfork='define'"
5284 $ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
5285 $ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
5286 $ WC "d_void_closedir='define'"
5287 $ WC "d_volatile='define'"
5288 $ WC "d_vprintf='define'"
5289 $ WC "d_wait4='" + d_wait4 + "'"
5290 $ WC "d_waitpid='define'"
5291 $ WC "d_wcstombs='" + d_wcstombs + "'"
5292 $ WC "d_wctomb='" + d_wctomb + "'"
5293 $ WC "d_writev='undef'"
5294 $ WC "db_hashtype=' '"
5295 $ WC "db_prefixtype=' '"
5296 $ WC "dbgprefix='" + dbgprefix + "'"
5297 $ WC "defvoidused='15'"
5298 $ WC "devtype='" + devtype + "'"
5299 $ WC "direntrytype='struct dirent'"
5300 $ WC "dlext='" + dlext + "'"
5301 $ WC "dlobj='" + dlobj + "'"
5302 $ WC "dlsrc='dl_vms.c'"
5303 $ WC "doublesize='" + doublesize + "'"
5304 $ WC "drand01='" + drand01 + "'"
5306 $! The extensions symbol may be quite long
5308 $ tmp = "dynamic_ext='" + extensions + "'"
5312 $ WC "ebcdic='undef'"
5313 $ WC "embedmymalloc='" + mymalloc + "'"
5314 $ WC "eunicefix=':'"
5315 $ WC "exe_ext='" + exe_ext + "'"
5317 $! The extensions symbol may be quite long
5319 $ tmp = "extensions='" + extensions + "'"
5322 $ WC "fflushNULL='define'"
5323 $ WC "fflushall='undef'"
5324 $ WC "fpostype='fpos_t'"
5325 $ WC "freetype='void'"
5326 $ WC "full_ar='" + "'"
5327 $ WC "full_csh='" + " '"
5328 $ WC "full_sed='_NLA0:'"
5329 $ WC "gccversion='" + gccversion + "'"
5330 $ WC "gidformat='lu'"
5333 $ WC "gidtype='" + gidtype + "'"
5334 $ WC "groupstype='Gid_t'"
5336 $ WC "hintfile='" + "'"
5337 $ WC "i16size='" + i16size + "'"
5338 $ WC "i16type='" + i16type + "'"
5339 $ WC "i32size='" + i32size + "'"
5340 $ WC "i32type='" + i32type + "'"
5341 $ WC "i64size='" + i64size + "'"
5342 $ WC "i64type='" + i64type + "'"
5343 $ WC "i8size='" + i8size + "'"
5344 $ WC "i8type='" + i8type + "'"
5345 $ WC "i_arpainet='undef'"
5346 $ WC "i_dbm='undef'"
5347 $ WC "i_dirent='" + i_dirent + "'"
5348 $ WC "i_dlfcn='undef'"
5349 $ WC "i_fcntl='" + i_fcntl + "'"
5350 $ WC "i_float='define'"
5352 $ WC "i_fp_class='undef'"
5353 $ WC "i_grp='undef'"
5354 $ WC "i_ieeefp='undef'"
5355 $ WC "i_inttypes='" + i_inttypes + "'"
5356 $ WC "i_langinfo='" + i_langinfo + "'"
5357 $ WC "i_libutil='" + i_libutil + "'"
5358 $ WC "i_limits='define'"
5359 $ WC "i_locale='" + i_locale + "'"
5360 $ WC "i_machcthr='undef'"
5361 $ WC "i_machcthreads='undef'"
5362 $ WC "i_math='define'"
5363 $ WC "i_memory='undef'"
5364 $ WC "i_mntent='undef'"
5365 $ WC "i_ndbm='undef'"
5366 $ WC "i_netdb='" + i_netdb + "'"
5367 $ WC "i_neterrno='define'"
5368 $ WC "i_netinettcp='" + i_netinettcp + "'"
5369 $ WC "i_niin='" + i_niin + "'"
5370 $ WC "i_poll='" + i_poll + "'"
5371 $ WC "i_prot='undef'"
5372 $ WC "i_pthread='define'"
5373 $ WC "i_pwd='undef'"
5374 $ WC "i_rpcsvcdbm='undef'"
5375 $ WC "i_sfio='undef'"
5376 $ WC "i_sgtty='undef'"
5377 $ WC "i_shadow='" + i_shadow + "'"
5378 $ WC "i_socks='" + i_socks + "'"
5379 $ WC "i_stdarg='define'"
5380 $ WC "i_stddef='define'"
5381 $ WC "i_stdlib='define'"
5382 $ WC "i_string='define'"
5383 $ WC "i_sunmath='undef'"
5384 $ WC "i_sysaccess='" + i_sysaccess + "'"
5385 $ WC "i_sysdir='undef'"
5386 $ WC "i_sysfile='" + i_sysfile + "'"
5387 $ WC "i_sysioctl='undef'"
5388 $ WC "i_syslog='" + i_syslog + "'"
5389 $ WC "i_sysmman='undef'"
5390 $ WC "i_sysmode='" + i_sysmode + "'"
5391 $ WC "i_sysmount='undef'"
5392 $ WC "i_sysndir='undef'"
5393 $ WC "i_sysparam='undef'"
5394 $ WC "i_sysresrc='undef'"
5395 $ WC "i_syssecrt='" + i_syssecrt + "'"
5396 $ WC "i_sysselct='undef'"
5397 $ WC "i_syssockio='undef'"
5398 $ WC "i_sysstat='define'"
5399 $ WC "i_sysstatfs='undef'"
5400 $ WC "i_sysstatvfs='undef'"
5401 $ WC "i_systime='undef'"
5402 $ WC "i_systimek='undef'"
5403 $ WC "i_systimes='undef'"
5404 $ WC "i_systypes='define'"
5405 $ WC "i_sysuio='" + i_sysuio + "'"
5406 $ WC "i_sysun='undef'"
5407 $ WC "i_sysutsname='" + i_sysutsname + "'"
5408 $ WC "i_sysvfs='undef'"
5409 $ WC "i_syswait='undef'"
5410 $ WC "i_termio='undef'"
5411 $ WC "i_termios='undef'"
5412 $ WC "i_time='define'"
5413 $ WC "i_unistd='" + i_unistd + "'"
5414 $ WC "i_ustat='undef'"
5415 $ WC "i_utime='undef'"
5416 $ WC "i_values='undef'"
5417 $ WC "i_varargs='undef'"
5418 $ WC "i_vfork='undef'"
5419 $ WC "inc_version_list='0'"
5420 $ WC "inc_version_list_init='0'"
5421 $ WC "installarchlib='" + installarchlib + "'"
5422 $ WC "installbin='" + installbin + "'"
5423 $ WC "installman1dir='" + installman1dir + "'"
5424 $ WC "installman3dir='" + installman3dir + "'"
5425 $ WC "installprivlib='" + installprivlib + "'"
5426 $ WC "installscript='" + installscript + "'"
5427 $ WC "installsitearch='" + installsitearch + "'"
5428 $ WC "installsitelib='" + installsitelib + "'"
5429 $ WC "installusrbinperl='undef'"
5430 $ WC "intsize='" + intsize + "'"
5431 $ WC "ivdformat='" + ivdformat + "'"
5432 $ WC "ivsize='" + ivsize + "'"
5433 $ WC "ivtype='" + ivtype + "'"
5435 $! The known_extensions symbol may be quite long
5437 $ tmp = "known_extensions='" + known_extensions + "'"
5440 $ WC "ld='" + ld + "'"
5441 $ WC "lddlflags='/Share'"
5442 $ WC "ldflags='" + ldflags + "'"
5443 $ WC "lib_ext='" + lib_ext + "'"
5444 $ WC "libc='" + libc + "'"
5445 $ WC "libpth='/sys$share /sys$library'"
5446 $ WC "libs='" + libs + "'"
5447 $ WC "longdblsize='" + longdblsize + "'"
5448 $ WC "longlongsize='" + longlongsize + "'"
5449 $ WC "longsize='" + longsize + "'"
5450 $ WC "lseeksize='4'"
5451 $ WC "lseektype='int'"
5453 $ WC "make='" + make + "'"
5454 $ WC "malloctype='void *'"
5455 $ WC "man1ext='rno'"
5456 $ WC "man3ext='rno'"
5457 $ WC "mmaptype=' " + "'"
5458 $ WC "modetype='unsigned int'"
5459 $ WC "multiarch='undef'"
5460 $ WC "mydomain='" + mydomain + "'"
5461 $ WC "myhostname='" + myhostname + "'"
5462 $ WC "myuname='" + myuname + "'"
5463 $ WC "need_va_copy='undef'"
5464 $ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
5465 $ WC "netdb_host_type='" + netdb_host_type + "'"
5466 $ WC "netdb_name_type='" + netdb_name_type + "'"
5467 $ WC "netdb_net_type='" + netdb_net_type + "'"
5468 $ WC "nveformat='" + nveformat + "'"
5469 $ WC "nvfformat='" + nvfformat + "'"
5470 $ WC "nvgformat='" + nvgformat + "'"
5471 $ WC "nvsize='" + nvsize + "'"
5472 $ WC "nvtype='" + nvtype + "'"
5473 $ WC "o_nonblock=' '"
5474 $ WC "obj_ext='" + obj_ext + "'"
5475 $ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
5476 $ WC "oldarchlib='" + oldarchlib + "'"
5477 $ WC "oldarchlibexp='" + oldarchlibexp + "'"
5478 $ WC "optimize='" + optimize + "'"
5479 $ WC "osname='" + osname + "'"
5480 $ WC "osvers='" + osvers + "'"
5481 $ WC "otherlibdirs='" + "'"
5482 $ WC "package='" + package + "'"
5483 $ WC "pager='" + pager + "'"
5484 $ WC "patchlevel='" + patchlevel + "'"
5486 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
5487 $ WC "perladmin='" + perladmin + "'"
5488 $ WC "perllibs='" + perllibs + "'"
5489 $ WC "pgflquota='" + pgflquota + "'"
5490 $ WC "pidtype='" + pidtype + "'"
5491 $ WC "pm_apiversion='" + version + "'"
5492 $! WC "prefix='" + vms_prefix + "'"
5493 $ WC "prefix='" + prefix + "'"
5494 $ WC "privlib='" + privlib + "'"
5495 $ WC "privlibexp='" + privlibexp + "'"
5496 $ WC "prototype='define'"
5497 $ WC "ptrsize='" + ptrsize + "'"
5498 $ WC "quadkind='" + quadkind + "'"
5499 $ WC "quadtype='" + quadtype + "'"
5500 $ WC "randbits='31'"
5501 $ WC "randseedtype='" + randseedtype + "'"
5502 $ WC "ranlib='" + "'"
5503 $ WC "rd_nodata=' '"
5504 $ WC "revision='" + revision + "'"
5505 $ WC "sPRId64='" + sPRId64 + "'"
5506 $ WC "sPRIEldbl='" + sPRIEUldbl + "'"
5507 $ WC "sPRIFldbl='" + sPRIFUldbl + "'"
5508 $ WC "sPRIGldbl='" + sPRIGUldbl + "'"
5509 $ WC "sPRIX64='" + sPRIXU64 + "'"
5510 $ WC "sPRIeldbl='" + sPRIeldbl + "'"
5511 $ WC "sPRIfldbl='" + sPRIfldbl + "'"
5512 $ WC "sPRIgldbl='" + sPRIgldbl + "'"
5513 $! WC "sPRIi64='" + sPRIi64 + "'"
5514 $ WC "sPRIo64='" + sPRIo64 + "'"
5515 $ WC "sPRIu64='" + sPRIu64 + "'"
5516 $ WC "sPRIx64='" + sPRIx64 + "'"
5517 $ WC "sSCNfldbl='" + sSCNfldbl + "'"
5518 $ WC "sched_yield='" + sched_yield + "'"
5519 $ WC "scriptdir='" + scriptdir + "'"
5520 $ WC "seedfunc='" + seedfunc + "'"
5521 $ WC "selectminbits='32'"
5522 $ WC "selecttype='" + selecttype + "'"
5524 $ WC "shmattype='" + " '"
5525 $ WC "shortsize='" + shortsize + "'"
5526 $ WC "shrplib='define'"
5527 $ WC "sig_name='" + sig_name + "'"
5528 $ tmp = "sig_name_init='" + sig_name_init + "'"
5531 $ WC "sig_num='" + sig_num + "'"
5532 $ WC "sig_num_init='" + sig_num_init + "'"
5533 $ WC "sig_size='" + sig_size + "'"
5534 $ WC "signal_t='" + signal_t + "'"
5535 $ WC "sitearch='" + sitearch + "'"
5536 $ WC "sitearchexp='" + sitearchexp + "'"
5537 $ WC "sitelib='" + sitelib + "'"
5538 $ WC "sitelib_stem='" + sitelib_stem + "'"
5539 $ WC "sitelibexp='" + sitelibexp + "'"
5540 $ WC "sizesize='" + sizesize + "'"
5541 $ WC "sizetype='size_t'"
5542 $ WC "so='" + so + "'"
5543 $ WC "socksizetype='" + socksizetype + "'"
5544 $ WC "spitshell='write sys$output '"
5545 $ WC "src='" + src + "'"
5546 $ WC "ssizetype='int'"
5547 $ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
5548 $ WC "static_ext='" + static_ext + "'"
5549 $ WC "stdchar='" + stdchar + "'"
5550 $ WC "stdio_base='((*fp)->_base)'"
5551 $ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
5552 $ WC "stdio_cnt='((*fp)->_cnt)'"
5553 $ WC "stdio_ptr='((*fp)->_ptr)'"
5554 $ WC "stdio_stream_array=' " + "'"
5555 $ WC "subversion='" + subversion + "'"
5556 $ WC "timetype='" + timetype + "'"
5557 $ WC "u16size='" + u16size + "'"
5558 $ WC "u16type='" + u16type + "'"
5559 $ WC "u32size='" + u32size + "'"
5560 $ WC "u32type='" + u32type + "'"
5561 $ WC "u64size='" + u64size + "'"
5562 $ WC "u64type='" + u64type + "'"
5563 $ WC "u8size='" + u8size + "'"
5564 $ WC "u8type='" + u8type + "'"
5565 $ WC "uidformat='lu'"
5568 $ WC "uidtype='" + uidtype + "'"
5569 $ WC "uquadtype='" + uquadtype + "'"
5570 $ WC "use5005threads='" + use5005threads + "'"
5571 $ WC "use64bitall='" + use64bitall + "'"
5572 $ WC "use64bitint='" + use64bitint + "'"
5573 $ WC "usedebugging_perl='" + use_debugging_perl + "'"
5574 $ WC "usecrosscompile='undef'"
5575 $ WC "usedl='" + usedl + "'"
5576 $ WC "useithreads='" + useithreads + "'"
5577 $ WC "uselargefiles='" + uselargefiles + "'"
5578 $ WC "uselongdouble='" + uselongdouble + "'"
5579 $ WC "usemorebits='" + usemorebits + "'"
5580 $ WC "usemultiplicity='" + usemultiplicity + "'"
5581 $ WC "usemymalloc='" + usemymalloc + "'"
5582 $ WC "useperlio='" + useperlio + "'"
5583 $ WC "useposix='false'"
5584 $ WC "usereentrant='undef'"
5585 $ WC "usesocks='undef'"
5586 $ WC "usethreads='" + usethreads + "'"
5587 $ WC "usevfork='true'"
5588 $ WC "uvoformat='" + uvoformat + "'"
5589 $ WC "uvsize='" + uvsize + "'"
5590 $ WC "uvtype='" + uvtype + "'"
5591 $ WC "uvuformat='" + uvuformat + "'"
5592 $ WC "uvxformat='" + uvxformat + "'"
5593 $ WC "uvXUformat='" + uvXUformat + "'"
5594 $ WC "vendorarchexp='" + "'"
5595 $ WC "vendorlib_stem='" + "'"
5596 $ WC "vendorlibexp='" + "'"
5597 $ WC "version='" + version + "'"
5598 $ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific
5599 $ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific
5600 $ WC "vms_ver='" + vms_ver + "'" ! VMS specific
5601 $ WC "voidflags='15'"
5602 $ WC "xs_apiversion='" + version + "'"
5603 $ WC "PERL_CONFIG_SH='true'"
5605 $! ##END WRITE NEW CONSTANTS HERE##
5609 $! Okay, we've gotten here. Build munchconfig.exe
5610 $ COPY/NOLOG [-.vms]munchconfig.c []
5611 $ COPY/NOLOG [-.vms]'Makefile_SH' []
5612 $ 'Perl_CC' munchconfig.c
5615 $ OPEN/WRITE CONFIG []munchconfig.opt
5616 $ IF ccname .EQS. "GCC"
5618 $ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library"
5620 $ WRITE CONFIG "Sys$Share:VAXCRTL/Share"
5622 $ 'ld' munchconfig.obj,munchconfig.opt/opt
5623 $ DELETE/NOLOG/NOCONFIRM munchconfig.opt;
5625 $ 'ld' munchconfig.obj
5627 $ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj;
5628 $ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
5629 $ IF ccname .EQS. "CXX"
5631 $ CALL Cxx_demangler_cleanup
5634 $ IF alldone .EQS. ""
5639 If you'd like to make any changes to the config.sh file before I begin
5640 to configure things, answer yes to the following question.
5644 $ rp="Do you wish to edit ''basename_config_sh'? [''dflt'] "
5646 $ IF ans .EQS. "" then ans = dflt
5650 $ echo4 "Be sure to type LOGOUT after you have edited the file,"
5651 $ echo4 "then this procedure will resume."
5653 $ default = F$ENVIRONMENT("DEFAULT")
5654 $ DIRECTORY 'config_sh'
5657 $ SET DEFAULT 'default'
5662 $ echo4 "Adding ''osname' specific preprocessor commands."
5664 $ ! we need an fdl file
5665 $ CREATE [-]CONFIG.FDL
5670 $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
5671 $ ! First spit out the header info with the local defines (to get
5672 $ ! around the 255 character command line limit)
5673 $ OPEN/APPEND CONFIG [-]config.local
5674 $ IF use_debugging_perl THEN WC "#define DEBUGGING"
5675 $ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
5676 $ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
5677 $ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
5678 $ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
5679 $ IF ccname .EQS. "GCC" THEN WC "#define GNUC_ATTRIBUTE_CHECK"
5680 $ IF (Has_Dec_C_Sockets)
5682 $ WC "#define VMS_DO_SOCKETS"
5683 $ WC "#define DECCRTL_SOCKETS"
5685 $ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS"
5687 $! This is VMS-specific for now
5688 $ WC "#''d_setenv' HAS_SETENV"
5689 $ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
5690 $ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
5691 $ IF use64bitint .OR. use64bitint .EQS. "define"
5693 $ WC "#define USE_64_BIT_INT"
5694 $ WC "#define USE_LONG_DOUBLE"
5696 $ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
5697 WC "#define USE_64_BIT_ALL"
5698 $ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
5699 $ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
5700 $ WC "#define HAS_ENVGETENV"
5701 $ WC "#define PERL_EXTERNAL_GLOB"
5702 $ IF archname .EQS. "VMS_VAX" .AND. -
5703 ccname .EQS. "DEC" .AND. -
5704 ccversion .LE. 50390006
5706 $! Alas this does not help to build Fcntl
5707 $! WC "#define PERL_IGNORE_FPUSIG SIGFPE"
5711 $ echo4 "Doing variable substitutions on .SH files..."
5712 $ echo4 "Extracting config.h (with variable substitutions)"
5714 $! Now build the normal config.h
5715 $ DEFINE/USER_MODE sys$output [-]config.main
5716 $ mcr []munchconfig 'config_sh' [-]config_h.sh
5717 $ ! Concatenate them together
5718 $ copy [-]config.local,[-]config.main [-]config.h
5720 $ DELETE/NOLOG [-]CONFIG.MAIN;*
5721 $ DELETE/NOLOG [-]CONFIG.LOCAL;*
5722 $ DELETE/NOLOG [-]CONFIG.FDL;*
5724 $ IF ccname .EQS. "DEC"
5726 $ DECC_REPLACE = "DECC=decc=1"
5728 $ DECC_REPLACE = "DECC="
5730 $ IF ccname .EQS. "CXX"
5732 $ DECCXX_REPLACE = "DECCXX=DECCXX=1"
5734 $ DECCXX_REPLACE = "DECCXX="
5736 $ IF ccname .EQS. "GCC"
5738 $ GNUC_REPLACE = "GNUC=gnuc=1"
5740 $ GNUC_REPLACE = "GNUC="
5742 $ IF Has_Dec_C_Sockets
5744 $ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
5748 $ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
5750 $ SOCKET_REPLACE = "SOCKET="
5755 $ IF (vms_ver .LES. "6.2")
5757 $ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
5759 $ THREAD_REPLACE = "THREAD=THREADED=1"
5762 $ THREAD_REPLACE = "THREAD="
5766 $ MALLOC_REPLACE = "MALLOC=MALLOC=1"
5768 $ MALLOC_REPLACE = "MALLOC="
5770 $ echo4 "Extracting ''defmakefile' (with variable substitutions)"
5771 $ DEFINE/USER_MODE sys$output 'UUmakefile'
5772 $ mcr []munchconfig 'config_sh' 'Makefile_SH' "''DECC_REPLACE'" -
5773 "''DECCXX_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" -
5774 "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" -
5775 "''Thread_Live_Dangerously'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'"
5776 $! Clean up after ourselves
5777 $ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
5779 $ echo4 "Extracting make_ext.com (without variable substitutions)"
5780 $ Create Sys$Disk:[-]make_ext.com
5781 $ Deck/Dollar="$EndOfTpl$"
5783 $! NOTE: This file is extracted as part of the VMS configuration process.
5784 $! Any changes made to it directly will be lost. If you need to make any
5785 $! changes, please edit the template in Configure.Com instead.
5786 $ def = F$Environment("Default")
5787 $! p1 - how to invoke miniperl (passed in from descrip.mms)
5788 $ p1 = F$Edit(p1,"Upcase,Compress,Trim")
5789 $ If F$Locate("MCR ",p1).eq.0 Then p1 = F$Extract(3,255,p1)
5790 $ miniperl = "$" + F$Search(F$Parse(p1,".Exe"))
5791 $! p2 - how to invoke local make utility (passed in from descrip.mms)
5793 $ if f$type('p2') .nes. "" then makeutil = 'p2'
5794 $! p3 - make target (passed in from descrip.mms)
5795 $ targ = F$Edit(p3,"Lowercase")
5798 $ open/read CONFIG config.sh
5800 $ read/end=end_ext_loop CONFIG line
5801 $ if (f$extract(0,12,line) .NES. "extensions='")
5802 $ then goto find_ext_loop
5803 $ else extensions = f$extract(12,f$length(line),line) - "'"
5807 $ extensions = f$edit(extensions,"TRIM,COMPRESS")
5810 $ ext = f$element(i," ",extensions)
5811 $ If ext .eqs. " " .or. ext .eqs. "" Then Goto done
5812 $ Define/User_mode Perl_Env_Tables CLISYM_LOCAL
5815 ($extdir = $ENV{'ext'}) =~ s/::/./g;
5817 if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
5818 else { $extdir = ".ext.$extdir"; }
5819 ($ENV{'extdir'} = "[$extdir]");
5820 ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
5822 $ Set Default &extdir
5824 $ If F$Locate("clean",targ) .eqs. F$Length(targ)
5826 $ Write Sys$Output ""
5827 $ Write Sys$Output " Making ''ext' (dynamic)"
5828 $ On Error Then Goto done
5829 $ If F$Search("Descrip.MMS") .eqs. ""
5833 $ If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. -
5834 F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1
5837 $ Write Sys$Output "''targ'ing ''ext' . . ."
5838 $ On Error Then Continue
5841 miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]"
5853 $! Note that the /key qualifier to search, as in:
5854 $! search README.* "=head"/key=(position=1)/window=0/output=extra.pods
5855 $! is not supported on VMS V5.5-2, hence not used in extra_pods.com.
5857 $ echo4 "Extracting extra_pods.com (without variable substitutions)"
5858 $ Create Sys$Disk:[-]extra_pods.com
5859 $ Deck/Dollar="$EOExtra_Pods$"
5861 $! NOTE: This file is extracted as part of the VMS configuration process.
5862 $! Any changes made to it directly will be lost. If you need to make any
5863 $! changes, please edit the template in Configure.Com instead.
5864 $! Use FORCE if you've just podified a README.* file on VMS.
5865 $ if f$search("extra.pods") .eqs. "" .or. P1 .eqs. "FORCE" then -
5866 search README.* "=head"/window=0/output=extra.pods
5867 $ open/read/error=extra_close EXTRA extra.pods
5869 $ read/error=extra_close/END_OF_FILE=extra_close EXTRA file
5870 $ file_type = f$parse(file,,,"TYPE",) - "."
5871 $ if file_type .nes. "VMS" .and. file_type .nes. "vms"
5873 $ pod_file = "[.pod]perl''file_type'.pod"
5874 $ file = file - "''f$parse(file,,,"VERSION",)'"
5875 $ if p1 .eqs. "CLEAN"
5876 $ then if f$search(pod_file) .nes. "" then delete/log 'pod_file';*
5879 $ if f$search(pod_file) .eqs. ""
5880 $ then do_copy := true
5882 $ file_rdt = f$cvtime(f$file_attributes(file,"RDT"))
5883 $ pod_file_rdt = f$cvtime(f$file_attributes(pod_file,"RDT"))
5884 $ if file_rdt .GTS. pod_file_rdt then do_copy := true
5886 $ if do_copy then copy/log/noconfirm 'file' 'pod_file'
5892 $ if p1 .eqs. "CLEAN" .and. f$search("extra.pods;-1") .nes. "" then -
5893 purge/nolog extra.pods
5897 $! Warn of dangerous symbols or logical names
5899 $Bad_environment: SUBROUTINE
5901 $ IF p2 .eqs. "SYMBOL"
5903 $ IF f$type('p1') .nes. "" THEN Bad_env := SYMBOL
5905 $ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
5907 $ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
5909 $ IF f$search("config.msg") .nes. ""
5911 $ OPEN/APPEND CONFIG config.msg
5913 $ OPEN/WRITE CONFIG config.msg
5915 $ IF Bad_env .eqs. "SYMBOL"
5918 $ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
5919 $ WRITE CONFIG " delete before building ''package' via:"
5920 $ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
5921 $ IF f$locate("""",&p1) .ge. f$length(&p1)
5923 $ WRITE CONFIG " after building, testing, and installing ''package'"
5924 $ WRITE CONFIG " restore the symbol with:"
5925 $ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
5928 $ IF Bad_env .eqs. "LOGICAL"
5931 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
5932 $ WRITE CONFIG " deassign before building ''package'"
5938 $ ENDSUBROUTINE ! Bad_environment
5940 $ echo4 "Checking for dangerous pre-existing global symbols and logical names."
5941 $ CALL Bad_environment "TMP"
5942 $ CALL Bad_environment "LIB"
5943 $ CALL Bad_environment "T"
5944 $ CALL Bad_environment "FOO"
5945 $ CALL Bad_environment "EXT"
5946 $ CALL Bad_environment "SOME_LOGICAL_NAME_NOT_LIKELY"
5947 $ CALL Bad_environment "DOWN_LOGICAL_NAME_NOT_LIKELY"
5948 $ CALL Bad_environment "TEST" "SYMBOL"
5949 $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
5951 $! %Config-I-VMS, write perl_setup.com here
5953 $ IF (.NOT.perl_symbol)
5955 $ file_2_find = "[-]''packageup'.cld"
5957 $ echo4 "The perl.cld file is now being written..."
5958 $ OPEN/WRITE CONFIG 'file_2_find'
5960 $ IF (sharedperl .AND. archname .EQS. "VMS_AXP") THEN ext := .AXE
5961 $ IF (use_vmsdebug_perl)
5963 $ WRITE CONFIG "define verb dbgperl"
5964 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
5965 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5967 $ WRITE CONFIG "define verb perl"
5968 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
5969 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5971 $ WRITE CONFIG "define verb perl"
5972 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
5973 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5976 $ ENDIF ! (.NOT.perl_symbol)
5978 $ echo4 "The perl_setup.com file is now being written..."
5979 $ file_2_find = "[-]perl_setup.com"
5980 $ OPEN/WRITE CONFIG 'file_2_find'
5982 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
5983 $ IF cf_email.NES.perladmin
5985 $ WRITE CONFIG "$! perl configured by ''cf_email'"
5987 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
5990 $ prefix = prefix - "000000."
5991 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
5992 prefix = prefix - "]" + ".]"
5993 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'"
5994 $ WRITE CONFIG "$ ext = "".exe"""
5997 $ write config "$ if f$getsyi(""HW_MODEL"") .ge. 1024 then ext = "".AXE"""
6001 $ IF (use_vmsdebug_perl)
6003 $ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgPerl'ext'"
6004 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgPerl'ext'"
6005 $ WRITE CONFIG "$ define dbgPerlShr ''vms_prefix':[000000]dbgPerlShr'ext'"
6007 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
6008 $ WRITE CONFIG "$ define PerlShr ''vms_prefix':[000000]PerlShr'ext'"
6010 $ ELSE ! .NOT.perl_symbol
6011 $ IF (use_vmsdebug_perl)
6013 $ WRITE CONFIG "$ define dbgPerlShr ''vms_prefix':[000000]dbgPerlShr'ext'"
6015 $ WRITE CONFIG "$ define PerlShr ''vms_prefix':[000000]PerlShr'ext'"
6017 $ IF perl_verb .EQS. "PROCESS"
6019 $ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
6021 $ ENDIF ! perl_symbol
6022 $ WRITE CONFIG "$ define/nolog pod2text ''vms_prefix':[lib.pod]pod2text.com"
6023 $ WRITE CONFIG "$ define/nolog pod2html ''vms_prefix':[lib.pod]pod2html.com"
6024 $ WRITE CONFIG "$ define/nolog pod2man ''vms_prefix':[lib.pod]pod2man.com"
6028 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
6029 $ ELSE !leave in but commented out (in case setting was from perl :-)
6030 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
6033 $ WRITE CONFIG "$! Symbols for commonly used programs:"
6037 $ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' ''vms_prefix':[lib.pod]Perldoc.com -t"""
6038 $ WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text"""
6039 $ WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html"""
6040 $ WRITE CONFIG "$ pod2latex == ""'"+"'Perl' ''vms_prefix':[lib.pod]pod2latex.com"""
6041 $ WRITE CONFIG "$!pod2man == ""'"+"'Perl' pod2man"""
6042 $ WRITE CONFIG "$!Perlbug == ""'"+"'Perl' ''vms_prefix':[lib]Perlbug.com"""
6043 $ WRITE CONFIG "$ c2ph == ""'"+"'Perl' ''vms_prefix':[utils]c2ph.com"""
6044 $ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
6046 $ WRITE CONFIG "$ dprofpp == ""'"+"'Perl' ''vms_prefix':[utils]dprofpp.com"""
6048 $ WRITE CONFIG "$ h2ph == ""'"+"'Perl' ''vms_prefix':[utils]h2ph.com"""
6049 $ WRITE CONFIG "$ h2xs == ""'"+"'Perl' ''vms_prefix':[utils]h2xs.com"""
6050 $ WRITE CONFIG "$!perlcc == ""'"+"'Perl' ''vms_prefix':[utils]perlcc.com"""
6051 $ WRITE CONFIG "$ perlivp == ""'"+"'Perl' ''vms_prefix':[utils]perlivp.com"""
6052 $ WRITE CONFIG "$ splain == ""'"+"'Perl' ''vms_prefix':[utils]splain.com"""
6054 $ WRITE CONFIG "$ Perldoc == ""Perl ''vms_prefix':[lib.pod]Perldoc.com -t"""
6055 $ WRITE CONFIG "$ pod2text == ""Perl pod2text"""
6056 $ WRITE CONFIG "$ pod2html == ""Perl pod2html"""
6057 $ WRITE CONFIG "$ pod2latex == ""Perl ''vms_prefix':[lib.pod]pod2latex.com"""
6058 $ WRITE CONFIG "$!pod2man == ""Perl pod2man"""
6059 $ WRITE CONFIG "$!Perlbug == ""Perl ''vms_prefix':[lib]Perlbug.com"""
6060 $ WRITE CONFIG "$ c2ph == ""Perl ''vms_prefix':[utils]c2ph.com"""
6061 $ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
6063 $ WRITE CONFIG "$ dprofpp == ""Perl ''vms_prefix':[utils]dprofpp.com"""
6065 $ WRITE CONFIG "$ h2ph == ""Perl ''vms_prefix':[utils]h2ph.com"""
6066 $ WRITE CONFIG "$ h2xs == ""Perl ''vms_prefix':[utils]h2xs.com"""
6067 $ WRITE CONFIG "$!perlcc == ""Perl ''vms_prefix':[utils]perlcc.com"""
6068 $ WRITE CONFIG "$ perlivp == ""Perl ''vms_prefix':[utils]perlivp.com"""
6069 $ WRITE CONFIG "$ splain == ""Perl ''vms_prefix':[utils]splain.com"""
6074 $ echo "The file can be found at:"
6075 $ echo4 " ''F$SEARCH(file_2_find)'"
6076 $ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
6077 $ echo "when you are satisfied with a successful compilation,"
6078 $ echo "testing, and installation of your perl."
6080 $ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
6082 $ file_2_find = "[-]''packageup'_install.com"
6083 $ OPEN/WRITE CONFIG 'file_2_find'
6084 $ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
6085 $ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
6086 $ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
6089 $ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
6090 $ echo4 " @ ''F$SEARCH(file_2_find)'"
6091 $ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
6095 $!figure out where we "are" by parsing 'vms_default_directory_name'
6097 $ set_def_command = ""
6098 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
6099 $ tmp = vms_default_directory_name - dflt - "]"
6101 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
6103 $ tmp1 = F$ELEMENT(i,".",tmp)
6104 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
6106 $ THEN set_def_command = "set default [-"
6107 $ ELSE set_def_command = set_def_command + "-"
6111 $Beyond_set_def_loop:
6112 $ IF set_def_command.NES.""
6114 $ set_def_command = set_def_command - "-" + "]"
6116 $ echo4 "In order to build ''package' you must now issue the commands:"
6118 $ echo4 " ''set_def_command'"
6121 $ echo4 "In order to build ''package' you must now issue the command:"
6124 $ echo4 " ''make'''makefile'", macros
6127 $ IF ( F$SEARCH("config.msg").NES."" )
6129 $ echo "Hmm. I also noted the following information while running:"
6132 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
6133 $ DELETE/NOLOG/NOCONFIRM config.msg;
6139 $ DEASSIGN SYS$OUTPUT
6140 $! DEASSIGN SYS$ERROR
6142 $ IF F$GETJPI("","FILCNT").GT.vms_filcnt THEN CLOSE CONFIG
6143 $ IF F$GETJPI("","FILCNT").GT.vms_filcnt
6144 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
6146 $ dflt = F$ENVIRONMENT("DEFAULT")
6147 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
6149 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
6151 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
6152 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
6154 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
6156 $!: End of Configure