2 $! OpenVMS configuration procedure for Perl -- do not attempt to run under DOS
3 $ sav_ver = 'F$VERIFY(0)'
4 $ on control_y then goto clean_up
7 $! For example, if you unpacked perl into: [USER.PERL-5n...] then you will
8 $! want to cd into the tree and execute Configure:
10 $! $ SET DEFAULT [USER.PERL5_xxx]
15 $! $ SET DEFAULT [USER.PERL5_xxx]
16 $! $ @Configure "-des"
18 $! That's it. If you get into a bind trying to build perl on VMS then
19 $! definitely read through the README.VMS file.
20 $! Beyond that send email to vmsperl@perl.org
22 $! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 $! send suggestions to:
25 $! Dan Sugalski <dan@sidhe.org>
28 $! Adapted and converted from Larry Wall & Andy Dougherty's
29 $! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer
30 $! (a Bourne sh[ell] script for configuring the installation of perl
31 $! on non-VMS systems) in the perl5.002|3 epoch (spring/summer 1996)
32 $! with much valuable help from Charles Bailey &
33 $! the whole VMSPerl crew.
34 $! Extended and messed about with by Dan Sugalski
36 $! VMS-isms we will need:
37 $ echo = "write sys$output "
39 $ 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")
70 $! Sebastian Bazley's request: close the CONFIG handle with /NOLOG
71 $! qualifier "just in case" (configure.com is re @ed in a bad state).
72 $! This construct was tested to be not a problem as far back as
73 $! VMS V5.5-2, hopefully earlier versions are OK as well.
77 $! Now keep track of open files
79 $ vms_filcnt = F$GETJPI ("","FILCNT")
81 $!: compute my invocation name
82 $ me = F$ENVIRONMENT("PROCEDURE")
84 $! Many null statements (begin with colon ':') in the Bourne shell version of
85 $! this script serve as comments/placeholders. I have retained some of the ones
86 $! that will help you compare this .COM file to the sh version - as well as
87 $! leave placeholders for future improvements to this .COM file.
88 $! sfn = VMS "skipped for now"
90 $!: Proper PATH separator !sfn
91 $!: Proper PATH setting !sfn
92 $!: Sanity checks !sfn "Say '@''$me''"
93 $!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
94 $!: Configure runs within the UU subdirectory !->after find MANIFEST
95 $! <big long list of default values (mostly null)>
96 $!: We must find out about Eunice early !(?)
97 $!: list of known cpp symbols, sorted alphabetically !sfn
99 $!: default library list !sfn
100 $! <no hints files in use (yet?)>
101 $!: Extra object files, if any, needed on this platform. !sfn
102 $!: Possible local include directories to search. !sfn
103 $!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
104 $!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
105 $!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
106 $!: no include file wanted by default !sfn
108 $!: Possible local library directories to search. !sfn
109 $!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
110 $!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
111 $!: general looking path for locating libraries !sfn
112 $!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
113 $!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
114 $!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
115 $!: Private path used by Configure to find libraries. Its value !sfn
116 $!: is prepended to libpth. This variable takes care of special !sfn
117 $!: machines, like the mips. Usually, it should be empty. !sfn
119 $!: List of libraries we want. !sfn
120 $!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
121 $!libswanted="$libswanted ld sun m c cposix posix ndir dir crypt" !sfn
122 $!libswanted="$libswanted ucb bsd BSD PW x" !sfn
123 $!: We probably want to search /usr/shlib before most other libraries. !sfn
124 $!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
125 $!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
126 $!glibpth="/usr/shlib $glibpth" !sfn
127 $!: Do not use vfork unless overridden by a hint file. !sfn
128 $!usevfork=false !sfn
129 $!: script used to extract .SH files with variable substitutions !sfn
130 $!: produce awk script to parse command line options !sfn
131 $!sfn (assume no sed awk) see below
132 $!: process the command line options
134 $!: set up default values
138 $ IF F$TYPE(config_sh) .EQS. "" THEN config_sh=""
154 $ THEN !one or more switches was thrown
161 $ config_args = config_args + F$FAO(" !AS",P'i')
164 $ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
168 $ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
169 $ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
170 $Remove_quotation_mark:
172 $ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
173 $ gotopt = "f" !"alse"
174 $ gotshortopt = "f" !"alse"
175 $ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
178 $ gotopt = "t" !"rue"
180 $ gotshortopt = "t" !"rue"
182 $ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
189 $ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f"
193 $ IF (F$SEARCH(config_sh).NES."")
195 $ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
196 $ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
199 $ CONTINUE !at this point check UIC && if test allows...
202 $ echo "''me': cannot read config file ''config_sh'."
206 $ echo "''me': cannot read config file ''config_sh'."
211 $ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h"
218 $ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m"
225 $ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r"
232 $ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s"
239 $ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E"
244 $ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K"
251 $ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O"
258 $ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S"
260 $ extractsh = "true" !VMS? Yes with munchconfig
265 $ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D"
268 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
270 $ tmp = P'i' + "=""define"""
274 $ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
276 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
277 $ echo "''me': use ""-Usymbol=val"" not ""-Dsymbol=""."
278 $ echo "''me': ignoring -D",P'i'
280 $ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')
281 $ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """"
288 $ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U"
291 $ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
293 $ tmp = P'i' + "="""""
297 $ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
299 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
300 $ echo "''me': use ""-Dsymbol=val"" not ""-Usymbol=val""."
301 $ echo "''me': ignoring -U",P'i'
303 $ tmp = P'i' + "=""undef"""
310 $ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
312 $ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
313 $ echo "''me' generated by an unknown version of EDT."
319 $ echo "''me': unknown option ",P'i'
322 $ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
324 $ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
326 $ ENDIF ! (P1 .NES. "")
327 $ config_args = F$EDIT(config_args,"TRIM")
331 $ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
332 $ echo "Usage: @''me' [-dehmr""EKOSV""] [-fconfig.sh] [""-Dsymbol""] [""-Dsymbol=value""]"
333 $ echo " [-Usymbol] [-Usymbol=]"
336 "-d" : use defaults for all answers.
337 "-e" : go on without questioning past the production of config.sh. *
338 "-f" : specify an alternate default configuration file.
339 "-h" : print this help message and exit (with an error status).
340 "-m" : skip the MANIFEST check to see that all files are present
341 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
342 "-s" : silent mode, only echoes questions and essential information.
343 -"D" : define symbol to have some value: *
344 -"Dsymbol" symbol gets the value 'define'
345 -"Dsymbol=some value" symbol is set to "some value"
346 -E : stop at the end of questions, after having produced config.sh. *
347 -K : do not use unless you know what you are doing.
348 -O : let -D and -U override definitions from loaded configuration file. *
349 -S : perform variable substitutions on all .SH files (can mix with -f) *
350 -"U" : undefine symbol: *
351 -"Usymbol" symbol gets the value 'undef'
352 -"Usymbol=" symbol gets completely empty
353 -V : print version number and exit (with a zero status).
355 $ echo "%Config-I-VMS, lower case switches must be enclosed"
356 $ echo "-Config-I-VMS, in double quotation marks, e.g.:"
357 $ echo "-Config-I-VMS, @Configure ""-des"""
358 $ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
359 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
361 $ EXIT 3 ! $STATUS = "%X00000003" (informational)
367 $ IF F$Mode() .eqs. "BATCH"
369 $ x = F$GETQUI("CANCEL_OPERATION") ! clear the deck
371 $ bproc_queue = f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*",x)
372 $ bproc_entry = f$getqui("DISPLAY_JOB","ENTRY_NUMBER",,x)
373 $ bproc_name = f$getqui("DISPLAY_JOB","JOB_NAME",,x)
374 $ bproc_log_spec = f$getqui("DISPLAY_JOB","LOG_SPECIFICATION",,x)
375 $ STDOUT = F$PARSE(bproc_name, bproc_log_spec, ".LOG")
376 $ WRITE SYS$OUTPUT "Writing output of entry ''bproc_entry' in queue ''bproc_queue' to a new version of: "
377 $ WRITE SYS$OUTPUT STDOUT
379 $ DELETE_/SYMBOL bproc_queue
380 $ DELETE_/SYMBOL bproc_entry
381 $ DELETE_/SYMBOL bproc_name
382 $ DELETE_/SYMBOL bproc_log_spec
384 $ STDOUT = F$TRNLNM("SYS$OUTPUT")
386 $ DEFINE SYS$OUTPUT "_NLA0:"
387 $ echo4 = "write STDOUT "
388 $ cat4 = "TYPE/OUTPUT=''STDOUT'"
389 $ open/write/share=read STDOUT 'STDOUT'
397 $ echo4 = "write SYS$OUTPUT "
401 $!: run the defines and the undefines, if any, but leave the file out there...
402 $! Unfortunately Configure.COM in DCL is not yet set up to do this -
407 $ packageup = F$EDIT((package - "5"),"UPCASE")
409 $!: Eunice requires " " instead of "", can you believe it
412 $ echo "Beginning of configuration questions for ''package'."
415 $!: Some greps do not return status, grrr.
416 $ contains = "SEARCH"
418 $!: first determine how to suppress newline on echo command !cant DCL is record oriented
419 $! echo "Checking ''echo' to see how to suppress newlines..."
420 $! echo "giving up..."
421 $! echo "The star should be here-->*"
423 $!: Now test for existence of everything in MANIFEST
425 $ echo4 "First let's make sure your kit is complete. Checking..."
428 $! Here I assume we are in the [foo.PERLxxx...] tree
429 $! because the search routine simply does set def [-] if necessary.
430 $ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
432 $ manifestfound = F$SEARCH(file_2_find)
433 $ IF (manifestfound .EQS. "")
435 $ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
438 $ GOTO Research_manifest
441 $ echo "There is no MANIFEST file. I hope your kit is complete !"
443 $ GOTO Beyond_manifest
446 $! MANIFEST. has been found and we have set def'ed there.
448 $ escape_extended_chars: subroutine
449 $ string = 'p1' ! It's the name of the symbol
450 $ chars_to_escape = p2
452 $ slength = f$length(string)
454 $ if sindex .eq. slength then goto end_loop_over_chars
455 $ char = f$extract(sindex, 1, string)
456 $ if f$locate(char, chars_to_escape) .lt. f$length(chars_to_escape)
458 $ string = f$extract(0, sindex, string) + "^" + f$extract(sindex, slength, string)
459 $ slength = slength + 1 ! we've increased overall length by 1
460 $ sindex = sindex + 1 ! don't check the char we just escaped again
462 $ sindex = sindex + 1
463 $ goto loop_over_chars
464 $ end_loop_over_chars:
469 $! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
471 $ IF (manifestfound .NES. "")
473 $ IF ( F$SEARCH("UU.DIR").EQS."" )
475 $ CREATE/DIRECTORY [.UU]
477 $ IF ( F$SEARCH("[.UU.CXX_REPOSITORY]*.*").NES."" )
479 $ DELETE/NOLOG/NOCONFIRM [.UU.CXX_REPOSITORY]*.*;*
480 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) [.UU]CXX_REPOSITORY.DIR
482 $ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM [.UU]*.*;*
484 $!: Configure runs within the UU subdirectory
487 $! a little redundancy never hurt anybody?
488 $ file_2_find = "[-]" + file_2_find
489 $ manifestfound = F$SEARCH(file_2_find)
491 $ OPEN/WRITE MISSING MISSING.
492 $!change to "FALSE" if you wish to skip the manifest search
493 $!(which after all is rather slow in DCL :-)
496 $ echo "Skipping MANIFEST check as requested"
499 $ OPEN/READ CONFIG 'manifestfound'
501 $ READ/END_OF_FILE = Done_manifest CONFIG line
502 $! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
503 $! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
504 $! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
505 $! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
506 $ line = F$EDIT(line,"TRIM, COMPRESS")
507 $ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
508 $ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
510 $ escaped_fname == file_2_find
511 $ call escape_extended_chars escaped_fname "~!#&\'`()+@{},;[]%^=\"
512 $ file_2_find = escaped_fname
513 $Re_strip_line_manifest:
514 $ loca = F$LOCATE("/",file_2_find)
515 $ ante = F$EXTRACT(0,loca,file_2_find)
516 $ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
517 $ test_this = ante + "." + (post - "/")
518 $ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
520 $ file_2_find = ante + "." + (post - "/")
521 $ GOTO Re_strip_line_manifest
523 $ file_2_find = ante + "]" + (post - "/")
525 $ file_2_find = "[-."+file_2_find
527 $ file_2_find = "[-]" + file_2_find
530 $ tmp = F$PARSE(file_2_find + ";",,,,"SYNTAX_ONLY")
531 $ IF F$SEARCH(tmp) .NES. "" THEN file_2_find = tmp
532 $ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
533 $ file_2_find = file_2_find - dirname
535 $! may not need double dot check on ODS-5 volumes
536 $ found = F$SEARCH(dirname + file_2_find)
537 $ IF found .NES. "" THEN GOTO Read_loop_manifest
541 $ dot_ele = F$ELEMENT(dots,".",file_2_find)
542 $ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
544 $ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
545 $ ELSE basename = basename + dot_ele + "_"
550 $ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
551 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
552 basename = f$extract(0,f$length(basename)-1,basename)
553 $ file_2_find = dirname + basename
555 $ found = F$SEARCH(file_2_find)
556 $ IF (found .EQS. "" .AND. dots .GT. 2)
558 $! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
559 $! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
560 $! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
561 $ dotloc = f$locate(".",basename)
562 $ basename[dotloc,1] := "_"
563 $ dot_ele = F$ELEMENT(dots - 1,"_",f$extract(dotloc,f$length(basename),basename))
565 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
567 $ found = F$SEARCH(dirname + basename)
568 $ file_2_find = file_2_find + "," + basename
570 $ tildeloc = f$locate("~",basename)
571 $ IF (found .EQS. "" .AND. tildeloc .LT. f$length(basename))
573 $ basename[tildeloc,1] := "_"
574 $ found = F$SEARCH(dirname + basename)
575 $ file_2_find = file_2_find + "," + basename
577 $ IF (found .EQS. "")
579 $ WRITE MISSING file_2_find
580 $ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
582 $ miss_list = miss_list + "," + file_2_find
585 $ GOTO Read_loop_manifest
590 $ ENDIF ! (manifestfound .NES. "")
592 $ IF (miss_list .NES. "")
594 $ echo "Some of the files not found include:"
597 $ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
603 THIS PACKAGE SEEMS TO BE INCOMPLETE.
605 You have the option of continuing the configuration process, despite the
606 distinct possibility that your kit is damaged, by typing 'y'es. If you
607 do, don't blame me if something goes wrong. I advise you to type 'n'o
608 and contact the author (dan@sidhe.org)
611 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
614 $ echo4 "Continuing..."
616 $ echo4 "ABORTING..."
620 $ echo4 "Looks good..."
621 $ DELETE/NOLOG/NOCONFIRM MISSING.;
622 $ ENDIF ! (miss_list .NES. "")
623 $ ENDIF ! (manifestfound .EQS. "") ELSE
625 $! after finding MANIFEST (see above)
626 $!: Configure runs within the UU subdirectory
628 $!: compute the number of columns on the terminal for proper question formatting
629 $ IF F$MODE() .EQS. "BATCH"
630 $! else it winds up being 512 in batch
632 $ ELSE COLUMNS = F$GETDVI("SYS$OUTPUT","DEVBUFSIZ")
634 $! "-des" sets SYS$OUTPUT to NL: with a DEVBUFSIZ too large (512 again)
635 $ IF COLUMNS .GT. 210 THEN COLUMNS = 80
636 $! not sure if this would actually be needed - it hopefully will not hurt
637 $ IF COLUMNS .LT. 40 THEN COLUMNS = 40
639 $!: set up the echo used in my read !sfn
640 $!: now set up to do reads with possible shell escape and default assignment !sfn
643 $! The sub_rp splitting is intended to handle long symbols such as the dflt for
648 $ len_rp = F$LENGTH(rp)
649 $ If (.NOT. silent) Then echo ""
654 $ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
655 $ i_rp = i_rp + COLUMNS
656 $ if i_rp .LT. len_rp THEN echo4 "''sub_rp'"
657 $ IF i_rp .LT. len_rp THEN GOTO rp_loop
665 $ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
667 $ IF (ans .EQS. "&-d")
669 $ echo4 "(OK, I will run with -d after this question.)"
671 $ deferred_fastread =1
674 $ IF (ans .EQS. "&-s")
676 $ echo4 "(OK, I will run with -s after this question.)"
678 $ deferred_silent = 1
681 $ if (bool_dflt .nes. "")
683 $ if (ans .eqs. "") then ans = bool_dflt
684 $ ans = f$extract(0,1,f$edit(ans,"collapse,upcase"))
685 $ if (ans .eqs. "Y" .or. ans .eqs. "1" .or. ans .eqs. "T")
689 $ if (ans .eqs. "N" .or. ans .eqs. "0" .or. ans .eqs. "F")
693 $ echo4 "Input not understood please answer 'Yes' or 'No'"
699 $ ans = f$edit(ans,"trim,compress")
700 $ if (ans .eqs. "") then ans = dflt
701 $ if (f$edit(ans,"upcase") .eqs. "NONE") then ans = ""
703 $ if f$type(deferred_silent) .nes. ""
707 $ delete/symbol deferred_silent
709 $ if f$type(deferred_fastread) .nes. ""
712 $ delete/symbol deferred_fastread
718 $!: create .config dir to save info across Configure sessions
719 $ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
721 $ CREATE/DIRECTORY [-.CONFIG]
722 $ OPEN/WRITE CONFIG [-.CONFIG]README.
724 "This directory created by Configure to save information that should"
726 "persist across sessions."
729 "You may safely delete it if you wish."
733 $ IF F$TYPE(usedevel) .EQS. "" THEN usedevel = "undef"
734 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
735 $ IF (patchlevel_h.NES."")
737 $ SEARCH 'patchlevel_h' "define","PERL_VERSION","epoch"/match=and/out=[]ver.out
738 $ IF .NOT. usedevel .AND. usedevel .NES. "define"
740 $ OPEN/READ CONFIG []ver.out
743 $ tmp = F$EDIT(line,"TRIM,COMPRESS")
744 $ xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp))
745 $ line = xpatchlevel / 2
746 $ tmp = xpatchlevel - ( line * 2 )
749 $ echo4 "patchlevel is " + F$STRING(xpatchlevel)
752 *** WHOA THERE!!! ***
754 This is an UNSTABLE DEVELOPMENT release.
755 (The patchlevel, is odd--as opposed to even,
756 and that signifies a development release. If you want a
757 maintenance release, you want an even-numbered release.)
759 Do ***NOT*** install this into production use.
760 Data corruption and crashes are possible.
762 It is most seriously suggested that you do not continue any further
763 unless you want to help in developing and debugging Perl.
767 $ rp="Do you really want to continue? [''bool_dflt'] "
768 $ fastread_save = fastread
771 $ fastread = fastread_save
772 $ delete/symbol fastread_save
775 $ echo4 "Okay, continuing."
778 $ DELETE/NOLOG/NOCONFIRM []ver.out;
785 $ DELETE/NOLOG/NOCONFIRM []ver.out;
787 $!: general instructions
790 $ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
791 $ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
793 $ messages = F$ENVIRONMENT("MESSAGE")
794 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
795 $ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
796 $ IF .NOT.($status.EQ.%X08D78053)
800 $ rp = "Would you like to see the instructions? [''bool_dflt'] "
802 $ if .NOT.ans THEN needman=""
804 $ SET MESSAGE 'messages'
806 $ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
813 This installation shell script will examine your system and ask you questions
814 to determine how the perl5 package should be installed. If you get
815 stuck on a question, you may use a ^C or ^Y shell escape to STOP this
816 process, edit something, then restart this process as you just did.
817 Many of the questions will have default answers in square
818 brackets; typing carriage return will give you the default.
825 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
830 In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
831 the questions and use the computed defaults (or the previous answers provided
832 there was already a config.sh file). Type '@Configure "-h"' for a list of
840 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
845 Much effort has been expended to ensure that this shell script will
846 run on any VMS system. If despite that it blows up on yours, your
847 best bet is to edit Configure.com and @ it again. Whatever problems
848 you have with Configure.com, let me (dan@sidhe.org) know how I blew
852 $!This installation script affects things in two ways:
854 $!1) it may do direct variable substitutions on some of the files included
856 $!2) it builds a config.h file for inclusion in C programs. You may edit
857 $! any of these files as the need arises after running this script.
859 $!If you make a mistake on a question, there is no easy way to back up to it
866 $ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
868 $ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
870 $ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
874 $ ENDIF !(needman .EQS. "true")
876 $!: see if sh knows # comments !sfn
877 $!: figure out how to guarantee sh startup !sfn
878 $!: find out where common programs are !sfn
879 $!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
880 $!trylist="byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
881 $! echo "I don't know where '$file' is, and my life depends on it."
882 $! echo "Go find a public domain implementation or fix your PATH setting!"
884 $! echo "Don't worry if any of the following aren't found..."
885 $!: determine whether symbolic links are supported !sfn !jem- further down
886 $!: see whether [:lower:] and [:upper:] are supported character classes !sfn
887 $!: set up the translation script tr, must be called with ./tr of course !sfn
889 $!: Try to determine whether config.sh was made on this system
890 $!: Get old answers from old config file if Configure was run on the
891 $!: same system, otherwise use the hints.
892 $ config_sh_es = "''config_sh'/[-]config.sh/"
896 $ config_sh = F$ELEMENT(i,"/",config_sh_es)
898 $ IF (config_sh.NES."/").AND.(config_sh.NES."")
900 $ configshfound = F$SEARCH(config_sh)
901 $ IF (configshfound.NES."") THEN GOTO Config_sh_found
903 $ IF (i.LT.max) THEN GOTO Config_sh_look
904 $ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
905 $ IF (configshfound.EQS."")
907 $ config_sh = "[-]config.sh" ! the fallback default
908 $ GOTO Beyond_config_sh
911 $ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
913 $ IF F$TYPE(config_dflt) .NES. "" THEN bool_dflt = config_dflt
914 $ rp = "Shall I use ''config_sh' for default answers? [''bool_dflt'] "
919 $ echo "Fetching default answers from ''config_sh'..."
921 $! we do our own parsing of the shell-script stuff
922 $! ...and only accept symbols if they're in the | delimited list below
924 $ config_symbols0 ="|archlib|archlibexp|bin|binexp|builddir|cf_email|config_sh|installarchlib|installbin|installman1dir|installman3dir|"
925 $ config_symbols1 ="|installprivlib|installscript|installsitearch|installsitelib|most|oldarchlib|oldarchlibexp|osname|pager|perl_symbol|perl_verb|"
926 $ config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitebin|sitelib|sitelib_stem|sitelibexp|usecxx|use64bitall|use64bitint|"
927 $ config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|uselongdouble|usemultiplicity|usemymalloc|usedebugging_perl|"
928 $ config_symbols4 ="|usesecurelog|usethreads|usevmsdebug|usefaststdio|usemallocwrap|unlink_all_versions|uselargefiles|usesitecustomize|"
929 $ config_symbols5 ="|buildmake|builder|usethreadupcalls|usekernelthreads|useshortenedsymbols|useversionedarchname|default_inc_excludes_dot"
931 $ open/read CONFIG 'config_sh'
933 $ read/end=erd_conf_loop CONFIG line
934 $ line = f$edit(line,"trim")
935 $ if line .eqs. "" .or. f$extract(0,1,line) .eqs. "#" then goto rd_conf_loop
936 $ sym = f$element(0,"=",line)
937 $ if sym .eqs. "=" then goto rd_conf_loop
941 $ syms = config_symbols'k'
942 $ j = f$locate(dsym, syms)
943 $ if j .lt. f$length(syms) then goto erd_ck_loop
945 $ if k .lt. 6 then goto rd_ck_loop
948 $ val = f$element(1,"=",line)
949 $ val = f$extract(1,f$length(val)-2,val)
950 $ write sys$output "''sym' = ""''val'"""
955 $ delete/symbol config_symbols0
956 $ delete/symbol config_symbols1
957 $ delete/symbol config_symbols2
958 $ delete/symbol config_symbols3
959 $ delete/symbol config_symbols4
960 $ delete/symbol config_symbols5
964 $ if f$type(usedebugging_perl) .nes. ""
966 $ DEBUGGING = usedebugging_perl
967 $ delete/symbol usedebugging_perl
971 $ if f$type(config_dflt) .nes. "" then DELETE/SYMBOL config_dflt
973 $!we actually do not have "hints/" for VMS
977 $!First time through, eh? I have some defaults handy for the following systems:
980 $! echo " ","VMS_AXP"
981 $! echo " ","VMS_IA64"
982 $! : Now look for a hint file osname_osvers, unless one has been
983 $! : specified already.
986 $!You may give one or more space-separated answers, or "none" if appropriate.
987 $!If your OS version has no hints, DO NOT give a wrong version -- say "none".
989 $! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
993 $!: Restore computed paths !sfn
995 $! %Config-I-VMS, a necessary error trap (could be PC running VCL)
997 $ IF (osname .NES. "VMS")
999 $ echo4 "Hmm.. I wonder what ''osname' is (?)"
1003 %Config-E-VMS, ERROR:
1005 Err, you do not appear to be running VMS!
1006 This procedure is intended to Configure the building of Perl for VMS.
1013 $ echo4 "Continuing..."
1015 $ echo4 "ABORTING..."
1016 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
1018 $ EXIT 2 !$STATUS = "%X00000002" (error)
1020 $ ENDIF !(osname .NES./.EQS. "VMS")
1022 $!: who configured the system
1023 $ cf_by = F$EDIT(user,"LOWERCASE")
1024 $ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
1026 $! Peter Prymmer has seen:
1027 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
1028 $! "SYS$TIME_ZONE" = "EDT"
1030 $! Charles Lane recommended:
1031 $! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
1032 $! "NEWS_TIMEZONE" = "-0500"
1033 $! "ST_TIMEZONE" = "EDT"
1034 $! "JAN_TIME_ZONE" = "EST "
1035 $! "MULTINET_TIMEZONE" = "EST"
1036 $! "DAYLIGHT_SAVINGS" = "1"
1038 $! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
1040 $! "Multinet_Timezone"
1041 $! "TCPware_Timezone"
1044 $! This snippet o' DCL returns a string in default Unix `date` format,
1045 $! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
1047 $ MIN_TZO = -840 !units are minutes here
1050 $ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
1051 $ monn = F$CVTIME(,,"MONTH")
1052 $ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
1053 $ hour = F$CVTIME(,,"HOUR")
1054 $ min = F$CVTIME(,,"MINUTE")
1055 $ sec = F$CVTIME(,,"SECOND")
1056 $ year = F$CVTIME(,,"YEAR")
1058 $ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
1062 $ mon = F$ELEMENT(i,"/",months)
1063 $ IF i.LT.monn THEN GOTO Mon_loop
1066 $ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
1069 $ tzhour = F$INTEGER(systz)/3600
1070 $ tzmins = F$INTEGER(systz)/60
1071 $ tzminrem = tzmins - tzhour*60
1072 $ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
1074 $ THEN signothetime = "+"
1075 $ IF tzhour.EQ.0.AND.tzminrem.EQ.0
1076 $ THEN direction = "on GMT/"
1077 $ ELSE direction = "east of "
1079 $ ELSE signothetime = "-"
1080 $ tzhour = -1*tzhour !keeps !UL happy
1081 $ direction = "west of "
1084 $ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
1087 $ tzspan = "''tzhour' hours & ''tzminrem' minutes"
1089 $ tzspan = "''tzhour' hours"
1092 $ echo "Your system is ''tzspan' ''direction'UTC in England."
1093 $ rp = "(''systz') Is this UTC Time Zone Offset correct? [''bool_dflt'] "
1099 $ GOTO Beyond_TimeZone
1103 $ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
1108 $ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
1109 $ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
1110 $ echo "Eastern Daylight Time (summer) is -4:00 offset."
1112 $ rp = "Enter the Time Zone offset: [''dflt'] "
1114 $ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
1115 $ IF ans.EQS."" THEN ans = dflt
1116 $ tzhour = F$ELEMENT(0,":","''ans'") !first
1117 $ IF tzhour.EQS."" THEN tzhour = 0
1118 $ tzhour = F$INTEGER(tzhour)
1119 $ tzminrem = F$ELEMENT(1,":","''ans'") !second
1120 $ IF tzminrem.NES.""
1122 $ tzminrem = F$INTEGER(tzminrem)
1123 $ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
1127 $ tzmins = tzhour*60 + tzminrem
1128 $ tzd = F$STRING(tzmins*60)
1131 $ signothetime = "+"
1133 $ tzhour = -1*tzhour !keeps !UL happy
1134 $ signothetime = "-"
1136 $ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
1139 $ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
1144 $ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
1145 $ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
1147 $! This quotation from Configure has to be included on VMS:
1152 There is, however, a strange, musty smell in the air that reminds me of
1153 something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1156 $! Determine the architecture name. For now we just get the base
1157 $! architecture name, which may accumulate various minus sign-delimited
1158 $! appendages later depending on configuration options. But we need the
1159 $! base name early because not all questions are worth asking on all
1162 $! Please use F$ELEMENT(0,"-",archname) .EQS. "VMS_AXP" (or
1163 $! "VMS_IA64", "VMS_x86_64", etc.) from here on to query the current architecture.
1165 $ IF (F$GETSYI("HW_MODEL") .LT. 1024 .AND. F$GETSYI("HW_MODEL") .GT. 0)
1167 $ echo "Sorry, VAX is no longer supported by this Perl version."
1168 $ echo "Please try Perl 5.22 or earlier"
1171 $ IF (F$GETSYI("ARCH_TYPE") .EQ. 2)
1173 $ archname = "VMS_AXP" ! oops, F$GETSYI("ARCH_NAME") gives us 'Alpha' not 'AXP'
1174 $ arch_type = "ARCH-TYPE=__AXP__"
1176 $! This works for Itanium and x86_64 and hopefully whatever's next (AARCH64? RISC-V?)
1177 $ archname = "VMS_" + F$GETSYI("ARCH_NAME")
1178 $ arch_type = "ARCH-TYPE=__" + F$GETSYI("ARCH_NAME") + "__"
1183 $!: set the base revision
1185 $ revision = baserev - ".0"
1186 $!: get the patchlevel
1188 $ echo4 "Getting the current patchlevel..."
1193 $ api_subversion="0"
1194 $ perl_patchlevel="0"
1195 $ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1196 $ IF (patchlevel_h.NES."")
1198 $ got_patch = "false"
1200 $ got_api_revision = "false"
1201 $ got_api_version = "false"
1202 $ got_api_subversion = "false"
1203 $ got_perl_patchlevel= "false"
1204 $ OPEN/READONLY CONFIG 'patchlevel_h'
1206 $ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
1207 $ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
1209 $ line = F$EDIT(line,"COMPRESS, TRIM")
1210 $ patchlevel = F$ELEMENT(2," ",line)
1211 $ got_patch = "true"
1213 $ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
1215 $ line = F$EDIT(line,"COMPRESS, TRIM")
1216 $ subversion = F$ELEMENT(2," ",line)
1219 $ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1221 $ line = F$EDIT(line,"COMPRESS, TRIM")
1222 $ api_revision = F$ELEMENT(2," ",line)
1223 $ got_api_revision = "true"
1225 $ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1227 $ line = F$EDIT(line,"COMPRESS, TRIM")
1228 $ api_version = F$ELEMENT(2," ",line)
1229 $ got_api_version = "true"
1231 $ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1233 $ line = F$EDIT(line,"COMPRESS, TRIM")
1234 $ api_subversion = F$ELEMENT(2," ",line)
1235 $ got_api_subversion = "true"
1237 $ IF ((F$LOCATE("""DEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1239 $ line = F$EDIT(line,"COMPRESS, TRIM")
1240 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1241 $ perl_patchlevel = perl_patchlevel - "DEVEL"
1242 $ got_perl_patchlevel = "true"
1244 $ IF ((F$LOCATE("""SMOKE",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1246 $ line = F$EDIT(line,"COMPRESS, TRIM")
1247 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1248 $ perl_patchlevel = perl_patchlevel - "SMOKE"
1249 $ got_perl_patchlevel = "true"
1251 $ IF ((F$LOCATE("""MAINT",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1253 $ line = F$EDIT(line,"COMPRESS, TRIM")
1254 $ perl_patchlevel = F$ELEMENT(1,"""",line)
1255 $ perl_patchlevel = perl_patchlevel - "MAINT"
1256 $ got_perl_patchlevel = "true"
1258 $ IF (.NOT. got_patch) .OR. -
1259 (.NOT. got_sub) .OR. -
1260 (.NOT. got_api_revision) .OR. -
1261 (.NOT. got_api_version) .OR. -
1262 (.NOT. got_api_subversion) .OR. -
1263 (.NOT. got_perl_patchlevel) -
1264 THEN GOTO Patchlevel_h_loop
1269 $ IF F$SEARCH("[-].patch") .NES. ""
1272 $ OPEN/READ PATCH [-].patch
1275 $ tmp = F$EDIT(line,"TRIM,COMPRESS")
1276 $ IF F$ELEMENT(3, " ", tmp) .NES. "" THEN tmp = F$ELEMENT(3, " ", tmp)
1278 $ IF tmp .NES. "" THEN perl_patchlevel = tmp
1281 $ version_patchlevel_string = "version ''patchlevel' subversion ''subversion'"
1282 $ IF got_perl_patchlevel .AND. perl_patchlevel .NES. "0"
1284 $ version_patchlevel_string = "''version_patchlevel_string' patch ''perl_patchlevel'"
1286 $ echo "(You have ''package' ''version_patchlevel_string'.)"
1288 $ version = revision + "_" + patchlevel + "_" + subversion
1290 $!: see if we need a special compiler
1294 $ vms_cc_available = ""
1296 $ OPEN/WRITE CONFIG ccvms.c
1297 $ WRITE CONFIG "#ifdef __DECC"
1298 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1299 $ WRITE CONFIG "#endif"
1300 $ WRITE CONFIG "#include <stdio.h>"
1301 $ WRITE CONFIG "int main() {"
1302 $ WRITE CONFIG "#ifdef __DECC"
1303 $ WRITE CONFIG " printf(""/DECC\n"");"
1304 $ WRITE CONFIG "#endif"
1305 $ WRITE CONFIG " exit(0);"
1310 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
1311 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
1312 $ cc/NoObj/list=ccvms.lis ccvms.c
1315 $ IF (silent) THEN GOSUB Shut_up
1316 $ IF tmp.NE.%X10B90001
1318 $ GOTO Cxx_initial_check
1322 $ IF .NOT.silent THEN echo ""
1323 $ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1324 $ IF (F$LOCATE("VSI",line).NE.F$LENGTH(line)) -
1325 .or.(F$LOCATE("HP",F$EDIT(line,"UPCASE")).NE.F$LENGTH(line)) -
1326 .or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
1328 $ vms_cc_dflt = "/decc"
1329 $ vms_cc_available = vms_cc_available + "cc/decc "
1334 $! In order to build with the HP C++ compiler, invoke configure.com with "-Dusecxx" on
1335 $! the command line.
1337 $ IF F$TYPE(usecxx) .EQS. "" THEN usecxx := n
1338 $ IF usecxx .OR. usecxx .EQS. "define"
1341 $ echo "Checking for CXX..."
1342 $ OPEN/WRITE CONFIG ccvms.c
1343 $ WRITE CONFIG "#include <iostream>"
1344 $ WRITE CONFIG "int main() {"
1345 $ WRITE CONFIG "#ifdef __DECCXX"
1346 $ WRITE CONFIG " cout << __DECCXX, endl;"
1347 $ WRITE CONFIG "#else"
1348 $ WRITE CONFIG " cout << 0,endl;"
1349 $ WRITE CONFIG "#endif"
1350 $! Todo: add G++ identifier check ??
1351 $ WRITE CONFIG " return(0);"
1355 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1356 $ DEFINE/USER_MODE SYS$ERROR NL:
1360 $! success $status with:
1361 $! DEC C++ V1.1-001 on VMS VAX V5.5-2
1362 $! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1363 $! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1364 $! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1365 $ IF tmp .eq. %X15F60001
1369 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1370 $ DEFINE/USER_MODE SYS$ERROR NL:
1371 $ link/nodebug ccvms.obj
1374 $ ! success $status with:
1375 $ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1376 $ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1377 $ IF tmp .eq. %X10000001
1379 $ ld_try = "Link/nodebug"
1380 $ vms_cc_available = vms_cc_available + "cxx "
1381 $ echo "CXX and LINK are available."
1383 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1385 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1386 $ DEFINE/USER_MODE SYS$ERROR NL:
1390 $ ! success $status with:
1391 $ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1392 $ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1393 $ IF tmp .eq. %X10000001
1395 $ ld_try = "cxxlink"
1396 $ vms_cc_available = vms_cc_available + "cxx "
1397 $ echo "CXX and CXXLINK are available."
1400 $ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1404 $ DELETE/NOLOG/NOCONFIRM ccvms.c;
1405 $ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1406 $ CALL Cxx_demangler_cleanup
1408 $ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1411 $ DELETE/NOLOG/NOCONFIRM ccvms.*;
1413 $!: see if we need a special compiler
1415 $ echo "Available compiler(s):"
1416 $ echo "( ''vms_cc_available')"
1419 $ IF usecxx .OR. usecxx .EQS. "define"
1423 $ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1426 $ rp = "Use which C compiler? [''dflt'] "
1430 $ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1432 $ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans)) -
1433 .or.(F$LOCATE("hp",ans).NE.F$LENGTH(ans)) -
1434 .or.(F$LOCATE("vsi",ans).NE.F$LENGTH(ans))
1439 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1441 $ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1446 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1450 $ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1451 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt) -
1452 .or.(F$LOCATE("vsi",dflt).NE.F$LENGTH(dflt))
1454 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1459 $ IF Mcc .EQS. "cc/decc"
1462 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1468 $ IF Mcc .EQS. "cc/decc"
1471 $ C_COMPILER_Replace = "CC=cc=''Mcc'"
1474 $Decc_Version_check:
1476 $ IF ccname .EQS. "DEC"
1479 $ echo4 "Checking for the Dec C version number..."
1480 $ OPEN/WRITE CONFIG deccvers.c
1481 $ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1482 $ WRITE CONFIG "#include <stdio.h>"
1483 $ WRITE CONFIG "int main() {"
1484 $ WRITE CONFIG "#ifdef __DECC"
1485 $ WRITE CONFIG "#ifdef __DECC_VER"
1486 $ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1487 $ WRITE CONFIG "#else"
1488 $ WRITE CONFIG " printf(""%i\n"", ""1"");"
1489 $ WRITE CONFIG "#endif"
1490 $ WRITE CONFIG "#endif"
1491 $ WRITE CONFIG " exit(0);"
1495 $ DEFINE/USER_MODE SYS$ERROR NL:
1496 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1499 $ IF (silent) THEN GOSUB Shut_up
1500 $ DEFINE/USER_MODE SYS$ERROR NL:
1501 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1502 $ link/nodebug deccvers.obj
1504 $ IF (silent) THEN GOSUB Shut_up
1505 $ OPEN/WRITE CONFIG deccvers.out
1506 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1507 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1508 $ mcr []deccvers.exe
1512 $ IF (silent) THEN GOSUB Shut_up
1513 $ OPEN/READ CONFIG deccvers.out
1514 $ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1517 $ echo "You are using Dec C ''line'"
1519 $ Dec_C_Version = F$INTEGER(line)
1520 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1521 $ ccflags = ccflags + "/NOANSI_ALIAS"
1522 $ DELETE/NOLOG/NOCONFIRM deccvers.*;
1526 $ IF ccname .EQS. "CXX"
1528 $ OPEN/WRITE CONFIG cxxvers.c
1529 $ WRITE CONFIG "#include <stdio.h>"
1530 $ WRITE CONFIG "int main() {"
1531 $ WRITE CONFIG "#ifdef __DECCXX_VER"
1532 $ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
1533 $ WRITE CONFIG "#else"
1534 $ WRITE CONFIG " printf(""%i\n"", ""0"");"
1535 $ WRITE CONFIG "#endif"
1536 $ WRITE CONFIG " return(0);"
1540 $ DEFINE/USER_MODE SYS$ERROR NL:
1541 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1545 $ IF (silent) THEN GOSUB Shut_up
1547 $ DEFINE/USER_MODE SYS$ERROR NL:
1548 $ DEFINE/USER_MODE SYS$OUTPUT NL:
1552 $ IF (silent) THEN GOSUB Shut_up
1553 $ OPEN/WRITE CONFIG cxxvers.out
1555 $ DEFINE/USER_MODE SYS$ERROR CONFIG
1556 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1561 $ IF (silent) THEN GOSUB Shut_up
1562 $ OPEN/READ CONFIG cxxvers.out
1563 $ READ/END_OF_FILE=Cxx_cleanup CONFIG line
1566 $ DELETE/NOLOG/NOCONFIRM cxxvers.*;
1567 $ echo "You are using CXX ''line'"
1570 $ d_cplusplus = "define"
1571 $ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1572 $ ccflags = ccflags + "/NOANSI_ALIAS"
1573 $ CALL Cxx_demangler_cleanup
1575 $ d_cplusplus = "undef"
1578 $Cxx_demangler_cleanup: SUBROUTINE
1580 $! If we do build with CXX these demangler Dbs will be left all over.
1581 $! However, configure.com does try to remove the [.UU] sub directory.
1582 $! Be sure to set default to the correct place before calling this sub.
1585 $ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
1586 $ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
1588 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
1589 $ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
1593 $ ENDSUBROUTINE ! Cxx_demangler_cleanup
1598 $ OPEN/READ CONFIG ccvms.lis
1600 $ IF F$ELEMENT(0, "-", archname) .EQS. "VMS_AXP"
1607 $ line = F$EDIT(line,"TRIM,COMPRESS")
1608 $ line = line - "Page 1" ! occurs at end all compilers
1609 $ line = line - "CCVMS " ! filename appears w/ VAXC
1610 $ line = line - "Source Listing " ! Seen w/ AXP DECC
1611 $ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
1613 $ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1614 $ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1617 $!: see if we have to deal with yellow pages, now NIS.
1618 $!: now get the host name
1621 $ echo4 "Figuring out host name..." !>&4
1623 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
1624 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
1625 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
1626 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
1627 $ IF myhostname.eqs."".and. -
1628 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
1629 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
1630 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
1631 $ IF myhostname.eqs."".and. -
1632 F$TRNLNM("TCPIP$INET_HOST") .nes. "" .and. -
1633 F$TRNLNM("TCPIP$INET_DOMAIN") .nes. "" THEN -
1634 myhostname = F$TRNLNM("TCPIP$INET_HOST") + "." + F$TRNLNM("TCPIP$INET_DOMAIN")
1635 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
1636 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
1637 $ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
1638 $ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
1639 $!: you do not want to know about this
1641 $ rp = "Your host name appears to be """"''myhostname'"""". Right? "
1646 $ READ SYS$COMMAND/PROMPT= -
1647 "Please type the (one word) name of your host: " ans
1650 $!: translate upper to lower if necessary
1651 $ myhostname = F$EDIT(myhostname,"COLLAPSE")
1652 $ mylowhostname = F$EDIT(myhostname," LOWERCASE")
1653 $ IF mylowhostname.NES.myhostname
1655 $ echo "(Normalizing case in your host name)"
1656 $ myhostname = mylowhostname
1659 $ fp = F$LOCATE(".",myhostname)
1660 $ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
1661 $ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
1663 $ rp = "What is your domain name? [''mydomain'] "
1667 $!: translate upper to lower if necessary
1668 $ mydomain = F$EDIT(mydomain,"COLLAPSE")
1669 $ mylowdomain = F$EDIT(mydomain," LOWERCASE")
1670 $ IF mylowdomain.NES.mydomain
1672 $ echo "(Normalizing case in your domain name)"
1673 $ mydomain = mylowdomain
1676 $ myhostname = myhostname - mydomain
1677 $ echo "(Trimming domain name from host name--host name is now ''myhostname')"
1683 I need to get your e-mail address in Internet format if possible, i.e.
1684 something like user@host.domain. Please answer accurately since I have
1685 no easy means to double check it. The default value provided below
1686 is most probably close to the reality but may not be valid from outside
1687 your organization...
1690 $ IF F$TYPE(cf_email) .EQS. ""
1692 $ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
1693 $ rp = "What is your e-mail address? [''dflt'] "
1703 If you or somebody else will be maintaining perl at your site, please
1704 fill in the correct e-mail address here so that they may be contacted
1705 if necessary. You may enter "none" for no administrator.
1708 $ dflt = "''cf_email'"
1709 $ rp = "Perl administrator e-mail address [''dflt'] "
1713 $!: determine where public executable scripts go
1714 $!: determine perl absolute location
1715 $!: figure out how to guarantee perl startup
1717 $!: see how we invoke the C preprocessor
1719 $! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
1720 $!: Set private lib path
1721 $!: Now check and see which directories actually exist, avoiding duplicates
1722 $!: determine optimize, if desired, or use for debug flag also
1723 $!: We will not override a previous value, but we might want to
1724 $!: augment a hint file
1725 $!: the following weeds options from ccflags that are of no interest to cpp
1726 $!: flags used in final linking phase
1727 $!: Try to guess additional flags to pick up local libraries.
1730 $! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
1731 $!: compute shared library extension
1732 $!: Looking for optional libraries
1733 $!: see if nm is to be used to determine whether a symbol is defined or not
1734 $!: get list of predefined functions in a handy place
1735 $!: see if we have sigaction or sigprocmask
1736 $ IF (ccname .EQS. "DEC" .AND. Dec_C_Version .GE. 50200000) .OR. (ccname .EQS. "CXX")
1738 $ Has_Dec_C_Sockets = "T"
1740 $ echo4 "Hmm... Looks like you have Dec C Berkeley networking support."
1742 $ Has_Dec_C_Sockets = "F"
1745 $ IF Has_Dec_C_Sockets
1748 $ echo "You have sockets available via the C library. Should socket support"
1749 $ echo "be built into Perl?"
1751 $ rp = "Choose socket support option (NONE"
1752 $ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
1753 $ rp = rp + ") [''dflt'] "
1755 $ Has_Dec_C_Sockets = "F"
1756 $ Has_socketshr = "F"
1757 $ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
1758 $ IF ans.eqs."decc" THEN Has_Dec_C_Sockets = "T"
1762 $! Ask if they want to build with VMS_DEBUG perl
1764 $ echo "Perl can be built to run under the VMS debugger."
1765 $ echo "You should only select this option if you are debugging"
1766 $ echo "perl itself. This can be a useful feature if you are "
1767 $ echo "embedding perl in a program."
1769 $ if f$type(usevmsdebug) .nes. ""
1771 $ if usevmsdebug .or. usevmsdebug .eqs. "define" then bool_dflt="y"
1773 $ rp = "Build a VMS-DEBUG version of Perl? [''bool_dflt'] "
1775 $ use_vmsdebug_perl = ans
1776 $ IF use_vmsdebug_perl
1778 $ usevmsdebug = "define"
1780 $ usevmsdebug = "undef"
1783 $! Ask if they want to build with DEBUGGING
1785 $ echo "Perl can be built with extra runtime debugging enabled. This"
1786 $ echo "enables the -D switch, at the cost of some performance. It"
1787 $ echo "was mandatory on perl 5.005 and before on VMS, but is now"
1788 $ echo "optional. If you do not generally use it you should probably"
1789 $ echo "leave this off and gain a bit of extra speed."
1791 $ if f$type(DEBUGGING) .nes. ""
1793 $ if f$extract(0,1,f$edit(DEBUGGING,"collapse,upcase")).eqs."Y" .or. DEBUGGING .eqs. "define" then bool_dflt="y"
1795 $ rp = "Build a DEBUGGING version of Perl? [''bool_dflt'] "
1797 $ use_debugging_perl = ans
1800 $! Ask about threads, if appropriate
1801 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
1804 $ echo "Perl can be built to offer a form of threading support on some systems."
1805 $ echo "To do so, configure.com can be run with -""Dusethreads""."
1807 $ echo "Note that Perl built with threading support runs slightly slower"
1808 $ echo "and uses slightly more memory than plain Perl."
1811 $ if f$type(usethreads) .nes. ""
1813 $ if usethreads .or. usethreads .eqs. "define" then bool_dflt="y"
1815 $! Catch cases where user specified ithreads but
1816 $! forgot -Dusethreads
1817 $ if f$type(useithreads) .nes. ""
1819 $ if useithreads .or. useithreads .eqs. "define" then bool_dflt="y"
1821 $ echo "If this doesn't make any sense to you, just accept the default '" + bool_dflt + "'."
1822 $ rp = "Build a threading Perl? [''bool_dflt'] "
1826 $ usethreads = "define"
1829 $ if f$type(useithreads) .nes. ""
1831 $ if useithreads .eqs. "undef" then bool_dflt="n"
1833 $ rp = "Use the newer interpreter-based ithreads? [''bool_dflt'] "
1836 $ ! Are they on VMS 7.1 or greater?
1837 $ IF "''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.1"
1840 $ echo "Threaded Perl can be linked to use system upcalls on your system. This feature"
1841 $ echo "allows the thread scheduler to be made aware of system events (such as I/O)"
1842 $ echo "so as to prevent a single thread from blocking all the threads in a program,"
1843 $ echo "even on a single-processor machine."
1845 $ IF f$type(usethreadupcalls) .NES. ""
1847 $ if .not. usethreadupcalls .or. usethreadupcalls .eqs. "undef" then bool_dflt="n"
1849 $ rp = "Enable thread upcalls? [''bool_dflt'] "
1853 $ thread_upcalls = "MTU=MTU=1"
1854 $ usethreadupcalls = "define"
1855 $ ! Are they on alpha or itanium?
1856 $ IF ("''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.2")
1859 $ echo "Threaded Perl can be linked to use multiple kernel threads on your system."
1860 $ echo "This feature allows multiple user threads to make use of multiple CPUs on"
1861 $ echo "a multi-processor machine."
1863 $ IF f$type(usekernelthreads) .nes. ""
1865 $ if usekernelthreads .or. usekernelthreads .eqs. "define" then bool_dflt="y"
1867 $ rp = "Enable multiple kernel threads? [''bool_dflt'] "
1871 $ thread_kernel = "MTK=MTK=1"
1872 $ usekernelthreads = "define"
1878 $ usethreads = "undef"
1881 $ usethreads = "undef"
1883 $ IF F$TYPE(usethreadupcalls) .EQS. "" THEN usethreadupcalls = "undef"
1884 $ IF F$TYPE(usekernelthreads) .EQS. "" THEN usekernelthreads = "undef"
1886 $! Ask if they want to build with MULTIPLICITY
1888 $ echo "Perl can be built so that multiple Perl interpreters can coexist"
1889 $ echo "within the same Perl executable."
1890 $ IF usethreads .OR. usethreads .EQS. "define"
1892 $ echo "This multiple interpreter support is required for interpreter-based threads."
1893 $ usemultiplicity="define"
1896 $ if f$type(usemultiplicity) .nes. ""
1898 $ if usemultiplicity .or. usemultiplicity .eqs. "define" then bool_dflt = "y"
1900 $ rp = "Build Perl for multiplicity? [''bool_dflt'] "
1904 $ usemultiplicity="define"
1906 $ usemultiplicity="undef"
1910 $! Ask if they want to build with 64-bit support
1912 $ IF F$TYPE(use64bitint) .NES. ""
1914 $ IF use64bitint .OR. use64bitint .eqs. "define" THEN bool_dflt = "y"
1917 $ echo "You have natively 64-bit long integers."
1919 $ echo "Perl can be built to take advantage of 64-bit integer types"
1920 $ echo "on some systems, To do so, Configure can be run with -Duse64bitint."
1921 $ echo "Choosing this option will most probably introduce binary incompatibilities."
1923 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
1924 $ rp = "Try to use 64-bit integers, if available? [''bool_dflt'] "
1929 $ IF F$TYPE(use64bitall) .NES. ""
1931 $ IF use64bitall .OR. use64bitall .eqs. "define" THEN bool_dflt = "y"
1934 $ echo "You may also choose to try maximal 64-bitness. It means using as much"
1935 $ echo "64-bitness as possible on the platform. This in turn means even more"
1936 $ echo "binary incompatibilities. On the other hand, your platform may not"
1937 $ echo "have any more 64-bitness available than what you already have chosen."
1939 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
1940 $ rp = "Try to use maximal 64-bit support, if available? [''bool_dflt'] "
1943 $ IF use64bitall .AND. .NOT. use64bitint
1946 $ echo "Since you have chosen a maximally 64-bit build, I'm also turning on"
1947 $ echo "the use of 64-bit integers."
1951 $ bool_dflt = use64bitall
1952 $ IF F$TYPE(uselargefiles) .NES. ""
1954 $ IF uselargefiles .OR. uselargefiles .eqs. "define" THEN bool_dflt = "y"
1957 $ echo "Perl can be built to understand large files (files larger than 2 gigabytes)"
1958 $ echo "on some systems. To do so, Configure can be run with -Duselargefiles."
1960 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
1961 $ rp = "Try to understand large files, if available? [''bool_dflt'] "
1966 $ IF F$TYPE(uselongdouble) .NES. ""
1968 $ IF uselongdouble .OR. uselongdouble .eqs. "define" THEN bool_dflt = "y"
1971 $ echo "Perl can be built to take advantage of long doubles which"
1972 $ echo "(if available) may give more accuracy and range for floating point numbers."
1974 $ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
1975 $ rp = "Try to use long doubles, if available? [''bool_dflt'] "
1977 $ uselongdouble = ans
1980 $ IF usesitecustomize .OR. usesitecustomize .eqs. "define"
1982 $ usesitecustomize = "define"
1984 $ usesitecustomize = "undef"
1989 $ echo "By default, perl (and pretty much everything else on VMS) uses"
1990 $ echo "case-insensitive linker symbols. Which is to say, when the"
1991 $ echo "underlying C code makes a call to a routine called Perl_foo in"
1992 $ echo "the source, the name in the object modules or shareable images"
1993 $ echo "is really PERL_FOO. There are some packages that use an"
1994 $ echo "embedded perl interpreter that instead require case-sensitive"
1995 $ echo "linker symbols."
1997 $ echo "If you have no idea what this means, and do not have"
1998 $ echo "any program requiring anything, choose the default."
1999 $ bool_dflt = be_case_sensitive
2000 $ if f$type(usecasesensitive) .nes. ""
2002 $ if usecasesensitive .or. usecasesensitive .eqs. "define" then bool_dflt = "y"
2003 $ if f$extract(0,1,f$edit(usecasesensitive,"collapse,upcase")).eqs."N" .or. usecasesensitive .eqs. "undef" then bool_dflt = "n"
2005 $ rp = "Build with case-sensitive symbols? [''bool_dflt'] "
2007 $ be_case_sensitive = ans
2009 $! Shortened symbols?
2011 $ echo "The VMS linker does not handle symbol names longer than 31 characters,"
2012 $ echo "but the compiler can shorten long symbols if requested."
2013 $ bool_dflt = shorten_long_symbols
2014 $ if f$type(useshortenedsymbols) .nes. ""
2016 $ if useshortenedsymbols .or. useshortenedsymbols .eqs. "define" then bool_dflt = "y"
2017 $ if f$extract(0,1,f$edit(useshortenedsymbols,"collapse,upcase")) .eqs. "N" .or. useshortenedsymbols .eqs. "undef" then bool_dflt = "n"
2019 $ rp = "Build with long symbols shortened? [''bool_dflt'] "
2021 $ shorten_long_symbols = ans
2024 $ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers on"
2025 $ echo "Alpha and Itanium, but if you need G_FLOAT for binary compatibility"
2026 $ echo "with an external library or existing data, you may wish to disable"
2027 $ echo "the IEEE math option."
2028 $ bool_dflt = use_ieee_math
2029 $ if f$type(useieee) .nes. ""
2031 $ if useieee .or. useieee .eqs. "define"
2038 $ rp = "Use IEEE math? [''bool_dflt'] "
2040 $ use_ieee_math = ans
2042 $ usecasesensitive = "undef"
2043 $ useshortenedsymbols = "undef"
2044 $ if (use_ieee_math) then useieee = "define"
2045 $ if (be_case_sensitive) then usecasesensitive = "define"
2046 $ if (shorten_long_symbols) then useshortenedsymbols = "define"
2047 $! Unlink all versions?
2049 $ echo "By default, Perl's unlink() provides VMS-like behavior and only"
2050 $ echo "deletes the latest version of a file. Enabling this option builds"
2051 $ echo "Perl so that unlink() deletes all versions of a file."
2052 $ bool_dflt = unlink_all_versions
2053 $ if f$type(unlink_all_versions) .nes. ""
2055 $ if unlink_all_versions .or. unlink_all_versions .eqs. "define"
2062 $ rp = "Make unlink() delete all versions of a file? [''bool_dflt'] "
2064 $ unlink_all_versions = ans
2065 $ IF unlink_all_versions
2067 $ d_unlink_all_versions = "define"
2069 $ d_unlink_all_versions = "undef"
2074 $ echo "Your compiler may want other flags. For this question you should include"
2075 $ echo "/INCLUDE=(whatever) and /DEFINE=(whatever), flags and any other flags"
2076 $ echo "or qualifiers used by the compiler."
2078 $ echo "To use no flags, specify the word ""none""."
2079 $ dflt = user_c_flags
2080 $ rp = "Any additional cc flags? [''dflt'] "
2082 $ IF ans .EQS. "none" THEN ans = ""
2083 $ user_c_flags = "''ans'"
2085 $! Ask whether they want to use secure logical translation when tainting
2087 $ echo "As Perl starts up, it checks several logical names, such as"
2088 $ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2089 $ echo "of its behavior. For additional security, you may limit this"
2090 $ echo "process to executive- and kernel-mode translation when tainting"
2091 $ echo "is enabled. In this case, logical names normally skipped when"
2092 $ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2093 $ echo "If you do not choose to do this, the usual order of access modes"
2094 $ echo "is used for logical name translation."
2096 $ echo "This restriction does not apply to the %ENV hash or to implicit"
2097 $ echo "logical name translation during parsing of file specifications;"
2098 $ echo "these always use the normal sequence of access modes for logical"
2099 $ echo "name translation."
2101 $ if f$type(usesecurelog) .nes. ""
2103 $ if f$extract(0,1,f$edit(usesecurelog,"collapse,upcase")).eqs."N" .or. usesecurelog .eqs. "undef" then bool_dflt = "n"
2105 $ rp = "Use secure logical name translation? [''bool_dflt'] "
2107 $ d_secintgenv = ans
2108 $ usesecurelog = "undef"
2109 $ if (d_secintgenv) then usesecurelog = "define"
2111 $! Ask whether they want to default filetypes
2113 $ echo "When you pass the name of a program to Perl on the command line,"
2114 $ echo "it generally doesn't supply any defaults unless the -S command"
2115 $ echo "line switch is specified. In keeping with the VMS tradition of"
2116 $ echo "default file types, however, you can configure Perl to try default"
2117 $ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2118 $ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2119 $ echo "finally foo.com)."
2121 $ echo "This is currently broken in some configurations. Only enable it if"
2122 $ echo "you know what you are doing."
2124 $ if f$type(usedefaulttypes) .nes. ""
2126 $ if usedefaulttypes .or. usedefaulttypes .eqs. "define" then bool_dflt="y"
2128 $ rp = "Always use default file types? [''bool_dflt'] "
2130 $ d_alwdeftype = ans
2131 $ usedefaulttypes = "undef"
2132 $ if (d_alwdeftype) then usedefaulttypes = "define"
2135 $ rp = "What is your architecture name? [''archname'] "
2139 $ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
2140 $ IF (ans.NES.archname) !.AND.knowitall
2142 $ echo4 "I'll go with ''archname' anyway..."
2147 $ if f$type(useversionedarchname) .nes. ""
2149 $ if useversionedarchname .or. useversionedarchname .eqs. "define" then bool_dflt = "y"
2151 $ rp = "Add the Perl API version to your archname? [''bool_dflt'] "
2155 $ useversionedarchname = "define"
2156 $ IF F$LOCATE("-''version'", archname) .EQ. F$LENGTH(archname)
2158 $ archname = "''archname'-''version'"
2159 $ echo4 "...setting architecture name to ''archname'."
2161 $ echo4 "...and architecture name already has -''version'."
2164 $ useversionedarchname = "undef"
2167 $ IF usethreads .OR. usethreads .EQS. "define"
2169 $ echo4 "Threads selected."
2170 $ IF F$LOCATE("-thread", archname) .EQ. F$LENGTH(archname)
2172 $ archname = "''archname'-thread"
2173 $ echo4 "...setting architecture name to ''archname'."
2175 $ echo4 "...and architecture name already has -thread."
2179 $ IF usemultiplicity .OR. usemultiplicity .EQS. "define"
2181 $ echo4 "Multiplicity selected."
2182 $ IF F$LOCATE("-multi", archname) .EQ. F$LENGTH(archname)
2184 $ archname = "''archname'-multi"
2185 $ echo4 "...setting architecture name to ''archname'."
2187 $ echo4 "...and architecture name already has -multi."
2191 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
2193 $ echo4 "Long doubles selected."
2194 $ IF F$LOCATE("-ld", archname) .EQ. F$LENGTH(archname)
2196 $ archname = "''archname'-ld"
2197 $ echo4 "...setting architecture name to ''archname'."
2199 $ echo4 "...and architecture name already has -ld."
2203 $ vms_prefix = "perl_root"
2204 $ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
2206 $!: is AFS running? !sfn
2207 $!: decide how portable to be. Allow command line overrides. !sfn
2208 $!: set up shell script to do ~ expansion !sfn
2209 $!: expand filename !sfn
2210 $!: now set up to get a file name !sfn
2212 $ IF F$TYPE(prefix) .EQS. ""
2214 $ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
2215 $ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - "000000." - ".000000" - ".;"
2216 $ prefixbase = prefix - "]"
2217 $! Add _ROOT to make install PERL_ROOT differ from build directory.
2218 $ prefix = prefixbase + "_ROOT.]"
2220 $ ! more redundant scrubbing of values
2221 $ prefix = prefix - "000000."
2222 $ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN prefix = prefix - "]" + ".]"
2223 $ src = prefix - "_ROOT."
2224 $!: determine root of directory hierarchy where package will be installed.
2229 $ echo "By default, ''package' will be installed in ''dflt', pod"
2230 $ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
2231 $ echo "all installation directories."
2232 $ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
2233 $ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
2235 $ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
2240 $ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
2244 $ perl_root = prefix
2246 $! Check here for pre-existing PERL_ROOT.
2247 $! -> ask if removal desired.
2248 $! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
2249 $! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
2251 $ tmp = perl_root - ".]" + "]"
2252 $ dflt = f$parse(tmp,,,,)
2255 $ echo4 "''tmp' does not yet exist."
2256 $! create/directory 'tmp'
2258 $ echo4 "''tmp' already exists."
2261 $ vms_skip_install = "true"
2264 $ rp = "Skip the remaining """"where install"""" questions? [''bool_dflt'] "
2266 $ IF (.NOT.ans) THEN vms_skip_install = "false"
2267 $ IF (.NOT.vms_skip_install)
2270 $!: set the prefixit variable, to compute a suitable default value
2272 $!: determine where private library files go
2273 $!: Usual default is /usr/local/lib/perl5. Also allow things like
2274 $!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
2280 There are some auxiliary files for perl5 that need to be put into a
2281 private library directory that is accessible by everyone.
2284 $ IF F$TYPE(privlib) .NES. ""
2285 $ THEN dflt = privlib
2286 $ ELSE dflt = "/''vms_prefix'/lib"
2288 $ rp = "Pathname where the private library files will reside? "
2289 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2293 $ ENDIF !%Config-I-VMS, skip remaining "where install" questions
2295 $ IF F$TYPE(perl_symbol) .EQS. "" THEN perl_symbol := true
2296 $ IF F$TYPE(perl_verb) .EQS. "" THEN perl_verb = ""
2298 $ THEN bool_dflt = "y"
2299 $ ELSE bool_dflt = "n"
2304 $ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
2305 $ echo "symbol to invoke ''package', which is the usual method."
2306 $ echO "If you do not do so then you would need a DCL command verb at the"
2307 $ echo "process or the system wide level."
2309 $ rp = "Invoke perl as a global symbol foreign command? [''bool_dflt'] "
2311 $ IF (.NOT.ans) THEN perl_symbol = "false"
2313 $ IF (.NOT.perl_symbol)
2315 $ IF perl_verb .EQS. "DCLTABLES"
2316 $ THEN bool_dflt = "n"
2317 $ ELSE bool_dflt = "y"
2322 $ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
2323 $ echo "verb in a per-process table or in the system wide DCLTABLES (which"
2324 $ echo "would require write privilege)."
2326 $ rp = "Invoke perl as a per process command verb? [ ''bool_dflt' ] "
2329 $ THEN perl_verb = "DCLTABLES"
2330 $ ELSE perl_verb = "PROCESS"
2332 $ ENDIF ! (.NOT.perl_symbol)
2334 $ IF (.NOT.vms_skip_install)
2336 $!: set the prefixup variable, to restore leading tilde escape !sfn
2338 $!: determine where public architecture dependent libraries go
2342 $ echo "''package' contains architecture-dependent library files. If you are"
2348 sharing libraries in a heterogeneous environment, you might store
2349 these files in a separate location. Otherwise, you can just include
2350 them with the rest of the public library files.
2353 $ IF F$TYPE(archlib) .NES. ""
2354 $ THEN dflt = archlib
2355 $ ELSE dflt = privlib + "/" + archname + "/" + version
2357 $ rp = "Where do you want to put the public architecture-dependent libraries? "
2358 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2362 $ ENDIF !%Config-I-VMS, skip "where install" questions
2363 $ IF (.NOT.vms_skip_install)
2365 $!: it so happens the Eunice I know will not run shell scripts in Unix format
2367 $!: see if setuid scripts can be secure !sfn
2368 $!: now see if they want to do setuid emulation !sfn
2370 $!: determine where site specific libraries go.
2376 The installation process will also create a directory for
2377 site-specific extensions and modules. Some users find it convenient
2378 to place all local files in this directory rather than in the main
2379 distribution directory.
2382 $ IF F$TYPE(sitelib) .NES. ""
2383 $ THEN dflt = sitelib
2384 $ ELSE dflt = privlib + "/site_perl"
2386 $ rp = "Pathname for the site-specific library files? "
2387 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2391 $!: determine where site specific architecture-dependent libraries go.
2393 $ THEN TYPE SYS$INPUT:
2396 The installation process will also create a directory for
2397 architecture-dependent site-specific extensions and modules.
2400 $ IF F$TYPE(sitearch) .NES. ""
2401 $ THEN dflt = sitearch
2402 $ ELSE dflt = sitelib + "/" + archname
2404 $ rp = "Pathname for the site-specific architecture-dependent library files? "
2405 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2409 $!: determine where old public architecture dependent libraries might be
2411 $!: determine where public executables go
2412 $ IF F$TYPE(bin) .NES. ""
2414 $ ELSE dflt = "/''vms_prefix'"
2416 $ rp = "Pathname where the public executables will reside? "
2417 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2421 $!: determine where add-on public executables go
2422 $ IF F$TYPE(sitebin) .NES. ""
2423 $ THEN dflt = sitebin
2424 $ ELSE dflt = "/''vms_prefix'/bin/''archname'"
2426 $ rp = "Pathname where the add-on public executables should be installed? "
2427 $ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2431 $!: determine where manual pages are on this system
2432 $!: What suffix to use on installed man pages
2433 $!: see if we can have long filenames
2434 $!: determine where library module manual pages go
2435 $!: What suffix to use on installed man pages
2436 $!: see what memory models we can support
2438 $ ELSE ! skipping "where install" questions, we must set some symbols
2439 $ IF F$TYPE(archlib).EQS."" THEN -
2440 archlib="/''vms_prefix'/lib/''archname'/''version'"
2441 $ IF F$TYPE(bin) .EQS. "" THEN -
2442 bin="/''vms_prefix'"
2443 $ IF F$TYPE(privlib) .EQS. "" THEN -
2444 privlib ="/''vms_prefix'/lib"
2445 $ IF F$TYPE(sitearch) .EQS. "" THEN -
2446 sitearch="/''vms_prefix'/lib/site_perl/''archname'"
2447 $ IF F$TYPE(sitelib) .EQS. "" THEN -
2448 sitelib ="/''vms_prefix'/lib/site_perl"
2449 $ IF F$TYPE(sitebin) .EQS. "" THEN -
2450 sitebin="/''vms_prefix'/bin/''archname'"
2451 $ ENDIF !%Config-I-VMS, skip "where install" questions
2453 $! These derived locations can be set whether we've opted to
2454 $! skip the where install questions or not.
2456 $ IF F$TYPE(archlibexp) .EQS. "" THEN -
2457 archlibexp="/''vms_prefix'/lib/''archname'/''version'"
2458 $ IF F$TYPE(binexp) .EQS. "" THEN -
2459 binexp ="/''vms_prefix'"
2460 $ IF F$TYPE(builddir) .EQS. "" THEN -
2461 builddir ="/''vms_prefix'"
2462 $ IF F$TYPE(installarchlib) .EQS. "" THEN -
2463 installarchlib="/''vms_prefix'/lib/''archname'/''version'"
2464 $ IF F$TYPE(installbin) .EQS. "" THEN -
2465 installbin ="/''vms_prefix'"
2466 $ IF F$TYPE(installscript) .EQS. "" THEN -
2467 installscript ="/''vms_prefix'/utils"
2468 $ IF F$TYPE(installman1dir) .EQS. "" THEN -
2469 installman1dir ="/''vms_prefix'/man/man1"
2470 $ IF F$TYPE(installman3dir) .EQS. "" THEN -
2471 installman3dir ="/''vms_prefix'/man/man3"
2472 $ IF F$TYPE(installprivlib) .EQS. "" THEN -
2473 installprivlib ="/''vms_prefix'/lib"
2474 $ IF F$TYPE(installsitearch) .EQS. "" THEN -
2475 installsitearch="/''vms_prefix'/lib/site_perl/''archname'"
2476 $ IF F$TYPE(installsitelib) .EQS. "" THEN -
2477 installsitelib ="/''vms_prefix'/lib/site_perl"
2478 $ IF F$TYPE(oldarchlib) .EQS. "" THEN -
2479 oldarchlib="/''vms_prefix'/lib/''archname'"
2480 $ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
2481 oldarchlibexp="/''vms_prefix'/lib/''archname'"
2482 $ IF F$TYPE(privlibexp) .EQS. "" THEN -
2483 privlibexp ="/''vms_prefix'/lib"
2484 $ IF F$TYPE(scriptdir) .EQS. "" THEN -
2485 scriptdir ="/''vms_prefix'/utils"
2486 $ IF F$TYPE(sitearchexp) .EQS. "" THEN -
2487 sitearchexp ="/''vms_prefix'/lib/site_perl/''archname'"
2488 $ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
2489 sitelib_stem ="/''vms_prefix'/lib/site_perl"
2490 $ IF F$TYPE(sitelibexp) .EQS. "" THEN -
2491 sitelibexp ="/''vms_prefix'/lib/site_perl"
2493 $! determine whether to use malloc wrapping
2496 $ IF F$TYPE(usemallocwrap) .nes. ""
2498 $ if .NOT. usemallocwrap .or. usemallocwrap .eqs. "undef" then bool_dflt = "n"
2500 $ rp = "Do you wish to wrap malloc calls to protect against potential overflows? [''bool_dflt'] "
2503 $ THEN usemallocwrap = "define"
2504 $ ELSE usemallocwrap = "undef"
2507 $! Ask if they want to use perl's memory allocator
2509 $ echo "Perl has a built-in memory allocator that is tuned for normal"
2510 $ echo "memory usage. It is oftentimes better than the standard system"
2511 $ echo "memory allocator. It also has the advantage of providing memory"
2512 $ echo "allocation statistics, if you choose to enable them."
2514 $ IF F$TYPE(usemymalloc) .nes. ""
2516 $ if usemymalloc .or. usemymalloc .eqs. "define" then bool_dflt = "y"
2518 $ rp = "Do you wish to attempt to use the malloc that comes with ''package'? [''bool_dflt'] "
2523 $ IF use_debugging_perl
2526 $ echo "Perl can keep statistics on memory usage if you choose to use"
2527 $ echo "them. This is useful for debugging, but does have some"
2528 $ echo "performance overhead."
2530 $ rp = "Do you want the debugging memory allocator? [''bool_dflt'] "
2532 $ use_debugmalloc = ans
2534 $ ! Check which memory allocator we want
2536 $ echo "There are currently three different memory allocators: the"
2537 $ echo "default (which is a pretty good general-purpose memory manager),"
2538 $ echo "the TWO_POT allocator (which is optimized to save memory for"
2539 $ echo "larger allocations), and PACK_MALLOC (which is optimized to save"
2540 $ echo "memory for smaller allocations). They're all good, but if your"
2541 $ echo "usage tends towards larger chunks use TWO_POT, otherwise use"
2542 $ echo "PACK_MALLOC."
2544 $ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2546 $ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2547 $ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2550 $ xs_extensions = ""
2552 $ OPEN/READ CONFIG 'manifestfound'
2554 $ READ/END_OF_FILE=end_ext/ERROR=end_ext CONFIG line
2555 $ IF F$EXTRACT(0,4,line) .NES. "ext/" .AND. -
2556 F$EXTRACT(0,5,line) .NES. "dist/".AND. -
2557 F$EXTRACT(0,5,line) .NES. "cpan/" THEN goto ext_loop
2558 $ line = F$EDIT(line,"COMPRESS")
2559 $ line = F$ELEMENT(0," ",line)
2560 $ IF F$EXTRACT(0,4,line) .EQS. "ext/"
2562 $ xxx = F$ELEMENT(1,"/",line)
2563 $ IF F$SEARCH("[-.ext]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2565 $ IF F$EXTRACT(0,5,line) .EQS. "dist/"
2567 $ xxx = F$ELEMENT(1,"/",line)
2568 $ IF F$SEARCH("[-.dist]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2570 $ IF F$EXTRACT(0,5,line) .EQS. "cpan/"
2572 $ xxx = F$ELEMENT(1,"/",line)
2573 $ IF F$SEARCH("[-.cpan]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2575 $ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit
2577 $! (extspec = xxx) =~ tr!-!/!
2580 $ extension_dir_name = xxx
2581 $ replace_dash_with_slash:
2582 $ before = F$ELEMENT(idx, "-", xxx)
2583 $ IF before .EQS. "-" THEN goto end_replace_dash_with_slash
2584 $ IF extspec .NES. ""
2586 $ extspec = extspec + "/"
2588 $ extspec = extspec + before
2590 $ goto replace_dash_with_slash
2592 $ end_replace_dash_with_slash:
2594 $ IF extspec .EQS. "Scalar/List/Utils" THEN extspec = "List/Util"
2595 $ IF extspec .EQS. "PathTools" THEN extspec = "Cwd"
2597 $ xxx = xs_extensions
2598 $ gosub may_already_have_extension
2602 $ gosub may_already_have_extension
2607 $ gosub may_already_have_extension
2609 $ IF $STATUS .NE. 1 THEN goto ext_loop
2610 $ goto found_new_extension
2612 $ may_already_have_extension:
2613 $ idx = F$LOCATE(extspec, xxx)
2614 $ extlen = F$LENGTH(xxx)
2615 $ IF idx .EQ. extlen THEN return 1 ! didn't find it
2616 $! But "Flirble" may just be part of "Acme-Flirble". This is not
2617 $! bullet-proof because we may only be looking at one chunk of the
2618 $! existing extension list.
2619 $ IF idx .GT. 0 .AND. F$EXTRACT(idx - 1, 1, xxx) .NES. " "
2621 $ xxx = F$EXTRACT(idx + F$LENGTH(extspec) + 1, extlen, xxx)
2622 $ GOTO may_already_have_extension
2624 $! But "Foo" may just be part of "Foo-Bar" so check for equality.
2625 $ xxx = F$EXTRACT(idx, extlen - idx, xxx)
2626 $ IF F$ELEMENT(0, " ", xxx) .EQS. extspec
2630 $ xxx = F$EXTRACT(F$LENGTH(extspec) + 1, extlen, xxx)
2631 GOTO may_already_have_extension
2634 $ found_new_extension:
2635 $ IF F$SEARCH("[-.ext.''extension_dir_name']*.xs") .EQS. "" -
2636 .AND. F$SEARCH("[-.dist.''extension_dir_name']*.xs") .EQS. "" -
2637 .AND. F$SEARCH("[-.cpan.''extension_dir_name']*.xs") .EQS. "" -
2638 .AND. extension_dir_name .NES. "VMS-Filespec"
2640 $! Bit if a hack to get around the 1K buffer on older systems.
2641 $ IF F$LENGTH(nonxs_ext) .GT. 950
2643 $ nonxs_ext2 = nonxs_ext2 + " ''extspec'"
2645 $ nonxs_ext = nonxs_ext + " ''extspec'"
2648 $ xs_extensions = xs_extensions + " ''extspec'"
2655 $ DELETE/SYMBOL extspec
2656 $ DELETE/SYMBOL extlen
2657 $ DELETE/SYMBOL extension_dir_name
2658 $ xs_extensions = F$EDIT(xs_extensions,"TRIM,COMPRESS")
2659 $ dflt = xs_extensions
2660 $ dflt = dflt - "ByteLoader" ! needs to be ported
2661 $ dflt = dflt - "DB_File" ! needs to be ported
2662 $ dflt = dflt - "GDBM_File" ! needs porting/special library
2663 $ dflt = dflt - "IPC/SysV" ! needs to be ported
2664 $ dflt = dflt - "NDBM_File" ! needs porting/special library
2665 $ dflt = dflt - "ODBM_File" ! needs porting/special library
2666 $ dflt = dflt - "Sys/Syslog" ! needs porting/special library "GDBM_File macro LOG_DEBUG"
2667 $ IF .NOT. Has_Dec_C_Sockets
2669 $ dflt = dflt - "Socket" ! optional on VMS
2671 $ dflt = dflt - "Win32API/File" - "Win32" ! need Dave Cutler's other project
2672 $ dflt = dflt - "Amiga/ARexx" - "Amiga/Exec" ! this is not AmigaOS
2673 $ nonxs_ext = nonxs_ext - "Win32CORE"
2674 $ nonxs_ext2 = nonxs_ext2 - "Win32CORE"
2675 $ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
2676 $ nonxs_ext = F$EDIT(nonxs_ext,"TRIM,COMPRESS")
2677 $ nonxs_ext2 = F$EDIT(nonxs_ext2,"TRIM,COMPRESS")
2679 $! Ask for their default list of extensions to build
2681 $ echo "It is time to specify which modules you want to build into"
2682 $ echo "perl. Most of these are standard and should be chosen, though"
2683 $ echo "you might, for example, want to build GDBM_File instead of"
2684 $ echo "SDBM_File if you have the GDBM library built on your machine."
2686 $ echo "Which modules do you want to build into perl?"
2689 $ dynamic_ext = F$EDIT(ans,"TRIM,COMPRESS")
2691 $! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2693 $ echo "Checking your ""make"" utilities..."
2694 $! If the 'build' that you use is not here add it and it's test
2695 $! switch to the _END_ of these strings (and increment max_build)
2696 $! (e.g. builders = builders + "/FOOMAKE"
2697 $! probers = probers + " -fooVersionSwitch"
2698 $! ) & please let me know about it.
2699 $ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2700 $ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2703 $ orig_dflt = f$edit(builder,"UPCASE")
2704 $ if orig_dflt .eqs. "" then orig_dflt = "MMK"
2707 $ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2708 $ WRITE CONFIG "dont_make_anything_yet:"
2709 $ WRITE CONFIG F$FAO("!_")
2712 $ messages = F$ENVIRONMENT("MESSAGE")
2714 $ build = F$ELEMENT(n,"/",builders)
2715 $ probe = F$ELEMENT(n,"!",probers)
2716 $ echo "Testing whether you have ''build' on your system..."
2718 $! Noted with GNU Make version 3.60 that the $status and $severity
2719 $! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2720 $! $SEVERITY == "4".
2723 $ ON CONTROL_Y THEN GOTO Reenable_messages_build
2724 $ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
2726 $ IF ($SEVERITY .EQ. 1) ! not adequate?
2729 $ IF (build .EQS. orig_dflt)
2731 $ default_set = "TRUE"
2734 $ ok_builders = ok_builders + " " + build
2735 $ IF (.NOT. default_set) THEN dflt = build
2739 $Reenable_messages_build:
2740 $ SET MESSAGE 'messages'
2742 $ on control_y then goto clean_up
2744 $ IF (n .LT. max_build) THEN GOTO Build_probe
2747 $ IF (ok_builders .NES. "")
2749 $ echo "Here is the list of builders you can apparently use:"
2750 $ echo "(",ok_builders," )"
2751 $ rp = "Which """"make"""" utility do you wish to use? [''dflt'] "
2753 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2754 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2763 %Config-E-VMS, ERROR:
2764 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
2765 utility of some sort and after checking my "builders" list I cannot find
2766 the symbol or command you use on your system to compile programs.
2769 $ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
2770 $ ans = F$EDIT(ans,"TRIM, COMPRESS")
2771 $ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2774 $ echo "I do not know where ""make"" is, and my life depends on it."
2775 $ echo "Go find a make program or fix your DCL$PATH setting!"
2776 $ echo "ABORTING..."
2777 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2779 $ EXIT 2 !$STATUS = "%X00000002" (error)
2785 $ DELETE/NOLOG/NOCONFIRM Makefile.;
2791 There seems to be trouble. I just tried to create a file in
2793 $ echo4 'F$ENVIRONMENT("DEFAULT")'
2796 but was unsuccessful. I am stopping now. Please check that directories'
2797 PROTECTION bits. I will leave you in the directory where you started
2800 $ echo4 "ABORTING..."
2806 $! echo " Very well I will proceed with ""''build'"""
2807 $ make = F$EDIT(build,"UPCASE")
2809 $!: locate the preferred pager for this system
2810 $!pagers = "most|more|less|type/page"
2811 $ IF osvers .GES. "V6.1"
2813 $ dflt = "type/page=save=10"
2815 $ dflt = "type/page"
2817 $! assume that the presence of a most symbol indicates the presence
2819 $ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most"
2820 $ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager
2821 $ rp="What pager is used on your system? [''dflt'] "
2826 $ IF F$TYPE(default_inc_excludes_dot) .NES. ""
2828 $ IF .not. default_inc_excludes_dot .or. default_inc_excludes_dot .eqs. "undef" THEN bool_dflt = "n"
2831 $ echo "Historically Perl has provided a final fallback of the current working"
2832 $ echo "directory '.' when searching for a library. This, however, can lead to"
2833 $ echo "problems when a Perl program which loads optional modules is called from"
2834 $ echo "a shared directory. This can lead to executing unexpected code."
2836 $ rp = "Exclude '.' from @INC by default? [''bool_dflt'] "
2838 $ default_inc_excludes_dot = ans
2839 $ IF default_inc_excludes_dot
2841 $ default_inc_excludes_dot = "define"
2843 $ default_inc_excludes_dot = "undef"
2846 $! update makefile here
2847 $! echo4 "Updating makefile..."
2849 $ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2851 $ makefile = "" !wrt MANIFEST dir
2852 $ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
2853 $ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
2854 $ Makefile_SH = "descrip_mms.template"
2856 $ makefile = " -f Makefile." !wrt MANIFEST dir
2857 $ UUmakefile = "[-]Makefile." !wrt CWD dir
2858 $ DEFmakefile = "Makefile." !wrt DEF dir (?)
2859 $ Makefile_SH = "Makefile.in"
2862 $ IF macros .NES. ""
2864 $ tmp = F$LENGTH(macros)
2865 $ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2866 $ macros = "/macro=(" + macros + ")"
2868 $! Build up the extra C flags
2872 $ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm"
2874 $ IF (F$ELEMENT(0, "-", archname).EQS."VMS_IA64")
2876 $ extra_flags = "''extra_flags'" + "/float=g_float"
2880 $ IF be_case_sensitive
2882 $ names_flags = "AS_IS"
2884 $ IF shorten_long_symbols
2886 $ IF be_case_sensitive
2888 $ names_flags = "''names_flags',SHORTENED"
2890 $ names_flags = "SHORTENED"
2893 $ IF F$LENGTH(names_flags) .ne. 0
2895 $ extra_flags = "''extra_flags'" + "/NAMES=(''names_flags')"
2897 $ DELETE/SYMBOLS names_flags
2898 $ extra_flags = "''extra_flags'" + "''user_c_flags'"
2900 $ min_pgflquota = "100000"
2901 $ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
2902 $ IF pgflquota .LES. min_pgflquota
2904 $ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
2905 $ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
2908 $ echo4 "Continuing..."
2910 $ echo4 "ABORTING..."
2916 $ echo4 "Checking the C run-time library."
2918 $! Former SUBCONFIGURE.COM
2920 $! - build a config.sh for VMS Perl.
2921 $! - use built config.sh to take config_h.SH -> config.h
2922 $! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
2923 $! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
2924 $! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
2926 $! Note for folks from other platforms changing things in here:
2928 $! Fancy changes (based on compiler capabilities or VMS version or
2929 $! whatever) are tricky, so go ahead and punt on those.
2931 $! Simple changes, though (say, always setting something to 1, or undef,
2932 $! or something like that) are straightforward. Adding a new constant
2933 $! item for the ultimately created config.sh requires at least one
2934 $! (possibly more) line(s) to this file.
2936 $! Add a line in the format:
2938 $! $ WC "foo='undef'"
2940 $! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
2941 $! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
2942 $! is sorted ASCII and corresponds to the output of config.sh in the
2943 $! Bourne shell version of Configure).
2944 $! Be very careful with quoting, as it can be tricky.
2945 $! For example if instead of a constant string like 'undef' or 'define'
2946 $! you wanted to add something to VMS's config.sh that looks like:
2950 $! then add a line that looks like this before the
2951 $! '##END WRITE NEW CONSTANTS HERE##' tagged line:
2953 $! $ WC "blank_string='" + "'"
2955 $! (+ is the string concatenator and "''var'" has the effect
2956 $! of "${var}" in perl or sh, but "'const'" is not interpolated).
2958 $! Note that unitialized variables, such as a line like:
2960 $! $ WC "new_var='" + new_var + "'"
2962 $! should be avoided unless new_var has a value assigned prior
2963 $! to that line (think of perl's -w warnings).
2965 $! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
2969 $ vms_ver = F$EXTRACT(1,3, osvers)
2970 $ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
2971 $ MCC = f$edit(mcc, "UPCASE")
2972 $ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
2973 $ IF ccname .EQS. "DEC"
2975 $ Checkcc := "''Mcc'/prefix=all"
2977 $ IF ccname .EQS. "CXX"
2981 $ Checkcc := "''Mcc'"
2984 $ ccflags = ccflags + extra_flags
2985 $ IF be_case_sensitive
2987 $ d_vms_be_case_sensitive = "define"
2989 $ d_vms_be_case_sensitive = "undef"
2991 $ IF shorten_long_symbols
2993 $ d_vms_shorten_long_symbols = "define"
2995 $ d_vms_shorten_long_symbols = "undef"
2997 $! Some constant defaults.
2998 $ hwname = f$getsyi("HW_NAME")
2999 $ myname = myhostname
3000 $ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
3005 $! FIXME -- This section does not really handle all the different permutations
3006 $! of 64-bitness, and it does not provide for the /POINTER_SIZE=64 compiler
3007 $! option that would be necessary to support the "explicit 64-bit interfaces"
3008 $! promised by -Dusemorebits.
3010 $ usemorebits = "undef"
3011 $ IF use64bitint .OR. use64bitint .EQS. "define"
3013 $ use64bitint = "define"
3014 $ ivdformat="""Ld"""
3015 $ uvuformat="""Lu"""
3016 $ uvoformat="""Lo"""
3017 $ uvxformat="""Lx"""
3018 $ uvXUformat="""LX"""
3020 $ use64bitint = "undef"
3021 $ ivdformat="""ld"""
3022 $ uvuformat="""lu"""
3023 $ uvoformat="""lo"""
3024 $ uvxformat="""lx"""
3025 $ uvXUformat="""lX"""
3027 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
3029 $ uselongdouble = "define"
3031 $ nveformat="""Le"""
3032 $ nvEUformat="""LE"""
3033 $ nvfformat="""Lf"""
3034 $ nvFUformat="""LF"""
3035 $ nvgformat="""Lg"""
3036 $ nvGUformat="""LG"""
3038 $ uselongdouble = "undef"
3040 $ nvEUformat="""E"""
3042 $ nvFUformat="""F"""
3044 $ nvGUformat="""G"""
3046 $ IF use64bitall .OR. use64bitall .EQS. "define"
3048 $ use64bitall = "define"
3050 $ use64bitall = "undef"
3052 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
3054 $ uselargefiles = "define"
3056 $ uselargefiles = "undef"
3059 $ i32dformat="""d"""
3060 $ u32uformat="""u"""
3061 $ u32oformat="""o"""
3062 $ u32xformat="""x"""
3063 $ u32XUformat="""X"""
3065 $ usemymalloc = "undef"
3066 $ if mymalloc then usemymalloc = "define"
3075 $ dlobj="dl_vms''obj_ext'"
3077 $ cppstdin="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
3079 $ cpprun="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
3087 $ THEN d_mymalloc="define"
3088 $ ELSE d_mymalloc="undef"
3092 $ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
3093 $ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
3098 $! perllibs should be libs with all non-core libs (such as gdbm) removed.
3103 $ d_PRId64 = "define"
3104 $ d_PRIi64 = "define"
3105 $ d_PRIu64 = "define"
3106 $ d_PRIo64 = "define"
3107 $ d_PRIx64 = "define"
3108 $ d_PRIXU64 = "define"
3109 $ sPRId64 = """Ld"""
3110 $ sPRIXU64 = """LX"""
3111 $ sPRIi64 = """Li"""
3112 $ sPRIo64 = """Lo"""
3113 $ sPRIu64 = """Lu"""
3114 $ sPRIx64 = """Lx"""
3116 $ quadtype = "long long"
3117 $ uquadtype = "unsigned long long"
3120 $ d_frexpl = "define"
3121 $ d_ldexpl = "define"
3122 $ d_modfl = "define"
3123 $ d_modflproto = "define"
3125 $ d_double_has_inf = "undef"
3126 $ d_double_has_nan = "undef"
3127 $ d_double_has_negative_zero = "undef"
3128 $ d_double_has_subnormals = "undef"
3129 $ d_double_style_cray = "undef"
3130 $ d_double_style_ibm = "undef"
3131 $ d_double_style_ieee = "undef"
3132 $ d_double_style_vax = "undef"
3133 $ d_long_double_style_ieee = "undef"
3134 $ d_long_double_style_ieee_extended = "undef"
3135 $ d_long_double_style_ieee_std = "undef"
3136 $ d_long_double_style_vax = "undef"
3137 $ IF useieee .OR. useieee .EQS. "define"
3139 $ d_double_has_inf = "define"
3140 $ d_double_has_nan = "define"
3141 $ d_double_has_negative_zero = "define"
3142 $ d_double_has_subnormals = "define"
3143 $ d_double_style_ieee = "define"
3144 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
3146 $ d_long_double_style_ieee = "define"
3147 $! TODO: will the Intel port have ieee_extended for long doubles?
3148 $ d_long_double_style_ieee_std = "define"
3150 $ d_acosh = "define"
3151 $ d_asinh = "define"
3152 $ d_atanh = "define"
3154 $ d_copysign = "define"
3158 $ d_expm1 = "define"
3163 $ d_fp_classify = "define"
3164 $ d_hypot = "define"
3165 $ d_ilogb = "define"
3166 $ d_isnan = "define"
3167 $ d_isnormal = "define"
3169 $ d_lgamma = "define"
3170 $ d_log1p = "define"
3173 $ d_lrint = "define"
3174 $ d_lrintl = "define"
3175 $ d_lround = "define"
3176 $ d_lroundl = "define"
3177 $ d_nextafter = "define"
3178 $ d_nexttoward = "define"
3179 $ d_remainder = "define"
3180 $ d_remquo = "define"
3182 $ d_tgamma = "define"
3183 $ d_trunc = "define"
3184 $ d_truncl = "define"
3186 $ d_double_style_vax = "define"
3187 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
3189 $ d_long_double_style_vax = "undef" ! VAX format H unlikely
3196 $ d_copysign = "undef"
3205 $ d_fp_classify = "undef"
3209 $ d_isnormal = "undef"
3211 $ d_lgamma = "undef"
3216 $ d_lrintl = "undef"
3217 $ d_lround = "undef"
3218 $ d_lroundl = "undef"
3219 $ d_nextafter = "undef"
3220 $ d_nexttoward = "undef"
3221 $ d_remainder = "undef"
3222 $ d_remquo = "undef"
3224 $ d_tgamma = "undef"
3226 $ d_truncl = "undef"
3229 $! Now some that we build up
3231 $ d_old_pthread_create_joinable = "undef"
3232 $ old_pthread_create_joinable = " "
3235 $ useithreads = "define"
3237 $ useithreads = "undef"
3240 $! Some that we need to invoke the compiler for
3242 $! handy construction aliases/symbols
3244 $ OS := "open/write CONFIG []try.c"
3245 $ WS := "write CONFIG"
3246 $ CS := "close CONFIG"
3247 $ DS := "delete/nolog/noconfirm []try.*;*"
3248 $ good_compile = %X10B90001
3249 $ IF ccname .EQS. "CXX"
3251 $ good_compile = %X15F60001
3253 $ good_link = %X10000001
3254 $ tmp = "" ! null string default
3256 $ GOTO beyond_compile_ok
3258 $! Check for type sizes
3263 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3264 $ WS "#include <stdlib.h>"
3266 $ WS "#include <stdio.h>"
3269 $ WS "printf(""%d\n"", sizeof(''tmp'));"
3276 $!: locate header file
3280 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3281 $ WS "#include <stdlib.h>"
3283 $ WS "#include <stdio.h>"
3284 $ WS "#include <''tmp'>"
3287 $ WS "printf(""define\n"");"
3294 $!: define an alternate in-header-list? function
3298 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3300 $ echo4 "<''tmp'> found."
3303 $ echo4 "<''tmp'> NOT found."
3308 $!: define an is-in-libc? function
3311 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3313 $ echo4 "''tmp'() found."
3316 $ echo4 "''tmp'() NOT found."
3321 $!: define a shorthand compile call
3325 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3327 $ OPEN/WRITE CONFIG []try.out
3328 $ DEFINE/USER_MODE SYS$ERROR CONFIG
3329 $ DEFINE/USER_MODE SYS$OUTPUT CONFIG
3332 $ OPEN/READ CONFIG []try.out
3335 $ DELETE/NOLOG/NOCONFIRM []try.out;
3336 $ DELETE/NOLOG/NOCONFIRM []try.exe;
3338 $ tmp = "" ! null string default
3344 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3345 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3348 $ link_status = $status
3350 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
3353 $!: define a shorthand compile call for compilations that should be ok.
3355 $ DEFINE/USER_MODE SYS$ERROR _NLA0:
3356 $ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3359 $ compile_status = $status
3361 $ DELETE/NOLOG/NOCONFIRM try.c;
3366 $! Check for __STDC__
3369 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3370 $ WS "#include <stdlib.h>"
3372 $ WS "#include <stdio.h>"
3375 $ WS "#ifdef __STDC__"
3376 $ WS "printf(""42\n"");"
3377 $ WS "#elif defined (__STD_ANSI)" ! for CXX
3378 $ WS "printf(""42\n"");"
3380 $ WS "printf(""1\n"");"
3387 $ IF F$INTEGER(tmp) .eq. 42
3389 $ echo4 "Oh! Smells like ANSI's been here."
3390 $ echo "We can catify or stringify, separately or together!"
3393 $! Check for double size
3395 $ echo4 "Checking to see how big your double precision numbers are..."
3397 $ GOSUB type_size_check
3399 $ echo "Your double is ''doublesize' bytes long."
3401 $! Check for long double size
3404 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3405 $ WS "#pragma message disable ALL" ! VAX compilers may have distracting informationals
3406 $ WS "#include <stdlib.h>"
3408 $ WS "#include <stdio.h>"
3411 $ WS "printf(""%d\n"", sizeof(long double));"
3415 $ echo4 "Checking to see if you have long double..."
3417 $ IF link_status .NE. good_link
3421 $ longdblinfbytes="undef"
3422 $ longdblnanbytes="undef"
3423 $ longdblmantbits="undef"
3425 $ echo "You do not have long double."
3427 $ echo "You have long double."
3428 $ echo4 "Checking to see how big your long doubles are..."
3432 $ longdblinfbytes="0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f"
3433 $ longdblnanbytes="0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff"
3434 $ longdblmantbits="112"
3435 $ d_longdbl = "define"
3436 $ echo "Your long doubles are ''longdblsize' bytes long."
3439 $ IF d_longdbl .OR. d_longdbl .EQS. "define"
3441 $ d_PRIEUldbl = "define"
3442 $ d_PRIFUldbl = "define"
3443 $ d_PRIGUldbl = "define"
3444 $ d_PRIeldbl = "define"
3445 $ d_PRIfldbl = "define"
3446 $ d_PRIgldbl = "define"
3447 $ sPRIEUldbl = """LE"""
3448 $ sPRIFUldbl = """LF"""
3449 $ sPRIGUldbl = """LG"""
3450 $ sPRIeldbl = """Le"""
3451 $ sPRIfldbl = """Lf"""
3452 $ sPRIgldbl = """Lg"""
3454 $ d_PRIEUldbl = "undef"
3455 $ d_PRIFUldbl = "undef"
3456 $ d_PRIGUldbl = "undef"
3457 $ d_PRIeldbl = "undef"
3458 $ d_PRIfldbl = "undef"
3459 $ d_PRIgldbl = "undef"
3467 $ d_SCNfldbl = d_PRIfldbl
3468 $ sSCNfldbl = sPRIfldbl ! expect consistency
3470 $!: check for long long
3472 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3473 $ WS "#include <stdlib.h>"
3475 $ WS "#include <stdio.h>"
3478 $ WS "printf(""%d\n"", sizeof(long long));"
3482 $ echo4 "Checking to see if you have long long..."
3484 $ IF link_status .NE. good_link
3487 $ d_longlong="undef"
3488 $ echo "You do not have long long."
3490 $ echo "You have long long."
3491 $ echo4 "Checking to see how big your long longs are..."
3493 $ longlongsize = tmp
3494 $ d_longlong = "define"
3495 $ echo "Your long longs are ''longlongsize' bytes long."
3498 $! Check the prototype for getgid
3500 $ echo "Looking for the type for group ids returned by getgid()."
3502 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3503 $ WS "#include <stdlib.h>"
3505 $ WS "#include <stdio.h>"
3506 $ WS "#include <types.h>"
3514 $ IF compile_status .NE. good_compile
3516 $! Okay, gid_t failed. Must be unsigned int
3517 $ gidtype = "unsigned int"
3518 $ echo4 "assuming ""''gidtype'""."
3521 $ echo4 "gid_t found."
3524 $! Check to see if we've got dev_t
3526 $ echo "Looking for the type for dev."
3528 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3529 $ WS "#include <stdlib.h>"
3531 $ WS "#include <stdio.h>"
3532 $ WS "#include <types.h>"
3540 $ IF compile_status .NE. good_compile
3542 $! Okay, dev_t failed. Must be unsigned int
3543 $ devtype = "unsigned int"
3544 $ echo4 "assuming ""''devtype'""."
3547 $ echo4 "dev_t found."
3550 $! Check to see if we've got unistd.h (which we ought to, but you never know)
3557 $! Check to see if we've got utime.h (which we should use if we have)
3564 $! do we have getppid()?
3566 $ IF i_unistd .EQS. "define"
3569 $ WS "#include <stdio.h>"
3570 $ WS "#include <unistd.h>"
3572 $ WS "printf(""%d\n"",getppid());"
3580 $ d_getppid = "undef"
3583 $!: see if this is a libutil.h system
3589 $! Check to see if we've got shadow.h (probably not, but...)
3595 $! Check to see if we've got socks.h (probably not, but...)
3601 $! Check the prototype for select
3603 $ IF Has_Dec_C_Sockets
3606 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3607 $ WS "#include <stdlib.h>"
3609 $ WS "#include <stdio.h>"
3610 $ WS "#include <types.h>"
3611 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3612 $ WS "#include <time.h>"
3613 $ WS "#include <socket.h>"
3619 $ WS "bar = select(2, foo, foo, foo, NULL);"
3624 $ IF compile_status .NE. good_compile
3626 $! Okay, select failed. Must be an int *
3627 $ selecttype = "int *"
3628 $ echo4 "select() NOT found."
3630 $ selecttype="fd_set *"
3631 $ echo4 "select() found."
3634 $ ! No sockets, so stick in an int * : no select, so pick a harmless default
3635 $ selecttype = "int *"
3638 $! Check to see if fd_set exists
3640 $ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3642 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3643 $ WS "#include <stdlib.h>"
3645 $ WS "#include <stdio.h>"
3646 $ WS "#include <types.h>"
3647 $ IF Has_Dec_C_Sockets
3649 $ WS "#include <time.h>"
3650 $ WS "#include <socket.h>"
3660 $ IF compile_status .ne. good_compile
3662 $! Okay, fd_set failed. Must not exist
3663 $ d_fd_set = "undef"
3664 $ echo4 "Hmm, your compiler has some difficulty with fd_set."
3667 $ echo4 "Well, your system knows about the normal fd_set typedef..."
3670 $! Check for stdint.h
3676 $! Check for inttypes.h
3678 $ tmp = "inttypes.h"
3682 $! Check to see if off64_t exists
3684 $ echo4 "Checking to see if you have off64_t..."
3686 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3687 $ WS "#include <stdlib.h>"
3689 $ WS "#include <stdio.h>"
3690 $ WS "#include <types.h>"
3691 $ WS "#''i_inttypes' IIH"
3693 $ WS "#include <inttypes.h>"
3702 $ IF compile_status .EQ. good_compile
3704 $ d_off64_t="define"
3705 $ echo "You have off64_t."
3707 $ d_off64_t = "undef"
3708 $ echo "You do not have off64_t."
3711 $! Check to see if fpclassify exists
3714 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3715 $ WS "#include <stdlib.h>"
3717 $ WS "#include <math.h>"
3720 $ WS "if (fpclassify(0.0) == FP_ZERO) exit(0);"
3724 $ tmp = "fpclassify"
3726 $ d_fpclassify = tmp
3728 $! Check to see if fpos64_t exists
3730 $ echo4 "Checking to see if you have fpos64_t..."
3732 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3733 $ WS "#include <stdlib.h>"
3735 $ WS "#include <stdio.h>"
3736 $ WS "#include <types.h>"
3737 $ WS "#''i_inttypes' IIH"
3739 $ WS "#include <inttypes.h>"
3743 $ WS "fpos64_t bar;"
3748 $ IF compile_status .EQ. good_compile
3750 $ d_fpos64_t="define"
3751 $ echo "You have fpos64_t."
3753 $ d_fpos64_t = "undef"
3754 $ echo "You do not have fpos64_t."
3757 $! Check to see if int64_t exists
3759 $ echo4 "Checking to see if you have int64_t..."
3761 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3762 $ WS "#include <stdlib.h>"
3764 $ WS "#include <stdio.h>"
3765 $ WS "#include <types.h>"
3766 $ WS "#''i_inttypes' IIH"
3768 $ WS "#include <inttypes.h>"
3777 $ IF compile_status .EQ. good_compile
3779 $ d_int64_t="define"
3780 $ echo "You have int64_t."
3782 $ d_int64_t = "undef"
3783 $ echo "You do not have int64_t."
3786 $! Check to see if fseeko exists
3789 $ WS "#include <stdio.h>"
3792 $ WS "FILE *f=NULL;"
3793 $ WS "fseeko(f,(off_t)0,SEEK_SET);"
3801 $! Check to see if ftello exists
3804 $ WS "#include <stdio.h>"
3807 $ WS "FILE *f=NULL; off_t o=0;"
3816 $!: see if this is a netdb.h system
3817 $ IF Has_Dec_C_Sockets
3824 $! Check for h_errno
3826 $ echo4 "Checking to see if you have h_errno..."
3828 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3829 $ WS "#include <stdlib.h>"
3831 $ WS "#include <stdio.h>"
3832 $ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3833 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
3841 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3844 $ echo "You have h_errno."
3847 $ echo "You do not have h_errno."
3850 $! Check to see if gethostname exists
3852 $ IF Has_Dec_C_Sockets
3855 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3856 $ WS "#include <stdlib.h>"
3858 $ WS "#include <stdio.h>"
3859 $ WS "#include <types.h>"
3860 $ WS "#include <time.h>"
3861 $ WS "#include <socket.h>"
3864 $ WS "char name[100];"
3865 $ WS "int bar, baz;"
3867 $ WS "baz = gethostname(name, bar);"
3872 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3874 $ d_gethname="define"
3875 $ echo4 "gethostname() found."
3877 $ d_gethname="undef"
3880 $ ! No sockets, so no gethname
3881 $ d_gethname = "undef"
3884 $! Check for sys/file.h
3886 $ tmp = "sys/file.h"
3891 $! Check for sys/ioctl.h
3893 $ tmp = "sys/ioctl.h"
3897 $! Check for sys/utsname.h
3899 $ tmp = "sys/utsname.h"
3901 $ i_sysutsname = tmp
3903 $! Check for syslog.h
3915 $! Check for sys/uio.h
3921 $! Check for sys/mode.h
3923 $ tmp = "sys/mode.h"
3929 $ tmp = "sys/poll.h"
3933 $! Check for sys/access.h
3935 $ tmp = "sys/access.h"
3939 $! Check for sys/security.h
3941 $ tmp = "sys/security.h"
3945 $! Check for fcntl.h
3954 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3955 $ WS "#include <stdlib.h>"
3957 $ WS "#include <stdio.h>"
3958 $ WS "#include <fcntl.h>"
3961 $ WS "fcntl(1,2,3);"
3969 $! Check for fcntl locking capability
3971 $ echo4 "Checking if fcntl-based file locking works... "
3973 $ IF d_fcntl .EQS. "define"
3976 $ WS "#include <stdio.h>"
3977 $ WS "#if defined(__DECC) || defined(__DECCXX)"
3978 $ WS "#include <stdlib.h>"
3980 $ WS "#include <fcntl.h>"
3981 $ WS "#include <unistd.h>"
3983 $ WS "#if defined(F_SETLK) && defined(F_SETLKW)"
3984 $ WS " struct flock flock;"
3985 $ WS " int retval, fd;"
3986 $ WS " fd = open(""[-]perl.c"", O_RDONLY);"
3987 $ WS " flock.l_type = F_RDLCK;"
3988 $ WS " flock.l_whence = SEEK_SET;"
3989 $ WS " flock.l_start = flock.l_len = 0;"
3990 $ WS " retval = fcntl(fd, F_SETLK, &flock);"
3992 $ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));"
3994 $ WS " printf(""undef\n"");"
3999 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4002 $ IF tmp .EQS. "define"
4004 $ echo4 "Yes, it seems to work."
4006 $ echo4 "Nope, it didn't work."
4009 $ echo4 "I'm unable to compile the test program, so I'll assume not."
4013 $ echo4 "Nope, since you don't even have fcntl()."
4015 $ d_fcntl_can_lock = tmp
4017 $! Check to see if isblank exists
4020 $ WS "#include <stdlib.h>"
4021 $ WS "#include <ctype.h>"
4025 $ WS "if(isblank(c))"
4026 $ WS " exit(EXIT_SUCCESS);"
4028 $ WS " exit(EXIT_FAILURE);"
4035 $! Check to see if isless exists
4038 $ WS "#include <stdlib.h>"
4039 $ WS "#include <math.h>"
4040 $ WS "int main() { return isless(1.0, 2.0) ? EXIT_SUCCESS : EXIT_FAILURE; }"
4046 $! Check to see if pre-C99 isnanl exists
4049 $ WS "#include <stdlib.h>"
4050 $ WS "#include <math.h>"
4053 $ WS " long double x = NaN;"
4054 $ WS " return isnanl(x) ? EXIT_SUCCESS : EXIT_FAILURE;"
4061 $! Check to see if llrint exists
4064 $ WS "#include <stdlib.h>"
4065 $ WS "#include <math.h>"
4068 $ WS " long long x = llrint(1.5);"
4069 $ WS " return x == 2 ? EXIT_SUCCESS : EXIT_FAILURE;"
4076 $! Check to see if llrintl exists
4079 $ WS "#include <stdlib.h>"
4080 $ WS "#include <math.h>"
4083 $ WS " long long x = llrintl(1.5);"
4084 $ WS " return x == 2 ? EXIT_SUCCESS : EXIT_FAILURE;"
4091 $! Check to see if llround exists
4094 $ WS "#include <stdlib.h>"
4095 $ WS "#include <math.h>"
4098 $ WS " long long x = llround(1.5);"
4099 $ WS " return x == 2 ? EXIT_SUCCESS : EXIT_FAILURE;"
4106 $! Check to see if llroundl exists
4109 $ WS "#include <stdlib.h>"
4110 $ WS "#include <math.h>"
4113 $ WS " long long x = llroundl(1.5);"
4114 $ WS " return x == 2 ? EXIT_SUCCESS : EXIT_FAILURE;"
4121 $! Check to see if nearbyint exists
4124 $ WS "#include <stdlib.h>"
4125 $ WS "#include <math.h>"
4128 $ WS " double x = llroundl(1.5);"
4129 $ WS " return x == 2.0 ? EXIT_SUCCESS : EXIT_FAILURE;"
4136 $! Check to see if round exists
4139 $ WS "#include <stdlib.h>"
4140 $ WS "#include <math.h>"
4143 $ WS " double x = round(1.5);"
4144 $ WS " return x == 2.0 ? EXIT_SUCCESS : EXIT_FAILURE;"
4151 $! Check to see if scalbn exists
4154 $ WS "#include <stdlib.h>"
4155 $ WS "#include <math.h>"
4158 $ WS " double x = scalbn(1.0, 3);"
4159 $ WS " return x == 8.0 ? EXIT_SUCCESS : EXIT_FAILURE;"
4166 $! Check to see if scalbnl exists
4169 $ WS "#include <stdlib.h>"
4170 $ WS "#include <math.h>"
4173 $ WS " long double x = scalbn(1.0, 3);"
4174 $ WS " return x == 8.0 ? EXIT_SUCCESS : EXIT_FAILURE;"
4181 $! Check for memrchr
4184 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4185 $ WS "#include <stdlib.h>"
4187 $ WS "#include <string.h>"
4190 $ WS "char * place;"
4191 $ WS "place = (char *)memrchr(""foo"", 47, 3);"
4199 $! Check for strnlen
4202 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4203 $ WS "#include <stdlib.h>"
4205 $ WS "#include <string.h>"
4209 $ WS "len = strnlen(""foot"", 3);"
4217 $! Check for strtoull
4220 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4221 $ WS "#include <stdlib.h>"
4223 $ WS "#include <string.h>"
4226 $ WS "unsigned __int64 result;"
4227 $ WS "result = strtoull(""123123"", NULL, 10);"
4235 $! Check for strtouq
4238 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4239 $ WS "#include <stdlib.h>"
4241 $ WS "#include <string.h>"
4244 $ WS "unsigned __int64 result;"
4245 $ WS "result = strtouq(""123123"", NULL, 10);"
4253 $! Check for strtoll
4256 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4257 $ WS "#include <stdlib.h>"
4259 $ WS "#include <string.h>"
4262 $ WS "__int64 result;"
4263 $ WS "result = strtoll(""123123"", NULL, 10);"
4274 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4275 $ WS "#include <stdlib.h>"
4277 $ WS "#include <string.h>"
4280 $ WS "__int64 result;"
4281 $ WS "result = strtoq(""123123"", NULL, 10);"
4289 $! Check for strtold
4292 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4293 $ WS "#include <stdlib.h>"
4295 $ WS "#include <string.h>"
4298 $ WS "long double result;"
4299 $ WS "result = strtold(""123123"", NULL);"
4310 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4311 $ WS "#include <stdlib.h>"
4313 $ WS "#include <string.h>"
4316 $ WS " __int64 result;"
4317 $ WS "result = atoll(""123123"");"
4328 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4329 $ WS "#include <stdlib.h>"
4331 $ WS "#include <string.h>"
4335 $ WS "result = atolf(""123123"");"
4346 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4347 $ WS "#include <stdlib.h>"
4349 $ WS "#include <stdio.h>"
4352 $ WS "access(""foo"", F_OK);"
4360 $! Check for mkostemp
4363 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4364 $ WS "#include <stdlib.h>"
4366 $ WS "#include <stdio.h>"
4369 $ WS "mkostemp(""foo"", 0);"
4377 $! Check for mkstemp
4380 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4381 $ WS "#include <stdlib.h>"
4383 $ WS "#include <stdio.h>"
4386 $ WS "mkstemp(""foo"");"
4394 $! Check for mkstemps
4397 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4398 $ WS "#include <stdlib.h>"
4400 $ WS "#include <stdio.h>"
4403 $ WS "mkstemps(""foo"", 1);"
4411 $! Check for mkdtemp
4414 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4415 $ WS "#include <stdlib.h>"
4417 $ WS "#include <stdio.h>"
4420 $ WS "mkdtemp(""foo"");"
4430 $ if i_poll .eqs. "define"
4433 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4434 $ WS "#include <stdlib.h>"
4436 $ WS "#include <poll.h>"
4439 $ WS "struct pollfd pfd;"
4440 $ WS "int count=poll(&pfd,1,0);"
4451 $! Check for setvbuf
4454 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4455 $ WS "#include <stdlib.h>"
4457 $ WS "#include <stdio.h>"
4461 $ WS "char Buffer[99];"
4462 $ WS "foo = fopen(""foo"", ""r"");"
4463 $ WS "setvbuf(foo, Buffer, 0, 0);"
4471 $! Check for the shm* routines.
4474 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4475 $ WS "#include <stdlib.h>"
4477 $ WS "#include <stdio.h>"
4478 $ WS "#include <sys/shm.h>"
4479 $ WS "#include <sys/stat.h>"
4480 $ WS "int shmget(key_t key, size_t size, int shmflg);"
4481 $ WS "void* shmat(int shmid,const void *shmaddr,int shmflg);"
4482 $ WS "int shmctl(int shmid, int cmd, struct shmid_ds *buf);"
4483 $ WS "int shmdt(const void *shmaddr);"
4485 $ WS "int shm_id = shmget(IPC_PRIVATE, 8, S_IRWXU);"
4486 $ WS "if (shm_id == -1) printf(""0\n""); else printf (""1\n"");"
4493 $ d_shmat = "define"
4494 $ d_shmatprototype = "define"
4495 $ d_shmctl = "define"
4496 $ d_shmdt = "define"
4497 $ d_shmget = "define"
4498 $ shmattype = "void *"
4502 $ d_shmatprototype = "undef"
4503 $ d_shmctl = "undef"
4505 $ d_shmget = "undef"
4506 $ shmattype = "undef"
4512 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4513 $ WS "#include <stdlib.h>"
4515 $ WS "#include <stdio.h>"
4518 $ WS "setenv(""FOO"", ""BAR"", 0);"
4526 $! Check for setproctitle
4529 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4530 $ WS "#include <stdlib.h>"
4532 $ WS "#include <stdio.h>"
4535 $ WS "setproctitle(""%s"", ""FOO"");"
4539 $ tmp = "setproctitle"
4541 $ d_setproctitle = tmp
4543 $! Check for <netinet/in.h>
4545 $ IF Has_Dec_C_Sockets
4547 $ tmp = "netinet/in.h"
4554 $! Check for <arpa/inet.h>
4556 $ IF Has_Dec_C_Sockets
4558 $ tmp = "arpa/inet.h"
4562 $ i_arpainet="undef"
4565 $! Check for <sys/un.h>
4567 $ IF Has_Dec_C_Sockets
4577 $! Check for <netinet/tcp.h>
4579 $ IF Has_Dec_C_Sockets
4581 $ tmp = "netinet/tcp.h"
4583 $ i_netinettcp = tmp
4585 $ i_netinettcp="undef"
4588 $! Check for endhostent
4590 $ IF Has_Dec_C_Sockets
4593 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4594 $ WS "#include <stdlib.h>"
4596 $ WS "#include <stdio.h>"
4597 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4600 $ WS "endhostent();"
4604 $ tmp = "endhostent"
4611 $! Check for endnetent
4613 $ IF Has_Dec_C_Sockets
4616 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4617 $ WS "#include <stdlib.h>"
4619 $ WS "#include <stdio.h>"
4620 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4634 $! Check for endprotoent
4636 $ IF Has_Dec_C_Sockets
4639 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4640 $ WS "#include <stdlib.h>"
4642 $ WS "#include <stdio.h>"
4643 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4646 $ WS "endprotoent();"
4650 $ tmp = "endprotoent"
4657 $! Check for endservent
4659 $ IF Has_Dec_C_Sockets
4662 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4663 $ WS "#include <stdlib.h>"
4665 $ WS "#include <stdio.h>"
4666 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4669 $ WS "endservent();"
4673 $ tmp = "endservent"
4680 $! Check for sethostent
4682 $ IF Has_Dec_C_Sockets
4685 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4686 $ WS "#include <stdlib.h>"
4688 $ WS "#include <stdio.h>"
4689 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4692 $ WS "sethostent(1);"
4696 $ tmp = "sethostent"
4703 $! Check for setnetent
4705 $ IF Has_Dec_C_Sockets
4708 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4709 $ WS "#include <stdlib.h>"
4711 $ WS "#include <stdio.h>"
4712 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4715 $ WS "setnetent(1);"
4726 $! Check for setprotoent
4728 $ IF Has_Dec_C_Sockets
4731 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4732 $ WS "#include <stdlib.h>"
4734 $ WS "#include <stdio.h>"
4735 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4738 $ WS "setprotoent(1);"
4742 $ tmp = "setprotoent"
4749 $! Check for setservent
4751 $ IF Has_Dec_C_Sockets
4754 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4755 $ WS "#include <stdlib.h>"
4757 $ WS "#include <stdio.h>"
4758 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4761 $ WS "setservent(1);"
4765 $ tmp = "setservent"
4772 $! Check for gethostent
4774 $ IF Has_Dec_C_Sockets
4777 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4778 $ WS "#include <stdlib.h>"
4780 $ WS "#include <stdio.h>"
4781 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4784 $ WS "gethostent();"
4788 $ tmp = "gethostent"
4795 $! Check for getnetent
4797 $ IF Has_Dec_C_Sockets
4800 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4801 $ WS "#include <stdlib.h>"
4803 $ WS "#include <stdio.h>"
4804 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4818 $! Check for getprotoent
4820 $ IF Has_Dec_C_Sockets
4823 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4824 $ WS "#include <stdlib.h>"
4826 $ WS "#include <stdio.h>"
4827 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4830 $ WS "getprotoent();"
4834 $ tmp = "getprotoent"
4841 $! Check for getservent
4843 $ IF Has_Dec_C_Sockets
4846 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4847 $ WS "#include <stdlib.h>"
4849 $ WS "#include <stdio.h>"
4850 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4853 $ WS "getservent();"
4857 $ tmp = "getservent"
4867 $ echo4 "Checking the availability of sa_len in the sockaddr struct ..."
4868 $ IF Has_Dec_C_Sockets
4871 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4872 $ WS "#include <stdlib.h>"
4874 $ WS "#define _SOCKADDR_LEN"
4875 $ WS "#include <types.h>"
4876 $ WS "#include <socket.h>"
4877 $ WS "#include <string.h>"
4879 $ WS "struct sockaddr sa;"
4880 $ WS "memset((char *)&sa, 0, sizeof(sa));"
4881 $ WS "return (sa.sa_len);"
4885 $ IF compile_status .EQ. good_compile
4887 $ d_sockaddr_sa_len="define"
4888 $ echo "You have sa_len in the sockaddr struct."
4890 $ d_sockaddr_sa_len="undef"
4891 $ echo "You do not have sa_len in the sockaddr struct."
4894 $ d_sockaddr_sa_len="undef"
4895 $ echo "You do not have sa_len in the sockaddr struct."
4898 $! Check for sin6_scope_id
4900 $ echo4 "Checking the availability of sin6_scope_id in the struct sockaddr_in6 ..."
4901 $ IF Has_Dec_C_Sockets
4904 $ WS "#include <types.h>"
4905 $ WS "#include <socket.h>"
4906 $ WS "#include <in.h>"
4907 $ WS "#include <string.h>"
4909 $ WS "struct sockaddr_in6 sin6;"
4910 $ WS "memset((char *)&sin6, 0, sizeof(sin6));"
4911 $ WS "return (sin6.sin6_scope_id);"
4915 $ IF compile_status .EQ. good_compile
4917 $ d_sin6_scope_id="define"
4918 $ echo "You have sin6_scope_id in the sockaddr_in6 struct."
4920 $ d_sin6_scope_id="undef"
4921 $ echo "You do not have sin6_scope_id in the sockaddr_in6 struct."
4924 $ d_sin6_scope_id="undef"
4925 $ echo "You do not have sin6_scope_id in the sockaddr_in6 struct."
4928 $! Check for nanosleep
4931 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4932 $ WS "#include <stdlib.h>"
4934 $ WS "#include <time.h>"
4937 $ WS "int asleep = nanosleep(NULL,NULL);"
4945 $! Check for socklen_t
4947 $ IF Has_Dec_C_Sockets
4949 $ echo4 "Checking to see if you have socklen_t..."
4951 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4952 $ WS "#include <stdlib.h>"
4954 $ WS "#include <stdio.h>"
4955 $ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
4958 $ WS "socklen_t x = 16;"
4963 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4965 $ d_socklen_t="define"
4966 $ echo "You have socklen_t."
4968 $ d_socklen_t="undef"
4969 $ echo "You do not have socklen_t."
4972 $ d_socklen_t="undef"
4975 $! Check for pthread_yield
4980 $ WS "#if defined(__DECC) || defined(__DECCXX)"
4981 $ WS "#include <stdlib.h>"
4983 $ WS "#include <pthread.h>"
4984 $ WS "#include <stdio.h>"
4987 $ WS "pthread_yield();"
4991 $ tmp = "pthread_yield"
4993 $ d_pthread_yield = tmp
4995 $ d_pthread_yield="undef"
4998 $! Check for sched_yield
5003 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5004 $ WS "#include <stdlib.h>"
5006 $ WS "#include <pthread.h>"
5007 $ WS "#include <stdio.h>"
5010 $ WS "sched_yield();"
5014 $ tmp = "sched_yield"
5016 $ d_sched_yield = tmp
5017 $ IF d_sched_yield .EQS. "define"
5018 $ THEN sched_yield = "sched_yield"
5019 $ ELSE sched_yield = " "
5022 $ d_sched_yield="undef"
5026 $! Check for pthread_attr_setscope and PTHREAD_SCOPE_SYSTEM.
5027 $! (The actual test is to be written.)
5029 $ d_pthread_attr_setscope="undef"
5031 $! Check for generic pointer size
5033 $ echo4 "Checking to see how big your pointers are..."
5035 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5036 $ WS "#include <stdlib.h>"
5038 $ WS "#include <stdio.h>"
5042 $ WS "foo = sizeof(char *);"
5043 $ WS "printf(""%d\n"", foo);"
5048 $ GOSUB type_size_check
5050 $ echo "Your pointers are ''ptrsize' bytes long."
5052 $! Check for size_t size
5056 $ echo4 "Checking the size of ''zzz'..."
5057 $ GOSUB type_size_check
5059 $ echo "Your ''zzz' size is ''sizesize' bytes."
5061 $! Check for _LARGEFILE capability.
5065 $ WS "#define _LARGEFILE"
5066 $ WS "#include <stdio.h>"
5069 $ WS "printf(""%d\n"", sizeof(off_t));"
5074 $ IF link_status .EQ. good_link
5079 $ echo "Your off_t size is ''off_t_size' bytes when _LARGEFILE is defined."
5080 $ IF off_t_size .ne. 8 .AND. (uselargefiles .OR. uselargefiles .eqs. "define")
5082 $ echo4 "You configured with -Duselargefiles but your CRTL does not support _LARGEFILE."
5083 $ echo4 "I'm disabling large file support."
5084 $ uselargefiles = "undef"
5087 $! Check for st_ino size.
5091 $ WS "#include <sys/stat.h>"
5092 $ WS "#include <stdio.h>"
5093 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5094 $ WS "#include <stdlib.h>"
5097 $ WS "#''uselargefiles' _LARGEFILE"
5098 $ WS "#ifdef _LARGEFILE"
5099 $ WS " printf(""%d\n"", sizeof(__ino64_t));"
5101 $ WS " printf(""%d\n"", sizeof(unsigned short)*3);"
5107 $ IF link_status .EQ. good_link
5112 $ echo "Your st_ino size is ''st_ino_size' bytes."
5114 $! Tests for hard link, symbolic links, and 7.3 + CRTL features
5116 $ d_lchown = "undef"
5119 $ d_readlink = "undef"
5120 $ d_symlink = "undef"
5121 $ d_realpath = "undef"
5123 $! Hard link support has been present since 7.3-1 except for the
5124 $! easy to use DCL test to see if hardlinks are enabled on the build
5125 $! disk. That would require more work to test, and I am only testing
5126 $! this on 8.2, so that is why the 8.2 test.
5128 $ IF (vms_ver .GES. "8.2")
5130 $ IF f$getdvi("SYS$DISK","HARDLINKS_SUPPORTED")
5132 $ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links enabled on build disk."
5133 $ echo "I will build with hard link support"
5136 $ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links disabled on build disk."
5137 $ echo "I will not build with hard link support."
5140 $ echo4 "I can not detect if your CRTL and build disk support hard links."
5141 $ echo4 "I am disabling hard link support."
5144 $ IF uselargefiles .OR. uselargefiles .eqs. "define"
5146 $ IF (vms_ver .GES. "8.2")
5148 $ echo4 "Largefile support enabled, so enabling standard stat support too."
5151 "Looking for the realpath() function to indicate symbolic link support..."
5153 $ WS "#include <stdlib.h>"
5154 $ WS "char *realpath(const char *file_name, char * resolved_name, ...);"
5157 $ WS "char result[255];"
5158 $ WS "realpath(""foo"",result);"
5163 $ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
5166 "Found realpath() which indicates symbolic link support is present."
5167 $ d_lchown = "define"
5168 $ d_lstat = "define"
5169 $ d_readlink = "define"
5170 $ d_symlink = "define"
5171 $! d_realpath = "define" ! Perl will not put it in the config.h file?
5172 $! Perl apparently does not use a built in realpath() on other platforms,
5173 $! but there is a severe performance penatly on OpenVMS to use the Perl
5174 $! script that implements a realpath(). The d_symlink symbol is used
5175 $! as a replacement for the d_realpath since they are related and both
5176 $! were activated by the CRTL at the same time.
5179 $ echo4 "Your system does not support symbolic links."
5180 $ echo4 "I am disabling symbolic link support."
5183 $ echo4 "Your system does not support symbolic links."
5184 $ echo4 "I am disabling symbolic link support."
5187 $ IF (vms_ver .GES. "8.2")
5189 $ echo4 "-Duselargefiles is required for symbolic link support."
5190 $ echo4 "You did not specify that, so I am disabling symbolic link support."
5195 $! Check for grp.h -- should be 7.3 and later, but test to be sure
5201 $! VMS V7.3-2 powered options
5202 $! We know that it is only available for V7.3-2 and later on 64 bit platforms.
5204 $ d_getgrgid_r = "undef"
5205 $ getgrgid_r_proto = "0"
5206 $ d_getgrnam_r = "undef"
5207 $ getgrnam_r_proto = "0"
5208 $ d_getpgid = "undef"
5209 $ d_getpgrp = "undef"
5210 $! N.B. We already have home-grown thread-safe versions of
5211 $! getpwnam and getpwuid -- no need to use CRTL versions
5212 $ d_getpwnam_r = "undef"
5213 $ getpwnam_r_proto = "0"
5214 $ d_getpwuid_r = "undef"
5215 $ getpwuid_r_proto = "0"
5216 $ echo "Asumming 64-bit OpenVMS ''vms_ver' -- will build with V7.3-2 routines"
5217 $ d_getgrgid_r = "define"
5218 $ getgrgid_r_proto = "1"
5219 $ d_getgrnam_r = "define"
5220 $ getgrnam_r_proto = "1"
5221 $ if d_symlink .or. d_symlink .EQS. "define"
5223 $! FIXME: Need to find how to activate this.
5224 $! d_getpgid = "define"
5225 $! d_getpgrp = "define"
5227 $ d_setgrent = "define"
5228 $ d_ttyname_r = "define"
5229 $ ttyname_r_proto = "1"
5230 $ d_snprintf = "define"
5231 $ d_vsnprintf = "define"
5233 $! VMS V7.3-2 powered options
5234 $! We know that it is only available for V7.3-2 and later on 64 bit platforms.
5235 $! Only implementing right now on 8.2 because that is what I am testing
5236 $! These functions may require POSIX UIDs/GIDs to be active, so I am
5237 $! not activating the features at this time, just preparing this file
5238 $! to easily use them in the future.
5240 $ d_seteuid = "undef"
5241 $ d_setpgid = "undef"
5242 $ d_setpgrp = "undef"
5243 $ d_setregid = "undef"
5244 $ d_setreuid = "undef"
5245 $ d_setsid = "undef"
5246 $ ! Disable this section for now.
5247 $!$ if (vms_ver .GES. "8.2")
5250 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 UID setting routines"
5251 $ d_seteuid = "define"
5252 $ d_setpgid = "define"
5253 $ d_setpgrp = "define"
5254 $ d_setregid = "define"
5255 $ d_setreuid = "define"
5256 $ d_setsid = "define"
5259 $! VMS V8 powered options
5260 $! We know that it is only available for 8.2 and later on 64 bit platforms.
5262 $ d_fstatvfs = "undef"
5263 $ d_statvfs = "undef"
5264 $ i_sysstatvfs = "undef"
5265 $ if (vms_ver .GES. "8.2")
5267 $ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with 8.2 routines"
5268 $ d_fstatvfs = "define"
5269 $ d_statvfs = "define"
5270 $ i_sysstatvfs = "define"
5273 $! Check rand48 and its ilk
5275 $ echo4 "Using our internal random number implementation..."
5277 $ randfunc = "Perl_drand48"
5278 $ drand01 = "Perl_drand48()"
5279 $ seedfunc = "Perl_drand48_init"
5281 $ randseedtype = "U32"
5282 $ d_drand48proto = "define"
5284 $! Done with compiler checks. Clean up.
5285 $ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
5286 $ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
5287 $ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
5288 $ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
5289 $ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
5290 $ IF ccname .EQS. "CXX"
5292 $ CALL Cxx_demangler_cleanup
5295 $! Some that are compiler or VMS version sensitive
5297 $ IF ccname .EQS. "CXX"
5304 $ d_attribut="undef"
5305 $ d_getitimer="define"
5306 $ d_gettimeod="define"
5308 $ d_mprotect="define"
5313 $! d_unsetenv="define" ! Fix me - Activating requires changing VMS code
5314 $ d_unsetenv="undef" ! Change will be needed to allow GNV integration
5315 $ d_clearenv="undef"
5317 $ d_setitimer="define"
5318 $ d_sigaction="define"
5319 $ d_siginfo_si_addr="define"
5320 $ d_siginfo_si_band="define"
5321 $ d_siginfo_si_errno="define"
5322 $ d_siginfo_si_fd="define"
5323 $ d_siginfo_si_pid="define"
5324 $ d_siginfo_si_status="define"
5325 $ d_siginfo_si_uid="define"
5326 $ d_siginfo_si_value="define"
5327 $ d_sigprocmask="define"
5328 $ d_truncate="define"
5332 $ sig_name1="ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE"
5333 $ sig_name2=" ALRM TERM USR1 USR2 NUM18 NUM19 CHLD CONT STOP TSTP TTIN TTOU DEBUG"
5334 $ sig_name2 = sig_name2 + " NUM27 WINCH"
5335 $!* signal.h defines SIGRTMIN as 33 and SIGRTMAX as 64, but there is no
5336 $!* sigqueue function or other apparent means to do realtime signalling,
5337 $!* so let's not try to include the realtime range for now.
5338 $!* sig_name3=" NUM29 NUM30 NUM31 NUM32 RTMIN NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43"
5339 $!* sig_name4=" NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58"
5340 $!* sig_name5=" NUM59 NUM60 NUM61 NUMT62 NUM63 RTMAX"
5341 $ sig_name = sig_name1 + sig_name2
5344 $ sig_name_init = ""
5347 $ PARSE_SIG_NAME_LOOP:
5349 $ tmp = F$ELEMENT(sig_index, " ", sig_name)
5350 $ IF F$LENGTH(F$EDIT(tmp,"TRIM")) .eq. 0 THEN GOTO END_SIG_NAME_LOOP
5351 $ sig_name_init = sig_name_init + """''tmp'"","
5352 $ sig_num = sig_num + "''sig_index' "
5353 $ sig_num_init = sig_num_init + "''sig_index',"
5354 $ sig_index = sig_index + 1
5355 $ GOTO PARSE_SIG_NAME_LOOP
5357 $ END_SIG_NAME_LOOP:
5359 $ sig_name_init = sig_name_init + "0"
5360 $ sig_num_init = sig_num_init + "0"
5361 $ sig_size = "''sig_index'"
5362 $ sig_index = sig_index - 1
5363 $ sig_count = "''sig_index'"
5365 $ d_pathconf="define"
5366 $ d_fpathconf="define"
5367 $ d_sysconf="define"
5368 $ d_sigsetjmp="define"
5370 $!: see if tzname[] exists
5372 $ WS "#include <stdio.h>"
5373 $ WS "#include <time.h>"
5374 $ WS "int main() { extern short tzname[]; printf(""%hd"", tzname[0]); }"
5377 $ IF compile_status .EQ. good_compile
5379 $ d_tzname = "undef"
5380 $ echo4 "tzname[] NOT found."
5382 $ d_tzname = "define"
5383 $ echo4 "tzname[] found."
5385 $ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
5387 $ IF d_gethname .EQS. "undef" .AND. d_uname .EQS. "undef"
5389 $ d_phostname="define"
5391 $ d_phostname="undef"
5395 $ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
5397 $ vms_cc_type="decc"
5399 $ d_faststdio="define"
5402 $ d_getenv_preserves_other_thread="define"
5403 $ d_locconv="define"
5405 $ d_mbstowcs="define"
5408 $ d_nl_langinfo="define"
5409 $ d_non_int_bitfields="define"
5410 $ d_setlocale="define"
5411 $ d_setlocale_accepts_any_locale_name="undef"
5412 $ d_stdiobase="define"
5413 $ d_stdio_cnt_lval="define"
5414 $ d_stdio_ptr_lval="define"
5415 $ d_stdstdio="define"
5416 $ d_strcoll="define"
5417 $ d_strxfrm="define"
5418 $ d_strxfrm_l="undef"
5419 $ i_langinfo="define"
5421 $ d_stdio_ptr_lval_sets_cnt="undef"
5422 $ d_stdio_ptr_lval_nochange_cnt="define"
5423 $ usefaststdio="undef"
5426 $ if Has_Dec_C_Sockets
5428 $ d_vms_do_sockets="define"
5431 $ d_sockpair = "undef"
5432 $ if (vms_ver .GES. "8.2")
5434 $ echo "Found 64 bit OpenVMS 8.2, will build with socketpair support"
5435 $ d_sockpair = "define"
5438 $ netdb_hlen_type="int"
5439 $ netdb_host_type="char *"
5440 $ netdb_name_type="char *"
5441 $ netdb_net_type="long"
5442 $ d_gethbyaddr="define"
5443 $ d_gethbyname="define"
5444 $ d_getnbyaddr="define"
5445 $ d_getnbyname="define"
5446 $ d_getpbynumber="define"
5447 $ d_getpbyname="define"
5448 $ d_getsbyport="define"
5449 $ d_getsbyname="define"
5450 $ d_gethostprotos="define"
5451 $ d_getnetprotos="define"
5452 $ d_getprotoprotos="define"
5453 $ d_getservprotos="define"
5454 $ socksizetype="size_t"
5456 $ d_vms_do_sockets="undef"
5459 $ d_socketpair = "undef"
5461 $ netdb_hlen_type="int"
5462 $ netdb_host_type="char *"
5463 $ netdb_name_type="char *"
5464 $ netdb_net_type="long"
5465 $ d_gethbyaddr="undef"
5466 $ d_gethbyname="undef"
5467 $ d_getnbyaddr="undef"
5468 $ d_getnbyname="undef"
5469 $ d_getpbynumber="undef"
5470 $ d_getpbyname="undef"
5471 $ d_getsbyport="undef"
5472 $ d_getsbyname="undef"
5473 $ d_gethostprotos="undef"
5474 $ d_getnetprotos="undef"
5475 $ d_getprotoprotos="undef"
5476 $ d_getservprotos="undef"
5477 $ socksizetype="undef"
5480 $ d_oldpthreads="undef"
5483 $ usethreads="define"
5484 $ d_pthreads_created_joinable="define"
5486 $ usethreads="undef"
5487 $ d_pthreads_created_joinable="undef"
5490 $! new (5.005_62++) typedefs for primitives
5492 $ echo "Choosing the C types to be used for Perl's internal types..."
5494 $ uvtype="unsigned long"
5496 $ u8type="unsigned char"
5498 $ u16type="unsigned short"
5500 $ u32type="unsigned int"
5501 $ i64type="long long"
5502 $ u64type="unsigned long long"
5505 $ IF use64bitint .OR. use64bitint .EQS. "define"
5507 $ ivtype = "''i64type'"
5508 $ uvtype = "''u64type'"
5513 $ doublemantbits = "52"
5514 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
5516 $ nvtype="long double"
5517 $ nvmantbits = longdblmantbits
5519 $ nvmantbits = doublemantbits
5523 $ GOSUB type_size_check
5525 $ IF ivtype .eqs. "long"
5526 $ THEN longsize = tmp
5529 $ GOSUB type_size_check
5534 $ GOSUB type_size_check
5538 $ GOSUB type_size_check
5542 $ GOSUB type_size_check
5545 $ tmp = "''i16type'"
5546 $ GOSUB type_size_check
5548 $ IF i16type .eqs. "short"
5549 $ THEN shortsize = tmp
5552 $ gosub type_size_check
5556 $ tmp = "''u16type'"
5557 $ GOSUB type_size_check
5560 $ tmp = "''i32type'"
5561 $ GOSUB type_size_check
5563 $ IF i32type .eqs. "int"
5564 $ THEN intsize = tmp
5567 $ gosub type_size_check
5571 $ tmp = "''u32type'"
5572 $ gosub type_size_check
5576 $ GOSUB type_size_check
5579 $ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
5580 $ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
5581 $ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
5583 $ d_nv_preserves_uv = "undef"
5584 $ echo4 "Checking how many bits of your UVs your NVs can preserve..."
5586 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5587 $ WS "#include <stdlib.h>"
5589 $ WS "#include <stdio.h>"
5591 $ WS " ''uvtype' u = 0;"
5592 $ WS " int n = 8 * ''uvsize';"
5594 $ WS " for (i = 0; i < n; i++) {"
5595 $ WS " u = u << 1 | (''uvtype')1;"
5596 $ WS " if ((''uvtype')(''nvtype')u != u)"
5599 $ WS " printf(""%d\n"", i);"
5604 $ nv_preserves_uv_bits = tmp
5605 $ IF F$INTEGER(nv_preserves_uv_bits) .GE. (F$INTEGER(uvsize) * 8)
5607 $ d_nv_preserves_uv = "define"
5608 $ echo "Your NVs can preserve all ''nv_preserves_uv_bits' bits of your UVs."
5610 $ d_nv_preserves_uv = "undef"
5611 $ echo "Your NVs can preserve only ''nv_preserves_uv_bits' bits of your UVs."
5614 $ nv_overflows_integers_at = "0"
5615 $ echo4 "Checking to find the largest integer value your NVs can hold..."
5617 $ WS "#include <stdio.h>"
5619 $ WS "typedef ''nvtype' NV;"
5623 $ WS " NV value = 2;"
5624 $ WS " int count = 1;"
5626 $ WS " while(count < 256) {"
5627 $ WS " volatile NV up = value + 1.0;"
5628 $ WS " volatile NV negated = -value;"
5629 $ WS " volatile NV down = negated - 1.0;"
5630 $ WS " volatile NV got_up = up - value;"
5631 $ WS " int up_good = got_up == 1.0;"
5632 $ WS " int got_down = down - negated;"
5633 $ WS " int down_good = got_down == -1.0;"
5635 $ WS " if (down_good != up_good) {"
5636 $ WS " fprintf(stderr,"
5637 $ WS " ""Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n"","
5638 $ WS " up_good, (double) got_up, down_good, (double) got_down,"
5639 $ WS " count, (double) value);"
5642 $ WS " if (!up_good) {"
5644 $ WS " if (count > 8) {"
5646 $ WS " fputs(""256.0"", stdout);"
5649 $ WS " fputs(""2.0"", stdout);"
5651 $ WS " if (!count) {"
5655 $ WS " fputs(""*"", stdout);"
5661 $ WS " fprintf(stderr, ""Cannot overflow integer range, even at 2**%d (%.20f)\n"","
5662 $ WS " count, (double) value);"
5667 $ IF F$LENGTH(tmp) .GT. 0
5669 $ IF F$EXTRACT(0,1,tmp) .EQS. "2"
5671 $ echo "The largest integer your NVs can preserve is equal to ''tmp'"
5672 $ nv_overflows_integers_at = tmp
5674 $ echo "Cannot determine the largest integer value your NVs can hold, unexpected output"
5678 $ echo "Cannot determine the largest integer value your NVs can hold"
5681 $! Check for signbit (must already know nvtype)
5683 $ echo4 "Checking to see if you have signbit() available to work on ''nvtype'..."
5685 $ WS "#if defined(__DECC) || defined(__DECCXX)"
5686 $ WS "#include <stdlib.h>"
5688 $ WS "#include <fp.h>"
5689 $ WS "#include <stdio.h>"
5692 $ WS " ''nvtype' x = 0.0;"
5693 $ WS " ''nvtype' y = -0.0;"
5694 $ WS " if ((signbit(x) == 0) && (signbit(y) != 0))"
5695 $ WS " printf(""1\n"");"
5697 $ WS " printf(""0\n"");"
5703 $ d_signbit = "define"
5706 $ d_signbit = "undef"
5710 $ echo4 "Checking if kill() uses SYS$FORCEX, can't be called from a signal handler,"
5711 $ echo4 "or fails to handle a signal value of zero..."
5712 $ kill_by_sigprc = "undef"
5714 $ WS "#include <stdio.h>"
5715 $ WS "#include <signal.h>"
5716 $ WS "#include <unistd.h>"
5717 $ WS "void handler1(int s) { printf(""%d"",s); kill(getpid(),2); }"
5718 $ WS "void handler2(int s) { printf(""%d"",s); }"
5720 $ WS " printf(""0"");"
5721 $ WS " signal(1,handler1);"
5722 $ WS " signal(2,handler2);"
5723 $ WS " kill(getpid(),1);"
5725 $ WS " kill(getpid(),0);"
5726 $ WS " printf(""3\n"");"
5729 $ ON ERROR THEN CONTINUE
5731 $ IF tmp .NES. "0123"
5733 $ echo4 "Yes, it has at least one of those limitations."
5734 $ echo4 "Checking whether we can use SYS$SIGPRC instead..."
5736 $ WS "#include <stdio.h>"
5737 $ WS "#include <lib$routines.h>"
5738 $ WS "unsigned long code = 0;"
5739 $ WS "#define sys$sigprc SYS$SIGPRC"
5740 $ WS "#ifdef __cplusplus"
5741 $ WS "extern ""C"" {"
5743 $ WS " int sys$sigprc(unsigned int *,void *,unsigned int);"
5744 $ WS "#ifdef __cplusplus"
5747 $ WS "int handler(unsigned long *args) {"
5748 $ WS " code = args[1];"
5753 $ WS " lib$establish(handler);"
5754 $ WS " iss = sys$sigprc(0,0,0x1234);"
5755 $ WS " iss = ((iss&1)==1 && code == 0x1234);"
5756 $ WS " printf(""%d\n"",iss);"
5759 $ ON ERROR THEN CONTINUE
5763 $ echo4 "Yep, we can."
5764 $ kill_by_sigprc = "define"
5767 $ echo4 "Nope, we can't."
5770 $ echo4 "Nope, it doesn't."
5774 $! Finally the composite ones. All config
5776 $ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
5778 $ IF ccname .EQS. "DEC"
5780 $ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
5782 $ IF ccname .EQS. "CXX"
5784 $ ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
5786 $ IF use_vmsdebug_perl
5788 $ optimize="/List/Debug/NoOpt"
5789 $ ldflags="/Debug/Trace/Map"
5792 $ optimize= "/NoList"
5793 $ ldflags="/NoTrace/NoMap"
5797 $! Okay, we've got everything configured. Now go write out a config.sh.
5798 $ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
5799 $ echo4 "Creating ''basename_config_sh'..."
5800 $ open/write CONFIG 'config_sh'
5801 $ WC := write CONFIG
5803 $! ##BEGIN WRITE NEW CONSTANTS HERE##
5807 $ WC "# This file was produced by Configure.COM on a ''osname' system."
5809 $ WC "# Package name : ''package'"
5810 $ WC "# Source directory : ''src'"
5811 $ WC "# Configuration time: " + cf_time
5812 $ WC "# Configuration by : " + cf_by
5813 $ WC "# Target system : " + myuname
5815 $ WC "Makefile_SH='" + Makefile_SH + "'"
5816 $ WC "Mcc='" + Mcc + "'"
5817 $ WC "PERL_REVISION='" + revision + "'"
5818 $ WC "PERL_VERSION='" + patchlevel + "'"
5819 $ WC "PERL_SUBVERSION='" + subversion + "'"
5820 $ WC "PERL_API_REVISION='" + api_revision + "'"
5821 $ WC "PERL_API_VERSION='" + api_version + "'"
5822 $ WC "PERL_API_SUBVERSION='" + api_subversion + "'"
5823 $ WC "PERL_PATCHLEVEL='" + perl_patchlevel + "'"
5824 $ WC "perl_patchlevel='" + perl_patchlevel + "'"
5825 $ WC "PERL_CONFIG_SH='true'"
5826 $ WC "_a='" + lib_ext + "'"
5827 $ WC "_exe='" + exe_ext + "'"
5828 $ WC "_o='" + obj_ext + "'"
5830 $ WC "afsroot='/afs'"
5831 $ WC "alignbytes='" + alignbytes + "'"
5832 $ WC "aphostname='write sys$output f$edit(f$getsyi(\""SCSNODE\""),\""TRIM,LOWERCASE\"")'"
5833 $ WC "api_revision='" + api_revision + "'"
5834 $ WC "api_subversion='" + api_subversion + "'"
5835 $ WC "api_version='" + api_version + "'"
5836 $ WC "api_versionstring='" + version + "'"
5838 $ WC "archlib='" + archlib + "'"
5839 $ WC "archlibexp='" + archlibexp + "'"
5840 $ WC "archname='" + archname + "'"
5841 $ WC "baserev='" + baserev + "'"
5842 $ WC "bin='" + bin + "'"
5843 $ WC "binexp='" + binexp + "'"
5844 $ WC "bootstrap_charset='undef'"
5845 $ WC "builddir='" + builddir + "'"
5846 $ WC "byteorder='1234'"
5847 $ WC "castflags='0'"
5848 $ WC "cc='" + perl_cc + "'"
5849 $ WC "cccdlflags='" + cccdlflags + "'"
5850 $ WC "ccdlflags='" + ccdlflags + "'"
5851 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
5853 $ IF usestdstat .OR. usestdstat .EQS. "define"
5855 $ ccdefines = "_USE_STD_STAT=1"
5857 $ ccdefines = "_LARGEFILE=1"
5862 $ IF ccdefines .NES. ""
5864 $ WC "ccflags='" + ccflags + "/Define=" + ccdefines + "'"
5866 $ WC "ccflags='" + ccflags + "'"
5868 $ WC "ccflags_uselargefiles='" + "'"
5869 $ WC "ccname='" + ccname + "'"
5870 $ WC "ccversion='" + ccversion + "'"
5871 $ WC "cf_by='" + cf_by + "'"
5872 $ WC "cf_email='" + cf_email + "'"
5873 $ WC "cf_time='" + cf_time + "'"
5875 $ WC "config_args='" + config_args + "'"
5876 $ WC "config_sh='" + config_sh + "'"
5877 $ WC "cpp_stuff='" + cpp_stuff + "'"
5878 $ WC "cpplast='" + cpplast + "'"
5879 $ WC "cppminus='" + cppminus + "'"
5880 $ WC "cpprun='" + cpprun + "'"
5881 $ WC "cppstdin='" + cppstdin + "'"
5882 $ IF use64bitint .OR. use64bitint .EQS. "define"
5884 $! gcvt() does not work for > 16 decimal places; fallback to sprintf
5885 $ WC "d_Gconvert='sprintf((b),""%.*" + (nvgformat-"""") + ",(n),(x))'"
5887 $ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
5889 $ WC "d_PRIEUldbl='" + d_PRIEUldbl + "'"
5890 $ WC "d_PRIFUldbl='" + d_PRIFUldbl + "'"
5891 $ WC "d_PRIGUldbl='" + d_PRIGUldbl + "'"
5892 $ WC "d_PRIXU64='" + d_PRIXU64 + "'"
5893 $ WC "d_PRId64='" + d_PRId64 + "'"
5894 $ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
5895 $ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
5896 $ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
5897 $ WC "d_PRIi64='" + d_PRIi64 + "'"
5898 $ WC "d_PRIo64='" + d_PRIo64 + "'"
5899 $ WC "d_PRIu64='" + d_PRIu64 + "'"
5900 $ WC "d_PRIx64='" + d_PRIx64 + "'"
5901 $ WC "d_SCNfldbl='" + d_SCNfldbl + "'"
5902 $ WC "d__fwalk='undef'"
5903 $ WC "d_accept4='undef'"
5904 $ WC "d_access='" + d_access + "'"
5905 $ WC "d_accessx='undef'"
5906 $ WC "d_acosh='" + d_acosh + "'"
5907 $ WC "d_aintl='undef'"
5908 $ WC "d_alarm='define'"
5909 $ WC "d_archlib='define'"
5910 $ WC "d_asctime64='undef'"
5911 $ WC "d_asinh='" + d_asinh + "'"
5912 $ WC "d_atanh='" + d_atanh + "'"
5913 $ WC "d_atolf='" + d_atolf + "'"
5914 $ WC "d_atoll='" + d_atoll + "'"
5915 $ WC "d_attribute_always_inline='undef'"
5916 $ WC "d_attribute_format='" + d_attribut + "'"
5917 $ WC "d_attribute_deprecated='undef'"
5918 $ WC "d_attribute_malloc='undef'"
5919 $ WC "d_attribute_nonnull='undef'"
5920 $ WC "d_attribute_noreturn='undef'"
5921 $ WC "d_attribute_pure='undef'"
5922 $ WC "d_attribute_unused='undef'"
5923 $ WC "d_attribute_visibility='undef'"
5924 $ WC "d_attribute_warn_unused_result='undef'"
5925 $ WC "d_prctl='undef'"
5926 $ WC "d_prctl_set_name='undef'"
5927 $ WC "d_printf_format_null='undef'"
5928 $ WC "d_bincompat3='undef'"
5929 $ WC "d_bsd='undef'"
5930 $ WC "d_bsdgetpgrp='undef'"
5931 $ WC "d_bsdsetpgrp='undef'"
5932 $ WC "d_builtin_choose_expr='undef'" ! GCC only
5933 $ WC "d_builtin_expect='undef'" ! GCC only
5934 $ WC "d_builtin_add_overflow='undef'" ! GCC only
5935 $ WC "d_builtin_mul_overflow='undef'" ! GCC only
5936 $ WC "d_builtin_sub_overflow='undef'" ! GCC only
5937 $ WC "d_casti32='define'"
5938 $ WC "d_castneg='define'"
5939 $ WC "d_cbrt='" + d_cbrt + "'"
5940 $ WC "d_chown='define'"
5941 $ WC "d_chroot='undef'"
5942 $ WC "d_chsize='undef'"
5943 $ WC "d_class='undef'"
5944 $ WC "d_closedir='define'"
5945 $ WC "d_cmsghdr_s='undef'"
5946 $ WC "d_copysign='" + d_copysign + "'"
5947 $ WC "d_copysignl='define'"
5948 $ WC "d_cplusplus='" + d_cplusplus + "'"
5949 $ WC "d_crypt='define'"
5950 $ WC "d_csh='undef'"
5951 $ WC "d_ctermid='define'"
5952 $ WC "d_ctime64='undef'"
5953 $ WC "d_cuserid='define'"
5954 $ WC "d_c99_variadic_macros='undef'"
5955 $ WC "d_dbl_dig='define'"
5956 $ WC "d_dbminitproto='undef'"
5957 $ WC "d_difftime='define'"
5958 $ WC "d_difftime64='undef'"
5959 $ WC "d_dir_dd_fd='undef'"
5960 $ WC "d_dirfd='undef'"
5961 $ WC "d_dirnamlen='define'"
5962 $ WC "d_dladdr='undef'"
5963 $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.2")
5965 $ WC "d_dlerror='define'"
5966 $ WC "d_dlopen='define'"
5968 $ WC "d_dlerror='undef'"
5969 $ WC "d_dlopen='undef'"
5971 $ WC "d_dlsymun='undef'"
5972 $ WC "d_backtrace='undef'"
5973 $ WC "d_dosuid='undef'"
5974 $ WC "d_double_has_inf='" + d_double_has_inf + "'"
5975 $ WC "d_double_has_nan='" + d_double_has_nan + "'"
5976 $ WC "d_double_has_negative_zero='" + d_double_has_negative_zero + "'"
5977 $ WC "d_double_has_subnormals='" + d_double_has_subnormals + "'"
5978 $ WC "d_double_style_cray='undef'"
5979 $ WC "d_double_style_ibm='undef'"
5980 $ WC "d_double_style_ieee='" + d_double_style_ieee + "'"
5981 $ WC "d_double_style_vax='" + d_double_style_vax + "'"
5982 $ WC "d_drand48proto='" + d_drand48proto + "'"
5983 $ WC "d_dup2='define'"
5984 $ WC "d_dup3='undef'"
5985 $ WC "d_duplocale='undef'"
5986 $ WC "d_eaccess='undef'"
5987 $ WC "d_endgrent='define'"
5988 $ WC "d_endhent='" + d_endhent + "'"
5989 $ WC "d_endnent='" + d_endnent + "'"
5990 $ WC "d_endpent='" + d_endpent + "'"
5991 $ WC "d_endpwent='define'"
5992 $ WC "d_endsent='" + d_endsent + "'"
5993 $ WC "d_eofnblk='undef'"
5994 $ WC "d_erf='" + d_erf + "'"
5995 $ WC "d_erfc='" + d_erfc + "'"
5996 $ WC "d_eunice='undef'"
5997 $ WC "d_exp2='" + d_exp2 + "'"
5998 $ WC "d_expm1='" + d_expm1 + "'"
5999 $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."8.3")
6001 $ WC "d_fchmod='define'"
6003 $ WC "d_fchmod='undef'"
6005 $ WC "d_fchdir='undef'"
6006 $ WC "d_fchown='define'"
6007 $ WC "d_fcntl='" + d_fcntl + "'"
6008 $ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
6009 $ WC "d_fd_set='" + d_fd_set + "'"
6010 $ WC "d_fd_macros='define'"
6011 $ WC "d_fdclose='undef'"
6012 $ WC "d_fdim='" + d_fdim + "'"
6013 $ WC "d_fds_bits='define'"
6014 $ WC "d_fegetround='undef'"
6015 $ WC "d_ffs='undef'"
6016 $ WC "d_ffsl='undef'"
6017 $ WC "d_fgetpos='define'"
6020 $ WC "d_finite='define'"
6021 $ WC "d_finitel='define'"
6023 $ WC "d_finite='undef'"
6024 $ WC "d_finitel='undef'"
6026 $ WC "d_flexfnam='define'"
6027 $ WC "d_flock='undef'"
6028 $ WC "d_flockproto='undef'"
6029 $ WC "d_fma='" + d_fma + "'"
6030 $ WC "d_fmax='" + d_fmax + "'"
6031 $ WC "d_fmin='" + d_fmin + "'"
6032 $ WC "d_fork='undef'"
6033 $ WC "d_fp_class='undef'"
6034 $ WC "d_fp_classify='" + d_fp_classify + "'"
6035 $ WC "d_fp_classify='undef'"
6036 $ WC "d_fp_classl='undef'"
6037 $ WC "d_fpathconf='" + d_fpathconf + "'"
6038 $ WC "d_fpclass='undef'"
6039 $ WC "d_fpclassify='" + d_fpclassify + "'"
6040 $ WC "d_fpclassl='undef'"
6041 $ WC "d_fpgetround='undef'"
6042 $ WC "d_fpos64_t='" + d_fpos64_t + "'"
6043 $ WC "d_frexpl='" + d_frexpl + "'"
6044 $ WC "d_fs_data_s='undef'"
6045 $ WC "d_fseeko='" + d_fseeko + "'"
6046 $ WC "d_fsetpos='define'"
6047 $ WC "d_fstatfs='undef'"
6048 $ WC "d_fstatvfs='" + d_fstatvfs + "'"
6049 $ WC "d_fsync='define'"
6050 $ WC "d_ftello='" + d_ftello + "'"
6051 $ WC "d_ftime='define'"
6052 $ WC "d_futimes='undef'"
6053 $ WC "d_gdbmndbm_h_uses_prototypes='undef'"
6054 $ WC "d_gdbm_ndbm_h_uses_prototypes='undef'"
6055 $ WC "d_getaddrinfo='define'"
6056 $ WC "d_getcwd='define'"
6057 $ WC "d_getespwnam='undef'"
6058 $ WC "d_getfsstat='undef'"
6059 $ WC "d_getgrent='define'"
6060 $ WC "d_getgrps='undef'"
6061 $ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
6062 $ WC "d_gethbyname='" + d_gethbyname + "'"
6063 $ WC "d_gethent='" + d_gethent + "'"
6064 $ WC "d_gethname='" + d_gethname + "'"
6065 $ WC "d_gethostprotos='" + d_gethostprotos + "'"
6066 $ WC "d_getitimer='" + d_getitimer + "'"
6067 $ WC "d_getlogin='define'"
6068 $ WC "d_getmnt='undef'"
6069 $ WC "d_getmntent='undef'"
6070 $ WC "d_getnameinfo='define'"
6071 $ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
6072 $ WC "d_getnbyname='" + d_getnbyname + "'"
6073 $ WC "d_getnent='" + d_getnent + "'"
6074 $ WC "d_getnetprotos='" + d_getnetprotos + "'"
6075 $ WC "d_getpagsz='undef'"
6076 $ WC "d_getpbyname='" + d_getpbyname + "'"
6077 $ WC "d_getpbynumber='" + d_getpbynumber + "'"
6078 $ WC "d_getpent='" + d_getpent + "'"
6079 $ WC "d_getpgid='" + d_getpgid + "'"
6080 $ WC "d_getpgrp2='undef'"
6081 $ WC "d_getpgrp='" + d_getpgrp + "'"
6082 $ WC "d_getppid='" + d_getppid + "'"
6083 $ WC "d_getprior='undef'"
6084 $ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
6085 $ WC "d_getprpwnam='undef'"
6086 $ WC "d_getpwent='define'"
6087 $ WC "d_getsbyname='" + d_getsbyname + "'"
6088 $ WC "d_getsbyport='" + d_getsbyport + "'"
6089 $ WC "d_getsent='" + d_getsent + "'"
6090 $ WC "d_getservprotos='" + d_getservprotos + "'"
6091 $ WC "d_getspnam='undef'"
6092 $ WC "d_gettimeod='" + d_gettimeod + "'"
6093 $ WC "d_gmtime64='undef'"
6094 $ WC "d_gnulibc='undef'"
6095 $ WC "d_grpasswd='undef'"
6096 $ WC "d_hasmntopt='undef'"
6097 $ WC "d_htonl='" + d_htonl + "'"
6098 $ WC "d_hypot='" + d_hypot + "'"
6099 $ WC "d_ilogb='" + d_ilogb + "'"
6100 $ WC "d_ilogbl='undef'"
6101 $ WC "d_inc_version_list='undef'"
6102 $ WC "d_index='" + d_index + "'"
6103 $ WC "d_inetaton='define'"
6104 $ WC "d_inetntop='define'"
6105 $ WC "d_inetpton='define'"
6106 $ WC "d_int64_t='" + d_int64_t + "'"
6107 $ WC "d_ip_mreq='define'"
6108 $ WC "d_ip_mreq_source='undef'"
6109 $ WC "d_ipv6_mreq='define'"
6110 $ WC "d_ipv6_mreq_source='undef'"
6111 $ WC "d_isascii='define'"
6112 $ WC "d_isblank='" + d_isblank + "'"
6113 $ WC "d_isfinite='undef'"
6114 $ WC "d_isfinitel='undef'"
6115 $ WC "d_isinf='undef'"
6116 $ WC "d_isinfl='undef'"
6117 $ WC "d_isless='" + d_isless + "'"
6118 $ WC "d_isnan='" + d_isnan + "'"
6119 $ WC "d_isnanl='" + d_isnanl + "'"
6120 $ WC "d_isnormal='" + d_isnormal + "'"
6121 $ WC "d_j0='" + d_j0 + "'"
6122 $ WC "d_j0l='undef'"
6123 $ WC "d_killpg='define'"
6124 $ WC "d_lchown='" + d_lchown + "'"
6125 $ WC "d_ldbl_dig='define'"
6126 $ WC "d_ldexpl='" + d_ldexpl + "'"
6127 $ WC "d_lgamma='" + d_lgamma + "'"
6128 $ WC "d_libm_lib_version='undef'"
6129 $ WC "d_link='" + d_link + "'"
6130 $ WC "d_llrint='" + d_llrint + "'"
6131 $ WC "d_llrintl='" + d_llrintl + "'"
6132 $ WC "d_llround='" + d_llround + "'"
6133 $ WC "d_llroundl='" + d_llroundl + "'"
6134 $ WC "d_llseek='undef'"
6135 $ WC "d_localeconv_l='undef'"
6136 $ WC "d_localtime64='undef'"
6137 $ WC "d_locconv='" + d_locconv + "'"
6138 $ WC "d_lc_monetary_2008='undef'"
6139 $ WC "d_lockf='undef'"
6140 $ WC "d_log1p='" + d_log1p + "'"
6141 $ WC "d_log2='" + d_log2 + "'"
6142 $ WC "d_logb='" + d_logb + "'"
6143 $ WC "d_long_double_style_ieee='" + d_long_double_style_ieee + "'"
6144 $ WC "d_long_double_style_ieee_doubledouble='undef'"
6145 $ WC "d_long_double_style_ieee_extended='" + d_long_double_style_ieee_extended + "'"
6146 $ WC "d_long_double_style_ieee_std='" + d_long_double_style_ieee_std + "'"
6147 $ WC "d_long_double_style_vax='" + d_long_double_style_vax + "'"
6148 $ WC "d_longdbl='" + d_longdbl + "'"
6149 $ WC "d_longlong='" + d_longlong + "'"
6150 $ WC "d_lrint='" + d_lrint + "'"
6151 $ WC "d_lrintl='" + d_lrintl + "'"
6152 $ WC "d_lround='" + d_lround + "'"
6153 $ WC "d_lroundl='" + d_lroundl + "'"
6154 $ WC "d_lseekproto='define'"
6155 $ WC "d_lstat='" + d_lstat + "'"
6156 $ WC "d_madvise='undef'"
6157 $ WC "d_malloc_size='undef'"
6158 $ WC "d_malloc_good_size='undef'"
6159 $ WC "d_mblen='" + d_mblen + "'"
6160 $ WC "d_mbrlen='define'"
6161 $ WC "d_mbrtowc='define'"
6162 $ WC "d_mbstowcs='" + d_mbstowcs + "'"
6163 $ WC "d_mbtowc='" + d_mbtowc + "'"
6164 $ WC "d_memmem='undef'"
6165 $ WC "d_memrchr='" + d_memrchr + "'"
6166 $ WC "d_mkdir='define'"
6167 $ WC "d_mkdtemp='" + d_mkdtemp + "'"
6168 $ WC "d_mkfifo='undef'"
6169 $ WC "d_mknod='undef'"
6170 $ WC "d_mkostemp='undef'"
6171 $ WC "d_mkostemp='" + d_mkostemp + "'"
6172 $ WC "d_mkstemp='" + d_mkstemp + "'"
6173 $ WC "d_mkstemps='" + d_mkstemps + "'"
6174 $ WC "d_mktime='" + d_mktime + "'"
6175 $ WC "d_mktime64='undef'"
6176 $ WC "d_mmap='" + d_mmap + "'"
6177 $ WC "d_modfl='" + d_modfl + "'"
6178 $ WC "d_modflproto='" + d_modflproto + "'"
6179 $ WC "d_modfl_pow32_bug='undef'"
6180 $ WC "d_mprotect='" + d_mprotect + "'"
6181 $ WC "d_msg='undef'"
6182 $ WC "d_msgctl='undef'"
6183 $ WC "d_msgget='undef'"
6184 $ WC "d_msgrcv='undef'"
6185 $ WC "d_msgsnd='undef'"
6186 $ WC "d_msg_ctrunc='undef'"
6187 $ WC "d_msg_dontroute='undef'"
6188 $ WC "d_msg_oob='undef'"
6189 $ WC "d_msg_peek='undef'"
6190 $ WC "d_msg_proxy='undef'"
6191 $ WC "d_msghdr_s='undef'"
6192 $ WC "d_msync='" + d_msync + "'"
6193 $ WC "d_munmap='" + d_munmap + "'"
6194 $ WC "d_mymalloc='" + d_mymalloc + "'"
6195 $ WC "d_nan='undef'"
6196 $ WC "d_nanosleep='" + d_nanosleep + "'"
6197 $ WC "d_ndbm='undef'"
6198 $ WC "d_ndbm_h_uses_prototypes='undef'"
6199 $ WC "d_nearbyint='" + d_nearbyint + "'"
6200 $ WC "d_nextafter='" + d_nextafter + "'"
6201 $ WC "d_nexttoward='" + d_nexttoward + "'"
6202 $ WC "d_nice='define'"
6203 $ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
6204 $ WC "d_nl_langinfo_l='undef'"
6205 $ WC "d_non_int_bitfields='define'"
6206 $ WC "d_getenv_preserves_other_thread='" + d_getenv_preserves_other_thread + "'"
6207 $ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
6208 $ WC "nv_overflows_integers_at='" + nv_overflows_integers_at + "'"
6209 $ WC "nv_preserves_uv_bits='" + nv_preserves_uv_bits + "'"
6210 $ WC "d_nv_zero_is_allbits_zero='define'"
6211 $ WC "d_off64_t='" + d_off64_t + "'"
6212 $ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
6213 $ WC "d_oldarchlib='define'"
6214 $ WC "d_oldpthreads='" + d_oldpthreads + "'"
6215 $ WC "d_oldsock='undef'"
6216 $ WC "d_open3='define'"
6217 $ WC "d_openat='undef'"
6218 $ WC "d_perl_lc_all_category_positions_init='define'"
6219 $ WC "d_perl_lc_all_separator='undef'"
6220 $ WC "d_perl_lc_all_uses_name_value_pairs='undef'"
6221 $ WC "perl_lc_all_category_positions_init='{ 0, 1, 5, 2, 3, 4 }'"
6222 $ WC "d_unlinkat='undef'"
6223 $ WC "d_renameat='undef'"
6224 $ WC "d_linkat='undef'"
6225 $ WC "d_fchmodat='undef'"
6226 $ WC "d_pathconf='" + d_pathconf + "'"
6227 $ WC "d_pause='define'"
6228 $ WC "d_perl_otherlibdirs='undef'"
6229 $ WC "d_phostname='" + d_phostname + "'"
6230 $ WC "d_pipe='define'"
6231 $ WC "d_pipe2='undef'"
6232 $ WC "d_poll='" + d_poll + "'"
6233 $ WC "d_portable='define'"
6234 $ WC "d_procselfexe='undef'"
6235 $ WC "d_pseudofork='undef'"
6236 $ WC "d_pthread_atfork='undef'"
6237 $ WC "d_pthread_attr_setscope='" + d_pthread_attr_setscope + "'"
6238 $ WC "d_pthread_yield='" + d_pthread_yield + "'"
6239 $ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
6240 $ WC "d_ptrdiff_t='define'"
6241 $ WC "d_pwage='undef'"
6242 $ WC "d_pwchange='undef'"
6243 $ WC "d_pwclass='undef'"
6244 $ WC "d_pwcomment='define'"
6245 $ WC "d_pwexpire='undef'"
6246 $ WC "d_pwgecos='define'"
6247 $ WC "d_pwpasswd='define'"
6248 $ WC "d_pwquota='undef'"
6249 $ WC "d_qgcvt='undef'"
6250 $ WC "d_quad='" + d_quad + "'"
6251 $ WC "d_re_comp='undef'"
6252 $ WC "d_readdir='define'"
6253 $ WC "d_readlink='" + d_readlink + "'"
6254 $ WC "d_readv='define'"
6255 $ WC "d_realpath='" + d_realpath + "'"
6256 $ WC "d_recvmsg='define'"
6257 $ WC "d_regcmp='undef'"
6258 $ WC "d_regcomp='undef'"
6259 $ WC "d_remainder='" + d_remainder + "'"
6260 $ WC "d_remquo='" + d_remquo + "'"
6261 $ WC "d_rename='define'"
6262 $ WC "d_rewinddir='define'"
6263 $ WC "d_rint='" + d_rint + "'"
6264 $ WC "d_rmdir='define'"
6265 $ WC "d_round='" + d_round + "'"
6266 $ WC "d_sbrkproto='define'"
6267 $ WC "d_scalbn='" + d_scalbn + "'"
6268 $ WC "d_scalbnl='" + d_scalbnl + "'"
6269 $ WC "d_sched_yield='" + d_sched_yield + "'"
6270 $ WC "d_scm_rights='undef'"
6271 $ WC "d_seekdir='define'"
6272 $ WC "d_select='" + d_select + "'"
6273 $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."8.4")
6275 $ WC "d_sem='define'"
6276 $ WC "d_semctl='define'"
6277 $ WC "d_semctl_semid_ds='define'"
6278 $ WC "d_semctl_semun='define'"
6279 $ WC "d_semget='define'"
6280 $ WC "d_semop='define'"
6282 $ WC "d_sem='undef'"
6283 $ WC "d_semctl='undef'"
6284 $ WC "d_semctl_semid_ds='undef'"
6285 $ WC "d_semctl_semun='undef'"
6286 $ WC "d_semget='undef'"
6287 $ WC "d_semop='undef'"
6289 $ WC "d_sendmsg='define'"
6290 $ WC "d_setegid='undef'"
6291 $ WC "d_setenv='" + d_setenv + "'"
6292 $ WC "d_seteuid='" + d_seteuid + "'"
6293 $ WC "d_setgrent='" + d_setgrent + "'"
6294 $ WC "d_setgrps='undef'"
6295 $ WC "d_sethent='" + d_sethent + "'"
6296 $ WC "d_setitimer='" + d_setitimer + "'"
6297 $ WC "d_setlinebuf='undef'"
6298 $ WC "d_setlocale='" + d_setlocale + "'"
6299 $ WC "d_setlocale_accepts_any_locale_name='" + d_setlocale_accepts_any_locale_name + "'"
6300 $ WC "d_setnent='" + d_setnent + "'"
6301 $ WC "d_setpent='" + d_setpent + "'"
6302 $ WC "d_setpgid='" + d_setpgid + "'"
6303 $ WC "d_setpgrp2='undef'"
6304 $ WC "d_setpgrp='" + d_setpgrp + "'"
6305 $ WC "d_setprior='undef'"
6306 $ WC "d_setproctitle='" + d_setproctitle + "'"
6307 $ WC "d_setpwent='define'"
6308 $ WC "d_setregid='" + d_setregid + "'"
6309 $ WC "d_setresgid='undef'"
6310 $ WC "d_setresuid='undef'"
6311 $ WC "d_setreuid='" + d_setreuid + "'"
6312 $ WC "d_setrgid='undef'"
6313 $ WC "d_setruid='undef'"
6314 $ WC "d_setsent='" + d_setsent + "'"
6315 $ WC "d_setsid='" + d_setsid + "'"
6316 $ WC "d_setvbuf='" + d_setvbuf + "'"
6317 $ WC "d_shm='" + d_shm + "'"
6318 $ WC "d_shmat='" + d_shmat + "'"
6319 $ WC "d_shmatprototype='" + d_shmatprototype + "'"
6320 $ WC "d_shmctl='" + d_shmctl + "'"
6321 $ WC "d_shmdt='" + d_shmdt + "'"
6322 $ WC "d_shmget='" + d_shmget + "'"
6323 $ WC "d_sigaction='" + d_sigaction + "'"
6324 $ WC "d_siginfo_si_addr='" + d_siginfo_si_addr + "'"
6325 $ WC "d_siginfo_si_band='" + d_siginfo_si_band + "'"
6326 $ WC "d_siginfo_si_errno='" + d_siginfo_si_errno + "'"
6327 $ WC "d_siginfo_si_fd='" + d_siginfo_si_fd + "'"
6328 $ WC "d_siginfo_si_pid='" + d_siginfo_si_pid + "'"
6329 $ WC "d_siginfo_si_status='" + d_siginfo_si_status + "'"
6330 $ WC "d_siginfo_si_uid='" + d_siginfo_si_uid + "'"
6331 $ WC "d_siginfo_si_value='" + d_siginfo_si_value + "'"
6332 $ WC "d_signbit='" + d_signbit + "'"
6333 $ WC "d_sigprocmask='" + d_sigprocmask + "'"
6334 $ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
6335 $ WC "d_sin6_scope_id='" + d_sin6_scope_id + "'"
6336 $ WC "d_sitearch='define'"
6337 $ WC "d_sockaddr_in6='define'"
6338 $ WC "d_sockaddr_sa_len='" + d_sockaddr_sa_len + "'"
6339 $ WC "d_sockaddr_storage='undef'"
6340 $ WC "d_sockatmark='undef'"
6341 $ WC "d_sockatmarkproto='undef'"
6342 $ WC "d_socket='" + d_socket + "'"
6343 $ WC "d_socklen_t='" + d_socklen_t + "'"
6344 $ WC "d_sockpair='" + d_sockpair + "'"
6345 $ WC "d_socks5_init='undef'"
6346 $ WC "d_sqrtl='define'"
6347 $ WC "d_sresgproto='undef'"
6348 $ WC "d_sresgproto='undef'"
6349 $ WC "d_sresproto='undef'"
6350 $ WC "d_sresuproto='undef'"
6351 $ WC "d_stat='define'"
6352 $ WC "d_statblks='undef'"
6353 $ WC "d_statfs_f_flags='undef'"
6354 $ WC "d_statfs_s='undef'"
6355 $ WC "d_statfsflags='undef'"
6356 $ WC "d_static_inline='define'"
6357 $ WC "d_thread_local='undef'" ! see perl_thread_local
6358 $ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
6359 $ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
6360 $ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'"
6361 $ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'"
6362 $ WC "d_stdio_stream_array='undef'"
6363 $ WC "d_stdiobase='" + d_stdiobase + "'"
6364 $ WC "d_stdstdio='" + d_stdstdio + "'"
6365 $ WC "d_faststdio='" + d_faststdio + "'"
6366 $ WC "d_statvfs='" + d_statvfs + "'"
6367 $ WC "d_strcoll='" + d_strcoll + "'"
6368 $ WC "d_strftime='define'"
6369 $ WC "d_strlcat='undef'"
6370 $ WC "d_strlcpy='undef'"
6371 $ WC "d_strnlen='" + d_strnlen + "'"
6372 $ WC "d_strtod='define'"
6373 $ WC "d_strtod_l='undef'"
6374 $ WC "d_strtol='define'"
6375 $ WC "d_strtold='" + d_strtold + "'"
6376 $ WC "d_strtold_l='undef'"
6377 $ WC "d_strtoll='" + d_strtoll + "'"
6378 $ WC "d_strtoq='" + d_strtoq + "'"
6379 $ WC "d_strtoul='define'"
6380 $ WC "d_strtoull='" + d_strtoull + "'"
6381 $ WC "d_strtouq='" + d_strtouq + "'"
6382 $ WC "d_strxfrm='" + d_strxfrm + "'"
6383 $ WC "d_strxfrm_l='" + d_strxfrm_l + "'"
6384 $ WC "d_suidsafe='undef'"
6385 $ WC "d_symlink='" + d_symlink + "'"
6386 $ WC "d_syscall='undef'"
6387 $ WC "d_syscallproto='undef'"
6388 $ WC "d_sysconf='" + d_sysconf + "'"
6389 $ WC "d_sysernlst='undef'"
6390 $ WC "d_syserrlst='undef'"
6391 $ WC "d_system='define'"
6392 $ WC "d_tcgetpgrp='undef'"
6393 $ WC "d_tcsetpgrp='undef'"
6394 $ WC "d_telldir='define'"
6395 $ WC "d_telldirproto='define'"
6396 $ WC "d_tgamma='" + d_tgamma + "'"
6397 $ WC "d_thread_safe_nl_langinfo_l='undef'"
6398 $ WC "d_time='define'"
6399 $ WC "d_timegm='undef'"
6400 $ WC "d_times='define'"
6401 $ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.0")
6403 $ WC "d_tm_tm_gmtoff='define'"
6404 $ WC "d_tm_tm_zone='define'"
6406 $ WC "d_tm_tm_gmtoff='undef'"
6407 $ WC "d_tm_tm_zone='undef'"
6409 $ WC "d_truncate='" + d_truncate + "'"
6410 $ WC "d_trunc='" + d_trunc + "'"
6411 $ WC "d_truncl='" + d_truncl + "'"
6412 $ WC "d_tzname='" + d_tzname + "'"
6413 $ WC "d_u32align='define'"
6414 $ WC "d_ualarm='" + d_ualarm + "'"
6415 $ WC "d_umask='define'"
6416 $ WC "d_uname='" + d_uname + "'"
6417 $ WC "d_union_semun='undef'"
6418 $ WC "d_unlink_all_versions='" + d_unlink_all_versions + "'" ! VMS-specific
6419 $ WC "d_unordered='undef'"
6420 $ WC "d_unsetenv='" + d_unsetenv + "'"
6421 $ WC "d_clearenv='" + d_clearenv + "'"
6422 $ WC "d_usleep='" + d_usleep + "'"
6423 $ WC "d_usleepproto='" + d_usleep + "'"
6424 $ WC "d_ustat='undef'"
6425 $ WC "d_vendorarch='undef'"
6426 $ WC "d_vendorbin='undef'"
6427 $ WC "d_vendorlib='undef'"
6428 $ WC "d_vendorscript='undef'"
6429 $ WC "d_vfork='define'"
6430 $ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
6431 $ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
6432 $ WC "d_vms_shorten_long_symbols='" + d_vms_shorten_long_symbols + "'" ! VMS
6433 $ WC "d_void_closedir='define'"
6434 $ WC "d_voidsig='undef'"
6435 $ WC "d_voidtty='" + "'"
6436 $ WC "d_vsnprintf='" + d_vsnprintf + "'"
6437 $ WC "d_wait4='" + d_wait4 + "'"
6438 $ WC "d_waitpid='define'"
6439 $ WC "d_wcrtomb='define'"
6440 $ WC "d_wcscmp='define'"
6441 $ WC "d_wcstombs='define'"
6442 $ WC "d_wcsxfrm='define'"
6443 $ WC "d_wctomb='define'"
6444 $ WC "d_writev='define'"
6445 $ WC "d_xenix='undef'"
6446 $ WC "db_hashtype=' '"
6447 $ WC "db_prefixtype=' '"
6448 $ WC "db_version_major='" + "'"
6449 $ WC "db_version_minor='" + "'"
6450 $ WC "db_version_patch='" + "'"
6451 $ WC "dbgprefix='" + dbgprefix + "'"
6452 $ WC "devtype='" + devtype + "'"
6453 $ WC "default_inc_excludes_dot='" + default_inc_excludes_dot + "'"
6454 $ WC "direntrytype='struct dirent'"
6455 $ WC "dlext='" + dlext + "'"
6456 $ WC "dlobj='" + dlobj + "'"
6457 $ WC "dlsrc='dl_vms.xs'"
6458 $ WC "doublekind='3'"
6459 $ WC "doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'"
6460 $ WC "doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f'"
6461 $ WC "doublemantbits='" + doublemantbits + "'"
6462 $ WC "doublesize='" + doublesize + "'"
6463 $ WC "drand01='" + drand01 + "'"
6464 $ WC "dtrace='" + "'"
6466 $! The dynamic_ext symbol may be quite long
6468 $ tmp = "dynamic_ext='" + dynamic_ext + "'"
6472 $ WC "ebcdic='undef'"
6473 $ WC "embedmymalloc='" + usemymalloc + "'"
6474 $ WC "eunicefix=':'"
6475 $ WC "exe_ext='" + exe_ext + "'"
6477 $! The extensions symbols may be quite long
6479 $ WC/symbol "extensions='", nonxs_ext, " ", nonxs_ext2, " ", dynamic_ext, "'"
6480 $ WC "fflushNULL='define'"
6481 $ WC "fflushall='undef'"
6482 $ WC "fpostype='fpos_t'"
6483 $ WC "freetype='void'"
6484 $ WC "full_ar='" + "'"
6485 $ WC "full_csh='" + " '"
6486 $ WC "full_sed='_NLA0:'"
6487 $ WC "gidformat='lu'"
6490 $ WC "gidtype='" + gidtype + "'"
6491 $ WC "groupstype='Gid_t'"
6492 $ WC "h_fcntl='false'"
6493 $ WC "h_sysfile='false'"
6495 $ WC "hintfile='" + "'"
6496 $ WC "i16size='" + i16size + "'"
6497 $ WC "i16type='" + i16type + "'"
6498 $ WC "i32dformat='" + i32dformat + "'"
6499 $ WC "i32size='" + i32size + "'"
6500 $ WC "i32type='" + i32type + "'"
6501 $ WC "i64size='" + i64size + "'"
6502 $ WC "i64type='" + i64type + "'"
6503 $ WC "i8size='" + i8size + "'"
6504 $ WC "i8type='" + i8type + "'"
6505 $ WC "i_arpainet='" + i_arpainet + "'"
6506 $ WC "i_bfd='undef'"
6507 $ WC "i_bsdioctl='undef'"
6508 $ WC "i_crypt='undef'"
6510 $ WC "i_dbm='undef'"
6511 $ WC "i_dirent='undef'" ! we roll our own
6512 $ WC "i_dlfcn='undef'"
6513 $ WC "i_execinfo='undef'"
6514 $ WC "i_fcntl='" + i_fcntl + "'"
6515 $ WC "i_fenv='undef'"
6517 $ WC "i_fp_class='undef'"
6518 $ WC "i_gdbm='undef'"
6519 $ WC "i_gdbm_ndbm='undef'"
6520 $ WC "i_gdbmndbm='undef'"
6521 $ WC "i_grp='" + i_grp + "'"
6522 $ WC "i_ieeefp='undef'"
6523 $ WC "i_inttypes='" + i_inttypes + "'"
6524 $ WC "i_langinfo='" + i_langinfo + "'"
6525 $ WC "i_libutil='" + i_libutil + "'"
6526 $ WC "i_locale='" + i_locale + "'"
6527 $ WC "i_machcthr='undef'"
6528 $ WC "i_machcthreads='undef'"
6529 $ WC "i_malloc='undef'"
6530 $ WC "i_mallocmalloc='undef'"
6531 $ WC "i_mntent='undef'"
6532 $ WC "i_ndbm='undef'"
6533 $ WC "i_netdb='" + i_netdb + "'"
6534 $ WC "i_neterrno='define'"
6535 $ WC "i_netinettcp='" + i_netinettcp + "'"
6536 $ WC "i_niin='" + i_niin + "'"
6537 $ WC "i_poll='" + i_poll + "'"
6538 $ WC "i_prot='undef'"
6539 $ WC "i_pthread='define'"
6540 $ WC "i_pwd='undef'"
6541 $ WC "i_quadmath='undef'"
6542 $ WC "i_rpcsvcdbm='undef'"
6543 $ WC "i_sgtty='undef'"
6544 $ WC "i_shadow='" + i_shadow + "'"
6545 $ WC "i_socks='" + i_socks + "'"
6546 $ IF ccname .EQS. "DEC" .AND. F$INTEGER(Dec_C_Version).GE.60400000
6548 $ WC "i_stdbool='define'"
6550 $ WC "i_stdbool='undef'"
6552 $ WC "i_stdint='" + i_stdint + "'"
6553 $ WC "i_stdlib='define'"
6554 $ WC "i_sunmath='undef'"
6555 $ WC "i_sysaccess='" + i_sysaccess + "'"
6556 $ WC "i_sysdir='undef'"
6557 $ WC "i_sysfile='" + i_sysfile + "'"
6558 $ WC "i_sysfilio='undef'"
6559 $ WC "i_sysin='undef'"
6560 $ WC "i_sysioctl='" + i_sysioctl + "'"
6561 $ WC "i_syslog='" + i_syslog + "'"
6562 $ WC "i_sysmman='undef'"
6563 $ WC "i_sysmode='" + i_sysmode + "'"
6564 $ WC "i_sysmount='undef'"
6565 $ WC "i_sysndir='undef'"
6566 $ WC "i_sysparam='undef'"
6567 $ WC "i_syspoll='" + i_syspoll + "'"
6568 $ WC "i_sysresrc='undef'"
6569 $ WC "i_syssecrt='" + i_syssecrt + "'"
6570 $ WC "i_sysselct='undef'"
6571 $ WC "i_syssockio='undef'"
6572 $ WC "i_sysstat='define'"
6573 $ WC "i_sysstatfs='undef'"
6574 $ WC "i_sysstatvfs='" + i_sysstatvfs + "'"
6575 $ WC "i_syssyscall='undef'"
6576 $ WC "i_systime='undef'"
6577 $ WC "i_systimek='undef'"
6578 $ WC "i_systimes='undef'"
6579 $ WC "i_systypes='define'"
6580 $ WC "i_sysuio='" + i_sysuio + "'"
6581 $ WC "i_sysun='" + i_sysun + "'"
6582 $ WC "i_sysutsname='" + i_sysutsname + "'"
6583 $ WC "i_sysvfs='undef'"
6584 $ WC "i_syswait='undef'"
6585 $ WC "i_termio='undef'"
6586 $ WC "i_termios='undef'"
6587 $ WC "i_time='define'"
6588 $ WC "i_unistd='" + i_unistd + "'"
6589 $ WC "i_ustat='undef'"
6590 $ WC "i_utime='" + i_utime + "'"
6591 $ WC "i_vfork='undef'"
6592 $ WC "i_wchar='define'"
6593 $ WC "i_wctype='define'"
6594 $ WC "i_xlocale='undef'"
6595 $ WC "xlocale_needed='undef'"
6596 $ WC "inc_version_list='0'"
6597 $ WC "inc_version_list_init='0'"
6598 $ WC "installarchlib='" + installarchlib + "'"
6599 $ WC "installbin='" + installbin + "'"
6600 $ WC "installman1dir='" + installman1dir + "'"
6601 $ WC "installman3dir='" + installman3dir + "'"
6602 $ WC "installprefix='" + vms_prefix + "'"
6603 $ WC "installprefixexp='/" + vms_prefix + "'"
6604 $ WC "installprivlib='" + installprivlib + "'"
6605 $ WC "installscript='" + installscript + "'"
6606 $ WC "installsitearch='" + installsitearch + "'"
6607 $ WC "installsitebin='" + sitebin + "'"
6608 $ WC "installsitelib='" + installsitelib + "'"
6609 $ WC "installusrbinperl='undef'"
6610 $ WC "intsize='" + intsize + "'"
6611 $ WC "ivdformat='" + ivdformat + "'"
6612 $ WC "ivsize='" + ivsize + "'"
6613 $ WC "ivtype='" + ivtype + "'"
6615 $! The xs_extensions symbol may be quite long
6617 $ WC/symbol "known_extensions='", xs_extensions, " ", nonxs_ext, " ", nonxs_ext2, "'"
6618 $ WC "ld='" + ld + "'"
6619 $ WC "ld_can_script='undef'"
6620 $ WC "lddlflags='/Share'"
6621 $ WC "ldflags='" + ldflags + "'"
6622 $ WC "ldflags_uselargefiles='" + "'"
6623 $ WC "ldlibpthname='" + "'"
6624 $ WC "lib_ext='" + lib_ext + "'"
6625 $ WC "libc='" + libc + "'"
6626 $ WC "libpth='/sys$share /sys$library'"
6627 $ WC "libs='" + libs + "'"
6628 $ WC "libswanted='" + "'"
6629 $ WC "libswanted_uselargefiles='" + "'"
6630 $ WC "longdblsize='" + longdblsize + "'"
6631 $ WC "longdblkind='" + longdblkind + "'"
6632 $ WC "longdblinfbytes='" + longdblinfbytes + "'"
6633 $ WC "longdblnanbytes='" + longdblnanbytes + "'"
6634 $ WC "longdblmantbits='" + longdblmantbits + "'"
6635 $ WC "longlongsize='" + longlongsize + "'"
6636 $ WC "longsize='" + longsize + "'"
6637 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
6639 $ WC "lseeksize='8'"
6640 $ WC "lseektype='off_t'"
6642 $ WC "lseeksize='4'"
6643 $ WC "lseektype='int'"
6647 $ WC "make='" + make + "'"
6648 $ WC "malloctype='void *'"
6649 $ WC "usemallocwrap='" + usemallocwrap + "'"
6650 $ WC "man1ext='rno'"
6651 $ WC "man3ext='rno'"
6652 $ WC "mmaptype='void *'"
6653 $ WC "modetype='unsigned int'"
6654 $ WC "multiarch='undef'"
6655 $ WC "mydomain='" + mydomain + "'"
6656 $ WC "myhostname='" + myhostname + "'"
6657 $ WC "myuname='" + myuname + "'"
6658 $ WC "need_va_copy='undef'"
6659 $ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
6660 $ WC "netdb_host_type='" + netdb_host_type + "'"
6661 $ WC "netdb_name_type='" + netdb_name_type + "'"
6662 $ WC "netdb_net_type='" + netdb_net_type + "'"
6663 $ WC/symbol "nonxs_ext='", nonxs_ext, " ", nonxs_ext2, "'"
6664 $ WC "nveformat='" + nveformat + "'"
6665 $ WC "nvEUformat='" + nvEUformat + "'"
6666 $ WC "nvfformat='" + nvfformat + "'"
6667 $ WC "nvFUformat='" + nvFUformat + "'"
6668 $ WC "nvgformat='" + nvgformat + "'"
6669 $ WC "nvGUformat='" + nvGUformat + "'"
6670 $ WC "nvmantbits='" + nvmantbits + "'"
6671 $ WC "nvsize='" + nvsize + "'"
6672 $ WC "nvtype='" + nvtype + "'"
6673 $ WC "o_nonblock=' '"
6674 $ WC "obj_ext='" + obj_ext + "'"
6675 $ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
6676 $ WC "oldarchlib='" + oldarchlib + "'"
6677 $ WC "oldarchlibexp='" + oldarchlibexp + "'"
6678 $ WC "optimize='" + optimize + "'"
6679 $ WC "osname='" + osname + "'"
6680 $ WC "osvers='" + osvers + "'"
6681 $ WC "otherlibdirs='" + "'"
6682 $ WC "package='" + package + "'"
6683 $ WC "pager='" + pager + "'"
6684 $ WC "patchlevel='" + patchlevel + "'"
6686 $ WC "perl_lc_all_category_positions_init='undef'"
6687 $ WC "perl_lc_all_separator='undef'"
6688 $ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
6689 $ WC "perladmin='" + perladmin + "'"
6690 $ WC "perllibs='" + perllibs + "'"
6691 $ WC "perlpath='" + "''vms_prefix':[000000]Perl''exe_ext'" + "'"
6692 $ WC "perl_static_inline='static inline'"
6693 $ WC "perl_symbol='" + perl_symbol + "'" ! VMS specific
6694 $ WC "perl_thread_local=''" ! FIXME - as this is ia64 ABI, it may well be supported
6695 $ WC "perl_verb='" + perl_verb + "'" ! VMS specific
6696 $ WC "pgflquota='" + pgflquota + "'"
6697 $ WC "pidtype='" + pidtype + "'"
6698 $ WC "prefix='" + vms_prefix + "'"
6699 $ WC "prefixexp='/" + vms_prefix + "'"
6700 $ WC "privlib='" + privlib + "'"
6701 $ WC "privlibexp='" + privlibexp + "'"
6702 $ WC "procselfexe=' '"
6703 $ WC "prototype='define'"
6704 $ WC "ptrsize='" + ptrsize + "'"
6705 $ WC "quadkind='" + quadkind + "'"
6706 $ WC "quadtype='" + quadtype + "'"
6707 $ WC "randbits='" + randbits + "'"
6708 $ WC "randfunc='" + randfunc + "'"
6709 $ WC "randseedtype='" + randseedtype + "'"
6710 $ WC "ranlib='" + "'"
6711 $ WC "rd_nodata=' '"
6712 $ WC "revision='" + revision + "'"
6713 $ WC "sGMTIME_max='4294967295'"
6714 $ WC "sGMTIME_min='0'"
6715 $ WC "sLOCALTIME_max='4294967295'"
6716 $ WC "sLOCALTIME_min='0'"
6717 $ WC "sPRId64='" + sPRId64 + "'"
6718 $ WC "sPRIEUldbl='" + sPRIEUldbl + "'"
6719 $ WC "sPRIFUldbl='" + sPRIFUldbl + "'"
6720 $ WC "sPRIGUldbl='" + sPRIGUldbl + "'"
6721 $ WC "sPRIXU64='" + sPRIXU64 + "'"
6722 $ WC "sPRIeldbl='" + sPRIeldbl + "'"
6723 $ WC "sPRIfldbl='" + sPRIfldbl + "'"
6724 $ WC "sPRIgldbl='" + sPRIgldbl + "'"
6725 $ WC "sPRIi64='" + sPRIi64 + "'"
6726 $ WC "sPRIo64='" + sPRIo64 + "'"
6727 $ WC "sPRIu64='" + sPRIu64 + "'"
6728 $ WC "sPRIx64='" + sPRIx64 + "'"
6729 $ WC "sSCNfldbl='" + sSCNfldbl + "'"
6730 $ WC "sched_yield='" + sched_yield + "'"
6731 $ WC "scriptdir='" + scriptdir + "'"
6732 $ WC "scriptdirexp='" + scriptdir + "'" ! use scriptdir for now
6733 $ WC "seedfunc='" + seedfunc + "'"
6734 $ WC "selectminbits='32'"
6735 $ WC "selecttype='" + selecttype + "'"
6737 $ WC "sharpbang='#!'"
6738 $ WC "shmattype='" + shmattype + "'"
6739 $ WC "shortsize='" + shortsize + "'"
6740 $ IF (f$length(sig_name) .GE. 244)
6742 $ tmp = "sig_name='" + sig_name + "'"
6746 $ WC "sig_name='" + sig_name + "'"
6748 $ IF (f$length(sig_name_init) .GE. 244)
6750 $ tmp = "sig_name_init='" + sig_name_init + "'"
6754 $ WC "sig_name_init='" + sig_name_init + "'"
6756 $ WC "sig_num='" + sig_num + "'"
6757 $ WC "sig_num_init='" + sig_num_init + "'"
6758 $ WC "sig_count='" + sig_count + "'"
6759 $ WC "sig_size='" + sig_size + "'"
6760 $ WC "signal_t='" + signal_t + "'"
6761 $ WC "sitearch='" + sitearch + "'"
6762 $ WC "sitearchexp='" + sitearchexp + "'"
6763 $ WC "sitebin='" + sitebin + "'"
6764 $ WC "sitebinexp='" + sitebin + "'"
6765 $ WC "sitelib='" + sitelib + "'"
6766 $ WC "sitelib_stem='" + sitelib_stem + "'"
6767 $ WC "sitelibexp='" + sitelibexp + "'"
6768 $ WC "siteprefix='" + vms_prefix + "'"
6769 $ WC "siteprefixexp='/" + vms_prefix + "'"
6770 $ WC "sizesize='" + sizesize + "'"
6771 $ WC "sizetype='size_t'"
6772 $ WC "so='" + so + "'"
6773 $ WC "socksizetype='" + socksizetype + "'"
6774 $ WC "spitshell='write sys$output '"
6775 $ WC "src='" + src + "'"
6776 $ WC "ssizetype='int'"
6777 $ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
6778 $ WC "static_ext='" + static_ext + "'"
6779 $ WC "st_dev_size='"4"'"
6780 $ WC "st_dev_sign='1'"
6781 $ WC "st_ino_size='" + st_ino_size + "'"
6782 $ WC "st_ino_sign='1'"
6783 $ WC "stdchar='" + stdchar + "'"
6784 $ WC "stdio_base='((*fp)->_base)'"
6785 $ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
6786 $ WC "stdio_cnt='((*fp)->_cnt)'"
6787 $ WC "stdio_ptr='((*fp)->_ptr)'"
6788 $ WC "stdio_stream_array=' " + "'"
6789 $ WC "subversion='" + subversion + "'"
6790 $ WC "targetarch='" + "'"
6791 $ WC "targetsh='MCR'"
6792 $ WC "timetype='" + timetype + "'"
6793 $ WC "u16size='" + u16size + "'"
6794 $ WC "u16type='" + u16type + "'"
6795 $ WC "u32oformat='" + u32oformat + "'"
6796 $ WC "u32uformat='" + u32uformat + "'"
6797 $ WC "u32size='" + u32size + "'"
6798 $ WC "u32type='" + u32type + "'"
6799 $ WC "u32xformat='" + u32xformat + "'"
6800 $ WC "u32XUformat='" + u32XUformat + "'"
6801 $ WC "u64size='" + u64size + "'"
6802 $ WC "u64type='" + u64type + "'"
6803 $ WC "u8size='" + u8size + "'"
6804 $ WC "u8type='" + u8type + "'"
6805 $ WC "uidformat='lu'"
6808 $ WC "uidtype='" + uidtype + "'"
6809 $ WC "uquadtype='" + uquadtype + "'"
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 "usedefaultstrict='undef'"
6815 $ WC "usedefaulttypes='" + usedefaulttypes + "'" ! VMS-specific
6816 $ WC "usecbacktrace='undef'"
6817 $ WC "usecrosscompile='undef'"
6818 $ WC "usedevel='" + usedevel + "'"
6819 $ WC "usedl='" + usedl + "'"
6820 $ WC "usedtrace='undef'"
6821 $ WC "usefaststdio='" + usefaststdio + "'"
6822 $ WC "useieee='" + useieee + "'" ! VMS-specific
6823 $ WC "useithreads='" + useithreads + "'"
6824 $ WC "usekernelthreads='" + usekernelthreads + "'" ! VMS-specific
6825 $ WC "usekernprocpathname='undef'"
6826 $ WC "usensgetexecutablepath='undef'"
6827 $ WC "uselargefiles='" + uselargefiles + "'"
6828 $ WC "uselongdouble='" + uselongdouble + "'"
6829 $ WC "usemorebits='" + usemorebits + "'"
6830 $ WC "usemultiplicity='" + usemultiplicity + "'"
6831 $ WC "usemymalloc='" + usemymalloc + "'"
6832 $ WC "useperlio='define'"
6833 $ WC "useposix='false'"
6834 $ WC "usequadmath='undef'"
6835 $ WC "usereentrant='undef'"
6836 $ WC "userelocatableinc='undef'"
6837 $ WC "usesecurelog='" + usesecurelog + "'" ! VMS-specific
6838 $ WC "useshortenedsymbols='" + useshortenedsymbols + "'" ! VMS-specific
6839 $ WC "useshrplib='true'"
6840 $ WC "usesitecustomize='" + usesitecustomize + "'"
6841 $ WC "usesocks='undef'"
6842 $ WC "usethreads='" + usethreads + "'"
6843 $ WC "usethreadupcalls='" + usethreadupcalls + "'" ! VMS-specific
6844 $ WC "usevendorprefix='" + "'" ! try to say no, though we'll be ignored as of MM 5.90_01
6845 $ WC "useversionedarchname='" + useversionedarchname + "'"
6846 $ WC "usevfork='true'"
6847 $ WC "usevmsdebug='" + usevmsdebug + "'" ! VMS-specific
6848 $ WC "uvoformat='" + uvoformat + "'"
6849 $ WC "uvsize='" + uvsize + "'"
6850 $ WC "uvtype='" + uvtype + "'"
6851 $ WC "uvuformat='" + uvuformat + "'"
6852 $ WC "uvxformat='" + uvxformat + "'"
6853 $ WC "uvXUformat='" + uvXUformat + "'"
6854 $ WC "vendorarch='" + "'"
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.
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_freelocale='undef'"
6895 $ WC "d_gai_strerror='define'"
6896 $ WC "d_getgrent_r='undef'"
6897 $ WC "d_getgrgid_r='" + d_getgrgid_r + "'"
6898 $ WC "d_getgrnam_r='" + d_getgrnam_r + "'"
6899 $ WC "d_gethostbyaddr_r='undef'"
6900 $ WC "d_gethostbyname_r='undef'"
6901 $ WC "d_gethostent_r='undef'"
6902 $ WC "d_getlogin_r='define'"
6903 $ WC "d_getnetbyaddr_r='undef'"
6904 $ WC "d_getnetbyname_r='undef'"
6905 $ WC "d_getnetent_r='undef'"
6906 $ WC "d_getprotobyname_r='undef'"
6907 $ WC "d_getprotobynumber_r='undef'"
6908 $ WC "d_getprotoent_r='undef'"
6909 $ WC "d_getpwent_r='undef'"
6910 $ WC "d_getpwnam_r='" + d_getpwnam_r + "'"
6911 $ WC "d_getpwuid_r='" + d_getpwuid_r + "'"
6912 $ WC "d_getservbyname_r='undef'"
6913 $ WC "d_getservbyport_r='undef'"
6914 $ WC "d_getservent_r='undef'"
6915 $ WC "d_getspnam_r='undef'"
6916 $ WC "d_gmtime_r='undef'" ! leave undef'd; we use my_gmtime
6917 $ WC "d_lgamma_r='undef'"
6918 $ WC "d_localtime_r='undef'" ! leave undef'd; we use my_localtime
6919 $ WC "d_localtime_r_needs_tzset='undef'"
6920 $ WC "d_newlocale='undef'"
6921 $ WC "d_querylocale='undef'"
6922 $ WC "d_random_r='undef'"
6923 $ WC "d_readdir_r='define'" ! always defined; we roll our own
6924 $ WC "d_readdir64_r='undef'"
6925 $ WC "d_setgrent_r='undef'"
6926 $ WC "d_sethostent_r='undef'"
6927 $ WC "d_setlocale_r='undef'"
6928 $ WC "d_setnetent_r='undef'"
6929 $ WC "d_setprotoent_r='undef'"
6930 $ WC "d_setpwent_r='undef'"
6931 $ WC "d_setservent_r='undef'"
6932 $ WC "d_snprintf='" + d_snprintf + "'"
6933 $ WC "d_srand48_r='undef'"
6934 $ WC "d_srandom_r='undef'"
6935 $ WC "d_strerror_l='undef'"
6936 $ WC "d_strerror_r='undef'"
6937 $ WC "d_tmpnam_r='undef'"
6938 $ WC "d_towlower='define'"
6939 $ WC "d_towupper='define'"
6940 $ WC "d_ttyname_r='" + d_ttyname_r + "'"
6941 $ WC "d_uselocale='undef'"
6942 $ WC "ctermid_r_proto='0'"
6943 $ WC "crypt_r_proto='0'"
6944 $ WC "drand48_r_proto='0'"
6945 $ WC "endgrent_r_proto='0'"
6946 $ WC "endhostent_r_proto='0'"
6947 $ WC "endnetent_r_proto='0'"
6948 $ WC "endprotoent_r_proto='0'"
6949 $ WC "endpwent_r_proto='0'"
6950 $ WC "endservent_r_proto='0'"
6951 $ WC "getgrent_r_proto='0'"
6952 $ WC "getgrgid_r_proto='" + getgrgid_r_proto + "'"
6953 $ WC "getgrnam_r_proto='" + getgrnam_r_proto + "'"
6954 $ WC "gethostbyaddr_r_proto='0'"
6955 $ WC "gethostbyname_r_proto='0'"
6956 $ WC "gethostent_r_proto='0'"
6959 $ WC "getlogin_r_proto='REENTRANT_PROTO_I_BW'"
6961 $ WC "getlogin_r_proto='0'"
6963 $ WC "getnetbyaddr_r_proto='0'"
6964 $ WC "getnetbyname_r_proto='0'"
6965 $ WC "getnetent_r_proto='0'"
6966 $ WC "getprotobyname_r_proto='0'"
6967 $ WC "getprotobynumber_r_proto='0'"
6968 $ WC "getprotoent_r_proto='0'"
6969 $ WC "getpwent_r_proto='0'"
6970 $ WC "getpwnam_r_proto='0'"
6971 $ WC "getpwuid_r_proto='0'"
6972 $ WC "getservbyname_r_proto='0'"
6973 $ WC "getservbyport_r_proto='0'"
6974 $ WC "getservent_r_proto='0'"
6975 $ WC "getspnam_r_proto='0'"
6976 $ WC "gmtime_r_proto='0'"
6977 $ WC "localtime_r_proto='0'"
6978 $ WC "random_r_proto='0'"
6979 $ WC "readdir_r_proto='REENTRANT_PROTO_I_TSR'" ! always defined; we roll our own
6980 $ WC "readdir64_r_proto='0'"
6981 $ WC "setgrent_r_proto='0'"
6982 $ WC "sethostent_r_proto='0'"
6983 $ WC "setlocale_r_proto='0'"
6984 $ WC "setnetent_r_proto='0'"
6985 $ WC "setprotoent_r_proto='0'"
6986 $ WC "setpwent_r_proto='0'"
6987 $ WC "setservent_r_proto='0'"
6988 $ WC "srand48_r_proto='0'"
6989 $ WC "srandom_r_proto='0'"
6990 $ WC "strerror_r_proto='0'"
6991 $ WC "tmpnam_r_proto='0'"
6992 $ WC "ttyname_r_proto='" + ttyname_r_proto + "'"
6994 $! ##END WRITE NEW CONSTANTS HERE##
6998 $! Okay, we've gotten here. Build munchconfig.exe
6999 $ COPY/NOLOG [-.vms]munchconfig.c []
7000 $ COPY/NOLOG [-.vms]'Makefile_SH' []
7001 $ 'Perl_CC' 'ccflags' munchconfig.c
7002 $ 'ld'/EXE='exe_ext' munchconfig'obj_ext'
7003 $ IF F$SEARCH("munchconfig''obj_ext'") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig'obj_ext';
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 (Has_Dec_C_Sockets)
7056 $ WC "#define VMS_DO_SOCKETS"
7057 $ WC "#define DECCRTL_SOCKETS"
7059 $! This is VMS-specific for now
7060 $ WC "#''d_setenv' HAS_SETENV"
7061 $ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
7062 $ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
7063 $ IF use64bitint .OR. use64bitint .EQS. "define"
7065 $ WC "#define USE_64_BIT_INT"
7067 $ IF uselongdouble .OR. uselongdouble .EQS. "define"
7069 $ WC "#define USE_LONG_DOUBLE"
7071 $ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
7072 WC "#define USE_64_BIT_ALL"
7073 $ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
7074 $ IF shorten_long_symbols THEN WC "#define VMS_SHORTEN_LONG_SYMBOLS"
7075 $ IF use_ieee_math THEN WC "#define USE_IEEE"
7076 $ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
7077 $ WC "#define HAS_ENVGETENV"
7078 $ WC "#define PERL_EXTERNAL_GLOB"
7079 $ IF kill_by_sigprc .EQS. "define" then WC "#define KILL_BY_SIGPRC"
7080 $ IF unlink_all_versions .OR. unlink_all_versions .EQS. "define" THEN -
7081 WC "#define UNLINK_ALL_VERSIONS"
7082 $ IF d_sockaddr_sa_len .EQS. "define" then WC "#define _SOCKADDR_LEN 1"
7083 $ IF ccname .EQS. "CXX" then WC "#define NO_ENVIRON_ARRAY"
7084 $ IF ccname .EQS. "CXX" then WC "#define VMS" ! only has __VMS by default
7085 $ WC "#define _PTHREAD_EXC_INCL_CLEAN" ! avoid conflict between DECthreads TRY/CATCH and Perl TRY/CATCH
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'exe_ext' '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 Has_Dec_C_Sockets
7115 $ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
7117 $ SOCKET_REPLACE = "SOCKET="
7121 $ THREAD_REPLACE = "THREAD=THREADED=1"
7123 $ THREAD_REPLACE = "THREAD="
7127 $ MALLOC_REPLACE = "MALLOC=MALLOC=1"
7129 $ MALLOC_REPLACE = "MALLOC="
7131 $ IF uselargefiles .OR. uselargefiles .EQS. "define"
7133 $ IF usestdstat .or. usestdstat .eqs. "define"
7135 $ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_USE_STD_STAT=1"
7137 $ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_LARGEFILE=1"
7140 $ LARGEFILE_REPLACE = "LARGEFILE="
7142 $ IF use_vmsdebug_perl
7144 $ DEBUG_REPLACE = "USEVMSDEBUG=__DEBUG__=1"
7146 $ DEBUG_REPLACE = "USEVMSDEBUG="
7148 $ PREFIX_REPLACE = "PREFIX=PREFIX=''prefix'"
7150 $! In order not to stress the tiny command buffer on pre-7.3-2 systems,
7151 $! we put the following substitutions in a file and pass the file to
7154 $ open/write CONFIG extra_subs.txt
7155 $ WC := write CONFIG
7156 $ WC "''DECC_REPLACE'"
7157 $ WC "''DECCXX_REPLACE'"
7159 $ WC "''SOCKET_REPLACE'"
7160 $ WC "''THREAD_REPLACE'"
7161 $ WC "''C_Compiler_Replace'"
7162 $ WC "''MALLOC_REPLACE'"
7163 $ WC "''THREAD_UPCALLS'"
7164 $ WC "''THREAD_KERNEL'"
7165 $ WC "PV=''version'"
7166 $ WC "FLAGS=FLAGS=''extra_flags'"
7167 $ WC "''LARGEFILE_REPLACE'"
7168 $ WC "ARCHNAME=ARCHNAME=''archname'"
7169 $ WC "''DEBUG_REPLACE'"
7170 $ WC "''PREFIX_REPLACE'"
7173 $ echo4 "Extracting ''defmakefile' (with variable substitutions)"
7174 $ DEFINE/USER_MODE sys$output 'UUmakefile'
7175 $ mcr []munchconfig'exe_ext' 'config_sh' 'Makefile_SH' -f extra_subs.txt
7176 $! Clean up after ourselves
7177 $ DELETE/NOLOG/NOCONFIRM []munchconfig'exe_ext';
7178 $ DELETE/NOLOG/NOCONFIRM []extra_subs.txt;
7180 $! Note that the /key qualifier to search, as in:
7181 $! search README.* "=head"/key=(position=1)/window=0/output=extra.pods
7182 $! is not supported on VMS V5.5-2, hence not used in extra_pods.com.
7184 $ echo4 "Extracting extra_pods.com (without variable substitutions)"
7185 $ Create Sys$Disk:[-]extra_pods.com
7186 $ Deck/Dollar="$EOExtra_Pods$"
7188 $! NOTE: This file is extracted as part of the VMS configuration process.
7189 $! Any changes made to it directly will be lost. If you need to make any
7190 $! changes, please edit the template in Configure.Com instead.
7191 $! Use FORCE if you've just podified a README.* file on VMS.
7192 $ miniperl = f$search("sys$disk:[]miniperl.%xe;") ! could have alternate extension
7193 $ if f$search("extra.pods") .eqs. "" .or. P1 .eqs. "FORCE" then -
7194 search README.* "=head"/window=0/output=extra.pods
7195 $ open/read/error=extra_close EXTRA extra.pods
7197 $ read/error=extra_close/END_OF_FILE=extra_close EXTRA file
7198 $ file_type = f$edit(f$parse(file,,,"TYPE",),"LOWERCASE") - "."
7199 $ if file_type .nes. "VMS" .and. file_type .nes. "vms"
7201 $ pod_file = "[.pod]perl''file_type'.pod"
7202 $ file = file - "''f$parse(file,,,"VERSION",)'"
7203 $ if p1 .eqs. "CLEAN"
7204 $ then if f$search(pod_file) .nes. "" then delete/log 'pod_file';*
7207 $ if f$search(pod_file) .eqs. ""
7208 $ then do_copy := true
7210 $ file_rdt = f$cvtime(f$file_attributes(file,"RDT"))
7211 $ pod_file_rdt = f$cvtime(f$file_attributes(pod_file,"RDT"))
7212 $ if file_rdt .GTS. pod_file_rdt then do_copy := true
7214 $ ! wacky method to preserve case on ODS-5 even when parse style is traditional
7215 $ if do_copy then mcr 'miniperl' -e "exit 0+$^E unless File::Copy::rmscopy(q{''file'}, q{''pod_file'});"
7221 $ if p1 .eqs. "CLEAN" .and. f$search("extra.pods;-1") .nes. "" then -
7222 purge/nolog extra.pods
7226 $! Warn of dangerous symbols or logical names
7228 $Bad_environment: SUBROUTINE
7230 $ IF p2 .eqs. "SYMBOL"
7232 $ IF f$type('p1') .nes. "" THEN Bad_env := SYMBOL
7234 $ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
7236 $ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
7238 $ IF f$search("config.msg") .nes. ""
7240 $ OPEN/APPEND CONFIG config.msg
7242 $ OPEN/WRITE CONFIG config.msg
7244 $ IF Bad_env .eqs. "SYMBOL"
7247 $ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
7248 $ WRITE CONFIG " delete before building ''package' via:"
7249 $ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
7250 $ IF f$locate("""",&p1) .ge. f$length(&p1)
7252 $ WRITE CONFIG " after building, testing, and installing ''package'"
7253 $ WRITE CONFIG " restore the symbol with:"
7254 $ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
7257 $ IF Bad_env .eqs. "LOGICAL"
7260 $ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
7261 $ WRITE CONFIG " deassign before building ''package'"
7267 $ ENDSUBROUTINE ! Bad_environment
7269 $ echo4 "Checking for dangerous pre-existing global symbols and logical names."
7270 $ CALL Bad_environment "COMP"
7271 $ CALL Bad_environment "EXT"
7272 $ CALL Bad_environment "FOO"
7273 $ CALL Bad_environment "LIB"
7274 $ CALL Bad_environment "LIST"
7275 $ CALL Bad_environment "MIME"
7276 $ CALL Bad_environment "POSIX"
7277 $ CALL Bad_environment "SYS"
7278 $ CALL Bad_environment "T"
7279 $ CALL Bad_environment "THREAD"
7280 $ CALL Bad_environment "THREADS"
7281 $ CALL Bad_environment "TIME"
7282 $ CALL Bad_environment "TMP"
7283 $ CALL Bad_environment "UNICODE"
7284 $ CALL Bad_environment "UTIL"
7285 $ CALL Bad_environment "TEST" "SYMBOL"
7286 $ IF f$search("config.msg") .eqs. "" THEN echo "OK."
7288 $! %Config-I-VMS, write perl_setup.com here
7290 $ IF (.NOT.perl_symbol)
7292 $ file_2_find = "[-]''packageup'.cld"
7294 $ echo4 "The perl.cld file is now being written..."
7295 $ OPEN/WRITE CONFIG 'file_2_find'
7297 $ IF (use_vmsdebug_perl)
7299 $ WRITE CONFIG "define verb dbgperl"
7300 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
7301 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7303 $ WRITE CONFIG "define verb perl"
7304 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
7305 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7307 $ WRITE CONFIG "define verb perl"
7308 $ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
7309 $ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7312 $ ENDIF ! (.NOT.perl_symbol)
7314 $ echo4 "The perl_setup.com file is now being written..."
7315 $ file_2_find = "[-]perl_setup.com"
7317 $! Folks are likely to want to edit perl_setup.com.
7318 $! STMLF RFM plays nicer with ported editors than does VFC.
7320 $ CREATE [-]CONFIG.FDL
7325 $ CREATE /FDL=[-]CONFIG.FDL 'file_2_find'
7326 $ OPEN/APPEND CONFIG 'file_2_find'
7327 $ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;
7329 $ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
7330 $ IF cf_email.NES.perladmin
7332 $ WRITE CONFIG "$! perl configured by ''cf_email'"
7334 $ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
7337 $ WRITE CONFIG "$ if P1 .EQS. """""
7338 $ WRITE CONFIG "$ then"
7339 $ WRITE CONFIG "$ myproc = f$environment(""PROCEDURE"")"
7340 $ WRITE CONFIG "$ myroot_dev = f$parse(myproc,,,""DEVICE"",""NO_CONCEAL"")"
7341 $ WRITE CONFIG "$ myroot_dir = f$parse(myproc,,,""DIRECTORY"",""NO_CONCEAL"")"
7342 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000."" - ""><000000."""
7343 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000]"" - ""><000000>"""
7344 $ WRITE CONFIG "$ myroot_dir = myroot_dir - ""]["" - ""><"""
7345 $ WRITE CONFIG "$ myroot_dir = myroot_dir - "".]"" - "".>"" - ""["" - ""]"" - ""<"" - "">"""
7346 $ WRITE CONFIG "$ root_spec = myroot_dev + ""["" + myroot_dir + "".]"""
7347 $ WRITE CONFIG "$ else"
7348 $ WRITE CONFIG "$ root_spec = P1"
7349 $ WRITE CONFIG "$ endif"
7350 $ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' 'root_spec'"
7351 $ WRITE CONFIG "$ ext = "".exe"""
7354 $ perl_setup_perl = "'" + "'perl'" ! triple quoted foreign command symbol
7355 $ IF (use_vmsdebug_perl)
7357 $ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgperl'ext'"
7358 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgperl'ext'"
7359 $ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
7361 $ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
7362 $ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
7364 $ ELSE ! .NOT.perl_symbol
7365 $ perl_setup_perl = "perl" ! command verb
7366 $ IF (use_vmsdebug_perl)
7368 $ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
7370 $ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
7372 $ IF perl_verb .EQS. "PROCESS"
7374 $ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
7376 $ ENDIF ! perl_symbol
7380 $ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
7381 $ ELSE !leave in but commented out (in case setting was from perl :-)
7382 $ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
7385 $ WRITE CONFIG "$! Symbols for Perl-based utility programs:"
7387 $ WRITE CONFIG "$ corelist == """ + perl_setup_perl + " ''vms_prefix':[utils]corelist.com"""
7388 $ WRITE CONFIG "$ cpan == """ + perl_setup_perl + " ''vms_prefix':[utils]cpan.com"""
7389 $ WRITE CONFIG "$ enc2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]enc2xs.com"""
7390 $ WRITE CONFIG "$ encguess == """ + perl_setup_perl + " ''vms_prefix':[utils]encguess.com"""
7391 $ WRITE CONFIG "$ h2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]h2ph.com"""
7392 $ WRITE CONFIG "$ h2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]h2xs.com"""
7393 $ WRITE CONFIG "$ instmodsh == """ + perl_setup_perl + " ''vms_prefix':[utils]instmodsh.com"""
7394 $ WRITE CONFIG "$ json_pp == """ + perl_setup_perl + " ''vms_prefix':[utils]json_pp.com"""
7395 $ WRITE CONFIG "$ libnetcfg == """ + perl_setup_perl + " ''vms_prefix':[utils]libnetcfg.com"""
7396 $ WRITE CONFIG "$ perlbug == """ + perl_setup_perl + " ''vms_prefix':[utils]perlbug.com"""
7397 $ WRITE CONFIG "$ perldoc == """ + perl_setup_perl + " ''vms_prefix':[utils]perldoc.com """"-t"""""""
7398 $ WRITE CONFIG "$ perlivp == """ + perl_setup_perl + " ''vms_prefix':[utils]perlivp.com"""
7399 $ WRITE CONFIG "$ perlthanks == """ + perl_setup_perl + " ''vms_prefix':[utils]perlthanks.com"""
7400 $ WRITE CONFIG "$ piconv == """ + perl_setup_perl + " ''vms_prefix':[utils]piconv.com"""
7401 $ WRITE CONFIG "$ pl2pm == """ + perl_setup_perl + " ''vms_prefix':[utils]pl2pm.com"""
7402 $ WRITE CONFIG "$ pod2html == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2html.com"""
7403 $ WRITE CONFIG "$ pod2text == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2text.com"""
7404 $ WRITE CONFIG "$!pod2man == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2man.com"""
7405 $ WRITE CONFIG "$ pod2usage == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2usage.com"""
7406 $ WRITE CONFIG "$ podchecker == """ + perl_setup_perl + " ''vms_prefix':[utils]podchecker.com"""
7407 $ WRITE CONFIG "$ podselect == """ + perl_setup_perl + " ''vms_prefix':[utils]podselect.com"""
7408 $ WRITE CONFIG "$ prove == """ + perl_setup_perl + " ''vms_prefix':[utils]prove.com"""
7409 $ WRITE CONFIG "$ ptar == """ + perl_setup_perl + " ''vms_prefix':[utils]ptar.com"""
7410 $ WRITE CONFIG "$ ptardiff == """ + perl_setup_perl + " ''vms_prefix':[utils]ptardiff.com"""
7411 $ WRITE CONFIG "$ ptargrep == """ + perl_setup_perl + " ''vms_prefix':[utils]ptargrep.com"""
7412 $ WRITE CONFIG "$ shasum == """ + perl_setup_perl + " ''vms_prefix':[utils]shasum.com"""
7413 $ WRITE CONFIG "$ splain == """ + perl_setup_perl + " ''vms_prefix':[utils]splain.com"""
7414 $ WRITE CONFIG "$ xsubpp == """ + perl_setup_perl + " ''vms_prefix':[utils]xsubpp.com"""
7415 $ WRITE CONFIG "$ zipdetails == """ + perl_setup_perl + " ''vms_prefix':[utils]zipdetails.com"""
7419 $ echo "The file can be found at:"
7420 $ echo4 " ''F$SEARCH(file_2_find)'"
7421 $ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
7422 $ echo "when you are satisfied with a successful compilation,"
7423 $ echo "testing, and installation of your perl."
7425 $ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
7427 $ file_2_find = "[-]''packageup'_install.com"
7428 $ OPEN/WRITE CONFIG 'file_2_find'
7429 $ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
7430 $ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
7431 $ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
7434 $ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
7435 $ echo4 " @ ''F$SEARCH(file_2_find)'"
7436 $ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
7440 $!figure out where we "are" by parsing 'vms_default_directory_name'
7442 $ set_def_command = ""
7443 $ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
7444 $ tmp = vms_default_directory_name - dflt - "]"
7446 $ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
7448 $ tmp1 = F$ELEMENT(i,".",tmp)
7449 $ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
7451 $ THEN set_def_command = "set default [-"
7452 $ ELSE set_def_command = set_def_command + "-"
7456 $Beyond_set_def_loop:
7457 $ IF set_def_command.NES.""
7459 $ set_def_command = set_def_command - "-" + "]"
7461 $ echo4 "In order to build ''package' you must now issue the commands:"
7463 $ echo4 " ''set_def_command'"
7466 $ echo4 "In order to build ''package' you must now issue the command:"
7469 $ echo4 " ''make'''makefile'", macros
7472 $ IF ( F$SEARCH("config.msg").NES."" )
7474 $ echo4 "Hmm. I also noted the following information while running:"
7476 $ TYPE/OUTPUT=SYS$ERROR: config.msg
7477 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
7478 $ DELETE/NOLOG/NOCONFIRM config.msg;
7485 $ CLOSE/NOLOG STDOUT
7486 $ DEASSIGN SYS$OUTPUT
7488 $ CLOSE/NOLOG CONFIG
7489 $ IF F$GETJPI("","FILCNT").GT.vms_filcnt
7490 $ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
7492 $ dflt = F$ENVIRONMENT("DEFAULT")
7493 $ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
7495 $ IF ( F$SEARCH("[.CXX_REPOSITORY]*.*").NES."" )
7497 $ DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
7498 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
7500 $ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
7502 $ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
7503 $ DELETE/NOLOG/NOCONFIRM UU.DIR;
7505 $ SET DEFAULT 'vms_default_directory_name' !be kind rewind
7507 $!: End of Configure