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 $ shorten_long_symbols = "y"
48 $ unlink_all_versions = "n"
50 $ 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"
68 $ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
69 $ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx]
70 $! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx]
72 $! Sebastian Bazley's request: close the CONFIG handle with /NOLOG
73 $! qualifier "just in case" (configure.com is re @ed in a bad state).
74 $! This construct was tested to be not a problem as far back as
75 $! VMS V5.5-2, hopefully earlier versions are OK as well.
79 $! Now keep track of open files
81 $ vms_filcnt = F$GETJPI ("","FILCNT")
83 $!: compute my invocation name
84 $ me = F$ENVIRONMENT("PROCEDURE")
86 $! Many null statements (begin with colon ':') in the Bourne shell version of
87 $! this script serve as comments/placeholders. I have retained some of the ones
88 $! that will help you compare this .COM file to the sh version - as well as
89 $! leave placeholders for future improvements to this .COM file.
90 $! sfn = VMS "skipped for now"
92 $!: Proper PATH separator !sfn
93 $!: Proper PATH setting !sfn
94 $!: Sanity checks !sfn "Say '@''$me''"
95 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
96 $!: Configure runs within the UU subdirectory !->after find MANIFEST
97 $! <big long list of default values (mostly null)>
98 $!: We must find out about Eunice early !(?)
99 $!: list of known cpp symbols, sorted alphabetically !sfn
101 $!: default library list !sfn
102 $! <no hints files in use (yet?)>
103 $!: Extra object files, if any, needed on this platform. !sfn
104 $!: Possible local include directories to search. !sfn
105 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
106 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
107 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
108 $!: no include file wanted by default !sfn
110 $!: Possible local library directories to search. !sfn
111 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
112 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
113 $!: general looking path for locating libraries !sfn
114 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
115 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
116 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
117 $!: Private path used by Configure to find libraries. Its value !sfn
118 $!: is prepended to libpth. This variable takes care of special !sfn
119 $!: machines, like the mips. Usually, it should be empty. !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 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 $ x = F$GETQUI("CANCEL_OPERATION") ! clear the deck
374 $ bproc_queue = f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*",x)
375 $ bproc_entry = f$getqui("DISPLAY_JOB","ENTRY_NUMBER",,x)
376 $ bproc_name = f$getqui("DISPLAY_JOB","JOB_NAME",,x)
377 $ bproc_log_spec = f$getqui("DISPLAY_JOB","LOG_SPECIFICATION",,x)
378 $ STDOUT = F$PARSE(bproc_name, bproc_log_spec, ".LOG")
379 $ WRITE SYS$OUTPUT "Writing output of entry ''bproc_entry' in queue ''bproc_queue' to a new version of: "
380 $ WRITE SYS$OUTPUT STDOUT
382 $ DELETE_/SYMBOL bproc_queue
383 $ DELETE_/SYMBOL bproc_entry
384 $ DELETE_/SYMBOL bproc_name
385 $ DELETE_/SYMBOL bproc_log_spec
387 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
389 $ DEFINE SYS$OUTPUT "_NLA0:"
390 $ echo4 = "write STDOUT "
391 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
392 $ open/write/share=read STDOUT 'STDOUT'
400 $ echo4 = "write SYS$OUTPUT "
404 $!: run the defines and the undefines, if any, but leave the file out there...
405 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
410 $ packageup = F$EDIT((package - "5"),"UPCASE")
412 $!: Eunice requires " " instead of "", can you believe it
415 $ echo "Beginning of configuration questions for ''package'."
418 $!: Some greps do not return status, grrr.
419 $ contains = "SEARCH"
421 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
422 $! echo "Checking ''echo' to see how to suppress newlines..."
423 $! echo "giving up..."
424 $! echo "The star should be here-->*"
426 $!: Now test for existence of everything in MANIFEST
428 $ echo4 "First let's make sure your kit is complete. Checking..."
431 $! Here I assume we are in the [foo.PERLxxx...] tree
432 $! because the search routine simply does set def [-] if necessary.
433 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
435 $ manifestfound = F$SEARCH(file_2_find)
436 $ IF (manifestfound .EQS. "")
438 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
441 $ GOTO Research_manifest
444 $ echo "There is no MANIFEST file. I hope your kit is complete !"
446 $ GOTO Beyond_manifest
449 $! MANIFEST. has been found and we have set def'ed there.
450 $! Time to bail out before it's too late, i.e. too deep.
451 $! Depth check is unnecessary on Alpha VMS V7.2++ (even for ODS-2).
452 $ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
453 $ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
454 $! Depth check also unnecessary on ODS 5 (or later) file systems.
455 $ tmp = F$INTEGER(F$GETDVI(F$ENVIRONMENT("DEFAULT"),"ACPTYPE") - "F11V")
456 $ IF (tmp .GE. 5) THEN GOTO Beyond_depth_check
457 $ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("DEFAULT")).nes.".")
461 %Config-E-VMS, ERROR:
462 Sorry! It apears as though your perl build sub-directory is already too
463 deep into the VMS file system. Please try moving stuff into a shallower
464 directory (or altering the "max_allowed_dir_depth" parameter).
466 $ echo4 "ABORTING..."
467 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
469 $ EXIT !2 !$STATUS = "%X00000002" (error)
473 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
475 $ IF (manifestfound .NES. "")
477 $ IF ( F$SEARCH("UU.DIR").EQS."" )
479 $ CREATE/DIRECTORY [.UU]
481 $ IF ( F$SEARCH("[.UU.CXX_REPOSITORY]*.*").NES."" )
483 $ DELETE/NOLOG/NOCONFIRM [.UU.CXX_REPOSITORY]*.*;*
484 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) [.UU]CXX_REPOSITORY.DIR
486 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM [.UU]*.*;*
488 $!: Configure runs within the UU subdirectory
491 $! a little redundancy never hurt anybody?
492 $ file_2_find = "[-]" + file_2_find
493 $ manifestfound = F$SEARCH(file_2_find)
495 $ OPEN/WRITE MISSING MISSING.
496 $!change to "FALSE" if you wish to skip the manifest search
497 $!(which after all is rather slow in DCL :-)
500 $ echo "Skipping MANIFEST check as requested"
503 $ OPEN/READ CONFIG 'manifestfound'
505 $ READ/END_OF_FILE = Done_manifest CONFIG line
506 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
507 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
508 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
509 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
510 $ line = F$EDIT(line,"TRIM, COMPRESS")
511 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
512 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
514 $Re_strip_line_manifest:
515 $ loca = F$LOCATE("/",file_2_find)
516 $ ante = F$EXTRACT(0,loca,file_2_find)
517 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
518 $ test_this = ante + "." + (post - "/")
519 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
521 $ file_2_find = ante + "." + (post - "/")
522 $ GOTO Re_strip_line_manifest
524 $ file_2_find = ante + "]" + (post - "/")
526 $ file_2_find = "[-."+file_2_find
528 $ file_2_find = "[-]" + file_2_find
531 $ tmp = F$PARSE(file_2_find + ";",,,,"SYNTAX_ONLY")
532 $ IF F$SEARCH(tmp) .NES. "" THEN file_2_find = tmp
533 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
534 $ file_2_find = file_2_find - dirname
536 $! may not need double dot check on ODS-5 volumes
537 $ found = F$SEARCH(dirname + file_2_find)
538 $ IF found .NES. "" THEN GOTO Read_loop_manifest
542 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
543 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
545 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
546 $ ELSE basename = basename + dot_ele + "_"
551 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
552 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
553 basename = f$extract(0,f$length(basename)-1,basename)
554 $ file_2_find = dirname + basename
556 $ found = F$SEARCH(file_2_find)
557 $ IF (found .EQS. "" .AND. dots .GT. 2)
559 $! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
560 $! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
561 $! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
562 $ dotloc = f$locate(".",basename)
563 $ basename[dotloc,1] := "_"
564 $ dot_ele = F$ELEMENT(dots - 1,"_",f$extract(dotloc,f$length(basename),basename))
566 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
568 $ found = F$SEARCH(dirname + basename)
569 $ file_2_find = file_2_find + "," + basename
571 $ tildeloc = f$locate("~",basename)
572 $ IF (found .EQS. "" .AND. tildeloc .LT. f$length(basename))
574 $ basename[tildeloc,1] := "_"
575 $ found = F$SEARCH(dirname + basename)
576 $ file_2_find = file_2_find + "," + basename
578 $ IF (found .EQS. "")
580 $ WRITE MISSING file_2_find
581 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
583 $ miss_list = miss_list + "," + file_2_find
586 $ GOTO Read_loop_manifest
591 $ ENDIF ! (manifestfound .NES. "")
593 $ IF (miss_list .NES. "")
595 $ echo "Some of the files not found include:"
598 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
604 THIS PACKAGE SEEMS TO BE INCOMPLETE.
606 You have the option of continuing the configuration process, despite the
607 distinct possibility that your kit is damaged, by typing 'y'es. If you
608 do, don't blame me if something goes wrong. I advise you to type 'n'o
609 and contact the author (dan@sidhe.org)
612 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
615 $ echo4 "Continuing..."
617 $ echo4 "ABORTING..."
621 $ echo4 "Looks good..."
622 $ DELETE/NOLOG/NOCONFIRM MISSING.;
623 $ ENDIF ! (miss_list .NES. "")
624 $ ENDIF ! (manifestfound .EQS. "") ELSE
626 $! after finding MANIFEST (see above)
627 $!: Configure runs within the UU subdirectory
629 $!: compute the number of columns on the terminal for proper question formatting
630 $ IF F$MODE() .EQS. "BATCH"
631 $! else it winds up being 512 in batch
633 $ ELSE COLUMNS = F$GETDVI("SYS$OUTPUT","DEVBUFSIZ")
635 $! "-des" sets SYS$OUTPUT to NL: with a DEVBUFSIZ too large (512 again)
636 $ IF COLUMNS .GT. 210 THEN COLUMNS = 80
637 $! not sure if this would actually be needed - it hopefully will not hurt
638 $ IF COLUMNS .LT. 40 THEN COLUMNS = 40
640 $!: set up the echo used in my read !sfn
641 $!: now set up to do reads with possible shell escape and default assignment !sfn
644 $! The sub_rp splitting is intended to handle long symbols such as the dflt for
649 $ len_rp = F$LENGTH(rp)
650 $ If (.NOT. silent) Then echo ""
655 $ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
656 $ i_rp = i_rp + COLUMNS
657 $ if i_rp .LT. len_rp THEN echo4 "''sub_rp'"
658 $ IF i_rp .LT. len_rp THEN GOTO rp_loop
666 $ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
668 $ IF (ans .EQS. "&-d")
670 $ echo4 "(OK, I will run with -d after this question.)"
672 $ deferred_fastread =1
675 $ IF (ans .EQS. "&-s")
677 $ echo4 "(OK, I will run with -s after this question.)"
679 $ deferred_silent = 1
682 $ if (bool_dflt .nes. "")
684 $ if (ans .eqs. "") then ans = bool_dflt
685 $ ans = f$extract(0,1,f$edit(ans,"collapse,upcase"))
686 $ if (ans .eqs. "Y" .or. ans .eqs. "1" .or. ans .eqs. "T")
690 $ if (ans .eqs. "N" .or. ans .eqs. "0" .or. ans .eqs. "F")
694 $ echo4 "Input not understood please answer 'Yes' or 'No'"
700 $ ans = f$edit(ans,"trim,compress")
701 $ if (ans .eqs. "") then ans = dflt
702 $ if (f$edit(ans,"upcase") .eqs. "NONE") then ans = ""
704 $ if f$type(deferred_silent) .nes. ""
708 $ delete/symbol deferred_silent
710 $ if f$type(deferred_fastread) .nes. ""
713 $ delete/symbol deferred_fastread
719 $!: create .config dir to save info across Configure sessions
720 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
722 $ CREATE/DIRECTORY [-.CONFIG]
723 $ OPEN/WRITE CONFIG [-.CONFIG]README.
725 "This directory created by Configure to save information that should"
727 "persist across sessions."
730 "You may safely delete it if you wish."
734 $ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n
735 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
736 $ IF (patchlevel_h.NES."")
738 $ SEARCH 'patchlevel_h' "define","PERL_VERSION","epoch"/match=and/out=[]ver.out
739 $ IF .NOT. usedevel .AND. usedevel .NES. "define"
741 $ OPEN/READ CONFIG []ver.out
744 $ tmp = F$EDIT(line,"TRIM,COMPRESS")
745 $ xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp))
746 $ line = xpatchlevel / 2
747 $ tmp = xpatchlevel - ( line * 2 )
750 $ echo4 "patchlevel is " + F$STRING(xpatchlevel)
753 *** WHOA THERE!!! ***
755 This is an UNSTABLE DEVELOPMENT release.
756 (The patchlevel, is odd--as opposed to even,
757 and that signifies a development release. If you want a
758 maintenance release, you want an even-numbered release.)
760 Do ***NOT*** install this into production use.
761 Data corruption and crashes are possible.
763 It is most seriously suggested that you do not continue any further
764 unless you want to help in developing and debugging Perl.
768 $ rp="Do you really want to continue? [''bool_dflt'] "
769 $ fastread_save = fastread
772 $ fastread = fastread_save
773 $ delete/symbol fastread_save
776 $ echo4 "Okay, continuing."
779 $ DELETE/NOLOG/NOCONFIRM []ver.out;
786 $ DELETE/NOLOG/NOCONFIRM []ver.out;
788 $!: general instructions
791 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
792 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
794 $ messages = F$ENVIRONMENT("MESSAGE")
795 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
796 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
797 $ IF .NOT.($status.EQ.%X08D78053)
801 $ rp = "Would you like to see the instructions? [''bool_dflt'] "
803 $ if .NOT.ans THEN needman=""
805 $ SET MESSAGE 'messages'
807 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
814 This installation shell script will examine your system and ask you questions
815 to determine how the perl5 package should be installed. If you get
816 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
817 process, edit something, then restart this process as you just did.
818 Many of the questions will have default answers in square
819 brackets; typing carriage return will give you the default.
826 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
831 In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
832 the questions and use the computed defaults (or the previous answers provided
833 there was already a config.sh file). Type '@Configure "-h"' for a list of
841 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
846 Much effort has been expended to ensure that this shell script will
847 run on any VMS system. If despite that it blows up on yours, your
848 best bet is to edit Configure.com and @ it again. Whatever problems
849 you have with Configure.com, let me (dan@sidhe.org) know how I blew
853 $!This installation script affects things in two ways:
855 $!1) it may do direct variable substitutions on some of the files included
857 $!2) it builds a config.h file for inclusion in C programs. You may edit
858 $! any of these files as the need arises after running this script.
860 $!If you make a mistake on a question, there is no easy way to back up to it
867 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
869 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
871 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
875 $ ENDIF !(needman .EQS. "true")
877 $!: see if sh knows # comments !sfn
878 $!: figure out how to guarantee sh startup !sfn
879 $!: find out where common programs are !sfn
880 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
881 $!trylist="byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
882 $! echo "I don't know where '$file' is, and my life depends on it."
883 $! echo "Go find a public domain implementation or fix your PATH setting!"
885 $! echo "Don't worry if any of the following aren't found..."
886 $!: determine whether symbolic links are supported !sfn !jem- further down
887 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
888 $!: set up the translation script tr, must be called with ./tr of course !sfn
890 $!: Try to determine whether config.sh was made on this system
891 $!: Get old answers from old config file if Configure was run on the
892 $!: same system, otherwise use the hints.
893 $ config_sh_es = "''config_sh'/[-]config.sh/"
897 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
899 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
901 $ configshfound = F$SEARCH(config_sh)
902 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
904 $ IF (i.LT.max) THEN GOTO Config_sh_look
905 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
906 $ IF (configshfound.EQS."")
908 $ config_sh = "[-]config.sh" ! the fallback default
909 $ GOTO Beyond_config_sh
912 $ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
914 $ IF F$TYPE(config_dflt) .NES. "" THEN bool_dflt = config_dflt
915 $ rp = "Shall I use ''config_sh' for default answers? [''bool_dflt'] "
920 $ echo "Fetching default answers from ''config_sh'..."
922 $! we do our own parsing of the shell-script stuff
923 $! ...and only accept symbols if they're in the | delimited list below
925 $ config_symbols0 ="|archlib|archlibexp|bin|binexp|builddir|cf_email|config_sh|installarchlib|installbin|installman1dir|installman3dir|"
926 $ config_symbols1 ="|installprivlib|installscript|installsitearch|installsitelib|most|oldarchlib|oldarchlibexp|osname|pager|perl_symbol|perl_verb|"
927 $ config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitebin|sitelib|sitelib_stem|sitelibexp|usecxx|use64bitall|use64bitint|"
928 $ config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|uselongdouble|usemultiplicity|usemymalloc|usedebugging_perl|"
929 $ config_symbols4 ="|usesecurelog|usethreads|usevmsdebug|usefaststdio|usemallocwrap|unlink_all_versions|uselargefiles|usesitecustomize|"
930 $ config_symbols5 ="|buildmake|builder|usethreadupcalls|usekernelthreads|useshortenedsymbols|useversionedarchname"
932 $ open/read CONFIG 'config_sh'
934 $ read/end=erd_conf_loop CONFIG line
935 $ line = f$edit(line,"trim")
936 $ if line .eqs. "" .or. f$extract(0,1,line) .eqs. "#" then goto rd_conf_loop
937 $ sym = f$element(0,"=",line)
938 $ if sym .eqs. "=" then goto rd_conf_loop
942 $ syms = config_symbols'k'
943 $ j = f$locate(dsym, syms)
944 $ if j .lt. f$length(syms) then goto erd_ck_loop
946 $ if k .lt. 6 then goto rd_ck_loop
949 $ val = f$element(1,"=",line)
950 $ val = f$extract(1,f$length(val)-2,val)
951 $ write sys$output "''sym' = ""''val'"""
956 $ delete/symbol config_symbols0
957 $ delete/symbol config_symbols1
958 $ delete/symbol config_symbols2
959 $ delete/symbol config_symbols3
960 $ delete/symbol config_symbols4
961 $ delete/symbol config_symbols5
965 $ if f$type(usedebugging_perl) .nes. ""
967 $ DEBUGGING = usedebugging_perl
968 $ delete/symbol usedebugging_perl
972 $ if f$type(config_dflt) .nes. "" then DELETE/SYMBOL config_dflt
974 $!we actually do not have "hints/" for VMS
978 $!First time through, eh? I have some defaults handy for the following systems:
981 $! echo " ","VMS_VAX"
982 $! echo " ","VMS_AXP"
983 $! echo " ","VMS_IA64"
984 $! : Now look for a hint file osname_osvers, unless one has been
985 $! : specified already.
988 $!You may give one or more space-separated answers, or "none" if appropriate.
989 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
991 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
995 $!: Restore computed paths !sfn
997 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
999 $ IF (osname .NES. "VMS")
1001 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
1005 %Config-E-VMS, ERROR:
1007 Err, you do not appear to be running VMS!
1008 This procedure is intended to Configure the building of Perl for VMS.
1015 $ echo4 "Continuing..."
1017 $ echo4 "ABORTING..."
1018 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
1020 $ EXIT 2 !$STATUS = "%X00000002" (error)
1022 $ ENDIF !(osname .NES./.EQS. "VMS")
1024 $!: who configured the system
1025 $ cf_by = F$EDIT(user,"LOWERCASE")
1026 $ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
1028 $! Peter Prymmer has seen:
1029 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
1030 $! "SYS$TIME_ZONE" = "EDT"
1032 $! Charles Lane recommended:
1033 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
1034 $! "NEWS_TIMEZONE" = "-0500"
1035 $! "ST_TIMEZONE" = "EDT"
1036 $! "JAN_TIME_ZONE" = "EST "
1037 $! "MULTINET_TIMEZONE" = "EST"
1038 $! "DAYLIGHT_SAVINGS" = "1"
1040 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
1042 $! "Multinet_Timezone"
1043 $! "TCPware_Timezone"
1046 $! This snippet o' DCL returns a string in default Unix `date` format,
1047 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
1049 $ MIN_TZO = -840 !units are minutes here
1052 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
1053 $ monn = F$CVTIME(,,"MONTH")
1054 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
1055 $ hour = F$CVTIME(,,"HOUR")
1056 $ min = F$CVTIME(,,"MINUTE")
1057 $ sec = F$CVTIME(,,"SECOND")
1058 $ year = F$CVTIME(,,"YEAR")
1060 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
1064 $ mon = F$ELEMENT(i,"/",months)
1065 $ IF i.LT.monn THEN GOTO Mon_loop
1068 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
1071 $ tzhour = F$INTEGER(systz)/3600
1072 $ tzmins = F$INTEGER(systz)/60
1073 $ tzminrem = tzmins - tzhour*60
1074 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
1076 $ THEN signothetime = "+"
1077 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
1078 $ THEN direction = "on GMT/"
1079 $ ELSE direction = "east of "
1081 $ ELSE signothetime = "-"
1082 $ tzhour = -1*tzhour !keeps !UL happy
1083 $ direction = "west of "
1086 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
1089 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
1091 $ tzspan = "''tzhour' hours"
1094 $ echo "Your system is ''tzspan' ''direction'UTC in England."
1095 $ rp = "(''systz') Is this UTC Time Zone Offset correct? [''bool_dflt'] "
1101 $ GOTO Beyond_TimeZone
1105 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
1110 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
1111 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
1112 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
1114 $ rp = "Enter the Time Zone offset: [''dflt'] "
1116 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
1117 $ IF ans.EQS."" THEN ans = dflt
1118 $ tzhour = F$ELEMENT(0,":","''ans'") !first
1119 $ IF tzhour.EQS."" THEN tzhour = 0
1120 $ tzhour = F$INTEGER(tzhour)
1121 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
1122 $ IF tzminrem.NES.""
1124 $ tzminrem = F$INTEGER(tzminrem)
1125 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
1129 $ tzmins = tzhour*60 + tzminrem
1130 $ tzd = F$STRING(tzmins*60)
1133 $ signothetime = "+"
1135 $ tzhour = -1*tzhour !keeps !UL happy
1136 $ signothetime = "-"
1138 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
1141 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
1146 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
1147 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
1149 $! This quotation from Configure has to be included on VMS:
1154 There is, however, a strange, musty smell in the air that reminds me of
1155 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1158 $! Determine the architecture name. For now we just get the base
1159 $! architecture name, which may accumulate various minus sign-delimited
1160 $! appendages later depending on configuration options. But we need the
1161 $! base name early because not all questions are worth asking on all
1164 $! Please use F$ELEMENT(0,"-",archname) .EQS. "VMS_VAX" (or "VMS_AXP" or
1165 $! "VMS_IA64") from here on to allow cross-platform configuration (e.g.
1166 $! configure a VAX build on an Alpha).
1168 $ IF (F$GETSYI("HW_MODEL") .LT. 1024 .AND. F$GETSYI("HW_MODEL") .GT. 0)
1170 $ archname = "VMS_VAX"
1171 $ otherarch = "an Alpha or IA64"
1173 $ arch_type = "ARCH-TYPE=__VAX__"
1175 $ IF (F$GETSYI("ARCH_TYPE") .EQ. 2)
1177 $ archname = "VMS_AXP"
1178 $ otherarch = "a VAX or IA64"
1179 $ arch_type = "ARCH-TYPE=__AXP__"
1181 $ archname = "VMS_IA64"
1182 $ otherarch = "a VAX or Alpha"
1183 $ arch_type = "ARCH-TYPE=__IA64__"
1188 $!: set the base revision
1190 $ revision = baserev - ".0"
1191 $!: get the patchlevel
1193 $ echo4 "Getting the current patchlevel..."
1198 $ api_subversion="0"
1199 $ perl_patchlevel="0"
1200 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1201 $ IF (patchlevel_h.NES."")
1203 $ got_patch = "false"
1205 $ got_api_revision = "false"
1206 $ got_api_version = "false"
1207 $ got_api_subversion = "false"
1208 $ got_perl_patchlevel= "false"
1209 $ OPEN/READONLY CONFIG 'patchlevel_h'
1211 $ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
1212 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
1214 $ line = F$EDIT(line,"COMPRESS, TRIM")
1215 $ patchlevel = F$ELEMENT(2," ",line)
1216 $ got_patch = "true"
1218 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
1220 $ line = F$EDIT(line,"COMPRESS, TRIM")
1221 $ subversion = F$ELEMENT(2," ",line)
1224 $ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1226 $ line = F$EDIT(line,"COMPRESS, TRIM")
1227 $ api_revision = F$ELEMENT(2," ",line)
1228 $ got_api_revision = "true"
1230 $ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1232 $ line = F$EDIT(line,"COMPRESS, TRIM")
1233 $ api_version = F$ELEMENT(2," ",line)
1234 $ got_api_version = "true"
1236 $ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1238 $ line = F$EDIT(line,"COMPRESS, TRIM")
1239 $ api_subversion = F$ELEMENT(2," ",line)
1240 $ got_api_subversion = "true"
1242 $ IF ((F$LOCATE("""DEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1244 $ line = F$EDIT(line,"COMPRESS, TRIM")
1245 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1246 $ perl_patchlevel = perl_patchlevel - "DEVEL"
1247 $ got_perl_patchlevel = "true"
1249 $ IF ((F$LOCATE("""SMOKE",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1251 $ line = F$EDIT(line,"COMPRESS, TRIM")
1252 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1253 $ perl_patchlevel = perl_patchlevel - "SMOKE"
1254 $ got_perl_patchlevel = "true"
1256 $ IF ((F$LOCATE("""MAINT",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1258 $ line = F$EDIT(line,"COMPRESS, TRIM")
1259 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1260 $ perl_patchlevel = perl_patchlevel - "MAINT"
1261 $ got_perl_patchlevel = "true"
1263 $ IF (.NOT. got_patch) .OR. -
1264 (.NOT. got_sub) .OR. -
1265 (.NOT. got_api_revision) .OR. -
1266 (.NOT. got_api_version) .OR. -
1267 (.NOT. got_api_subversion) .OR. -
1268 (.NOT. got_perl_patchlevel) -
1269 THEN GOTO Patchlevel_h_loop
1274 $ IF F$SEARCH("[-].patch") .NES. ""
1277 $ OPEN/READ PATCH [-].patch
1280 $ tmp = F$EDIT(line,"TRIM,COMPRESS")
1281 $ IF F$ELEMENT(3, " ", tmp) .NES. "" THEN tmp = F$ELEMENT(3, " ", tmp)
1283 $ IF tmp .NES. "" THEN perl_patchlevel = tmp
1286 $ version_patchlevel_string = "version ''patchlevel' subversion ''subversion'"
1287 $ IF got_perl_patchlevel .AND. perl_patchlevel .NES. "0"
1289 $ version_patchlevel_string = "''version_patchlevel_string' patch ''perl_patchlevel'"
1291 $ echo "(You have ''package' ''version_patchlevel_string'.)"
1293 $ version = revision + "_" + patchlevel + "_" + subversion
1295 $!: see if we need a special compiler
1296 $! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
1300 $ vms_cc_available = ""
1302 $ OPEN/WRITE CONFIG ccvms.c
1303 $ WRITE CONFIG "#ifdef __DECC"
1304 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1305 $ WRITE CONFIG "#endif"
1306 $ WRITE CONFIG "#include <stdio.h>"
1307 $ WRITE CONFIG "int main() {"
1308 $ WRITE CONFIG "#ifdef __DECC"
1309 $ WRITE CONFIG " printf(""/DECC\n"");"
1310 $ WRITE CONFIG "#else"
1311 $ WRITE CONFIG " printf(""/VAXC\n"");"
1312 $ WRITE CONFIG "#endif"
1313 $ WRITE CONFIG " exit(0);"
1318 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
1319 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
1320 $ cc/NoObj/list=ccvms.lis ccvms.c
1323 $ IF (silent) THEN GOSUB Shut_up
1324 $ IF tmp.NE.%X10B90001
1326 $ IF tmp.NE.%X10000001
1328 $ nocc = "t" !%X10000001 is return from gcc
1329 $ GOTO Gcc_initial_check
1334 $ IF .NOT.silent THEN echo ""
1335 $ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1336 $ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1340 $ echo "Will try cc/decc..."
1343 $ DEFINE/USER_MODE SYS$ERROR NL:
1344 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1345 $ cc/decc/NoObj/list=ccvms.lis ccvms.c
1348 $ IF (silent) THEN GOSUB Shut_up
1349 $ IF tmp.NE.%X10B90001
1351 $ echo "Apparently you don't have that one."
1354 $ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1355 $ vms_cc_available = vms_cc_available + "cc/decc "
1358 $ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line)) -
1359 .or.(F$LOCATE("HP",F$EDIT(line,"UPCASE")).NE.F$LENGTH(line))
1361 $ vms_cc_dflt = "/decc"
1362 $ vms_cc_available = vms_cc_available + "cc/decc "
1367 $ echo "Checking for gcc"
1368 $ OPEN/WRITE CONFIG gccvers.lis
1370 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1371 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1372 $ 'gcc_symbol'/noobj/version _nla0:
1375 $ IF (silent) THEN GOSUB Shut_up
1377 $ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1379 $ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you do not have it."
1380 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1381 $ GOTO Cxx_initial_check
1383 $ OPEN/READ CONFIG gccvers.lis
1385 $ READ/END_OF_FILE=GCC_List_End CONFIG line
1386 $ GOTO GCC_List_Read
1390 $ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1391 $ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1395 $! In order to build with the HP C++ compiler, invoke configure.com with "-Dusecxx" on
1396 $! the command line.
1398 $ IF F$TYPE(usecxx) .EQS. "" THEN usecxx := n
1399 $ IF usecxx .OR. usecxx .EQS. "define"
1402 $ echo "Checking for CXX..."
1403 $ OPEN/WRITE CONFIG ccvms.c
1404 $ WRITE CONFIG "#include <iostream>"
1405 $ WRITE CONFIG "int main() {"
1406 $ WRITE CONFIG "#ifdef __DECCXX"
1407 $ WRITE CONFIG " cout << __DECCXX, endl;"
1408 $ WRITE CONFIG "#else"
1409 $ WRITE CONFIG " cout << 0,endl;"
1410 $ WRITE CONFIG "#endif"
1411 $! Todo: add G++ identifier check ??
1412 $ WRITE CONFIG " return(0);"
1416 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1417 $ DEFINE/USER_MODE SYS$ERROR NL:
1421 $! success $status with:
1422 $! DEC C++ V1.1-001 on VMS VAX V5.5-2
1423 $! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1424 $! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1425 $! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1426 $ IF tmp .eq. %X15F60001
1430 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1431 $ DEFINE/USER_MODE SYS$ERROR NL:
1432 $ link/nodebug ccvms.obj
1435 $ ! success $status with:
1436 $ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1437 $ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1438 $ IF tmp .eq. %X10000001
1440 $ ld_try = "Link/nodebug"
1441 $ vms_cc_available = vms_cc_available + "cxx "
1442 $ echo "CXX and LINK are available."
1444 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1446 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1447 $ DEFINE/USER_MODE SYS$ERROR NL:
1451 $ ! success $status with:
1452 $ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1453 $ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1454 $ IF tmp .eq. %X10000001
1456 $ ld_try = "cxxlink"
1457 $ vms_cc_available = vms_cc_available + "cxx "
1458 $ echo "CXX and CXXLINK are available."
1461 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1465 $ DELETE/NOLOG/NOCONFIRM ccvms.c;
1466 $ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1467 $ CALL Cxx_demangler_cleanup
1469 $ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1472 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1474 $!: see if we need a special compiler
1476 $ echo "Available compiler(s):"
1477 $ echo "( ''vms_cc_available')"
1480 $ IF usecxx .OR. usecxx .EQS. "define"
1484 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1489 $ rp = "Use which C compiler? [''dflt'] "
1493 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1495 $ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans)) -
1496 .or.(F$LOCATE("hp",ans).NE.F$LENGTH(ans))
1501 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1503 $ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1508 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1512 $ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1513 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt)
1515 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1520 $ IF Mcc .EQS. "cc/decc"
1523 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1529 $ IF Mcc .EQS. "cc/decc"
1532 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1534 $ IF Mcc .EQS. "gcc"
1537 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1540 $Decc_Version_check:
1542 $ IF ccname .EQS. "DEC"
1545 $ echo4 "Checking for the Dec C version number..."
1546 $ OPEN/WRITE CONFIG deccvers.c
1547 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1548 $ WRITE CONFIG "#include <stdio.h>"
1549 $ WRITE CONFIG "int main() {"
1550 $ WRITE CONFIG "#ifdef __DECC"
1551 $ WRITE CONFIG "#ifdef __DECC_VER"
1552 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1553 $ WRITE CONFIG "#else"
1554 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1555 $ WRITE CONFIG "#endif"
1556 $ WRITE CONFIG "#endif"
1557 $ WRITE CONFIG " exit(0);"
1561 $ DEFINE/USER_MODE SYS$ERROR NL:
1562 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1565 $ IF (silent) THEN GOSUB Shut_up
1566 $ DEFINE/USER_MODE SYS$ERROR NL:
1567 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1568 $ link/nodebug deccvers.obj
1570 $ IF (silent) THEN GOSUB Shut_up
1571 $ OPEN/WRITE CONFIG deccvers.out
1572 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1573 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1574 $ mcr []deccvers.exe
1578 $ IF (silent) THEN GOSUB Shut_up
1579 $ OPEN/READ CONFIG deccvers.out
1580 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1583 $ echo "You are using Dec C ''line'"
1585 $ Dec_C_Version = F$INTEGER(line)
1586 $ IF Dec_C_Version .GE. 60200000 .AND. F$ELEMENT(0, "-", archname) .NES. "VMS_VAX"
1588 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1589 $ ccflags = ccflags + "/NOANSI_ALIAS"
1591 $ DELETE/NOLOG/NOCONFIRM deccvers.*;
1595 $ IF ccname .EQS. "GCC"
1597 $ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1598 $ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1599 $ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1600 $ IF gcclib_olb .EQS. ""
1602 $! These objects/libs come w/ gcc 2.7.2 for AXP:
1603 $ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1604 $ IF tmp .NES. "" then gcclib_olb = tmp
1605 $ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1608 $ IF gcclib_olb .EQS. ""
1609 $ THEN gcclib_olb = tmp
1610 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1613 $ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1616 $ IF gcclib_olb .EQS. ""
1617 $ THEN gcclib_olb = tmp
1618 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1621 $ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1624 $ IF gcclib_olb .EQS. ""
1625 $ THEN gcclib_olb = tmp
1626 $ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1629 $ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1631 $ gcclib_olb = gcclib_olb + "/lib"
1633 $ IF gcclib_olb .NES. "" .AND. -
1634 (vaxcrtl_olb .NES. "" .OR. -
1635 vaxcrtl_exe .NES. "" )
1638 $ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1639 $ OPEN/WRITE CONFIG gccvers.c
1640 $ WRITE CONFIG "#include <stdio.h>"
1641 $ WRITE CONFIG "int main() {"
1642 $ WRITE CONFIG "#ifdef __GNUC__"
1643 $ WRITE CONFIG "#ifdef __VERSION__"
1644 $ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1645 $ WRITE CONFIG "#else"
1646 $ WRITE CONFIG " printf(""%s\n"", ""1"");"
1647 $ WRITE CONFIG "#endif"
1648 $ WRITE CONFIG "#endif"
1649 $ WRITE CONFIG " exit(0);"
1652 $ DEFINE SYS$ERROR _NLA0:
1653 $ DEFINE SYS$OUTPUT _NLA0:
1656 $ DEASSIGN SYS$ERROR _NLA0:
1657 $ DEASSIGN SYS$OUTPUT _NLA0:
1658 $ IF (silent) THEN GOSUB Shut_up
1659 $ DEFINE SYS$ERROR _NLA0:
1660 $ DEFINE SYS$OUTPUT _NLA0:
1661 $ IF vaxcrtl_exe .EQS. ""
1663 $ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1665 $ link/nodebug gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1668 $ link/nodebug gccvers.obj,'gcclib_olb'
1672 $ OPEN/WRITE CONFIG GCCVERS.OPT
1673 $ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1675 $ link/nodebug gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1678 $ DEASSIGN SYS$ERROR
1679 $ DEASSIGN SYS$OUTPUT
1680 $ IF (silent) THEN GOSUB Shut_up
1681 $ OPEN/WRITE CONFIG gccvers.out
1682 $ DEFINE SYS$ERROR CONFIG
1683 $ DEFINE SYS$OUTPUT CONFIG
1687 $ DEASSIGN SYS$OUTPUT
1688 $ DEASSIGN SYS$ERROR
1689 $ IF (silent) THEN GOSUB Shut_up
1690 $ OPEN/READ CONFIG gccvers.out
1691 $ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1694 $ DELETE/NOLOG/NOCONFIRM gccvers.*;
1695 $ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1697 $ echo "You are not using GNU cc."
1700 $ echo "You are using GNU cc ''line'"
1703 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1709 $ IF ccname .EQS. "CXX"
1711 $ OPEN/WRITE CONFIG cxxvers.c
1712 $ WRITE CONFIG "#include <stdio.h>"
1713 $ WRITE CONFIG "int main() {"
1714 $ WRITE CONFIG "#ifdef __DECCXX_VER"
1715 $ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
1716 $ WRITE CONFIG "#else"
1717 $ WRITE CONFIG " printf(""%i\n"", ""0"");"
1718 $ WRITE CONFIG "#endif"
1719 $ WRITE CONFIG " return(0);"
1723 $ DEFINE/USER_MODE SYS$ERROR NL:
1724 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1728 $ IF (silent) THEN GOSUB Shut_up
1730 $ DEFINE/USER_MODE SYS$ERROR NL:
1731 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1735 $ IF (silent) THEN GOSUB Shut_up
1736 $ OPEN/WRITE CONFIG cxxvers.out
1738 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1739 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1744 $ IF (silent) THEN GOSUB Shut_up
1745 $ OPEN/READ CONFIG cxxvers.out
1746 $ READ/END_OF_FILE=Cxx_cleanup CONFIG line
1749 $ DELETE/NOLOG/NOCONFIRM cxxvers.*;
1750 $ echo "You are using CXX ''line'"
1753 $ d_cplusplus = "define"
1754 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1755 $ ccflags = ccflags + "/NOANSI_ALIAS"
1756 $ CALL Cxx_demangler_cleanup
1758 $ d_cplusplus = "undef"
1761 $Cxx_demangler_cleanup: SUBROUTINE
1763 $! If we do build with CXX these demangler Dbs will be left all over.
1764 $! However, configure.com does try to remove the [.UU] sub directory.
1765 $! Be sure to set default to the correct place before calling this sub.
1768 $ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
1769 $ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
1771 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
1772 $ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
1776 $ ENDSUBROUTINE ! Cxx_demangler_cleanup
1781 $ OPEN/READ CONFIG ccvms.lis
1783 $ IF F$ELEMENT(0, "-", archname) .EQS. "VMS_VAX"
1788 $ IF F$ELEMENT(0, "-", archname) .EQS. "VMS_AXP"
1796 $ line = F$EDIT(line,"TRIM,COMPRESS")
1797 $ line = line - "Page 1" ! occurs at end all compilers
1798 $ line = line - "CCVMS " ! filename appears w/ VAXC
1799 $ line = line - "Source Listing " ! Seen w/ AXP DECC
1800 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
1802 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1803 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1807 $!: What should the include directory be ? (.TLB text libraries)
1809 $ rp = "Where are the include files you want to use? "
1810 $ IF f$length( rp + "[''dflt'] " ) .GT. 76
1811 $ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
1812 $ ELSE rp = rp + "[''dflt'] "
1817 $!: see if we have to deal with yellow pages, now NIS.
1818 $!: now get the host name
1821 $ echo4 "Figuring out host name..." !>&4
1823 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
1824 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
1825 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
1826 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
1827 $ IF myhostname.eqs."".and. -
1828 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
1829 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
1830 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
1831 $ IF myhostname.eqs."".and. -
1832 F$TRNLNM("TCPIP$INET_HOST") .nes. "" .and. -
1833 F$TRNLNM("TCPIP$INET_DOMAIN") .nes. "" THEN -
1834 myhostname = F$TRNLNM("TCPIP$INET_HOST") + "." + F$TRNLNM("TCPIP$INET_DOMAIN")
1835 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
1836 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
1837 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
1838 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
1839 $!: you do not want to know about this
1841 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
1846 $ READ SYS$COMMAND/PROMPT= -
1847 "Please type the (one word) name of your host: " ans
1850 $!: translate upper to lower if necessary
1851 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
1852 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
1853 $ IF mylowhostname.NES.myhostname
1855 $ echo "(Normalizing case in your host name)"
1856 $ myhostname = mylowhostname
1859 $ fp = F$LOCATE(".",myhostname)
1860 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
1861 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
1863 $ rp = "What is your domain name? [''mydomain'] "
1867 $!: translate upper to lower if necessary
1868 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
1869 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
1870 $ IF mylowdomain.NES.mydomain
1872 $ echo "(Normalizing case in your domain name)"
1873 $ mydomain = mylowdomain
1876 $ myhostname = myhostname - mydomain
1877 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
1883 I need to get your e-mail address in Internet format if possible, i.e.
1884 something like user@host.domain. Please answer accurately since I have
1885 no easy means to double check it. The default value provided below
1886 is most probably close to the reality but may not be valid from outside
1887 your organization...
1890 $ IF F$TYPE(cf_email) .EQS. ""
1892 $ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
1893 $ rp = "What is your e-mail address? [''dflt'] "
1903 If you or somebody else will be maintaining perl at your site, please
1904 fill in the correct e-mail address here so that they may be contacted
1905 if necessary. Currently, the "perlbug" program included with perl
1906 will send mail to this address in addition to perlbug@perl.com. You may
1907 enter "none" for no administrator.
1910 $ dflt = "''cf_email'"
1911 $ rp = "Perl administrator e-mail address [''dflt'] "
1915 $!: determine where public executable scripts go
1916 $!: determine perl absolute location
1917 $!: figure out how to guarantee perl startup
1919 $!: see how we invoke the C preprocessor
1921 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
1922 $!: Set private lib path
1923 $!: Now check and see which directories actually exist, avoiding duplicates
1924 $!: determine optimize, if desired, or use for debug flag also
1925 $!: We will not override a previous value, but we might want to
1926 $!: augment a hint file
1927 $!: the following weeds options from ccflags that are of no interest to cpp
1928 $!: flags used in final linking phase
1929 $!: Try to guess additional flags to pick up local libraries.
1932 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
1933 $!: compute shared library extension
1934 $!: Looking for optional libraries
1935 $!: see if nm is to be used to determine whether a symbol is defined or not
1936 $!: get list of predefined functions in a handy place
1937 $!: see if we have sigaction or sigprocmask
1938 $ IF (ccname .EQS. "DEC" .AND. Dec_C_Version .GE. 50200000) .OR. (ccname .EQS. "CXX")
1940 $ Has_Dec_C_Sockets = "T"
1942 $ echo4 "Hmm... Looks like you have Dec C Berkeley networking support."
1944 $ Has_Dec_C_Sockets = "F"
1947 $ IF Has_Dec_C_Sockets
1950 $ echo "You have sockets available via the C library. Should socket support"
1951 $ echo "be built into Perl?"
1953 $ rp = "Choose socket support option (NONE"
1954 $ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
1955 $ rp = rp + ") [''dflt'] "
1957 $ Has_Dec_C_Sockets = "F"
1958 $ Has_socketshr = "F"
1959 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
1960 $ IF ans.eqs."decc" THEN Has_Dec_C_Sockets = "T"
1964 $! Ask if they want to build with VMS_DEBUG perl
1966 $ echo "Perl can be built to run under the VMS debugger."
1967 $ echo "You should only select this option if you are debugging"
1968 $ echo "perl itself. This can be a useful feature if you are "
1969 $ echo "embedding perl in a program."
1971 $ if f$type(usevmsdebug) .nes. ""
1973 $ if usevmsdebug .or. usevmsdebug .eqs. "define" then bool_dflt="y"
1975 $ rp = "Build a VMS-DEBUG version of Perl? [''bool_dflt'] "
1977 $ use_vmsdebug_perl = ans
1978 $ IF use_vmsdebug_perl
1980 $ usevmsdebug = "define"
1982 $ usevmsdebug = "undef"
1985 $! Ask if they want to build with DEBUGGING
1987 $ echo "Perl can be built with extra runtime debugging enabled. This"
1988 $ echo "enables the -D switch, at the cost of some performance. It"
1989 $ echo "was mandatory on perl 5.005 and before on VMS, but is now"
1990 $ echo "optional. If you do not generally use it you should probably"
1991 $ echo "leave this off and gain a bit of extra speed."
1993 $ if f$type(DEBUGGING) .nes. ""
1995 $ if f$extract(0,1,f$edit(DEBUGGING,"collapse,upcase")).eqs."Y" .or. DEBUGGING .eqs. "define" then bool_dflt="y"
1997 $ rp = "Build a DEBUGGING version of Perl? [''bool_dflt'] "
1999 $ use_debugging_perl = ans
2002 $! Ask about threads, if appropriate
2003 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
2006 $ echo "Perl can be built to offer a form of threading support on some systems."
2007 $ echo "To do so, configure.com can be run with -""Dusethreads""."
2009 $ echo "Note that Perl built with threading support runs slightly slower"
2010 $ echo "and uses slightly more memory than plain Perl."
2013 $ if f$type(usethreads) .nes. ""
2015 $ if usethreads .or. usethreads .eqs. "define" then bool_dflt="y"
2017 $! Catch cases where user specified ithreads but
2018 $! forgot -Dusethreads
2019 $ if f$type(useithreads) .nes. ""
2021 $ if useithreads .or. useithreads .eqs. "define" then bool_dflt="y"
2023 $ echo "If this doesn't make any sense to you, just accept the default '" + bool_dflt + "'."
2024 $ rp = "Build a threading Perl? [''bool_dflt'] "
2028 $ usethreads = "define"
2031 $ if f$type(useithreads) .nes. ""
2033 $ if useithreads .eqs. "undef" then bool_dflt="n"
2035 $ if f$type(use5005threads) .nes. ""
2037 $ if use5005threads .or. use5005threads .eqs. "define"
2039 $ echo "5.005 threads are no longer supported"
2043 $ rp = "Use the newer interpreter-based ithreads? [''bool_dflt'] "
2046 $ use_5005_threads="N"
2047 $ ! Are they on VMS 7.1 or greater?
2048 $ IF "''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.1"
2051 $ echo "Threaded Perl can be linked to use system upcalls on your system. This feature"
2052 $ echo "allows the thread scheduler to be made aware of system events (such as I/O)"
2053 $ echo "so as to prevent a single thread from blocking all the threads in a program,"
2054 $ echo "even on a single-processor machine."
2056 $ IF f$type(usethreadupcalls) .NES. ""
2058 $ if .not. usethreadupcalls .or. usethreadupcalls .eqs. "undef" then bool_dflt="n"
2060 $ rp = "Enable thread upcalls? [''bool_dflt'] "
2064 $ thread_upcalls = "MTU=MTU=1"
2065 $ usethreadupcalls = "define"
2066 $ ! Are they on alpha or itanium?
2067 $ IF (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX") .AND. ("''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.2")
2070 $ echo "Threaded Perl can be linked to use multiple kernel threads on your system."
2071 $ echo "This feature allows multiple user threads to make use of multiple CPUs on"
2072 $ echo "a multi-processor machine."
2074 $ IF f$type(usekernelthreads) .nes. ""
2076 $ if usekernelthreads .or. usekernelthreads .eqs. "define" then bool_dflt="y"
2078 $ rp = "Enable multiple kernel threads? [''bool_dflt'] "
2082 $ thread_kernel = "MTK=MTK=1"
2083 $ usekernelthreads = "define"
2089 $ usethreads = "undef"
2092 $ IF F$TYPE(usethreadupcalls) .EQS. "" THEN usethreadupcalls = "undef"
2093 $ IF F$TYPE(usekernelthreads) .EQS. "" THEN usekernelthreads = "undef"
2095 $! Ask if they want to build with MULTIPLICITY
2097 $ echo "Perl can be built so that multiple Perl interpreters can coexist"
2098 $ echo "within the same Perl executable."
2099 $ IF usethreads .OR. usethreads .EQS. "define"
2101 $ echo "This multiple interpreter support is required for interpreter-based threads."
2102 $ usemultiplicity="define"
2105 $ if f$type(usemultiplicity) .nes. ""
2107 $ if usemultiplicity .or. usemultiplicity .eqs. "define" then bool_dflt = "y"
2109 $ rp = "Build Perl for multiplicity? [''bool_dflt'] "
2113 $ usemultiplicity="define"
2115 $ usemultiplicity="undef"
2119 $! Ask if they want to build with 64-bit support
2120 $ IF (F$ELEMENT(0, "-", archname).NES."VMS_VAX").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2123 $ IF F$TYPE(use64bitint) .NES. ""
2125 $ IF use64bitint .OR. use64bitint .eqs. "define" THEN bool_dflt = "y"
2128 $ echo "You have natively 64-bit long integers."
2130 $ echo "Perl can be built to take advantage of 64-bit integer types"
2131 $ echo "on some systems, To do so, Configure can be run with -Duse64bitint."
2132 $ echo "Choosing this option will most probably introduce binary incompatibilities."
2134 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2135 $ rp = "Try to use 64-bit integers, if available? [''bool_dflt'] "
2140 $ IF F$TYPE(use64bitall) .NES. ""
2142 $ IF use64bitall .OR. use64bitall .eqs. "define" THEN bool_dflt = "y"
2145 $ echo "You may also choose to try maximal 64-bitness. It means using as much"
2146 $ echo "64-bitness as possible on the platform. This in turn means even more"
2147 $ echo "binary incompatibilities. On the other hand, your platform may not"
2148 $ echo "have any more 64-bitness available than what you already have chosen."
2150 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2151 $ rp = "Try to use maximal 64-bit support, if available? [''bool_dflt'] "
2154 $ IF use64bitall .AND. .NOT. use64bitint
2157 $ echo "Since you have chosen a maximally 64-bit build, I'm also turning on"
2158 $ echo "the use of 64-bit integers."
2162 $ bool_dflt = use64bitall
2163 $ IF F$TYPE(uselargefiles) .NES. ""
2165 $ IF uselargefiles .OR. uselargefiles .eqs. "define" THEN bool_dflt = "y"
2168 $ echo "Perl can be built to understand large files (files larger than 2 gigabytes)"
2169 $ echo "on some systems. To do so, Configure can be run with -Duselargefiles."
2171 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2172 $ rp = "Try to understand large files, if available? [''bool_dflt'] "
2177 $ IF F$TYPE(uselongdouble) .NES. ""
2179 $ IF uselongdouble .OR. uselongdouble .eqs. "define" THEN bool_dflt = "y"
2182 $ echo "Perl can be built to take advantage of long doubles which"
2183 $ echo "(if available) may give more accuracy and range for floating point numbers."
2185 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2186 $ rp = "Try to use long doubles, if available? [''bool_dflt'] "
2188 $ uselongdouble = ans
2190 $ ENDIF ! not VAX && >= 7.1
2192 $ IF usesitecustomize .OR. usesitecustomize .eqs. "define"
2194 $ usesitecustomize = "define"
2196 $ usesitecustomize = "undef"
2201 $ echo "By default, perl (and pretty much everything else on VMS) uses"
2202 $ echo "case-insensitive linker symbols. Which is to say, when the"
2203 $ echo "underlying C code makes a call to a routine called Perl_foo in"
2204 $ echo "the source, the name in the object modules or shareable images"
2205 $ echo "is really PERL_FOO. There are some packages that use an"
2206 $ echo "embedded perl interpreter that instead require case-sensitive"
2207 $ echo "linker symbols."
2209 $ echo "If you have no idea what this means, and do not have"
2210 $ echo "any program requiring anything, choose the default."
2211 $ bool_dflt = be_case_sensitive
2212 $ if f$type(usecasesensitive) .nes. ""
2214 $ if usecasesensitive .or. usecasesensitive .eqs. "define" then bool_dflt = "y"
2215 $ if f$extract(0,1,f$edit(usecasesensitive,"collapse,upcase")).eqs."N" .or. usecasesensitive .eqs. "undef" then bool_dflt = "n"
2217 $ rp = "Build with case-sensitive symbols? [''bool_dflt'] "
2219 $ be_case_sensitive = ans
2221 $! Shortened symbols?
2223 $ echo "The VMS linker does not handle symbol names longer than 31 characters,"
2224 $ echo "but the compiler can shorten long symbols if requested."
2225 $ bool_dflt = shorten_long_symbols
2226 $ if f$type(useshortenedsymbols) .nes. ""
2228 $ if useshortenedsymbols .or. useshortenedsymbols .eqs. "define" then bool_dflt = "y"
2229 $ if f$extract(0,1,f$edit(useshortenedsymbols,"collapse,upcase")) .eqs. "N" .or. useshortenedsymbols .eqs. "undef" then bool_dflt = "n"
2231 $ rp = "Build with long symbols shortened? [''bool_dflt'] "
2233 $ shorten_long_symbols = ans
2234 $ IF F$ELEMENT(0, "-", archname) .NES. "VMS_VAX"
2238 $ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers on"
2239 $ echo "Alpha and Itanium, but if you need G_FLOAT for binary compatibility"
2240 $ echo "with an external library or existing data, you may wish to disable"
2241 $ echo "the IEEE math option."
2242 $ bool_dflt = use_ieee_math
2243 $ if f$type(useieee) .nes. ""
2245 $ if useieee .or. useieee .eqs. "define"
2252 $ rp = "Use IEEE math? [''bool_dflt'] "
2254 $ use_ieee_math = ans
2256 $ use_ieee_math = "n"
2259 $ usecasesensitive = "undef"
2260 $ useshortenedsymbols = "undef"
2261 $ if (use_ieee_math) then useieee = "define"
2262 $ if (be_case_sensitive) then usecasesensitive = "define"
2263 $ if (shorten_long_symbols) then useshortenedsymbols = "define"
2264 $! Unlink all versions?
2266 $ echo "By default, Perl's unlink() provides VMS-like behavior and only"
2267 $ echo "deletes the latest version of a file. Enabling this option builds"
2268 $ echo "Perl so that unlink() deletes all versions of a file."
2269 $ bool_dflt = unlink_all_versions
2270 $ if f$type(unlink_all_versions) .nes. ""
2272 $ if unlink_all_versions .or. unlink_all_versions .eqs. "define"
2279 $ rp = "Make unlink() delete all versions of a file? [''bool_dflt'] "
2281 $ unlink_all_versions = ans
2282 $ IF unlink_all_versions
2284 $ d_unlink_all_versions = "define"
2286 $ d_unlink_all_versions = "undef"
2291 $ echo "Your compiler may want other flags. For this question you should include"
2292 $ echo "/INCLUDE=(whatever) and /DEFINE=(whatever), flags and any other flags"
2293 $ echo "or qualifiers used by the compiler."
2295 $ echo "To use no flags, specify the word ""none""."
2296 $ dflt = user_c_flags
2297 $ rp = "Any additional cc flags? [''dflt'] "
2299 $ IF ans .EQS. "none" THEN ans = ""
2300 $ user_c_flags = "''ans'"
2302 $! Ask whether they want to use secure logical translation when tainting
2304 $ echo "As Perl starts up, it checks several logical names, such as"
2305 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2306 $ echo "of its behavior. For additional security, you may limit this"
2307 $ echo "process to executive- and kernel-mode translation when tainting"
2308 $ echo "is enabled. In this case, logical names normally skipped when"
2309 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2310 $ echo "If you do not choose to do this, the usual order of access modes"
2311 $ echo "is used for logical name translation."
2313 $ echo "This restriction does not apply to the %ENV hash or to implicit"
2314 $ echo "logical name translation during parsing of file specifications;"
2315 $ echo "these always use the normal sequence of access modes for logical"
2316 $ echo "name translation."
2318 $ if f$type(usesecurelog) .nes. ""
2320 $ if f$extract(0,1,f$edit(usesecurelog,"collapse,upcase")).eqs."N" .or. usesecurelog .eqs. "undef" then bool_dflt = "n"
2322 $ rp = "Use secure logical name translation? [''bool_dflt'] "
2324 $ d_secintgenv = ans
2325 $ usesecurelog = "undef"
2326 $ if (d_secintgenv) then usesecurelog = "define"
2328 $! Ask whether they want to default filetypes
2330 $ echo "When you pass the name of a program to Perl on the command line,"
2331 $ echo "it generally doesn't supply any defaults unless the -S command"
2332 $ echo "line switch is specified. In keeping with the VMS tradition of"
2333 $ echo "default file types, however, you can configure Perl to try default"
2334 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2335 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2336 $ echo "finally foo.com)."
2338 $ echo "This is currently broken in some configurations. Only enable it if"
2339 $ echo "you know what you are doing."
2341 $ if f$type(usedefaulttypes) .nes. ""
2343 $ if usedefaulttypes .or. usedefaulttypes .eqs. "define" then bool_dflt="y"
2345 $ rp = "Always use default file types? [''bool_dflt'] "
2347 $ d_alwdeftype = ans
2348 $ usedefaulttypes = "undef"
2349 $ if (d_alwdeftype) then usedefaulttypes = "define"
2352 $ rp = "What is your architecture name? [''archname'] "
2356 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
2357 $ IF (ans.NES.archname) !.AND.knowitall
2359 $ echo4 "I'll go with ''archname' anyway..."
2364 $ if f$type(useversionedarchname) .nes. ""
2366 $ if useversionedarchname .or. useversionedarchname .eqs. "define" then bool_dflt = "y"
2368 $ rp = "Add the Perl API version to your archname? [''bool_dflt'] "
2372 $ useversionedarchname = "define"
2373 $ IF F$LOCATE("-''version'", archname) .EQ. F$LENGTH(archname)
2375 $ archname = "''archname'-''version'"
2376 $ echo4 "...setting architecture name to ''archname'."
2378 $ echo4 "...and architecture name already has -''version'."
2381 $ useversionedarchname = "undef"
2384 $ IF usethreads .OR. usethreads .EQS. "define"
2386 $ echo4 "Threads selected."
2387 $ IF F$LOCATE("-thread", archname) .EQ. F$LENGTH(archname)
2389 $ archname = "''archname'-thread"
2390 $ echo4 "...setting architecture name to ''archname'."
2392 $ echo4 "...and architecture name already has -thread."
2396 $ IF usemultiplicity .OR. usemultiplicity .EQS. "define"
2398 $ echo4 "Multiplicity selected."
2399 $ IF F$LOCATE("-multi", archname) .EQ. F$LENGTH(archname)
2401 $ archname = "''archname'-multi"
2402 $ echo4 "...setting architecture name to ''archname'."
2404 $ echo4 "...and architecture name already has -multi."
2408 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
2410 $ echo4 "Long doubles selected."
2411 $ IF F$LOCATE("-ld", archname) .EQ. F$LENGTH(archname)
2413 $ archname = "''archname'-ld"
2414 $ echo4 "...setting architecture name to ''archname'."
2416 $ echo4 "...and architecture name already has -ld."
2421 $ vms_prefix = "perl_root"
2422 $ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
2423 $ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''bool_dflt'] "
2430 $ IF (F$ELEMENT(0, "-", archname).EQS."VMS_AXP")
2432 $ macros = macros + """AXE=1"","
2434 $ IF (F$ELEMENT(0, "-", archname).EQS."VMS_IA64")
2436 $ macros = macros + """IXE=1"","
2440 $!: is AFS running? !sfn
2441 $!: decide how portable to be. Allow command line overrides. !sfn
2442 $!: set up shell script to do ~ expansion !sfn
2443 $!: expand filename !sfn
2444 $!: now set up to get a file name !sfn
2446 $ IF F$TYPE(prefix) .EQS. ""
2448 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
2449 $ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - "000000." - ".000000" - ".;"
2450 $ prefixbase = prefix - "]"
2451 $! Add _ROOT to make install PERL_ROOT differ from build directory.
2452 $ prefix = prefixbase + "_ROOT.]"
2454 $ ! more redundant scrubbing of values
2455 $ prefix = prefix - "000000."
2456 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN prefix = prefix - "]" + ".]"
2457 $ src = prefix - "_ROOT."
2458 $!: determine root of directory hierarchy where package will be installed.
2463 $ echo "By default, ''package' will be installed in ''dflt', pod"
2464 $ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
2465 $ echo "all installation directories."
2466 $ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
2467 $ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
2469 $ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
2474 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
2478 $ perl_root = prefix
2480 $! Check here for pre-existing PERL_ROOT.
2481 $! -> ask if removal desired.
2482 $! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
2483 $! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
2485 $ tmp = perl_root - ".]" + "]"
2486 $ dflt = f$parse(tmp,,,,)
2489 $ echo4 "''tmp' does not yet exist."
2490 $! create/directory 'tmp'
2492 $ echo4 "''tmp' already exists."
2495 $ vms_skip_install = "true"
2498 $ rp = "Skip the remaining """"where install"""" questions? [''bool_dflt'] "
2500 $ IF (.NOT.ans) THEN vms_skip_install = "false"
2501 $ IF (.NOT.vms_skip_install)
2504 $!: set the prefixit variable, to compute a suitable default value
2506 $!: determine where private library files go
2507 $!: Usual default is /usr/local/lib/perl5. Also allow things like
2508 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
2514 There are some auxiliary files for perl5 that need to be put into a
2515 private library directory that is accessible by everyone.
2518 $ IF F$TYPE(privlib) .NES. ""
2519 $ THEN dflt = privlib
2520 $ ELSE dflt = "''vms_prefix':[lib]"
2522 $ rp = "Pathname where the private library files will reside? "
2523 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2527 $ ENDIF !%Config-I-VMS, skip remaining "where install" questions
2529 $ IF F$TYPE(perl_symbol) .EQS. "" THEN perl_symbol := true
2530 $ IF F$TYPE(perl_verb) .EQS. "" THEN perl_verb = ""
2532 $ THEN bool_dflt = "y"
2533 $ ELSE bool_dflt = "n"
2538 $ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
2539 $ echo "symbol to invoke ''package', which is the usual method."
2540 $ echO "If you do not do so then you would need a DCL command verb at the"
2541 $ echo "process or the system wide level."
2543 $ rp = "Invoke perl as a global symbol foreign command? [''bool_dflt'] "
2545 $ IF (.NOT.ans) THEN perl_symbol = "false"
2547 $ IF (.NOT.perl_symbol)
2549 $ IF perl_verb .EQS. "DCLTABLES"
2550 $ THEN bool_dflt = "n"
2551 $ ELSE bool_dflt = "y"
2556 $ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
2557 $ echo "verb in a per-process table or in the system wide DCLTABLES (which"
2558 $ echo "would require write privilege)."
2560 $ rp = "Invoke perl as a per process command verb? [ ''bool_dflt' ] "
2563 $ THEN perl_verb = "DCLTABLES"
2564 $ ELSE perl_verb = "PROCESS"
2566 $ ENDIF ! (.NOT.perl_symbol)
2568 $ IF (.NOT.vms_skip_install)
2570 $!: set the prefixup variable, to restore leading tilde escape !sfn
2572 $!: determine where public architecture dependent libraries go
2576 $ echo "''package' contains architecture-dependent library files. If you are"
2582 sharing libraries in a heterogeneous environment, you might store
2583 these files in a separate location. Otherwise, you can just include
2584 them with the rest of the public library files.
2587 $ IF F$TYPE(archlib) .NES. ""
2588 $ THEN dflt = archlib
2589 $ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
2591 $ rp = "Where do you want to put the public architecture-dependent libraries? "
2592 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2596 $ ENDIF !%Config-I-VMS, skip "where install" questions
2597 $ IF (.NOT.vms_skip_install)
2599 $!: it so happens the Eunice I know will not run shell scripts in Unix format
2601 $!: see if setuid scripts can be secure !sfn
2602 $!: now see if they want to do setuid emulation !sfn
2604 $!: determine where site specific libraries go.
2610 The installation process will also create a directory for
2611 site-specific extensions and modules. Some users find it convenient
2612 to place all local files in this directory rather than in the main
2613 distribution directory.
2616 $ IF F$TYPE(sitelib) .NES. ""
2617 $ THEN dflt = sitelib
2618 $ ELSE dflt = privlib - "]" + ".SITE_PERL]"
2620 $ rp = "Pathname for the site-specific library files? "
2621 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2625 $!: determine where site specific architecture-dependent libraries go.
2627 $ THEN TYPE SYS$INPUT:
2630 The installation process will also create a directory for
2631 architecture-dependent site-specific extensions and modules.
2634 $ IF F$TYPE(sitearch) .NES. ""
2635 $ THEN dflt = sitearch
2636 $ ELSE dflt = sitelib - "]" + "." + archname + "]"
2638 $ rp = "Pathname for the site-specific architecture-dependent library files? "
2639 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2643 $!: determine where old public architecture dependent libraries might be
2645 $!: determine where public executables go
2646 $ IF F$TYPE(bin) .NES. ""
2648 $! ELSE dflt = prefix - ".]" + ".BIN]"
2649 $ ELSE dflt = "/''vms_prefix'"
2651 $ rp = "Pathname where the public executables will reside? "
2652 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2656 $!: determine where add-on public executables go
2657 $ IF F$TYPE(sitebin) .NES. ""
2658 $ THEN dflt = sitebin
2659 $ ELSE dflt = "''vms_prefix':[bin.''archname']"
2661 $ rp = "Pathname where the add-on public executables should be installed? "
2662 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2666 $!: determine where manual pages are on this system
2667 $!: What suffix to use on installed man pages
2668 $!: see if we can have long filenames
2669 $!: determine where library module manual pages go
2670 $!: What suffix to use on installed man pages
2671 $!: see what memory models we can support
2673 $ ELSE ! skipping "where install" questions, we must set some symbols
2674 $ IF F$TYPE(archlib).EQS."" THEN -
2675 archlib="''vms_prefix':[lib.''archname'.''version']"
2676 $ IF F$TYPE(bin) .EQS. "" THEN -
2677 bin="/''vms_prefix'"
2678 $ IF F$TYPE(privlib) .EQS. "" THEN -
2679 privlib ="''vms_prefix':[lib]"
2680 $ IF F$TYPE(sitearch) .EQS. "" THEN -
2681 sitearch="''vms_prefix':[lib.site_perl.''archname']"
2682 $ IF F$TYPE(sitelib) .EQS. "" THEN -
2683 sitelib ="''vms_prefix':[lib.site_perl]"
2684 $ IF F$TYPE(sitebin) .EQS. "" THEN -
2685 sitebin="''vms_prefix':[bin.''archname']"
2686 $ ENDIF !%Config-I-VMS, skip "where install" questions
2688 $! These derived locations can be set whether we've opted to
2689 $! skip the where install questions or not.
2691 $ IF F$TYPE(archlibexp) .EQS. "" THEN -
2692 archlibexp="''vms_prefix':[lib.''archname'.''version']"
2693 $ IF F$TYPE(binexp) .EQS. "" THEN -
2694 binexp ="''vms_prefix':[000000]"
2695 $ IF F$TYPE(builddir) .EQS. "" THEN -
2696 builddir ="''vms_prefix':[000000]"
2697 $ IF F$TYPE(installarchlib) .EQS. "" THEN -
2698 installarchlib="''vms_prefix':[lib.''archname'.''version']"
2699 $ IF F$TYPE(installbin) .EQS. "" THEN -
2700 installbin ="''vms_prefix':[000000]"
2701 $ IF F$TYPE(installscript) .EQS. "" THEN -
2702 installscript ="''vms_prefix':[utils]"
2703 $ IF F$TYPE(installman1dir) .EQS. "" THEN -
2704 installman1dir ="''vms_prefix':[man.man1]"
2705 $ IF F$TYPE(installman3dir) .EQS. "" THEN -
2706 installman3dir ="''vms_prefix':[man.man3]"
2707 $ IF F$TYPE(installprivlib) .EQS. "" THEN -
2708 installprivlib ="''vms_prefix':[lib]"
2709 $ IF F$TYPE(installsitearch) .EQS. "" THEN -
2710 installsitearch="''vms_prefix':[lib.site_perl.''archname']"
2711 $ IF F$TYPE(installsitelib) .EQS. "" THEN -
2712 installsitelib ="''vms_prefix':[lib.site_perl]"
2713 $ IF F$TYPE(oldarchlib) .EQS. "" THEN -
2714 oldarchlib="''vms_prefix':[lib.''archname']"
2715 $ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
2716 oldarchlibexp="''vms_prefix':[lib.''archname']"
2717 $ IF F$TYPE(privlibexp) .EQS. "" THEN -
2718 privlibexp ="''vms_prefix':[lib]"
2719 $ IF F$TYPE(scriptdir) .EQS. "" THEN -
2720 scriptdir ="''vms_prefix':[utils]"
2721 $ IF F$TYPE(sitearchexp) .EQS. "" THEN -
2722 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
2723 $ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
2724 sitelib_stem ="''vms_prefix':[lib.site_perl]"
2725 $ IF F$TYPE(sitelibexp) .EQS. "" THEN -
2726 sitelibexp ="''vms_prefix':[lib.site_perl]"
2728 $! determine whether to use malloc wrapping
2731 $ IF F$TYPE(usemallocwrap) .nes. ""
2733 $ if .NOT. usemallocwrap .or. usemallocwrap .eqs. "undef" then bool_dflt = "n"
2735 $ rp = "Do you wish to wrap malloc calls to protect against potential overflows? [''bool_dflt'] "
2738 $ THEN usemallocwrap = "define"
2739 $ ELSE usemallocwrap = "undef"
2742 $! Ask if they want to use perl's memory allocator
2744 $ echo "Perl has a built-in memory allocator that is tuned for normal"
2745 $ echo "memory usage. It is oftentimes better than the standard system"
2746 $ echo "memory allocator. It also has the advantage of providing memory"
2747 $ echo "allocation statistics, if you choose to enable them."
2749 $ IF F$TYPE(usemymalloc) .nes. ""
2751 $ if usemymalloc .or. usemymalloc .eqs. "define" then bool_dflt = "y"
2753 $ rp = "Do you wish to attempt to use the malloc that comes with ''package'? [''bool_dflt'] "
2758 $ IF use_debugging_perl
2761 $ echo "Perl can keep statistics on memory usage if you choose to use"
2762 $ echo "them. This is useful for debugging, but does have some"
2763 $ echo "performance overhead."
2765 $ rp = "Do you want the debugging memory allocator? [''bool_dflt'] "
2767 $ use_debugmalloc = ans
2769 $ ! Check which memory allocator we want
2771 $ echo "There are currently three different memory allocators: the"
2772 $ echo "default (which is a pretty good general-purpose memory manager),"
2773 $ echo "the TWO_POT allocator (which is optimized to save memory for"
2774 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save"
2775 $ echo "memory for smaller allocations). They're all good, but if your"
2776 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use"
2777 $ echo "PACK_MALLOC."
2779 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2781 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2782 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2785 $ xs_extensions = ""
2787 $ OPEN/READ CONFIG 'manifestfound'
2789 $ READ/END_OF_FILE=end_ext/ERROR=end_ext CONFIG line
2790 $ IF F$EXTRACT(0,4,line) .NES. "ext/" .AND. -
2791 F$EXTRACT(0,5,line) .NES. "dist/".AND. -
2792 F$EXTRACT(0,5,line) .NES. "cpan/" THEN goto ext_loop
2793 $ line = F$EDIT(line,"COMPRESS")
2794 $ line = F$ELEMENT(0," ",line)
2795 $ IF F$EXTRACT(0,4,line) .EQS. "ext/"
2797 $ xxx = F$ELEMENT(1,"/",line)
2798 $ IF F$SEARCH("[-.ext]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2800 $ IF F$EXTRACT(0,5,line) .EQS. "dist/"
2802 $ xxx = F$ELEMENT(1,"/",line)
2803 $ IF F$SEARCH("[-.dist]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2805 $ IF F$EXTRACT(0,5,line) .EQS. "cpan/"
2807 $ xxx = F$ELEMENT(1,"/",line)
2808 $ IF F$SEARCH("[-.cpan]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2810 $ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit
2812 $! (extspec = xxx) =~ tr!-!/!
2815 $ extension_dir_name = xxx
2816 $ replace_dash_with_slash:
2817 $ before = F$ELEMENT(idx, "-", xxx)
2818 $ IF before .EQS. "-" THEN goto end_replace_dash_with_slash
2819 $ IF extspec .NES. ""
2821 $ extspec = extspec + "/"
2823 $ extspec = extspec + before
2825 $ goto replace_dash_with_slash
2827 $ end_replace_dash_with_slash:
2829 $ IF extspec .EQS. "Scalar/List/Utils" THEN extspec = "List/Util"
2830 $ IF extspec .EQS. "PathTools" THEN extspec = "Cwd"
2832 $ xxx = xs_extensions
2833 $ gosub may_already_have_extension
2837 $ gosub may_already_have_extension
2842 $ gosub may_already_have_extension
2844 $ IF $STATUS .NE. 1 THEN goto ext_loop
2845 $ goto found_new_extension
2847 $ may_already_have_extension:
2848 $ idx = F$LOCATE(extspec, xxx)
2849 $ extlen = F$LENGTH(xxx)
2850 $ IF idx .EQ. extlen THEN return 1 ! didn't find it
2851 $! But "Flirble" may just be part of "Acme-Flirble". This is not
2852 $! bullet-proof because we may only be looking at one chunk of the
2853 $! existing extension list.
2854 $ IF idx .GT. 0 .AND. F$EXTRACT(idx - 1, 1, xxx) .NES. " "
2856 $ xxx = F$EXTRACT(idx + F$LENGTH(extspec) + 1, extlen, xxx)
2857 $ GOTO may_already_have_extension
2859 $! But "Foo" may just be part of "Foo-Bar" so check for equality.
2860 $ xxx = F$EXTRACT(idx, extlen - idx, xxx)
2861 $ IF F$ELEMENT(0, " ", xxx) .EQS. extspec
2865 $ xxx = F$EXTRACT(F$LENGTH(extspec) + 1, extlen, xxx)
2866 GOTO may_already_have_extension
2869 $ found_new_extension:
2870 $ IF F$SEARCH("[-.ext.''extension_dir_name']*.xs") .EQS. "" -
2871 .AND. F$SEARCH("[-.dist.''extension_dir_name']*.xs") .EQS. "" -
2872 .AND. F$SEARCH("[-.cpan.''extension_dir_name']*.xs") .EQS. "" -
2873 .AND. extension_dir_name .NES. "VMS-Filespec"
2875 $! Bit if a hack to get around the 1K buffer on older systems.
2876 $ IF F$LENGTH(nonxs_ext) .GT. 950
2878 $ nonxs_ext2 = nonxs_ext2 + " ''extspec'"
2880 $ nonxs_ext = nonxs_ext + " ''extspec'"
2883 $ xs_extensions = xs_extensions + " ''extspec'"
2890 $ DELETE/SYMBOL extspec
2891 $ DELETE/SYMBOL extlen
2892 $ DELETE/SYMBOL extension_dir_name
2893 $ xs_extensions = F$EDIT(xs_extensions,"TRIM,COMPRESS")
2894 $ dflt = xs_extensions
2895 $ dflt = dflt - "ByteLoader" ! needs to be ported
2896 $ dflt = dflt - "DB_File" ! needs to be ported
2897 $ dflt = dflt - "GDBM_File" ! needs porting/special library
2898 $ dflt = dflt - "IPC/SysV" ! needs to be ported
2899 $ dflt = dflt - "NDBM_File" ! needs porting/special library
2900 $ dflt = dflt - "ODBM_File" ! needs porting/special library
2901 $ dflt = dflt - "Sys/Syslog" ! needs porting/special library "GDBM_File macro LOG_DEBUG"
2902 $ IF .NOT. Has_Dec_C_Sockets
2904 $ dflt = dflt - "Socket" ! optional on VMS
2906 $ dflt = dflt - "Win32API/File" - "Win32" ! need Dave Cutler's other project
2907 $ nonxs_ext = nonxs_ext - "Win32CORE"
2908 $ nonxs_ext2 = nonxs_ext2 - "Win32CORE"
2909 $ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
2910 $ nonxs_ext = F$EDIT(nonxs_ext,"TRIM,COMPRESS")
2911 $ nonxs_ext2 = F$EDIT(nonxs_ext2,"TRIM,COMPRESS")
2913 $! Ask for their default list of extensions to build
2915 $ echo "It is time to specify which modules you want to build into"
2916 $ echo "perl. Most of these are standard and should be chosen, though"
2917 $ echo "you might, for example, want to build GDBM_File instead of"
2918 $ echo "SDBM_File if you have the GDBM library built on your machine."
2920 $ echo "Which modules do you want to build into perl?"
2923 $ dynamic_ext = F$EDIT(ans,"TRIM,COMPRESS")
2925 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2927 $ echo "Checking your ""make"" utilities..."
2928 $! If the 'build' that you use is not here add it and it's test
2929 $! switch to the _END_ of these strings (and increment max_build)
2930 $! (e.g. builders = builders + "/FOOMAKE"
2931 $! probers = probers + " -fooVersionSwitch"
2932 $! ) & please let me know about it.
2933 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2934 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2937 $ orig_dflt = f$edit(builder,"UPCASE")
2938 $ if orig_dflt .eqs. "" then orig_dflt = "MMK"
2941 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2942 $ WRITE CONFIG "dont_make_anything_yet:"
2943 $ WRITE CONFIG F$FAO("!_")
2946 $ messages = F$ENVIRONMENT("MESSAGE")
2948 $ build = F$ELEMENT(n,"/",builders)
2949 $ probe = F$ELEMENT(n,"!",probers)
2950 $ echo "Testing whether you have ''build' on your system..."
2952 $! Noted with GNU Make version 3.60 that the $status and $severity
2953 $! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2954 $! $SEVERITY == "4".
2957 $ ON CONTROL_Y THEN GOTO Reenable_messages_build
2958 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
2960 $ IF ($SEVERITY .EQ. 1) ! not adequate?
2963 $ IF (build .EQS. orig_dflt)
2965 $ default_set = "TRUE"
2968 $ ok_builders = ok_builders + " " + build
2969 $ IF (.NOT. default_set) THEN dflt = build
2973 $Reenable_messages_build:
2974 $ SET MESSAGE 'messages'
2976 $ on control_y then goto clean_up
2978 $ IF (n .LT. max_build) THEN GOTO Build_probe
2981 $ IF (ok_builders .NES. "")
2983 $ echo "Here is the list of builders you can apparently use:"
2984 $ echo "(",ok_builders," )"
2985 $ rp = "Which """"make"""" utility do you wish to use? [''dflt'] "
2987 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2988 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2997 %Config-E-VMS, ERROR:
2998 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
2999 utility of some sort and after checking my "builders" list I cannot find
3000 the symbol or command you use on your system to compile programs.
3003 $ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
3004 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
3005 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
3008 $ echo "I do not know where ""make"" is, and my life depends on it."
3009 $ echo "Go find a make program or fix your DCL$PATH setting!"
3010 $ echo "ABORTING..."
3011 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
3013 $ EXIT 2 !$STATUS = "%X00000002" (error)
3019 $ DELETE/NOLOG/NOCONFIRM Makefile.;
3025 There seems to be trouble. I just tried to create a file in
3027 $ echo4 'F$ENVIRONMENT("DEFAULT")'
3030 but was unsuccessful. I am stopping now. Please check that directories'
3031 PROTECTION bits. I will leave you in the directory where you started
3034 $ echo4 "ABORTING..."
3040 $! echo " Very well I will proceed with ""''build'"""
3041 $ make = F$EDIT(build,"UPCASE")
3043 $!: locate the preferred pager for this system
3044 $!pagers = "most|more|less|type/page"
3045 $ IF osvers .GES. "V6.1"
3047 $ dflt = "type/page=save=10"
3049 $ dflt = "type/page"
3051 $! assume that the presence of a most symbol indicates the presence
3053 $ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most"
3054 $ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager
3055 $ rp="What pager is used on your system? [''dflt'] "
3059 $! update makefile here
3060 $! echo4 "Updating makefile..."
3062 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
3064 $ makefile = "" !wrt MANIFEST dir
3065 $ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
3066 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
3067 $ Makefile_SH = "descrip_mms.template"
3069 $ makefile = " -f Makefile." !wrt MANIFEST dir
3070 $ UUmakefile = "[-]Makefile." !wrt CWD dir
3071 $ DEFmakefile = "Makefile." !wrt DEF dir (?)
3072 $ Makefile_SH = "Makefile.in"
3075 $ IF macros .NES. ""
3077 $ tmp = F$LENGTH(macros)
3078 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
3079 $ macros = "/macro=(" + macros + ")"
3081 $! Build up the extra C flags
3085 $ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm"
3087 $ IF (F$ELEMENT(0, "-", archname).EQS."VMS_IA64")
3089 $ extra_flags = "''extra_flags'" + "/float=g_float"
3093 $ IF be_case_sensitive
3095 $ names_flags = "AS_IS"
3097 $ IF shorten_long_symbols
3099 $ IF be_case_sensitive
3101 $ names_flags = "''names_flags',SHORTENED"
3103 $ names_flags = "SHORTENED"
3106 $ IF F$LENGTH(names_flags) .ne. 0
3108 $ extra_flags = "''extra_flags'" + "/NAMES=(''names_flags')"
3110 $ DELETE/SYMBOLS names_flags
3111 $ extra_flags = "''extra_flags'" + "''user_c_flags'"
3113 $ min_pgflquota = "100000"
3114 $ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
3115 $ IF pgflquota .LES. min_pgflquota
3117 $ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
3118 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
3121 $ echo4 "Continuing..."
3123 $ echo4 "ABORTING..."
3129 $ echo4 "Checking the C run-time library."
3131 $! Former SUBCONFIGURE.COM
3133 $! - build a config.sh for VMS Perl.
3134 $! - use built config.sh to take config_h.SH -> config.h
3135 $! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
3136 $! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
3137 $! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
3139 $! Note for folks from other platforms changing things in here:
3141 $! Fancy changes (based on compiler capabilities or VMS version or
3142 $! whatever) are tricky, so go ahead and punt on those.
3144 $! Simple changes, though (say, always setting something to 1, or undef,
3145 $! or something like that) are straightforward. Adding a new constant
3146 $! item for the ultimately created config.sh requires at least one
3147 $! (possibly more) line(s) to this file.
3149 $! Add a line in the format:
3151 $! $ WC "foo='undef'"
3153 $! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
3154 $! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
3155 $! is sorted ASCII and corresponds to the output of config.sh in the
3156 $! Bourne shell version of Configure).
3157 $! Be very careful with quoting, as it can be tricky.
3158 $! For example if instead of a constant string like 'undef' or 'define'
3159 $! you wanted to add something to VMS's config.sh that looks like:
3163 $! then add a line that looks like this before the
3164 $! '##END WRITE NEW CONSTANTS HERE##' tagged line:
3166 $! $ WC "blank_string='" + "'"
3168 $! (+ is the string concatenator and "''var'" has the effect
3169 $! of "${var}" in perl or sh, but "'const'" is not interpolated).
3171 $! Note that unitialized variables, such as a line like:
3173 $! $ WC "new_var='" + new_var + "'"
3175 $! should be avoided unless new_var has a value assigned prior
3176 $! to that line (think of perl's -w warnings).
3178 $! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
3182 $ vms_ver = F$EXTRACT(1,3, osvers)
3183 $ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
3184 $ MCC = f$edit(mcc, "UPCASE")
3185 $ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
3186 $ IF ccname .EQS. "DEC"
3188 $ Checkcc := "''Mcc'/prefix=all"
3190 $ IF ccname .EQS. "CXX"
3194 $ Checkcc := "''Mcc'"
3197 $ ccflags = ccflags + extra_flags
3198 $ IF be_case_sensitive
3200 $ d_vms_be_case_sensitive = "define"
3202 $ d_vms_be_case_sensitive = "undef"
3204 $ IF shorten_long_symbols
3206 $ d_vms_shorten_long_symbols = "define"
3208 $ d_vms_shorten_long_symbols = "undef"
3210 $! Some constant defaults.
3211 $ hwname = f$getsyi("HW_NAME")
3212 $ myname = myhostname
3213 $ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
3218 $! FIXME -- This section does not really handle all the different permutations
3219 $! of 64-bitness, and it does not provide for the /POINTER_SIZE=64 compiler
3220 $! option that would be necessary to support the "explicit 64-bit interfaces"
3221 $! promised by -Dusemorebits.
3223 $ usemorebits = "undef"
3224 $ IF use64bitint .OR. use64bitint .EQS. "define"
3226 $ use64bitint = "define"
3227 $ ivdformat="""Ld"""
3228 $ uvuformat="""Lu"""
3229 $ uvoformat="""Lo"""
3230 $ uvxformat="""Lx"""
3231 $ uvXUformat="""LX"""
3233 $ use64bitint = "undef"
3234 $ ivdformat="""ld"""
3235 $ uvuformat="""lu"""
3236 $ uvoformat="""lo"""
3237 $ uvxformat="""lx"""
3238 $ uvXUformat="""lX"""
3240 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
3242 $ uselongdouble = "define"
3244 $ nveformat="""Le"""
3245 $ nvEUformat="""LE"""
3246 $ nvfformat="""Lf"""
3247 $ nvFUformat="""LF"""
3248 $ nvgformat="""Lg"""
3249 $ nvGUformat="""LG"""
3251 $ uselongdouble = "undef"
3253 $ nvEUformat="""E"""
3255 $ nvFUformat="""F"""
3257 $ nvGUformat="""G"""
3259 $ IF use64bitall .OR. use64bitall .EQS. "define"
3261 $ use64bitall = "define"
3263 $ use64bitall = "undef"
3265 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
3267 $ uselargefiles = "define"
3269 $ uselargefiles = "undef"
3272 $ usemymalloc = "undef"
3273 $ if mymalloc then usemymalloc = "define"
3277 $ IF (sharedperl .AND. F$ELEMENT(0, "-", archname) .EQS. "VMS_AXP")
3285 $ IF (sharedperl .AND. F$ELEMENT(0, "-", archname) .EQS. "VMS_IA64")
3300 $ dlobj="dl_vms''obj_ext'"
3302 $ cppstdin="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
3304 $ cpprun="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
3312 $ THEN d_mymalloc="define"
3313 $ ELSE d_mymalloc="undef"
3318 $ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
3319 $ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
3324 $! perllibs should be libs with all non-core libs (such as gdbm) removed.
3329 $ IF F$ELEMENT(0, "-", archname) .NES. "VMS_VAX"
3331 $ d_PRId64 = "define"
3332 $ d_PRIi64 = "define"
3333 $ d_PRIu64 = "define"
3334 $ d_PRIo64 = "define"
3335 $ d_PRIx64 = "define"
3336 $ d_PRIXU64 = "define"
3337 $ sPRId64 = """Ld"""
3338 $ sPRIXU64 = """LX"""
3339 $ sPRIi64 = """Li"""
3340 $ sPRIo64 = """Lo"""
3341 $ sPRIu64 = """Lu"""
3342 $ sPRIx64 = """Lx"""
3344 $ quadtype = "long long"
3345 $ uquadtype = "unsigned long long"
3348 $ d_frexpl = "define"
3349 $ d_ldexpl = "define"
3350 $ d_modfl = "define"
3351 $ d_modflproto = "define"
3353 $ d_PRId64 = "undef"
3354 $ d_PRIi64 = "undef"
3355 $ d_PRIXU64 = "undef"
3356 $ d_PRIu64 = "undef"
3357 $ d_PRIo64 = "undef"
3358 $ d_PRIx64 = "undef"
3360 $ sPRIXU64 = """lX"""
3366 $ quadtype = "undef"
3367 $ uquadtype = "undef"
3368 $ quadkind = "undef"
3370 $ d_frexpl = "undef"
3371 $ d_ldexpl = "undef"
3373 $ d_modflproto = "undef"
3376 $ IF useieee .OR. useieee .EQS. "define"
3378 $ d_acosh = "define"
3379 $ d_asinh = "define"
3380 $ d_atanh = "define"
3382 $ d_copysign = "define"
3386 $ d_expm1 = "define"
3391 $ d_fp_classify = "define"
3392 $ d_hypot = "define"
3393 $ d_ilogb = "define"
3394 $ d_isnan = "define"
3395 $ d_isnanl = "define"
3396 $ d_isnormal = "define"
3398 $ d_lgamma = "define"
3399 $ d_log1p = "define"
3402 $ d_lrint = "define"
3403 $ d_lround = "define"
3404 $ d_nearbyint = "define"
3405 $ d_nextafter = "define"
3406 $ d_nexttoward = "define"
3407 $ d_remainder = "define"
3408 $ d_remquo = "define"
3410 $ d_tgamma = "define"
3411 $ d_trunc = "define"
3412 $ d_truncl = "define"
3418 $ d_copysign = "undef"
3427 $ d_fp_classify = "undef"
3431 $ d_isnanl = "undef"
3432 $ d_isnormal = "undef"
3434 $ d_lgamma = "undef"
3439 $ d_lround = "undef"
3440 $ d_nearbyint = "undef"
3441 $ d_nextafter = "undef"
3442 $ d_nexttoward = "undef"
3443 $ d_remainder = "undef"
3444 $ d_remquo = "undef"
3446 $ d_tgamma = "undef"
3448 $ d_truncl = "undef"
3451 $! Now some that we build up
3453 $ use5005threads = "undef"
3454 $ d_old_pthread_create_joinable = "undef"
3455 $ old_pthread_create_joinable = " "
3458 $ useithreads = "define"
3460 $ useithreads = "undef"
3463 $! Some that we need to invoke the compiler for
3466 $! handy construction aliases/symbols
3468 $ OS := "open/write CONFIG []try.c"
3469 $ WS := "write CONFIG"
3470 $ CS := "close CONFIG"
3471 $ DS := "delete/nolog/noconfirm []try.*;*"
3473 $ good_compile = %X10B90001
3474 $ IF ccname .EQS. "GCC"
3476 $ open/write OPTCHAN []try.opt
3477 $ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
3478 $ write OPTCHAN "Sys$Share:VAXCRTL/Share"
3481 $ good_compile = %X10000001
3483 $ IF ccname .EQS. "CXX"
3485 $ good_compile = %X15F60001
3487 $ good_link = %X10000001
3488 $ tmp = "" ! null string default
3490 $ GOTO beyond_compile_ok
3492 $! Check for type sizes
3497 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3498 $ WS "#include <stdlib.h>"
3500 $ WS "#include <stdio.h>"
3503 $ WS "printf(""%d\n"", sizeof(''tmp'));"
3510 $!: locate header file
3514 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3515 $ WS "#include <stdlib.h>"
3517 $ WS "#include <stdio.h>"
3518 $ WS "#include <''tmp'>"
3521 $ WS "printf(""define\n"");"
3528 $!: define an alternate in-header-list? function
3532 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3534 $ echo4 "<''tmp'> found."
3537 $ echo4 "<''tmp'> NOT found."
3542 $!: define an is-in-libc? function
3545 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3547 $ echo4 "''tmp'() found."
3550 $ echo4 "''tmp'() NOT found."
3555 $!: define a shorthand compile call
3559 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3561 $ OPEN/WRITE CONFIG []try.out
3562 $ DEFINE/USER_MODE SYS$ERROR CONFIG
3563 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
3566 $ OPEN/READ CONFIG []try.out
3569 $ DELETE/NOLOG/NOCONFIRM []try.out;
3570 $ DELETE/NOLOG/NOCONFIRM []try.exe;
3572 $ tmp = "" ! null string default
3578 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3579 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3583 $ 'ld' try.obj,try.opt/opt
3584 $ link_status = $status
3587 $ link_status = $status
3590 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
3593 $!: define a shorthand compile call for compilations that should be ok.
3595 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3596 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3599 $ compile_status = $status
3601 $ DELETE/NOLOG/NOCONFIRM try.c;
3606 $! Check for __STDC__
3609 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3610 $ WS "#include <stdlib.h>"
3612 $ WS "#include <stdio.h>"
3615 $ WS "#ifdef __STDC__"
3616 $ WS "printf(""42\n"");"
3617 $ WS "#elif defined (__STD_ANSI)" ! for CXX
3618 $ WS "printf(""42\n"");"
3620 $ WS "printf(""1\n"");"
3627 $ IF F$INTEGER(tmp) .eq. 42
3629 $ echo4 "Oh! Smells like ANSI's been here."
3630 $ echo "We can catify or stringify, separately or together!"
3633 $! Check for double size
3635 $ echo4 "Checking to see how big your double precision numbers are..."
3637 $ GOSUB type_size_check
3639 $ echo "Your double is ''doublesize' bytes long."
3641 $! Check for long double size
3644 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3645 $ WS "#pragma message disable ALL" ! VAX compilers may have distracting informationals
3646 $ WS "#include <stdlib.h>"
3648 $ WS "#include <stdio.h>"
3651 $ WS "printf(""%d\n"", sizeof(long double));"
3655 $ echo4 "Checking to see if you have long double..."
3657 $ IF link_status .NE. good_link
3662 $ echo "You do not have long double."
3664 $ echo "You have long double."
3665 $ echo4 "Checking to see how big your long doubles are..."
3669 $ d_longdbl = "define"
3670 $ echo "Your long doubles are ''longdblsize' bytes long."
3673 $ IF d_longdbl .OR. d_longdbl .EQS. "define"
3675 $ d_PRIEUldbl = "define"
3676 $ d_PRIFUldbl = "define"
3677 $ d_PRIGUldbl = "define"
3678 $ d_PRIeldbl = "define"
3679 $ d_PRIfldbl = "define"
3680 $ d_PRIgldbl = "define"
3681 $ sPRIEUldbl = """LE"""
3682 $ sPRIFUldbl = """LF"""
3683 $ sPRIGUldbl = """LG"""
3684 $ sPRIeldbl = """Le"""
3685 $ sPRIfldbl = """Lf"""
3686 $ sPRIgldbl = """Lg"""
3688 $ d_PRIEUldbl = "undef"
3689 $ d_PRIFUldbl = "undef"
3690 $ d_PRIGUldbl = "undef"
3691 $ d_PRIeldbl = "undef"
3692 $ d_PRIfldbl = "undef"
3693 $ d_PRIgldbl = "undef"
3701 $ d_SCNfldbl = d_PRIfldbl
3702 $ sSCNfldbl = sPRIfldbl ! expect consistency
3704 $!: check for long long
3706 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3707 $ WS "#include <stdlib.h>"
3709 $ WS "#include <stdio.h>"
3712 $ WS "printf(""%d\n"", sizeof(long long));"
3716 $ echo4 "Checking to see if you have long long..."
3718 $ IF link_status .NE. good_link
3721 $ d_longlong="undef"
3722 $ echo "You do not have long long."
3724 $ echo "You have long long."
3725 $ echo4 "Checking to see how big your long longs are..."
3727 $ longlongsize = tmp
3728 $ d_longlong = "define"
3729 $ echo "Your long longs are ''longlongsize' bytes long."
3732 $! Check the prototype for getgid
3734 $ echo "Looking for the type for group ids returned by getgid()."
3736 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3737 $ WS "#include <stdlib.h>"
3739 $ WS "#include <stdio.h>"
3740 $ WS "#include <types.h>"
3748 $ IF compile_status .NE. good_compile
3750 $! Okay, gid_t failed. Must be unsigned int
3751 $ gidtype = "unsigned int"
3752 $ echo4 "assuming ""''gidtype'""."
3755 $ echo4 "gid_t found."
3758 $! Check to see if we've got dev_t
3760 $ echo "Looking for the type for dev."
3762 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3763 $ WS "#include <stdlib.h>"
3765 $ WS "#include <stdio.h>"
3766 $ WS "#include <types.h>"
3774 $ IF compile_status .NE. good_compile
3776 $! Okay, dev_t failed. Must be unsigned int
3777 $ devtype = "unsigned int"
3778 $ echo4 "assuming ""''devtype'""."
3781 $ echo4 "dev_t found."
3784 $! Check to see if we've got unistd.h (which we ought to, but you never know)
3791 $! Check to see if we've got utime.h (which we should use if we have)
3798 $! do we have getppid()?
3800 $ IF i_unistd .EQS. "define"
3803 $ WS "#include <stdio.h>"
3804 $ WS "#include <unistd.h>"
3806 $ WS "printf(""%d\n"",getppid());"
3814 $ d_getppid = "undef"
3817 $!: see if this is a libutil.h system
3823 $! Check to see if we've got shadow.h (probably not, but...)
3829 $! Check to see if we've got socks.h (probably not, but...)
3835 $! Check the prototype for select
3837 $ IF Has_Dec_C_Sockets
3840 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3841 $ WS "#include <stdlib.h>"
3843 $ WS "#include <stdio.h>"
3844 $ WS "#include <types.h>"
3845 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3846 $ WS "#include <time.h>"
3847 $ WS "#include <socket.h>"
3853 $ WS "bar = select(2, foo, foo, foo, NULL);"
3858 $ IF compile_status .NE. good_compile
3860 $! Okay, select failed. Must be an int *
3861 $ selecttype = "int *"
3862 $ echo4 "select() NOT found."
3864 $ selecttype="fd_set *"
3865 $ echo4 "select() found."
3868 $ ! No sockets, so stick in an int * : no select, so pick a harmless default
3869 $ selecttype = "int *"
3872 $! Check to see if fd_set exists
3874 $ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3876 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3877 $ WS "#include <stdlib.h>"
3879 $ WS "#include <stdio.h>"
3880 $ WS "#include <types.h>"
3881 $ IF Has_Dec_C_Sockets
3883 $ WS "#include <time.h>"
3884 $ WS "#include <socket.h>"
3894 $ IF compile_status .ne. good_compile
3896 $! Okay, fd_set failed. Must not exist
3897 $ d_fd_set = "undef"
3898 $ echo4 "Hmm, your compiler has some difficulty with fd_set."
3901 $ echo4 "Well, your system knows about the normal fd_set typedef..."
3904 $! Check for inttypes.h
3906 $ tmp = "inttypes.h"
3910 $! Check to see if off64_t exists
3912 $ echo4 "Checking to see if you have off64_t..."
3914 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3915 $ WS "#include <stdlib.h>"
3917 $ WS "#include <stdio.h>"
3918 $ WS "#include <types.h>"
3919 $ WS "#''i_inttypes' IIH"
3921 $ WS "#include <inttypes.h>"
3930 $ IF compile_status .EQ. good_compile
3932 $ d_off64_t="define"
3933 $ echo "You have off64_t."
3935 $ d_off64_t = "undef"
3936 $ echo "You do not have off64_t."
3939 $! Check to see if fpos64_t exists
3941 $ echo4 "Checking to see if you have fpos64_t..."
3943 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3944 $ WS "#include <stdlib.h>"
3946 $ WS "#include <stdio.h>"
3947 $ WS "#include <types.h>"
3948 $ WS "#''i_inttypes' IIH"
3950 $ WS "#include <inttypes.h>"
3954 $ WS "fpos64_t bar;"
3959 $ IF compile_status .EQ. good_compile
3961 $ d_fpos64_t="define"
3962 $ echo "You have fpos64_t."
3964 $ d_fpos64_t = "undef"
3965 $ echo "You do not have fpos64_t."
3968 $! Check to see if int64_t exists
3970 $ echo4 "Checking to see if you have int64_t..."
3972 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3973 $ WS "#include <stdlib.h>"
3975 $ WS "#include <stdio.h>"
3976 $ WS "#include <types.h>"
3977 $ WS "#''i_inttypes' IIH"
3979 $ WS "#include <inttypes.h>"
3988 $ IF compile_status .EQ. good_compile
3990 $ d_int64_t="define"
3991 $ echo "You have int64_t."
3993 $ d_int64_t = "undef"
3994 $ echo "You do not have int64_t."
3997 $! Check to see if fseeko exists
4000 $ WS "#include <stdio.h>"
4003 $ WS "FILE *f=NULL;"
4004 $ WS "fseeko(f,(off_t)0,SEEK_SET);"
4012 $! Check to see if ftello exists
4015 $ WS "#include <stdio.h>"
4018 $ WS "FILE *f=NULL; off_t o=0;"
4027 $!: see if this is a netdb.h system
4028 $ IF Has_Dec_C_Sockets
4035 $! Check for h_errno
4037 $ echo4 "Checking to see if you have h_errno..."
4039 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4040 $ WS "#include <stdlib.h>"
4042 $ WS "#include <stdio.h>"
4043 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
4044 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4052 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4055 $ echo "You have h_errno."
4058 $ echo "You do not have h_errno."
4061 $! Check to see if gethostname exists
4063 $ IF Has_Dec_C_Sockets
4066 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4067 $ WS "#include <stdlib.h>"
4069 $ WS "#include <stdio.h>"
4070 $ WS "#include <types.h>"
4071 $ WS "#include <time.h>"
4072 $ WS "#include <socket.h>"
4075 $ WS "char name[100];"
4076 $ WS "int bar, baz;"
4078 $ WS "baz = gethostname(name, bar);"
4083 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4085 $ d_gethname="define"
4086 $ echo4 "gethostname() found."
4088 $ d_gethname="undef"
4091 $ ! No sockets, so no gethname
4092 $ d_gethname = "undef"
4095 $! Check for sys/file.h
4097 $ tmp = "sys/file.h"
4102 $! Check for sys/ioctl.h
4104 $ tmp = "sys/ioctl.h"
4108 $! Check for sys/utsname.h
4110 $ tmp = "sys/utsname.h"
4112 $ i_sysutsname = tmp
4114 $! Check for syslog.h
4126 $! Check for sys/uio.h
4132 $! Check for sys/mode.h
4134 $ tmp = "sys/mode.h"
4140 $ tmp = "sys/poll.h"
4144 $! Check for sys/access.h
4146 $ tmp = "sys/access.h"
4150 $! Check for sys/security.h
4152 $ tmp = "sys/security.h"
4156 $! Check for fcntl.h
4165 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4166 $ WS "#include <stdlib.h>"
4168 $ WS "#include <stdio.h>"
4169 $ WS "#include <fcntl.h>"
4172 $ WS "fcntl(1,2,3);"
4180 $! Check for fcntl locking capability
4182 $ echo4 "Checking if fcntl-based file locking works... "
4184 $ IF d_fcntl .EQS. "define"
4187 $ WS "#include <stdio.h>"
4188 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4189 $ WS "#include <stdlib.h>"
4191 $ WS "#include <fcntl.h>"
4192 $ WS "#include <unistd.h>"
4194 $ WS "#if defined(F_SETLK) && defined(F_SETLKW)"
4195 $ WS " struct flock flock;"
4196 $ WS " int retval, fd;"
4197 $ WS " fd = open(""[-]perl.c"", O_RDONLY);"
4198 $ WS " flock.l_type = F_RDLCK;"
4199 $ WS " flock.l_whence = SEEK_SET;"
4200 $ WS " flock.l_start = flock.l_len = 0;"
4201 $ WS " retval = fcntl(fd, F_SETLK, &flock);"
4203 $ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));"
4205 $ WS " printf(""undef\n"");"
4210 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4213 $ IF tmp .EQS. "define"
4215 $ echo4 "Yes, it seems to work."
4217 $ echo4 "Nope, it didn't work."
4220 $ echo4 "I'm unable to compile the test program, so I'll assume not."
4224 $ echo4 "Nope, since you don't even have fcntl()."
4226 $ d_fcntl_can_lock = tmp
4231 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4232 $ WS "#include <stdlib.h>"
4234 $ WS "#include <string.h>"
4237 $ WS "char * place;"
4238 $ WS "place = (char *)memchr(""foo"", 47, 3);"
4246 $! Check for strtoull
4249 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4250 $ WS "#include <stdlib.h>"
4252 $ WS "#include <string.h>"
4255 $ WS "unsigned __int64 result;"
4256 $ WS "result = strtoull(""123123"", NULL, 10);"
4264 $! Check for strtouq
4267 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4268 $ WS "#include <stdlib.h>"
4270 $ WS "#include <string.h>"
4273 $ WS "unsigned __int64 result;"
4274 $ WS "result = strtouq(""123123"", NULL, 10);"
4282 $! Check for strtoll
4285 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4286 $ WS "#include <stdlib.h>"
4288 $ WS "#include <string.h>"
4291 $ WS "__int64 result;"
4292 $ WS "result = strtoll(""123123"", NULL, 10);"
4303 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4304 $ WS "#include <stdlib.h>"
4306 $ WS "#include <string.h>"
4309 $ WS "__int64 result;"
4310 $ WS "result = strtoq(""123123"", NULL, 10);"
4318 $! Check for strtold
4321 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4322 $ WS "#include <stdlib.h>"
4324 $ WS "#include <string.h>"
4327 $ WS "long double result;"
4328 $ WS "result = strtold(""123123"", NULL, 10);"
4339 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4340 $ WS "#include <stdlib.h>"
4342 $ WS "#include <string.h>"
4345 $ WS " __int64 result;"
4346 $ WS "result = atoll(""123123"");"
4357 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4358 $ WS "#include <stdlib.h>"
4360 $ WS "#include <string.h>"
4364 $ WS "result = atolf(""123123"");"
4375 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4376 $ WS "#include <stdlib.h>"
4378 $ WS "#include <stdio.h>"
4381 $ WS "access(""foo"", F_OK);"
4392 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4393 $ WS "#include <stdlib.h>"
4395 $ WS "#include <stdio.h>"
4396 $ WS "#include <strings.h>"
4399 $ WS "char foo[10];"
4400 $ WS "bzero(foo, 10);"
4411 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4412 $ WS "#include <stdlib.h>"
4414 $ WS "#include <stdio.h>"
4415 $ WS "#include <strings.h>"
4418 $ WS "char foo[10], bar[10];"
4419 $ WS "bcopy(""foo"", bar, 3);"
4427 $! Check for mkstemp
4430 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4431 $ WS "#include <stdlib.h>"
4433 $ WS "#include <stdio.h>"
4436 $ WS "mkstemp(""foo"");"
4444 $! Check for mkstemps
4447 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4448 $ WS "#include <stdlib.h>"
4450 $ WS "#include <stdio.h>"
4453 $ WS "mkstemps(""foo"", 1);"
4461 $! Check for mkdtemp
4464 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4465 $ WS "#include <stdlib.h>"
4467 $ WS "#include <stdio.h>"
4470 $ WS "mkdtemp(""foo"");"
4480 $ if i_poll .eqs. "define"
4483 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4484 $ WS "#include <stdlib.h>"
4486 $ WS "#include <poll.h>"
4489 $ WS "struct pollfd pfd;"
4490 $ WS "int count=poll(&pfd,1,0);"
4501 $! Check for setvbuf
4504 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4505 $ WS "#include <stdlib.h>"
4507 $ WS "#include <stdio.h>"
4511 $ WS "char Buffer[99];"
4512 $ WS "foo = fopen(""foo"", ""r"");"
4513 $ WS "setvbuf(foo, Buffer, 0, 0);"
4521 $! Check for the shm* routines.
4524 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4525 $ WS "#include <stdlib.h>"
4527 $ WS "#include <stdio.h>"
4528 $ WS "#include <sys/shm.h>"
4529 $ WS "#include <sys/stat.h>"
4530 $ WS "int shmget(key_t key, size_t size, int shmflg);"
4531 $ WS "void* shmat(int shmid,const void *shmaddr,int shmflg);"
4532 $ WS "int shmctl(int shmid, int cmd, struct shmid_ds *buf);"
4533 $ WS "int shmdt(const void *shmaddr);"
4535 $ WS "int shm_id = shmget(IPC_PRIVATE, 8, S_IRWXU);"
4536 $ WS "if (shm_id == -1) printf(""0\n""); else printf (""1\n"");"
4543 $ d_shmat = "define"
4544 $ d_shmatprototype = "define"
4545 $ d_shmctl = "define"
4546 $ d_shmdt = "define"
4547 $ d_shmget = "define"
4548 $ shmattype = "void *"
4552 $ d_shmatprototype = "undef"
4553 $ d_shmctl = "undef"
4555 $ d_shmget = "undef"
4556 $ shmattype = "undef"
4562 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4563 $ WS "#include <stdlib.h>"
4565 $ WS "#include <stdio.h>"
4568 $ WS "setenv(""FOO"", ""BAR"", 0);"
4576 $! Check for setproctitle
4579 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4580 $ WS "#include <stdlib.h>"
4582 $ WS "#include <stdio.h>"
4585 $ WS "setproctitle(""%s"", ""FOO"");"
4589 $ tmp = "setproctitle"
4591 $ d_setproctitle = tmp
4593 $! Check for <netinet/in.h>
4595 $ IF Has_Dec_C_Sockets
4597 $ tmp = "netinet/in.h"
4604 $! Check for <arpa/inet.h>
4606 $ IF Has_Dec_C_Sockets
4608 $ tmp = "arpa/inet.h"
4612 $ i_arpainet="undef"
4615 $! Check for <sys/un.h>
4617 $ IF Has_Dec_C_Sockets
4627 $! Check for <netinet/tcp.h>
4629 $ IF Has_Dec_C_Sockets
4631 $ tmp = "netinet/tcp.h"
4633 $ i_netinettcp = tmp
4635 $ i_netinettcp="undef"
4638 $! Check for endhostent
4640 $ IF Has_Dec_C_Sockets
4643 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4644 $ WS "#include <stdlib.h>"
4646 $ WS "#include <stdio.h>"
4647 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4650 $ WS "endhostent();"
4654 $ tmp = "endhostent"
4661 $! Check for endnetent
4663 $ IF Has_Dec_C_Sockets
4666 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4667 $ WS "#include <stdlib.h>"
4669 $ WS "#include <stdio.h>"
4670 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4684 $! Check for endprotoent
4686 $ IF Has_Dec_C_Sockets
4689 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4690 $ WS "#include <stdlib.h>"
4692 $ WS "#include <stdio.h>"
4693 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4696 $ WS "endprotoent();"
4700 $ tmp = "endprotoent"
4707 $! Check for endservent
4709 $ IF Has_Dec_C_Sockets
4712 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4713 $ WS "#include <stdlib.h>"
4715 $ WS "#include <stdio.h>"
4716 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4719 $ WS "endservent();"
4723 $ tmp = "endservent"
4730 $! Check for sethostent
4732 $ IF Has_Dec_C_Sockets
4735 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4736 $ WS "#include <stdlib.h>"
4738 $ WS "#include <stdio.h>"
4739 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4742 $ WS "sethostent(1);"
4746 $ tmp = "sethostent"
4753 $! Check for setnetent
4755 $ IF Has_Dec_C_Sockets
4758 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4759 $ WS "#include <stdlib.h>"
4761 $ WS "#include <stdio.h>"
4762 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4765 $ WS "setnetent(1);"
4776 $! Check for setprotoent
4778 $ IF Has_Dec_C_Sockets
4781 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4782 $ WS "#include <stdlib.h>"
4784 $ WS "#include <stdio.h>"
4785 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4788 $ WS "setprotoent(1);"
4792 $ tmp = "setprotoent"
4799 $! Check for setservent
4801 $ IF Has_Dec_C_Sockets
4804 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4805 $ WS "#include <stdlib.h>"
4807 $ WS "#include <stdio.h>"
4808 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4811 $ WS "setservent(1);"
4815 $ tmp = "setservent"
4822 $! Check for gethostent
4824 $ IF Has_Dec_C_Sockets
4827 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4828 $ WS "#include <stdlib.h>"
4830 $ WS "#include <stdio.h>"
4831 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4834 $ WS "gethostent();"
4838 $ tmp = "gethostent"
4845 $! Check for getnetent
4847 $ IF Has_Dec_C_Sockets
4850 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4851 $ WS "#include <stdlib.h>"
4853 $ WS "#include <stdio.h>"
4854 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4868 $! Check for getprotoent
4870 $ IF Has_Dec_C_Sockets
4873 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4874 $ WS "#include <stdlib.h>"
4876 $ WS "#include <stdio.h>"
4877 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4880 $ WS "getprotoent();"
4884 $ tmp = "getprotoent"
4891 $! Check for getservent
4893 $ IF Has_Dec_C_Sockets
4896 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4897 $ WS "#include <stdlib.h>"
4899 $ WS "#include <stdio.h>"
4900 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4903 $ WS "getservent();"
4907 $ tmp = "getservent"
4917 $ echo4 "Checking the availability of sa_len in the sockaddr struct ..."
4918 $ IF Has_Dec_C_Sockets
4921 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4922 $ WS "#include <stdlib.h>"
4924 $ WS "#define _SOCKADDR_LEN"
4925 $ WS "#include <types.h>"
4926 $ WS "#include <socket.h>"
4927 $ WS "#include <string.h>"
4929 $ WS "struct sockaddr sa;"
4930 $ WS "memset((char *)&sa, 0, sizeof(sa));"
4931 $ WS "return (sa.sa_len);"
4935 $ IF compile_status .EQ. good_compile
4937 $ d_sockaddr_sa_len="define"
4938 $ echo "You have sa_len in the sockaddr struct."
4940 $ d_sockaddr_sa_len="undef"
4941 $ echo "You do not have sa_len in the sockaddr struct."
4944 $ d_sockaddr_sa_len="undef"
4945 $ echo "You do not have sa_len in the sockaddr struct."
4948 $! Check for sin6_scope_id
4950 $ echo4 "Checking the availability of sin6_scope_id in the struct sockaddr_in6 ..."
4951 $ IF Has_Dec_C_Sockets
4954 $ WS "#include <types.h>"
4955 $ WS "#include <socket.h>"
4956 $ WS "#include <in.h>"
4957 $ WS "#include <string.h>"
4959 $ WS "struct sockaddr_in6 sin6;"
4960 $ WS "memset((char *)&sin6, 0, sizeof(sin6));"
4961 $ WS "return (sin6.sin6_scope_id);"
4965 $ IF compile_status .EQ. good_compile
4967 $ d_sin6_scope_id="define"
4968 $ echo "You have sin6_scope_id in the sockaddr_in6 struct."
4970 $ d_sin6_scope_id="undef"
4971 $ echo "You do not have sin6_scope_id in the sockaddr_in6 struct."
4974 $ d_sin6_scope_id="undef"
4975 $ echo "You do not have sin6_scope_id in the sockaddr_in6 struct."
4978 $! Check for nanosleep
4981 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4982 $ WS "#include <stdlib.h>"
4984 $ WS "#include <time.h>"
4987 $ WS "int asleep = nanosleep(NULL,NULL);"
4995 $! Check for socklen_t
4997 $ IF Has_Dec_C_Sockets
4999 $ echo4 "Checking to see if you have socklen_t..."
5001 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5002 $ WS "#include <stdlib.h>"
5004 $ WS "#include <stdio.h>"
5005 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
5008 $ WS "socklen_t x = 16;"
5013 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
5015 $ d_socklen_t="define"
5016 $ echo "You have socklen_t."
5018 $ d_socklen_t="undef"
5019 $ echo "You do not have socklen_t."
5022 $ d_socklen_t="undef"
5025 $! Check for pthread_yield
5030 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5031 $ WS "#include <stdlib.h>"
5033 $ WS "#include <pthread.h>"
5034 $ WS "#include <stdio.h>"
5037 $ WS "pthread_yield();"
5041 $ tmp = "pthread_yield"
5043 $ d_pthread_yield = tmp
5045 $ d_pthread_yield="undef"
5048 $! Check for sched_yield
5053 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5054 $ WS "#include <stdlib.h>"
5056 $ WS "#include <pthread.h>"
5057 $ WS "#include <stdio.h>"
5060 $ WS "sched_yield();"
5064 $ tmp = "sched_yield"
5066 $ d_sched_yield = tmp
5067 $ IF d_sched_yield .EQS. "define"
5068 $ THEN sched_yield = "sched_yield"
5069 $ ELSE sched_yield = " "
5072 $ d_sched_yield="undef"
5076 $! Check for pthread_attr_setscope and PTHREAD_SCOPE_SYSTEM.
5077 $! (The actual test is to be written.)
5079 $ d_pthread_attr_setscope="undef"
5081 $! Check for generic pointer size
5083 $ echo4 "Checking to see how big your pointers are..."
5085 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5086 $ WS "#include <stdlib.h>"
5088 $ WS "#include <stdio.h>"
5092 $ WS "foo = sizeof(char *);"
5093 $ WS "printf(""%d\n"", foo);"
5098 $ GOSUB type_size_check
5100 $ echo "Your pointers are ''ptrsize' bytes long."
5102 $! Check for size_t size
5106 $ echo4 "Checking the size of ''zzz'..."
5107 $ GOSUB type_size_check
5109 $ echo "Your ''zzz' size is ''sizesize' bytes."
5111 $! Check for _LARGEFILE capability.
5115 $ WS "#define _LARGEFILE"
5116 $ WS "#include <stdio.h>"
5119 $ WS "printf(""%d\n"", sizeof(off_t));"
5124 $ IF link_status .EQ. good_link
5129 $ echo "Your off_t size is ''off_t_size' bytes when _LARGEFILE is defined."
5130 $ IF off_t_size .ne. 8 .AND. (uselargefiles .OR. uselargefiles .eqs. "define")
5132 $ echo4 "You configured with -Duselargefiles but your CRTL does not support _LARGEFILE."
5133 $ echo4 "I'm disabling large file support."
5134 $ uselargefiles = "undef"
5137 $! Check for st_ino size.
5141 $ WS "#include <sys/stat.h>"
5142 $ WS "#include <stdio.h>"
5143 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5144 $ WS "#include <stdlib.h>
5147 $ WS "#''uselargefiles' _LARGEFILE"
5148 $ WS "#ifdef _LARGEFILE"
5149 $ WS " printf(""%d\n"", sizeof(__ino64_t));"
5151 $ WS " printf(""%d\n"", sizeof(unsigned short)*3);"
5157 $ IF link_status .EQ. good_link
5162 $ echo "Your st_ino size is ''st_ino_size' bytes."
5164 $! Tests for hard link, symbolic links, and 7.3 + CRTL features
5166 $ d_lchown = "undef"
5169 $ d_readlink = "undef"
5170 $ d_symlink = "undef"
5171 $ d_realpath = "undef"
5173 $! Hard link support has been present since 7.3-1 except for the
5174 $! easy to use DCL test to see if hardlinks are enabled on the build
5175 $! disk. That would require more work to test, and I am only testing
5176 $! this on 8.2, so that is why the 8.2 test.
5178 $ IF (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
5180 $ IF f$getdvi("SYS$DISK","HARDLINKS_SUPPORTED")
5182 $ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links enabled on build disk."
5183 $ echo "I will build with hard link support"
5186 $ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links disabled on build disk."
5187 $ echo "I will not build with hard link support."
5190 $ echo4 "I can not detect if your CRTL and build disk support hard links."
5191 $ echo4 "I am disabling hard link support."
5194 $ IF uselargefiles .OR. uselargefiles .eqs. "define"
5196 $ IF (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
5198 $ echo4 "Largefile support enabled, so enabling standard stat support too."
5201 "Looking for the realpath() function to indicate symbolic link support..."
5203 $ WS "#include <stdlib.h>"
5204 $ WS "char *realpath(const char *file_name, char * resolved_name, ...);"
5207 $ WS "char result[255];"
5208 $ WS "realpath(""foo"",result);"
5213 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
5216 "Found realpath() which indicates symbolic link support is present."
5217 $ d_lchown = "define"
5218 $ d_lstat = "define"
5219 $ d_readlink = "define"
5220 $ d_symlink = "define"
5221 $! d_realpath = "define" ! Perl will not put it in the config.h file?
5222 $! Perl apparently does not use a built in realpath() on other platforms,
5223 $! but there is a severe performance penatly on OpenVMS to use the Perl
5224 $! script that implements a realpath(). The d_symlink symbol is used
5225 $! as a replacement for the d_realpath since they are related and both
5226 $! were activated by the CRTL at the same time.
5229 $ echo4 "Your system does not support symbolic links."
5230 $ echo4 "I am disabling symbolic link support."
5233 $ echo4 "Your system does not support symbolic links."
5234 $ echo4 "I am disabling symbolic link support."
5237 $ IF (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
5239 $ echo4 "-Duselargefiles is required for symbolic link support."
5240 $ echo4 "You did not specify that, so I am disabling symbolic link support."
5245 $! Check for grp.h -- should be 7.3 and later, but test to be sure
5251 $! VMS V7.3-2 powered options
5252 $! We know that it is only available for V7.3-2 and later on 64 bit platforms.
5254 $ d_getgrgid_r = "undef"
5255 $ getgrgid_r_proto = "0"
5256 $ d_getgrnam_r = "undef"
5257 $ getgrnam_r_proto = "0"
5258 $ d_getpgid = "undef"
5259 $ d_getpgrp = "undef"
5260 $! N.B. We already have home-grown thread-safe versions of
5261 $! getpwnam and getpwuid -- no need to use CRTL versions
5262 $ d_getpwnam_r = "undef"
5263 $ getpwnam_r_proto = "0"
5264 $ d_getpwuid_r = "undef"
5265 $ getpwuid_r_proto = "0"
5266 $ d_setgrent = "undef"
5267 $ d_ttyname_r = "undef"
5268 $ ttyname_r_proto = "0"
5269 $ d_snprintf = "undef"
5270 $ d_vsnprintf = "undef"
5271 $ if (vms_ver .GES. "7.3-2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
5273 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 routines"
5274 $ d_getgrgid_r = "define"
5275 $ getgrgid_r_proto = "1"
5276 $ d_getgrnam_r = "define"
5277 $ getgrnam_r_proto = "1"
5278 $ if d_symlink .or. d_symlink .EQS. "define"
5280 $! FIXME: Need to find how to activate this.
5281 $! d_getpgid = "define"
5282 $! d_getpgrp = "define"
5284 $ d_setgrent = "define"
5285 $ d_ttyname_r = "define"
5286 $ ttyname_r_proto = "1"
5287 $ d_snprintf = "define"
5288 $ d_vsnprintf = "define"
5291 $! VMS V7.3-2 powered options
5292 $! We know that it is only available for V7.3-2 and later on 64 bit platforms.
5293 $! Only implementing right now on 8.2 because that is what I am testing
5294 $! These functions may require POSIX UIDs/GIDs to be active, so I am
5295 $! not activating the features at this time, just preparing this file
5296 $! to easily use them in the future.
5298 $ d_seteuid = "undef"
5299 $ d_setpgid = "undef"
5300 $ d_setpgrp = "undef"
5301 $ d_setregid = "undef"
5302 $ d_setreuid = "undef"
5303 $ d_setsid = "undef"
5304 $ ! Disable this section for now.
5305 $!$ if (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
5308 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 UID setting routines"
5309 $ d_seteuid = "define"
5310 $ d_setpgid = "define"
5311 $ d_setpgrp = "define"
5312 $ d_setregid = "define"
5313 $ d_setreuid = "define"
5314 $ d_setsid = "define"
5317 $! VMS V8 powered options
5318 $! We know that it is only available for 8.2 and later on 64 bit platforms.
5320 $ d_fstatvfs = "undef"
5321 $ d_statvfs = "undef"
5322 $ i_sysstatvfs = "undef"
5323 $ if (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
5325 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with 8.2 routines"
5326 $ d_fstatvfs = "define"
5327 $ d_statvfs = "define"
5328 $ i_sysstatvfs = "define"
5331 $! Check rand48 and its ilk
5333 $ echo4 "Using our internal random number implementation..."
5335 $ randfunc = "Perl_drand48"
5336 $ drand01 = "Perl_drand48()"
5337 $ seedfunc = "Perl_drand48_init"
5339 $ randseedtype = "U32"
5340 $ d_drand48proto = "define"
5342 $! Done with compiler checks. Clean up.
5343 $ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
5344 $ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
5345 $ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
5346 $ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
5347 $ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
5348 $ IF ccname .EQS. "CXX"
5350 $ CALL Cxx_demangler_cleanup
5353 $! Some that are compiler or VMS version sensitive
5356 $ IF ccname .EQS. "GCC"
5358 $ d_attribut="define"
5361 $ IF ccname .EQS. "CXX"
5367 $ d_attribut="undef"
5371 $ d_getitimer="define"
5372 $ d_gettimeod="define"
5374 $ d_mprotect="define"
5379 $! d_unsetenv="define" ! Fix me - Activating requires changing VMS code
5380 $ d_unsetenv="undef" ! Change will be needed to allow GNV integration
5381 $ d_clearenv="undef"
5383 $ d_setitimer="define"
5384 $ d_sigaction="define"
5385 $ d_sigprocmask="define"
5386 $ d_truncate="define"
5390 $ sig_name1="ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE"
5391 $ sig_name2=" ALRM TERM USR1 USR2 NUM18 NUM19 CHLD CONT STOP TSTP TTIN TTOU DEBUG"
5392 $ IF (vms_ver .GES. "7.3")
5394 $ sig_name2 = sig_name2 + " NUM27 WINCH"
5396 $!* signal.h defines SIGRTMIN as 33 and SIGRTMAX as 64, but there is no
5397 $!* sigqueue function or other apparent means to do realtime signalling,
5398 $!* so let's not try to include the realtime range for now.
5399 $!* sig_name3=" NUM29 NUM30 NUM31 NUM32 RTMIN NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43"
5400 $!* sig_name4=" NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58"
5401 $!* sig_name5=" NUM59 NUM60 NUM61 NUMT62 NUM63 RTMAX"
5402 $ sig_name = sig_name1 + sig_name2
5405 $ sig_name_init = ""
5408 $ PARSE_SIG_NAME_LOOP:
5410 $ tmp = F$ELEMENT(sig_index, " ", sig_name)
5411 $ IF F$LENGTH(F$EDIT(tmp,"TRIM")) .eq. 0 THEN GOTO END_SIG_NAME_LOOP
5412 $ sig_name_init = sig_name_init + """''tmp'"","
5413 $ sig_num = sig_num + "''sig_index' "
5414 $ sig_num_init = sig_num_init + "''sig_index',"
5415 $ sig_index = sig_index + 1
5416 $ GOTO PARSE_SIG_NAME_LOOP
5418 $ END_SIG_NAME_LOOP:
5420 $ sig_name_init = sig_name_init + "0"
5421 $ sig_num_init = sig_num_init + "0"
5422 $ sig_size = "''sig_index'"
5423 $ sig_index = sig_index - 1
5424 $ sig_count = "''sig_index'"
5426 $ d_pathconf="define"
5427 $ d_fpathconf="define"
5428 $ d_sysconf="define"
5429 $ d_sigsetjmp="define"
5431 $!: see if tzname[] exists
5433 $ WS "#include <stdio.h>"
5434 $ WS "#include <time.h>"
5435 $ WS "int main() { extern short tzname[]; printf(""%hd"", tzname[0]); }"
5438 $ IF compile_status .EQ. good_compile
5440 $ d_tzname = "undef"
5441 $ echo4 "tzname[] NOT found."
5443 $ d_tzname = "define"
5444 $ echo4 "tzname[] found."
5446 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
5448 $ IF d_gethname .EQS. "undef" .AND. d_uname .EQS. "undef"
5450 $ d_phostname="define"
5452 $ d_phostname="undef"
5456 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
5458 $ vms_cc_type="decc"
5460 $ d_faststdio="define"
5461 $ d_locconv="define"
5463 $ d_mbstowcs="define"
5466 $ d_nl_langinfo="define"
5467 $ d_setlocale="define"
5468 $ d_stdiobase="define"
5469 $ d_stdio_cnt_lval="define"
5470 $ d_stdio_ptr_lval="define"
5471 $ d_stdstdio="define"
5472 $ d_strcoll="define"
5473 $ d_strxfrm="define"
5474 $ i_langinfo="define"
5476 $ d_stdio_ptr_lval_sets_cnt="undef"
5477 $ d_stdio_ptr_lval_nochange_cnt="define"
5478 $ usefaststdio="undef"
5481 $ if Has_Dec_C_Sockets
5483 $ d_vms_do_sockets="define"
5486 $ d_sockpair = "undef"
5487 $ if (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
5489 $ echo "Found 64 bit OpenVMS 8.2, will build with socketpair support"
5490 $ d_sockpair = "define"
5493 $ netdb_hlen_type="int"
5494 $ netdb_host_type="char *"
5495 $ netdb_name_type="char *"
5496 $ netdb_net_type="long"
5497 $ d_gethbyaddr="define"
5498 $ d_gethbyname="define"
5499 $ d_getnbyaddr="define"
5500 $ d_getnbyname="define"
5501 $ d_getpbynumber="define"
5502 $ d_getpbyname="define"
5503 $ d_getsbyport="define"
5504 $ d_getsbyname="define"
5505 $ d_gethostprotos="define"
5506 $ d_getnetprotos="define"
5507 $ d_getprotoprotos="define"
5508 $ d_getservprotos="define"
5509 $ socksizetype="size_t"
5511 $ d_vms_do_sockets="undef"
5514 $ d_socketpair = "undef"
5516 $ netdb_hlen_type="int"
5517 $ netdb_host_type="char *"
5518 $ netdb_name_type="char *"
5519 $ netdb_net_type="long"
5520 $ d_gethbyaddr="undef"
5521 $ d_gethbyname="undef"
5522 $ d_getnbyaddr="undef"
5523 $ d_getnbyname="undef"
5524 $ d_getpbynumber="undef"
5525 $ d_getpbyname="undef"
5526 $ d_getsbyport="undef"
5527 $ d_getsbyname="undef"
5528 $ d_gethostprotos="undef"
5529 $ d_getnetprotos="undef"
5530 $ d_getprotoprotos="undef"
5531 $ d_getservprotos="undef"
5532 $ socksizetype="undef"
5535 $ d_oldpthreads="undef"
5538 $ usethreads="define"
5539 $ d_pthreads_created_joinable="define"
5541 $ usethreads="undef"
5542 $ d_pthreads_created_joinable="undef"
5545 $! new (5.005_62++) typedefs for primitives
5547 $ echo "Choosing the C types to be used for Perl's internal types..."
5549 $ uvtype="unsigned long"
5551 $ u8type="unsigned char"
5553 $ u16type="unsigned short"
5555 $ u32type="unsigned int"
5556 $ i64type="long long"
5557 $ u64type="unsigned long long"
5560 $ IF use64bitint .OR. use64bitint .EQS. "define"
5562 $ ivtype = "''i64type'"
5563 $ uvtype = "''u64type'"
5569 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
5571 $ nvtype="long double"
5575 $ GOSUB type_size_check
5577 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp
5578 $ IF ivtype .eqs. "long"
5579 $ THEN longsize = tmp
5582 $ GOSUB type_size_check
5587 $ GOSUB type_size_check
5589 $ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp
5592 $ GOSUB type_size_check
5596 $ GOSUB type_size_check
5599 $ tmp = "''i16type'"
5600 $ GOSUB type_size_check
5602 $ IF i16type .eqs. "short"
5603 $ THEN shortsize = tmp
5606 $ gosub type_size_check
5610 $ tmp = "''u16type'"
5611 $ GOSUB type_size_check
5614 $ tmp = "''i32type'"
5615 $ GOSUB type_size_check
5617 $ IF i32type .eqs. "int"
5618 $ THEN intsize = tmp
5621 $ gosub type_size_check
5625 $ tmp = "''u32type'"
5626 $ gosub type_size_check
5630 $ GOSUB type_size_check
5633 $ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
5634 $ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
5635 $ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
5637 $ d_nv_preserves_uv = "undef"
5638 $ echo4 "Checking how many bits of your UVs your NVs can preserve..."
5640 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5641 $ WS "#include <stdlib.h>"
5643 $ WS "#include <stdio.h>"
5645 $ WS " ''uvtype' u = 0;"
5646 $ WS " int n = 8 * ''uvsize';"
5648 $ WS " for (i = 0; i < n; i++) {"
5649 $ WS " u = u << 1 | (''uvtype')1;"
5650 $ WS " if ((''uvtype')(''nvtype')u != u)"
5653 $ WS " printf(""%d\n"", i);"
5658 $ nv_preserves_uv_bits = tmp
5659 $ IF F$INTEGER(nv_preserves_uv_bits) .GE. (F$INTEGER(uvsize) * 8)
5661 $ d_nv_preserves_uv = "define"
5662 $ echo "Your NVs can preserve all ''nv_preserves_uv_bits' bits of your UVs."
5664 $ d_nv_preserves_uv = "undef"
5665 $ echo "Your NVs can preserve only ''nv_preserves_uv_bits' bits of your UVs."
5668 $ nv_overflows_integers_at = "0"
5669 $ echo4 "Checking to find the largest integer value your NVs can hold..."
5671 $ WS "#include <stdio.h>"
5673 $ WS "typedef ''nvtype' NV;"
5677 $ WS " NV value = 2;"
5678 $ WS " int count = 1;"
5680 $ WS " while(count < 256) {"
5681 $ WS " volatile NV up = value + 1.0;"
5682 $ WS " volatile NV negated = -value;"
5683 $ WS " volatile NV down = negated - 1.0;"
5684 $ WS " volatile NV got_up = up - value;"
5685 $ WS " int up_good = got_up == 1.0;"
5686 $ WS " int got_down = down - negated;"
5687 $ WS " int down_good = got_down == -1.0;"
5689 $ WS " if (down_good != up_good) {"
5690 $ WS " fprintf(stderr,"
5691 $ WS " ""Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n"","
5692 $ WS " up_good, (double) got_up, down_good, (double) got_down,"
5693 $ WS " count, (double) value);"
5696 $ WS " if (!up_good) {"
5698 $ WS " if (count > 8) {"
5700 $ WS " fputs(""256.0"", stdout);"
5703 $ WS " fputs(""2.0"", stdout);"
5705 $ WS " if (!count) {"
5709 $ WS " fputs(""*"", stdout);"
5715 $ WS " fprintf(stderr, ""Cannot overflow integer range, even at 2**%d (%.20f)\n"","
5716 $ WS " count, (double) value);"
5721 $ IF F$LENGTH(tmp) .GT. 0
5723 $ IF F$EXTRACT(0,1,tmp) .EQS. "2"
5725 $ echo "The largest integer your NVs can preserve is equal to ''tmp'"
5726 $ nv_overflows_integers_at = tmp
5728 $ echo "Cannot determine the largest integer value your NVs can hold, unexpected output"
5732 $ echo "Cannot determine the largest integer value your NVs can hold"
5735 $! Check for signbit (must already know nvtype)
5737 $ echo4 "Checking to see if you have signbit() available to work on ''nvtype'..."
5739 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5740 $ WS "#include <stdlib.h>"
5742 $ WS "#include <fp.h>"
5743 $ WS "#include <stdio.h>"
5746 $ WS " ''nvtype' x = 0.0;"
5747 $ WS " ''nvtype' y = -0.0;"
5748 $ WS " if ((signbit(x) == 0) && (signbit(y) != 0))"
5749 $ WS " printf(""1\n"");"
5751 $ WS " printf(""0\n"");"
5757 $ d_signbit = "define"
5760 $ d_signbit = "undef"
5764 $ echo4 "Checking if kill() uses SYS$FORCEX, can't be called from a signal handler,"
5765 $ echo4 "or fails to handle a signal value of zero..."
5766 $ kill_by_sigprc = "undef"
5768 $ WS "#include <stdio.h>"
5769 $ WS "#include <signal.h>"
5770 $ WS "#include <unistd.h>"
5771 $ WS "void handler1(int s) { printf(""%d"",s); kill(getpid(),2); }"
5772 $ WS "void handler2(int s) { printf(""%d"",s); }"
5774 $ WS " printf(""0"");"
5775 $ WS " signal(1,handler1);"
5776 $ WS " signal(2,handler2);"
5777 $ WS " kill(getpid(),1);"
5779 $ WS " kill(getpid(),0);"
5780 $ WS " printf(""3\n"");"
5783 $ ON ERROR THEN CONTINUE
5785 $ IF tmp .NES. "0123"
5787 $ echo4 "Yes, it has at least one of those limitations."
5788 $ echo4 "Checking whether we can use SYS$SIGPRC instead..."
5790 $ WS "#include <stdio.h>"
5791 $ WS "#include <lib$routines.h>"
5792 $ WS "unsigned long code = 0;"
5793 $ WS "#define sys$sigprc SYS$SIGPRC"
5794 $ WS "#ifdef __cplusplus"
5795 $ WS "extern ""C"" {"
5797 $ WS " int sys$sigprc(unsigned int *,void *,unsigned int);"
5798 $ WS "#ifdef __cplusplus"
5801 $ WS "int handler(unsigned long *args) {"
5802 $ WS " code = args[1];"
5807 $ WS " lib$establish(handler);"
5808 $ WS " iss = sys$sigprc(0,0,0x1234);"
5809 $ WS " iss = ((iss&1)==1 && code == 0x1234);"
5810 $ WS " printf(""%d\n"",iss);"
5813 $ ON ERROR THEN CONTINUE
5817 $ echo4 "Yep, we can."
5818 $ kill_by_sigprc = "define"
5821 $ echo4 "Nope, we can't."
5824 $ echo4 "Nope, it doesn't."
5828 $! Finally the composite ones. All config
5830 $ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
5832 $ IF ccname .EQS. "DEC"
5834 $ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
5836 $ IF ccname .EQS. "CXX"
5838 $ ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
5840 $ IF use_vmsdebug_perl
5842 $ optimize="/List/Debug/NoOpt"
5843 $ ldflags="/Debug/Trace/Map"
5846 $ optimize= "/NoList"
5847 $ ldflags="/NoTrace/NoMap"
5851 $! Okay, we've got everything configured. Now go write out a config.sh.
5852 $ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
5853 $ echo4 "Creating ''basename_config_sh'..."
5854 $ open/write CONFIG 'config_sh'
5855 $ WC := write CONFIG
5857 $! ##BEGIN WRITE NEW CONSTANTS HERE##
5861 $ WC "# This file was produced by Configure.COM on a ''osname' system."
5863 $ WC "# Package name : ''package'"
5864 $ WC "# Source directory : ''src'"
5865 $ WC "# Configuration time: " + cf_time
5866 $ WC "# Configuration by : " + cf_by
5867 $ WC "# Target system : " + myuname
5869 $ WC "Makefile_SH='" + Makefile_SH + "'"
5870 $ WC "Mcc='" + Mcc + "'"
5871 $ WC "PERL_REVISION='" + revision + "'"
5872 $ WC "PERL_VERSION='" + patchlevel + "'"
5873 $ WC "PERL_SUBVERSION='" + subversion + "'"
5874 $ WC "PERL_API_REVISION='" + api_revision + "'"
5875 $ WC "PERL_API_VERSION='" + api_version + "'"
5876 $ WC "PERL_API_SUBVERSION='" + api_subversion + "'"
5877 $ WC "PERL_PATCHLEVEL='" + perl_patchlevel + "'"
5878 $ WC "perl_patchlevel='" + perl_patchlevel + "'"
5879 $ WC "PERL_CONFIG_SH='true'"
5880 $ WC "_a='" + lib_ext + "'"
5881 $ WC "_exe='" + exe_ext + "'"
5882 $ WC "_o='" + obj_ext + "'"
5883 $ WC "alignbytes='" + alignbytes + "'"
5884 $ WC "aphostname='write sys$output f$edit(f$getsyi(\""SCSNODE\""),\""TRIM,LOWERCASE\"")'"
5885 $ WC "api_revision='" + api_revision + "'"
5886 $ WC "api_subversion='" + api_subversion + "'"
5887 $ WC "api_version='" + api_version + "'"
5888 $ WC "api_versionstring='" + version + "'"
5890 $ WC "archlib='" + archlib + "'"
5891 $ WC "archlibexp='" + archlibexp + "'"
5892 $ WC "archname='" + archname + "'"
5893 $ WC "baserev='" + baserev + "'"
5894 $ WC "bin='" + bin + "'"
5895 $ WC "binexp='" + binexp + "'"
5896 $ WC "bootstrap_charset='undef'"
5897 $ WC "builddir='" + builddir + "'"
5898 $ WC "byteorder='1234'"
5899 $ WC "castflags='0'"
5900 $ WC "cc='" + perl_cc + "'"
5901 $ WC "cccdlflags='" + cccdlflags + "'"
5902 $ WC "ccdlflags='" + ccdlflags + "'"
5903 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
5905 $ IF usestdstat .OR. usestdstat .EQS. "define"
5907 $ ccdefines = "_USE_STD_STAT=1"
5909 $ ccdefines = "_LARGEFILE=1"
5914 $ IF ccdefines .NES. ""
5916 $ WC "ccflags='" + ccflags + "/Define=" + ccdefines + "'"
5918 $ WC "ccflags='" + ccflags + "'"
5920 $ WC "ccflags_uselargefiles='" + "'"
5921 $ WC "ccname='" + ccname + "'"
5922 $ WC "ccversion='" + ccversion + "'"
5923 $ WC "cf_by='" + cf_by + "'"
5924 $ WC "cf_email='" + cf_email + "'"
5925 $ WC "cf_time='" + cf_time + "'"
5927 $ WC "config_args='" + config_args + "'"
5928 $ WC "config_sh='" + config_sh + "'"
5929 $ WC "cpp_stuff='" + cpp_stuff + "'"
5930 $ WC "cpplast='" + cpplast + "'"
5931 $ WC "cppminus='" + cppminus + "'"
5932 $ WC "cpprun='" + cpprun + "'"
5933 $ WC "cppstdin='" + cppstdin + "'"
5934 $ IF use64bitint .OR. use64bitint .EQS. "define"
5936 $! gcvt() does not work for > 16 decimal places; fallback to sprintf
5937 $ WC "d_Gconvert='sprintf((b),""%.*" + (nvgformat-"""") + ",(n),(x))'"
5939 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
5941 $ WC "d_PRIEUldbl='" + d_PRIEUldbl + "'"
5942 $ WC "d_PRIFUldbl='" + d_PRIFUldbl + "'"
5943 $ WC "d_PRIGUldbl='" + d_PRIGUldbl + "'"
5944 $ WC "d_PRIXU64='" + d_PRIXU64 + "'"
5945 $ WC "d_PRId64='" + d_PRId64 + "'"
5946 $ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
5947 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
5948 $ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
5949 $ WC "d_PRIi64='" + d_PRIi64 + "'"
5950 $ WC "d_PRIo64='" + d_PRIo64 + "'"
5951 $ WC "d_PRIu64='" + d_PRIu64 + "'"
5952 $ WC "d_PRIx64='" + d_PRIx64 + "'"
5953 $ WC "d_SCNfldbl='" + d_SCNfldbl + "'"
5954 $ WC "d__fwalk='undef'"
5955 $ WC "d_access='" + d_access + "'"
5956 $ WC "d_accessx='undef'"
5957 $ WC "d_acosh='" + d_acosh + "'"
5958 $ WC "d_aintl='undef'"
5959 $ WC "d_alarm='define'"
5960 $ WC "d_archlib='define'"
5961 $ WC "d_asctime64='undef'"
5962 $ WC "d_asinh='" + d_asinh + "'"
5963 $ WC "d_atanh='" + d_atanh + "'"
5964 $ WC "d_atolf='" + d_atolf + "'"
5965 $ WC "d_atoll='" + d_atoll + "'"
5966 $ WC "d_attribute_format='" + d_attribut + "'"
5967 $ WC "d_attribute_deprecated='undef'"
5968 $ WC "d_attribute_malloc='undef'"
5969 $ WC "d_attribute_nonnull='undef'"
5970 $ WC "d_attribute_noreturn='undef'"
5971 $ WC "d_attribute_pure='undef'"
5972 $ WC "d_attribute_unused='undef'"
5973 $ WC "d_attribute_warn_unused_result='undef'"
5974 $ WC "d_prctl='undef'"
5975 $ WC "d_prctl_set_name='undef'"
5976 $ WC "d_printf_format_null='undef'"
5977 $ WC "d_bcmp='" + d_bcmp + "'"
5978 $ WC "d_bcopy='" + d_bcopy + "'"
5979 $ WC "d_bincompat3='undef'"
5980 $ WC "d_bsd='undef'"
5981 $ WC "d_bsdgetpgrp='undef'"
5982 $ WC "d_bsdsetpgrp='undef'"
5983 $ WC "d_builtin_choose_expr='undef'" ! GCC only
5984 $ WC "d_builtin_expect='undef'" ! GCC only
5985 $ WC "d_bzero='" + d_bzero + "'"
5986 $ WC "d_casti32='define'"
5987 $ WC "d_castneg='define'"
5988 $ WC "d_cbrt='" + d_cbrt + "'"
5989 $ WC "d_charvspr='undef'"
5990 $ WC "d_chown='define'"
5991 $ WC "d_chroot='undef'"
5992 $ WC "d_chsize='undef'"
5993 $ WC "d_class='undef'"
5994 $ WC "d_closedir='define'"
5995 $ WC "d_cmsghdr_s='undef'"
5996 $ WC "d_const='define'"
5997 $ WC "d_copysign='" + d_copysign + "'"
5998 $ WC "d_copysignl='define'"
5999 $ WC "d_cplusplus='" + d_cplusplus + "'"
6000 $ WC "d_crypt='define'"
6001 $ WC "d_csh='undef'"
6002 $ WC "d_ctermid='define'"
6003 $ WC "d_ctime64='undef'"
6004 $ WC "d_cuserid='define'"
6005 $ WC "d_c99_variadic_macros='undef'"
6006 $ WC "d_dbl_dig='define'"
6007 $ WC "d_dbminitproto='undef'"
6008 $ WC "d_difftime='define'"
6009 $ WC "d_difftime64='undef'"
6010 $ WC "d_dir_dd_fd='undef'"
6011 $ WC "d_dirfd='undef'"
6012 $ WC "d_dirnamlen='define'"
6013 $ WC "d_dladdr='undef'"
6014 $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.2")
6016 $ WC "d_dlerror='define'"
6017 $ WC "d_dlopen='define'"
6019 $ WC "d_dlerror='undef'"
6020 $ WC "d_dlopen='undef'"
6022 $ WC "d_dlsymun='undef'"
6023 $ WC "d_backtrace='undef'"
6024 $ WC "d_dosuid='undef'"
6025 $ WC "d_drand48proto='" + d_drand48proto + "'"
6026 $ WC "d_dup2='define'"
6027 $ WC "d_eaccess='undef'"
6028 $ WC "d_endgrent='define'"
6029 $ WC "d_endhent='" + d_endhent + "'"
6030 $ WC "d_endnent='" + d_endnent + "'"
6031 $ WC "d_endpent='" + d_endpent + "'"
6032 $ WC "d_endpwent='define'"
6033 $ WC "d_endsent='" + d_endsent + "'"
6034 $ WC "d_eofnblk='undef'"
6035 $ WC "d_erf='" + d_erf + "'"
6036 $ WC "d_erfc='" + d_erfc + "'"
6037 $ WC "d_eunice='undef'"
6038 $ WC "d_exp2='" + d_exp2 + "'"
6039 $ WC "d_expm1='" + d_expm1 + "'"
6040 $ WC "d_fchmod='undef'"
6041 $ WC "d_fchdir='undef'"
6042 $ WC "d_fchown='undef'"
6043 $ WC "d_fcntl='" + d_fcntl + "'"
6044 $ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
6045 $ WC "d_fd_set='" + d_fd_set + "'"
6046 $ WC "d_fd_macros='define'"
6047 $ WC "d_fdim='" + d_fdim + "'"
6048 $ WC "d_fds_bits='define'"
6049 $ WC "d_fegetround='undef'"
6050 $ WC "d_fgetpos='define'"
6051 $ IF F$ELEMENT(0, "-", archname) .NES. "VMS_VAX" .AND. use_ieee_math
6053 $ WC "d_finite='define'"
6054 $ WC "d_finitel='define'"
6056 $ WC "d_finite='undef'"
6057 $ WC "d_finitel='undef'"
6059 $ WC "d_flexfnam='define'"
6060 $ WC "d_flock='undef'"
6061 $ WC "d_flockproto='undef'"
6062 $ WC "d_fma='" + d_fma + "'"
6063 $ WC "d_fmax='" + d_fmax + "'"
6064 $ WC "d_fmin='" + d_fmin + "'"
6065 $ WC "d_fork='undef'"
6066 $ WC "d_fp_class='undef'"
6067 $ WC "d_fp_classify='" + d_fp_classify + "'"
6068 $ WC "d_fp_classify='undef'"
6069 $ WC "d_fp_classl='undef'"
6070 $ WC "d_fpathconf='" + d_fpathconf + "'"
6071 $ WC "d_fpclass='undef'"
6072 $ WC "d_fpclassify='undef'"
6073 $ WC "d_fpclassl='undef'"
6074 $ WC "d_fpgetround='undef'"
6075 $ WC "d_fpos64_t='" + d_fpos64_t + "'"
6076 $ WC "d_frexpl='" + d_frexpl + "'"
6077 $ WC "d_fs_data_s='undef'"
6078 $ WC "d_fseeko='" + d_fseeko + "'"
6079 $ WC "d_fsetpos='define'"
6080 $ WC "d_fstatfs='undef'"
6081 $ WC "d_fstatvfs='" + d_fstatvfs + "'"
6082 $ WC "d_fsync='define'"
6083 $ WC "d_ftello='" + d_ftello + "'"
6084 $ WC "d_ftime='define'"
6085 $ WC "d_futimes='undef'"
6086 $ WC "d_gdbmndbm_h_uses_prototypes='undef'"
6087 $ WC "d_gdbm_ndbm_h_uses_prototypes='undef'"
6088 $ IF vms_ver .GES. "7.3"
6090 $ WC "d_getaddrinfo='define'"
6092 $ WC "d_getaddrinfo='undef'"
6094 $ WC "d_getcwd='define'"
6095 $ WC "d_getespwnam='undef'"
6096 $ WC "d_getfsstat='undef'"
6097 $ WC "d_getgrent='define'"
6098 $ WC "d_getgrps='undef'"
6099 $ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
6100 $ WC "d_gethbyname='" + d_gethbyname + "'"
6101 $ WC "d_gethent='" + d_gethent + "'"
6102 $ WC "d_gethname='" + d_gethname + "'"
6103 $ WC "d_gethostprotos='" + d_gethostprotos + "'"
6104 $ WC "d_getitimer='" + d_getitimer + "'"
6105 $ WC "d_getlogin='define'"
6106 $ WC "d_getmnt='undef'"
6107 $ WC "d_getmntent='undef'"
6108 $ IF vms_ver .GES. "7.3"
6110 $ WC "d_getnameinfo='define'"
6112 $ WC "d_getnameinfo='undef'"
6114 $ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
6115 $ WC "d_getnbyname='" + d_getnbyname + "'"
6116 $ WC "d_getnent='" + d_getnent + "'"
6117 $ WC "d_getnetprotos='" + d_getnetprotos + "'"
6118 $ WC "d_getpagsz='undef'"
6119 $ WC "d_getpbyname='" + d_getpbyname + "'"
6120 $ WC "d_getpbynumber='" + d_getpbynumber + "'"
6121 $ WC "d_getpent='" + d_getpent + "'"
6122 $ WC "d_getpgid='" + d_getpgid + "'"
6123 $ WC "d_getpgrp2='undef'"
6124 $ WC "d_getpgrp='" + d_getpgrp + "'"
6125 $ WC "d_getppid='" + d_getppid + "'"
6126 $ WC "d_getprior='undef'"
6127 $ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
6128 $ WC "d_getprpwnam='undef'"
6129 $ WC "d_getpwent='define'"
6130 $ WC "d_getsbyname='" + d_getsbyname + "'"
6131 $ WC "d_getsbyport='" + d_getsbyport + "'"
6132 $ WC "d_getsent='" + d_getsent + "'"
6133 $ WC "d_getservprotos='" + d_getservprotos + "'"
6134 $ WC "d_getspnam='undef'"
6135 $ WC "d_gettimeod='" + d_gettimeod + "'"
6136 $ WC "d_gmtime64='undef'"
6137 $ WC "d_gnulibc='undef'"
6138 $ WC "d_grpasswd='undef'"
6139 $ WC "d_hasmntopt='undef'"
6140 $ WC "d_htonl='" + d_htonl + "'"
6141 $ WC "d_hypot='" + d_hypot + "'"
6142 $ WC "d_ilogb='" + d_ilogb + "'"
6143 $ WC "d_ilogbl='undef'"
6144 $ WC "d_inc_version_list='undef'"
6145 $ WC "d_index='" + d_index + "'"
6146 $ WC "d_inetaton='define'"
6147 $ WC "d_inetntop='define'"
6148 $ WC "d_inetpton='define'"
6149 $ WC "d_int64_t='" + d_int64_t + "'"
6150 $ WC "d_ip_mreq='define'"
6151 $ WC "d_ip_mreq_source='undef'"
6152 $ WC "d_ipv6_mreq='define'"
6153 $ WC "d_ipv6_mreq_source='undef'"
6154 $ WC "d_isascii='define'"
6155 $ WC "d_isblank='undef'"
6156 $ WC "d_isfinite='undef'"
6157 $ WC "d_isfinitel='undef'"
6158 $ WC "d_isinf='undef'"
6159 $ WC "d_isinfl='undef'"
6160 $ WC "d_isless='undef'"
6161 $ WC "d_isnan='" + d_isnan + "'"
6162 $ WC "d_isnanl='" + d_isnanl + "'"
6163 $ WC "d_isnormal='" + d_isnormal + "'"
6164 $ WC "d_j0='" + d_j0 + "'"
6165 $ WC "d_j0l='undef'"
6166 $ WC "d_killpg='undef'"
6167 $ WC "d_lchown='" + d_lchown + "'"
6168 $ WC "d_ldbl_dig='define'"
6169 $ WC "d_ldexpl='" + d_ldexpl + "'"
6170 $ WC "d_lgamma='" + d_lgamma + "'"
6171 $ WC "d_libm_lib_version='undef'"
6172 $ WC "d_link='" + d_link + "'"
6173 $ WC "d_llrint='undef'"
6174 $ WC "d_llround='undef'"
6175 $ WC "d_llseek='undef'"
6176 $ WC "d_localtime64='undef'"
6177 $ WC "d_locconv='" + d_locconv + "'"
6178 $ WC "d_lc_monetary_2008='undef'"
6179 $ WC "d_lockf='undef'"
6180 $ WC "d_log1p='" + d_log1p + "'"
6181 $ WC "d_log2='" + d_log2 + "'"
6182 $ WC "d_logb='" + d_logb + "'"
6183 $ WC "d_longdbl='" + d_longdbl + "'"
6184 $ WC "d_longlong='" + d_longlong + "'"
6185 $ WC "d_lrint='" + d_lrint + "'"
6186 $ WC "d_lround='" + d_lround + "'"
6187 $ WC "d_lseekproto='define'"
6188 $ WC "d_lstat='" + d_lstat + "'"
6189 $ WC "d_madvise='undef'"
6190 $ WC "d_malloc_size='undef'"
6191 $ WC "d_malloc_good_size='undef'"
6192 $ WC "d_mblen='" + d_mblen + "'"
6193 $ WC "d_mbstowcs='" + d_mbstowcs + "'"
6194 $ WC "d_mbtowc='" + d_mbtowc + "'"
6195 $ WC "d_memchr='" + d_memchr + "'"
6196 $ WC "d_memcmp='define'"
6197 $ WC "d_memcpy='define'"
6198 $ WC "d_memmove='define'"
6199 $ WC "d_memset='define'"
6200 $ WC "d_mkdir='define'"
6201 $ WC "d_mkdtemp='" + d_mkdtemp + "'"
6202 $ WC "d_mkfifo='undef'"
6203 $ WC "d_mknod='undef'"
6204 $ WC "d_mkstemp='" + d_mkstemp + "'"
6205 $ WC "d_mkstemps='" + d_mkstemps + "'"
6206 $ WC "d_mktime='" + d_mktime + "'"
6207 $ WC "d_mktime64='undef'"
6208 $ WC "d_mmap='" + d_mmap + "'"
6209 $ WC "d_modfl='" + d_modfl + "'"
6210 $ WC "d_modflproto='" + d_modflproto + "'"
6211 $ WC "d_modfl_pow32_bug='undef'"
6212 $ WC "d_mprotect='" + d_mprotect + "'"
6213 $ WC "d_msg='undef'"
6214 $ WC "d_msgctl='undef'"
6215 $ WC "d_msgget='undef'"
6216 $ WC "d_msgrcv='undef'"
6217 $ WC "d_msgsnd='undef'"
6218 $ WC "d_msg_ctrunc='undef'"
6219 $ WC "d_msg_dontroute='undef'"
6220 $ WC "d_msg_oob='undef'"
6221 $ WC "d_msg_peek='undef'"
6222 $ WC "d_msg_proxy='undef'"
6223 $ WC "d_msghdr_s='undef'"
6224 $ WC "d_msync='" + d_msync + "'"
6225 $ WC "d_munmap='" + d_munmap + "'"
6226 $ WC "d_mymalloc='" + d_mymalloc + "'"
6227 $ WC "d_nan='undef'"
6228 $ WC "d_nanosleep='" + d_nanosleep + "'"
6229 $ WC "d_ndbm='undef'"
6230 $ WC "d_ndbm_h_uses_prototypes='undef'"
6231 $ WC "d_nearbyint='undef'"
6232 $ WC "d_nextafter='" + d_nextafter + "'"
6233 $ WC "d_nexttoward='" + d_nexttoward + "'"
6234 $ WC "d_nice='define'"
6235 $ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
6236 $ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
6237 $ WC "nv_overflows_integers_at='" + nv_overflows_integers_at + "'"
6238 $ WC "nv_preserves_uv_bits='" + nv_preserves_uv_bits + "'"
6239 $ WC "d_nv_zero_is_allbits_zero='define'"
6240 $ WC "d_off64_t='" + d_off64_t + "'"
6241 $ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
6242 $ WC "d_oldarchlib='define'"
6243 $ WC "d_oldpthreads='" + d_oldpthreads + "'"
6244 $ WC "d_oldsock='undef'"
6245 $ WC "d_open3='define'"
6246 $ WC "d_pathconf='" + d_pathconf + "'"
6247 $ WC "d_pause='define'"
6248 $ WC "d_perl_otherlibdirs='undef'"
6249 $ WC "d_phostname='" + d_phostname + "'"
6250 $ WC "d_pipe='define'"
6251 $ WC "d_poll='" + d_poll + "'"
6252 $ WC "d_portable='define'"
6253 $ WC "d_procselfexe='undef'"
6254 $ WC "d_pseudofork='undef'"
6255 $ WC "d_pthread_atfork='undef'"
6256 $ WC "d_pthread_attr_setscope='" + d_pthread_attr_setscope + "'"
6257 $ WC "d_pthread_yield='" + d_pthread_yield + "'"
6258 $ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
6259 $ WC "d_ptrdiff_t='define'"
6260 $ WC "d_pwage='undef'"
6261 $ WC "d_pwchange='undef'"
6262 $ WC "d_pwclass='undef'"
6263 $ WC "d_pwcomment='define'"
6264 $ WC "d_pwexpire='undef'"
6265 $ WC "d_pwgecos='define'"
6266 $ WC "d_pwpasswd='define'"
6267 $ WC "d_pwquota='undef'"
6268 $ WC "d_qgcvt='undef'"
6269 $ WC "d_quad='" + d_quad + "'"
6270 $ WC "d_readdir='define'"
6271 $ WC "d_readlink='" + d_readlink + "'"
6272 $ WC "d_readv='undef'"
6273 $ WC "d_realpath='" + d_realpath + "'"
6274 $ WC "d_recvmsg='undef'"
6275 $ WC "d_regcomp='undef'"
6276 $ WC "d_remainder='" + d_remainder + "'"
6277 $ WC "d_remquo='" + d_remquo + "'"
6278 $ WC "d_rename='define'"
6279 $ WC "d_rewinddir='define'"
6280 $ WC "d_rint='" + d_rint + "'"
6281 $ WC "d_rmdir='define'"
6282 $ WC "d_round='undef'"
6283 $ WC "d_safebcpy='undef'"
6284 $ WC "d_safemcpy='define'"
6285 $ WC "d_sanemcmp='define'"
6286 $ WC "d_sbrkproto='define'"
6287 $ WC "d_scalbn='undef'"
6288 $ WC "d_scalbnl='undef'"
6289 $ WC "d_sched_yield='" + d_sched_yield + "'"
6290 $ WC "d_scm_rights='undef'"
6291 $ WC "d_seekdir='define'"
6292 $ WC "d_select='" + d_select + "'"
6293 $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."8.4")
6295 $ WC "d_sem='define'"
6296 $ WC "d_semctl='define'"
6297 $ WC "d_semctl_semid_ds='define'"
6298 $ WC "d_semctl_semun='define'"
6299 $ WC "d_semget='define'"
6300 $ WC "d_semop='define'"
6302 $ WC "d_sem='undef'"
6303 $ WC "d_semctl='undef'"
6304 $ WC "d_semctl_semid_ds='undef'"
6305 $ WC "d_semctl_semun='undef'"
6306 $ WC "d_semget='undef'"
6307 $ WC "d_semop='undef'"
6309 $ WC "d_sendmsg='undef'"
6310 $ WC "d_setegid='undef'"
6311 $ WC "d_setenv='" + d_setenv + "'"
6312 $ WC "d_seteuid='" + d_seteuid + "'"
6313 $ WC "d_setgrent='" + d_setgrent + "'"
6314 $ WC "d_setgrps='undef'"
6315 $ WC "d_sethent='" + d_sethent + "'"
6316 $ WC "d_setitimer='" + d_setitimer + "'"
6317 $ WC "d_setlinebuf='undef'"
6318 $ WC "d_setlocale='" + d_setlocale + "'"
6319 $ WC "d_setnent='" + d_setnent + "'"
6320 $ WC "d_setpent='" + d_setpent + "'"
6321 $ WC "d_setpgid='" + d_setpgid + "'"
6322 $ WC "d_setpgrp2='undef'"
6323 $ WC "d_setpgrp='" + d_setpgrp + "'"
6324 $ WC "d_setprior='undef'"
6325 $ WC "d_setproctitle='" + d_setproctitle + "'"
6326 $ WC "d_setpwent='define'"
6327 $ WC "d_setregid='" + d_setregid + "'"
6328 $ WC "d_setresgid='undef'"
6329 $ WC "d_setresuid='undef'"
6330 $ WC "d_setreuid='" + d_setreuid + "'"
6331 $ WC "d_setrgid='undef'"
6332 $ WC "d_setruid='undef'"
6333 $ WC "d_setsent='" + d_setsent + "'"
6334 $ WC "d_setsid='" + d_setsid + "'"
6335 $ WC "d_setvbuf='" + d_setvbuf + "'"
6336 $ WC "d_shm='" + d_shm + "'"
6337 $ WC "d_shmat='" + d_shmat + "'"
6338 $ WC "d_shmatprototype='" + d_shmatprototype + "'"
6339 $ WC "d_shmctl='" + d_shmctl + "'"
6340 $ WC "d_shmdt='" + d_shmdt + "'"
6341 $ WC "d_shmget='" + d_shmget + "'"
6342 $ WC "d_sigaction='" + d_sigaction + "'"
6343 $ WC "d_signbit='" + d_signbit + "'"
6344 $ WC "d_sigprocmask='" + d_sigprocmask + "'"
6345 $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
6346 $ WC "d_sin6_scope_id='" + d_sin6_scope_id + "'"
6347 $ WC "d_sitearch='define'"
6348 $ WC "d_sockaddr_in6='define'"
6349 $ WC "d_sockaddr_sa_len='" + d_sockaddr_sa_len + "'"
6350 $ WC "d_sockatmark='undef'"
6351 $ WC "d_sockatmarkproto='undef'"
6352 $ WC "d_socket='" + d_socket + "'"
6353 $ WC "d_socklen_t='" + d_socklen_t + "'"
6354 $ WC "d_sockpair='" + d_sockpair + "'"
6355 $ WC "d_socks5_init='undef'"
6356 $ WC "d_sprintf_returns_strlen='define'"
6357 $ WC "d_sqrtl='define'"
6358 $ WC "d_sresgproto='undef'"
6359 $ WC "d_sresgproto='undef'"
6360 $ WC "d_sresproto='undef'"
6361 $ WC "d_sresuproto='undef'"
6362 $ WC "d_stat='define'"
6363 $ WC "d_statblks='undef'"
6364 $ WC "d_statfs_f_flags='undef'"
6365 $ WC "d_statfs_s='undef'"
6366 $ WC "d_statfsflags='undef'"
6367 $ WC "d_static_inline='define'"
6368 $ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
6369 $ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
6370 $ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'"
6371 $ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'"
6372 $ WC "d_stdio_stream_array='undef'"
6373 $ WC "d_stdiobase='" + d_stdiobase + "'"
6374 $ WC "d_stdstdio='" + d_stdstdio + "'"
6375 $ WC "d_faststdio='" + d_faststdio + "'"
6376 $ WC "d_statvfs='" + d_statvfs + "'"
6377 $ WC "d_strchr='define'"
6378 $ WC "d_strcoll='" + d_strcoll + "'"
6379 $ WC "d_strctcpy='define'"
6380 $ WC "d_strerrm='strerror((e),vaxc$errno)'"
6381 $ WC "d_strerror='define'"
6382 $ WC "d_strftime='define'"
6383 $ WC "d_strlcat='undef'"
6384 $ WC "d_strlcpy='undef'"
6385 $ WC "d_strtod='define'"
6386 $ WC "d_strtol='define'"
6387 $ WC "d_strtold='" + d_strtold + "'"
6388 $ WC "d_strtoll='" + d_strtoll + "'"
6389 $ WC "d_strtoq='" + d_strtoq + "'"
6390 $ WC "d_strtoul='define'"
6391 $ WC "d_strtoull='" + d_strtoull + "'"
6392 $ WC "d_strtouq='" + d_strtouq + "'"
6393 $ WC "d_strxfrm='" + d_strxfrm + "'"
6394 $ WC "d_suidsafe='undef'"
6395 $ WC "d_symlink='" + d_symlink + "'"
6396 $ WC "d_syscall='undef'"
6397 $ WC "d_syscallproto='undef'"
6398 $ WC "d_sysconf='" + d_sysconf + "'"
6399 $ WC "d_sysernlst='undef'"
6400 $ WC "d_syserrlst='undef'"
6401 $ WC "d_system='define'"
6402 $ WC "d_tcgetpgrp='undef'"
6403 $ WC "d_tcsetpgrp='undef'"
6404 $ WC "d_telldir='define'"
6405 $ WC "d_telldirproto='define'"
6406 $ WC "d_tgamma='" + d_tgamma + "'"
6407 $ WC "d_time='define'"
6408 $ WC "d_timegm='undef'"
6409 $ WC "d_times='define'"
6410 $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.0")
6412 $ WC "d_tm_tm_gmtoff='define'"
6413 $ WC "d_tm_tm_zone='define'"
6415 $ WC "d_tm_tm_gmtoff='undef'"
6416 $ WC "d_tm_tm_zone='undef'"
6418 $ WC "d_truncate='" + d_truncate + "'"
6419 $ WC "d_trunc='" + d_trunc + "'"
6420 $ WC "d_truncl='" + d_truncl + "'"
6421 $ WC "d_tzname='" + d_tzname + "'"
6422 $ WC "d_u32align='define'"
6423 $ WC "d_ualarm='" + d_ualarm + "'"
6424 $ WC "d_umask='define'"
6425 $ WC "d_uname='" + d_uname + "'"
6426 $ WC "d_union_semun='undef'"
6427 $ WC "d_unlink_all_versions='" + d_unlink_all_versions + "'" ! VMS-specific
6428 $ WC "d_unordered='undef'"
6429 $ WC "d_unsetenv='" + d_unsetenv + "'"
6430 $ WC "d_clearenv='" + d_clearenv + "'"
6431 $ WC "d_usleep='" + d_usleep + "'"
6432 $ WC "d_usleepproto='" + d_usleep + "'"
6433 $ WC "d_ustat='undef'"
6434 $ WC "d_vendorarch='undef'"
6435 $ WC "d_vendorbin='undef'"
6436 $ WC "d_vendorlib='undef'"
6437 $ WC "d_vendorscript='undef'"
6438 $ WC "d_vfork='define'"
6439 $ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
6440 $ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
6441 $ WC "d_vms_shorten_long_symbols='" + d_vms_shorten_long_symbols + "'" ! VMS
6442 $ WC "d_void_closedir='define'"
6443 $ WC "d_voidsig='undef'"
6444 $ WC "d_voidtty='" + "'"
6445 $ WC "d_volatile='define'"
6446 $ WC "d_vprintf='define'"
6447 $ WC "d_vsnprintf='" + d_vsnprintf + "'"
6448 $ WC "d_wait4='" + d_wait4 + "'"
6449 $ WC "d_waitpid='define'"
6450 $ WC "d_wcscmp='define'"
6451 $ WC "d_wcstombs='define'"
6452 $ WC "d_wcsxfrm='define'"
6453 $ WC "d_wctomb='define'"
6454 $ WC "d_writev='undef'"
6455 $ WC "d_xenix='undef'"
6456 $ WC "db_hashtype=' '"
6457 $ WC "db_prefixtype=' '"
6458 $ WC "db_version_major='" + "'"
6459 $ WC "db_version_minor='" + "'"
6460 $ WC "db_version_patch='" + "'"
6461 $ WC "dbgprefix='" + dbgprefix + "'"
6462 $ WC "devtype='" + devtype + "'"
6463 $ WC "direntrytype='struct dirent'"
6464 $ WC "dlext='" + dlext + "'"
6465 $ WC "dlobj='" + dlobj + "'"
6466 $ WC "dlsrc='dl_vms.xs'"
6467 $ WC "doublekind='3'"
6468 $ WC "doublesize='" + doublesize + "'"
6469 $ WC "drand01='" + drand01 + "'"
6470 $ WC "dtrace='" + "'"
6472 $! The dynamic_ext symbol may be quite long
6474 $ tmp = "dynamic_ext='" + dynamic_ext + "'"
6478 $ WC "ebcdic='undef'"
6479 $ WC "embedmymalloc='" + usemymalloc + "'"
6480 $ WC "eunicefix=':'"
6481 $ WC "exe_ext='" + exe_ext + "'"
6483 $! The extensions symbols may be quite long
6485 $ WC/symbol "extensions='", nonxs_ext, " ", nonxs_ext2, " ", dynamic_ext, "'"
6486 $ WC "fflushNULL='define'"
6487 $ WC "fflushall='undef'"
6488 $ WC "fpostype='fpos_t'"
6489 $ WC "freetype='void'"
6490 $ WC "full_ar='" + "'"
6491 $ WC "full_csh='" + " '"
6492 $ WC "full_sed='_NLA0:'"
6493 $ WC "gccversion='" + gccversion + "'"
6494 $ WC "gidformat='lu'"
6497 $ WC "gidtype='" + gidtype + "'"
6498 $ WC "groupstype='Gid_t'"
6499 $ WC "h_fcntl='false'"
6500 $ WC "h_sysfile='false'"
6502 $ WC "hintfile='" + "'"
6503 $ WC "i16size='" + i16size + "'"
6504 $ WC "i16type='" + i16type + "'"
6505 $ WC "i32size='" + i32size + "'"
6506 $ WC "i32type='" + i32type + "'"
6507 $ WC "i64size='" + i64size + "'"
6508 $ WC "i64type='" + i64type + "'"
6509 $ WC "i8size='" + i8size + "'"
6510 $ WC "i8type='" + i8type + "'"
6511 $ WC "i_arpainet='" + i_arpainet + "'"
6512 $ WC "i_assert='define'"
6513 $ WC "i_bfd='undef'"
6514 $ WC "i_bsdioctl='undef'"
6515 $ WC "i_crypt='undef'"
6517 $ WC "i_dbm='undef'"
6518 $ WC "i_dirent='undef'" ! we roll our own
6519 $ WC "i_dlfcn='undef'"
6520 $ WC "i_execinfo='undef'"
6521 $ WC "i_fcntl='" + i_fcntl + "'"
6522 $ WC "i_fenv='undef'"
6523 $ WC "i_float='define'"
6525 $ WC "i_fp_class='undef'"
6526 $ WC "i_gdbm='undef'"
6527 $ WC "i_gdbm_ndbm='undef'"
6528 $ WC "i_gdbmndbm='undef'"
6529 $ WC "i_grp='" + i_grp + "'"
6530 $ WC "i_ieeefp='undef'"
6531 $ WC "i_inttypes='" + i_inttypes + "'"
6532 $ WC "i_langinfo='" + i_langinfo + "'"
6533 $ WC "i_libutil='" + i_libutil + "'"
6534 $ WC "i_limits='define'"
6535 $ WC "i_locale='" + i_locale + "'"
6536 $ WC "i_machcthr='undef'"
6537 $ WC "i_machcthreads='undef'"
6538 $ WC "i_malloc='undef'"
6539 $ WC "i_mallocmalloc='undef'"
6540 $ WC "i_math='define'"
6541 $ WC "i_memory='undef'"
6542 $ WC "i_mntent='undef'"
6543 $ WC "i_ndbm='undef'"
6544 $ WC "i_netdb='" + i_netdb + "'"
6545 $ WC "i_neterrno='define'"
6546 $ WC "i_netinettcp='" + i_netinettcp + "'"
6547 $ WC "i_niin='" + i_niin + "'"
6548 $ WC "i_poll='" + i_poll + "'"
6549 $ WC "i_prot='undef'"
6550 $ WC "i_pthread='define'"
6551 $ WC "i_pwd='undef'"
6552 $ WC "i_quadmath='undef'"
6553 $ WC "i_rpcsvcdbm='undef'"
6554 $ WC "i_sgtty='undef'"
6555 $ WC "i_shadow='" + i_shadow + "'"
6556 $ WC "i_socks='" + i_socks + "'"
6557 $ WC "i_stdarg='define'"
6558 $ IF ccname .EQS. "DEC" .AND. F$INTEGER(Dec_C_Version).GE.60400000
6560 $ WC "i_stdbool='define'"
6562 $ WC "i_stdbool='undef'"
6564 $ WC "i_stddef='define'"
6565 $ WC "i_stdint='undef'"
6566 $ WC "i_stdlib='define'"
6567 $ WC "i_string='define'"
6568 $ WC "i_sunmath='undef'"
6569 $ WC "i_sysaccess='" + i_sysaccess + "'"
6570 $ WC "i_sysdir='undef'"
6571 $ WC "i_sysfile='" + i_sysfile + "'"
6572 $ WC "i_sysfilio='undef'"
6573 $ WC "i_sysin='undef'"
6574 $ WC "i_sysioctl='" + i_sysioctl + "'"
6575 $ WC "i_syslog='" + i_syslog + "'"
6576 $ WC "i_sysmman='undef'"
6577 $ WC "i_sysmode='" + i_sysmode + "'"
6578 $ WC "i_sysmount='undef'"
6579 $ WC "i_sysndir='undef'"
6580 $ WC "i_sysparam='undef'"
6581 $ WC "i_syspoll='" + i_syspoll + "'"
6582 $ WC "i_sysresrc='undef'"
6583 $ WC "i_syssecrt='" + i_syssecrt + "'"
6584 $ WC "i_sysselct='undef'"
6585 $ WC "i_syssockio='undef'"
6586 $ WC "i_sysstat='define'"
6587 $ WC "i_sysstatfs='undef'"
6588 $ WC "i_sysstatvfs='" + i_sysstatvfs + "'"
6589 $ WC "i_systime='undef'"
6590 $ WC "i_systimek='undef'"
6591 $ WC "i_systimes='undef'"
6592 $ WC "i_systypes='define'"
6593 $ WC "i_sysuio='" + i_sysuio + "'"
6594 $ WC "i_sysun='" + i_sysun + "'"
6595 $ WC "i_sysutsname='" + i_sysutsname + "'"
6596 $ WC "i_sysvfs='undef'"
6597 $ WC "i_syswait='undef'"
6598 $ WC "i_termio='undef'"
6599 $ WC "i_termios='undef'"
6600 $ WC "i_time='define'"
6601 $ WC "i_unistd='" + i_unistd + "'"
6602 $ WC "i_ustat='undef'"
6603 $ WC "i_utime='" + i_utime + "'"
6604 $ WC "i_values='undef'"
6605 $ WC "i_varargs='undef'"
6606 $ WC "i_varhdr='stdarg.h'"
6607 $ WC "i_vfork='undef'"
6608 $ WC "inc_version_list='0'"
6609 $ WC "inc_version_list_init='0'"
6610 $ WC "installarchlib='" + installarchlib + "'"
6611 $ WC "installbin='" + installbin + "'"
6612 $ WC "installman1dir='" + installman1dir + "'"
6613 $ WC "installman3dir='" + installman3dir + "'"
6614 $ WC "installprefix='" + vms_prefix + "'"
6615 $ WC "installprefixexp='" + vms_prefix + ":'"
6616 $ WC "installprivlib='" + installprivlib + "'"
6617 $ WC "installscript='" + installscript + "'"
6618 $ WC "installsitearch='" + installsitearch + "'"
6619 $ WC "installsitebin='" + sitebin + "'"
6620 $ WC "installsitelib='" + installsitelib + "'"
6621 $ WC "installusrbinperl='undef'"
6622 $ WC "intsize='" + intsize + "'"
6623 $ WC "ivdformat='" + ivdformat + "'"
6624 $ WC "ivsize='" + ivsize + "'"
6625 $ WC "ivtype='" + ivtype + "'"
6627 $! The xs_extensions symbol may be quite long
6629 $ WC/symbol "known_extensions='", xs_extensions, " ", nonxs_ext, " ", nonxs_ext2, "'"
6630 $ WC "ld='" + ld + "'"
6631 $ WC "ld_can_script='undef'"
6632 $ WC "lddlflags='/Share'"
6633 $ WC "ldflags='" + ldflags + "'"
6634 $ WC "ldflags_uselargefiles='" + "'"
6635 $ WC "ldlibpthname='" + "'"
6636 $ WC "lib_ext='" + lib_ext + "'"
6637 $ WC "libc='" + libc + "'"
6638 $ WC "libpth='/sys$share /sys$library'"
6639 $ WC "libs='" + libs + "'"
6640 $ WC "libswanted='" + "'"
6641 $ WC "libswanted_uselargefiles='" + "'"
6642 $ WC "longdblsize='" + longdblsize + "'"
6643 $ WC "longdblkind='" + longdblkind + "'"
6644 $ WC "longlongsize='" + longlongsize + "'"
6645 $ WC "longsize='" + longsize + "'"
6646 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
6648 $ WC "lseeksize='8'"
6649 $ WC "lseektype='off_t'"
6651 $ WC "lseeksize='4'"
6652 $ WC "lseektype='int'"
6656 $ WC "make='" + make + "'"
6657 $ WC "malloctype='void *'"
6658 $ WC "usemallocwrap='" + usemallocwrap + "'"
6659 $ WC "man1ext='rno'"
6660 $ WC "man3ext='rno'"
6661 $ WC "mmaptype='void *'"
6662 $ WC "modetype='unsigned int'"
6663 $ WC "multiarch='undef'"
6664 $ WC "mydomain='" + mydomain + "'"
6665 $ WC "myhostname='" + myhostname + "'"
6666 $ WC "myuname='" + myuname + "'"
6667 $ WC "need_va_copy='undef'"
6668 $ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
6669 $ WC "netdb_host_type='" + netdb_host_type + "'"
6670 $ WC "netdb_name_type='" + netdb_name_type + "'"
6671 $ WC "netdb_net_type='" + netdb_net_type + "'"
6672 $ WC/symbol "nonxs_ext='", nonxs_ext, " ", nonxs_ext2, "'"
6673 $ WC "nveformat='" + nveformat + "'"
6674 $ WC "nvEUformat='" + nvEUformat + "'"
6675 $ WC "nvfformat='" + nvfformat + "'"
6676 $ WC "nvFUformat='" + nvFUformat + "'"
6677 $ WC "nvgformat='" + nvgformat + "'"
6678 $ WC "nvGUformat='" + nvGUformat + "'"
6679 $ WC "nvsize='" + nvsize + "'"
6680 $ WC "nvtype='" + nvtype + "'"
6681 $ WC "o_nonblock=' '"
6682 $ WC "obj_ext='" + obj_ext + "'"
6683 $ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
6684 $ WC "oldarchlib='" + oldarchlib + "'"
6685 $ WC "oldarchlibexp='" + oldarchlibexp + "'"
6686 $ WC "optimize='" + optimize + "'"
6687 $ WC "osname='" + osname + "'"
6688 $ WC "osvers='" + osvers + "'"
6689 $ WC "otherlibdirs='" + "'"
6690 $ WC "package='" + package + "'"
6691 $ WC "pager='" + pager + "'"
6692 $ WC "patchlevel='" + patchlevel + "'"
6694 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
6695 $ WC "perladmin='" + perladmin + "'"
6696 $ WC "perllibs='" + perllibs + "'"
6697 $ WC "perlpath='" + "''vms_prefix':[000000]Perl''exe_ext'" + "'"
6698 $ WC "perl_static_inline='static inline'"
6699 $ WC "perl_symbol='" + perl_symbol + "'" ! VMS specific
6700 $ WC "perl_verb='" + perl_verb + "'" ! VMS specific
6701 $ WC "pgflquota='" + pgflquota + "'"
6702 $ WC "pidtype='" + pidtype + "'"
6703 $ WC "prefix='" + vms_prefix + "'"
6704 $ WC "prefixexp='" + vms_prefix + ":'"
6705 $ WC "privlib='" + privlib + "'"
6706 $ WC "privlibexp='" + privlibexp + "'"
6707 $ WC "procselfexe=' '"
6708 $ WC "prototype='define'"
6709 $ WC "ptrsize='" + ptrsize + "'"
6710 $ WC "quadkind='" + quadkind + "'"
6711 $ WC "quadtype='" + quadtype + "'"
6712 $ WC "randbits='" + randbits + "'"
6713 $ WC "randfunc='" + randfunc + "'"
6714 $ WC "randseedtype='" + randseedtype + "'"
6715 $ WC "ranlib='" + "'"
6716 $ WC "rd_nodata=' '"
6717 $ WC "revision='" + revision + "'"
6718 $ WC "sGMTIME_max='4294967295'"
6719 $ WC "sGMTIME_min='0'"
6720 $ WC "sLOCALTIME_max='4294967295'"
6721 $ WC "sLOCALTIME_min='0'"
6722 $ WC "sPRId64='" + sPRId64 + "'"
6723 $ WC "sPRIEUldbl='" + sPRIEUldbl + "'"
6724 $ WC "sPRIFUldbl='" + sPRIFUldbl + "'"
6725 $ WC "sPRIGUldbl='" + sPRIGUldbl + "'"
6726 $ WC "sPRIXU64='" + sPRIXU64 + "'"
6727 $ WC "sPRIeldbl='" + sPRIeldbl + "'"
6728 $ WC "sPRIfldbl='" + sPRIfldbl + "'"
6729 $ WC "sPRIgldbl='" + sPRIgldbl + "'"
6730 $ WC "sPRIi64='" + sPRIi64 + "'"
6731 $ WC "sPRIo64='" + sPRIo64 + "'"
6732 $ WC "sPRIu64='" + sPRIu64 + "'"
6733 $ WC "sPRIx64='" + sPRIx64 + "'"
6734 $ WC "sSCNfldbl='" + sSCNfldbl + "'"
6735 $ WC "sched_yield='" + sched_yield + "'"
6736 $ WC "scriptdir='" + scriptdir + "'"
6737 $ WC "scriptdirexp='" + scriptdir + "'" ! use scriptdir for now
6738 $ WC "seedfunc='" + seedfunc + "'"
6739 $ WC "selectminbits='32'"
6740 $ WC "selecttype='" + selecttype + "'"
6742 $ WC "sharpbang='#!'"
6743 $ WC "shmattype='" + shmattype + "'"
6744 $ WC "shortsize='" + shortsize + "'"
6745 $ IF (f$length(sig_name) .GE. 244)
6747 $ tmp = "sig_name='" + sig_name + "'"
6751 $ WC "sig_name='" + sig_name + "'"
6753 $ IF (f$length(sig_name_init) .GE. 244)
6755 $ tmp = "sig_name_init='" + sig_name_init + "'"
6759 $ WC "sig_name_init='" + sig_name_init + "'"
6761 $ WC "sig_num='" + sig_num + "'"
6762 $ WC "sig_num_init='" + sig_num_init + "'"
6763 $ WC "sig_count='" + sig_count + "'"
6764 $ WC "sig_size='" + sig_size + "'"
6765 $ WC "signal_t='" + signal_t + "'"
6766 $ WC "sitearch='" + sitearch + "'"
6767 $ WC "sitearchexp='" + sitearchexp + "'"
6768 $ WC "sitebin='" + sitebin + "'"
6769 $ WC "sitebinexp='" + sitebin + "'"
6770 $ WC "sitelib='" + sitelib + "'"
6771 $ WC "sitelib_stem='" + sitelib_stem + "'"
6772 $ WC "sitelibexp='" + sitelibexp + "'"
6773 $ WC "siteprefix='" + vms_prefix + "'"
6774 $ WC "siteprefixexp='" + vms_prefix + ":'"
6775 $ WC "sizesize='" + sizesize + "'"
6776 $ WC "sizetype='size_t'"
6777 $ WC "so='" + so + "'"
6778 $ WC "socksizetype='" + socksizetype + "'"
6779 $ WC "spitshell='write sys$output '"
6780 $ WC "src='" + src + "'"
6781 $ WC "ssizetype='int'"
6782 $ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
6783 $ WC "static_ext='" + static_ext + "'"
6784 $ WC "st_ino_size='" + st_ino_size + "'"
6785 $ WC "st_ino_sign='1'"
6786 $ WC "stdchar='" + stdchar + "'"
6787 $ WC "stdio_base='((*fp)->_base)'"
6788 $ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
6789 $ WC "stdio_cnt='((*fp)->_cnt)'"
6790 $ WC "stdio_ptr='((*fp)->_ptr)'"
6791 $ WC "stdio_stream_array=' " + "'"
6792 $ WC "subversion='" + subversion + "'"
6793 $ WC "targetarch='" + "'"
6794 $ WC "targetsh='MCR'"
6795 $ WC "timetype='" + timetype + "'"
6796 $ WC "u16size='" + u16size + "'"
6797 $ WC "u16type='" + u16type + "'"
6798 $ WC "u32size='" + u32size + "'"
6799 $ WC "u32type='" + u32type + "'"
6800 $ WC "u64size='" + u64size + "'"
6801 $ WC "u64type='" + u64type + "'"
6802 $ WC "u8size='" + u8size + "'"
6803 $ WC "u8type='" + u8type + "'"
6804 $ WC "uidformat='lu'"
6807 $ WC "uidtype='" + uidtype + "'"
6808 $ WC "uquadtype='" + uquadtype + "'"
6809 $ WC "use5005threads='" + use5005threads + "'"
6810 $ WC "use64bitall='" + use64bitall + "'"
6811 $ WC "use64bitint='" + use64bitint + "'"
6812 $ WC "usecasesensitive='" + be_case_sensitive + "'" ! VMS-specific
6813 $ WC "usedebugging_perl='"+use_debugging_perl+"'"
6814 $ WC "usedefaulttypes='" + usedefaulttypes + "'" ! VMS-specific
6815 $ WC "usecbacktrace='undef'"
6816 $ WC "usecrosscompile='undef'"
6817 $ WC "usedevel='" + usedevel + "'"
6818 $ WC "usedl='" + usedl + "'"
6819 $ WC "usedtrace='undef'"
6820 $ WC "usefaststdio='" + usefaststdio + "'"
6821 $ WC "useieee='" + useieee + "'" ! VMS-specific
6822 $ WC "useithreads='" + useithreads + "'"
6823 $ WC "usekernelthreads='" + usekernelthreads + "'" ! VMS-specific
6824 $ WC "usekernprocpathname='undef'"
6825 $ WC "usensgetexecutablepath='undef'"
6826 $ WC "uselargefiles='" + uselargefiles + "'"
6827 $ WC "uselongdouble='" + uselongdouble + "'"
6828 $ WC "usemorebits='" + usemorebits + "'"
6829 $ WC "usemultiplicity='" + usemultiplicity + "'"
6830 $ WC "usemymalloc='" + usemymalloc + "'"
6831 $ WC "useperlio='define'"
6832 $ WC "useposix='false'"
6833 $ WC "usequadmath='undef'"
6834 $ WC "usereentrant='undef'"
6835 $ WC "userelocatableinc='undef'"
6836 $ WC "usesecurelog='" + usesecurelog + "'" ! VMS-specific
6837 $ WC "useshortenedsymbols='" + useshortenedsymbols + "'" ! VMS-specific
6838 $ WC "useshrplib='true'"
6839 $ WC "usesitecustomize='" + usesitecustomize + "'"
6840 $ WC "usesocks='undef'"
6841 $ WC "usethreads='" + usethreads + "'"
6842 $ WC "usethreadupcalls='" + usethreadupcalls + "'" ! VMS-specific
6843 $ WC "usevendorprefix='" + "'" ! try to say no, though we'll be ignored as of MM 5.90_01
6844 $ WC "useversionedarchname='" + useversionedarchname + "'"
6845 $ WC "usevfork='true'"
6846 $ WC "usevmsdebug='" + usevmsdebug + "'" ! VMS-specific
6847 $ WC "uvoformat='" + uvoformat + "'"
6848 $ WC "uvsize='" + uvsize + "'"
6849 $ WC "uvtype='" + uvtype + "'"
6850 $ WC "uvuformat='" + uvuformat + "'"
6851 $ WC "uvxformat='" + uvxformat + "'"
6852 $ WC "uvXUformat='" + uvXUformat + "'"
6853 $ WC "vendorarch='" + "'"
6854 $ WC "vaproto='define'"
6855 $ WC "vendorarchexp='" + "'"
6856 $ WC "vendorbin='" + "'"
6857 $ WC "vendorbinexp='" + "'"
6858 $ WC "vendorlib_stem='" + "'"
6859 $ WC "vendorlib='" + "'"
6860 $ WC "vendorlibexp='" + "'"
6861 $ WC "vendorprefix='" + "'"
6862 $ WC "vendorprefixexp='" + "'"
6863 $ WC "version='" + version + "'"
6864 $ WC "version_patchlevel_string='" + version_patchlevel_string + "'"
6865 $ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific
6866 $ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific
6867 $ WC "vms_ver='" + vms_ver + "'" ! VMS specific
6869 $! ## The UNIXy POSIXy reentrantey thingys ##
6870 $! See "Appendix B, Version-Dependency Tables" in the C RTL
6871 $! manual for when assorted _r functions became available.
6873 $ IF use_threads .AND. vms_ver .GES. "7.2"
6875 $ WC "asctime_r_proto='REENTRANT_PROTO_B_SB'"
6876 $ WC "d_asctime_r='define'"
6877 $ WC "ctime_r_proto='REENTRANT_PROTO_B_SB'"
6878 $ WC "d_ctime_r='define'"
6880 $ WC "asctime_r_proto='0'"
6881 $ WC "d_asctime_r='undef'"
6882 $ WC "ctime_r_proto='0'"
6883 $ WC "d_ctime_r='undef'"
6885 $ WC "d_crypt_r='undef'"
6886 $ WC "d_ctermid_r='undef'"
6887 $ WC "d_drand48_r='undef'"
6888 $ WC "d_endgrent_r='undef'"
6889 $ WC "d_endhostent_r='undef'"
6890 $ WC "d_endnetent_r='undef'"
6891 $ WC "d_endprotoent_r='undef'"
6892 $ WC "d_endpwent_r='undef'"
6893 $ WC "d_endservent_r='undef'"
6894 $ WC "d_getgrent_r='undef'"
6895 $ WC "d_getgrgid_r='" + d_getgrgid_r + "'"
6896 $ WC "d_getgrnam_r='" + d_getgrnam_r + "'"
6897 $ WC "d_gethostbyaddr_r='undef'"
6898 $ WC "d_gethostbyname_r='undef'"
6899 $ WC "d_gethostent_r='undef'"
6900 $ WC "d_getlogin_r='undef'"
6901 $ WC "d_getnetbyaddr_r='undef'"
6902 $ WC "d_getnetbyname_r='undef'"
6903 $ WC "d_getnetent_r='undef'"
6904 $ WC "d_getprotobyname_r='undef'"
6905 $ WC "d_getprotobynumber_r='undef'"
6906 $ WC "d_getprotoent_r='undef'"
6907 $ WC "d_getpwent_r='undef'"
6908 $ WC "d_getpwnam_r='" + d_getpwnam_r + "'"
6909 $ WC "d_getpwuid_r='" + d_getpwuid_r + "'"
6910 $ WC "d_getservbyname_r='undef'"
6911 $ WC "d_getservbyport_r='undef'"
6912 $ WC "d_getservent_r='undef'"
6913 $ WC "d_getspnam_r='undef'"
6914 $ WC "d_gmtime_r='undef'" ! leave undef'd; we use my_gmtime
6915 $ WC "d_lgamma_r='undef'"
6916 $ WC "d_localtime_r='undef'" ! leave undef'd; we use my_localtime
6917 $ WC "d_localtime_r_needs_tzset='undef'"
6918 $ WC "d_random_r='undef'"
6919 $ WC "d_readdir_r='define'" ! always defined; we roll our own
6920 $ WC "d_readdir64_r='undef'"
6921 $ WC "d_setgrent_r='undef'"
6922 $ WC "d_sethostent_r='undef'"
6923 $ WC "d_setlocale_r='undef'"
6924 $ WC "d_setnetent_r='undef'"
6925 $ WC "d_setprotoent_r='undef'"
6926 $ WC "d_setpwent_r='undef'"
6927 $ WC "d_setservent_r='undef'"
6928 $ WC "d_snprintf='" + d_snprintf + "'"
6929 $ WC "d_srand48_r='undef'"
6930 $ WC "d_srandom_r='undef'"
6931 $ WC "d_strerror_r='undef'"
6932 $ WC "d_tmpnam_r='undef'"
6933 $ WC "d_ttyname_r='" + d_ttyname_r + "'"
6934 $ WC "ctermid_r_proto='0'"
6935 $ WC "crypt_r_proto='0'"
6936 $ WC "drand48_r_proto='0'"
6937 $ WC "endgrent_r_proto='0'"
6938 $ WC "endhostent_r_proto='0'"
6939 $ WC "endnetent_r_proto='0'"
6940 $ WC "endprotoent_r_proto='0'"
6941 $ WC "endpwent_r_proto='0'"
6942 $ WC "endservent_r_proto='0'"
6943 $ WC "getgrent_r_proto='0'"
6944 $ WC "getgrgid_r_proto='" + getgrgid_r_proto + "'"
6945 $ WC "getgrnam_r_proto='" + getgrnam_r_proto + "'"
6946 $ WC "gethostbyaddr_r_proto='0'"
6947 $ WC "gethostbyname_r_proto='0'"
6948 $ WC "gethostent_r_proto='0'"
6949 $ WC "getlogin_r_proto='0'"
6950 $ WC "getnetbyaddr_r_proto='0'"
6951 $ WC "getnetbyname_r_proto='0'"
6952 $ WC "getnetent_r_proto='0'"
6953 $ WC "getprotobyname_r_proto='0'"
6954 $ WC "getprotobynumber_r_proto='0'"
6955 $ WC "getprotoent_r_proto='0'"
6956 $ WC "getpwent_r_proto='0'"
6957 $ WC "getpwnam_r_proto='0'"
6958 $ WC "getpwuid_r_proto='0'"
6959 $ WC "getservbyname_r_proto='0'"
6960 $ WC "getservbyport_r_proto='0'"
6961 $ WC "getservent_r_proto='0'"
6962 $ WC "getspnam_r_proto='0'"
6963 $ WC "gmtime_r_proto='0'"
6964 $ WC "localtime_r_proto='0'"
6965 $ WC "random_r_proto='0'"
6966 $ WC "readdir_r_proto='REENTRANT_PROTO_I_TSR'" ! always defined; we roll our own
6967 $ WC "readdir64_r_proto='0'"
6968 $ WC "setgrent_r_proto='0'"
6969 $ WC "sethostent_r_proto='0'"
6970 $ WC "setlocale_r_proto='0'"
6971 $ WC "setnetent_r_proto='0'"
6972 $ WC "setprotoent_r_proto='0'"
6973 $ WC "setpwent_r_proto='0'"
6974 $ WC "setservent_r_proto='0'"
6975 $ WC "srand48_r_proto='0'"
6976 $ WC "srandom_r_proto='0'"
6977 $ WC "strerror_r_proto='0'"
6978 $ WC "tmpnam_r_proto='0'"
6979 $ WC "ttyname_r_proto='" + ttyname_r_proto + "'"
6981 $! ##END WRITE NEW CONSTANTS HERE##
6985 $! Okay, we've gotten here. Build munchconfig.exe
6986 $ COPY/NOLOG [-.vms]munchconfig.c []
6987 $ COPY/NOLOG [-.vms]'Makefile_SH' []
6988 $ 'Perl_CC' 'ccflags' munchconfig.c
6991 $ OPEN/WRITE CONFIG []munchconfig.opt
6992 $ IF ccname .EQS. "GCC"
6994 $ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library"
6996 $ WRITE CONFIG "Sys$Share:VAXCRTL/Share"
6998 $ 'ld' munchconfig.obj,munchconfig.opt/opt
6999 $ DELETE/NOLOG/NOCONFIRM munchconfig.opt;
7001 $ 'ld' munchconfig.obj
7003 $ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj;
7004 $ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
7005 $ IF ccname .EQS. "CXX"
7007 $ CALL Cxx_demangler_cleanup
7010 $ IF alldone .EQS. ""
7015 If you'd like to make any changes to the config.sh file before I begin
7016 to configure things, answer yes to the following question.
7020 $ rp="Do you wish to edit ''basename_config_sh'? [''bool_dflt'] "
7025 $ echo4 "Be sure to type LOGOUT after you have edited the file,"
7026 $ echo4 "then this procedure will resume."
7028 $ default = F$ENVIRONMENT("DEFAULT")
7029 $ DIRECTORY 'config_sh'
7032 $ SET DEFAULT 'default'
7037 $ echo4 "Adding ''osname' specific preprocessor commands."
7039 $ ! we need an fdl file
7040 $ CREATE [-]CONFIG.FDL
7045 $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
7046 $ ! First spit out the header info with the local defines (to get
7047 $ ! around the 255 character command line limit)
7048 $ OPEN/APPEND CONFIG [-]config.local
7049 $ IF use_debugging_perl THEN WC "#define DEBUGGING"
7050 $ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
7051 $ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
7052 $ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
7053 $ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
7054 $ IF ccname .EQS. "GCC" THEN WC "#define GNUC_ATTRIBUTE_CHECK"
7055 $ IF (Has_Dec_C_Sockets)
7057 $ WC "#define VMS_DO_SOCKETS"
7058 $ WC "#define DECCRTL_SOCKETS"
7060 $! This is VMS-specific for now
7061 $ WC "#''d_setenv' HAS_SETENV"
7062 $ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
7063 $ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
7064 $ IF use64bitint .OR. use64bitint .EQS. "define"
7066 $ WC "#define USE_64_BIT_INT"
7068 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
7070 $ WC "#define USE_LONG_DOUBLE"
7072 $ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
7073 WC "#define USE_64_BIT_ALL"
7074 $ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
7075 $ IF shorten_long_symbols THEN WC "#define VMS_SHORTEN_LONG_SYMBOLS"
7076 $ IF use_ieee_math THEN WC "#define USE_IEEE"
7077 $ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
7078 $ WC "#define HAS_ENVGETENV"
7079 $ WC "#define PERL_EXTERNAL_GLOB"
7080 $ IF kill_by_sigprc .EQS. "define" then WC "#define KILL_BY_SIGPRC"
7081 $ IF unlink_all_versions .OR. unlink_all_versions .EQS. "define" THEN -
7082 WC "#define UNLINK_ALL_VERSIONS"
7083 $ IF d_sockaddr_sa_len .EQS. "define" then WC "#define _SOCKADDR_LEN 1"
7084 $ IF ccname .EQS. "CXX" then WC "#define NO_ENVIRON_ARRAY"
7085 $ IF ccname .EQS. "CXX" then WC "#define VMS" ! only has __VMS by default
7088 $ echo4 "Doing variable substitutions on .SH files..."
7089 $ echo4 "Extracting config.h (with variable substitutions)"
7091 $! Now build the normal config.h
7092 $ DEFINE/USER_MODE sys$output [-]config.main
7093 $ mcr []munchconfig 'config_sh' [-]config_h.sh
7094 $ ! Concatenate them together
7095 $ copy [-]config.local,[-]config.main [-]config.h
7097 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.MAIN;*
7098 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.LOCAL;*
7099 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;*
7101 $ IF ccname .EQS. "DEC"
7103 $ DECC_REPLACE = "DECC=decc=1"
7105 $ DECC_REPLACE = "DECC="
7107 $ IF ccname .EQS. "CXX"
7109 $ DECCXX_REPLACE = "DECCXX=DECCXX=1"
7111 $ DECCXX_REPLACE = "DECCXX="
7113 $ IF ccname .EQS. "GCC"
7115 $ GNUC_REPLACE = "GNUC=gnuc=1"
7117 $ GNUC_REPLACE = "GNUC="
7119 $ IF Has_Dec_C_Sockets
7121 $ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
7123 $ SOCKET_REPLACE = "SOCKET="
7127 $ THREAD_REPLACE = "THREAD=THREADED=1"
7129 $ THREAD_REPLACE = "THREAD="
7133 $ MALLOC_REPLACE = "MALLOC=MALLOC=1"
7135 $ MALLOC_REPLACE = "MALLOC="
7137 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
7139 $ IF usestdstat .or. usestdstat .eqs. "define"
7141 $ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_USE_STD_STAT=1"
7143 $ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_LARGEFILE=1"
7146 $ LARGEFILE_REPLACE = "LARGEFILE="
7148 $ IF use_vmsdebug_perl
7150 $ DEBUG_REPLACE = "USEVMSDEBUG=__DEBUG__=1"
7152 $ DEBUG_REPLACE = "USEVMSDEBUG="
7154 $ PREFIX_REPLACE = "PREFIX=PREFIX=''prefix'"
7156 $! In order not to stress the tiny command buffer on pre-7.3-2 systems,
7157 $! we put the following substitutions in a file and pass the file to
7160 $ open/write CONFIG extra_subs.txt
7161 $ WC := write CONFIG
7162 $ WC "''DECC_REPLACE'"
7163 $ WC "''DECCXX_REPLACE'"
7165 $ WC "''GNUC_REPLACE'"
7166 $ WC "''SOCKET_REPLACE'"
7167 $ WC "''THREAD_REPLACE'"
7168 $ WC "''C_Compiler_Replace'"
7169 $ WC "''MALLOC_REPLACE'"
7170 $ WC "''THREAD_UPCALLS'"
7171 $ WC "''THREAD_KERNEL'"
7172 $ WC "PV=''version'"
7173 $ WC "FLAGS=FLAGS=''extra_flags'"
7174 $ WC "''LARGEFILE_REPLACE'"
7175 $ WC "ARCHNAME=ARCHNAME=''archname'"
7176 $ WC "''DEBUG_REPLACE'"
7177 $ WC "''PREFIX_REPLACE'"
7180 $ echo4 "Extracting ''defmakefile' (with variable substitutions)"
7181 $ DEFINE/USER_MODE sys$output 'UUmakefile'
7182 $ mcr []munchconfig 'config_sh' 'Makefile_SH' -f extra_subs.txt
7183 $! Clean up after ourselves
7184 $ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
7185 $ DELETE/NOLOG/NOCONFIRM []extra_subs.txt;
7187 $! Note that the /key qualifier to search, as in:
7188 $! search README.* "=head"/key=(position=1)/window=0/output=extra.pods
7189 $! is not supported on VMS V5.5-2, hence not used in extra_pods.com.
7191 $ echo4 "Extracting extra_pods.com (without variable substitutions)"
7192 $ Create Sys$Disk:[-]extra_pods.com
7193 $ Deck/Dollar="$EOExtra_Pods$"
7195 $! NOTE: This file is extracted as part of the VMS configuration process.
7196 $! Any changes made to it directly will be lost. If you need to make any
7197 $! changes, please edit the template in Configure.Com instead.
7198 $! Use FORCE if you've just podified a README.* file on VMS.
7199 $ if f$search("extra.pods") .eqs. "" .or. P1 .eqs. "FORCE" then -
7200 search README.* "=head"/window=0/output=extra.pods
7201 $ open/read/error=extra_close EXTRA extra.pods
7203 $ read/error=extra_close/END_OF_FILE=extra_close EXTRA file
7204 $ file_type = f$edit(f$parse(file,,,"TYPE",),"LOWERCASE") - "."
7205 $ if file_type .nes. "VMS" .and. file_type .nes. "vms"
7207 $ pod_file = "[.pod]perl''file_type'.pod"
7208 $ file = file - "''f$parse(file,,,"VERSION",)'"
7209 $ if p1 .eqs. "CLEAN"
7210 $ then if f$search(pod_file) .nes. "" then delete/log 'pod_file';*
7213 $ if f$search(pod_file) .eqs. ""
7214 $ then do_copy := true
7216 $ file_rdt = f$cvtime(f$file_attributes(file,"RDT"))
7217 $ pod_file_rdt = f$cvtime(f$file_attributes(pod_file,"RDT"))
7218 $ if file_rdt .GTS. pod_file_rdt then do_copy := true
7220 $ ! wacky method to preserve case on ODS-5 even when parse style is traditional
7221 $ if do_copy then mcr sys$disk:[]miniperl.exe -e "exit 0+$^E unless File::Copy::rmscopy(q{''file'}, q{''pod_file'});"
7227 $ if p1 .eqs. "CLEAN" .and. f$search("extra.pods;-1") .nes. "" then -
7228 purge/nolog extra.pods
7232 $! Warn of dangerous symbols or logical names
7234 $Bad_environment: SUBROUTINE
7236 $ IF p2 .eqs. "SYMBOL"
7238 $ IF f$type('p1') .nes. "" THEN Bad_env := SYMBOL
7240 $ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
7242 $ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
7244 $ IF f$search("config.msg") .nes. ""
7246 $ OPEN/APPEND CONFIG config.msg
7248 $ OPEN/WRITE CONFIG config.msg
7250 $ IF Bad_env .eqs. "SYMBOL"
7253 $ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
7254 $ WRITE CONFIG " delete before building ''package' via:"
7255 $ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
7256 $ IF f$locate("""",&p1) .ge. f$length(&p1)
7258 $ WRITE CONFIG " after building, testing, and installing ''package'"
7259 $ WRITE CONFIG " restore the symbol with:"
7260 $ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
7263 $ IF Bad_env .eqs. "LOGICAL"
7266 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
7267 $ WRITE CONFIG " deassign before building ''package'"
7273 $ ENDSUBROUTINE ! Bad_environment
7275 $ echo4 "Checking for dangerous pre-existing global symbols and logical names."
7276 $ CALL Bad_environment "COMP"
7277 $ CALL Bad_environment "EXT"
7278 $ CALL Bad_environment "FOO"
7279 $ CALL Bad_environment "LIB"
7280 $ CALL Bad_environment "LIST"
7281 $ CALL Bad_environment "MIME"
7282 $ CALL Bad_environment "POSIX"
7283 $ CALL Bad_environment "SYS"
7284 $ CALL Bad_environment "T"
7285 $ CALL Bad_environment "THREAD"
7286 $ CALL Bad_environment "THREADS"
7287 $ CALL Bad_environment "TIME"
7288 $ CALL Bad_environment "TMP"
7289 $ CALL Bad_environment "UNICODE"
7290 $ CALL Bad_environment "UTIL"
7291 $ CALL Bad_environment "TEST" "SYMBOL"
7292 $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
7294 $! %Config-I-VMS, write perl_setup.com here
7296 $ IF (.NOT.perl_symbol)
7298 $ file_2_find = "[-]''packageup'.cld"
7300 $ echo4 "The perl.cld file is now being written..."
7301 $ OPEN/WRITE CONFIG 'file_2_find'
7303 $ IF (sharedperl .AND. F$ELEMENT(0, "-", archname) .EQS. "VMS_AXP") THEN ext := .AXE
7304 $ IF (sharedperl .AND. F$ELEMENT(0, "-", archname) .EQS. "VMS_IA64") THEN ext := .IXE
7305 $ IF (use_vmsdebug_perl)
7307 $ WRITE CONFIG "define verb dbgperl"
7308 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
7309 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7311 $ WRITE CONFIG "define verb perl"
7312 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
7313 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7315 $ WRITE CONFIG "define verb perl"
7316 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
7317 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7320 $ ENDIF ! (.NOT.perl_symbol)
7322 $ echo4 "The perl_setup.com file is now being written..."
7323 $ file_2_find = "[-]perl_setup.com"
7325 $! Folks are likely to want to edit perl_setup.com.
7326 $! STMLF RFM plays nicer with ported editors than does VFC.
7328 $ CREATE [-]CONFIG.FDL
7333 $ CREATE /FDL=[-]CONFIG.FDL 'file_2_find'
7334 $ OPEN/APPEND CONFIG 'file_2_find'
7335 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;
7337 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
7338 $ IF cf_email.NES.perladmin
7340 $ WRITE CONFIG "$! perl configured by ''cf_email'"
7342 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
7345 $ WRITE CONFIG "$ if P1 .EQS. """""
7346 $ WRITE CONFIG "$ then"
7347 $ WRITE CONFIG "$ myproc = f$environment(""PROCEDURE"")"
7348 $ WRITE CONFIG "$ myroot_dev = f$parse(myproc,,,""DEVICE"",""NO_CONCEAL"")"
7349 $ WRITE CONFIG "$ myroot_dir = f$parse(myproc,,,""DIRECTORY"",""NO_CONCEAL"")"
7350 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000."" - ""><000000."""
7351 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000]"" - ""><000000>"""
7352 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""]["" - ""><"""
7353 $ WRITE CONFIG "$ myroot_dir = myroot_dir - "".]"" - "".>"" - ""["" - ""]"" - ""<"" - "">"""
7354 $ WRITE CONFIG "$ root_spec = myroot_dev + ""["" + myroot_dir + "".]"""
7355 $ WRITE CONFIG "$ else"
7356 $ WRITE CONFIG "$ root_spec = P1"
7357 $ WRITE CONFIG "$ endif"
7358 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' 'root_spec'"
7359 $ WRITE CONFIG "$ ext = "".exe"""
7362 $ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 2 then ext = "".AXE"""
7363 $ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 3 then ext = "".IXE"""
7367 $ perl_setup_perl = "'" + "'perl'" ! triple quoted foreign command symbol
7368 $ IF (use_vmsdebug_perl)
7370 $ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgperl'ext'"
7371 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgperl'ext'"
7372 $ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
7374 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
7375 $ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
7377 $ ELSE ! .NOT.perl_symbol
7378 $ perl_setup_perl = "perl" ! command verb
7379 $ IF (use_vmsdebug_perl)
7381 $ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
7383 $ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
7385 $ IF perl_verb .EQS. "PROCESS"
7387 $ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
7389 $ ENDIF ! perl_symbol
7393 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
7394 $ ELSE !leave in but commented out (in case setting was from perl :-)
7395 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
7398 $ WRITE CONFIG "$! Symbols for Perl-based utility programs:"
7400 $ WRITE CONFIG "$ c2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]c2ph.com"""
7401 $ WRITE CONFIG "$ corelist == """ + perl_setup_perl + " ''vms_prefix':[utils]corelist.com"""
7402 $ WRITE CONFIG "$ cpan == """ + perl_setup_perl + " ''vms_prefix':[utils]cpan.com"""
7403 $ WRITE CONFIG "$ enc2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]enc2xs.com"""
7404 $ WRITE CONFIG "$ find2perl == """ + perl_setup_perl + " ''vms_prefix':[utils]find2perl.com"""
7405 $ WRITE CONFIG "$ h2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]h2ph.com"""
7406 $ WRITE CONFIG "$ h2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]h2xs.com"""
7407 $ WRITE CONFIG "$ instmodsh == """ + perl_setup_perl + " ''vms_prefix':[utils]instmodsh.com"""
7408 $ WRITE CONFIG "$ libnetcfg == """ + perl_setup_perl + " ''vms_prefix':[utils]libnetcfg.com"""
7409 $ WRITE CONFIG "$ perlbug == """ + perl_setup_perl + " ''vms_prefix':[utils]perlbug.com"""
7410 $ WRITE CONFIG "$ perldoc == """ + perl_setup_perl + " ''vms_prefix':[utils]perldoc.com """"-t"""""""
7411 $ WRITE CONFIG "$ perlivp == """ + perl_setup_perl + " ''vms_prefix':[utils]perlivp.com"""
7412 $ WRITE CONFIG "$ piconv == """ + perl_setup_perl + " ''vms_prefix':[utils]piconv.com"""
7413 $ WRITE CONFIG "$ pl2pm == """ + perl_setup_perl + " ''vms_prefix':[utils]pl2pm.com"""
7414 $ WRITE CONFIG "$ pod2html == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2html.com"""
7415 $ WRITE CONFIG "$ pod2text == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2text.com"""
7416 $ WRITE CONFIG "$!pod2man == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2man.com"""
7417 $ WRITE CONFIG "$ pod2usage == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2usage.com"""
7418 $ WRITE CONFIG "$ podchecker == """ + perl_setup_perl + " ''vms_prefix':[utils]podchecker.com"""
7419 $ WRITE CONFIG "$ podselect == """ + perl_setup_perl + " ''vms_prefix':[utils]podselect.com"""
7420 $ WRITE CONFIG "$ prove == """ + perl_setup_perl + " ''vms_prefix':[utils]prove.com"""
7421 $ WRITE CONFIG "$ psed == """ + perl_setup_perl + " ''vms_prefix':[utils]psed.com"""
7422 $ WRITE CONFIG "$ pstruct == """ + perl_setup_perl + " ''vms_prefix':[utils]pstruct.com"""
7423 $ WRITE CONFIG "$ s2p == """ + perl_setup_perl + " ''vms_prefix':[utils]s2p.com"""
7424 $ WRITE CONFIG "$ ptar == """ + perl_setup_perl + " ''vms_prefix':[utils]ptar.com"""
7425 $ WRITE CONFIG "$ ptardiff == """ + perl_setup_perl + " ''vms_prefix':[utils]ptardiff.com"""
7426 $ WRITE CONFIG "$ ptargrep == """ + perl_setup_perl + " ''vms_prefix':[utils]ptargrep.com"""
7427 $ WRITE CONFIG "$ shasum == """ + perl_setup_perl + " ''vms_prefix':[utils]shasum.com"""
7428 $ WRITE CONFIG "$ splain == """ + perl_setup_perl + " ''vms_prefix':[utils]splain.com"""
7429 $ WRITE CONFIG "$ xsubpp == """ + perl_setup_perl + " ''vms_prefix':[utils]xsubpp.com"""
7430 $ WRITE CONFIG "$ zipdetails == """ + perl_setup_perl + " ''vms_prefix':[utils]zipdetails.com"""
7434 $ echo "The file can be found at:"
7435 $ echo4 " ''F$SEARCH(file_2_find)'"
7436 $ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
7437 $ echo "when you are satisfied with a successful compilation,"
7438 $ echo "testing, and installation of your perl."
7440 $ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
7442 $ file_2_find = "[-]''packageup'_install.com"
7443 $ OPEN/WRITE CONFIG 'file_2_find'
7444 $ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
7445 $ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
7446 $ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
7449 $ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
7450 $ echo4 " @ ''F$SEARCH(file_2_find)'"
7451 $ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
7455 $!figure out where we "are" by parsing 'vms_default_directory_name'
7457 $ set_def_command = ""
7458 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
7459 $ tmp = vms_default_directory_name - dflt - "]"
7461 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
7463 $ tmp1 = F$ELEMENT(i,".",tmp)
7464 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
7466 $ THEN set_def_command = "set default [-"
7467 $ ELSE set_def_command = set_def_command + "-"
7471 $Beyond_set_def_loop:
7472 $ IF set_def_command.NES.""
7474 $ set_def_command = set_def_command - "-" + "]"
7476 $ echo4 "In order to build ''package' you must now issue the commands:"
7478 $ echo4 " ''set_def_command'"
7481 $ echo4 "In order to build ''package' you must now issue the command:"
7484 $ echo4 " ''make'''makefile'", macros
7487 $ IF ( F$SEARCH("config.msg").NES."" )
7489 $ echo4 "Hmm. I also noted the following information while running:"
7491 $ TYPE/OUTPUT=SYS$ERROR: config.msg
7492 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
7493 $ DELETE/NOLOG/NOCONFIRM config.msg;
7500 $ CLOSE/NOLOG STDOUT
7501 $ DEASSIGN SYS$OUTPUT
7503 $ CLOSE/NOLOG CONFIG
7504 $ IF F$GETJPI("","FILCNT").GT.vms_filcnt
7505 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
7507 $ dflt = F$ENVIRONMENT("DEFAULT")
7508 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
7510 $ IF ( F$SEARCH("[.CXX_REPOSITORY]*.*").NES."" )
7512 $ DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
7513 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
7515 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
7517 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
7518 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
7520 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
7522 $!: End of Configure