1 $! OpenVMS configuration procedure for Perl -- do not attempt to run under DOS
2 $ sav_ver = 'F$VERIFY(0)'
3 $ on control_y then goto clean_up
6 $! For example, if you unpacked perl into: [USER.PERL-5n...] then you will
7 $! want to cd into the tree and execute Configure:
9 $! $ SET DEFAULT [USER.PERL5_xxx]
14 $! $ SET DEFAULT [USER.PERL5_xxx]
15 $! $ @Configure "-des"
17 $! That's it. If you get into a bind trying to build perl on VMS then
18 $! definitely read through the README.VMS file.
19 $! Beyond that send email to vmsperl@perl.org
21 $! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 $! send suggestions to:
24 $! Dan Sugalski <dan@sidhe.org>
27 $! Adapted and converted from Larry Wall & Andy Dougherty's
28 $! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer
29 $! (a Bourne sh[ell] script for configuring the installation of perl
30 $! on non-VMS systems) in the perl5.002|3 epoch (spring/summer 1996)
31 $! with much valuable help from Charles Bailey &
32 $! the whole VMSPerl crew.
33 $! Extended and messed about with by Dan Sugalski
35 $! VMS-isms we will need:
36 $ echo = "write sys$output "
38 $ delete := delete ! local symbol overrides globals with qualifiers
46 $ be_case_sensitive = "n"
47 $ unlink_all_versions = "n"
49 $ use_vmsdebug_perl = "n"
56 $ usesitecustomize = "n"
57 $ C_Compiler_Replace = "CC="
58 $ thread_upcalls = "MTU="
59 $ thread_kernel = "MTK="
60 $ use_two_pot_malloc = "N"
61 $ use_pack_malloc = "N"
62 $ use_debugmalloc = "N"
66 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
67 $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx]
68 $! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx]
70 $! Sebastian Bazley's request: close the CONFIG handle with /NOLOG
71 $! qualifier "just in case" (configure.com is re @ed in a bad state).
72 $! This construct was tested to be not a problem as far back as
73 $! VMS V5.5-2, hopefully earlier versions are OK as well.
77 $! Now keep track of open files
79 $ vms_filcnt = F$GETJPI ("","FILCNT")
81 $!: compute my invocation name
82 $ me = F$ENVIRONMENT("PROCEDURE")
84 $! Many null statements (begin with colon ':') in the Bourne shell version of
85 $! this script serve as comments/placeholders. I have retained some of the ones
86 $! that will help you compare this .COM file to the sh version - as well as
87 $! leave placeholders for future improvements to this .COM file.
88 $! sfn = VMS "skipped for now"
90 $!: Proper PATH separator !sfn
91 $!: Proper PATH setting !sfn
92 $!: Sanity checks !sfn "Say '@''$me''"
93 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
94 $!: Configure runs within the UU subdirectory !->after find MANIFEST
95 $! <big long list of default values (mostly null)>
96 $!: We must find out about Eunice early !(?)
97 $!: list of known cpp symbols, sorted alphabetically !sfn
99 $!: default library list !sfn
100 $! <no hints files in use (yet?)>
101 $!: Extra object files, if any, needed on this platform. !sfn
102 $!: Possible local include directories to search. !sfn
103 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
104 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
105 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
106 $!: no include file wanted by default !sfn
108 $!: Possible local library directories to search. !sfn
109 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
110 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
111 $!: general looking path for locating libraries !sfn
112 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
113 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
114 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
115 $!: Private path used by Configure to find libraries. Its value !sfn
116 $!: is prepended to libpth. This variable takes care of special !sfn
117 $!: machines, like the mips. Usually, it should be empty. !sfn
119 $!: full support for void wanted by default !sfn
120 $!defvoidused=15 !sfn
121 $!: List of libraries we want. !sfn
122 $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
123 $!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
124 $!libswanted="$libswanted ucb bsd BSD PW x" !sfn
125 $!: We probably want to search /usr/shlib before most other libraries. !sfn
126 $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
127 $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
128 $!glibpth="/usr/shlib $glibpth" !sfn
129 $!: Do not use vfork unless overridden by a hint file. !sfn
130 $!usevfork=false !sfn
131 $!: script used to extract .SH files with variable substitutions !sfn
132 $!: produce awk script to parse command line options !sfn
133 $!sfn (assume no sed awk) see below
134 $!: process the command line options
136 $!: set up default values
140 $ IF F$TYPE(config_sh) .EQS. "" THEN config_sh=""
151 $ use_5005_threads = "N"
157 $ THEN !one or more switches was thrown
164 $ config_args = config_args + F$FAO(" !AS",P'i')
167 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
171 $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
172 $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
173 $Remove_quotation_mark:
175 $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
176 $ gotopt = "f" !"alse"
177 $ gotshortopt = "f" !"alse"
178 $ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
181 $ gotopt = "t" !"rue"
183 $ gotshortopt = "t" !"rue"
185 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
192 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f"
196 $ IF (F$SEARCH(config_sh).NES."")
198 $ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
199 $ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
202 $ CONTINUE !at this point check UIC && if test allows...
205 $ echo "''me': cannot read config file ''config_sh'."
209 $ echo "''me': cannot read config file ''config_sh'."
214 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h"
221 $ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m"
228 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r"
235 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s"
242 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E"
247 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K"
254 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O"
261 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S"
263 $ extractsh = "true" !VMS? Yes with munchconfig
268 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D"
271 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
273 $ tmp = P'i' + "=""define"""
277 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
279 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
280 $ echo "''me': use ""-Usymbol=val"" not ""-Dsymbol=""."
281 $ echo "''me': ignoring -D",P'i'
283 $ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')
284 $ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """"
291 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U"
294 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
296 $ tmp = P'i' + "="""""
300 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
302 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
303 $ echo "''me': use ""-Dsymbol=val"" not ""-Usymbol=val""."
304 $ echo "''me': ignoring -U",P'i'
306 $ tmp = P'i' + "=""undef"""
313 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
315 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
316 $ echo "''me' generated by an unknown version of EDT."
322 $ echo "''me': unknown option ",P'i'
325 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
327 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
329 $ ENDIF ! (P1 .NES. "")
330 $ config_args = F$EDIT(config_args,"TRIM")
334 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
335 $ echo "Usage: @''me' [-dehmr""EKOSV""] [-fconfig.sh] [""-Dsymbol""] [""-Dsymbol=value""]"
336 $ echo " [-Usymbol] [-Usymbol=]"
339 "-d" : use defaults for all answers.
340 "-e" : go on without questioning past the production of config.sh. *
341 "-f" : specify an alternate default configuration file.
342 "-h" : print this help message and exit (with an error status).
343 "-m" : skip the MANIFEST check to see that all files are present
344 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
345 "-s" : silent mode, only echoes questions and essential information.
346 -"D" : define symbol to have some value: *
347 -"Dsymbol" symbol gets the value 'define'
348 -"Dsymbol=value" symbol gets the value 'value'
349 -E : stop at the end of questions, after having produced config.sh. *
350 -K : do not use unless you know what you are doing.
351 -O : let -D and -U override definitions from loaded configuration file. *
352 -S : perform variable substitutions on all .SH files (can mix with -f) *
353 -"U" : undefine symbol: *
354 -"Usymbol" symbol gets the value 'undef'
355 -"Usymbol=" symbol gets completely empty
356 -V : print version number and exit (with a zero status).
358 $ echo "%Config-I-VMS, lower case switches must be enclosed"
359 $ echo "-Config-I-VMS, in double quotation marks, e.g.:"
360 $ echo "-Config-I-VMS, @Configure ""-des"""
361 $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
362 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
364 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
370 $ IF F$Mode() .eqs. "BATCH"
372 $ STDOUT = F$PARSE(F$GETQUI("DISPLAY_ENTRY", "JOB_NAME"), -
373 F$GETQUI("DISPLAY_ENTRY", "LOG_SPECIFICATION"), ".LOG")
374 $ WRITE SYS$OUTPUT "Warning: Executing in batch mode. To avoid file locking conflicts,"
375 $ WRITE SYS$OUTPUT "output intended for SYS$OUTPUT will be sent to a new version"
376 $ WRITE SYS$OUTPUT STDOUT
378 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
380 $ DEFINE SYS$OUTPUT "_NLA0:"
381 $ echo4 = "write STDOUT "
382 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
383 $ open/write/share=read STDOUT 'STDOUT'
391 $ echo4 = "write SYS$OUTPUT "
395 $!: run the defines and the undefines, if any, but leave the file out there...
396 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
401 $ packageup = F$EDIT((package - "5"),"UPCASE")
403 $!: Eunice requires " " instead of "", can you believe it
406 $ echo "Beginning of configuration questions for ''package'."
409 $!: Some greps do not return status, grrr.
410 $ contains = "SEARCH"
412 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
413 $! echo "Checking ''echo' to see how to suppress newlines..."
414 $! echo "giving up..."
415 $! echo "The star should be here-->*"
417 $!: Now test for existence of everything in MANIFEST
419 $ echo4 "First let's make sure your kit is complete. Checking..."
422 $! Here I assume we are in the [foo.PERLxxx...] tree
423 $! because the search routine simply does set def [-] if necessary.
424 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
426 $ manifestfound = F$SEARCH(file_2_find)
427 $ IF (manifestfound .EQS. "")
429 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
432 $ GOTO Research_manifest
435 $ echo "There is no MANIFEST file. I hope your kit is complete !"
437 $ GOTO Beyond_manifest
440 $! MANIFEST. has been found and we have set def'ed there.
441 $! Time to bail out before it's too late, i.e. too deep.
442 $! Depth check is unnecessary on Alpha VMS V7.2++ (even for ODS-2).
443 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
444 $ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
445 $! Depth check also unnecessary on ODS 5 (or later) file systems.
446 $ tmp = F$INTEGER(F$GETDVI(F$ENVIRONMENT("DEFAULT"),"ACPTYPE") - "F11V")
447 $ IF (tmp .GE. 5) THEN GOTO Beyond_depth_check
448 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("DEFAULT")).nes.".")
452 %Config-E-VMS, ERROR:
453 Sorry! It apears as though your perl build sub-directory is already too
454 deep into the VMS file system. Please try moving stuff into a shallower
455 directory (or altering the "max_allowed_dir_depth" parameter).
457 $ echo4 "ABORTING..."
458 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
460 $ EXIT !2 !$STATUS = "%X00000002" (error)
464 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
466 $ IF (manifestfound .NES. "")
468 $ IF ( F$SEARCH("UU.DIR").EQS."" )
470 $ CREATE/DIRECTORY [.UU]
472 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM [.UU]*.*;*
474 $!: Configure runs within the UU subdirectory
477 $! a little redundancy never hurt anybody?
478 $ file_2_find = "[-]" + file_2_find
479 $ manifestfound = F$SEARCH(file_2_find)
481 $ OPEN/WRITE MISSING MISSING.
482 $!change to "FALSE" if you wish to skip the manifest search
483 $!(which after all is rather slow in DCL :-)
486 $ echo "Skipping MANIFEST check as requested"
489 $ OPEN/READ CONFIG 'manifestfound'
491 $ READ/END_OF_FILE = Done_manifest CONFIG line
492 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
493 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
494 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
495 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
496 $ line = F$EDIT(line,"TRIM, COMPRESS")
497 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
498 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
500 $Re_strip_line_manifest:
501 $ loca = F$LOCATE("/",file_2_find)
502 $ ante = F$EXTRACT(0,loca,file_2_find)
503 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
504 $ test_this = ante + "." + (post - "/")
505 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
507 $ file_2_find = ante + "." + (post - "/")
508 $ GOTO Re_strip_line_manifest
510 $ file_2_find = ante + "]" + (post - "/")
512 $ file_2_find = "[-."+file_2_find
514 $ file_2_find = "[-]" + file_2_find
517 $ tmp = F$PARSE(file_2_find + ";",,,,"SYNTAX_ONLY")
518 $ IF F$SEARCH(tmp) .NES. "" THEN file_2_find = tmp
519 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
520 $ file_2_find = file_2_find - dirname
522 $! may not need double dot check on ODS-5 volumes
523 $ found = F$SEARCH(dirname + file_2_find)
524 $ IF found .NES. "" THEN GOTO Read_loop_manifest
528 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
529 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
531 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
532 $ ELSE basename = basename + dot_ele + "_"
537 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
538 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
539 basename = f$extract(0,f$length(basename)-1,basename)
540 $ file_2_find = dirname + basename
542 $ found = F$SEARCH(file_2_find)
543 $ IF (found .EQS. "" .AND. dots .GT. 2)
545 $! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
546 $! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
547 $! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
548 $ dotloc = f$locate(".",basename)
549 $ basename[dotloc,1] := "_"
550 $ dot_ele = F$ELEMENT(dots - 1,"_",f$extract(dotloc,f$length(basename),basename))
552 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
554 $ found = F$SEARCH(dirname + basename)
555 $ file_2_find = file_2_find + "," + basename
557 $ IF (found .EQS. "")
559 $ WRITE MISSING file_2_find
560 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
562 $ miss_list = miss_list + "," + file_2_find
565 $ GOTO Read_loop_manifest
570 $ ENDIF ! (manifestfound .NES. "")
572 $ IF (miss_list .NES. "")
574 $ echo "Some of the files not found include:"
577 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
583 THIS PACKAGE SEEMS TO BE INCOMPLETE.
585 You have the option of continuing the configuration process, despite the
586 distinct possibility that your kit is damaged, by typing 'y'es. If you
587 do, don't blame me if something goes wrong. I advise you to type 'n'o
588 and contact the author (dan@sidhe.org)
591 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
594 $ echo4 "Continuing..."
596 $ echo4 "ABORTING..."
600 $ echo4 "Looks good..."
601 $ DELETE/NOLOG/NOCONFIRM MISSING.;
602 $ ENDIF ! (miss_list .NES. "")
603 $ ENDIF ! (manifestfound .EQS. "") ELSE
605 $! after finding MANIFEST (see above)
606 $!: Configure runs within the UU subdirectory
608 $!: compute the number of columns on the terminal for proper question formatting
609 $ IF F$MODE() .EQS. "BATCH"
610 $! else it winds up being 512 in batch
612 $ ELSE COLUMNS = F$GETDVI("SYS$OUTPUT","DEVBUFSIZ")
614 $! "-des" sets SYS$OUTPUT to NL: with a DEVBUFSIZ too large (512 again)
615 $ IF COLUMNS .GT. 210 THEN COLUMNS = 80
616 $! not sure if this would actually be needed - it hopefully will not hurt
617 $ IF COLUMNS .LT. 40 THEN COLUMNS = 40
619 $!: set up the echo used in my read !sfn
620 $!: now set up to do reads with possible shell escape and default assignment !sfn
623 $! The sub_rp splitting is intended to handle long symbols such as the dflt for
628 $ len_rp = F$LENGTH(rp)
629 $ If (.NOT. silent) Then echo ""
634 $ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
635 $ i_rp = i_rp + COLUMNS
636 $ if i_rp .LT. len_rp THEN echo4 "''sub_rp'"
637 $ IF i_rp .LT. len_rp THEN GOTO rp_loop
645 $ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
647 $ IF (ans .EQS. "&-d")
649 $ echo4 "(OK, I will run with -d after this question.)"
651 $ deferred_fastread =1
654 $ IF (ans .EQS. "&-s")
656 $ echo4 "(OK, I will run with -s after this question.)"
658 $ deferred_silent = 1
661 $ if (bool_dflt .nes. "")
663 $ if (ans .eqs. "") then ans = bool_dflt
664 $ ans = f$extract(0,1,f$edit(ans,"collapse,upcase"))
665 $ if (ans .eqs. "Y" .or. ans .eqs. "1" .or. ans .eqs. "T")
669 $ if (ans .eqs. "N" .or. ans .eqs. "0" .or. ans .eqs. "F")
673 $ echo4 "Input not understood please answer 'Yes' or 'No'"
679 $ ans = f$edit(ans,"trim,compress")
680 $ if (ans .eqs. "") then ans = dflt
681 $ if (f$edit(ans,"upcase") .eqs. "NONE") then ans = ""
683 $ if f$type(deferred_silent) .nes. ""
687 $ delete/symbol deferred_silent
689 $ if f$type(deferred_fastread) .nes. ""
692 $ delete/symbol deferred_fastread
698 $!: create .config dir to save info across Configure sessions
699 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
701 $ CREATE/DIRECTORY [-.CONFIG]
702 $ OPEN/WRITE CONFIG [-.CONFIG]README.
704 "This directory created by Configure to save information that should"
706 "persist across sessions."
709 "You may safely delete it if you wish."
713 $ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n
714 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
715 $ IF (patchlevel_h.NES."")
717 $ SEARCH 'patchlevel_h' "define","PERL_VERSION","epoch"/match=and/out=[]ver.out
718 $ IF .NOT. usedevel .AND. usedevel .NES. "define"
720 $ OPEN/READ CONFIG []ver.out
723 $ tmp = F$EDIT(line,"TRIM,COMPRESS")
724 $ xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp))
725 $ line = xpatchlevel / 2
726 $ tmp = xpatchlevel - ( line * 2 )
729 $ echo4 "patchlevel is " + F$STRING(xpatchlevel)
732 *** WHOA THERE!!! ***
734 This is an UNSTABLE DEVELOPMENT release.
735 (The patchlevel, is odd--as opposed to even,
736 and that signifies a development release. If you want a
737 maintenance release, you want an even-numbered release.)
739 Do ***NOT*** install this into production use.
740 Data corruption and crashes are possible.
742 It is most seriously suggested that you do not continue any further
743 unless you want to help in developing and debugging Perl.
747 $ rp="Do you really want to continue? [''bool_dflt'] "
748 $ fastread_save = fastread
751 $ fastread = fastread_save
752 $ delete/symbol fastread_save
755 $ echo4 "Okay, continuing."
758 $ DELETE/NOLOG/NOCONFIRM []ver.out;
765 $ DELETE/NOLOG/NOCONFIRM []ver.out;
767 $!: general instructions
770 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
771 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
773 $ messages = F$ENVIRONMENT("MESSAGE")
774 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
775 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
776 $ IF .NOT.($status.EQ.%X08D78053)
780 $ rp = "Would you like to see the instructions? [''bool_dflt'] "
782 $ if .NOT.ans THEN needman=""
784 $ SET MESSAGE 'messages'
786 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
793 This installation shell script will examine your system and ask you questions
794 to determine how the perl5 package should be installed. If you get
795 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
796 process, edit something, then restart this process as you just did.
797 Many of the questions will have default answers in square
798 brackets; typing carriage return will give you the default.
805 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
810 In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
811 the questions and use the computed defaults (or the previous answers provided
812 there was already a config.sh file). Type '@Configure "-h"' for a list of
820 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
825 Much effort has been expended to ensure that this shell script will
826 run on any VMS system. If despite that it blows up on yours, your
827 best bet is to edit Configure.com and @ it again. Whatever problems
828 you have with Configure.com, let me (dan@sidhe.org) know how I blew
832 $!This installation script affects things in two ways:
834 $!1) it may do direct variable substitutions on some of the files included
836 $!2) it builds a config.h file for inclusion in C programs. You may edit
837 $! any of these files as the need arises after running this script.
839 $!If you make a mistake on a question, there is no easy way to back up to it
846 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
848 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
850 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
854 $ ENDIF !(needman .EQS. "true")
856 $!: see if sh knows # comments !sfn
858 $!: figure out how to guarantee sh startup !sfn
859 $!: find out where common programs are !sfn
860 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
861 $!trylist="byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
862 $! echo "I don't know where '$file' is, and my life depends on it."
863 $! echo "Go find a public domain implementation or fix your PATH setting!"
865 $! echo "Don't worry if any of the following aren't found..."
866 $!: determine whether symbolic links are supported !sfn !jem- further down
867 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
868 $!: set up the translation script tr, must be called with ./tr of course !sfn
870 $!: Try to determine whether config.sh was made on this system
871 $!: Get old answers from old config file if Configure was run on the
872 $!: same system, otherwise use the hints.
873 $ config_sh_es = "''config_sh'/[-]config.sh/"
877 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
879 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
881 $ configshfound = F$SEARCH(config_sh)
882 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
884 $ IF (i.LT.max) THEN GOTO Config_sh_look
885 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
886 $ IF (configshfound.EQS."")
888 $ config_sh = "[-]config.sh" ! the fallback default
889 $ GOTO Beyond_config_sh
892 $ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
894 $ IF F$TYPE(config_dflt) .NES. "" THEN bool_dflt = config_dflt
895 $ rp = "Shall I use ''config_sh' for default answers? [''bool_dflt'] "
900 $ echo "Fetching default answers from ''config_sh'..."
902 $! we do our own parsing of the shell-script stuff
903 $! ...and only accept symbols if they're in the | delimited list below
905 $ config_symbols0 ="|archlib|archlibexp|bin|binexp|builddir|cf_email|config_sh|installarchlib|installbin|installman1dir|installman3dir|"
906 $ config_symbols1 ="|installprivlib|installscript|installsitearch|installsitelib|most|oldarchlib|oldarchlibexp|osname|pager|perl_symbol|perl_verb|"
907 $ config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitebin|sitelib|sitelib_stem|sitelibexp|try_cxx|use64bitall|use64bitint|"
908 $ config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|uselongdouble|usemultiplicity|usemymalloc|usedebugging_perl|"
909 $ config_symbols4 ="|useperlio|usesecurelog|usethreads|usevmsdebug|usefaststdio|usemallocwrap|unlink_all_versions|uselargefiles|usesitecustomize|"
910 $ config_symbols5 ="|buildmake|builder|usethreadupcalls|usekernelthreads|usedecterm"
912 $ open/read CONFIG 'config_sh'
914 $ read/end=erd_conf_loop CONFIG line
915 $ line = f$edit(line,"trim")
916 $ if line .eqs. "" .or. f$extract(0,1,line) .eqs. "#" then goto rd_conf_loop
917 $ sym = f$element(0,"=",line)
918 $ if sym .eqs. "=" then goto rd_conf_loop
922 $ syms = config_symbols'k'
923 $ j = f$locate(dsym, syms)
924 $ if j .lt. f$length(syms) then goto erd_ck_loop
926 $ if k .lt. 6 then goto rd_ck_loop
929 $ val = f$element(1,"=",line)
930 $ val = f$extract(1,f$length(val)-2,val)
931 $ write sys$output "''sym' = ""''val'"""
936 $ delete/symbol config_symbols0
937 $ delete/symbol config_symbols1
938 $ delete/symbol config_symbols2
939 $ delete/symbol config_symbols3
940 $ delete/symbol config_symbols4
941 $ delete/symbol config_symbols5
945 $ if f$type(usedebugging_perl) .nes. ""
947 $ useperldebug = usedebugging_perl
948 $ delete/symbol usedebugging_perl
952 $ if f$type(config_dflt) .nes. "" then DELETE/SYMBOL config_dflt
954 $!we actually do not have "hints/" for VMS
958 $!First time through, eh? I have some defaults handy for the following systems:
961 $! echo " ","VMS_VAX"
962 $! echo " ","VMS_AXP"
963 $! echo " ","VMS_IA64"
964 $! : Now look for a hint file osname_osvers, unless one has been
965 $! : specified already.
968 $!You may give one or more space-separated answers, or "none" if appropriate.
969 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
971 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
975 $!: Restore computed paths !sfn
977 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
979 $ IF (osname .NES. "VMS")
981 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
985 %Config-E-VMS, ERROR:
987 Err, you do not appear to be running VMS!
988 This procedure is intended to Configure the building of Perl for VMS.
995 $ echo4 "Continuing..."
997 $ echo4 "ABORTING..."
998 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
1000 $ EXIT 2 !$STATUS = "%X00000002" (error)
1002 $ ENDIF !(osname .NES./.EQS. "VMS")
1004 $!: who configured the system
1005 $ cf_by = F$EDIT(user,"LOWERCASE")
1006 $ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
1008 $! Peter Prymmer has seen:
1009 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
1010 $! "SYS$TIME_ZONE" = "EDT"
1012 $! Charles Lane recommended:
1013 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
1014 $! "NEWS_TIMEZONE" = "-0500"
1015 $! "ST_TIMEZONE" = "EDT"
1016 $! "JAN_TIME_ZONE" = "EST "
1017 $! "MULTINET_TIMEZONE" = "EST"
1018 $! "DAYLIGHT_SAVINGS" = "1"
1020 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
1022 $! "Multinet_Timezone"
1023 $! "TCPware_Timezone"
1026 $! This snippet o' DCL returns a string in default Unix `date` format,
1027 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
1029 $ MIN_TZO = -840 !units are minutes here
1032 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
1033 $ monn = F$CVTIME(,,"MONTH")
1034 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
1035 $ hour = F$CVTIME(,,"HOUR")
1036 $ min = F$CVTIME(,,"MINUTE")
1037 $ sec = F$CVTIME(,,"SECOND")
1038 $ year = F$CVTIME(,,"YEAR")
1040 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
1044 $ mon = F$ELEMENT(i,"/",months)
1045 $ IF i.LT.monn THEN GOTO Mon_loop
1048 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
1051 $ tzhour = F$INTEGER(systz)/3600
1052 $ tzmins = F$INTEGER(systz)/60
1053 $ tzminrem = tzmins - tzhour*60
1054 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
1056 $ THEN signothetime = "+"
1057 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
1058 $ THEN direction = "on GMT/"
1059 $ ELSE direction = "east of "
1061 $ ELSE signothetime = "-"
1062 $ tzhour = -1*tzhour !keeps !UL happy
1063 $ direction = "west of "
1066 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
1069 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
1071 $ tzspan = "''tzhour' hours"
1074 $ echo "Your system is ''tzspan' ''direction'UTC in England."
1075 $ rp = "(''systz') Is this UTC Time Zone Offset correct? [''bool_dflt'] "
1081 $ GOTO Beyond_TimeZone
1085 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
1090 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
1091 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
1092 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
1094 $ rp = "Enter the Time Zone offset: [''dflt'] "
1096 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
1097 $ IF ans.EQS."" THEN ans = dflt
1098 $ tzhour = F$ELEMENT(0,":","''ans'") !first
1099 $ IF tzhour.EQS."" THEN tzhour = 0
1100 $ tzhour = F$INTEGER(tzhour)
1101 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
1102 $ IF tzminrem.NES.""
1104 $ tzminrem = F$INTEGER(tzminrem)
1105 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
1109 $ tzmins = tzhour*60 + tzminrem
1110 $ tzd = F$STRING(tzmins*60)
1113 $ signothetime = "+"
1115 $ tzhour = -1*tzhour !keeps !UL happy
1116 $ signothetime = "-"
1118 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
1121 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
1126 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
1127 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
1129 $!: determine the architecture name
1130 $! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME")
1131 $! but does have F$GETSYI("HW_MODEL").
1132 $! Please try to use either archname .EQS. "VMS_VAX" or archname .EQS.
1133 $! "VMS_AXP" from here on to allow cross-platform configuration (e.g.
1134 $! configure a VAX build on an Alpha).
1136 $ IF (F$GETSYI("HW_MODEL") .LT. 1024 .AND. F$GETSYI("HW_MODEL") .GT. 0)
1138 $ archname = "VMS_VAX"
1139 $ otherarch = "an Alpha or IA64"
1141 $ arch_type = "ARCH-TYPE=__VAX__"
1143 $ IF (F$GETSYI("ARCH_TYPE") .EQ. 2)
1145 $ archname = "VMS_AXP"
1146 $ otherarch = "a VAX or IA64"
1147 $ arch_type = "ARCH-TYPE=__AXP__"
1149 $ archname = "VMS_IA64"
1150 $ otherarch = "a VAX or Alpha"
1151 $ arch_type = "ARCH-TYPE=__IA64__"
1156 $ rp = "What is your architecture name? [''archname'] "
1160 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
1161 $ IF (ans.NES.archname) !.AND.knowitall
1163 $ echo4 "I'll go with ''archname' anyway..."
1167 $ vms_prefix = "perl_root"
1168 $ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
1169 $ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''bool_dflt'] "
1176 $ IF (archname.EQS."VMS_AXP")
1178 $ macros = macros + """AXE=1"","
1180 $ IF (archname.EQS."VMS_IA64")
1182 $ macros = macros + """IXE=1"","
1186 $!: is AFS running? !sfn
1187 $!: decide how portable to be. Allow command line overrides. !sfn
1188 $!: set up shell script to do ~ expansion !sfn
1189 $!: expand filename !sfn
1190 $!: now set up to get a file name !sfn
1192 $ IF F$TYPE(prefix) .EQS. ""
1194 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
1195 $ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - "000000." - ".000000" - ".;"
1196 $ prefixbase = prefix - "]"
1197 $! Add _ROOT to make install PERL_ROOT differ from build directory.
1198 $ prefix = prefixbase + "_ROOT.]"
1200 $ ! more redundant scrubbing of values
1201 $ prefix = prefix - "000000."
1202 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN prefix = prefix - "]" + ".]"
1204 $!: determine root of directory hierarchy where package will be installed.
1209 $ echo "By default, ''package' will be installed in ''dflt', pod"
1210 $ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
1211 $ echo "all installation directories."
1212 $ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
1213 $ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
1215 $ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
1220 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
1224 $ perl_root = prefix
1226 $! Check here for pre-existing PERL_ROOT.
1227 $! -> ask if removal desired.
1228 $! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
1229 $! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
1231 $ tmp = perl_root - ".]" + "]"
1232 $ dflt = f$parse(tmp,,,,)
1235 $ echo4 "''tmp' does not yet exist."
1236 $! create/directory 'tmp'
1238 $ echo4 "''tmp' already exists."
1241 $ vms_skip_install = "true"
1244 $ rp = "Skip the remaining """"where install"""" questions? [''bool_dflt'] "
1246 $ IF (.NOT.ans) THEN vms_skip_install = "false"
1247 $ IF (.NOT.vms_skip_install)
1250 $!: set the prefixit variable, to compute a suitable default value
1252 $!: determine where private library files go
1253 $!: Usual default is /usr/local/lib/perl5. Also allow things like
1254 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
1260 There are some auxiliary files for perl5 that need to be put into a
1261 private library directory that is accessible by everyone.
1264 $ IF F$TYPE(privlib) .NES. ""
1265 $ THEN dflt = privlib
1266 $ ELSE dflt = "''vms_prefix':[lib]"
1268 $ rp = "Pathname where the private library files will reside? "
1269 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1273 $ ENDIF !%Config-I-VMS, skip remaining "where install" questions
1275 $ IF F$TYPE(perl_symbol) .EQS. "" THEN perl_symbol := true
1276 $ IF F$TYPE(perl_verb) .EQS. "" THEN perl_verb = ""
1278 $ THEN bool_dflt = "y"
1279 $ ELSE bool_dflt = "n"
1284 $ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
1285 $ echo "symbol to invoke ''package', which is the usual method."
1286 $ echO "If you do not do so then you would need a DCL command verb at the"
1287 $ echo "process or the system wide level."
1289 $ rp = "Invoke perl as a global symbol foreign command? [''bool_dflt'] "
1291 $ IF (.NOT.ans) THEN perl_symbol = "false"
1293 $ IF (.NOT.perl_symbol)
1295 $ IF perl_verb .EQS. "DCLTABLES"
1296 $ THEN bool_dflt = "n"
1297 $ ELSE bool_dflt = "y"
1302 $ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
1303 $ echo "verb in a per-process table or in the system wide DCLTABLES (which"
1304 $ echo "would require write privilege)."
1306 $ rp = "Invoke perl as a per process command verb? [ ''bool_dflt' ] "
1309 $ THEN perl_verb = "DCLTABLES"
1310 $ ELSE perl_verb = "PROCESS"
1312 $ ENDIF ! (.NOT.perl_symbol)
1314 $!: set the base revision
1316 $ revision = baserev - ".0"
1317 $!: get the patchlevel
1319 $ echo4 "Getting the current patchlevel..."
1324 $ api_subversion="0"
1325 $ perl_patchlevel="0"
1326 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1327 $ IF (patchlevel_h.NES."")
1329 $ got_patch = "false"
1331 $ got_api_revision = "false"
1332 $ got_api_version = "false"
1333 $ got_api_subversion = "false"
1334 $ got_perl_patchlevel= "false"
1335 $ OPEN/READONLY CONFIG 'patchlevel_h'
1337 $ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
1338 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
1340 $ line = F$EDIT(line,"COMPRESS, TRIM")
1341 $ patchlevel = F$ELEMENT(2," ",line)
1342 $ got_patch = "true"
1344 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
1346 $ line = F$EDIT(line,"COMPRESS, TRIM")
1347 $ subversion = F$ELEMENT(2," ",line)
1350 $ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1352 $ line = F$EDIT(line,"COMPRESS, TRIM")
1353 $ api_revision = F$ELEMENT(2," ",line)
1354 $ got_api_revision = "true"
1356 $ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1358 $ line = F$EDIT(line,"COMPRESS, TRIM")
1359 $ api_version = F$ELEMENT(2," ",line)
1360 $ got_api_version = "true"
1362 $ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1364 $ line = F$EDIT(line,"COMPRESS, TRIM")
1365 $ api_subversion = F$ELEMENT(2," ",line)
1366 $ got_api_subversion = "true"
1368 $ IF ((F$LOCATE("""DEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1370 $ line = F$EDIT(line,"COMPRESS, TRIM")
1371 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1372 $ perl_patchlevel = perl_patchlevel - "DEVEL"
1373 $ got_perl_patchlevel = "true"
1375 $ IF (.NOT. got_patch) .OR. -
1376 (.NOT. got_sub) .OR. -
1377 (.NOT. got_api_revision) .OR. -
1378 (.NOT. got_api_version) .OR. -
1379 (.NOT. got_api_subversion) .OR. -
1380 (.NOT. got_perl_patchlevel) -
1381 THEN GOTO Patchlevel_h_loop
1386 $ IF F$SEARCH("[-].patch") .NES. ""
1389 $ OPEN/READ PATCH [-].patch
1392 $ tmp = F$EDIT(line,"COLLAPSE")
1394 $ IF tmp .GT. perl_patchlevel then perl_patchlevel = tmp
1397 $ version_patchlevel_string = "version ''patchlevel' subversion ''subversion'"
1398 $ IF got_perl_patchlevel .AND. perl_patchlevel .NES. "0"
1400 $ version_patchlevel_string = "''version_patchlevel_string' patch ''perl_patchlevel'"
1402 $ echo "(You have ''package' ''version_patchlevel_string'.)"
1404 $ version = revision + "_" + patchlevel + "_" + subversion
1406 $ IF (.NOT.vms_skip_install)
1408 $!: set the prefixup variable, to restore leading tilde escape !sfn
1410 $!: determine where public architecture dependent libraries go
1414 $ echo "''package' contains architecture-dependent library files. If you are"
1420 sharing libraries in a heterogeneous environment, you might store
1421 these files in a separate location. Otherwise, you can just include
1422 them with the rest of the public library files.
1425 $ IF F$TYPE(archlib) .NES. ""
1426 $ THEN dflt = archlib
1427 $ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
1429 $ rp = "Where do you want to put the public architecture-dependent libraries? "
1430 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1434 $ ENDIF !%Config-I-VMS, skip "where install" questions
1436 $! This quotation from Configure has to be included on VMS:
1441 There is, however, a strange, musty smell in the air that reminds me of
1442 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1444 $ IF (.NOT.vms_skip_install)
1446 $!: it so happens the Eunice I know will not run shell scripts in Unix format
1448 $!: see if setuid scripts can be secure !sfn
1449 $!: now see if they want to do setuid emulation !sfn
1451 $!: determine where site specific libraries go.
1457 The installation process will also create a directory for
1458 site-specific extensions and modules. Some users find it convenient
1459 to place all local files in this directory rather than in the main
1460 distribution directory.
1463 $ IF F$TYPE(sitelib) .NES. ""
1464 $ THEN dflt = sitelib
1465 $ ELSE dflt = privlib - "]" + ".SITE_PERL]"
1467 $ rp = "Pathname for the site-specific library files? "
1468 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1472 $!: determine where site specific architecture-dependent libraries go.
1474 $ THEN TYPE SYS$INPUT:
1477 The installation process will also create a directory for
1478 architecture-dependent site-specific extensions and modules.
1481 $ IF F$TYPE(sitearch) .NES. ""
1482 $ THEN dflt = sitearch
1483 $ ELSE dflt = sitelib - "]" + "." + archname + "]"
1485 $ rp = "Pathname for the site-specific architecture-dependent library files? "
1486 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1490 $!: determine where old public architecture dependent libraries might be
1492 $!: determine where public executables go
1493 $ IF F$TYPE(bin) .NES. ""
1495 $! ELSE dflt = prefix - ".]" + ".BIN]"
1496 $ ELSE dflt = "/''vms_prefix'"
1498 $ rp = "Pathname where the public executables will reside? "
1499 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1503 $!: determine where add-on public executables go
1504 $ IF F$TYPE(sitebin) .NES. ""
1505 $ THEN dflt = sitebin
1506 $ ELSE dflt = "''vms_prefix':[bin.''archname']"
1508 $ rp = "Pathname where the add-on public executables should be installed? "
1509 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1513 $!: determine where manual pages are on this system
1514 $!: What suffix to use on installed man pages
1515 $!: see if we can have long filenames
1516 $!: determine where library module manual pages go
1517 $!: What suffix to use on installed man pages
1518 $!: see what memory models we can support
1520 $ ELSE ! skipping "where install" questions, we must set some symbols
1521 $ IF F$TYPE(archlib).EQS."" THEN -
1522 archlib="''vms_prefix':[lib.''archname'.''version']"
1523 $ IF F$TYPE(bin) .EQS. "" THEN -
1524 bin="/''vms_prefix'"
1525 $ IF F$TYPE(privlib) .EQS. "" THEN -
1526 privlib ="''vms_prefix':[lib]"
1527 $ IF F$TYPE(sitearch) .EQS. "" THEN -
1528 sitearch="''vms_prefix':[lib.site_perl.''archname']"
1529 $ IF F$TYPE(sitelib) .EQS. "" THEN -
1530 sitelib ="''vms_prefix':[lib.site_perl]"
1531 $ IF F$TYPE(sitebin) .EQS. "" THEN -
1532 sitebin="''vms_prefix':[bin.''archname']"
1533 $ ENDIF !%Config-I-VMS, skip "where install" questions
1535 $! These derived locations can be set whether we've opted to
1536 $! skip the where install questions or not.
1538 $ IF F$TYPE(archlibexp) .EQS. "" THEN -
1539 archlibexp="''vms_prefix':[lib.''archname'.''version']"
1540 $ IF F$TYPE(binexp) .EQS. "" THEN -
1541 binexp ="''vms_prefix':[000000]"
1542 $ IF F$TYPE(builddir) .EQS. "" THEN -
1543 builddir ="''vms_prefix':[000000]"
1544 $ IF F$TYPE(installarchlib) .EQS. "" THEN -
1545 installarchlib="''vms_prefix':[lib.''archname'.''version']"
1546 $ IF F$TYPE(installbin) .EQS. "" THEN -
1547 installbin ="''vms_prefix':[000000]"
1548 $ IF F$TYPE(installscript) .EQS. "" THEN -
1549 installscript ="''vms_prefix':[utils]"
1550 $ IF F$TYPE(installman1dir) .EQS. "" THEN -
1551 installman1dir ="''vms_prefix':[man.man1]"
1552 $ IF F$TYPE(installman3dir) .EQS. "" THEN -
1553 installman3dir ="''vms_prefix':[man.man3]"
1554 $ IF F$TYPE(installprivlib) .EQS. "" THEN -
1555 installprivlib ="''vms_prefix':[lib]"
1556 $ IF F$TYPE(installsitearch) .EQS. "" THEN -
1557 installsitearch="''vms_prefix':[lib.site_perl.''archname']"
1558 $ IF F$TYPE(installsitelib) .EQS. "" THEN -
1559 installsitelib ="''vms_prefix':[lib.site_perl]"
1560 $ IF F$TYPE(oldarchlib) .EQS. "" THEN -
1561 oldarchlib="''vms_prefix':[lib.''archname']"
1562 $ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
1563 oldarchlibexp="''vms_prefix':[lib.''archname']"
1564 $ IF F$TYPE(privlibexp) .EQS. "" THEN -
1565 privlibexp ="''vms_prefix':[lib]"
1566 $ IF F$TYPE(scriptdir) .EQS. "" THEN -
1567 scriptdir ="''vms_prefix':[utils]"
1568 $ IF F$TYPE(sitearchexp) .EQS. "" THEN -
1569 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
1570 $ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
1571 sitelib_stem ="''vms_prefix':[lib.site_perl]"
1572 $ IF F$TYPE(sitelibexp) .EQS. "" THEN -
1573 sitelibexp ="''vms_prefix':[lib.site_perl]"
1575 $!: see if we need a special compiler
1576 $! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1580 $ vms_cc_available = ""
1582 $ OPEN/WRITE CONFIG ccvms.c
1583 $ WRITE CONFIG "#ifdef __DECC"
1584 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1585 $ WRITE CONFIG "#endif"
1586 $ WRITE CONFIG "#include <stdio.h>"
1587 $ WRITE CONFIG "int main() {"
1588 $ WRITE CONFIG "#ifdef __DECC"
1589 $ WRITE CONFIG " printf(""/DECC\n"");"
1590 $ WRITE CONFIG "#else"
1591 $ WRITE CONFIG " printf(""/VAXC\n"");"
1592 $ WRITE CONFIG "#endif"
1593 $ WRITE CONFIG " exit(0);"
1598 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
1599 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
1600 $ cc/NoObj/list=ccvms.lis ccvms.c
1603 $ IF (silent) THEN GOSUB Shut_up
1604 $ IF tmp.NE.%X10B90001
1606 $ IF tmp.NE.%X10000001
1608 $ nocc = "t" !%X10000001 is return from gcc
1609 $ GOTO Gcc_initial_check
1614 $ IF .NOT.silent THEN echo ""
1615 $ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1616 $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1620 $ echo "Will try cc/decc..."
1623 $ DEFINE/USER_MODE SYS$ERROR NL:
1624 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1625 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1628 $ IF (silent) THEN GOSUB Shut_up
1629 $ IF tmp.NE.%X10B90001
1631 $ echo "Apparently you don't have that one."
1634 $ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1635 $ vms_cc_available = vms_cc_available + "cc/decc "
1638 $ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line)) -
1639 .or.(F$LOCATE("HP",F$EDIT(line,"UPCASE")).NE.F$LENGTH(line))
1641 $ vms_cc_dflt = "/decc"
1642 $ vms_cc_available = vms_cc_available + "cc/decc "
1647 $ echo "Checking for gcc"
1648 $ OPEN/WRITE CONFIG gccvers.lis
1650 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1651 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1652 $ 'gcc_symbol'/noobj/version _nla0:
1655 $ IF (silent) THEN GOSUB Shut_up
1657 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1659 $ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you do not have it."
1660 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1661 $ GOTO Cxx_initial_check
1663 $ OPEN/READ CONFIG gccvers.lis
1665 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1666 $ GOTO GCC_List_Read
1670 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1671 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1675 $! Do note that [vms]perl source files have a ways to go before they will
1676 $! compile under CXX.
1677 $! In order to test Configure.com with CXX invoke it with "-Dtry_cxx" on
1678 $! the command line.
1680 $ IF F$TYPE(try_cxx) .EQS. "" THEN try_cxx := n
1681 $ IF try_cxx .OR. try_cxx .EQS. "define"
1685 $ echo "Checking for CXX..."
1686 $ OPEN/WRITE CONFIG ccvms.c
1687 $ WRITE CONFIG "#include <iostream>"
1688 $ WRITE CONFIG "int main() {"
1689 $ WRITE CONFIG "#ifdef __DECCXX"
1690 $ WRITE CONFIG " cout << __DECCXX, endl;"
1691 $ WRITE CONFIG "#else"
1692 $ WRITE CONFIG " cout << 0,endl;"
1693 $ WRITE CONFIG "#endif"
1694 $! Todo: add G++ identifier check ??
1695 $ WRITE CONFIG " return(0);"
1699 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1700 $ DEFINE/USER_MODE SYS$ERROR NL:
1704 $! success $status with:
1705 $! DEC C++ V1.1-001 on VMS VAX V5.5-2
1706 $! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1707 $! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1708 $! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1709 $ IF tmp .eq. %X15F60001
1713 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1714 $ DEFINE/USER_MODE SYS$ERROR NL:
1715 $ link/nodebug ccvms.obj
1718 $ ! success $status with:
1719 $ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1720 $ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1721 $ IF tmp .eq. %X10000001
1724 $ vms_cc_available = vms_cc_available + "cxx "
1725 $ echo "CXX and LINK are available."
1727 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1729 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1730 $ DEFINE/USER_MODE SYS$ERROR NL:
1734 $ ! success $status with:
1735 $ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1736 $ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1737 $ IF tmp .eq. %X10000001
1739 $ ld_try = "cxxlink"
1740 $ vms_cc_available = vms_cc_available + "cxx "
1741 $ echo "CXX and CXXLINK are available."
1744 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1748 $ DELETE/NOLOG/NOCONFIRM ccvms.c;
1749 $ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1750 $ CALL Cxx_demangler_cleanup
1752 $ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1755 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1757 $!: see if we need a special compiler
1759 $ echo "Available compiler(s):"
1760 $ echo "( ''vms_cc_available')"
1763 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1767 $ rp = "Use which C compiler? [''dflt'] "
1771 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1773 $ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans)) -
1774 .or.(F$LOCATE("hp",ans).NE.F$LENGTH(ans))
1779 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1781 $ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1786 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1790 $ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1791 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt)
1793 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1798 $ IF Mcc .EQS. "cc/decc"
1801 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1807 $ IF Mcc .EQS. "cc/decc"
1810 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1812 $ IF Mcc .EQS. "gcc"
1815 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1818 $Decc_Version_check:
1820 $ IF ccname .EQS. "DEC"
1823 $ echo4 "Checking for the Dec C version number..."
1824 $ OPEN/WRITE CONFIG deccvers.c
1825 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1826 $ WRITE CONFIG "#include <stdio.h>"
1827 $ WRITE CONFIG "int main() {"
1828 $ WRITE CONFIG "#ifdef __DECC"
1829 $ WRITE CONFIG "#ifdef __DECC_VER"
1830 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1831 $ WRITE CONFIG "#else"
1832 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1833 $ WRITE CONFIG "#endif"
1834 $ WRITE CONFIG "#endif"
1835 $ WRITE CONFIG " exit(0);"
1839 $ DEFINE/USER_MODE SYS$ERROR NL:
1840 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1843 $ IF (silent) THEN GOSUB Shut_up
1844 $ DEFINE/USER_MODE SYS$ERROR NL:
1845 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1846 $ link/nodebug deccvers.obj
1848 $ IF (silent) THEN GOSUB Shut_up
1849 $ OPEN/WRITE CONFIG deccvers.out
1850 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1851 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1852 $ mcr []deccvers.exe
1856 $ IF (silent) THEN GOSUB Shut_up
1857 $ OPEN/READ CONFIG deccvers.out
1858 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1861 $ echo "You are using Dec C ''line'"
1863 $ Dec_C_Version = F$INTEGER(line)
1864 $ IF Dec_C_Version .GE. 60200000 .AND. archname .NES. "VMS_VAX"
1866 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1867 $ ccflags = ccflags + "/NOANSI_ALIAS"
1869 $ DELETE/NOLOG/NOCONFIRM deccvers.*;
1873 $ IF ccname .EQS. "GCC"
1875 $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1876 $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1877 $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1878 $ IF gcclib_olb .EQS. ""
1880 $! These objects/libs come w/ gcc 2.7.2 for AXP:
1881 $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1882 $ IF tmp .NES. "" then gcclib_olb = tmp
1883 $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1886 $ IF gcclib_olb .EQS. ""
1887 $ THEN gcclib_olb = tmp
1888 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1891 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1894 $ IF gcclib_olb .EQS. ""
1895 $ THEN gcclib_olb = tmp
1896 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1899 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1902 $ IF gcclib_olb .EQS. ""
1903 $ THEN gcclib_olb = tmp
1904 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1907 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1909 $ gcclib_olb = gcclib_olb + "/lib"
1911 $ IF gcclib_olb .NES. "" .AND. -
1912 (vaxcrtl_olb .NES. "" .OR. -
1913 vaxcrtl_exe .NES. "" )
1916 $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1917 $ OPEN/WRITE CONFIG gccvers.c
1918 $ WRITE CONFIG "#include <stdio.h>"
1919 $ WRITE CONFIG "int main() {"
1920 $ WRITE CONFIG "#ifdef __GNUC__"
1921 $ WRITE CONFIG "#ifdef __VERSION__"
1922 $ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1923 $ WRITE CONFIG "#else"
1924 $ WRITE CONFIG " printf(""%s\n"", ""1"");"
1925 $ WRITE CONFIG "#endif"
1926 $ WRITE CONFIG "#endif"
1927 $ WRITE CONFIG " exit(0);"
1930 $ DEFINE SYS$ERROR _NLA0:
1931 $ DEFINE SYS$OUTPUT _NLA0:
1934 $ DEASSIGN SYS$ERROR _NLA0:
1935 $ DEASSIGN SYS$OUTPUT _NLA0:
1936 $ IF (silent) THEN GOSUB Shut_up
1937 $ DEFINE SYS$ERROR _NLA0:
1938 $ DEFINE SYS$OUTPUT _NLA0:
1939 $ IF vaxcrtl_exe .EQS. ""
1941 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1943 $ link/nodebug gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1946 $ link/nodebug gccvers.obj,'gcclib_olb'
1950 $ OPEN/WRITE CONFIG GCCVERS.OPT
1951 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1953 $ link/nodebug gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1956 $ DEASSIGN SYS$ERROR
1957 $ DEASSIGN SYS$OUTPUT
1958 $ IF (silent) THEN GOSUB Shut_up
1959 $ OPEN/WRITE CONFIG gccvers.out
1960 $ DEFINE SYS$ERROR CONFIG
1961 $ DEFINE SYS$OUTPUT CONFIG
1965 $ DEASSIGN SYS$OUTPUT
1966 $ DEASSIGN SYS$ERROR
1967 $ IF (silent) THEN GOSUB Shut_up
1968 $ OPEN/READ CONFIG gccvers.out
1969 $ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1972 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
1973 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1975 $ echo "You are not using GNU cc."
1978 $ echo "You are using GNU cc ''line'"
1981 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1987 $ IF ccname .EQS. "CXX"
1989 $ OPEN/WRITE CONFIG cxxvers.c
1990 $ WRITE CONFIG "#include <stdio.h>"
1991 $ WRITE CONFIG "int main() {"
1992 $ WRITE CONFIG "#ifdef __DECCXX_VER"
1993 $ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
1994 $ WRITE CONFIG "#else"
1995 $ WRITE CONFIG " printf(""%i\n"", ""0"");"
1996 $ WRITE CONFIG "#endif"
1997 $ WRITE CONFIG " return(0);"
2001 $ DEFINE/USER_MODE SYS$ERROR NL:
2002 $ DEFINE/USER_MODE SYS$OUTPUT NL:
2006 $ IF (silent) THEN GOSUB Shut_up
2008 $ DEFINE/USER_MODE SYS$ERROR NL:
2009 $ DEFINE/USER_MODE SYS$OUTPUT NL:
2013 $ IF (silent) THEN GOSUB Shut_up
2014 $ OPEN/WRITE CONFIG cxxvers.out
2016 $ DEFINE/USER_MODE SYS$ERROR CONFIG
2017 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
2022 $ IF (silent) THEN GOSUB Shut_up
2023 $ OPEN/READ CONFIG cxxvers.out
2024 $ READ/END_OF_FILE=Cxx_cleanup CONFIG line
2027 $ DELETE/NOLOG/NOCONFIRM cxxvers.*;
2028 $ echo "You are using CXX ''line'"
2031 $ d_cplusplus = "define"
2032 $ CALL Cxx_demangler_cleanup
2034 $ d_cplusplus = "undef"
2037 $Cxx_demangler_cleanup: SUBROUTINE
2039 $! If we do build with CXX these demangler Dbs will be left all over.
2040 $! However, configure.com does try to remove the [.UU] sub directory.
2041 $! Be sure to set default to the correct place before calling this sub.
2044 $ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
2045 $ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
2047 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
2048 $ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
2052 $ ENDSUBROUTINE ! Cxx_demangler_cleanup
2057 $ OPEN/READ CONFIG ccvms.lis
2059 $ IF archname .EQS. "VMS_VAX"
2064 $ IF archname .EQS. "VMS_AXP"
2072 $ line = F$EDIT(line,"TRIM,COMPRESS")
2073 $ line = line - "Page 1" ! occurs at end all compilers
2074 $ line = line - "CCVMS " ! filename appears w/ VAXC
2075 $ line = line - "Source Listing " ! Seen w/ AXP DECC
2076 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
2078 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
2079 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
2083 $!: What should the include directory be ? (.TLB text libraries)
2085 $ rp = "Where are the include files you want to use? "
2086 $ IF f$length( rp + "[''dflt'] " ) .GT. 76
2087 $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
2088 $ ELSE rp = rp + "[''dflt'] "
2093 $!: see if we have to deal with yellow pages, now NIS.
2094 $!: now get the host name
2097 $ echo4 "Figuring out host name..." !>&4
2099 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
2100 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
2101 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
2102 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
2103 $ IF myhostname.eqs."".and. -
2104 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
2105 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
2106 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
2107 $ IF myhostname.eqs."".and. -
2108 F$TRNLNM("TCPIP$INET_HOST") .nes. "" .and. -
2109 F$TRNLNM("TCPIP$INET_DOMAIN") .nes. "" THEN -
2110 myhostname = F$TRNLNM("TCPIP$INET_HOST") + "." + F$TRNLNM("TCPIP$INET_DOMAIN")
2111 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
2112 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
2113 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
2114 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
2115 $!: you do not want to know about this
2117 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
2122 $ READ SYS$COMMAND/PROMPT= -
2123 "Please type the (one word) name of your host: " ans
2126 $!: translate upper to lower if necessary
2127 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
2128 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
2129 $ IF mylowhostname.NES.myhostname
2131 $ echo "(Normalizing case in your host name)"
2132 $ myhostname = mylowhostname
2135 $ fp = F$LOCATE(".",myhostname)
2136 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
2137 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
2139 $ rp = "What is your domain name? [''mydomain'] "
2143 $!: translate upper to lower if necessary
2144 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
2145 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
2146 $ IF mylowdomain.NES.mydomain
2148 $ echo "(Normalizing case in your domain name)"
2149 $ mydomain = mylowdomain
2152 $ myhostname = myhostname - mydomain
2153 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
2159 I need to get your e-mail address in Internet format if possible, i.e.
2160 something like user@host.domain. Please answer accurately since I have
2161 no easy means to double check it. The default value provided below
2162 is most probably close to the reality but may not be valid from outside
2163 your organization...
2166 $ IF F$TYPE(cf_email) .EQS. ""
2168 $ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
2169 $ rp = "What is your e-mail address? [''dflt'] "
2179 If you or somebody else will be maintaining perl at your site, please
2180 fill in the correct e-mail address here so that they may be contacted
2181 if necessary. Currently, the "perlbug" program included with perl
2182 will send mail to this address in addition to perlbug@perl.com. You may
2183 enter "none" for no administrator.
2186 $ dflt = "''cf_email'"
2187 $ rp = "Perl administrator e-mail address [''dflt'] "
2191 $!: determine where public executable scripts go
2192 $!: determine perl absolute location
2193 $!: figure out how to guarantee perl startup
2195 $!: see how we invoke the C preprocessor
2197 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
2198 $!: Set private lib path
2199 $!: Now check and see which directories actually exist, avoiding duplicates
2200 $!: determine optimize, if desired, or use for debug flag also
2201 $!: We will not override a previous value, but we might want to
2202 $!: augment a hint file
2203 $!: the following weeds options from ccflags that are of no interest to cpp
2204 $!: flags used in final linking phase
2205 $!: Try to guess additional flags to pick up local libraries.
2208 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
2209 $!: compute shared library extension
2210 $!: Looking for optional libraries
2211 $!: see if nm is to be used to determine whether a symbol is defined or not
2212 $!: get list of predefined functions in a handy place
2213 $!: see if we have sigaction or sigprocmask
2214 $!: see whether socketshr exists
2215 $ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
2217 $ Has_socketshr = "T"
2219 $ echo4 "Hmm... Looks like you have SOCKETSHR Berkeley networking support."
2221 $ Has_socketshr = "F"
2223 $ IF (ccname .EQS. "DEC" .AND. Dec_C_Version .GE. 50200000) .OR. (ccname .EQS. "CXX")
2225 $ Has_Dec_C_Sockets = "T"
2227 $ echo4 "Hmm... Looks like you have Dec C Berkeley networking support."
2229 $ Has_Dec_C_Sockets = "F"
2231 $ ! Hey, we've got both. Default to Dec C, then, since it's better
2232 $ IF Has_socketshr .OR. Has_Dec_C_Sockets
2235 $ echo "You have sockets available. Which socket stack do you want to"
2236 $ echo "build into Perl?"
2237 $ IF Has_Dec_C_Sockets
2241 $ dflt = "SOCKETSHR"
2243 $ rp = "Choose socket stack (NONE"
2244 $ IF Has_socketshr THEN rp = rp + ",SOCKETSHR"
2245 $ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
2246 $ rp = rp + ") [''dflt'] "
2248 $ Has_Dec_C_Sockets = "F"
2249 $ Has_socketshr = "F"
2250 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
2251 $ IF ans.eqs."decc" THEN Has_Dec_C_Sockets = "T"
2252 $ IF ans.eqs."socketshr" THEN Has_socketshr = "T"
2256 $! Ask if they want to build with VMS_DEBUG perl
2258 $ echo "Perl can be built to run under the VMS debugger."
2259 $ echo "You should only select this option if you are debugging"
2260 $ echo "perl itself. This can be a useful feature if you are "
2261 $ echo "embedding perl in a program."
2263 $ if f$type(usevmsdebug) .nes. ""
2265 $ if usevmsdebug .or. usevmsdebug .eqs. "define" then bool_dflt="y"
2267 $ rp = "Build a VMS-DEBUG version of Perl? [''bool_dflt'] "
2269 $ use_vmsdebug_perl = ans
2270 $ IF use_vmsdebug_perl
2272 $ usevmsdebug = "define"
2273 $ macros = macros + """__DEBUG__=1"","
2275 $ usevmsdebug = "undef"
2278 $! Ask if they want to build with DEBUGGING
2280 $ echo "Perl can be built with extra runtime debugging enabled. This"
2281 $ echo "enables the -D switch, at the cost of some performance. It"
2282 $ echo "was mandatory on perl 5.005 and before on VMS, but is now"
2283 $ echo "optional. If you do not generally use it you should probably"
2284 $ echo "leave this off and gain a bit of extra speed."
2286 $ if f$type(useperldebug) .nes. ""
2288 $ if f$extract(0,1,f$edit(useperldebug,"collapse,upcase")).eqs."N" .or. useperldebug .eqs. "undef" then bool_dflt="n"
2290 $ rp = "Build a DEBUGGING version of Perl? [''bool_dflt'] "
2292 $ use_debugging_perl = ans
2294 $! Ask if they want to build with MULTIPLICITY
2296 $ echo "Perl can be built so that multiple Perl interpreters can coexist"
2297 $ echo "within the same Perl executable."
2298 $ echo "There is some performance overhead, however, so you"
2299 $ echo "probably do not want to choose this unless you are going to be"
2300 $ echo "doing things with embedded perl."
2302 $ if f$type(usemultiplicity) .nes. ""
2304 $ if usemultiplicity .or. usemultiplicity .eqs. "define" then bool_dflt = "y"
2306 $ rp = "Build Perl for multiplicity? [''bool_dflt'] "
2310 $ usemultiplicity="define"
2312 $ usemultiplicity="undef"
2315 $! Ask if they want to build with 64-bit support
2316 $ IF (archname.NES."VMS_VAX").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2319 $ IF F$TYPE(use64bitint) .NES. ""
2321 $ IF use64bitint .OR. use64bitint .eqs. "define" THEN bool_dflt = "y"
2324 $ echo "You have natively 64-bit long integers."
2326 $ echo "Perl can be built to take advantage of 64-bit integer types"
2327 $ echo "on some systems, To do so, Configure can be run with -Duse64bitint."
2328 $ echo "Choosing this option will most probably introduce binary incompatibilities."
2330 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2331 $ rp = "Try to use 64-bit integers, if available? [''bool_dflt'] "
2336 $ IF F$TYPE(use64bitall) .NES. ""
2338 $ IF use64bitall .OR. use64bitall .eqs. "define" THEN bool_dflt = "y"
2341 $ echo "You may also choose to try maximal 64-bitness. It means using as much"
2342 $ echo "64-bitness as possible on the platform. This in turn means even more"
2343 $ echo "binary incompatibilities. On the other hand, your platform may not"
2344 $ echo "have any more 64-bitness available than what you already have chosen."
2346 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2347 $ rp = "Try to use maximal 64-bit support, if available? [''bool_dflt'] "
2350 $ IF use64bitall .AND. .NOT. use64bitint
2353 $ echo "Since you have chosen a maximally 64-bit build, I'm also turning on"
2354 $ echo "the use of 64-bit integers."
2358 $ bool_dflt = use64bitall
2359 $ IF F$TYPE(uselargefiles) .NES. ""
2361 $ IF uselargefiles .OR. uselargefiles .eqs. "define" THEN bool_dflt = "y"
2364 $ echo "Perl can be built to understand large files (files larger than 2 gigabytes)"
2365 $ echo "on some systems. To do so, Configure can be run with -Duselargefiles."
2367 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2368 $ rp = "Try to understand large files, if available? [''bool_dflt'] "
2373 $ IF F$TYPE(uselongdouble) .NES. ""
2375 $ IF uselongdouble .OR. uselongdouble .eqs. "define" THEN bool_dflt = "y"
2378 $ echo "Perl can be built to take advantage of long doubles which"
2379 $ echo "(if available) may give more accuracy and range for floating point numbers."
2381 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2382 $ rp = "Try to use long doubles, if available? [''bool_dflt'] "
2384 $ uselongdouble = ans
2386 $ ENDIF ! not VAX && >= 7.1
2388 $ IF usesitecustomize .OR. usesitecustomize .eqs. "define"
2390 $ usesitecustomize = "define"
2392 $ usesitecustomize = "undef"
2395 $! Ask about threads, if appropriate
2396 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
2399 $ echo "Perl can be built to take advantage of threads on some systems."
2400 $ echo "To do so, configure.com can be run with -""Dusethreads""."
2402 $ echo "Note that Perl built with threading support runs slightly slower"
2403 $ echo "and uses more memory than plain Perl. The current implementation"
2404 $ echo "is believed to be stable, but it is fairly new, and so should be"
2405 $ echo "treated with caution."
2408 $ if f$type(usethreads) .nes. ""
2410 $ if usethreads .or. usethreads .eqs. "define" then bool_dflt="y"
2412 $! Catch cases where user specified ithreads or 5005threads but
2413 $! forgot -Dusethreads
2414 $ if f$type(useithreads) .nes. ""
2416 $ if useithreads .or. useithreads .eqs. "define" then bool_dflt="y"
2418 $ if f$type(use5005threads) .nes. ""
2420 $ if use5005threads .or. use5005threads .eqs. "define" then bool_dflt="y"
2422 $ echo "If this doesn't make any sense to you, just accept the default '" + bool_dflt + "'."
2423 $ rp = "Build a threading Perl? [''bool_dflt'] "
2428 $ ! Shall we do the 5.005-type threads, or IThreads?
2429 $ echo "Since release 5.6, Perl has had two different threading implementations,"
2430 $ echo "the newer interpreter-based version (ithreads) with one interpreter per"
2431 $ echo "thread, and the older 5.005 version (5005threads)."
2432 $ echo "The 5005threads version is effectively unmaintained and will probably be"
2433 $ echo "removed in Perl 5.10, so there should be no need to build a Perl using it"
2434 $ echo "unless needed for backwards compatibility with some existing 5.005threads"
2438 $ if f$type(useithreads) .nes. ""
2440 $ if useithreads .eqs. "undef" then bool_dflt="n"
2442 $ if f$type(use5005threads) .nes. ""
2444 $ if use5005threads .or. use5005threads .eqs. "define" then bool_dflt="n"
2446 $ rp = "Use the newer intepreter-based ithreads? [''bool_dflt'] "
2451 $ use_5005_threads="N"
2453 $ use_5005_threads="Y"
2455 $ ! Are they on VMS 7.1 or greater?
2456 $ IF "''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.1"
2459 $ echo "Threaded Perl can be linked to use system upcalls on your system. This feature"
2460 $ echo "allows the thread scheduler to be made aware of system events (such as I/O)"
2461 $ echo "so as to prevent a single thread from blocking all the threads in a program,"
2462 $ echo "even on a single-processor machine."
2464 $ IF f$type(usethreadupcalls) .NES. ""
2466 $ if .not. usethreadupcalls .or. usethreadupcalls .eqs. "undef" then bool_dflt="n"
2468 $ rp = "Enable thread upcalls? [''bool_dflt'] "
2472 $ thread_upcalls = "MTU=MTU=1"
2473 $ usethreadupcalls = "define"
2474 $ ! Are they on alpha or itanium?
2475 $ IF (archname .NES. "VMS_VAX") .AND. ("''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.2")
2478 $ echo "Threaded Perl can be linked to use multiple kernel threads on your system."
2479 $ echo "This feature allows multiple user threads to make use of multiple CPUs on"
2480 $ echo "a multi-processor machine."
2482 $ IF f$type(usekernelthreads) .nes. ""
2484 $ if usekernelthreads .or. usekernelthreads .eqs. "define" then bool_dflt="y"
2486 $ rp = "Enable multiple kernel threads? [''bool_dflt'] "
2490 $ thread_kernel = "MTK=MTK=1"
2491 $ usekernelthreads = "define"
2498 $ IF F$TYPE(usethreadupcalls) .EQS. "" THEN usethreadupcalls = "undef"
2499 $ IF F$TYPE(usekernelthreads) .EQS. "" THEN usekernelthreads = "undef"
2500 $ IF archname .NES. "VMS_VAX"
2504 $ echo "By default, perl (and pretty much everything else on VMS) uses"
2505 $ echo "case-insensitive linker symbols. Which is to say, when the"
2506 $ echo "underlying C code makes a call to a routine called Perl_foo in"
2507 $ echo "the source, the name in the object modules or shareable images"
2508 $ echo "is really PERL_FOO. There are some packages that use an"
2509 $ echo "embedded perl interpreter that instead require case-sensitive"
2510 $ echo "linker symbols."
2512 $ echo "If you have no idea what this means, and do not have"
2513 $ echo "any program requiring anything, choose the default."
2514 $ bool_dflt = be_case_sensitive
2515 $ if f$type(usecasesensitive) .nes. ""
2517 $ if usecasesensitive .or. usecasesensitive .eqs. "define" then bool_dflt = "y"
2518 $ if f$extract(0,1,f$edit(usecasesensitive,"collapse,upcase")).eqs."N" .or. usecasesensitive .eqs. "undef" then bool_dflt = "n"
2520 $ rp = "Build with case-sensitive symbols? [''bool_dflt'] "
2522 $ be_case_sensitive = ans
2525 $ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers"
2526 $ echo "internally on Alpha, but if you need G_FLOAT for binary compatibility"
2527 $ echo "with an external library or existing data, you may wish to disable"
2528 $ echo "the IEEE math option."
2529 $ bool_dflt = use_ieee_math
2530 $ if f$type(useieee) .nes. ""
2532 $ if useieee .or. useieee .eqs. "define"
2539 $ rp = "Use IEEE math? [''bool_dflt'] "
2541 $ use_ieee_math = ans
2543 $ be_case_sensitive = "n"
2544 $ use_ieee_math = "n"
2547 $ usecasesensitive = "undef"
2548 $ if (use_ieee_math) then useieee = "define"
2549 $ if (be_case_sensitive) then usecasesensitive = "define"
2550 $! Unlink all versions?
2552 $ echo "By default, Perl's unlink() provides VMS-like behavior and only"
2553 $ echo "deletes the latest version of a file. Enabling this option builds"
2554 $ echo "Perl so that unlink() deletes all versions of a file."
2555 $ bool_dflt = unlink_all_versions
2556 $ if f$type(unlink_all_versions) .nes. ""
2558 $ if unlink_all_versions .or. unlink_all_versions .eqs. "define"
2565 $ rp = "Make unlink() delete all versions of a file? [''bool_dflt'] "
2567 $ unlink_all_versions = ans
2568 $ IF unlink_all_versions
2570 $ d_unlink_all_versions = "define"
2572 $ d_unlink_all_versions = "undef"
2575 $! To avoid 'SYSTEM-F-PROTINSTALL, protected images must be installed'
2576 $! at run time, we must check that the DECterm image is both present
2577 $! and installed as a known image.
2579 $ decterm_capable = "FALSE"
2580 $ dflt = "SYS$SHARE:DECW$TERMINALSHR12.EXE"
2581 $ IF F$SEARCH(dflt) .NES. ""
2583 $ decterm_capable = F$FILE_ATTRIBUTES(dflt, "KNOWN")
2585 $ dflt = "SYS$SHARE:DECW$TERMINALSHR.EXE"
2586 $ IF F$SEARCH(dflt) .NES. "" THEN decterm_capable = F$FILE_ATTRIBUTES(dflt, "KNOWN")
2589 $ IF F$TYPE(usedecterm) .NES. ""
2591 $ if usedecterm .or. usedecterm .eqs. "define"
2600 $ IF .NOT. use_debugging_perl THEN bool_dflt = "n"
2602 $ echo "Perl can be built to support DECterms from the Perl debugger"
2604 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2605 $ rp = "Build with DECterm Perl debugger support, if available? [''bool_dflt'] "
2608 $ IF (usedecterm .OR. usedecterm .EQS. "define") .AND. .NOT. decterm_capable
2610 $ echo4 "No installed DECterm image found, disabling..."
2615 $ echo "Your compiler may want other flags. For this question you should include"
2616 $ echo "/INCLUDE=(whatever) and /DEFINE=(whatever), flags and any other flags"
2617 $ echo "or qualifiers used by the compiler."
2619 $ echo "To use no flags, specify the word ""none""."
2620 $ dflt = user_c_flags
2621 $ rp = "Any additional cc flags? [''dflt'] "
2623 $ IF ans .EQS. "none" THEN ans = ""
2624 $ user_c_flags = "''ans'"
2626 $! Ask whether they want to use secure logical translation when tainting
2628 $ echo "As Perl starts up, it checks several logical names, such as"
2629 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2630 $ echo "of its behavior. For additional security, you may limit this"
2631 $ echo "process to executive- and kernel-mode translation when tainting"
2632 $ echo "is enabled. In this case, logical names normally skipped when"
2633 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2634 $ echo "If you do not choose to do this, the usual order of access modes"
2635 $ echo "is used for logical name translation."
2637 $ echo "This restriction does not apply to the %ENV hash or to implicit"
2638 $ echo "logical name translation during parsing of file specifications;"
2639 $ echo "these always use the normal sequence of access modes for logical"
2640 $ echo "name translation."
2642 $ if f$type(usesecurelog) .nes. ""
2644 $ if f$extract(0,1,f$edit(usesecurelog,"collapse,upcase")).eqs."N" .or. usesecurelog .eqs. "undef" then bool_dflt = "n"
2646 $ rp = "Use secure logical name translation? [''bool_dflt'] "
2648 $ d_secintgenv = ans
2649 $ usesecurelog = "undef"
2650 $ if (d_secintgenv) then usesecurelog = "define"
2652 $! Ask whether they want to default filetypes
2654 $ echo "When you pass the name of a program to Perl on the command line,"
2655 $ echo "it generally doesn't supply any defaults unless the -S command"
2656 $ echo "line switch is specified. In keeping with the VMS tradition of"
2657 $ echo "default file types, however, you can configure Perl to try default"
2658 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2659 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2660 $ echo "finally foo.com)."
2662 $ echo "This is currently broken in some configurations. Only enable it if"
2663 $ echo "you know what you are doing."
2665 $ if f$type(usedefaulttypes) .nes. ""
2667 $ if usedefaulttypes .or. usedefaulttypes .eqs. "define" then bool_dflt="y"
2669 $ rp = "Always use default file types? [''bool_dflt'] "
2671 $ d_alwdeftype = ans
2672 $ usedefaulttypes = "undef"
2673 $ if (d_alwdeftype) then usedefaulttypes = "define"
2675 $! determine whether to use malloc wrapping
2678 $ IF F$TYPE(usemallocwrap) .nes. ""
2680 $ if .NOT. usemallocwrap .or. usemallocwrap .eqs. "undef" then bool_dflt = "n"
2682 $ rp = "Do you wish to wrap malloc calls to protect against potential overflows? [''bool_dflt'] "
2685 $ THEN usemallocwrap = "define"
2686 $ ELSE usemallocwrap = "undef"
2689 $! Ask if they want to use perl's memory allocator
2691 $ echo "Perl has a built-in memory allocator that is tuned for normal"
2692 $ echo "memory usage. It is oftentimes better than the standard system"
2693 $ echo "memory allocator. It also has the advantage of providing memory"
2694 $ echo "allocation statistics, if you choose to enable them."
2696 $ IF F$TYPE(usemymalloc) .nes. ""
2698 $ if usemymalloc .or. usemymalloc .eqs. "define" then bool_dflt = "y"
2700 $ rp = "Do you wish to attempt to use the malloc that comes with ''package'? [''bool_dflt'] "
2705 $ IF use_debugging_perl
2708 $ echo "Perl can keep statistics on memory usage if you choose to use"
2709 $ echo "them. This is useful for debugging, but does have some"
2710 $ echo "performance overhead."
2712 $ rp = "Do you want the debugging memory allocator? [''bool_dflt'] "
2714 $ use_debugmalloc = ans
2716 $ ! Check which memory allocator we want
2718 $ echo "There are currently three different memory allocators: the"
2719 $ echo "default (which is a pretty good general-purpose memory manager),"
2720 $ echo "the TWO_POT allocator (which is optimized to save memory for"
2721 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save"
2722 $ echo "memory for smaller allocations). They're all good, but if your"
2723 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use"
2724 $ echo "PACK_MALLOC."
2726 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2728 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2729 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2732 $ known_extensions = ""
2734 $ OPEN/READ CONFIG 'manifestfound'
2736 $ READ/END_OF_FILE=end_ext/ERROR=end_ext CONFIG line
2737 $ IF F$EXTRACT(0,4,line) .NES. "ext/" .AND. -
2738 F$EXTRACT(0,8,line) .NES. "vms/ext/" THEN goto ext_loop
2739 $ line = F$EDIT(line,"COMPRESS")
2740 $ line = F$ELEMENT(0," ",line)
2741 $ line_len = F$LENGTH(line)
2742 $ IF F$EXTRACT(line_len - 12,12,line) .NES. "/Makefile.PL" THEN goto ext_loop
2743 $ IF F$EXTRACT(0,4,line) .EQS. "ext/" THEN -
2744 xxx = F$EXTRACT(4,line_len - 16,line)
2745 $ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit
2746 $ IF xxx .EQS. "SDBM_File/sdbm" THEN goto ext_loop ! sub extension - omit
2747 $ IF xxx .EQS. "Devel/PPPort/harness" THEN goto ext_loop ! sub extension - omit
2748 $ IF F$EXTRACT(0,7,xxx) .EQS. "Encode/" THEN goto ext_loop ! sub extension - omit
2749 $ IF xxx .EQS. "B/C" THEN goto ext_loop ! sub extension - omit
2750 $ IF F$EXTRACT(0,8,line) .EQS. "vms/ext/" THEN -
2751 xxx = "VMS/" + F$EXTRACT(8,line_len - 20,line)
2752 $ known_extensions = known_extensions + " ''xxx'"
2757 $ known_extensions = F$EDIT(known_extensions,"TRIM,COMPRESS")
2758 $ dflt = known_extensions
2759 $ IF ccname .NES. "DEC" .AND. ccname .NES. "CXX"
2761 $ dflt = dflt - "POSIX" ! not with VAX C or GCC
2763 $ dflt = dflt - "ByteLoader" ! needs to be ported
2764 $ dflt = dflt - "DB_File" ! needs to be ported
2765 $ dflt = dflt - "GDBM_File" ! needs porting/special library
2766 $ dflt = dflt - "IPC/SysV" ! needs to be ported
2767 $ dflt = dflt - "NDBM_File" ! needs porting/special library
2768 $ dflt = dflt - "ODBM_File" ! needs porting/special library
2769 $ dflt = dflt - "Sys/Syslog" ! needs porting/special library "GDBM_File macro LOG_DEBUG"
2770 $ IF .NOT. Has_socketshr .AND. .NOT. Has_Dec_C_Sockets
2772 $ dflt = dflt - "Socket" ! optional on VMS
2774 $ ! Build this one only for threads without ithreads
2775 $ IF F$TYPE(useithreads) .EQS. "" .OR. .NOT. use_threads
2777 $ dflt = dflt - "Thread"
2779 $ IF useithreads .OR. useithreads .EQS. "define" THEN dflt = dflt - "Thread"
2781 $ dflt = dflt - "Win32API/File" - "Win32CORE" - "Win32" ! need Dave Cutler's other project
2782 $ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
2784 $! Ask for their default list of extensions to build
2786 $ echo "It is time to specify which modules you want to build into"
2787 $ echo "perl. Most of these are standard and should be chosen, though"
2788 $ echo "you might, for example, want to build GDBM_File instead of"
2789 $ echo "SDBM_File if you have the GDBM library built on your machine."
2791 $ echo "Which modules do you want to build into perl?"
2794 $ extensions = F$EDIT(ans,"TRIM,COMPRESS")
2796 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2798 $ echo "Checking your ""make"" utilities..."
2799 $! If the 'build' that you use is not here add it and it's test
2800 $! switch to the _END_ of these strings (and increment max_build)
2801 $! (e.g. builders = builders + "/FOOMAKE"
2802 $! probers = probers + " -fooVersionSwitch"
2803 $! ) & please let me know about it.
2804 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2805 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2808 $ orig_dflt = f$edit(builder,"UPCASE")
2809 $ if orig_dflt .eqs. "" then orig_dflt = "MMK"
2812 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2813 $ WRITE CONFIG "dont_make_anything_yet:"
2814 $ WRITE CONFIG F$FAO("!_")
2817 $ messages = F$ENVIRONMENT("MESSAGE")
2819 $ build = F$ELEMENT(n,"/",builders)
2820 $ probe = F$ELEMENT(n,"!",probers)
2821 $ echo "Testing whether you have ''build' on your system..."
2823 $! Noted with GNU Make version 3.60 that the $status and $severity
2824 $! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2825 $! $SEVERITY == "4".
2828 $ ON CONTROL_Y THEN GOTO Reenable_messages_build
2829 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
2831 $ IF ($SEVERITY .EQ. 1) ! not adequate?
2834 $ IF (build .EQS. orig_dflt)
2836 $ default_set = "TRUE"
2839 $ ok_builders = ok_builders + " " + build
2840 $ IF (.NOT. default_set) THEN dflt = build
2844 $Reenable_messages_build:
2845 $ SET MESSAGE 'messages'
2847 $ on control_y then goto clean_up
2849 $ IF (n .LT. max_build) THEN GOTO Build_probe
2852 $ IF (ok_builders .NES. "")
2854 $ echo "Here is the list of builders you can apparently use:"
2855 $ echo "(",ok_builders," )"
2856 $ rp = "Which """"make"""" utility do you wish to use? [''dflt'] "
2858 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2859 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2868 %Config-E-VMS, ERROR:
2869 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
2870 utility of some sort and after checking my "builders" list I cannot find
2871 the symbol or command you use on your system to compile programs.
2874 $ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
2875 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2876 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2879 $ echo "I do not know where ""make"" is, and my life depends on it."
2880 $ echo "Go find a make program or fix your DCL$PATH setting!"
2881 $ echo "ABORTING..."
2882 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2884 $ EXIT 2 !$STATUS = "%X00000002" (error)
2890 $ DELETE/NOLOG/NOCONFIRM Makefile.;
2896 There seems to be trouble. I just tried to create a file in
2898 $ echo4 'F$ENVIRONMENT("DEFAULT")'
2901 but was unsuccessful. I am stopping now. Please check that directories'
2902 PROTECTION bits. I will leave you in the directory where you started
2905 $ echo4 "ABORTING..."
2911 $! echo " Very well I will proceed with ""''build'"""
2912 $ make = F$EDIT(build,"UPCASE")
2914 $!: locate the preferred pager for this system
2915 $!pagers = "most|more|less|type/page"
2916 $ IF osvers .GES. "V6.1"
2918 $ dflt = "type/page=save=10"
2920 $ dflt = "type/page"
2922 $! assume that the presence of a most symbol indicates the presence
2924 $ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most"
2925 $ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager
2926 $ rp="What pager is used on your system? [''dflt'] "
2930 $! update makefile here
2931 $! echo4 "Updating makefile..."
2933 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2935 $ makefile = "" !wrt MANIFEST dir
2936 $ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
2937 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
2938 $ Makefile_SH = "descrip_mms.template"
2940 $ makefile = " -f Makefile." !wrt MANIFEST dir
2941 $ UUmakefile = "[-]Makefile." !wrt CWD dir
2942 $ DEFmakefile = "Makefile." !wrt DEF dir (?)
2943 $ Makefile_SH = "Makefile.in"
2946 $ IF macros .NES. ""
2948 $ tmp = F$LENGTH(macros)
2949 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2950 $ macros = "/macro=(" + macros + ")"
2952 $! Build up the extra C flags
2956 $ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm"
2958 $ IF be_case_sensitive
2960 $ extra_flags = "''extra_flags'" + "/Names=As_Is"
2962 $ extra_flags = "''extra_flags'" + "''user_c_flags'"
2964 $ min_pgflquota = "100000"
2965 $ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
2966 $ IF pgflquota .LES. min_pgflquota
2968 $ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
2969 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
2972 $ echo4 "Continuing..."
2974 $ echo4 "ABORTING..."
2979 $! PerlIO abstraction
2982 $ IF F$TYPE(useperlio) .NES. ""
2984 $ if f$extract(0,1,f$edit(useperlio,"collapse,upcase")) .eqs. "N" .or. useperlio .eqs. "undef" then bool_dflt = "n"
2988 $ echo "Previous versions of ''package' used the standard IO mechanisms as"
2991 defined in <stdio.h>. Versions 5.003_02 and later of perl allow
2992 alternate IO mechanisms via the PerlIO abstraction layer, but the
2993 stdio mechanism is still available if needed. The abstraction layer
2994 can use AT&T's sfio (if you already have sfio installed) or regular stdio.
2995 Using PerlIO with sfio may cause problems with some extension modules.
2998 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
3000 $ rp = "Use the PerlIO abstraction layer? [''bool_dflt'] "
3004 $ useperlio = "define"
3006 $ echo "Ok, doing things the stdio way."
3007 $ useperlio = "undef"
3011 $ echo4 "Checking the C run-time library."
3013 $! Former SUBCONFIGURE.COM
3015 $! - build a config.sh for VMS Perl.
3016 $! - use built config.sh to take config_h.SH -> config.h
3017 $! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
3018 $! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
3019 $! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
3021 $! Note for folks from other platforms changing things in here:
3023 $! Fancy changes (based on compiler capabilities or VMS version or
3024 $! whatever) are tricky, so go ahead and punt on those.
3026 $! Simple changes, though (say, always setting something to 1, or undef,
3027 $! or something like that) are straightforward. Adding a new constant
3028 $! item for the ultimately created config.sh requires at least one
3029 $! (possibly more) line(s) to this file.
3031 $! Add a line in the format:
3033 $! $ WC "foo='undef'"
3035 $! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
3036 $! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
3037 $! is sorted ASCII and corresponds to the output of config.sh in the
3038 $! Bourne shell version of Configure).
3039 $! Be very careful with quoting, as it can be tricky.
3040 $! For example if instead of a constant string like 'undef' or 'define'
3041 $! you wanted to add something to VMS's config.sh that looks like:
3045 $! then add a line that looks like this before the
3046 $! '##END WRITE NEW CONSTANTS HERE##' tagged line:
3048 $! $ WC "blank_string='" + "'"
3050 $! (+ is the string concatenator and "''var'" has the effect
3051 $! of "${var}" in perl or sh, but "'const'" is not interpolated).
3053 $! Note that unitialized variables, such as a line like:
3055 $! $ WC "new_var='" + new_var + "'"
3057 $! should be avoided unless new_var has a value assigned prior
3058 $! to that line (think of perl's -w warnings).
3060 $! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
3064 $ vms_ver = F$EXTRACT(1,3, osvers)
3065 $ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
3066 $ MCC = f$edit(mcc, "UPCASE")
3067 $ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
3068 $ IF ccname .EQS. "DEC"
3070 $ Checkcc := "''Mcc'/prefix=all"
3072 $ IF ccname .EQS. "CXX"
3076 $ Checkcc := "''Mcc'"
3079 $ ccflags = ccflags + extra_flags
3080 $ IF be_case_sensitive
3082 $ d_vms_be_case_sensitive = "define"
3084 $ d_vms_be_case_sensitive = "undef"
3086 $! Some constant defaults.
3087 $ hwname = f$getsyi("HW_NAME")
3088 $ myname = myhostname
3089 $ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
3094 $! FIXME -- This section does not really handle all the different permutations
3095 $! of 64-bitness, and it does not provide for the /POINTER_SIZE=64 compiler
3096 $! option that would be necessary to support the "explicit 64-bit interfaces"
3097 $! promised by -Dusemorebits.
3099 $ usemorebits = "undef"
3100 $ IF use64bitint .OR. use64bitint .EQS. "define"
3102 $ use64bitint = "define"
3103 $ ivdformat="""Ld"""
3104 $ uvuformat="""Lu"""
3105 $ uvoformat="""Lo"""
3106 $ uvxformat="""Lx"""
3107 $ uvXUformat="""LX"""
3109 $ use64bitint = "undef"
3110 $ ivdformat="""ld"""
3111 $ uvuformat="""lu"""
3112 $ uvoformat="""lo"""
3113 $ uvxformat="""lx"""
3114 $ uvXUformat="""lX"""
3116 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
3118 $ uselongdouble = "define"
3120 $ nveformat="""Le"""
3121 $ nvfformat="""Lf"""
3122 $ nvgformat="""Lg"""
3124 $ uselongdouble = "undef"
3129 $ IF use64bitall .OR. use64bitall .EQS. "define"
3131 $ use64bitall = "define"
3133 $ use64bitall = "undef"
3135 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
3137 $ uselargefiles = "define"
3139 $ uselargefiles = "undef"
3142 $ usemymalloc = "undef"
3143 $ if mymalloc then usemymalloc = "define"
3147 $ IF (sharedperl .AND. archname .EQS. "VMS_AXP")
3155 $ IF (sharedperl .AND. archname .EQS. "VMS_IA64")
3170 $ dlobj="dl_vms''obj_ext'"
3172 $ cppstdin="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
3174 $ cpprun="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
3182 $ THEN d_mymalloc="define"
3183 $ ELSE d_mymalloc="undef"
3187 $ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
3188 $ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
3190 $ IF ((use_threads) .AND. (vms_ver .LES. "6.2"))
3192 $ 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"
3196 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
3203 $! perllibs should be libs with all non-core libs (such as gdbm) removed.
3209 $ IF use64bitint .OR. use64bitint .EQS. "define"
3211 $ d_PRId64 = "define"
3212 $ d_PRIu64 = "define"
3213 $ d_PRIo64 = "define"
3214 $ d_PRIx64 = "define"
3215 $ d_PRIXU64 = "define"
3216 $ sPRId64 = """Ld"""
3217 $ sPRIXU64 = """LX"""
3218 $ sPRIi64 = """Li"""
3219 $ sPRIo64 = """Lo"""
3220 $ sPRIu64 = """Lu"""
3221 $ sPRIx64 = """Lx"""
3223 $ quadtype = "long long"
3224 $ uquadtype = "unsigned long long"
3225 $ quadkind = "QUAD_IS_LONG_LONG"
3227 $ d_PRId64 = "undef"
3228 $ d_PRIXU64 = "undef"
3229 $ d_PRIu64 = "undef"
3230 $ d_PRIo64 = "undef"
3231 $ d_PRIx64 = "undef"
3233 $ sPRIXU64 = """lX"""
3240 $ uquadtype = "unsigned long"
3241 $ quadkind = "QUAD_IS_LONG"
3244 $ IF archname .NES. "VMS_VAX"
3246 $ d_frexpl = "define"
3247 $ d_modfl = "define"
3248 $ d_modflproto = "define"
3250 $ d_frexpl = "undef"
3252 $ d_modflproto = "undef"
3255 $ IF useieee .OR. useieee .EQS. "define"
3257 $ d_isnan = "define"
3258 $ d_isnanl = "define"
3261 $ d_isnanl = "undef"
3264 $! Now some that we build up
3268 $ IF use_5005_threads
3270 $ arch = "''arch'-thread"
3271 $ archname = "''archname'-thread"
3272 $ d_old_pthread_create_joinable = "undef"
3273 $ old_pthread_create_joinable = " "
3274 $ use5005threads = "define"
3275 $ useithreads = "undef"
3277 $ arch = "''arch'-ithread"
3278 $ archname = "''archname'-ithread"
3279 $ d_old_pthread_create_joinable = "undef"
3280 $ old_pthread_create_joinable = " "
3281 $ use5005threads = "undef"
3282 $ useithreads = "define"
3285 $ d_old_pthread_create_joinable = "undef"
3286 $ old_pthread_create_joinable = " "
3287 $ use5005threads = "undef"
3288 $ useithreads = "undef"
3291 $! Some that we need to invoke the compiler for
3294 $! handy construction aliases/symbols
3296 $ OS := "open/write CONFIG []try.c"
3297 $ WS := "write CONFIG"
3298 $ CS := "close CONFIG"
3299 $ DS := "delete/nolog/noconfirm []try.*;*"
3301 $ good_compile = %X10B90001
3302 $ IF ccname .EQS. "GCC"
3304 $ open/write OPTCHAN []try.opt
3305 $ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
3306 $ write OPTCHAN "Sys$Share:VAXCRTL/Share"
3309 $ good_compile = %X10000001
3311 $ IF ccname .EQS. "CXX"
3313 $ good_compile = %X15F60001
3315 $ good_link = %X10000001
3316 $ tmp = "" ! null string default
3318 $ GOTO beyond_compile_ok
3320 $! Check for type sizes
3325 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3326 $ WS "#include <stdlib.h>"
3328 $ WS "#include <stdio.h>"
3331 $ WS "printf(""%d\n"", sizeof(''tmp'));"
3338 $!: locate header file
3342 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3343 $ WS "#include <stdlib.h>"
3345 $ WS "#include <stdio.h>"
3346 $ WS "#include <''tmp'>"
3349 $ WS "printf(""define\n"");"
3356 $!: define an alternate in-header-list? function
3360 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3362 $ echo4 "<''tmp'> found."
3365 $ echo4 "<''tmp'> NOT found."
3370 $!: define an is-in-libc? function
3373 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3375 $ echo4 "''tmp'() found."
3378 $ echo4 "''tmp'() NOT found."
3383 $!: define a shorthand compile call
3387 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3389 $ OPEN/WRITE CONFIG []try.out
3390 $ DEFINE/USER_MODE SYS$ERROR CONFIG
3391 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
3394 $ OPEN/READ CONFIG []try.out
3397 $ DELETE/NOLOG/NOCONFIRM []try.out;
3398 $ DELETE/NOLOG/NOCONFIRM []try.exe;
3400 $ tmp = "" ! null string default
3406 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3407 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3411 $ 'ld' try.obj,try.opt/opt
3412 $ link_status = $status
3415 $ link_status = $status
3418 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
3421 $!: define a shorthand compile call for compilations that should be ok.
3423 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3424 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3427 $ compile_status = $status
3429 $ DELETE/NOLOG/NOCONFIRM try.c;
3434 $! Check for __STDC__
3437 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3438 $ WS "#include <stdlib.h>"
3440 $ WS "#include <stdio.h>"
3443 $ WS "#ifdef __STDC__"
3444 $ WS "printf(""42\n"");"
3446 $ WS "printf(""1\n"");"
3453 $ IF F$INTEGER(tmp) .eq. 42
3455 $ echo4 "Your C compiler and pre-processor defines the symbol:"
3459 $! Check for double size
3461 $ echo4 "Checking to see how big your double precision numbers are..."
3463 $ GOSUB type_size_check
3465 $ echo "Your double is ''doublesize' bytes long."
3467 $! Check for long double size
3470 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3471 $ WS "#pragma message disable ALL" ! VAX compilers may have distracting informationals
3472 $ WS "#include <stdlib.h>"
3474 $ WS "#include <stdio.h>"
3477 $ WS "printf(""%d\n"", sizeof(long double));"
3481 $ echo4 "Checking to see if you have long double..."
3483 $ IF link_status .NE. good_link
3487 $ echo "You do not have long double."
3489 $ echo "You have long double."
3490 $ echo4 "Checking to see how big your long doubles are..."
3493 $ d_longdbl = "define"
3494 $ echo "Your long doubles are ''longdblsize' bytes long."
3497 $ IF d_longdbl .OR. d_longdbl .EQS. "define"
3499 $ d_PRIEUldbl = "define"
3500 $ d_PRIFUldbl = "define"
3501 $ d_PRIGUldbl = "define"
3502 $ d_PRIeldbl = "define"
3503 $ d_PRIfldbl = "define"
3504 $ d_PRIgldbl = "define"
3505 $ sPRIEUldbl = """LE"""
3506 $ sPRIFUldbl = """LF"""
3507 $ sPRIGUldbl = """LG"""
3508 $ sPRIeldbl = """Le"""
3509 $ sPRIfldbl = """Lf"""
3510 $ sPRIgldbl = """Lg"""
3512 $ d_PRIEUldbl = "undef"
3513 $ d_PRIFUldbl = "undef"
3514 $ d_PRIGUldbl = "undef"
3515 $ d_PRIeldbl = "undef"
3516 $ d_PRIfldbl = "undef"
3517 $ d_PRIgldbl = "undef"
3525 $ d_SCNfldbl = d_PRIfldbl
3526 $ sSCNfldbl = sPRIfldbl ! expect consistency
3528 $!: check for long long
3530 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3531 $ WS "#include <stdlib.h>"
3533 $ WS "#include <stdio.h>"
3536 $ WS "printf(""%d\n"", sizeof(long long));"
3540 $ echo4 "Checking to see if you have long long..."
3542 $ IF link_status .NE. good_link
3545 $ d_longlong="undef"
3546 $ echo "You do not have long long."
3548 $ echo "You have long long."
3549 $ echo4 "Checking to see how big your long longs are..."
3551 $ longlongsize = tmp
3552 $ d_longlong = "define"
3553 $ echo "Your long longs are ''longlongsize' bytes long."
3556 $! Check the prototype for getgid
3558 $ echo "Looking for the type for group ids returned by getgid()."
3560 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3561 $ WS "#include <stdlib.h>"
3563 $ WS "#include <stdio.h>"
3564 $ WS "#include <types.h>"
3572 $ IF compile_status .NE. good_compile
3574 $! Okay, gid_t failed. Must be unsigned int
3575 $ gidtype = "unsigned int"
3576 $ echo4 "assuming ""''gidtype'""."
3579 $ echo4 "gid_t found."
3582 $! Check to see if we've got dev_t
3584 $ echo "Looking for the type for dev."
3586 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3587 $ WS "#include <stdlib.h>"
3589 $ WS "#include <stdio.h>"
3590 $ WS "#include <types.h>"
3598 $ IF compile_status .NE. good_compile
3600 $! Okay, dev_t failed. Must be unsigned int
3601 $ devtype = "unsigned int"
3602 $ echo4 "assuming ""''devtype'""."
3605 $ echo4 "dev_t found."
3608 $! Check to see if we've got unistd.h (which we ought to, but you never know)
3615 $! Check to see if we've got utime.h (which we should use if we have)
3622 $! do we have getppid()?
3624 $ IF i_unistd .EQS. "define"
3627 $ WS "#include <stdio.h>"
3628 $ WS "#include <unistd.h>"
3630 $ WS "printf(""%d\n"",getppid());"
3638 $ d_getppid = "undef"
3641 $!: see if this is a libutil.h system
3647 $! Check to see if we've got shadow.h (probably not, but...)
3653 $! Check to see if we've got socks.h (probably not, but...)
3659 $! Check the prototype for select
3661 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3664 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3665 $ WS "#include <stdlib.h>"
3667 $ WS "#include <stdio.h>"
3668 $ WS "#include <types.h>"
3669 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3672 $ WS "#include <socketshr.h>"
3674 $ WS "#include <time.h>"
3675 $ WS "#include <socket.h>"
3682 $ WS "bar = select(2, foo, foo, foo, NULL);"
3687 $ IF compile_status .NE. good_compile
3689 $! Okay, select failed. Must be an int *
3690 $ selecttype = "int *"
3691 $ echo4 "select() NOT found."
3693 $ selecttype="fd_set *"
3694 $ echo4 "select() found."
3697 $ ! No sockets, so stick in an int * : no select, so pick a harmless default
3698 $ selecttype = "int *"
3701 $! Check to see if fd_set exists
3703 $ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3705 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3706 $ WS "#include <stdlib.h>"
3708 $ WS "#include <stdio.h>"
3709 $ WS "#include <types.h>"
3712 $ WS "#include <socketshr.h>"
3714 $ IF Has_Dec_C_Sockets
3716 $ WS "#include <time.h>"
3717 $ WS "#include <socket.h>"
3727 $ IF compile_status .ne. good_compile
3729 $! Okay, fd_set failed. Must not exist
3730 $ d_fd_set = "undef"
3731 $ echo4 "Hmm, your compiler has some difficulty with fd_set."
3734 $ echo4 "Well, your system knows about the normal fd_set typedef..."
3737 $! Check for inttypes.h
3739 $ tmp = "inttypes.h"
3743 $! Check to see if off64_t exists
3745 $ echo4 "Checking to see if you have off64_t..."
3747 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3748 $ WS "#include <stdlib.h>"
3750 $ WS "#include <stdio.h>"
3751 $ WS "#include <types.h>"
3752 $ WS "#''i_inttypes' IIH"
3754 $ WS "#include <inttypes.h>"
3763 $ IF compile_status .EQ. good_compile
3765 $ d_off64_t="define"
3766 $ echo "You have off64_t."
3768 $ d_off64_t = "undef"
3769 $ echo "You do not have off64_t."
3772 $! Check to see if fpos64_t exists
3774 $ echo4 "Checking to see if you have fpos64_t..."
3776 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3777 $ WS "#include <stdlib.h>"
3779 $ WS "#include <stdio.h>"
3780 $ WS "#include <types.h>"
3781 $ WS "#''i_inttypes' IIH"
3783 $ WS "#include <inttypes.h>"
3787 $ WS "fpos64_t bar;"
3792 $ IF compile_status .EQ. good_compile
3794 $ d_fpos64_t="define"
3795 $ echo "You have fpos64_t."
3797 $ d_fpos64_t = "undef"
3798 $ echo "You do not have fpos64_t."
3801 $! Check to see if int64_t exists
3803 $ echo4 "Checking to see if you have int64_t..."
3805 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3806 $ WS "#include <stdlib.h>"
3808 $ WS "#include <stdio.h>"
3809 $ WS "#include <types.h>"
3810 $ WS "#''i_inttypes' IIH"
3812 $ WS "#include <inttypes.h>"
3821 $ IF compile_status .EQ. good_compile
3823 $ d_int64_t="define"
3824 $ echo "You have int64_t."
3826 $ d_int64_t = "undef"
3827 $ echo "You do not have int64_t."
3830 $! Check to see if fseeko exists
3833 $ WS "#include <stdio.h>"
3836 $ WS "FILE *f=NULL;"
3837 $ WS "fseeko(f,(off_t)0,SEEK_SET);"
3845 $! Check to see if ftello exists
3848 $ WS "#include <stdio.h>"
3851 $ WS "FILE *f=NULL; off_t o=0;"
3860 $!: see if this is a netdb.h system
3861 $ IF Has_Dec_C_Sockets
3868 $! Check for h_errno
3870 $ echo4 "Checking to see if you have h_errno..."
3872 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3873 $ WS "#include <stdlib.h>"
3875 $ WS "#include <stdio.h>"
3876 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3877 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
3885 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3888 $ echo "You have h_errno."
3891 $ echo "You do not have h_errno."
3894 $! Check to see if gethostname exists
3896 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3899 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3900 $ WS "#include <stdlib.h>"
3902 $ WS "#include <stdio.h>"
3903 $ WS "#include <types.h>"
3906 $ WS "#include <socketshr.h>"
3908 $ WS "#include <time.h>"
3909 $ WS "#include <socket.h>"
3913 $ WS "char name[100];"
3914 $ WS "int bar, baz;"
3916 $ WS "baz = gethostname(name, bar);"
3921 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3923 $ d_gethname="define"
3924 $ echo4 "gethostname() found."
3926 $ d_gethname="undef"
3929 $ ! No sockets, so no gethname
3930 $ d_gethname = "undef"
3933 $! Check for sys/file.h
3935 $ tmp = "sys/file.h"
3940 $! Check for sys/ioctl.h
3942 $ tmp = "sys/ioctl.h"
3946 $! Check for sys/utsname.h
3948 $ tmp = "sys/utsname.h"
3950 $ i_sysutsname = tmp
3952 $! Check for syslog.h
3964 $! Check for sys/uio.h
3970 $! Check for sys/mode.h
3972 $ tmp = "sys/mode.h"
3976 $! Check for sys/access.h
3978 $ tmp = "sys/access.h"
3982 $! Check for sys/security.h
3984 $ tmp = "sys/security.h"
3988 $! Check for fcntl.h
3997 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3998 $ WS "#include <stdlib.h>"
4000 $ WS "#include <stdio.h>"
4001 $ WS "#include <fcntl.h>"
4004 $ WS "fcntl(1,2,3);"
4012 $! Check for fcntl locking capability
4014 $ echo4 "Checking if fcntl-based file locking works... "
4016 $ IF d_fcntl .EQS. "define"
4019 $ WS "#include <stdio.h>"
4020 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4021 $ WS "#include <stdlib.h>"
4023 $ WS "#include <fcntl.h>"
4024 $ WS "#include <unistd.h>"
4026 $ WS "#if defined(F_SETLK) && defined(F_SETLKW)"
4027 $ WS " struct flock flock;"
4028 $ WS " int retval, fd;"
4029 $ WS " fd = open(""try.c"", O_RDONLY);"
4030 $ WS " flock.l_type = F_RDLCK;"
4031 $ WS " flock.l_whence = SEEK_SET;"
4032 $ WS " flock.l_start = flock.l_len = 0;"
4033 $ WS " retval = fcntl(fd, F_SETLK, &flock);"
4035 $ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));"
4037 $ WS " printf(""undef\n"");"
4042 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4045 $ IF tmp .EQS. "define"
4047 $ echo4 "Yes, it seems to work."
4049 $ echo4 "Nope, it didn't work."
4052 $ echo4 "I'm unable to compile the test program, so I'll assume not."
4056 $ echo4 "Nope, since you don't even have fcntl()."
4058 $ d_fcntl_can_lock = tmp
4063 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4064 $ WS "#include <stdlib.h>"
4066 $ WS "#include <string.h>"
4069 $ WS "char * place;"
4070 $ WS "place = memchr(""foo"", 47, 3);"
4078 $! Check for strtoull
4081 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4082 $ WS "#include <stdlib.h>"
4084 $ WS "#include <string.h>"
4087 $ WS "unsigned __int64 result;"
4088 $ WS "result = strtoull(""123123"", NULL, 10);"
4096 $! Check for strtouq
4099 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4100 $ WS "#include <stdlib.h>"
4102 $ WS "#include <string.h>"
4105 $ WS "unsigned __int64 result;"
4106 $ WS "result = strtouq(""123123"", NULL, 10);"
4114 $! Check for strtoll
4117 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4118 $ WS "#include <stdlib.h>"
4120 $ WS "#include <string.h>"
4123 $ WS "__int64 result;"
4124 $ WS "result = strtoll(""123123"", NULL, 10);"
4135 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4136 $ WS "#include <stdlib.h>"
4138 $ WS "#include <string.h>"
4141 $ WS "__int64 result;"
4142 $ WS "result = strtoq(""123123"", NULL, 10);"
4150 $! Check for strtold
4153 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4154 $ WS "#include <stdlib.h>"
4156 $ WS "#include <string.h>"
4159 $ WS "long double result;"
4160 $ WS "result = strtold(""123123"", NULL, 10);"
4171 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4172 $ WS "#include <stdlib.h>"
4174 $ WS "#include <string.h>"
4177 $ WS " __int64 result;"
4178 $ WS "result = atoll(""123123"");"
4189 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4190 $ WS "#include <stdlib.h>"
4192 $ WS "#include <string.h>"
4196 $ WS "result = atolf(""123123"");"
4207 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4208 $ WS "#include <stdlib.h>"
4210 $ WS "#include <stdio.h>"
4213 $ WS "access(""foo"", F_OK);"
4224 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4225 $ WS "#include <stdlib.h>"
4227 $ WS "#include <stdio.h>"
4228 $ WS "#include <strings.h>"
4231 $ WS "char foo[10];"
4232 $ WS "bzero(foo, 10);"
4243 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4244 $ WS "#include <stdlib.h>"
4246 $ WS "#include <stdio.h>"
4247 $ WS "#include <strings.h>"
4250 $ WS "char foo[10], bar[10];"
4251 $ WS "bcopy(""foo"", bar, 3);"
4259 $! Check for mkstemp
4262 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4263 $ WS "#include <stdlib.h>"
4265 $ WS "#include <stdio.h>"
4268 $ WS "mkstemp(""foo"");"
4276 $! Check for mkstemps
4279 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4280 $ WS "#include <stdlib.h>"
4282 $ WS "#include <stdio.h>"
4285 $ WS "mkstemps(""foo"", 1);"
4293 $! Check for mkdtemp
4296 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4297 $ WS "#include <stdlib.h>"
4299 $ WS "#include <stdio.h>"
4302 $ WS "mkdtemp(""foo"");"
4312 $ if i_poll .eqs. "define"
4315 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4316 $ WS "#include <stdlib.h>"
4318 $ WS "#include <poll.h>"
4321 $ WS "struct pollfd pfd;"
4322 $ WS "int count=poll(&pfd,1,0);"
4333 $! Check for setvbuf
4336 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4337 $ WS "#include <stdlib.h>"
4339 $ WS "#include <stdio.h>"
4343 $ WS "char Buffer[99];"
4344 $ WS "foo = fopen(""foo"", ""r"");"
4345 $ WS "setvbuf(foo, Buffer, 0, 0);"
4353 $! see if sfio.h is available
4354 $! see if sfio library is available
4355 $! Ok, but do we want to use it.
4356 $! IF F$TYPE(usesfio) .EQS. "" THEN usesfio = "undef"
4357 $! IF val .EQS. "define"
4359 $! IF usesfio .EQS. "define"
4363 $! echo "''package' can use the sfio library, but it is experimental."
4364 $! IF useperlio .EQS. "undef"
4366 $! echo "For sfio also the PerlIO abstraction layer is needed."
4367 $! echo "Earlier you said you would not want that."
4369 $! rp="You seem to have sfio available, do you want to try using it? [''dflt'] "
4371 $! IF ans .EQS. "" THEN ans = dflt
4374 $! echo "Ok, turning on both sfio and PerlIO, then."
4375 $! useperlio="define"
4378 $! echo "Ok, avoiding sfio this time. I'll use stdio instead."
4382 $! IF usesfio .EQS. "define"
4384 $! echo4 "Sorry, cannot find sfio on this machine."
4385 $! echo4 "Ignoring your setting of usesfio=''usesfio'."
4393 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4394 $ WS "#include <stdlib.h>"
4396 $ WS "#include <stdio.h>"
4399 $ WS "setenv(""FOO"", ""BAR"", 0);"
4407 $! Check for setproctitle
4410 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4411 $ WS "#include <stdlib.h>"
4413 $ WS "#include <stdio.h>"
4416 $ WS "setproctitle(""%s"", ""FOO"");"
4420 $ tmp = "setproctitle"
4422 $ d_setproctitle = tmp
4424 $! Check for <netinet/in.h>
4426 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4428 $ tmp = "netinet/in.h"
4435 $! Check for <netinet/tcp.h>
4437 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4439 $ tmp = "netinet/tcp.h"
4441 $ i_netinettcp = tmp
4443 $ i_netinettcp="undef"
4446 $! Check for endhostent
4448 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4451 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4452 $ WS "#include <stdlib.h>"
4454 $ WS "#include <stdio.h>"
4456 $ THEN WS "#include <socketshr.h>"
4457 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4461 $ WS "endhostent();"
4465 $ tmp = "endhostent"
4472 $! Check for endnetent
4474 $ IF Has_Dec_C_Sockets .or. Has_Socketshr
4477 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4478 $ WS "#include <stdlib.h>"
4480 $ WS "#include <stdio.h>"
4482 $ THEN WS "#include <socketshr.h>"
4483 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4498 $! Check for endprotoent
4500 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4503 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4504 $ WS "#include <stdlib.h>"
4506 $ WS "#include <stdio.h>"
4508 $ THEN WS "#include <socketshr.h>"
4509 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4513 $ WS "endprotoent();"
4517 $ tmp = "endprotoent"
4524 $! Check for endservent
4526 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4529 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4530 $ WS "#include <stdlib.h>"
4532 $ WS "#include <stdio.h>"
4534 $ THEN WS "#include <socketshr.h>"
4535 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4539 $ WS "endservent();"
4543 $ tmp = "endservent"
4550 $! Check for sethostent
4552 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4555 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4556 $ WS "#include <stdlib.h>"
4558 $ WS "#include <stdio.h>"
4560 $ THEN WS "#include <socketshr.h>"
4561 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4565 $ WS "sethostent(1);"
4569 $ tmp = "sethostent"
4576 $! Check for setnetent
4578 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4581 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4582 $ WS "#include <stdlib.h>"
4584 $ WS "#include <stdio.h>"
4586 $ THEN WS "#include <socketshr.h>"
4587 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4591 $ WS "setnetent(1);"
4602 $! Check for setprotoent
4604 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4607 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4608 $ WS "#include <stdlib.h>"
4610 $ WS "#include <stdio.h>"
4612 $ THEN WS "#include <socketshr.h>"
4613 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4617 $ WS "setprotoent(1);"
4621 $ tmp = "setprotoent"
4628 $! Check for setservent
4630 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4633 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4634 $ WS "#include <stdlib.h>"
4636 $ WS "#include <stdio.h>"
4638 $ THEN WS "#include <socketshr.h>"
4639 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4643 $ WS "setservent(1);"
4647 $ tmp = "setservent"
4654 $! Check for gethostent
4656 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4659 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4660 $ WS "#include <stdlib.h>"
4662 $ WS "#include <stdio.h>"
4664 $ THEN WS "#include <socketshr.h>"
4665 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4669 $ WS "gethostent();"
4673 $ tmp = "gethostent"
4680 $! Check for getnetent
4682 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4685 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4686 $ WS "#include <stdlib.h>"
4688 $ WS "#include <stdio.h>"
4690 $ THEN WS "#include <socketshr.h>"
4691 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4706 $! Check for getprotoent
4708 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4711 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4712 $ WS "#include <stdlib.h>"
4714 $ WS "#include <stdio.h>"
4716 $ THEN WS "#include <socketshr.h>"
4717 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4721 $ WS "getprotoent();"
4725 $ tmp = "getprotoent"
4732 $! Check for getservent
4734 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4737 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4738 $ WS "#include <stdlib.h>"
4740 $ WS "#include <stdio.h>"
4742 $ THEN WS "#include <socketshr.h>"
4743 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4747 $ WS "getservent();"
4751 $ tmp = "getservent"
4758 $! Check for nanosleep
4761 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4762 $ WS "#include <stdlib.h>"
4764 $ WS "#include <time.h>"
4767 $ WS "int asleep = nanosleep(NULL,NULL);"
4775 $! Check for socklen_t
4777 $ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4779 $ echo4 "Checking to see if you have socklen_t..."
4781 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4782 $ WS "#include <stdlib.h>"
4784 $ WS "#include <stdio.h>"
4786 $ THEN WS "#include <socketshr.h>"
4787 $ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4791 $ WS "socklen_t x = 16;"
4796 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4798 $ d_socklen_t="define"
4799 $ echo "You have socklen_t."
4801 $ d_socklen_t="undef"
4802 $ echo "You do not have socklen_t."
4805 $ d_socklen_t="undef"
4808 $! Check for pthread_yield
4813 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4814 $ WS "#include <stdlib.h>"
4816 $ WS "#include <pthread.h>"
4817 $ WS "#include <stdio.h>"
4820 $ WS "pthread_yield();"
4824 $ tmp = "pthread_yield"
4826 $ d_pthread_yield = tmp
4828 $ d_pthread_yield="undef"
4831 $! Check for sched_yield
4836 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4837 $ WS "#include <stdlib.h>"
4839 $ WS "#include <pthread.h>"
4840 $ WS "#include <stdio.h>"
4843 $ WS "sched_yield();"
4847 $ tmp = "sched_yield"
4849 $ d_sched_yield = tmp
4850 $ IF d_sched_yield .EQS. "define"
4851 $ THEN sched_yield = "sched_yield"
4852 $ ELSE sched_yield = " "
4855 $ d_sched_yield="undef"
4859 $! Check for pthread_attr_setscope and PTHREAD_SCOPE_SYSTEM.
4860 $! (The actual test is to be written.)
4862 $ d_pthread_attr_setscope="undef"
4864 $! Check for generic pointer size
4866 $ echo4 "Checking to see how big your pointers are..."
4868 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4869 $ WS "#include <stdlib.h>"
4871 $ WS "#include <stdio.h>"
4875 $ WS "foo = sizeof(char *);"
4876 $ WS "printf(""%d\n"", foo);"
4881 $ GOSUB type_size_check
4883 $ echo "Your pointers are ''ptrsize' bytes long."
4885 $! Check for size_t size
4889 $ echo4 "Checking the size of ''zzz'..."
4890 $ GOSUB type_size_check
4892 $ echo "Your ''zzz' size is ''sizesize' bytes."
4894 $! Check for _LARGEFILE capability.
4898 $ WS "#define _LARGEFILE"
4899 $ WS "#include <stdio.h>"
4902 $ WS "printf(""%d\n"", sizeof(off_t));"
4907 $ IF link_status .EQ. good_link
4912 $ echo "Your off_t size is ''off_t_size' bytes when _LARGEFILE is defined."
4913 $ IF off_t_size .ne. 8 .AND. (uselargefiles .OR. uselargefiles .eqs. "define")
4915 $ echo4 "You configured with -Duselargefiles but your CRTL does not support _LARGEFILE."
4916 $ echo4 "I'm disabling large file support."
4917 $ uselargefiles = "undef"
4920 $! Tests for hard link, symbolic links, and 7.3 + CRTL features
4922 $ d_lchown = "undef"
4925 $ d_readlink = "undef"
4926 $ d_symlink = "undef"
4927 $ d_realpath = "undef"
4929 $! Hard link support has been present since 7.3-1 except for the
4930 $! easy to use DCL test to see if hardlinks are enabled on the build
4931 $! disk. That would require more work to test, and I am only testing
4932 $! this on 8.2, so that is why the 8.2 test.
4934 $ IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
4936 $ IF f$getdvi("SYS$DISK","HARDLINKS_SUPPORTED")
4938 $ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links enabled on build disk."
4939 $ echo "I will build with hard link support"
4942 $ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links disabled on build disk."
4943 $ echo "I will not build with hard link support."
4946 $ echo4 "I can not detect if your CRTL and build disk support hard links."
4947 $ echo4 "I am disabling hard link support."
4950 $ IF uselargefiles .OR. uselargefiles .eqs. "define"
4952 $ echo4 "Largefile support enabled (plus standard stat support on V8.2 and later)"
4954 $ IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
4957 "Looking for the realpath() function to indicate symbolic link support..."
4959 $! WS "#include <stdlib.h>"
4960 $ WS "void exit(int foo);"
4961 $ WS "char *realpath(const char *file_name, char * resolved_name, ...);"
4964 $ WS "char result[255];"
4965 $ WS "realpath(""foo"",result);"
4970 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4973 "Found realpath() which indicates symbolic link support is present."
4974 $ d_lchown = "define"
4975 $ d_lstat = "define"
4976 $ d_readlink = "define"
4977 $ d_symlink = "define"
4978 $! d_realpath = "define" ! Perl will not put it in the config.h file?
4979 $! Perl apparently does not use a built in realpath() on other platforms,
4980 $! but there is a severe performance penatly on OpenVMS to use the Perl
4981 $! script that implements a realpath(). The d_symlink symbol is used
4982 $! as a replacement for the d_realpath since they are related and both
4983 $! were activated by the CRTL at the same time.
4986 $ echo4 "Your system does not support symbolic links."
4987 $ echo4 "I am disabling symbolic link support."
4990 $ echo4 "Your system does not support symbolic links."
4991 $ echo4 "I am disabling symbolic link support."
4994 $ IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
4996 $ echo4 "-Duselargefiles is required for symbolic link support."
4997 $ echo4 "You did not specify that, so I am disabling symbolic link support."
5002 $! Check for grp.h -- should be 7.3 and later, but test to be sure
5008 $! VMS V7.3-2 powered options
5009 $! We know that it is only available for V7.3-2 and later on 64 bit platforms.
5011 $ d_getgrgid_r = "undef"
5012 $ getgrgid_r_proto = "0"
5013 $ d_getgrnam_r = "undef"
5014 $ getgrnam_r_proto = "0"
5015 $ d_getpgid = "undef"
5016 $ d_getpgrp = "undef"
5017 $! N.B. We already have home-grown thread-safe versions of
5018 $! getpwnam and getpwuid -- no need to use CRTL versions
5019 $ d_getpwnam_r = "undef"
5020 $ getpwnam_r_proto = "0"
5021 $ d_getpwuid_r = "undef"
5022 $ getpwuid_r_proto = "0"
5023 $ d_setgrent = "undef"
5024 $ d_ttyname_r = "undef"
5025 $ ttyname_r_proto = "0"
5026 $ d_snprintf = "undef"
5027 $ d_vsnprintf = "undef"
5028 $ if (vms_ver .GES. "7.3-2") .AND. (archname .NES. "VMS_VAX")
5030 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 routines"
5031 $ d_getgrgid_r = "define"
5032 $ getgrgid_r_proto = "1"
5033 $ d_getgrnam_r = "define"
5034 $ getgrnam_r_proto = "1"
5035 $ if d_symlink .or. d_symlink .EQS. "define"
5037 $! FIXME: Need to find how to activate this.
5038 $! d_getpgid = "define"
5039 $! d_getpgrp = "define"
5041 $ d_setgrent = "define"
5042 $ d_ttyname_r = "define"
5043 $ ttyname_r_proto = "1"
5044 $ d_snprintf = "define"
5045 $ d_vsnprintf = "define"
5048 $! VMS V7.3-2 powered options
5049 $! We know that it is only available for V7.3-2 and later on 64 bit platforms.
5050 $! Only implementing right now on 8.2 because that is what I am testing
5051 $! These functions may require POSIX UIDs/GIDs to be active, so I am
5052 $! not activating the features at this time, just preparing this file
5053 $! to easily use them in the future.
5055 $ d_seteuid = "undef"
5056 $ d_setpgid = "undef"
5057 $ d_setpgrp = "undef"
5058 $ d_setregid = "undef"
5059 $ d_setreuid = "undef"
5060 $ d_setsid = "undef"
5061 $ ! Disable this section for now.
5062 $!$ if (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
5065 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 UID setting routines"
5066 $ d_seteuid = "define"
5067 $ d_setpgid = "define"
5068 $ d_setpgrp = "define"
5069 $ d_setregid = "define"
5070 $ d_setreuid = "define"
5071 $ d_setsid = "define"
5074 $! VMS V8 powered options
5075 $! We know that it is only available for 8.2 and later on 64 bit platforms.
5077 $ d_fstatvfs = "undef"
5078 $! d_statvfs = "undef"
5079 $ i_sysstatvfs = "undef"
5080 $ if (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
5082 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with 8.2 routines"
5083 $ d_fstatvfs = "define"
5084 $! d_statvfs = "define"
5085 $ i_sysstatvfs = "define"
5088 $! Check rand48 and its ilk
5090 $ echo4 "Looking for a random number function..."
5092 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5093 $ WS "#include <stdlib.h>"
5095 $ WS "#include <stdio.h>"
5098 $ WS "srand48(12L);"
5103 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
5105 $ drand01 = "drand48()"
5107 $ randfunc = "drand48"
5108 $ randseedtype = "long int"
5109 $ seedfunc = "srand48"
5110 $ echo4 "Good, found drand48()."
5111 $ d_drand48proto = "define"
5113 $ d_drand48proto = "undef"
5114 $ drand01="random()"
5116 $ randfunc = "random"
5117 $ randseedtype = "unsigned"
5118 $ seedfunc = "srandom"
5120 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5121 $ WS "#include <stdlib.h>"
5123 $ WS "#include <stdio.h>"
5131 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
5133 $ echo4 "OK, found random()."
5135 $ drand01="(((float)rand())*MY_INV_RAND_MAX)"
5137 $ randseedtype = "unsigned"
5138 $ seedfunc = "srand"
5139 $ echo4 "Yick, looks like I have to use rand()."
5142 $! Done with compiler checks. Clean up.
5143 $ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
5144 $ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
5145 $ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
5146 $ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
5147 $ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
5148 $ IF ccname .EQS. "CXX"
5150 $ CALL Cxx_demangler_cleanup
5153 $! Some that are compiler or VMS version sensitive
5156 $ IF ccname .EQS. "GCC"
5158 $ d_attribut="define"
5162 $ d_attribut="undef"
5165 $! Dec C >= 5.2 and VMS ver >= 7.0
5166 $ IF (ccname .EQS. "DEC") .AND. -
5167 (F$INTEGER(Dec_C_Version).GE.50200000) .AND. (vms_ver .GES. "7.0")
5170 $ d_getitimer="define"
5171 $ d_gettimeod="define"
5173 $ d_mprotect="define"
5178 $! d_unsetenv="define" ! Fix me - Activating requires changing VMS code
5179 $ d_unsetenv="undef" ! Change will be needed to allow GNV integration
5180 $ d_clearenv="undef"
5182 $ d_setitimer="define"
5183 $ d_sigaction="define"
5184 $ d_sigprocmask="define"
5185 $ d_truncate="define"
5189 $ sig_name1="ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE"
5190 $ sig_name2=" ALRM TERM USR1 USR2 NUM18 NUM19 CHLD CONT STOP TSTP TTIN TTOU DEBUG"
5191 $ IF (vms_ver .GES. "7.3")
5193 $ sig_name2 = sig_name2 + " NUM27 WINCH"
5195 $!* signal.h defines SIGRTMIN as 33 and SIGRTMAX as 64, but there is no
5196 $!* sigqueue function or other apparent means to do realtime signalling,
5197 $!* so let's not try to include the realtime range for now.
5198 $!* sig_name3=" NUM29 NUM30 NUM31 NUM32 RTMIN NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43"
5199 $!* sig_name4=" NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58"
5200 $!* sig_name5=" NUM59 NUM60 NUM61 NUMT62 NUM63 RTMAX"
5201 $ sig_name = sig_name1 + sig_name2
5204 $ sig_name_init = ""
5207 $ PARSE_SIG_NAME_LOOP:
5209 $ tmp = F$ELEMENT(sig_index, " ", sig_name)
5210 $ IF F$LENGTH(F$EDIT(tmp,"TRIM")) .eq. 0 THEN GOTO END_SIG_NAME_LOOP
5211 $ sig_name_init = sig_name_init + """''tmp'"","
5212 $ sig_num = sig_num + "''sig_index' "
5213 $ sig_num_init = sig_num_init + "''sig_index',"
5214 $ sig_index = sig_index + 1
5215 $ GOTO PARSE_SIG_NAME_LOOP
5217 $ END_SIG_NAME_LOOP:
5219 $ sig_name_init = sig_name_init + "0"
5220 $ sig_num_init = sig_num_init + "0"
5221 $ sig_size = "''sig_index'"
5222 $ sig_index = sig_index - 1
5223 $ sig_count = "''sig_index'"
5225 $ d_pathconf="define"
5226 $ d_fpathconf="define"
5227 $ d_sysconf="define"
5228 $ d_sigsetjmp="define"
5230 $ pidtype="unsigned int"
5232 $ d_getitimer="undef"
5233 $ d_gettimeod="undef"
5235 $ d_mprotect="undef"
5240 $ d_unsetenv="undef"
5241 $ d_clearenv="undef"
5243 $ d_setitimer="undef"
5244 $ d_sigaction="undef"
5245 $ d_sigprocmask="undef"
5246 $ d_truncate="undef"
5249 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"
5250 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
5251 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
5252 $ sig_name_init = psnwc1 + psnwc2
5253 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"
5254 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
5257 $ if (vms_ver .GES. "6.2") then sig_count="17"
5258 $ uidtype="unsigned int"
5259 $ d_pathconf="undef"
5260 $ d_fpathconf="undef"
5262 $ d_sigsetjmp="undef"
5264 $!: see if tzname[] exists
5266 $ WS "#include <stdio.h>"
5267 $ WS "#include <time.h>"
5268 $ WS "int main() { extern short tzname[]; printf(""%hd"", tzname[0]); }"
5271 $ IF compile_status .EQ. good_compile
5273 $ d_tzname = "undef"
5274 $ echo4 "tzname[] NOT found."
5276 $ d_tzname = "define"
5277 $ echo4 "tzname[] found."
5279 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
5281 $ IF d_gethname .EQS. "undef" .AND. d_uname .EQS. "undef"
5283 $ d_phostname="define"
5285 $ d_phostname="undef"
5289 $ IF ccname .EQS. "DEC"
5291 $ d_mbstowcs="define"
5293 $ d_stdiobase="define"
5294 $ d_stdio_cnt_lval="define"
5295 $ d_stdio_ptr_lval="define"
5296 $ d_stdstdio="define"
5297 $ d_faststdio="define"
5298 $ d_wcstombs="define"
5301 $ d_strcoll="define"
5302 $ d_strxfrm="define"
5305 $ i_langinfo="define"
5306 $ d_locconv="define"
5307 $ IF vms_ver .GES. "6.2"
5309 $ d_nl_langinfo="define"
5311 $ d_nl_langinfo="undef"
5313 $ d_setlocale="define"
5314 $ vms_cc_type="decc"
5316 $ d_mbstowcs="undef"
5318 $ d_stdiobase="undef"
5319 $ d_stdio_cnt_lval="undef"
5320 $ d_stdio_ptr_lval="undef"
5321 $ d_stdstdio="undef"
5322 $ d_faststdio="undef"
5323 $ d_wcstombs="undef"
5330 $ i_langinfo="undef"
5332 $ d_nl_langinfo="undef"
5333 $ d_setlocale="undef"
5335 $ d_stdio_ptr_lval_sets_cnt="undef"
5336 $ d_stdio_ptr_lval_nochange_cnt="define"
5337 $ usefaststdio="undef"
5340 $ if Has_Socketshr .OR. Has_Dec_C_Sockets
5342 $ d_vms_do_sockets="define"
5345 $ d_sockpair = "undef"
5346 $ if (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
5348 $ echo "Found 64 bit OpenVMS 8.2, will build with socketpair support"
5349 $ d_sockpair = "define"
5352 $ netdb_hlen_type="int"
5353 $ netdb_host_type="char *"
5354 $ netdb_name_type="char *"
5355 $ netdb_net_type="long"
5356 $ d_gethbyaddr="define"
5357 $ d_gethbyname="define"
5358 $ d_getnbyaddr="define"
5359 $ d_getnbyname="define"
5360 $ d_getpbynumber="define"
5361 $ d_getpbyname="define"
5362 $ d_getsbyport="define"
5363 $ d_getsbyname="define"
5364 $ d_gethostprotos="define"
5365 $ d_getnetprotos="define"
5366 $ d_getprotoprotos="define"
5367 $ d_getservprotos="define"
5368 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
5370 $ socksizetype="unsigned int"
5372 $ socksizetype="int *"
5375 $ d_vms_do_sockets="undef"
5378 $ d_socketpair = "undef"
5380 $ netdb_hlen_type="int"
5381 $ netdb_host_type="char *"
5382 $ netdb_name_type="char *"
5383 $ netdb_net_type="long"
5384 $ d_gethbyaddr="undef"
5385 $ d_gethbyname="undef"
5386 $ d_getnbyaddr="undef"
5387 $ d_getnbyname="undef"
5388 $ d_getpbynumber="undef"
5389 $ d_getpbyname="undef"
5390 $ d_getsbyport="undef"
5391 $ d_getsbyname="undef"
5392 $ d_gethostprotos="undef"
5393 $ d_getnetprotos="undef"
5394 $ d_getprotoprotos="undef"
5395 $ d_getservprotos="undef"
5396 $ socksizetype="undef"
5401 $ usethreads="define"
5402 $ d_pthreads_created_joinable="define"
5403 $ if (vms_ver .GES. "7.0")
5405 $ d_oldpthreads="undef"
5407 $ d_oldpthreads="define"
5410 $ d_oldpthreads="undef"
5411 $ usethreads="undef"
5412 $ d_pthreads_created_joinable="undef"
5415 $! new (5.005_62++) typedefs for primitives
5417 $ echo "Choosing the C types to be used for Perl's internal types..."
5419 $ uvtype="unsigned long"
5421 $ u8type="unsigned char"
5423 $ u16type="unsigned short"
5425 $ u32type="unsigned int"
5426 $ i64type="long long"
5427 $ u64type="unsigned long long"
5430 $ IF use64bitint .OR. use64bitint .EQS. "define"
5432 $ ivtype = "''i64type'"
5433 $ uvtype = "''u64type'"
5439 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
5441 $ nvtype="long double"
5445 $ GOSUB type_size_check
5447 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp
5448 $ IF ivtype .eqs. "long"
5449 $ THEN longsize = tmp
5452 $ GOSUB type_size_check
5457 $ GOSUB type_size_check
5459 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp
5462 $ GOSUB type_size_check
5466 $ GOSUB type_size_check
5469 $ tmp = "''i16type'"
5470 $ GOSUB type_size_check
5472 $ IF i16type .eqs. "short"
5473 $ THEN shortsize = tmp
5476 $ gosub type_size_check
5480 $ tmp = "''u16type'"
5481 $ GOSUB type_size_check
5484 $ tmp = "''i32type'"
5485 $ GOSUB type_size_check
5487 $ IF i32type .eqs. "int"
5488 $ THEN intsize = tmp
5491 $ gosub type_size_check
5495 $ tmp = "''u32type'"
5496 $ gosub type_size_check
5500 $ GOSUB type_size_check
5503 $ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
5504 $ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
5505 $ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
5507 $ echo4 "Checking whether your NVs can preserve your UVs..."
5509 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5510 $ WS "#include <stdlib.h>"
5512 $ WS "#include <stdio.h>"
5514 $ WS " ''uvtype' k = (''uvtype')~0, l;"
5515 $ WS " ''nvtype' d;"
5517 $ WS " d = (''nvtype')l;"
5518 $ WS " l = (''uvtype')d;"
5520 $ WS " printf(""preserve\n"");"
5525 $ IF tmp .EQS. "preserve"
5527 $ d_nv_preserves_uv = "define"
5528 $ echo "Yes, they can."
5529 $ nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8)
5531 $ d_nv_preserves_uv = "undef"
5532 $ echo "No, they can't."
5533 $ echo4 "Checking how many bits of your UVs your NVs can preserve..."
5535 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5536 $ WS "#include <stdlib.h>"
5538 $ WS "#include <stdio.h>"
5540 $ WS " ''uvtype' u = 0;"
5541 $ WS " int n = 8 * ''uvsize';"
5543 $ WS " for (i = 0; i < n; i++) {"
5544 $ WS " u = u << 1 | (''uvtype')1;"
5545 $ WS " if ((''uvtype')(''nvtype')u != u)"
5548 $ WS " printf(""%d\n"", i);"
5553 $ nv_preserves_uv_bits = tmp
5556 $! Check for signbit (must already know nvtype)
5558 $ echo4 "Checking to see if you have signbit() available to work on ''nvtype'..."
5560 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5561 $ WS "#include <stdlib.h>"
5563 $ WS "#include <fp.h>"
5564 $ WS "#include <stdio.h>"
5567 $ WS " ''nvtype' x = 0.0;"
5568 $ WS " ''nvtype' y = -0.0;"
5569 $ WS " if ((signbit(x) == 0) && (signbit(y) != 0))"
5570 $ WS " printf(""1\n"");"
5572 $ WS " printf(""0\n"");"
5578 $ d_signbit = "define"
5581 $ d_signbit = "undef"
5585 $ echo4 "Checking if kill() uses SYS$FORCEX or can't be called from a signal handler..."
5586 $ kill_by_sigprc = "undef"
5588 $ WS "#include <stdio.h>"
5589 $ WS "#include <signal.h>"
5590 $ WS "#include <unistd.h>"
5591 $ WS "void handler1(int s) { printf(""%d"",s); kill(getpid(),2); }"
5592 $ WS "void handler2(int s) { printf(""%d"",s); }"
5594 $ WS " printf(""0"");"
5595 $ WS " signal(1,handler1);"
5596 $ WS " signal(2,handler2);"
5597 $ WS " kill(getpid(),1);"
5599 $ WS " printf(""\n"");"
5602 $ ON ERROR THEN CONTINUE
5604 $ IF tmp .NES. "012"
5606 $ echo4 "Yes, it has at least one of those limitations."
5607 $ echo4 "Checking whether we can use SYS$SIGPRC instead..."
5609 $ WS "#include <stdio.h>"
5610 $ WS "#include <lib$routines.h>"
5611 $ WS "unsigned long code = 0;"
5612 $ WS "int handler(unsigned long *args) {"
5613 $ WS " code = args[1];"
5617 $ WS " int iss, sys$sigprc();"
5618 $ WS " lib$establish(handler);"
5619 $ WS " iss = sys$sigprc(0,0,0x1234);"
5620 $ WS " iss = ((iss&1)==1 && code == 0x1234);"
5621 $ WS " printf(""%d\n"",iss);"
5624 $ ON ERROR THEN CONTINUE
5628 $ echo4 "Yep, we can."
5629 $ kill_by_sigprc = "define"
5631 $! Use the same list of signals the CRTL does for recent systems, but cook our own for very old systems.
5632 $! Note that the list controls what signals can be caught by name as well as what can be raised via kill().
5634 $ if vms_ver .LTS. "6.2"
5636 $! since SIGBUS and SIGSEGV indistinguishable, make them the same here.
5637 $ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT"
5638 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
5639 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",0"
5640 $ sig_name_init = psnwc1 + psnwc2
5641 $ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6"
5642 $ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,0"
5647 $ echo4 "Nope, we can't."
5650 $ echo4 "Nope, it doesn't."
5654 $! Finally the composite ones. All config
5656 $ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
5658 $ IF ccname .EQS. "DEC"
5660 $ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
5662 $ i_dirent = "undef"
5663 $ IF ccname .EQS. "CXX"
5665 $ i_dirent = "define"
5666 $ ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
5668 $ IF use_vmsdebug_perl
5670 $ optimize="/List/Debug/NoOpt"
5671 $ ldflags="/Debug/Trace/Map"
5674 $ optimize= "/NoList"
5675 $ ldflags="/NoTrace/NoMap"
5679 $! Okay, we've got everything configured. Now go write out a config.sh.
5680 $ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
5681 $ echo4 "Creating ''basename_config_sh'..."
5682 $ open/write CONFIG 'config_sh'
5683 $ WC := write CONFIG
5685 $! ##BEGIN WRITE NEW CONSTANTS HERE##
5689 $ WC "# This file was produced by Configure.COM on a ''osname' system."
5691 $ WC "# Package name : ''package'"
5692 $ WC "# Source directory : ''src'"
5693 $ WC "# Configuration time: " + cf_time
5694 $ WC "# Configuration by : " + cf_by
5695 $ WC "# Target system : " + myuname
5697 $ WC "Makefile_SH='" + Makefile_SH + "'"
5698 $ WC "Mcc='" + Mcc + "'"
5699 $ WC "PERL_REVISION='" + revision + "'"
5700 $ WC "PERL_VERSION='" + patchlevel + "'"
5701 $ WC "PERL_SUBVERSION='" + subversion + "'"
5702 $ WC "PERL_API_REVISION='" + api_revision + "'"
5703 $ WC "PERL_API_VERSION='" + api_version + "'"
5704 $ WC "PERL_API_SUBVERSION='" + api_subversion + "'"
5705 $ WC "PERL_PATCHLEVEL='" + perl_patchlevel + "'"
5706 $ WC "PERL_CONFIG_SH='true'"
5707 $ WC "_a='" + lib_ext + "'"
5708 $ WC "_exe='" + exe_ext + "'"
5709 $ WC "_o='" + obj_ext + "'"
5710 $ WC "alignbytes='" + alignbytes + "'"
5711 $ WC "aphostname='write sys$output f$edit(f$getsyi(\""SCSNODE\""),\""TRIM,LOWERCASE\"")'"
5713 $ WC "archlib='" + archlib + "'"
5714 $ WC "archlibexp='" + archlibexp + "'"
5715 $ WC "archname='" + archname + "'"
5716 $ WC "baserev='" + baserev + "'"
5717 $ WC "bin='" + bin + "'"
5718 $ WC "binexp='" + binexp + "'"
5719 $ WC "builddir='" + builddir + "'"
5720 $ WC "byteorder='1234'"
5721 $ WC "castflags='0'"
5722 $ WC "cc='" + perl_cc + "'"
5723 $ WC "cccdlflags='" + cccdlflags + "'"
5724 $ WC "ccdlflags='" + ccdlflags + "'"
5725 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
5727 $ IF usestdstat .OR. usestdstat .EQS. "define"
5729 $ ccdefines = "_USE_STD_STAT=1"
5731 $ ccdefines = "_LARGEFILE=1"
5736 $ IF ccdefines .NES. ""
5738 $ WC "ccflags='" + ccflags + "/Define=" + ccdefines + "'"
5740 $ WC "ccflags='" + ccflags + "'"
5742 $ WC "ccflags_uselargefiles='" + "'"
5743 $ WC "ccname='" + ccname + "'"
5744 $ WC "ccversion='" + ccversion + "'"
5745 $ WC "cf_by='" + cf_by + "'"
5746 $ WC "cf_email='" + cf_email + "'"
5747 $ WC "cf_time='" + cf_time + "'"
5748 $ WC "config_args='" + config_args + "'"
5749 $ WC "config_sh='" + config_sh + "'"
5750 $ WC "cpp_stuff='" + cpp_stuff + "'"
5751 $ WC "cpplast='" + cpplast + "'"
5752 $ WC "cppminus='" + cppminus + "'"
5753 $ WC "cpprun='" + cpprun + "'"
5754 $ WC "cppstdin='" + cppstdin + "'"
5755 $ IF use64bitint .OR. use64bitint .EQS. "define"
5757 $! gcvt() does not work for > 16 decimal places; fallback to sprintf
5758 $ WC "d_Gconvert='sprintf((b),""%.*" + (nvgformat-"""") + ",(n),(x))'"
5760 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
5762 $ WC "d_PRIEldbl='" + d_PRIEUldbl + "'"
5763 $ WC "d_PRIFldbl='" + d_PRIFUldbl + "'"
5764 $ WC "d_PRIGldbl='" + d_PRIGUldbl + "'"
5765 $ WC "d_PRIXU64='" + d_PRIXU64 + "'"
5766 $ WC "d_PRId64='" + d_PRId64 + "'"
5767 $ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
5768 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
5769 $ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
5770 $ WC "d_PRIo64='" + d_PRIo64 + "'"
5771 $ WC "d_PRIu64='" + d_PRIu64 + "'"
5772 $ WC "d_PRIx64='" + d_PRIx64 + "'"
5773 $ WC "d_SCNfldbl='" + d_SCNfldbl + "'"
5774 $ WC "d__fwalk='undef'"
5775 $ WC "d_access='" + d_access + "'"
5776 $ WC "d_accessx='undef'"
5777 $ WC "d_aintl='undef'"
5778 $ WC "d_alarm='define'"
5779 $ WC "d_archlib='define'"
5780 $ WC "d_atolf='" + d_atolf + "'"
5781 $ WC "d_atoll='" + d_atoll + "'"
5782 $ WC "d_attribute_format='" + d_attribut + "'"
5783 $ WC "d_attribute_malloc='undef'"
5784 $ WC "d_attribute_nonnull='undef'"
5785 $ WC "d_attribute_noreturn='undef'"
5786 $ WC "d_attribute_pure='undef'"
5787 $ WC "d_attribute_unused='undef'"
5788 $ WC "d_attribute_warn_unused_result='undef'"
5789 $ WC "d_printf_format_null='undef'"
5790 $ WC "d_bcmp='" + d_bcmp + "'"
5791 $ WC "d_bcopy='" + d_bcopy + "'"
5792 $ WC "d_bincompat3='undef'"
5793 $! WC "d_bsdpgrp='undef'"
5794 $ WC "d_bsdgetpgrp='undef'"
5795 $ WC "d_bsdsetpgrp='undef'"
5796 $ WC "d_builtin_choose_expr='undef'" ! GCC only
5797 $ WC "d_builtin_expect='undef'" ! GCC only
5798 $ WC "d_bzero='" + d_bzero + "'"
5799 $ WC "d_casti32='define'"
5800 $ WC "d_castneg='define'"
5801 $ WC "d_charvspr='undef'"
5802 $ WC "d_chown='define'"
5803 $ WC "d_chroot='undef'"
5804 $ WC "d_chsize='undef'"
5805 $ WC "d_class='undef'"
5806 $ WC "d_cmsghdr_s='undef'"
5807 $ WC "d_const='define'"
5808 $ WC "d_copysignl='define'"
5809 $ WC "d_cplusplus='" + d_cplusplus + "'"
5810 $ WC "d_crypt='define'"
5811 $ WC "d_csh='undef'"
5812 $ WC "d_ctermid='define'"
5813 $ WC "d_cuserid='define'"
5814 $ WC "d_c99_variadic_macros='undef'"
5815 $ WC "d_dbl_dig='define'"
5816 $ WC "d_dbminitproto='undef'"
5817 $ WC "d_difftime='define'"
5818 $ WC "d_dir_dd_fd='undef'"
5819 $ WC "d_dirfd='undef'"
5820 $ WC "d_dirnamlen='define'"
5821 $ WC "d_dlerror='undef'"
5822 $ WC "d_dlsymun='undef'"
5823 $ WC "d_dosuid='undef'"
5824 $ WC "d_drand48proto='" + d_drand48proto + "'"
5825 $ WC "d_dup2='define'"
5826 $ WC "d_eaccess='undef'"
5827 $ WC "d_endgrent='define'"
5828 $ WC "d_endhent='" + d_endhent + "'"
5829 $ WC "d_endnent='" + d_endnent + "'"
5830 $ WC "d_endpent='" + d_endpent + "'"
5831 $ WC "d_endpwent='define'"
5832 $ WC "d_endsent='" + d_endsent + "'"
5833 $ WC "d_eofnblk='undef'"
5834 $ WC "d_eunice='undef'"
5835 $ WC "d_fchmod='undef'"
5836 $ WC "d_fchdir='undef'"
5837 $ WC "d_fchown='undef'"
5838 $ WC "d_fcntl='" + d_fcntl + "'"
5839 $ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
5840 $ WC "d_fd_set='" + d_fd_set + "'"
5841 $ WC "d_fgetpos='define'"
5842 $ WC "d_finite='undef'"
5843 $ WC "d_finitel='undef'"
5844 $ WC "d_flexfnam='define'"
5845 $ WC "d_flock='undef'"
5846 $ WC "d_flockproto='undef'"
5847 $ WC "d_fork='undef'"
5848 $ WC "d_fp_class='undef'"
5849 $ WC "d_fpathconf='" + d_fpathconf + "'"
5850 $ WC "d_fpclass='undef'"
5851 $ WC "d_fpclassify='undef'"
5852 $ WC "d_fpclassl='undef'"
5853 $ WC "d_fpos64_t='" + d_fpos64_t + "'"
5854 $ WC "d_frexpl='" + d_frexpl + "'"
5855 $ WC "d_fs_data_s='undef'"
5856 $ WC "d_fseeko='" + d_fseeko + "'"
5857 $ WC "d_fsetpos='define'"
5858 $ WC "d_fstatfs='undef'"
5859 $ WC "d_fstatvfs='" + d_fstatvfs + "'"
5860 $ WC "d_fsync='undef'"
5861 $ WC "d_ftello='" + d_ftello + "'"
5862 $ WC "d_futimes='undef'"
5863 $ WC "d_getcwd='define'"
5864 $ WC "d_getespwnam='undef'"
5865 $ WC "d_getfsstat='undef'"
5866 $ WC "d_getgrent='define'"
5867 $ WC "d_getgrps='undef'"
5868 $ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
5869 $ WC "d_gethbyname='" + d_gethbyname + "'"
5870 $ WC "d_gethent='" + d_gethent + "'"
5871 $ WC "d_gethname='" + d_gethname + "'"
5872 $ WC "d_gethostprotos='" + d_gethostprotos + "'"
5873 $ WC "d_getitimer='" + d_getitimer + "'"
5874 $ WC "d_getlogin='define'"
5875 $ WC "d_getmnt='undef'"
5876 $ WC "d_getmntent='undef'"
5877 $ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
5878 $ WC "d_getnbyname='" + d_getnbyname + "'"
5879 $ WC "d_getnent='" + d_getnent + "'"
5880 $ WC "d_getnetprotos='" + d_getnetprotos + "'"
5881 $ WC "d_getpagsz='undef'"
5882 $ WC "d_getpbyname='" + d_getpbyname + "'"
5883 $ WC "d_getpbynumber='" + d_getpbynumber + "'"
5884 $ WC "d_getpent='" + d_getpent + "'"
5885 $ WC "d_getpgid='" + d_getpgid + "'"
5886 $ WC "d_getpgrp2='undef'"
5887 $ WC "d_getpgrp='" + d_getpgrp + "'"
5888 $ WC "d_getppid='" + d_getppid + "'"
5889 $ WC "d_getprior='undef'"
5890 $ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
5891 $ WC "d_getprpwnam='undef'"
5892 $ WC "d_getpwent='define'"
5893 $ WC "d_getsbyname='" + d_getsbyname + "'"
5894 $ WC "d_getsbyport='" + d_getsbyport + "'"
5895 $ WC "d_getsent='" + d_getsent + "'"
5896 $ WC "d_getservprotos='" + d_getservprotos + "'"
5897 $ WC "d_getspnam='undef'"
5898 $ WC "d_gettimeod='" + d_gettimeod + "'"
5899 $ WC "d_gnulibc='undef'"
5900 $ WC "d_grpasswd='undef'"
5901 $ WC "d_hasmntopt='undef'"
5902 $ WC "d_htonl='" + d_htonl + "'"
5903 $ WC "d_ilogbl='undef'"
5904 $ WC "d_inc_version_list='undef'"
5905 $ WC "d_index='" + d_index + "'"
5906 $ WC "d_inetaton='undef'"
5907 $ WC "d_int64_t='" + d_int64_t + "'"
5908 $ WC "d_isascii='define'"
5909 $ WC "d_isfinite='undef'"
5910 $ WC "d_isinf='undef'"
5911 $ WC "d_isnan='" + d_isnan + "'"
5912 $ WC "d_isnanl='" + d_isnanl + "'"
5913 $ WC "d_killpg='undef'"
5914 $ WC "d_lchown='" + d_lchown + "'"
5915 $ WC "d_ldbl_dig='define'"
5916 $ WC "d_libm_lib_version='undef'"
5917 $ WC "d_link='" + d_link + "'"
5918 $ WC "d_llseek='undef'"
5919 $ WC "d_locconv='" + d_locconv + "'"
5920 $ WC "d_lockf='undef'"
5921 $ WC "d_longdbl='" + d_longdbl + "'"
5922 $ WC "d_longlong='" + d_longlong + "'"
5923 $ WC "d_lseekproto='define'"
5924 $ WC "d_lstat='" + d_lstat + "'"
5925 $ WC "d_madvise='undef'"
5926 $ WC "d_malloc_size='undef'"
5927 $ WC "d_malloc_good_size='undef'"
5928 $ WC "d_mblen='" + d_mblen + "'"
5929 $ WC "d_mbstowcs='" + d_mbstowcs + "'"
5930 $ WC "d_mbtowc='" + d_mbtowc + "'"
5931 $ WC "d_memchr='" + d_memchr + "'"
5932 $ WC "d_memcmp='define'"
5933 $ WC "d_memcpy='define'"
5934 $ WC "d_memmove='define'"
5935 $ WC "d_memset='define'"
5936 $ WC "d_mkdir='define'"
5937 $ WC "d_mkdtemp='" + d_mkdtemp + "'"
5938 $ WC "d_mkfifo='undef'"
5939 $ WC "d_mknod='undef'"
5940 $ WC "d_mkstemp='" + d_mkstemp + "'"
5941 $ WC "d_mkstemps='" + d_mkstemps + "'"
5942 $ WC "d_mktime='" + d_mktime + "'"
5943 $ WC "d_mmap='" + d_mmap + "'"
5944 $ WC "d_modfl='" + d_modfl + "'"
5945 $ WC "d_modflproto='" + d_modflproto + "'"
5946 $ WC "d_modfl_pow32_bug='undef'"
5947 $ WC "d_mprotect='" + d_mprotect + "'"
5948 $ WC "d_msg='undef'"
5949 $ WC "d_msg_ctrunc='undef'"
5950 $ WC "d_msg_dontroute='undef'"
5951 $ WC "d_msg_oob='undef'"
5952 $ WC "d_msg_peek='undef'"
5953 $ WC "d_msg_proxy='undef'"
5954 $ WC "d_msghdr_s='undef'"
5955 $ WC "d_msync='" + d_msync + "'"
5956 $ WC "d_munmap='" + d_munmap + "'"
5957 $ WC "d_mymalloc='" + d_mymalloc + "'"
5958 $ WC "d_nanosleep='" + d_nanosleep + "'"
5959 $ WC "d_nice='define'"
5960 $ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
5961 $ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
5962 $ WC "nv_preserves_uv_bits='" + nv_preserves_uv_bits + "'"
5963 $ WC "d_nv_zero_is_allbits_zero='define'"
5964 $ WC "d_off64_t='" + d_off64_t + "'"
5965 $ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
5966 $ WC "d_oldarchlib='define'"
5967 $ WC "d_oldpthreads='" + d_oldpthreads + "'"
5968 $ WC "d_open3='define'"
5969 $ WC "d_pathconf='" + d_pathconf + "'"
5970 $ WC "d_pause='define'"
5971 $ WC "d_perl_otherlibdirs='undef'"
5972 $ WC "d_phostname='" + d_phostname + "'"
5973 $ WC "d_pipe='define'"
5974 $ WC "d_poll='" + d_poll + "'"
5975 $ WC "d_procselfexe='undef'"
5976 $ WC "d_pseudofork='undef'"
5977 $ WC "d_pthread_atfork='undef'"
5978 $ WC "d_pthread_attr_setscope='" + d_pthread_attr_setscope + "'"
5979 $ WC "d_pthread_yield='" + d_pthread_yield + "'"
5980 $ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
5981 $ WC "d_pwage='undef'"
5982 $ WC "d_pwchange='undef'"
5983 $ WC "d_pwclass='undef'"
5984 $ WC "d_pwcomment='define'"
5985 $ WC "d_pwexpire='undef'"
5986 $ WC "d_pwgecos='define'"
5987 $ WC "d_pwpasswd='define'"
5988 $ WC "d_pwquota='undef'"
5989 $ WC "d_qgcvt='undef'"
5990 $ WC "d_quad='" + d_quad + "'"
5991 $ WC "d_readdir='define'"
5992 $ WC "d_readlink='" + d_readlink + "'"
5993 $ WC "d_readv='undef'"
5994 $ WC "d_realpath='" + d_realpath + "'"
5995 $ WC "d_recvmsg='undef'"
5996 $ WC "d_rename='define'"
5997 $ WC "d_rewinddir='define'"
5998 $ WC "d_rmdir='define'"
5999 $ WC "d_safebcpy='undef'"
6000 $ WC "d_safemcpy='define'"
6001 $ WC "d_sanemcmp='define'"
6002 $ WC "d_sbrkproto='define'"
6003 $ WC "d_scalbnl='undef'"
6004 $ WC "d_sched_yield='" + d_sched_yield + "'"
6005 $ WC "d_scm_rights='undef'"
6006 $ WC "d_seekdir='define'"
6007 $ WC "d_select='" + d_select + "'"
6008 $ WC "d_sem='undef'"
6009 $ WC "d_semctl_semid_ds='undef'"
6010 $ WC "d_semctl_semun='undef'"
6011 $ WC "d_sendmsg='undef'"
6012 $ WC "d_setegid='undef'"
6013 $ WC "d_setenv='" + d_setenv + "'"
6014 $ WC "d_seteuid='" + d_seteuid + "'"
6015 $ WC "d_setgrent='" + d_setgrent + "'"
6016 $ WC "d_setgrps='undef'"
6017 $ WC "d_sethent='" + d_sethent + "'"
6018 $ WC "d_setitimer='" + d_setitimer + "'"
6019 $ WC "d_setlinebuf='undef'"
6020 $ WC "d_setlocale='" + d_setlocale + "'"
6021 $ WC "d_setnent='" + d_setnent + "'"
6022 $ WC "d_setpent='" + d_setpent + "'"
6023 $ WC "d_setpgid='" + d_setpgid + "'"
6024 $ WC "d_setpgrp2='undef'"
6025 $ WC "d_setpgrp='" + d_setpgrp + "'"
6026 $ WC "d_setprior='undef'"
6027 $ WC "d_setproctitle='" + d_setproctitle + "'"
6028 $ WC "d_setpwent='define'"
6029 $ WC "d_setregid='" + d_setregid + "'"
6030 $ WC "d_setresgid='undef'"
6031 $ WC "d_setresuid='undef'"
6032 $ WC "d_setreuid='" + d_setreuid + "'"
6033 $ WC "d_setrgid='undef'"
6034 $ WC "d_setruid='undef'"
6035 $ WC "d_setsent='" + d_setsent + "'"
6036 $ WC "d_setsid='" + d_setsid + "'"
6037 $ WC "d_setvbuf='" + d_setvbuf + "'"
6038 $ WC "d_sfio='undef'"
6039 $ WC "d_shm='undef'"
6040 $ WC "d_shmatprototype='undef'"
6041 $ WC "d_sigaction='" + d_sigaction + "'"
6042 $ WC "d_signbit='" + d_signbit + "'"
6043 $ WC "d_sigprocmask='" + d_sigprocmask + "'"
6044 $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
6045 $ WC "d_sitearch='define'"
6046 $ WC "d_sockatmark='undef'"
6047 $ WC "d_sockatmarkproto='undef'"
6048 $ WC "d_socket='" + d_socket + "'"
6049 $ WC "d_socklen_t='" + d_socklen_t + "'"
6050 $ WC "d_sockpair='" + d_sockpair + "'"
6051 $ WC "d_socks5_init='undef'"
6052 $ WC "d_sprintf_returns_strlen='define'"
6053 $ WC "d_sqrtl='define'"
6054 $ WC "d_sresgproto='undef'"
6055 $ WC "d_sresgproto='undef'"
6056 $ WC "d_sresproto='undef'"
6057 $ WC "d_sresuproto='undef'"
6058 $ WC "d_statblks='undef'"
6059 $ WC "d_statfs_f_flags='undef'"
6060 $ WC "d_statfs_s='undef'"
6061 $ WC "d_statfsflags='undef'"
6062 $ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
6063 $ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
6064 $ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'"
6065 $ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'"
6066 $ WC "d_stdio_stream_array='undef'"
6067 $ WC "d_stdiobase='" + d_stdiobase + "'"
6068 $ WC "d_stdstdio='" + d_stdstdio + "'"
6069 $ WC "d_faststdio='" + d_faststdio + "'"
6070 $ WC "d_strchr='define'"
6071 $ WC "d_strcoll='" + d_strcoll + "'"
6072 $ WC "d_strctcpy='define'"
6073 $ WC "d_strerrm='strerror((e),vaxc$errno)'"
6074 $ WC "d_strerror='define'"
6075 $ WC "d_strftime='define'"
6076 $ WC "d_strlcat='undef'"
6077 $ WC "d_strlcpy='undef'"
6078 $ WC "d_strtod='define'"
6079 $ WC "d_strtol='define'"
6080 $ WC "d_strtold='" + d_strtold + "'"
6081 $ WC "d_strtoll='" + d_strtoll + "'"
6082 $ WC "d_strtoq='" + d_strtoq + "'"
6083 $ WC "d_strtoul='define'"
6084 $ WC "d_strtoull='" + d_strtoull + "'"
6085 $ WC "d_strtouq='" + d_strtouq + "'"
6086 $ WC "d_strxfrm='" + d_strxfrm + "'"
6087 $ WC "d_suidsafe='undef'"
6088 $ WC "d_symlink='" + d_symlink + "'"
6089 $ WC "d_syscall='undef'"
6090 $ WC "d_syscallproto='undef'"
6091 $ WC "d_sysconf='" + d_sysconf + "'"
6092 $ WC "d_syserrlst='undef'"
6093 $ WC "d_system='define'"
6094 $ WC "d_tcgetpgrp='undef'"
6095 $ WC "d_tcsetpgrp='undef'"
6096 $ WC "d_telldir='define'"
6097 $ WC "d_telldirproto='define'"
6098 $ WC "d_time='define'"
6099 $ WC "d_times='define'"
6100 $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.0")
6102 $ WC "d_tm_tm_gmtoff='define'"
6103 $ WC "d_tm_tm_zone='define'"
6105 $ WC "d_tm_tm_gmtoff='undef'"
6106 $ WC "d_tm_tm_zone='undef'"
6108 $ WC "d_truncate='" + d_truncate + "'"
6109 $ WC "d_tzname='" + d_tzname + "'"
6110 $ WC "d_u32align='define'"
6111 $ WC "d_ualarm='" + d_ualarm + "'"
6112 $ WC "d_umask='define'"
6113 $ WC "d_uname='" + d_uname + "'"
6114 $ WC "d_union_semun='undef'"
6115 $ WC "d_unlink_all_versions='" + d_unlink_all_versions + "'" ! VMS-specific
6116 $ WC "d_unordered='undef'"
6117 $ WC "d_unsetenv='" + d_unsetenv + "'"
6118 $ WC "d_clearenv='" + d_clearenv + "'"
6119 $ WC "d_usleep='" + d_usleep + "'"
6120 $ WC "d_usleepproto='" + d_usleep + "'"
6121 $ WC "d_ustat='undef'"
6122 $ WC "d_vendorarch='undef'"
6123 $ WC "d_vendorlib='undef'"
6124 $ WC "d_vfork='define'"
6125 $ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
6126 $ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
6127 $ WC "d_void_closedir='define'"
6128 $ WC "d_volatile='define'"
6129 $ WC "d_vprintf='define'"
6130 $ WC "d_vsnprintf='" + d_vsnprintf + "'"
6131 $ WC "d_wait4='" + d_wait4 + "'"
6132 $ WC "d_waitpid='define'"
6133 $ WC "d_wcstombs='" + d_wcstombs + "'"
6134 $ WC "d_wctomb='" + d_wctomb + "'"
6135 $ WC "d_writev='undef'"
6136 $ WC "db_hashtype=' '"
6137 $ WC "db_prefixtype=' '"
6138 $ WC "db_version_major='" + "'"
6139 $ WC "db_version_minor='" + "'"
6140 $ WC "db_version_patch='" + "'"
6141 $ WC "dbgprefix='" + dbgprefix + "'"
6142 $ WC "defvoidused='15'"
6143 $ WC "devtype='" + devtype + "'"
6144 $ WC "direntrytype='struct dirent'"
6145 $ WC "dlext='" + dlext + "'"
6146 $ WC "dlobj='" + dlobj + "'"
6147 $ WC "dlsrc='dl_vms.c'"
6148 $ WC "doublesize='" + doublesize + "'"
6149 $ WC "drand01='" + drand01 + "'"
6151 $! The extensions symbol may be quite long
6153 $ tmp = "dynamic_ext='" + extensions + "'"
6157 $ WC "ebcdic='undef'"
6158 $ WC "embedmymalloc='" + usemymalloc + "'"
6159 $ WC "eunicefix=':'"
6160 $ WC "exe_ext='" + exe_ext + "'"
6162 $! The extensions symbol may be quite long
6164 $ tmp = "extensions='" + extensions + "'"
6167 $ WC "fflushNULL='define'"
6168 $ WC "fflushall='undef'"
6169 $ WC "fpostype='fpos_t'"
6170 $ WC "freetype='void'"
6171 $ WC "full_ar='" + "'"
6172 $ WC "full_csh='" + " '"
6173 $ WC "full_sed='_NLA0:'"
6174 $ WC "gccversion='" + gccversion + "'"
6175 $ WC "gidformat='lu'"
6178 $ WC "gidtype='" + gidtype + "'"
6179 $ WC "groupstype='Gid_t'"
6181 $ WC "hintfile='" + "'"
6182 $ WC "i16size='" + i16size + "'"
6183 $ WC "i16type='" + i16type + "'"
6184 $ WC "i32size='" + i32size + "'"
6185 $ WC "i32type='" + i32type + "'"
6186 $ WC "i64size='" + i64size + "'"
6187 $ WC "i64type='" + i64type + "'"
6188 $ WC "i8size='" + i8size + "'"
6189 $ WC "i8type='" + i8type + "'"
6190 $ WC "i_arpainet='undef'"
6191 $ WC "i_crypt='undef'"
6193 $ WC "i_dbm='undef'"
6194 $ WC "i_dirent='" + i_dirent + "'"
6195 $ WC "i_dlfcn='undef'"
6196 $ WC "i_fcntl='" + i_fcntl + "'"
6197 $ WC "i_float='define'"
6199 $ WC "i_fp_class='undef'"
6200 $ WC "i_gdbm='undef'"
6201 $ WC "i_grp='" + i_grp + "'"
6202 $ WC "i_ieeefp='undef'"
6203 $ WC "i_inttypes='" + i_inttypes + "'"
6204 $ WC "i_langinfo='" + i_langinfo + "'"
6205 $ WC "i_libutil='" + i_libutil + "'"
6206 $ WC "i_limits='define'"
6207 $ WC "i_locale='" + i_locale + "'"
6208 $ WC "i_machcthr='undef'"
6209 $ WC "i_machcthreads='undef'"
6210 $ WC "i_math='define'"
6211 $ WC "i_memory='undef'"
6212 $ WC "i_mntent='undef'"
6213 $ WC "i_ndbm='undef'"
6214 $ WC "i_netdb='" + i_netdb + "'"
6215 $ WC "i_neterrno='define'"
6216 $ WC "i_netinettcp='" + i_netinettcp + "'"
6217 $ WC "i_niin='" + i_niin + "'"
6218 $ WC "i_poll='" + i_poll + "'"
6219 $ WC "i_prot='undef'"
6220 $ WC "i_pthread='define'"
6221 $ WC "i_pwd='undef'"
6222 $ WC "i_rpcsvcdbm='undef'"
6223 $ WC "i_sfio='undef'"
6224 $ WC "i_sgtty='undef'"
6225 $ WC "i_shadow='" + i_shadow + "'"
6226 $ WC "i_socks='" + i_socks + "'"
6227 $ WC "i_stdarg='define'"
6228 $ WC "i_stddef='define'"
6229 $ WC "i_stdlib='define'"
6230 $ WC "i_string='define'"
6231 $ WC "i_sunmath='undef'"
6232 $ WC "i_sysaccess='" + i_sysaccess + "'"
6233 $ WC "i_sysdir='undef'"
6234 $ WC "i_sysfile='" + i_sysfile + "'"
6235 $ WC "i_sysioctl='" + i_sysioctl + "'"
6236 $ WC "i_syslog='" + i_syslog + "'"
6237 $ WC "i_sysmman='undef'"
6238 $ WC "i_sysmode='" + i_sysmode + "'"
6239 $ WC "i_sysmount='undef'"
6240 $ WC "i_sysndir='undef'"
6241 $ WC "i_sysparam='undef'"
6242 $ WC "i_sysresrc='undef'"
6243 $ WC "i_syssecrt='" + i_syssecrt + "'"
6244 $ WC "i_sysselct='undef'"
6245 $ WC "i_syssockio='undef'"
6246 $ WC "i_sysstat='define'"
6247 $ WC "i_sysstatfs='undef'"
6248 $ WC "i_sysstatvfs='" + i_sysstatvfs + "'"
6249 $ WC "i_systime='undef'"
6250 $ WC "i_systimek='undef'"
6251 $ WC "i_systimes='undef'"
6252 $ WC "i_systypes='define'"
6253 $ WC "i_sysuio='" + i_sysuio + "'"
6254 $ WC "i_sysun='undef'"
6255 $ WC "i_sysutsname='" + i_sysutsname + "'"
6256 $ WC "i_sysvfs='undef'"
6257 $ WC "i_syswait='undef'"
6258 $ WC "i_termio='undef'"
6259 $ WC "i_termios='undef'"
6260 $ WC "i_time='define'"
6261 $ WC "i_unistd='" + i_unistd + "'"
6262 $ WC "i_ustat='undef'"
6263 $ WC "i_utime='" + i_utime + "'"
6264 $ WC "i_values='undef'"
6265 $ WC "i_varargs='undef'"
6266 $ WC "i_vfork='undef'"
6267 $ WC "inc_version_list='0'"
6268 $ WC "inc_version_list_init='0'"
6269 $ WC "installarchlib='" + installarchlib + "'"
6270 $ WC "installbin='" + installbin + "'"
6271 $ WC "installman1dir='" + installman1dir + "'"
6272 $ WC "installman3dir='" + installman3dir + "'"
6273 $ WC "installprefix='" + vms_prefix + "'"
6274 $ WC "installprefixexp='" + vms_prefix + ":'"
6275 $ WC "installprivlib='" + installprivlib + "'"
6276 $ WC "installscript='" + installscript + "'"
6277 $ WC "installsitearch='" + installsitearch + "'"
6278 $ WC "installsitebin='" + sitebin + "'"
6279 $ WC "installsitelib='" + installsitelib + "'"
6280 $ WC "installusrbinperl='undef'"
6281 $ WC "intsize='" + intsize + "'"
6282 $ WC "ivdformat='" + ivdformat + "'"
6283 $ WC "ivsize='" + ivsize + "'"
6284 $ WC "ivtype='" + ivtype + "'"
6286 $! The known_extensions symbol may be quite long
6288 $ tmp = "known_extensions='" + known_extensions + "'"
6291 $ WC "ld='" + ld + "'"
6292 $ WC "lddlflags='/Share'"
6293 $ WC "ldflags='" + ldflags + "'"
6294 $ WC "ldflags_uselargefiles='" + "'"
6295 $ WC "lib_ext='" + lib_ext + "'"
6296 $ WC "libc='" + libc + "'"
6297 $ WC "libpth='/sys$share /sys$library'"
6298 $ WC "libs='" + libs + "'"
6299 $ WC "libswanted='" + "'"
6300 $ WC "libswanted_uselargefiles='" + "'"
6301 $ WC "longdblsize='" + longdblsize + "'"
6302 $ WC "longlongsize='" + longlongsize + "'"
6303 $ WC "longsize='" + longsize + "'"
6304 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
6306 $ WC "lseeksize='8'"
6307 $ WC "lseektype='off_t'"
6309 $ WC "lseeksize='4'"
6310 $ WC "lseektype='int'"
6314 $ WC "make='" + make + "'"
6315 $ WC "malloctype='void *'"
6316 $ WC "usemallocwrap='" + usemallocwrap + "'"
6317 $ WC "man1ext='rno'"
6318 $ WC "man3ext='rno'"
6319 $ WC "mmaptype='void *'"
6320 $ WC "modetype='unsigned int'"
6321 $ WC "multiarch='undef'"
6322 $ WC "mydomain='" + mydomain + "'"
6323 $ WC "myhostname='" + myhostname + "'"
6324 $ WC "myuname='" + myuname + "'"
6325 $ WC "need_va_copy='undef'"
6326 $ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
6327 $ WC "netdb_host_type='" + netdb_host_type + "'"
6328 $ WC "netdb_name_type='" + netdb_name_type + "'"
6329 $ WC "netdb_net_type='" + netdb_net_type + "'"
6330 $ WC "nonxs_ext='" + nonxs_ext + "'"
6331 $ WC "nveformat='" + nveformat + "'"
6332 $ WC "nvfformat='" + nvfformat + "'"
6333 $ WC "nvgformat='" + nvgformat + "'"
6334 $ WC "nvsize='" + nvsize + "'"
6335 $ WC "nvtype='" + nvtype + "'"
6336 $ WC "o_nonblock=' '"
6337 $ WC "obj_ext='" + obj_ext + "'"
6338 $ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
6339 $ WC "oldarchlib='" + oldarchlib + "'"
6340 $ WC "oldarchlibexp='" + oldarchlibexp + "'"
6341 $ WC "optimize='" + optimize + "'"
6342 $ WC "osname='" + osname + "'"
6343 $ WC "osvers='" + osvers + "'"
6344 $ WC "otherlibdirs='" + "'"
6345 $ WC "package='" + package + "'"
6346 $ WC "pager='" + pager + "'"
6347 $ WC "patchlevel='" + patchlevel + "'"
6349 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
6350 $ WC "perladmin='" + perladmin + "'"
6351 $ WC "perllibs='" + perllibs + "'"
6352 $ WC "perlpath='" + "''vms_prefix':[000000]Perl''exe_ext'" + "'"
6353 $ WC "perl_symbol='" + perl_symbol + "'" ! VMS specific
6354 $ WC "perl_verb='" + perl_verb + "'" ! VMS specific
6355 $ WC "pgflquota='" + pgflquota + "'"
6356 $ WC "pidtype='" + pidtype + "'"
6357 $ WC "prefix='" + vms_prefix + "'"
6358 $ WC "prefixexp='" + vms_prefix + ":'"
6359 $ WC "privlib='" + privlib + "'"
6360 $ WC "privlibexp='" + privlibexp + "'"
6361 $ WC "procselfexe=' '"
6362 $ WC "prototype='define'"
6363 $ WC "ptrsize='" + ptrsize + "'"
6364 $ WC "quadkind='" + quadkind + "'"
6365 $ WC "quadtype='" + quadtype + "'"
6366 $ WC "randbits='" + randbits + "'"
6367 $ WC "randfunc='" + randfunc + "'"
6368 $ WC "randseedtype='" + randseedtype + "'"
6369 $ WC "ranlib='" + "'"
6370 $ WC "rd_nodata=' '"
6371 $ WC "revision='" + revision + "'"
6372 $ WC "sPRId64='" + sPRId64 + "'"
6373 $ WC "sPRIEldbl='" + sPRIEUldbl + "'"
6374 $ WC "sPRIFldbl='" + sPRIFUldbl + "'"
6375 $ WC "sPRIGldbl='" + sPRIGUldbl + "'"
6376 $ WC "sPRIX64='" + sPRIXU64 + "'"
6377 $ WC "sPRIeldbl='" + sPRIeldbl + "'"
6378 $ WC "sPRIfldbl='" + sPRIfldbl + "'"
6379 $ WC "sPRIgldbl='" + sPRIgldbl + "'"
6380 $! WC "sPRIi64='" + sPRIi64 + "'"
6381 $ WC "sPRIo64='" + sPRIo64 + "'"
6382 $ WC "sPRIu64='" + sPRIu64 + "'"
6383 $ WC "sPRIx64='" + sPRIx64 + "'"
6384 $ WC "sSCNfldbl='" + sSCNfldbl + "'"
6385 $ WC "sched_yield='" + sched_yield + "'"
6386 $ WC "scriptdir='" + scriptdir + "'"
6387 $ WC "scriptdirexp='" + scriptdir + "'" ! use scriptdir for now
6388 $ WC "seedfunc='" + seedfunc + "'"
6389 $ WC "selectminbits='32'"
6390 $ WC "selecttype='" + selecttype + "'"
6392 $ WC "shmattype='" + " '"
6393 $ WC "shortsize='" + shortsize + "'"
6394 $ IF (f$length(sig_name) .GE. 244)
6396 $ tmp = "sig_name='" + sig_name + "'"
6400 $ WC "sig_name='" + sig_name + "'"
6402 $ IF (f$length(sig_name_init) .GE. 244)
6404 $ tmp = "sig_name_init='" + sig_name_init + "'"
6408 $ WC "sig_name_init='" + sig_name_init + "'"
6410 $ WC "sig_num='" + sig_num + "'"
6411 $ WC "sig_num_init='" + sig_num_init + "'"
6412 $ WC "sig_count='" + sig_count + "'"
6413 $ WC "sig_size='" + sig_size + "'"
6414 $ WC "signal_t='" + signal_t + "'"
6415 $ WC "sitearch='" + sitearch + "'"
6416 $ WC "sitearchexp='" + sitearchexp + "'"
6417 $ WC "sitebin='" + sitebin + "'"
6418 $ WC "sitebinexp='" + sitebin + "'"
6419 $ WC "sitelib='" + sitelib + "'"
6420 $ WC "sitelib_stem='" + sitelib_stem + "'"
6421 $ WC "sitelibexp='" + sitelibexp + "'"
6422 $ WC "siteprefix='" + vms_prefix + "'"
6423 $ WC "siteprefixexp='" + vms_prefix + ":'"
6424 $ WC "sizesize='" + sizesize + "'"
6425 $ WC "sizetype='size_t'"
6426 $ WC "so='" + so + "'"
6427 $ WC "socksizetype='" + socksizetype + "'"
6428 $ WC "spitshell='write sys$output '"
6429 $ WC "src='" + src + "'"
6430 $ WC "ssizetype='int'"
6431 $ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
6432 $ WC "static_ext='" + static_ext + "'"
6433 $ WC "stdchar='" + stdchar + "'"
6434 $ WC "stdio_base='((*fp)->_base)'"
6435 $ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
6436 $ WC "stdio_cnt='((*fp)->_cnt)'"
6437 $ WC "stdio_ptr='((*fp)->_ptr)'"
6438 $ WC "stdio_stream_array=' " + "'"
6439 $ WC "subversion='" + subversion + "'"
6440 $ WC "targetarch='" + "'"
6441 $ WC "timetype='" + timetype + "'"
6442 $ WC "u16size='" + u16size + "'"
6443 $ WC "u16type='" + u16type + "'"
6444 $ WC "u32size='" + u32size + "'"
6445 $ WC "u32type='" + u32type + "'"
6446 $ WC "u64size='" + u64size + "'"
6447 $ WC "u64type='" + u64type + "'"
6448 $ WC "u8size='" + u8size + "'"
6449 $ WC "u8type='" + u8type + "'"
6450 $ WC "uidformat='lu'"
6453 $ WC "uidtype='" + uidtype + "'"
6454 $ WC "uquadtype='" + uquadtype + "'"
6455 $ WC "use5005threads='" + use5005threads + "'"
6456 $ WC "use64bitall='" + use64bitall + "'"
6457 $ WC "use64bitint='" + use64bitint + "'"
6458 $ WC "usecasesensitive='" + be_case_sensitive + "'" ! VMS-specific
6459 $ WC "usedebugging_perl='"+use_debugging_perl+"'"
6460 $ WC "usedefaulttypes='" + usedefaulttypes + "'" ! VMS-specific
6461 $ WC "usecrosscompile='undef'"
6462 $ WC "usedl='" + usedl + "'"
6463 $ WC "usefaststdio='" + usefaststdio + "'"
6464 $ WC "useieee='" + useieee + "'" ! VMS-specific
6465 $ WC "useithreads='" + useithreads + "'"
6466 $ WC "usekernelthreads='" + usekernelthreads + "'" ! VMS-specific
6467 $ WC "uselargefiles='" + uselargefiles + "'"
6468 $ WC "uselongdouble='" + uselongdouble + "'"
6469 $ WC "usemorebits='" + usemorebits + "'"
6470 $ WC "usemultiplicity='" + usemultiplicity + "'"
6471 $ WC "usemymalloc='" + usemymalloc + "'"
6472 $ WC "useperlio='" + useperlio + "'"
6473 $ WC "useposix='false'"
6474 $ WC "usereentrant='undef'"
6475 $ WC "userelocatableinc='undef'"
6476 $ WC "usesecurelog='" + usesecurelog + "'" ! VMS-specific
6477 $ WC "useshrplib='true'"
6478 $ WC "usesitecustomize='" + usesitecustomize + "'"
6479 $ WC "usesocks='undef'"
6480 $ WC "usethreads='" + usethreads + "'"
6481 $ WC "usethreadupcalls='" + usethreadupcalls + "'" ! VMS-specific
6482 $ WC "usevendorprefix='" + "'" ! try to say no, though we'll be ignored as of MM 5.90_01
6483 $ WC "usevfork='true'"
6484 $ WC "usevmsdebug='" + usevmsdebug + "'" ! VMS-specific
6485 $ WC "uvoformat='" + uvoformat + "'"
6486 $ WC "uvsize='" + uvsize + "'"
6487 $ WC "uvtype='" + uvtype + "'"
6488 $ WC "uvuformat='" + uvuformat + "'"
6489 $ WC "uvxformat='" + uvxformat + "'"
6490 $ WC "uvXUformat='" + uvXUformat + "'"
6491 $ WC "vendorarch='" + "'"
6492 $ WC "vendorarchexp='" + "'"
6493 $ WC "vendorbin='" + "'"
6494 $ WC "vendorbinexp='" + "'"
6495 $ WC "vendorlib_stem='" + "'"
6496 $ WC "vendorlib='" + "'"
6497 $ WC "vendorlibexp='" + "'"
6498 $ WC "vendorprefix='" + "'"
6499 $ WC "vendorprefixexp='" + "'"
6500 $ WC "version='" + version + "'"
6501 $ WC "version_patchlevel_string='" + version_patchlevel_string + "'"
6502 $ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific
6503 $ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific
6504 $ WC "vms_ver='" + vms_ver + "'" ! VMS specific
6505 $ WC "voidflags='15'"
6507 $! ## The UNIXy POSIXy reentrantey thingys ##
6508 $! See "Appendix B, Version-Dependency Tables" in the C RTL
6509 $! manual for when assorted _r functions became available.
6511 $ IF use_threads .AND. vms_ver .GES. "7.2"
6513 $ WC "asctime_r_proto='REENTRANT_PROTO_B_SB'"
6514 $ WC "d_asctime_r='define'"
6515 $ WC "ctime_r_proto='REENTRANT_PROTO_B_SB'"
6516 $ WC "d_ctime_r='define'"
6518 $ WC "asctime_r_proto='0'"
6519 $ WC "d_asctime_r='undef'"
6520 $ WC "ctime_r_proto='0'"
6521 $ WC "d_ctime_r='undef'"
6523 $ WC "d_crypt_r='undef'"
6524 $ WC "d_ctermid_r='undef'"
6525 $ WC "d_drand48_r='undef'"
6526 $ WC "d_endgrent_r='undef'"
6527 $ WC "d_endhostent_r='undef'"
6528 $ WC "d_endnetent_r='undef'"
6529 $ WC "d_endprotoent_r='undef'"
6530 $ WC "d_endpwent_r='undef'"
6531 $ WC "d_endservent_r='undef'"
6532 $ WC "d_getgrent_r='undef'"
6533 $ WC "d_getgrgid_r='" + d_getgrgid_r + "'"
6534 $ WC "d_getgrnam_r='" + d_getgrnam_r + "'"
6535 $ WC "d_gethostbyaddr_r='undef'"
6536 $ WC "d_gethostbyname_r='undef'"
6537 $ WC "d_gethostent_r='undef'"
6538 $ WC "d_getlogin_r='undef'"
6539 $ WC "d_getnetbyaddr_r='undef'"
6540 $ WC "d_getnetbyname_r='undef'"
6541 $ WC "d_getnetent_r='undef'"
6542 $ WC "d_getprotobyname_r='undef'"
6543 $ WC "d_getprotobynumber_r='undef'"
6544 $ WC "d_getprotoent_r='undef'"
6545 $ WC "d_getpwent_r='undef'"
6546 $ WC "d_getpwnam_r='" + d_getpwnam_r + "'"
6547 $ WC "d_getpwuid_r='" + d_getpwuid_r + "'"
6548 $ WC "d_getservbyname_r='undef'"
6549 $ WC "d_getservbyport_r='undef'"
6550 $ WC "d_getservent_r='undef'"
6551 $ WC "d_getspnam_r='undef'"
6552 $ WC "d_gmtime_r='undef'" ! leave undef'd; we use my_gmtime
6553 $ WC "d_localtime_r='undef'" ! leave undef'd; we use my_localtime
6554 $ WC "d_localtime_r_needs_tzset='undef'"
6555 $ WC "d_random_r='undef'"
6556 $ WC "d_readdir_r='define'" ! always defined; we roll our own
6557 $ WC "d_readdir64_r='undef'"
6558 $ WC "d_setgrent_r='undef'"
6559 $ WC "d_sethostent_r='undef'"
6560 $ WC "d_setlocale_r='undef'"
6561 $ WC "d_setnetent_r='undef'"
6562 $ WC "d_setprotoent_r='undef'"
6563 $ WC "d_setpwent_r='undef'"
6564 $ WC "d_setservent_r='undef'"
6565 $ WC "d_snprintf='" + d_snprintf + "'"
6566 $ WC "d_srand48_r='undef'"
6567 $ WC "d_srandom_r='undef'"
6568 $ WC "d_strerror_r='undef'"
6569 $ WC "d_tmpnam_r='undef'"
6570 $ WC "d_ttyname_r='" + d_ttyname_r + "'"
6571 $ WC "ctermid_r_proto='0'"
6572 $ WC "crypt_r_proto='0'"
6573 $ WC "drand48_r_proto='0'"
6574 $ WC "endgrent_r_proto='0'"
6575 $ WC "endhostent_r_proto='0'"
6576 $ WC "endnetent_r_proto='0'"
6577 $ WC "endprotoent_r_proto='0'"
6578 $ WC "endpwent_r_proto='0'"
6579 $ WC "endservent_r_proto='0'"
6580 $ WC "getgrent_r_proto='0'"
6581 $ WC "getgrgid_r_proto='" + getgrgid_r_proto + "'"
6582 $ WC "getgrnam_r_proto='" + getgrnam_r_proto + "'"
6583 $ WC "gethostbyaddr_r_proto='0'"
6584 $ WC "gethostbyname_r_proto='0'"
6585 $ WC "gethostent_r_proto='0'"
6586 $ WC "getlogin_r_proto='0'"
6587 $ WC "getnetbyaddr_r_proto='0'"
6588 $ WC "getnetbyname_r_proto='0'"
6589 $ WC "getnetent_r_proto='0'"
6590 $ WC "getprotobyname_r_proto='0'"
6591 $ WC "getprotobynumber_r_proto='0'"
6592 $ WC "getprotoent_r_proto='0'"
6593 $ WC "getpwent_r_proto='0'"
6594 $ WC "getpwnam_r_proto='0'"
6595 $ WC "getpwuid_r_proto='0'"
6596 $ WC "getservbyname_r_proto='0'"
6597 $ WC "getservbyport_r_proto='0'"
6598 $ WC "getservent_r_proto='0'"
6599 $ WC "getspnam_r_proto='0'"
6600 $ WC "gmtime_r_proto='0'"
6601 $ WC "localtime_r_proto='0'"
6602 $ WC "random_r_proto='0'"
6603 $ WC "readdir_r_proto='REENTRANT_PROTO_I_TSR'" ! always defined; we roll our own
6604 $ WC "readdir64_r_proto='0'"
6605 $ WC "setgrent_r_proto='0'"
6606 $ WC "sethostent_r_proto='0'"
6607 $ WC "setlocale_r_proto='0'"
6608 $ WC "setnetent_r_proto='0'"
6609 $ WC "setprotoent_r_proto='0'"
6610 $ WC "setpwent_r_proto='0'"
6611 $ WC "setservent_r_proto='0'"
6612 $ WC "srand48_r_proto='0'"
6613 $ WC "srandom_r_proto='0'"
6614 $ WC "strerror_r_proto='0'"
6615 $ WC "tmpnam_r_proto='0'"
6616 $ WC "ttyname_r_proto='" + ttyname_r_proto + "'"
6618 $! ##END WRITE NEW CONSTANTS HERE##
6622 $! Okay, we've gotten here. Build munchconfig.exe
6623 $ COPY/NOLOG [-.vms]munchconfig.c []
6624 $ COPY/NOLOG [-.vms]'Makefile_SH' []
6625 $ 'Perl_CC' munchconfig.c
6628 $ OPEN/WRITE CONFIG []munchconfig.opt
6629 $ IF ccname .EQS. "GCC"
6631 $ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library"
6633 $ WRITE CONFIG "Sys$Share:VAXCRTL/Share"
6635 $ 'ld' munchconfig.obj,munchconfig.opt/opt
6636 $ DELETE/NOLOG/NOCONFIRM munchconfig.opt;
6638 $ 'ld' munchconfig.obj
6640 $ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj;
6641 $ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
6642 $ IF ccname .EQS. "CXX"
6644 $ CALL Cxx_demangler_cleanup
6647 $ IF alldone .EQS. ""
6652 If you'd like to make any changes to the config.sh file before I begin
6653 to configure things, answer yes to the following question.
6657 $ rp="Do you wish to edit ''basename_config_sh'? [''bool_dflt'] "
6662 $ echo4 "Be sure to type LOGOUT after you have edited the file,"
6663 $ echo4 "then this procedure will resume."
6665 $ default = F$ENVIRONMENT("DEFAULT")
6666 $ DIRECTORY 'config_sh'
6669 $ SET DEFAULT 'default'
6674 $ echo4 "Adding ''osname' specific preprocessor commands."
6676 $ ! we need an fdl file
6677 $ CREATE [-]CONFIG.FDL
6682 $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
6683 $ ! First spit out the header info with the local defines (to get
6684 $ ! around the 255 character command line limit)
6685 $ OPEN/APPEND CONFIG [-]config.local
6686 $ IF use_debugging_perl THEN WC "#define DEBUGGING"
6687 $ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
6688 $ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
6689 $ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
6690 $ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
6691 $ IF ccname .EQS. "GCC" THEN WC "#define GNUC_ATTRIBUTE_CHECK"
6692 $ IF (Has_Dec_C_Sockets)
6694 $ WC "#define VMS_DO_SOCKETS"
6695 $ WC "#define DECCRTL_SOCKETS"
6697 $ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS"
6699 $! This is VMS-specific for now
6700 $ WC "#''d_setenv' HAS_SETENV"
6701 $ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
6702 $ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
6703 $ IF use64bitint .OR. use64bitint .EQS. "define"
6705 $ WC "#define USE_64_BIT_INT"
6706 $ WC "#define USE_LONG_DOUBLE"
6708 $ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
6709 WC "#define USE_64_BIT_ALL"
6710 $ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
6711 $ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
6712 $ WC "#define HAS_ENVGETENV"
6713 $ WC "#define PERL_EXTERNAL_GLOB"
6714 $ IF archname .EQS. "VMS_VAX" .AND. -
6715 ccname .EQS. "DEC" .AND. -
6716 ccversion .LE. 50390006
6718 $! Alas this does not help to build Fcntl
6719 $! WC "#define PERL_IGNORE_FPUSIG SIGFPE"
6721 $ IF kill_by_sigprc .EQS. "define" then WC "#define KILL_BY_SIGPRC"
6722 $ IF usedecterm .OR. usedecterm .EQS. "define" then WC "#define USE_VMS_DECTERM"
6723 $ IF unlink_all_versions .OR. unlink_all_versions .EQS. "define" THEN -
6724 WC "#define UNLINK_ALL_VERSIONS"
6727 $ echo4 "Doing variable substitutions on .SH files..."
6728 $ echo4 "Extracting config.h (with variable substitutions)"
6730 $! Now build the normal config.h
6731 $ DEFINE/USER_MODE sys$output [-]config.main
6732 $ mcr []munchconfig 'config_sh' [-]config_h.sh
6733 $ ! Concatenate them together
6734 $ copy [-]config.local,[-]config.main [-]config.h
6736 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.MAIN;*
6737 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.LOCAL;*
6738 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;*
6740 $ IF ccname .EQS. "DEC"
6742 $ DECC_REPLACE = "DECC=decc=1"
6744 $ DECC_REPLACE = "DECC="
6746 $ IF ccname .EQS. "CXX"
6748 $ DECCXX_REPLACE = "DECCXX=DECCXX=1"
6750 $ DECCXX_REPLACE = "DECCXX="
6752 $ IF ccname .EQS. "GCC"
6754 $ GNUC_REPLACE = "GNUC=gnuc=1"
6756 $ GNUC_REPLACE = "GNUC="
6758 $ IF Has_Dec_C_Sockets
6760 $ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
6764 $ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
6766 $ SOCKET_REPLACE = "SOCKET="
6771 $ IF (vms_ver .LES. "6.2")
6773 $ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
6775 $ THREAD_REPLACE = "THREAD=THREADED=1"
6778 $ THREAD_REPLACE = "THREAD="
6782 $ MALLOC_REPLACE = "MALLOC=MALLOC=1"
6784 $ MALLOC_REPLACE = "MALLOC="
6786 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
6788 $ IF usestdstat .or. usestdstat .eqs. "define"
6790 $ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_USE_STD_STAT=1"
6792 $ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_LARGEFILE=1"
6795 $ LARGEFILE_REPLACE = "LARGEFILE="
6797 $ IF usedecterm .OR. usedecterm .EQS. "define"
6799 $ IF F$SEARCH("SYS$SHARE:DECW$TERMINALSHR12.EXE") .nes. ""
6801 $ DECTERM_REPLACE = "DECTERMLIB=DECTERMLIB=DECW$TERMINALSHR12/SHARE"
6803 $ DECTERM_REPLACE = "DECTERMLIB=DECTERMLIB=DECW$TERMINALSHR/SHARE"
6806 $ DECTERM_REPLACE = "DECTERMLIB=DECTERMLIB="
6809 $! In order not to stress the tiny command buffer on pre-7.3-2 systems,
6810 $! we put the following substitutions in a file and pass the file to
6813 $ open/write CONFIG extra_subs.txt
6814 $ WC := write CONFIG
6815 $ WC "''DECC_REPLACE'"
6816 $ WC "''DECCXX_REPLACE'"
6818 $ WC "''GNUC_REPLACE'"
6819 $ WC "''SOCKET_REPLACE'"
6820 $ WC "''THREAD_REPLACE'"
6821 $ WC "''C_Compiler_Replace'"
6822 $ WC "''MALLOC_REPLACE'"
6823 $ WC "''THREAD_UPCALLS'"
6824 $ WC "''THREAD_KERNEL'"
6825 $ WC "PV=''version'"
6826 $ WC "FLAGS=FLAGS=''extra_flags'"
6827 $ WC "''LARGEFILE_REPLACE'"
6828 $ WC "''DECTERM_REPLACE'"
6831 $ echo4 "Extracting ''defmakefile' (with variable substitutions)"
6832 $ DEFINE/USER_MODE sys$output 'UUmakefile'
6833 $ mcr []munchconfig 'config_sh' 'Makefile_SH' -f extra_subs.txt
6834 $! Clean up after ourselves
6835 $ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
6836 $ DELETE/NOLOG/NOCONFIRM []extra_subs.txt;
6838 $ echo4 "Extracting make_ext.com (without variable substitutions)"
6839 $ Create Sys$Disk:[-]make_ext.com
6840 $ Deck/Dollar="$EndOfTpl$"
6842 $! NOTE: This file is extracted as part of the VMS configuration process.
6843 $! Any changes made to it directly will be lost. If you need to make any
6844 $! changes, please edit the template in Configure.Com instead.
6845 $ mydefault = F$Environment("Default")
6846 $! p1 - how to invoke miniperl (passed in from descrip.mms)
6847 $ p1 = F$Edit(p1,"Upcase,Compress,Trim")
6848 $ If F$Locate("MCR ",p1).eq.0 Then p1 = F$Extract(3,255,p1)
6849 $ miniperl = "$" + F$Search(F$Parse(p1,".Exe"))
6850 $! p2 - how to invoke local make utility (passed in from descrip.mms)
6852 $ if f$type('p2') .nes. "" then makeutil = 'p2'
6853 $! p3 - make target (passed in from descrip.mms)
6854 $ targ = F$Edit(p3,"Lowercase")
6857 $ open/read CONFIG config.sh
6859 $ read/end=end_ext_loop CONFIG line
6860 $ if (f$extract(0,12,line) .NES. "extensions='")
6861 $ then goto find_ext_loop
6862 $ else extensions = f$extract(12,f$length(line),line) - "'"
6866 $ extensions = f$edit(extensions,"TRIM,COMPRESS")
6869 $ ext = f$element(i," ",extensions)
6870 $ If ext .eqs. " " .or. ext .eqs. "" Then Goto done
6871 $ Define/User_mode Perl_Env_Tables CLISYM_LOCAL
6874 ($extdir = $ENV{'ext'}) =~ s/::/./g;
6876 if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
6877 else { $extdir = ".ext.$extdir"; }
6878 ($ENV{'extdir'} = "[$extdir]");
6879 ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
6881 $ Set Default &extdir
6883 $ If F$Locate("clean",targ) .eqs. F$Length(targ)
6885 $ Write Sys$Output ""
6886 $ Write Sys$Output " Making ''ext' (dynamic)"
6887 $ On Error Then Goto done
6888 $ If F$Search("Descrip.MMS") .eqs. ""
6892 $ If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. -
6893 F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1
6896 $ Write Sys$Output "''targ'ing ''ext' . . ."
6897 $ On Error Then Continue
6900 miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]" "PERL_CORE=1"
6903 $ Set Def &mydefault
6912 $! Note that the /key qualifier to search, as in:
6913 $! search README.* "=head"/key=(position=1)/window=0/output=extra.pods
6914 $! is not supported on VMS V5.5-2, hence not used in extra_pods.com.
6916 $ echo4 "Extracting extra_pods.com (without variable substitutions)"
6917 $ Create Sys$Disk:[-]extra_pods.com
6918 $ Deck/Dollar="$EOExtra_Pods$"
6920 $! NOTE: This file is extracted as part of the VMS configuration process.
6921 $! Any changes made to it directly will be lost. If you need to make any
6922 $! changes, please edit the template in Configure.Com instead.
6923 $! Use FORCE if you've just podified a README.* file on VMS.
6924 $ if f$search("extra.pods") .eqs. "" .or. P1 .eqs. "FORCE" then -
6925 search README.* "=head"/window=0/output=extra.pods
6926 $ open/read/error=extra_close EXTRA extra.pods
6928 $ read/error=extra_close/END_OF_FILE=extra_close EXTRA file
6929 $ file_type = f$edit(f$parse(file,,,"TYPE",),"LOWERCASE") - "."
6930 $ if file_type .nes. "VMS" .and. file_type .nes. "vms"
6932 $ pod_file = "[.pod]perl''file_type'.pod"
6933 $ file = file - "''f$parse(file,,,"VERSION",)'"
6934 $ if p1 .eqs. "CLEAN"
6935 $ then if f$search(pod_file) .nes. "" then delete/log 'pod_file';*
6938 $ if f$search(pod_file) .eqs. ""
6939 $ then do_copy := true
6941 $ file_rdt = f$cvtime(f$file_attributes(file,"RDT"))
6942 $ pod_file_rdt = f$cvtime(f$file_attributes(pod_file,"RDT"))
6943 $ if file_rdt .GTS. pod_file_rdt then do_copy := true
6945 $ ! wacky method to preserve case on ODS-5 even when parse style is traditional
6946 $ if do_copy then mcr sys$disk:[]miniperl.exe -e "exit 0+$^E unless File::Copy::rmscopy(q{''file'}, q{''pod_file'});"
6952 $ if p1 .eqs. "CLEAN" .and. f$search("extra.pods;-1") .nes. "" then -
6953 purge/nolog extra.pods
6957 $! Warn of dangerous symbols or logical names
6959 $Bad_environment: SUBROUTINE
6961 $ IF p2 .eqs. "SYMBOL"
6963 $ IF f$type('p1') .nes. "" THEN Bad_env := SYMBOL
6965 $ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
6967 $ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
6969 $ IF f$search("config.msg") .nes. ""
6971 $ OPEN/APPEND CONFIG config.msg
6973 $ OPEN/WRITE CONFIG config.msg
6975 $ IF Bad_env .eqs. "SYMBOL"
6978 $ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
6979 $ WRITE CONFIG " delete before building ''package' via:"
6980 $ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
6981 $ IF f$locate("""",&p1) .ge. f$length(&p1)
6983 $ WRITE CONFIG " after building, testing, and installing ''package'"
6984 $ WRITE CONFIG " restore the symbol with:"
6985 $ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
6988 $ IF Bad_env .eqs. "LOGICAL"
6991 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
6992 $ WRITE CONFIG " deassign before building ''package'"
6998 $ ENDSUBROUTINE ! Bad_environment
7000 $ echo4 "Checking for dangerous pre-existing global symbols and logical names."
7001 $ CALL Bad_environment "COMP"
7002 $ CALL Bad_environment "EXT"
7003 $ CALL Bad_environment "FOO"
7004 $ CALL Bad_environment "LIB"
7005 $ CALL Bad_environment "LIST"
7006 $ CALL Bad_environment "MIME"
7007 $ CALL Bad_environment "POSIX"
7008 $ CALL Bad_environment "SYS"
7009 $ CALL Bad_environment "T"
7010 $ CALL Bad_environment "THREAD"
7011 $ CALL Bad_environment "THREADS"
7012 $ CALL Bad_environment "TIME"
7013 $ CALL Bad_environment "TMP"
7014 $ CALL Bad_environment "UNICODE"
7015 $ CALL Bad_environment "UTIL"
7016 $ CALL Bad_environment "TEST" "SYMBOL"
7017 $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
7019 $! %Config-I-VMS, write perl_setup.com here
7021 $ IF (.NOT.perl_symbol)
7023 $ file_2_find = "[-]''packageup'.cld"
7025 $ echo4 "The perl.cld file is now being written..."
7026 $ OPEN/WRITE CONFIG 'file_2_find'
7028 $ IF (sharedperl .AND. F$EXTRACT(0,7,archname) .EQS. "VMS_AXP") THEN ext := .AXE
7029 $ IF (sharedperl .AND. F$EXTRACT(0,8,archname) .EQS. "VMS_IA64") THEN ext := .IXE
7030 $ IF (use_vmsdebug_perl)
7032 $ WRITE CONFIG "define verb dbgperl"
7033 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
7034 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7036 $ WRITE CONFIG "define verb perl"
7037 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
7038 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7040 $ WRITE CONFIG "define verb perl"
7041 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
7042 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7045 $ ENDIF ! (.NOT.perl_symbol)
7047 $ echo4 "The perl_setup.com file is now being written..."
7048 $ file_2_find = "[-]perl_setup.com"
7050 $! Folks are likely to want to edit perl_setup.com.
7051 $! STMLF RFM plays nicer with ported editors than does VFC.
7053 $ CREATE [-]CONFIG.FDL
7058 $ CREATE /FDL=[-]CONFIG.FDL 'file_2_find'
7059 $ OPEN/APPEND CONFIG 'file_2_find'
7060 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;
7062 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
7063 $ IF cf_email.NES.perladmin
7065 $ WRITE CONFIG "$! perl configured by ''cf_email'"
7067 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
7070 $! HP hack to make distributing binaries easier
7071 $!----------------------------------------------
7072 $ pcsi_producer = f$trnlnm("PCSI_PRODUCER")
7073 $ if pcsi_producer .eqs. ""
7075 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'"
7077 $ WRITE CONFIG "$ myproc = f$environment(""PROCEDURE"")"
7078 $ WRITE CONFIG "$ myroot_dev = f$parse(myproc,,,""DEVICE"",""NO_CONCEAL"")"
7079 $ WRITE CONFIG "$ myroot_dir = f$parse(myproc,,,""DIRECTORY"",""NO_CONCEAL"")"
7080 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000."" - ""><000000."""
7081 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000]"" - ""><000000>"""
7082 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""]["" - ""><"""
7083 $ WRITE CONFIG "$ myroot_dir = myroot_dir - "".]"" - "".>"" - ""["" - ""]"" - ""<"" - "">"""
7084 $ WRITE CONFIG "$ if f$trnlnm(""HP_BUILD_PERL_BIN_KIT"",""LNM$PROCESS_TABLE"") .EQS. """""
7085 $ WRITE CONFIG "$ then"
7086 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' 'myroot_dev'['myroot_dir'.]"
7087 $ WRITE CONFIG "$ endif"
7089 $ WRITE CONFIG "$ ext = "".exe"""
7092 $ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 2 then ext = "".AXE"""
7093 $ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 3 then ext = "".IXE"""
7097 $ perl_setup_perl = "'" + "'perl'" ! triple quoted foreign command symbol
7098 $ IF (use_vmsdebug_perl)
7100 $ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgperl'ext'"
7101 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgperl'ext'"
7102 $ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
7104 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
7105 $ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
7107 $ ELSE ! .NOT.perl_symbol
7108 $ perl_setup_perl = "perl" ! command verb
7109 $ IF (use_vmsdebug_perl)
7111 $ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
7113 $ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
7115 $ IF perl_verb .EQS. "PROCESS"
7117 $ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
7119 $ ENDIF ! perl_symbol
7123 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
7124 $ ELSE !leave in but commented out (in case setting was from perl :-)
7125 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
7128 $ WRITE CONFIG "$! Symbols for commonly used programs:"
7130 $ WRITE CONFIG "$ c2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]c2ph.com"""
7131 $ WRITE CONFIG "$ cpan == """ + perl_setup_perl + " ''vms_prefix':[utils]cpan.com"""
7132 $ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
7134 $ WRITE CONFIG "$ dprofpp == """ + perl_setup_perl + " ''vms_prefix':[utils]dprofpp.com"""
7136 $ WRITE CONFIG "$ enc2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]enc2xs.com"""
7137 $ WRITE CONFIG "$ find2perl == """ + perl_setup_perl + " ''vms_prefix':[utils]find2perl.com"""
7138 $ WRITE CONFIG "$ h2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]h2ph.com"""
7139 $ WRITE CONFIG "$ h2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]h2xs.com"""
7140 $ WRITE CONFIG "$ instmodsh == """ + perl_setup_perl + " ''vms_prefix':[utils]instmodsh.com"""
7141 $ WRITE CONFIG "$ libnetcfg == """ + perl_setup_perl + " ''vms_prefix':[utils]libnetcfg.com"""
7142 $ WRITE CONFIG "$ perlbug == """ + perl_setup_perl + " ''vms_prefix':[utils]perlbug.com"""
7143 $ WRITE CONFIG "$ perldoc == """ + perl_setup_perl + " ''vms_prefix':[utils]perldoc.com """"-t"""""""
7144 $ WRITE CONFIG "$ perlivp == """ + perl_setup_perl + " ''vms_prefix':[utils]perlivp.com"""
7145 $ WRITE CONFIG "$ piconv == """ + perl_setup_perl + " ''vms_prefix':[utils]piconv.com"""
7146 $ WRITE CONFIG "$ pl2pm == """ + perl_setup_perl + " ''vms_prefix':[utils]pl2pm.com"""
7147 $ WRITE CONFIG "$ pod2html == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2html.com"""
7148 $ WRITE CONFIG "$ pod2latex == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2latex.com"""
7149 $ WRITE CONFIG "$ pod2text == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2text.com"""
7150 $ WRITE CONFIG "$!pod2man == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2man.com"""
7151 $ WRITE CONFIG "$ pod2usage == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2usage.com"""
7152 $ WRITE CONFIG "$ podchecker == """ + perl_setup_perl + " ''vms_prefix':[utils]podchecker.com"""
7153 $ WRITE CONFIG "$ podselect == """ + perl_setup_perl + " ''vms_prefix':[utils]podselect.com"""
7154 $ WRITE CONFIG "$ prove == """ + perl_setup_perl + " ''vms_prefix':[utils]prove.com"""
7155 $ WRITE CONFIG "$ psed == """ + perl_setup_perl + " ''vms_prefix':[utils]psed.com"""
7156 $ WRITE CONFIG "$ pstruct == """ + perl_setup_perl + " ''vms_prefix':[utils]pstruct.com"""
7157 $ WRITE CONFIG "$ s2p == """ + perl_setup_perl + " ''vms_prefix':[utils]s2p.com"""
7158 $ WRITE CONFIG "$ splain == """ + perl_setup_perl + " ''vms_prefix':[utils]splain.com"""
7159 $ WRITE CONFIG "$ xsubpp == """ + perl_setup_perl + " ''vms_prefix':[utils]xsubpp.com"""
7163 $ echo "The file can be found at:"
7164 $ echo4 " ''F$SEARCH(file_2_find)'"
7165 $ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
7166 $ echo "when you are satisfied with a successful compilation,"
7167 $ echo "testing, and installation of your perl."
7169 $ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
7171 $ file_2_find = "[-]''packageup'_install.com"
7172 $ OPEN/WRITE CONFIG 'file_2_find'
7173 $ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
7174 $ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
7175 $ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
7178 $ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
7179 $ echo4 " @ ''F$SEARCH(file_2_find)'"
7180 $ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
7184 $!figure out where we "are" by parsing 'vms_default_directory_name'
7186 $ set_def_command = ""
7187 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
7188 $ tmp = vms_default_directory_name - dflt - "]"
7190 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
7192 $ tmp1 = F$ELEMENT(i,".",tmp)
7193 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
7195 $ THEN set_def_command = "set default [-"
7196 $ ELSE set_def_command = set_def_command + "-"
7200 $Beyond_set_def_loop:
7201 $ IF set_def_command.NES.""
7203 $ set_def_command = set_def_command - "-" + "]"
7205 $ echo4 "In order to build ''package' you must now issue the commands:"
7207 $ echo4 " ''set_def_command'"
7210 $ echo4 "In order to build ''package' you must now issue the command:"
7213 $ echo4 " ''make'''makefile'", macros
7216 $ IF ( F$SEARCH("config.msg").NES."" )
7218 $ echo4 "Hmm. I also noted the following information while running:"
7220 $ TYPE/OUTPUT=SYS$ERROR: config.msg
7221 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
7222 $ DELETE/NOLOG/NOCONFIRM config.msg;
7229 $ CLOSE/NOLOG STDOUT
7230 $ DEASSIGN SYS$OUTPUT
7232 $ CLOSE/NOLOG CONFIG
7233 $ IF F$GETJPI("","FILCNT").GT.vms_filcnt
7234 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
7236 $ dflt = F$ENVIRONMENT("DEFAULT")
7237 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
7239 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
7241 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
7242 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
7244 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
7246 $!: End of Configure