This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix RT #121509 : perl -d handling chdir().
[perl5.git] / configure.com
CommitLineData
f970f0fc 1$! OpenVMS configuration procedure for Perl -- do not attempt to run under DOS
7558ebc2 2$ sav_ver = 'F$VERIFY(0)'
9b5c8979 3$ on control_y then goto clean_up
97abc6ad
HM
4$! SET VERIFY
5$!
570bb66e 6$! For example, if you unpacked perl into: [USER.PERL-5n...] then you will
e6df7ed1 7$! want to cd into the tree and execute Configure:
97abc6ad 8$!
a3ef2c6f 9$! $ SET DEFAULT [USER.PERL5_xxx]
e6df7ed1 10$! $ @Configure
97abc6ad
HM
11$!
12$! or
13$!
a3ef2c6f 14$! $ SET DEFAULT [USER.PERL5_xxx]
e6df7ed1 15$! $ @Configure "-des"
97abc6ad
HM
16$!
17$! That's it. If you get into a bind trying to build perl on VMS then
429a5e67 18$! definitely read through the README.VMS file.
146174a9 19$! Beyond that send email to vmsperl@perl.org
97abc6ad
HM
20$!
21$! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22$!
97abc6ad 23$! send suggestions to:
a3ef2c6f 24$! Dan Sugalski <dan@sidhe.org>
97abc6ad
HM
25$! Thank you!!!!
26$!
27$! Adapted and converted from Larry Wall & Andy Dougherty's
429a5e67 28$! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer
146174a9
CB
29$! (a Bourne sh[ell] script for configuring the installation of perl
30$! on non-VMS systems) in the perl5.002|3 epoch (spring/summer 1996)
97abc6ad
HM
31$! with much valuable help from Charles Bailey &
32$! the whole VMSPerl crew.
429a5e67 33$! Extended and messed about with by Dan Sugalski
97abc6ad 34$!
97abc6ad
HM
35$! VMS-isms we will need:
36$ echo = "write sys$output "
37$ cat = "type"
a5fddd44 38$ delete := delete ! local symbol overrides globals with qualifiers
97abc6ad 39$ gcc_symbol = "gcc"
96021e87 40$ ld = "Link/nodebug"
97abc6ad
HM
41$ ans = ""
42$ macros = ""
c645ec3f 43$ extra_flags = ""
498336ed 44$ user_c_flags = ""
6c7aff00 45$ use_ieee_math = "y"
498336ed 46$ be_case_sensitive = "n"
899de42e 47$ shorten_long_symbols = "y"
4adb8845 48$ unlink_all_versions = "n"
96021e87 49$ builder = "MMK"
a3ef2c6f 50$ use_vmsdebug_perl = "n"
f53b4005
CB
51$ use64bitall = "n"
52$ use64bitint = "n"
65b8dcb0 53$ uselongdouble = "n"
fe6e2aaa 54$ uselargefiles = "y"
cfcfe586 55$ usestdstat = "n"
79e63f36 56$ usesitecustomize = "n"
97abc6ad 57$ C_Compiler_Replace = "CC="
3f39e13a
CB
58$ thread_upcalls = "MTU="
59$ thread_kernel = "MTK="
429a5e67
DS
60$ use_two_pot_malloc = "N"
61$ use_pack_malloc = "N"
62$ use_debugmalloc = "N"
570bb66e 63$ ccflags = ""
17e8697d 64$ static_ext = ""
63d52911 65$ dynamic_ext = ""
5581d86f 66$ nonxs_ext = ""
bd2aeadf 67$ nonxs_ext2 = ""
97abc6ad 68$ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
570bb66e
JH
69$ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx]
70$! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx]
97abc6ad 71$!
c998f3c7
PP
72$! Sebastian Bazley's request: close the CONFIG handle with /NOLOG
73$! qualifier "just in case" (configure.com is re @ed in a bad state).
74$! This construct was tested to be not a problem as far back as
75$! VMS V5.5-2, hopefully earlier versions are OK as well.
76$!
77$ CLOSE/NOLOG CONFIG
78$!
79$! Now keep track of open files
80$!
97abc6ad
HM
81$ vms_filcnt = F$GETJPI ("","FILCNT")
82$!
83$!: compute my invocation name
84$ me = F$ENVIRONMENT("PROCEDURE")
85$!
86$! Many null statements (begin with colon ':') in the Bourne shell version of
87$! this script serve as comments/placeholders. I have retained some of the ones
88$! that will help you compare this .COM file to the sh version - as well as
89$! leave placeholders for future improvements to this .COM file.
90$! sfn = VMS "skipped for now"
91$!
92$!: Proper PATH separator !sfn
93$!: Proper PATH setting !sfn
94$!: Sanity checks !sfn "Say '@''$me''"
95$!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
96$!: Configure runs within the UU subdirectory !->after find MANIFEST
97$! <big long list of default values (mostly null)>
98$!: We must find out about Eunice early !(?)
99$!: list of known cpp symbols, sorted alphabetically !sfn
100$! al = al + "..."
101$!: default library list !sfn
102$! <no hints files in use (yet?)>
103$!: Extra object files, if any, needed on this platform. !sfn
104$!: Possible local include directories to search. !sfn
105$!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
106$!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
107$!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
108$!: no include file wanted by default !sfn
109$!inclwanted='' !sfn
110$!: Possible local library directories to search. !sfn
111$!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
112$!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
113$!: general looking path for locating libraries !sfn
114$!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
115$!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
116$!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
117$!: Private path used by Configure to find libraries. Its value !sfn
118$!: is prepended to libpth. This variable takes care of special !sfn
119$!: machines, like the mips. Usually, it should be empty. !sfn
120$!plibpth='' !sfn
97abc6ad
HM
121$!: List of libraries we want. !sfn
122$!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
665ff1e9 123$!libswanted="$libswanted ld sun m c cposix posix ndir dir crypt" !sfn
97abc6ad
HM
124$!libswanted="$libswanted ucb bsd BSD PW x" !sfn
125$!: We probably want to search /usr/shlib before most other libraries. !sfn
126$!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
127$!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
128$!glibpth="/usr/shlib $glibpth" !sfn
129$!: Do not use vfork unless overridden by a hint file. !sfn
130$!usevfork=false !sfn
131$!: script used to extract .SH files with variable substitutions !sfn
132$!: produce awk script to parse command line options !sfn
133$!sfn (assume no sed awk) see below
134$!: process the command line options
135$!
136$!: set up default values
137$ fastread=""
138$ reuseval="false"
c886fb20 139$ maniskip = "false"
570bb66e 140$ IF F$TYPE(config_sh) .EQS. "" THEN config_sh=""
97abc6ad
HM
141$ alldone=""
142$ error=""
143$ silent=""
144$ extractsh=""
145$ override=""
146$ knowitall=""
414b89cc 147$ ccname="VAX"
97abc6ad 148$ Dec_C_Version = ""
570bb66e 149$ cxxversion = ""
97abc6ad 150$ use_threads = "F"
498336ed
CB
151$ use_5005_threads = "N"
152$ use_ithreads = "N"
97abc6ad
HM
153$!
154$!: option parsing
08c7cbbb 155$ config_args = ""
97abc6ad
HM
156$ IF (P1 .NES. "")
157$ THEN !one or more switches was thrown
158$ i = 1
159$ bang = 0
160$Param_loop:
08c7cbbb
GS
161$ IF (P'i'.NES."")
162$ THEN
163$ bang = bang + 1
164$ config_args = config_args + F$FAO(" !AS",P'i')
165$ ENDIF
97abc6ad
HM
166$ i = i + 1
167$ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
168$!
169$ i = 1
170$Opt_loop:
171$ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
172$ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
173$Remove_quotation_mark:
174$ P'i' = P'i' - """"
175$ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
176$ gotopt = "f" !"alse"
177$ gotshortopt = "f" !"alse"
178$ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
179$ THEN
180$ fastread = "yes"
181$ gotopt = "t" !"rue"
182$ P'i' = P'i' - "d"
183$ gotshortopt = "t" !"rue"
184$ ENDIF
185$ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
186$ THEN
187$ alldone = "cont"
188$ gotopt = "t"
189$ P'i' = P'i' - "e"
190$ gotshortopt = "t"
191$ ENDIF
570bb66e 192$ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f"
97abc6ad
HM
193$ THEN
194$ P'i' = P'i' - "f"
195$ config_sh = P'i'
196$ IF (F$SEARCH(config_sh).NES."")
197$ THEN
8560c20d
CB
198$ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
199$ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
97abc6ad 200$ THEN
570bb66e 201$ config_dflt = "y"
97abc6ad
HM
202$ CONTINUE !at this point check UIC && if test allows...
203$ !to be continued ?
204$ ELSE
205$ echo "''me': cannot read config file ''config_sh'."
206$ error="true"
207$ ENDIF
208$ ELSE
209$ echo "''me': cannot read config file ''config_sh'."
210$ error="true"
211$ ENDIF
212$ gotopt = "t"
213$ ENDIF
570bb66e 214$ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h"
97abc6ad
HM
215$ THEN
216$ error = "true"
217$ gotopt = "t"
218$ P'i' = P'i' - "h"
219$ gotshortopt = "t"
220$ ENDIF
570bb66e 221$ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m"
c886fb20
CB
222$ THEN
223$ maniskip = "true"
224$ gotopt = "t"
225$ P'i' = P'i' - "m"
226$ gotshortopt = "t"
227$ ENDIF
570bb66e 228$ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r"
97abc6ad
HM
229$ THEN
230$ reuseval = "true"
231$ gotopt = "t"
232$ P'i' = P'i' - "r"
233$ gotshortopt = "t"
234$ ENDIF
570bb66e 235$ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s"
97abc6ad
HM
236$ THEN
237$ silent = "true"
238$ gotopt = "t"
239$ P'i' = P'i' - "s"
240$ gotshortopt = "t"
241$ ENDIF
570bb66e 242$ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E"
97abc6ad
HM
243$ THEN
244$ alldone = "exit"
245$ gotopt = "t"
246$ ENDIF
570bb66e 247$ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K"
97abc6ad
HM
248$ THEN
249$ knowitall = "true"
250$ gotopt = "t"
251$ P'i' = P'i' - "K"
252$ gotshortopt = "t"
253$ ENDIF
570bb66e 254$ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O"
97abc6ad
HM
255$ THEN
256$ override = "true"
257$ gotopt = "t"
258$ P'i' = P'i' - "O"
259$ gotshortopt = "t"
260$ ENDIF
570bb66e 261$ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S"
97abc6ad 262$ THEN
570bb66e 263$ extractsh = "true" !VMS? Yes with munchconfig
97abc6ad
HM
264$ gotopt = "t"
265$ P'i' = P'i' - "S"
266$ gotshortopt = "t"
267$ ENDIF
570bb66e 268$ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D"
97abc6ad
HM
269$ THEN
270$ P'i' = P'i' - "D"
97abc6ad
HM
271$ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
272$ THEN
570bb66e 273$ tmp = P'i' + "=""define"""
7558ebc2 274$ 'tmp'
570bb66e 275$ DELETE/SYMBOL tmp
97abc6ad
HM
276$ ELSE
277$ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
278$ THEN
279$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
7558ebc2 280$ echo "''me': use ""-Usymbol=val"" not ""-Dsymbol=""."
97abc6ad
HM
281$ echo "''me': ignoring -D",P'i'
282$ ELSE
570bb66e
JH
283$ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')
284$ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """"
7558ebc2 285$ 'tmp'
570bb66e 286$ DELETE/SYMBOL tmp
97abc6ad
HM
287$ ENDIF
288$ ENDIF
97abc6ad
HM
289$ gotopt = "t"
290$ ENDIF
570bb66e 291$ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U"
97abc6ad
HM
292$ THEN
293$ P'i' = P'i' - "U"
294$ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
295$ THEN
570bb66e 296$ tmp = P'i' + "="""""
7558ebc2 297$ 'tmp'
570bb66e 298$ DELETE/SYMBOL tmp
97abc6ad
HM
299$ ELSE
300$ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
301$ THEN
302$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
7558ebc2 303$ echo "''me': use ""-Dsymbol=val"" not ""-Usymbol=val""."
97abc6ad
HM
304$ echo "''me': ignoring -U",P'i'
305$ ELSE
570bb66e 306$ tmp = P'i' + "=""undef"""
7558ebc2 307$ 'tmp'
570bb66e 308$ DELETE/SYMBOL tmp
97abc6ad
HM
309$ ENDIF
310$ ENDIF
97abc6ad
HM
311$ gotopt = "t"
312$ ENDIF
313$ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
314$ THEN
315$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
316$ echo "''me' generated by an unknown version of EDT."
317$ STOP
570bb66e 318$ EXIT
97abc6ad
HM
319$ ENDIF
320$ IF .NOT.gotopt
321$ THEN
322$ echo "''me': unknown option ",P'i'
323$ error = "true"
324$ ENDIF
325$ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
326$ i = i + 1
327$ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
328$!
329$ ENDIF ! (P1 .NES. "")
08c7cbbb 330$ config_args = F$EDIT(config_args,"TRIM")
97abc6ad
HM
331$!
332$ IF (error)
333$ THEN
334$ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
7558ebc2 335$ echo "Usage: @''me' [-dehmr""EKOSV""] [-fconfig.sh] [""-Dsymbol""] [""-Dsymbol=value""]"
c886fb20 336$ echo " [-Usymbol] [-Usymbol=]"
7558ebc2
PP
337$ TYPE SYS$INPUT:
338$ DECK
97abc6ad
HM
339 "-d" : use defaults for all answers.
340 "-e" : go on without questioning past the production of config.sh. *
341 "-f" : specify an alternate default configuration file.
342 "-h" : print this help message and exit (with an error status).
c886fb20 343 "-m" : skip the MANIFEST check to see that all files are present
97abc6ad
HM
344 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
345 "-s" : silent mode, only echoes questions and essential information.
346 -"D" : define symbol to have some value: *
347 -"Dsymbol" symbol gets the value 'define'
348 -"Dsymbol=value" symbol gets the value 'value'
349 -E : stop at the end of questions, after having produced config.sh. *
350 -K : do not use unless you know what you are doing.
351 -O : let -D and -U override definitions from loaded configuration file. *
352 -S : perform variable substitutions on all .SH files (can mix with -f) *
353 -"U" : undefine symbol: *
354 -"Usymbol" symbol gets the value 'undef'
355 -"Usymbol=" symbol gets completely empty
356 -V : print version number and exit (with a zero status).
7558ebc2 357$ EOD
97abc6ad
HM
358$ echo "%Config-I-VMS, lower case switches must be enclosed"
359$ echo "-Config-I-VMS, in double quotation marks, e.g.:"
360$ echo "-Config-I-VMS, @Configure ""-des"""
361$ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
362$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
363$ STOP
364$ EXIT 3 ! $STATUS = "%X00000003" (informational)
365$ ENDIF
366$!
367$ GOTO Check_silence
368$!
369$Shut_up:
01792a70
CB
370$ IF F$Mode() .eqs. "BATCH"
371$ THEN
6623414d
CB
372$ x = F$GETQUI("CANCEL_OPERATION") ! clear the deck
373$ x = "THIS_JOB"
374$ bproc_queue = f$getqui("DISPLAY_QUEUE","QUEUE_NAME","*",x)
375$ bproc_entry = f$getqui("DISPLAY_JOB","ENTRY_NUMBER",,x)
376$ bproc_name = f$getqui("DISPLAY_JOB","JOB_NAME",,x)
377$ bproc_log_spec = f$getqui("DISPLAY_JOB","LOG_SPECIFICATION",,x)
378$ STDOUT = F$PARSE(bproc_name, bproc_log_spec, ".LOG")
379$ WRITE SYS$OUTPUT "Writing output of entry ''bproc_entry' in queue ''bproc_queue' to a new version of: "
01792a70 380$ WRITE SYS$OUTPUT STDOUT
6623414d
CB
381$ DELETE_/SYMBOL x
382$ DELETE_/SYMBOL bproc_queue
383$ DELETE_/SYMBOL bproc_entry
384$ DELETE_/SYMBOL bproc_name
385$ DELETE_/SYMBOL bproc_log_spec
01792a70
CB
386$ ELSE
387$ STDOUT = F$TRNLNM("SYS$OUTPUT")
388$ ENDIF
97abc6ad
HM
389$ DEFINE SYS$OUTPUT "_NLA0:"
390$ echo4 = "write STDOUT "
391$ cat4 = "TYPE/OUTPUT=''STDOUT'"
01792a70 392$ open/write/share=read STDOUT 'STDOUT'
97abc6ad
HM
393$ RETURN
394$!
395$Check_silence:
396$ IF (silent)
397$ THEN
398$ GOSUB Shut_up
399$ ELSE
400$ echo4 = "write SYS$OUTPUT "
401$ cat4 = "TYPE"
402$ ENDIF
403$!
404$!: run the defines and the undefines, if any, but leave the file out there...
405$! Unfortunately Configure.COM in DCL is not yet set up to do this -
406$! maybe someday
407$!
408$!: set package name
409$ package = "perl5"
f53b4005 410$ packageup = F$EDIT((package - "5"),"UPCASE")
97abc6ad
HM
411$!
412$!: Eunice requires " " instead of "", can you believe it
413$ echo ""
414$!: Here we go...
415$ echo "Beginning of configuration questions for ''package'."
416$ echo ""
417$!
418$!: Some greps do not return status, grrr.
419$ contains = "SEARCH"
420$!
421$!: first determine how to suppress newline on echo command !cant DCL is record oriented
422$! echo "Checking ''echo' to see how to suppress newlines..."
423$! echo "giving up..."
424$! echo "The star should be here-->*"
425$!
426$!: Now test for existence of everything in MANIFEST
427$ echo ""
428$ echo4 "First let's make sure your kit is complete. Checking..."
429$ manifestfound = ""
430$ miss_list = ""
a5fddd44 431$! Here I assume we are in the [foo.PERLxxx...] tree
97abc6ad
HM
432$! because the search routine simply does set def [-] if necessary.
433$ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
434$Research_manifest:
435$ manifestfound = F$SEARCH(file_2_find)
436$ IF (manifestfound .EQS. "")
437$ THEN
438$ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
439$ THEN
440$ SET DEFAULT [-]
441$ GOTO Research_manifest
442$ ELSE
443$ echo ""
444$ echo "There is no MANIFEST file. I hope your kit is complete !"
445$ miss_list = ""
446$ GOTO Beyond_manifest
447$ ENDIF
448$ ELSE
dab31494
PP
449$! MANIFEST. has been found and we have set def'ed there.
450$! Time to bail out before it's too late, i.e. too deep.
451$! Depth check is unnecessary on Alpha VMS V7.2++ (even for ODS-2).
452$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
453$ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
454$! Depth check also unnecessary on ODS 5 (or later) file systems.
455$ tmp = F$INTEGER(F$GETDVI(F$ENVIRONMENT("DEFAULT"),"ACPTYPE") - "F11V")
456$ IF (tmp .GE. 5) THEN GOTO Beyond_depth_check
457$ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("DEFAULT")).nes.".")
97abc6ad
HM
458$ THEN
459$ TYPE SYS$INPUT:
7558ebc2 460$ DECK
97abc6ad
HM
461%Config-E-VMS, ERROR:
462 Sorry! It apears as though your perl build sub-directory is already too
463 deep into the VMS file system. Please try moving stuff into a shallower
464 directory (or altering the "max_allowed_dir_depth" parameter).
7558ebc2 465$ EOD
97abc6ad
HM
466$ echo4 "ABORTING..."
467$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
468$ STOP
469$ EXIT !2 !$STATUS = "%X00000002" (error)
470$ ENDIF
e6df7ed1 471$Beyond_depth_check:
97abc6ad
HM
472$!
473$! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
474$!
475$ IF (manifestfound .NES. "")
476$ THEN
477$ IF ( F$SEARCH("UU.DIR").EQS."" )
478$ THEN
479$ CREATE/DIRECTORY [.UU]
480$ ELSE
1171624b
CB
481$ IF ( F$SEARCH("[.UU.CXX_REPOSITORY]*.*").NES."" )
482$ THEN
483$ DELETE/NOLOG/NOCONFIRM [.UU.CXX_REPOSITORY]*.*;*
484$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) [.UU]CXX_REPOSITORY.DIR
485$ ENDIF
fcc434ad 486$ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM [.UU]*.*;*
97abc6ad
HM
487$ ENDIF
488$!: Configure runs within the UU subdirectory
489$ SET DEFAULT [.UU]
490$!
491$! a little redundancy never hurt anybody?
492$ file_2_find = "[-]" + file_2_find
493$ manifestfound = F$SEARCH(file_2_find)
494$!
495$ OPEN/WRITE MISSING MISSING.
496$!change to "FALSE" if you wish to skip the manifest search
497$!(which after all is rather slow in DCL :-)
c886fb20 498$ IF (maniskip)
97abc6ad 499$ THEN
c886fb20
CB
500$ echo "Skipping MANIFEST check as requested"
501$ ELSE
502$!
97abc6ad
HM
503$ OPEN/READ CONFIG 'manifestfound'
504$Read_loop_manifest:
505$ READ/END_OF_FILE = Done_manifest CONFIG line
506$! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
507$! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
508$! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
509$! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
510$ line = F$EDIT(line,"TRIM, COMPRESS")
511$ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
512$ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
513$ THEN
514$Re_strip_line_manifest:
515$ loca = F$LOCATE("/",file_2_find)
516$ ante = F$EXTRACT(0,loca,file_2_find)
517$ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
518$ test_this = ante + "." + (post - "/")
519$ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
520$ THEN
521$ file_2_find = ante + "." + (post - "/")
522$ GOTO Re_strip_line_manifest
523$ ELSE
524$ file_2_find = ante + "]" + (post - "/")
525$ ENDIF
526$ file_2_find = "[-."+file_2_find
527$ ELSE
528$ file_2_find = "[-]" + file_2_find
529$ ENDIF
530$!
adb2331d
CB
531$ tmp = F$PARSE(file_2_find + ";",,,,"SYNTAX_ONLY")
532$ IF F$SEARCH(tmp) .NES. "" THEN file_2_find = tmp
97abc6ad
HM
533$ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
534$ file_2_find = file_2_find - dirname
17d0565f
CB
535$!
536$! may not need double dot check on ODS-5 volumes
537$ found = F$SEARCH(dirname + file_2_find)
538$ IF found .NES. "" THEN GOTO Read_loop_manifest
539$!
97abc6ad
HM
540$ dots = 0
541$Dot_loop:
542$ dot_ele = F$ELEMENT(dots,".",file_2_find)
543$ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
544$ IF dots .eq. 0
545$ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
546$ ELSE basename = basename + dot_ele + "_"
547$ ENDIF
548$ dots = dots + 1
549$ GOTO dot_loop
550$Eo_dot_loop:
551$ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
552 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
553 basename = f$extract(0,f$length(basename)-1,basename)
554$ file_2_find = dirname + basename
555$!
556$ found = F$SEARCH(file_2_find)
146174a9
CB
557$ IF (found .EQS. "" .AND. dots .GT. 2)
558$ THEN
559$! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
560$! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
561$! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
53071e5e
CB
562$ dotloc = f$locate(".",basename)
563$ basename[dotloc,1] := "_"
564$ dot_ele = F$ELEMENT(dots - 1,"_",f$extract(dotloc,f$length(basename),basename))
146174a9
CB
565$ basename = -
566 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
567 + "." + dot_ele
568$ found = F$SEARCH(dirname + basename)
569$ file_2_find = file_2_find + "," + basename
570$ ENDIF
1bae32db
CB
571$ tildeloc = f$locate("~",basename)
572$ IF (found .EQS. "" .AND. tildeloc .LT. f$length(basename))
573$ THEN
574$ basename[tildeloc,1] := "_"
575$ found = F$SEARCH(dirname + basename)
576$ file_2_find = file_2_find + "," + basename
577$ ENDIF
97abc6ad
HM
578$ IF (found .EQS. "")
579$ THEN
580$ WRITE MISSING file_2_find
581$ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
582$ THEN
583$ miss_list = miss_list + "," + file_2_find
584$ ENDIF
585$ ENDIF
586$ GOTO Read_loop_manifest
587$Done_manifest:
588$ CLOSE CONFIG
589$ ENDIF !"TRUE"
590$ CLOSE MISSING
591$ ENDIF ! (manifestfound .NES. "")
592$Beyond_manifest:
593$ IF (miss_list .NES. "")
594$ THEN
595$ echo "Some of the files not found include:"
596$ cat4 MISSING.
597$ ENDIF
598$ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
599$ THEN
600$ TYPE SYS$INPUT:
7558ebc2
PP
601$ DECK
602
97abc6ad
HM
603
604THIS PACKAGE SEEMS TO BE INCOMPLETE.
605
606You have the option of continuing the configuration process, despite the
607distinct possibility that your kit is damaged, by typing 'y'es. If you
608do, don't blame me if something goes wrong. I advise you to type 'n'o
498336ed 609and contact the author (dan@sidhe.org)
97abc6ad 610
7558ebc2 611$ EOD
97abc6ad
HM
612$ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
613$ IF ans
614$ THEN
615$ echo4 "Continuing..."
616$ ELSE
617$ echo4 "ABORTING..."
618$ GOTO Clean_up
619$ ENDIF
620$ ELSE
621$ echo4 "Looks good..."
fcc434ad 622$ DELETE/NOLOG/NOCONFIRM MISSING.;
97abc6ad
HM
623$ ENDIF ! (miss_list .NES. "")
624$ ENDIF ! (manifestfound .EQS. "") ELSE
625$!
626$! after finding MANIFEST (see above)
627$!: Configure runs within the UU subdirectory
628$!
629$!: compute the number of columns on the terminal for proper question formatting
a3bd614a
PP
630$ IF F$MODE() .EQS. "BATCH"
631$! else it winds up being 512 in batch
632$ THEN COLUMNS = 80
633$ ELSE COLUMNS = F$GETDVI("SYS$OUTPUT","DEVBUFSIZ")
634$ ENDIF
635$! "-des" sets SYS$OUTPUT to NL: with a DEVBUFSIZ too large (512 again)
636$ IF COLUMNS .GT. 210 THEN COLUMNS = 80
637$! not sure if this would actually be needed - it hopefully will not hurt
638$ IF COLUMNS .LT. 40 THEN COLUMNS = 40
97abc6ad
HM
639$!
640$!: set up the echo used in my read !sfn
641$!: now set up to do reads with possible shell escape and default assignment !sfn
642$ GOTO Beyond_myread
643$!
a3bd614a
PP
644$! The sub_rp splitting is intended to handle long symbols such as the dflt for
645$! extensions.
646$!
97abc6ad
HM
647$myread:
648$ ans = ""
a3bd614a 649$ len_rp = F$LENGTH(rp)
a5fddd44 650$ If (.NOT. silent) Then echo ""
a3bd614a
PP
651$ IF len_rp .GT. 210
652$ THEN
653$ i_rp = 0
9b5c8979 654$ rp_loop:
a3bd614a 655$ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
a3bd614a 656$ i_rp = i_rp + COLUMNS
bf25f2b5 657$ if i_rp .LT. len_rp THEN echo4 "''sub_rp'"
9b5c8979 658$ IF i_rp .LT. len_rp THEN GOTO rp_loop
a3bd614a 659$ ELSE
9b5c8979 660$ sub_rp = rp
a3bd614a 661$ ENDIF
9b5c8979
JH
662$ if (fastread)
663$ then
664$ echo4 "''sub_rp'"
665$ else
666$ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
667$ endif
a5fddd44
PP
668$ IF (ans .EQS. "&-d")
669$ THEN
670$ echo4 "(OK, I will run with -d after this question.)"
9b5c8979
JH
671$ echo ""
672$ deferred_fastread =1
673$ goto myread
a5fddd44
PP
674$ ENDIF
675$ IF (ans .EQS. "&-s")
676$ THEN
677$ echo4 "(OK, I will run with -s after this question.)"
97abc6ad 678$ echo ""
9b5c8979
JH
679$ deferred_silent = 1
680$ goto myread
a3bd614a 681$ ENDIF
9b5c8979
JH
682$ if (bool_dflt .nes. "")
683$ then
684$ if (ans .eqs. "") then ans = bool_dflt
685$ ans = f$extract(0,1,f$edit(ans,"collapse,upcase"))
686$ if (ans .eqs. "Y" .or. ans .eqs. "1" .or. ans .eqs. "T")
687$ then
688$ ans = "Y"
689$ else
690$ if (ans .eqs. "N" .or. ans .eqs. "0" .or. ans .eqs. "F")
691$ then
692$ ans = "N"
693$ else
694$ echo4 "Input not understood please answer 'Yes' or 'No'"
695$ goto myread
696$ endif
697$ endif
698$ bool_dflt = ""
699$ else
700$ ans = f$edit(ans,"trim,compress")
701$ if (ans .eqs. "") then ans = dflt
702$ if (f$edit(ans,"upcase") .eqs. "NONE") then ans = ""
703$ endif
704$ if f$type(deferred_silent) .nes. ""
705$ then
a5fddd44
PP
706$ silent := true
707$ GOSUB Shut_up
9b5c8979 708$ delete/symbol deferred_silent
a5fddd44 709$ ENDIF
9b5c8979
JH
710$ if f$type(deferred_fastread) .nes. ""
711$ then
712$ fastread = 1
713$ delete/symbol deferred_fastread
714$ endif
97abc6ad
HM
715$ RETURN
716$!
717$Beyond_myread:
718$!
719$!: create .config dir to save info across Configure sessions
720$ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
721$ THEN
722$ CREATE/DIRECTORY [-.CONFIG]
723$ OPEN/WRITE CONFIG [-.CONFIG]README.
724$ WRITE CONFIG -
725 "This directory created by Configure to save information that should"
726$ WRITE CONFIG -
727 "persist across sessions."
728$ WRITE CONFIG ""
729$ WRITE CONFIG -
730 "You may safely delete it if you wish."
731$ CLOSE CONFIG
732$ ENDIF
733$!
56aeb0ae
PP
734$ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n
735$ patchlevel_h = F$SEARCH("[-]patchlevel.h")
736$ IF (patchlevel_h.NES."")
737$ THEN
7558ebc2 738$ SEARCH 'patchlevel_h' "define","PERL_VERSION","epoch"/match=and/out=[]ver.out
59a27e12 739$ IF .NOT. usedevel .AND. usedevel .NES. "define"
56aeb0ae
PP
740$ THEN
741$ OPEN/READ CONFIG []ver.out
742$ READ CONFIG line
743$ CLOSE CONFIG
744$ tmp = F$EDIT(line,"TRIM,COMPRESS")
745$ xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp))
746$ line = xpatchlevel / 2
747$ tmp = xpatchlevel - ( line * 2 )
748$ IF tmp .NE. 0
749$ THEN
750$ echo4 "patchlevel is " + F$STRING(xpatchlevel)
751$ cat4 SYS$INPUT:
7558ebc2 752$ DECK
56aeb0ae
PP
753*** WHOA THERE!!! ***
754
755 This is an UNSTABLE DEVELOPMENT release.
756 (The patchlevel, is odd--as opposed to even,
757 and that signifies a development release. If you want a
758 maintenance release, you want an even-numbered release.)
759
760 Do ***NOT*** install this into production use.
761 Data corruption and crashes are possible.
762
763 It is most seriously suggested that you do not continue any further
764 unless you want to help in developing and debugging Perl.
765
7558ebc2 766$ EOD
9b5c8979
JH
767$ bool_dflt="n"
768$ rp="Do you really want to continue? [''bool_dflt'] "
c66e9063
CL
769$ fastread_save = fastread
770$ fastread := FALSE
56aeb0ae 771$ GOSUB myread
c66e9063
CL
772$ fastread = fastread_save
773$ delete/symbol fastread_save
56aeb0ae
PP
774$ IF ans
775$ THEN
776$ echo4 "Okay, continuing."
777$ ELSE
778$ echo4 "Okay, bye."
779$ DELETE/NOLOG/NOCONFIRM []ver.out;
780$ GOTO Clean_up
56aeb0ae
PP
781$ ENDIF
782$ ENDIF
783$ DELETE/SYMBOL line
784$ DELETE/SYMBOL tmp
785$ ENDIF
786$ DELETE/NOLOG/NOCONFIRM []ver.out;
787$ ENDIF
97abc6ad
HM
788$!: general instructions
789$ needman = "true"
790$ firsttime = "true"
791$ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
792$ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
793$ THEN
794$ messages = F$ENVIRONMENT("MESSAGE")
a3ef2c6f 795$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
97abc6ad
HM
796$ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
797$ IF .NOT.($status.EQ.%X08D78053)
798$ THEN
799$ firsttime=""
9b5c8979
JH
800$ bool_dflt = "n"
801$ rp = "Would you like to see the instructions? [''bool_dflt'] "
97abc6ad
HM
802$ GOSUB myread
803$ if .NOT.ans THEN needman=""
804$ ENDIF
a3ef2c6f 805$ SET MESSAGE 'messages'
97abc6ad
HM
806$ ENDIF
807$ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
808$!
809$ IF (needman)
810$ THEN
811$ TYPE SYS$INPUT:
7558ebc2 812$ DECK
97abc6ad
HM
813
814This installation shell script will examine your system and ask you questions
815to determine how the perl5 package should be installed. If you get
816stuck on a question, you may use a ^C or ^Y shell escape to STOP this
817process, edit something, then restart this process as you just did.
818Many of the questions will have default answers in square
819brackets; typing carriage return will give you the default.
820
7558ebc2 821$ EOD
96021e87
JM
822$ if (fastread)
823$ then
824$ echo4 ""
825$ else
826$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
827$ endif
97abc6ad 828$ TYPE SYS$INPUT:
7558ebc2 829$ DECK
97abc6ad 830
a3ef2c6f 831In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
97abc6ad 832the questions and use the computed defaults (or the previous answers provided
a3ef2c6f 833there was already a config.sh file). Type '@Configure "-h"' for a list of
97abc6ad
HM
834options.
835
7558ebc2 836$ EOD
96021e87
JM
837$ if (fastread)
838$ then
839$ echo4 ""
840$ else
841$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
842$ endif
97abc6ad 843$ TYPE SYS$INPUT:
7558ebc2 844$ DECK
97abc6ad
HM
845
846Much effort has been expended to ensure that this shell script will
847run on any VMS system. If despite that it blows up on yours, your
848best bet is to edit Configure.com and @ it again. Whatever problems
498336ed 849you have with Configure.com, let me (dan@sidhe.org) know how I blew
97abc6ad
HM
850it.
851
7558ebc2 852$ EOD
97abc6ad
HM
853$!This installation script affects things in two ways:
854$!
855$!1) it may do direct variable substitutions on some of the files included
856$! in this kit.
857$!2) it builds a config.h file for inclusion in C programs. You may edit
858$! any of these files as the need arises after running this script.
859$!
860$!If you make a mistake on a question, there is no easy way to back up to it
861$!currently.
862$!
96021e87
JM
863$ if (fastread)
864$ then
865$ echo4 ""
866$ else
867$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
868$ endif
97abc6ad
HM
869$ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
870$ THEN
871$ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
872$ WRITE CONFIG user
873$ CLOSE CONFIG
874$ ENDIF
875$ ENDIF !(needman .EQS. "true")
876$!
877$!: see if sh knows # comments !sfn
97abc6ad
HM
878$!: figure out how to guarantee sh startup !sfn
879$!: find out where common programs are !sfn
880$!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
5869b1f1 881$!trylist="byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
97abc6ad
HM
882$! echo "I don't know where '$file' is, and my life depends on it."
883$! echo "Go find a public domain implementation or fix your PATH setting!"
884$! echo ""
885$! echo "Don't worry if any of the following aren't found..."
96021e87 886$!: determine whether symbolic links are supported !sfn !jem- further down
97abc6ad
HM
887$!: see whether [:lower:] and [:upper:] are supported character classes !sfn
888$!: set up the translation script tr, must be called with ./tr of course !sfn
889$!
890$!: Try to determine whether config.sh was made on this system
891$!: Get old answers from old config file if Configure was run on the
892$!: same system, otherwise use the hints.
bf12dbb5 893$ config_sh_es = "''config_sh'/[-]config.sh/"
97abc6ad
HM
894$ i = 0
895$ max = 3
896$Config_sh_look:
897$ config_sh = F$ELEMENT(i,"/",config_sh_es)
898$ i = i + 1
899$ IF (config_sh.NES."/").AND.(config_sh.NES."")
900$ THEN
901$ configshfound = F$SEARCH(config_sh)
902$ IF (configshfound.NES."") THEN GOTO Config_sh_found
903$ ENDIF
904$ IF (i.LT.max) THEN GOTO Config_sh_look
56aeb0ae 905$ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
570bb66e
JH
906$ IF (configshfound.EQS."")
907$ THEN
908$ config_sh = "[-]config.sh" ! the fallback default
909$ GOTO Beyond_config_sh
910$ ENDIF
97abc6ad 911$Config_sh_found:
56aeb0ae 912$ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
9b5c8979
JH
913$ bool_dflt = "n"
914$ IF F$TYPE(config_dflt) .NES. "" THEN bool_dflt = config_dflt
915$ rp = "Shall I use ''config_sh' for default answers? [''bool_dflt'] "
570bb66e
JH
916$ GOSUB myread
917$ IF ans
918$ THEN
919$ echo ""
920$ echo "Fetching default answers from ''config_sh'..."
921$!
9b5c8979
JH
922$! we do our own parsing of the shell-script stuff
923$! ...and only accept symbols if they're in the | delimited list below
924$!
925$ config_symbols0 ="|archlib|archlibexp|bin|binexp|builddir|cf_email|config_sh|installarchlib|installbin|installman1dir|installman3dir|"
926$ config_symbols1 ="|installprivlib|installscript|installsitearch|installsitelib|most|oldarchlib|oldarchlibexp|osname|pager|perl_symbol|perl_verb|"
85fac3a9 927$ config_symbols2 ="|prefix|privlib|privlibexp|scriptdir|sitearch|sitearchexp|sitebin|sitelib|sitelib_stem|sitelibexp|usecxx|use64bitall|use64bitint|"
50ddda1d 928$ config_symbols3 ="|usecasesensitive|usedefaulttypes|usedevel|useieee|useithreads|uselongdouble|usemultiplicity|usemymalloc|usedebugging_perl|"
712b953a 929$ config_symbols4 ="|usesecurelog|usethreads|usevmsdebug|usefaststdio|usemallocwrap|unlink_all_versions|uselargefiles|usesitecustomize|"
139a355e 930$ config_symbols5 ="|buildmake|builder|usethreadupcalls|usekernelthreads|useshortenedsymbols|useversionedarchname"
9b5c8979
JH
931$!
932$ open/read CONFIG 'config_sh'
933$ rd_conf_loop:
934$ read/end=erd_conf_loop CONFIG line
935$ line = f$edit(line,"trim")
936$ if line .eqs. "" .or. f$extract(0,1,line) .eqs. "#" then goto rd_conf_loop
937$ sym = f$element(0,"=",line)
938$ if sym .eqs. "=" then goto rd_conf_loop
939$ dsym = "|"+sym+"|"
940$ k = 0
941$ rd_ck_loop:
942$ syms = config_symbols'k'
943$ j = f$locate(dsym, syms)
944$ if j .lt. f$length(syms) then goto erd_ck_loop
945$ k = k + 1
96021e87 946$ if k .lt. 6 then goto rd_ck_loop
9b5c8979
JH
947$ goto rd_conf_loop
948$ erd_ck_loop:
949$ val = f$element(1,"=",line)
950$ val = f$extract(1,f$length(val)-2,val)
951$ write sys$output "''sym' = ""''val'"""
952$ 'sym' = "''val'"
953$ goto rd_conf_loop
954$ erd_conf_loop:
955$ close CONFIG
956$ delete/symbol config_symbols0
957$ delete/symbol config_symbols1
958$ delete/symbol config_symbols2
959$ delete/symbol config_symbols3
960$ delete/symbol config_symbols4
96021e87 961$ delete/symbol config_symbols5
9b5c8979
JH
962$ delete/symbol sym
963$ delete/symbol val
964$ delete/symbol dsym
965$ if f$type(usedebugging_perl) .nes. ""
966$ then
6a0e5042 967$ DEBUGGING = usedebugging_perl
9b5c8979
JH
968$ delete/symbol usedebugging_perl
969$ endif
570bb66e
JH
970$!
971$ ENDIF
9b5c8979 972$ if f$type(config_dflt) .nes. "" then DELETE/SYMBOL config_dflt
570bb66e 973$!
97abc6ad
HM
974$!we actually do not have "hints/" for VMS
975$! TYPE SYS$INPUT:
7558ebc2 976$! DECK
97abc6ad
HM
977$!
978$!First time through, eh? I have some defaults handy for the following systems:
979$!
7558ebc2 980$! EOD
97abc6ad
HM
981$! echo " ","VMS_VAX"
982$! echo " ","VMS_AXP"
a50752f9 983$! echo " ","VMS_IA64"
97abc6ad
HM
984$! : Now look for a hint file osname_osvers, unless one has been
985$! : specified already.
986$! TYPE SYS$INPUT:
987$!
988$!You may give one or more space-separated answers, or "none" if appropriate.
989$!If your OS version has no hints, DO NOT give a wrong version -- say "none".
990$!
991$! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
992$!
993$Beyond_config_sh:
994$!
995$!: Restore computed paths !sfn
996$!
97abc6ad
HM
997$! %Config-I-VMS, a necessary error trap (could be PC running VCL)
998$!
999$ IF (osname .NES. "VMS")
1000$ THEN
1001$ echo4 "Hmm.. I wonder what ''osname' is (?)"
1002$ TYPE SYS$INPUT:
7558ebc2 1003$ DECK
97abc6ad
HM
1004
1005%Config-E-VMS, ERROR:
1006
1007 Err, you do not appear to be running VMS!
146174a9 1008 This procedure is intended to Configure the building of Perl for VMS.
97abc6ad 1009
7558ebc2 1010$ EOD
9b5c8979
JH
1011$ bool_dflt = "n"
1012$ GOSUB myread
97abc6ad
HM
1013$ IF ans
1014$ THEN
1015$ echo4 "Continuing..."
1016$ ELSE
1017$ echo4 "ABORTING..."
1018$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
1019$ STOP
1020$ EXIT 2 !$STATUS = "%X00000002" (error)
1021$ ENDIF
97abc6ad
HM
1022$ ENDIF !(osname .NES./.EQS. "VMS")
1023$!
1024$!: who configured the system
97abc6ad 1025$ cf_by = F$EDIT(user,"LOWERCASE")
08c7cbbb 1026$ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
97abc6ad
HM
1027$!
1028$! Peter Prymmer has seen:
1029$! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
1030$! "SYS$TIME_ZONE" = "EDT"
1031$!
1032$! Charles Lane recommended:
1033$! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
1034$! "NEWS_TIMEZONE" = "-0500"
1035$! "ST_TIMEZONE" = "EDT"
1036$! "JAN_TIME_ZONE" = "EST "
1037$! "MULTINET_TIMEZONE" = "EST"
1038$! "DAYLIGHT_SAVINGS" = "1"
1039$!
1040$! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
1041$! "PMDF_Timezone"
1042$! "Multinet_Timezone"
1043$! "TCPware_Timezone"
1044$! "WIN$Time_Zone"
1045$!
1046$! This snippet o' DCL returns a string in default Unix `date` format,
1047$! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
97abc6ad
HM
1048$!
1049$ MIN_TZO = -840 !units are minutes here
1050$ MAX_TZO = 840
1051$!
1052$ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
1053$ monn = F$CVTIME(,,"MONTH")
1054$ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
1055$ hour = F$CVTIME(,,"HOUR")
1056$ min = F$CVTIME(,,"MINUTE")
1057$ sec = F$CVTIME(,,"SECOND")
1058$ year = F$CVTIME(,,"YEAR")
1059$!
1060$ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
1061$ i = 0
1062$Mon_loop:
1063$ i = i + 1
1064$ mon = F$ELEMENT(i,"/",months)
1065$ IF i.LT.monn THEN GOTO Mon_loop
1066$!
1067$ tzneedset = "t"
1068$ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
1069$ IF systz.NES.""
1070$ THEN
1071$ tzhour = F$INTEGER(systz)/3600
1072$ tzmins = F$INTEGER(systz)/60
1073$ tzminrem = tzmins - tzhour*60
1074$ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
1075$ IF tzhour.ge.0
1076$ THEN signothetime = "+"
1077$ IF tzhour.EQ.0.AND.tzminrem.EQ.0
1078$ THEN direction = "on GMT/"
1079$ ELSE direction = "east of "
1080$ ENDIF
1081$ ELSE signothetime = "-"
1082$ tzhour = -1*tzhour !keeps !UL happy
1083$ direction = "west of "
1084$ ENDIF
1085$ echo ""
97abc6ad
HM
1086$ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
1087$ IF tzminrem.ne.0
1088$ THEN
1089$ tzspan = "''tzhour' hours & ''tzminrem' minutes"
1090$ ELSE
1091$ tzspan = "''tzhour' hours"
1092$ ENDIF
9b5c8979 1093$ bool_dflt = "y"
97abc6ad 1094$ echo "Your system is ''tzspan' ''direction'UTC in England."
9b5c8979 1095$ rp = "(''systz') Is this UTC Time Zone Offset correct? [''bool_dflt'] "
97abc6ad 1096$ GOSUB myread
9b5c8979 1097$ IF ans
97abc6ad
HM
1098$ THEN
1099$ tzneedset = "f"
1100$ tzd = systz
1101$ GOTO Beyond_TimeZone
1102$ ENDIF
1103$ ELSE
1104$ echo ""
97abc6ad
HM
1105$ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
1106$ ENDIF
1107$!
1108$TZSet:
1109$ echo ""
1110$ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
146174a9 1111$ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
97abc6ad
HM
1112$ echo "Eastern Daylight Time (summer) is -4:00 offset."
1113$ dflt = "0:00"
1114$ rp = "Enter the Time Zone offset: [''dflt'] "
1115$ GOSUB myread
1116$ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
1117$ IF ans.EQS."" THEN ans = dflt
1118$ tzhour = F$ELEMENT(0,":","''ans'") !first
1119$ IF tzhour.EQS."" THEN tzhour = 0
1120$ tzhour = F$INTEGER(tzhour)
1121$ tzminrem = F$ELEMENT(1,":","''ans'") !second
1122$ IF tzminrem.NES.""
1123$ THEN
1124$ tzminrem = F$INTEGER(tzminrem)
1125$ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
1126$ ELSE
1127$ tzminrem = 0
1128$ ENDIF
1129$ tzmins = tzhour*60 + tzminrem
1130$ tzd = F$STRING(tzmins*60)
1131$ IF tzhour .GE. 0
1132$ THEN
1133$ signothetime = "+"
1134$ ELSE
1135$ tzhour = -1*tzhour !keeps !UL happy
1136$ signothetime = "-"
1137$ ENDIF
1138$ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
1139$ THEN
1140$ echo ""
1141$ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
1142$ goto TZSet
1143$ ENDIF
1144$!
1145$Beyond_TimeZone:
1146$ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
1147$ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
1148$!
4581ada3
CB
1149$! This quotation from Configure has to be included on VMS:
1150$!
1151$ TYPE SYS$INPUT:
1152$ DECK
1153
1154There is, however, a strange, musty smell in the air that reminds me of
1155something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
1156$ EOD
1157$!
1158$! Determine the architecture name. For now we just get the base
1159$! architecture name, which may accumulate various minus sign-delimited
1160$! appendages later depending on configuration options. But we need the
1161$! base name early because not all questions are worth asking on all
1162$! platforms.
1163$!
1164$! Please use F$ELEMENT(0,"-",archname) .EQS. "VMS_VAX" (or "VMS_AXP" or
1165$! "VMS_IA64") from here on to allow cross-platform configuration (e.g.
55315086 1166$! configure a VAX build on an Alpha).
97abc6ad 1167$!
a50752f9 1168$ IF (F$GETSYI("HW_MODEL") .LT. 1024 .AND. F$GETSYI("HW_MODEL") .GT. 0)
97abc6ad
HM
1169$ THEN
1170$ archname = "VMS_VAX"
a50752f9 1171$ otherarch = "an Alpha or IA64"
08c7cbbb
GS
1172$ alignbytes="8"
1173$ arch_type = "ARCH-TYPE=__VAX__"
97abc6ad 1174$ ELSE
a50752f9
CB
1175$ IF (F$GETSYI("ARCH_TYPE") .EQ. 2)
1176$ THEN
1177$ archname = "VMS_AXP"
1178$ otherarch = "a VAX or IA64"
1179$ arch_type = "ARCH-TYPE=__AXP__"
1180$ ELSE
1181$ archname = "VMS_IA64"
1182$ otherarch = "a VAX or Alpha"
1183$ arch_type = "ARCH-TYPE=__IA64__"
1184$ ENDIF
08c7cbbb 1185$ alignbytes="8"
97abc6ad 1186$ ENDIF
86fced14 1187$!
97abc6ad 1188$!: set the base revision
08c7cbbb
GS
1189$ baserev="5.0"
1190$ revision = baserev - ".0"
97abc6ad
HM
1191$!: get the patchlevel
1192$ echo ""
570bb66e 1193$ echo4 "Getting the current patchlevel..."
5cda9808
CB
1194$ patchlevel="0"
1195$ subversion="0"
1196$ api_revision="0"
1197$ api_version="0"
1198$ api_subversion="0"
1199$ perl_patchlevel="0"
97abc6ad
HM
1200$ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1201$ IF (patchlevel_h.NES."")
1202$ THEN
1203$ got_patch = "false"
1204$ got_sub = "false"
08c7cbbb
GS
1205$ got_api_revision = "false"
1206$ got_api_version = "false"
1207$ got_api_subversion = "false"
9ec25520 1208$ got_perl_patchlevel= "false"
97abc6ad
HM
1209$ OPEN/READONLY CONFIG 'patchlevel_h'
1210$Patchlevel_h_loop:
570bb66e 1211$ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
cceca5ed 1212$ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
97abc6ad
HM
1213$ THEN
1214$ line = F$EDIT(line,"COMPRESS, TRIM")
cc391245 1215$ patchlevel = F$ELEMENT(2," ",line)
97abc6ad
HM
1216$ got_patch = "true"
1217$ ENDIF
cceca5ed 1218$ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
97abc6ad
HM
1219$ THEN
1220$ line = F$EDIT(line,"COMPRESS, TRIM")
cc391245 1221$ subversion = F$ELEMENT(2," ",line)
97abc6ad
HM
1222$ got_sub = "true"
1223$ ENDIF
08c7cbbb
GS
1224$ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1225$ THEN
1226$ line = F$EDIT(line,"COMPRESS, TRIM")
1227$ api_revision = F$ELEMENT(2," ",line)
1228$ got_api_revision = "true"
1229$ ENDIF
1230$ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1231$ THEN
1232$ line = F$EDIT(line,"COMPRESS, TRIM")
1233$ api_version = F$ELEMENT(2," ",line)
1234$ got_api_version = "true"
1235$ ENDIF
1236$ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1237$ THEN
1238$ line = F$EDIT(line,"COMPRESS, TRIM")
1239$ api_subversion = F$ELEMENT(2," ",line)
1240$ got_api_subversion = "true"
1241$ ENDIF
9ec25520
CB
1242$ IF ((F$LOCATE("""DEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1243$ THEN
1244$ line = F$EDIT(line,"COMPRESS, TRIM")
1245$ perl_patchlevel = F$ELEMENT(1,"""",line)
1246$ perl_patchlevel = perl_patchlevel - "DEVEL"
1247$ got_perl_patchlevel = "true"
1248$ ENDIF
c4ac6101
CB
1249$ IF ((F$LOCATE("""SMOKE",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1250$ THEN
1251$ line = F$EDIT(line,"COMPRESS, TRIM")
1252$ perl_patchlevel = F$ELEMENT(1,"""",line)
1253$ perl_patchlevel = perl_patchlevel - "SMOKE"
1254$ got_perl_patchlevel = "true"
1255$ ENDIF
1256$ IF ((F$LOCATE("""MAINT",line).NE.F$LENGTH(line)).AND.(.NOT.got_perl_patchlevel))
1257$ THEN
1258$ line = F$EDIT(line,"COMPRESS, TRIM")
1259$ perl_patchlevel = F$ELEMENT(1,"""",line)
1260$ perl_patchlevel = perl_patchlevel - "MAINT"
1261$ got_perl_patchlevel = "true"
1262$ ENDIF
cd30eb94
PP
1263$ IF (.NOT. got_patch) .OR. -
1264 (.NOT. got_sub) .OR. -
1265 (.NOT. got_api_revision) .OR. -
1266 (.NOT. got_api_version) .OR. -
9ec25520
CB
1267 (.NOT. got_api_subversion) .OR. -
1268 (.NOT. got_perl_patchlevel) -
cd30eb94 1269 THEN GOTO Patchlevel_h_loop
97abc6ad
HM
1270$Close_patch:
1271$ CLOSE CONFIG
97abc6ad 1272$ ENDIF
8c541774
CB
1273$!
1274$ IF F$SEARCH("[-].patch") .NES. ""
1275$ THEN
1276$ SET NOON
1277$ OPEN/READ PATCH [-].patch
1278$ READ PATCH line
1279$ CLOSE PATCH
9c3905ef
CB
1280$ tmp = F$EDIT(line,"TRIM,COMPRESS")
1281$ IF F$ELEMENT(3, " ", tmp) .NES. "" THEN tmp = F$ELEMENT(3, " ", tmp)
8c541774 1282$ SET ON
9c3905ef 1283$ IF tmp .NES. "" THEN perl_patchlevel = tmp
8c541774
CB
1284$ ENDIF
1285$!
9ec25520
CB
1286$ version_patchlevel_string = "version ''patchlevel' subversion ''subversion'"
1287$ IF got_perl_patchlevel .AND. perl_patchlevel .NES. "0"
97abc6ad 1288$ THEN
9ec25520 1289$ version_patchlevel_string = "''version_patchlevel_string' patch ''perl_patchlevel'"
97abc6ad 1290$ ENDIF
9ec25520 1291$ echo "(You have ''package' ''version_patchlevel_string'.)"
97abc6ad 1292$!
08c7cbbb 1293$ version = revision + "_" + patchlevel + "_" + subversion
97abc6ad 1294$!
4581ada3
CB
1295$!: see if we need a special compiler
1296$! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
97abc6ad 1297$!
4581ada3
CB
1298$ nocc = "f"
1299$ vms_cc_dflt = ""
1300$ vms_cc_available = ""
1301$!
1302$ OPEN/WRITE CONFIG ccvms.c
1303$ WRITE CONFIG "#ifdef __DECC"
1304$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1305$ WRITE CONFIG "#endif"
1306$ WRITE CONFIG "#include <stdio.h>"
1307$ WRITE CONFIG "int main() {"
1308$ WRITE CONFIG "#ifdef __DECC"
1309$ WRITE CONFIG " printf(""/DECC\n"");"
1310$ WRITE CONFIG "#else"
1311$ WRITE CONFIG " printf(""/VAXC\n"");"
1312$ WRITE CONFIG "#endif"
1313$ WRITE CONFIG " exit(0);"
1314$ WRITE CONFIG "}"
1315$ CLOSE CONFIG
1316$!
1317$ SET NOON
1318$ DEFINE/USER_MODE SYS$ERROR _NLA0:
1319$ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
1320$ cc/NoObj/list=ccvms.lis ccvms.c
1321$ tmp = $status
1322$ SET ON
1323$ IF (silent) THEN GOSUB Shut_up
1324$ IF tmp.NE.%X10B90001
1325$ THEN
1326$ IF tmp.NE.%X10000001
1327$ THEN
1328$ nocc = "t" !%X10000001 is return from gcc
1329$ GOTO Gcc_initial_check
1330$ ENDIF
1331$ ENDIF
1332$!
1333$ GOSUB List_Parse
1334$ IF .NOT.silent THEN echo ""
1335$ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1336$ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1337$ THEN
1338$ IF .NOT.silent
97abc6ad 1339$ THEN
4581ada3 1340$ echo "Will try cc/decc..."
97abc6ad 1341$ ENDIF
4581ada3
CB
1342$ SET NOON
1343$ DEFINE/USER_MODE SYS$ERROR NL:
1344$ DEFINE/USER_MODE SYS$OUTPUT NL:
1345$ cc/decc/NoObj/list=ccvms.lis ccvms.c
1346$ tmp = $status
1347$ SET ON
1348$ IF (silent) THEN GOSUB Shut_up
1349$ IF tmp.NE.%X10B90001
7558ebc2 1350$ THEN
4581ada3
CB
1351$ echo "Apparently you don't have that one."
1352$ ELSE
1353$ GOSUB List_parse
1354$ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
1355$ vms_cc_available = vms_cc_available + "cc/decc "
97abc6ad 1356$ ENDIF
4581ada3
CB
1357$ ELSE
1358$ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line)) -
1359 .or.(F$LOCATE("HP",F$EDIT(line,"UPCASE")).NE.F$LENGTH(line))
1360$ THEN
1361$ vms_cc_dflt = "/decc"
1362$ vms_cc_available = vms_cc_available + "cc/decc "
570bb66e 1363$ ENDIF
4581ada3 1364$ ENDIF
97abc6ad
HM
1365$!
1366$Gcc_initial_check:
570bb66e 1367$ echo "Checking for gcc"
97abc6ad 1368$ OPEN/WRITE CONFIG gccvers.lis
41cbbefa 1369$ SET NOON
570bb66e
JH
1370$ DEFINE/USER_MODE SYS$ERROR CONFIG
1371$ DEFINE/USER_MODE SYS$OUTPUT CONFIG
97abc6ad
HM
1372$ 'gcc_symbol'/noobj/version _nla0:
1373$ tmp = $status
41cbbefa 1374$ SET ON
97abc6ad
HM
1375$ IF (silent) THEN GOSUB Shut_up
1376$ CLOSE CONFIG
1377$ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1378$ THEN
7558ebc2 1379$ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you do not have it."
570bb66e
JH
1380$ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1381$ GOTO Cxx_initial_check
97abc6ad
HM
1382$ ENDIF
1383$ OPEN/READ CONFIG gccvers.lis
1384$GCC_List_Read:
1385$ READ/END_OF_FILE=GCC_List_End CONFIG line
1386$ GOTO GCC_List_Read
1387$GCC_List_End:
1388$ CLOSE CONFIG
1389$ echo line
1390$ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1391$ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1392$!
570bb66e
JH
1393$Cxx_initial_check:
1394$!
85fac3a9 1395$! In order to build with the HP C++ compiler, invoke configure.com with "-Dusecxx" on
7558ebc2 1396$! the command line.
570bb66e 1397$!
85fac3a9
CB
1398$ IF F$TYPE(usecxx) .EQS. "" THEN usecxx := n
1399$ IF usecxx .OR. usecxx .EQS. "define"
570bb66e
JH
1400$ THEN
1401$!
1402$ echo "Checking for CXX..."
1403$ OPEN/WRITE CONFIG ccvms.c
1404$ WRITE CONFIG "#include <iostream>"
1405$ WRITE CONFIG "int main() {"
1406$ WRITE CONFIG "#ifdef __DECCXX"
1407$ WRITE CONFIG " cout << __DECCXX, endl;"
1408$ WRITE CONFIG "#else"
1409$ WRITE CONFIG " cout << 0,endl;"
1410$ WRITE CONFIG "#endif"
1411$! Todo: add G++ identifier check ??
1412$ WRITE CONFIG " return(0);"
1413$ WRITE CONFIG "}"
1414$ CLOSE CONFIG
1415$ SET NOON
1416$ DEFINE/USER_MODE SYS$OUTPUT NL:
1417$ DEFINE/USER_MODE SYS$ERROR NL:
1418$ cxx ccvms.c
1419$ tmp = $status
1420$ SET ON
1421$! success $status with:
1422$! DEC C++ V1.1-001 on VMS VAX V5.5-2
1423$! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1424$! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1425$! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1426$ IF tmp .eq. %X15F60001
1427$ THEN
1428$! Which linker?
1429$ SET NOON
1430$ DEFINE/USER_MODE SYS$OUTPUT NL:
1431$ DEFINE/USER_MODE SYS$ERROR NL:
96021e87 1432$ link/nodebug ccvms.obj
570bb66e
JH
1433$ tmp = $status
1434$ SET ON
1435$ ! success $status with:
1436$ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1437$ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1438$ IF tmp .eq. %X10000001
1439$ THEN
85fac3a9 1440$ ld_try = "Link/nodebug"
570bb66e
JH
1441$ vms_cc_available = vms_cc_available + "cxx "
1442$ echo "CXX and LINK are available."
1443$ ELSE
1444$ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1445$ SET NOON
1446$ DEFINE/USER_MODE SYS$OUTPUT NL:
1447$ DEFINE/USER_MODE SYS$ERROR NL:
1448$ cxxlink ccvms.obj
1449$ tmp = $status
1450$ SET ON
1451$ ! success $status with:
1452$ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1453$ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1454$ IF tmp .eq. %X10000001
1455$ THEN
1456$ ld_try = "cxxlink"
1457$ vms_cc_available = vms_cc_available + "cxx "
1458$ echo "CXX and CXXLINK are available."
1459$ ENDIF
1460$ ENDIF
1461$ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1462$ ELSE
1463$ echo "Nope."
1464$ ENDIF
1465$ DELETE/NOLOG/NOCONFIRM ccvms.c;
1466$ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1467$ CALL Cxx_demangler_cleanup
1468$!
1469$ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1470$!
97abc6ad
HM
1471$CC_Cleanup:
1472$ DELETE/NOLOG/NOCONFIRM ccvms.*;
1473$CC_Desired:
1474$!: see if we need a special compiler
1475$! echo ""
570bb66e 1476$ echo "Available compiler(s):"
97abc6ad
HM
1477$ echo "( ''vms_cc_available')"
1478$ IF .NOT.nocc
1479$ THEN
85fac3a9
CB
1480$ IF usecxx .OR. usecxx .EQS. "define"
1481$ THEN
1482$ dflt = "cxx"
1483$ ELSE
1484$ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1485$ ENDIF
97abc6ad
HM
1486$ ELSE
1487$ dflt = gcc_symbol
1488$ ENDIF
1489$ rp = "Use which C compiler? [''dflt'] "
1490$ GOSUB myread
1491$ IF ans.NES.""
1492$ THEN
1493$ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1494$ Mcc = ans
a50752f9
CB
1495$ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans)) -
1496 .or.(F$LOCATE("hp",ans).NE.F$LENGTH(ans))
97abc6ad
HM
1497$ THEN
1498$ Mcc = "cc/decc"
414b89cc
CB
1499$! CPQ ?
1500$ ccname := DEC
429a5e67 1501$ C_COMPILER_Replace = "CC=cc=''Mcc'"
97abc6ad 1502$ ENDIF
570bb66e
JH
1503$ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1504$ THEN
1505$ Mcc = "cxx"
414b89cc 1506$ ccname := CXX
570bb66e 1507$ ld = ld_try
7558ebc2
PP
1508$ C_COMPILER_Replace = "CC=cc=''Mcc'"
1509$ ELSE ! Not_cxx
1510$ IF Mcc.NES.dflt
97abc6ad 1511$ THEN
7558ebc2
PP
1512$ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1513 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt)
1514$ THEN
1515$ C_COMPILER_Replace = "CC=cc=''Mcc'"
1516$ ELSE
414b89cc 1517$ ccname := DEC
7558ebc2
PP
1518$ ENDIF
1519$ ELSE
1520$ IF Mcc .EQS. "cc/decc"
1521$ THEN
414b89cc 1522$ ccname := DEC
7558ebc2
PP
1523$ C_COMPILER_Replace = "CC=cc=''Mcc'"
1524$ ENDIF
97abc6ad
HM
1525$ ENDIF
1526$ ENDIF
1527$ ELSE
1528$ Mcc = dflt
1529$ IF Mcc .EQS. "cc/decc"
1530$ THEN
414b89cc 1531$ ccname := DEC
429a5e67 1532$ C_COMPILER_Replace = "CC=cc=''Mcc'"
97abc6ad 1533$ ENDIF
97abc6ad
HM
1534$ IF Mcc .EQS. "gcc"
1535$ THEN
414b89cc 1536$ ccname := GCC
429a5e67 1537$ C_COMPILER_Replace = "CC=cc=''Mcc'"
97abc6ad
HM
1538$ ENDIF
1539$ ENDIF
1540$Decc_Version_check:
570bb66e 1541$ ccversion=""
414b89cc 1542$ IF ccname .EQS. "DEC"
97abc6ad
HM
1543$ THEN
1544$ echo ""
7558ebc2 1545$ echo4 "Checking for the Dec C version number..."
97abc6ad
HM
1546$ OPEN/WRITE CONFIG deccvers.c
1547$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1548$ WRITE CONFIG "#include <stdio.h>"
1549$ WRITE CONFIG "int main() {"
1550$ WRITE CONFIG "#ifdef __DECC"
1551$ WRITE CONFIG "#ifdef __DECC_VER"
1552$ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1553$ WRITE CONFIG "#else"
1554$ WRITE CONFIG " printf(""%i\n"", ""1"");"
1555$ WRITE CONFIG "#endif"
1556$ WRITE CONFIG "#endif"
1557$ WRITE CONFIG " exit(0);"
1558$ WRITE CONFIG "}"
1559$ CLOSE CONFIG
570bb66e
JH
1560$ SET NOON
1561$ DEFINE/USER_MODE SYS$ERROR NL:
1562$ DEFINE/USER_MODE SYS$OUTPUT NL:
97abc6ad
HM
1563$ 'Mcc' deccvers.c
1564$ tmp = $status
97abc6ad 1565$ IF (silent) THEN GOSUB Shut_up
570bb66e
JH
1566$ DEFINE/USER_MODE SYS$ERROR NL:
1567$ DEFINE/USER_MODE SYS$OUTPUT NL:
96021e87 1568$ link/nodebug deccvers.obj
97abc6ad 1569$ tmp = $status
97abc6ad
HM
1570$ IF (silent) THEN GOSUB Shut_up
1571$ OPEN/WRITE CONFIG deccvers.out
570bb66e
JH
1572$ DEFINE/USER_MODE SYS$ERROR CONFIG
1573$ DEFINE/USER_MODE SYS$OUTPUT CONFIG
97abc6ad
HM
1574$ mcr []deccvers.exe
1575$ tmp = $status
570bb66e 1576$ SET ON
97abc6ad 1577$ CLOSE CONFIG
97abc6ad
HM
1578$ IF (silent) THEN GOSUB Shut_up
1579$ OPEN/READ CONFIG deccvers.out
1580$ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1581$Dec_c_cleanup:
1582$ CLOSE CONFIG
97abc6ad 1583$ echo "You are using Dec C ''line'"
570bb66e
JH
1584$ ccversion = line
1585$ Dec_C_Version = F$INTEGER(line)
2b4b3ebb 1586$ IF Dec_C_Version .GE. 60200000 .AND. F$ELEMENT(0, "-", archname) .NES. "VMS_VAX"
570bb66e
JH
1587$ THEN
1588$ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1589$ ccflags = ccflags + "/NOANSI_ALIAS"
1590$ ENDIF
1591$ DELETE/NOLOG/NOCONFIRM deccvers.*;
97abc6ad 1592$ ENDIF
97abc6ad 1593$Gcc_check:
570bb66e 1594$ gccversion = ""
414b89cc 1595$ IF ccname .EQS. "GCC"
97abc6ad 1596$ THEN
570bb66e
JH
1597$ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1598$ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1599$ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1600$ IF gcclib_olb .EQS. ""
97abc6ad 1601$ THEN
570bb66e
JH
1602$! These objects/libs come w/ gcc 2.7.2 for AXP:
1603$ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1604$ IF tmp .NES. "" then gcclib_olb = tmp
1605$ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1606$ IF tmp .NES. ""
1607$ THEN
1608$ IF gcclib_olb .EQS. ""
1609$ THEN gcclib_olb = tmp
1610$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1611$ ENDIF
97abc6ad 1612$ ENDIF
570bb66e
JH
1613$ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1614$ IF tmp .NES. ""
1615$ THEN
1616$ IF gcclib_olb .EQS. ""
1617$ THEN gcclib_olb = tmp
1618$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1619$ ENDIF
97abc6ad 1620$ ENDIF
570bb66e
JH
1621$ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1622$ IF tmp .NES. ""
1623$ THEN
1624$ IF gcclib_olb .EQS. ""
1625$ THEN gcclib_olb = tmp
1626$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1627$ ENDIF
97abc6ad 1628$ ENDIF
570bb66e
JH
1629$ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1630$ ELSE
1631$ gcclib_olb = gcclib_olb + "/lib"
97abc6ad 1632$ ENDIF
570bb66e 1633$ IF gcclib_olb .NES. "" .AND. -
97abc6ad
HM
1634 (vaxcrtl_olb .NES. "" .OR. -
1635 vaxcrtl_exe .NES. "" )
570bb66e
JH
1636$ THEN
1637$ echo ""
1638$ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1639$ OPEN/WRITE CONFIG gccvers.c
570bb66e
JH
1640$ WRITE CONFIG "#include <stdio.h>"
1641$ WRITE CONFIG "int main() {"
1642$ WRITE CONFIG "#ifdef __GNUC__"
1643$ WRITE CONFIG "#ifdef __VERSION__"
1644$ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1645$ WRITE CONFIG "#else"
1646$ WRITE CONFIG " printf(""%s\n"", ""1"");"
1647$ WRITE CONFIG "#endif"
1648$ WRITE CONFIG "#endif"
1649$ WRITE CONFIG " exit(0);"
1650$ WRITE CONFIG "}"
1651$ CLOSE CONFIG
1652$ DEFINE SYS$ERROR _NLA0:
1653$ DEFINE SYS$OUTPUT _NLA0:
1654$ 'Mcc' gccvers.c
1655$ tmp = $status
1656$ DEASSIGN SYS$ERROR _NLA0:
1657$ DEASSIGN SYS$OUTPUT _NLA0:
1658$ IF (silent) THEN GOSUB Shut_up
1659$ DEFINE SYS$ERROR _NLA0:
1660$ DEFINE SYS$OUTPUT _NLA0:
1661$ IF vaxcrtl_exe .EQS. ""
1662$ THEN
1663$ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1664$ THEN
96021e87 1665$ link/nodebug gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
570bb66e
JH
1666$ tmp = $status
1667$ ELSE
96021e87 1668$ link/nodebug gccvers.obj,'gcclib_olb'
570bb66e
JH
1669$ tmp = $status
1670$ ENDIF
1671$ ELSE
1672$ OPEN/WRITE CONFIG GCCVERS.OPT
1673$ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1674$ CLOSE CONFIG
96021e87 1675$ link/nodebug gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
570bb66e
JH
1676$ tmp = $status
1677$ ENDIF
1678$ DEASSIGN SYS$ERROR
1679$ DEASSIGN SYS$OUTPUT
1680$ IF (silent) THEN GOSUB Shut_up
1681$ OPEN/WRITE CONFIG gccvers.out
1682$ DEFINE SYS$ERROR CONFIG
1683$ DEFINE SYS$OUTPUT CONFIG
1684$ mcr []gccvers.exe
1685$ tmp = $status
1686$ CLOSE CONFIG
1687$ DEASSIGN SYS$OUTPUT
1688$ DEASSIGN SYS$ERROR
1689$ IF (silent) THEN GOSUB Shut_up
1690$ OPEN/READ CONFIG gccvers.out
1691$ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1692$Gcc_cleanup:
1693$ CLOSE CONFIG
1694$ DELETE/NOLOG/NOCONFIRM gccvers.*;
1695$ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1696$ THEN
1697$ echo "You are not using GNU cc."
1698$ GOTO Host_name
1699$ ELSE
1700$ echo "You are using GNU cc ''line'"
1701$ gccversion = line
414b89cc 1702$ ccname := "GCC"
570bb66e
JH
1703$ C_COMPILER_Replace = "CC=cc=''Mcc'"
1704$ GOTO Include_dirs
1705$ ENDIF
1706$ ENDIF
1707$ ENDIF
1708$Cxx_Version_check:
414b89cc 1709$ IF ccname .EQS. "CXX"
97abc6ad 1710$ THEN
570bb66e 1711$ OPEN/WRITE CONFIG cxxvers.c
97abc6ad
HM
1712$ WRITE CONFIG "#include <stdio.h>"
1713$ WRITE CONFIG "int main() {"
570bb66e
JH
1714$ WRITE CONFIG "#ifdef __DECCXX_VER"
1715$ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
97abc6ad 1716$ WRITE CONFIG "#else"
570bb66e 1717$ WRITE CONFIG " printf(""%i\n"", ""0"");"
97abc6ad 1718$ WRITE CONFIG "#endif"
570bb66e 1719$ WRITE CONFIG " return(0);"
97abc6ad
HM
1720$ WRITE CONFIG "}"
1721$ CLOSE CONFIG
570bb66e
JH
1722$ SET NOON
1723$ DEFINE/USER_MODE SYS$ERROR NL:
1724$ DEFINE/USER_MODE SYS$OUTPUT NL:
1725$ 'Mcc' cxxvers.c
97abc6ad 1726$ tmp = $status
570bb66e 1727$ SET ON
97abc6ad 1728$ IF (silent) THEN GOSUB Shut_up
570bb66e
JH
1729$ SET NOON
1730$ DEFINE/USER_MODE SYS$ERROR NL:
1731$ DEFINE/USER_MODE SYS$OUTPUT NL:
1732$ 'ld' cxxvers.obj
1733$ tmp = $status
1734$ SET ON
97abc6ad 1735$ IF (silent) THEN GOSUB Shut_up
570bb66e
JH
1736$ OPEN/WRITE CONFIG cxxvers.out
1737$ SET NOON
1738$ DEFINE/USER_MODE SYS$ERROR CONFIG
1739$ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1740$ mcr []cxxvers.exe
97abc6ad 1741$ tmp = $status
570bb66e 1742$ SET ON
97abc6ad 1743$ CLOSE CONFIG
97abc6ad 1744$ IF (silent) THEN GOSUB Shut_up
570bb66e
JH
1745$ OPEN/READ CONFIG cxxvers.out
1746$ READ/END_OF_FILE=Cxx_cleanup CONFIG line
1747$Cxx_cleanup:
97abc6ad 1748$ CLOSE CONFIG
570bb66e
JH
1749$ DELETE/NOLOG/NOCONFIRM cxxvers.*;
1750$ echo "You are using CXX ''line'"
1751$ cxxversion = line
1752$ ccversion = line
60f153db 1753$ d_cplusplus = "define"
85fac3a9
CB
1754$ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1755$ ccflags = ccflags + "/NOANSI_ALIAS"
570bb66e 1756$ CALL Cxx_demangler_cleanup
60f153db
CB
1757$ ELSE
1758$ d_cplusplus = "undef"
570bb66e
JH
1759$ ENDIF
1760$!
1761$Cxx_demangler_cleanup: SUBROUTINE
1762$!
1763$! If we do build with CXX these demangler Dbs will be left all over.
1764$! However, configure.com does try to remove the [.UU] sub directory.
1765$! Be sure to set default to the correct place before calling this sub.
1766$!
1767$ SET NOON
1768$ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
1769$ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
1770$ THEN
1771$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
1772$ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
97abc6ad 1773$ ENDIF
570bb66e
JH
1774$ SET ON
1775$ EXIT
1776$ ENDSUBROUTINE ! Cxx_demangler_cleanup
1777$!
97abc6ad
HM
1778$ GOTO Host_name
1779$!
1780$List_Parse:
1781$ OPEN/READ CONFIG ccvms.lis
1782$ READ CONFIG line
2b4b3ebb 1783$ IF F$ELEMENT(0, "-", archname) .EQS. "VMS_VAX"
97abc6ad
HM
1784$ THEN
1785$ read CONFIG line
1786$ archsufx = "VAX"
1787$ ELSE
2b4b3ebb 1788$ IF F$ELEMENT(0, "-", archname) .EQS. "VMS_AXP"
a50752f9
CB
1789$ THEN
1790$ archsufx = "AXP"
1791$ ELSE
1792$ archsufx = "IA64"
1793$ ENDIF
97abc6ad
HM
1794$ ENDIF
1795$ CLOSE CONFIG
1796$ line = F$EDIT(line,"TRIM,COMPRESS")
1797$ line = line - "Page 1" ! occurs at end all compilers
1798$ line = line - "CCVMS " ! filename appears w/ VAXC
1799$ line = line - "Source Listing " ! Seen w/ AXP DECC
1800$ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
1801$ line = line - tmp
1802$ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1803$ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1804$ RETURN
1805$!
1806$Include_dirs:
570bb66e 1807$!: What should the include directory be ? (.TLB text libraries)
97abc6ad
HM
1808$ dflt = gcclib_olb
1809$ rp = "Where are the include files you want to use? "
db7bf729 1810$ IF f$length( rp + "[''dflt'] " ) .GT. 76
97abc6ad
HM
1811$ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
1812$ ELSE rp = rp + "[''dflt'] "
1813$ ENDIF
1814$ GOSUB myread
1815$ usrinc = ans
1816$!
1817$!: see if we have to deal with yellow pages, now NIS.
1818$!: now get the host name
1819$Host_name:
1820$ echo ""
1821$ echo4 "Figuring out host name..." !>&4
1822$ myhostname = ""
1823$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
1824$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
1825$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
1826$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
1827$ IF myhostname.eqs."".and. -
1828 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
1829 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
1830 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
16421035
PP
1831$ IF myhostname.eqs."".and. -
1832 F$TRNLNM("TCPIP$INET_HOST") .nes. "" .and. -
1833 F$TRNLNM("TCPIP$INET_DOMAIN") .nes. "" THEN -
1834 myhostname = F$TRNLNM("TCPIP$INET_HOST") + "." + F$TRNLNM("TCPIP$INET_DOMAIN")
97abc6ad
HM
1835$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
1836$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
1837$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
1838$ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
1839$!: you do not want to know about this
1840$!: verify guess
1841$ rp = "Your host name appears to be """"''myhostname'"""". Right? "
9b5c8979 1842$ bool_dflt = "y"
97abc6ad 1843$ GOSUB myread
9b5c8979 1844$ IF (.not.ans)
97abc6ad
HM
1845$ THEN
1846$ READ SYS$COMMAND/PROMPT= -
1847 "Please type the (one word) name of your host: " ans
1848$ myhostname = ans
1849$ ENDIF
1850$!: translate upper to lower if necessary
1851$ myhostname = F$EDIT(myhostname,"COLLAPSE")
1852$ mylowhostname = F$EDIT(myhostname," LOWERCASE")
1853$ IF mylowhostname.NES.myhostname
1854$ THEN
1855$ echo "(Normalizing case in your host name)"
1856$ myhostname = mylowhostname
1857$ ENDIF
1858$!
1859$ fp = F$LOCATE(".",myhostname)
1860$ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
1861$ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
1862$ THEN
1863$ rp = "What is your domain name? [''mydomain'] "
9b5c8979 1864$ dflt = mydomain
97abc6ad 1865$ GOSUB myread
9b5c8979 1866$ mydomain = ans
97abc6ad
HM
1867$!: translate upper to lower if necessary
1868$ mydomain = F$EDIT(mydomain,"COLLAPSE")
1869$ mylowdomain = F$EDIT(mydomain," LOWERCASE")
1870$ IF mylowdomain.NES.mydomain
1871$ THEN
1872$ echo "(Normalizing case in your domain name)"
1873$ mydomain = mylowdomain
1874$ ENDIF
1875$ ENDIF
1876$ myhostname = myhostname - mydomain
1877$ echo "(Trimming domain name from host name--host name is now ''myhostname')"
1878$ IF .NOT.silent
7558ebc2
PP
1879$ THEN
1880$ TYPE SYS$INPUT:
1881$ DECK
97abc6ad
HM
1882
1883I need to get your e-mail address in Internet format if possible, i.e.
1884something like user@host.domain. Please answer accurately since I have
1885no easy means to double check it. The default value provided below
1886is most probably close to the reality but may not be valid from outside
1887your organization...
7558ebc2 1888$ EOD
97abc6ad 1889$ ENDIF
414b89cc
CB
1890$ IF F$TYPE(cf_email) .EQS. ""
1891$ THEN
1892$ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
1893$ rp = "What is your e-mail address? [''dflt'] "
1894$ GOSUB myread
9b5c8979 1895$ cf_email = ans
97abc6ad
HM
1896$ ENDIF
1897$!
1898$ IF .NOT.silent
7558ebc2
PP
1899$ THEN
1900$ TYPE SYS$INPUT:
1901$ DECK
97abc6ad
HM
1902
1903If you or somebody else will be maintaining perl at your site, please
1904fill in the correct e-mail address here so that they may be contacted
1905if necessary. Currently, the "perlbug" program included with perl
1906will send mail to this address in addition to perlbug@perl.com. You may
1907enter "none" for no administrator.
7558ebc2 1908$ EOD
97abc6ad
HM
1909$ ENDIF
1910$ dflt = "''cf_email'"
1911$ rp = "Perl administrator e-mail address [''dflt'] "
1912$ GOSUB myread
9b5c8979 1913$ perladmin = ans
97abc6ad
HM
1914$!
1915$!: determine where public executable scripts go
1916$!: determine perl absolute location
1917$!: figure out how to guarantee perl startup
1918$!
1919$!: see how we invoke the C preprocessor
1920$! echo ""
1921$! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
1922$!: Set private lib path
1923$!: Now check and see which directories actually exist, avoiding duplicates
1924$!: determine optimize, if desired, or use for debug flag also
1925$!: We will not override a previous value, but we might want to
1926$!: augment a hint file
1927$!: the following weeds options from ccflags that are of no interest to cpp
1928$!: flags used in final linking phase
1929$!: Try to guess additional flags to pick up local libraries.
1930$!: coherency check
1931$! echo ""
1932$! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
1933$!: compute shared library extension
1934$!: Looking for optional libraries
1935$!: see if nm is to be used to determine whether a symbol is defined or not
1936$!: get list of predefined functions in a handy place
983dbef6 1937$!: see if we have sigaction or sigprocmask
fcc434ad 1938$ IF (ccname .EQS. "DEC" .AND. Dec_C_Version .GE. 50200000) .OR. (ccname .EQS. "CXX")
97abc6ad
HM
1939$ THEN
1940$ Has_Dec_C_Sockets = "T"
1941$ echo ""
7558ebc2 1942$ echo4 "Hmm... Looks like you have Dec C Berkeley networking support."
570bb66e
JH
1943$ ELSE
1944$ Has_Dec_C_Sockets = "F"
97abc6ad 1945$ ENDIF
046cc26c
CB
1946$!
1947$ IF Has_Dec_C_Sockets
97abc6ad
HM
1948$ THEN
1949$ echo ""
046cc26c
CB
1950$ echo "You have sockets available via the C library. Should socket support"
1951$ echo "be built into Perl?"
1952$ dflt = "DECC"
1953$ rp = "Choose socket support option (NONE"
570bb66e 1954$ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
97abc6ad
HM
1955$ rp = rp + ") [''dflt'] "
1956$ GOSUB myread
570bb66e
JH
1957$ Has_Dec_C_Sockets = "F"
1958$ Has_socketshr = "F"
97abc6ad 1959$ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
fcc434ad 1960$ IF ans.eqs."decc" THEN Has_Dec_C_Sockets = "T"
570bb66e 1961$ ENDIF
97abc6ad
HM
1962$!
1963$!
3eeba6fb 1964$! Ask if they want to build with VMS_DEBUG perl
146174a9 1965$ echo ""
3eeba6fb
CB
1966$ echo "Perl can be built to run under the VMS debugger."
1967$ echo "You should only select this option if you are debugging"
1968$ echo "perl itself. This can be a useful feature if you are "
1969$ echo "embedding perl in a program."
9b5c8979
JH
1970$ bool_dflt = "n"
1971$ if f$type(usevmsdebug) .nes. ""
1972$ then
1973$ if usevmsdebug .or. usevmsdebug .eqs. "define" then bool_dflt="y"
1974$ endif
1975$ rp = "Build a VMS-DEBUG version of Perl? [''bool_dflt'] "
3eeba6fb 1976$ GOSUB myread
9b5c8979
JH
1977$ use_vmsdebug_perl = ans
1978$ IF use_vmsdebug_perl
3eeba6fb 1979$ THEN
9b5c8979 1980$ usevmsdebug = "define"
3eeba6fb 1981$ ELSE
9b5c8979 1982$ usevmsdebug = "undef"
3eeba6fb
CB
1983$ ENDIF
1984$!
8c99d73e
GS
1985$! Ask if they want to build with DEBUGGING
1986$ echo ""
7558ebc2
PP
1987$ echo "Perl can be built with extra runtime debugging enabled. This"
1988$ echo "enables the -D switch, at the cost of some performance. It"
1989$ echo "was mandatory on perl 5.005 and before on VMS, but is now"
1990$ echo "optional. If you do not generally use it you should probably"
1991$ echo "leave this off and gain a bit of extra speed."
6a0e5042
CB
1992$ bool_dflt = "n"
1993$ if f$type(DEBUGGING) .nes. ""
9b5c8979 1994$ then
6a0e5042 1995$ if f$extract(0,1,f$edit(DEBUGGING,"collapse,upcase")).eqs."Y" .or. DEBUGGING .eqs. "define" then bool_dflt="y"
9b5c8979
JH
1996$ endif
1997$ rp = "Build a DEBUGGING version of Perl? [''bool_dflt'] "
8c99d73e 1998$ GOSUB myread
9b5c8979 1999$ use_debugging_perl = ans
8c99d73e 2000$!
79e63f36 2001$!
97abc6ad 2002$! Ask about threads, if appropriate
414b89cc 2003$ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
97abc6ad 2004$ THEN
146174a9 2005$ echo ""
0f7b1033 2006$ echo "Perl can be built to offer a form of threading support on some systems."
0e965207
JH
2007$ echo "To do so, configure.com can be run with -""Dusethreads""."
2008$ echo ""
2009$ echo "Note that Perl built with threading support runs slightly slower"
0f7b1033 2010$ echo "and uses slightly more memory than plain Perl."
0e965207 2011$ echo ""
9b5c8979
JH
2012$ bool_dflt = "n"
2013$ if f$type(usethreads) .nes. ""
2014$ then
2015$ if usethreads .or. usethreads .eqs. "define" then bool_dflt="y"
2016$ endif
0f7b1033 2017$! Catch cases where user specified ithreads but
0e965207
JH
2018$! forgot -Dusethreads
2019$ if f$type(useithreads) .nes. ""
2020$ then
2021$ if useithreads .or. useithreads .eqs. "define" then bool_dflt="y"
2022$ endif
0e965207
JH
2023$ echo "If this doesn't make any sense to you, just accept the default '" + bool_dflt + "'."
2024$ rp = "Build a threading Perl? [''bool_dflt'] "
97abc6ad 2025$ GOSUB myread
9b5c8979 2026$ if ans
97abc6ad 2027$ THEN
01aa1a42 2028$ usethreads = "define"
97abc6ad 2029$ use_threads="T"
0e965207 2030$ bool_dflt = "y"
9b5c8979
JH
2031$ if f$type(useithreads) .nes. ""
2032$ then
41cbbefa 2033$ if useithreads .eqs. "undef" then bool_dflt="n"
0e965207
JH
2034$ endif
2035$ if f$type(use5005threads) .nes. ""
2036$ then
0f7b1033
CB
2037$ if use5005threads .or. use5005threads .eqs. "define"
2038$ then
2039$ echo "5.005 threads are no longer supported"
2040$ exit 44
2041$ endif
9b5c8979 2042$ endif
1c2e8cca 2043$ rp = "Use the newer interpreter-based ithreads? [''bool_dflt'] "
2974eb71 2044$ GOSUB myread
9b5c8979 2045$ use_ithreads=ans
0f7b1033 2046$ use_5005_threads="N"
3f39e13a
CB
2047$ ! Are they on VMS 7.1 or greater?
2048$ IF "''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.1"
429a5e67
DS
2049$ THEN
2050$ echo ""
3f39e13a
CB
2051$ echo "Threaded Perl can be linked to use system upcalls on your system. This feature"
2052$ echo "allows the thread scheduler to be made aware of system events (such as I/O)"
2053$ echo "so as to prevent a single thread from blocking all the threads in a program,"
2054$ echo "even on a single-processor machine."
2055$ bool_dflt = "y"
2056$ IF f$type(usethreadupcalls) .NES. ""
2057$ THEN
2058$ if .not. usethreadupcalls .or. usethreadupcalls .eqs. "undef" then bool_dflt="n"
2059$ ENDIF
2060$ rp = "Enable thread upcalls? [''bool_dflt'] "
429a5e67 2061$ gosub myread
3f39e13a 2062$ IF ans
429a5e67 2063$ THEN
3f39e13a
CB
2064$ thread_upcalls = "MTU=MTU=1"
2065$ usethreadupcalls = "define"
2066$ ! Are they on alpha or itanium?
2b4b3ebb 2067$ IF (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX") .AND. ("''f$extract(1,3, f$getsyi(""version""))'" .GES. "7.2")
3f39e13a
CB
2068$ THEN
2069$ echo ""
2070$ echo "Threaded Perl can be linked to use multiple kernel threads on your system."
db7bf729 2071$ echo "This feature allows multiple user threads to make use of multiple CPUs on"
3f39e13a
CB
2072$ echo "a multi-processor machine."
2073$ bool_dflt = "n"
2074$ IF f$type(usekernelthreads) .nes. ""
2075$ THEN
2076$ if usekernelthreads .or. usekernelthreads .eqs. "define" then bool_dflt="y"
2077$ ENDIF
2078$ rp = "Enable multiple kernel threads? [''bool_dflt'] "
2079$ gosub myread
2080$ IF ans
2081$ THEN
2082$ thread_kernel = "MTK=MTK=1"
2083$ usekernelthreads = "define"
db7bf729 2084$ ENDIF
3f39e13a 2085$ ENDIF
429a5e67
DS
2086$ ENDIF
2087$ ENDIF
01aa1a42
CB
2088$ ELSE
2089$ usethreads = "undef"
97abc6ad
HM
2090$ ENDIF
2091$ ENDIF
3f39e13a
CB
2092$ IF F$TYPE(usethreadupcalls) .EQS. "" THEN usethreadupcalls = "undef"
2093$ IF F$TYPE(usekernelthreads) .EQS. "" THEN usekernelthreads = "undef"
01aa1a42
CB
2094$!
2095$! Ask if they want to build with MULTIPLICITY
2096$ echo ""
2097$ echo "Perl can be built so that multiple Perl interpreters can coexist"
2098$ echo "within the same Perl executable."
2099$ IF usethreads .OR. usethreads .EQS. "define"
2100$ THEN
2101$ echo "This multiple interpreter support is required for interpreter-based threads."
2102$ usemultiplicity="define"
2103$ ELSE
2104$ bool_dflt = "n"
2105$ if f$type(usemultiplicity) .nes. ""
2106$ then
2107$ if usemultiplicity .or. usemultiplicity .eqs. "define" then bool_dflt = "y"
2108$ endif
2109$ rp = "Build Perl for multiplicity? [''bool_dflt'] "
2110$ GOSUB myread
2111$ IF ans
2112$ THEN
2113$ usemultiplicity="define"
2114$ ELSE
2115$ usemultiplicity="undef"
2116$ ENDIF
2117$ ENDIF
2118$!
2119$! Ask if they want to build with 64-bit support
2120$ IF (F$ELEMENT(0, "-", archname).NES."VMS_VAX").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
2121$ THEN
2122$ bool_dflt = "n"
2123$ IF F$TYPE(use64bitint) .NES. ""
2124$ THEN
2125$ IF use64bitint .OR. use64bitint .eqs. "define" THEN bool_dflt = "y"
2126$ ENDIF
2127$ echo ""
2128$ echo "You have natively 64-bit long integers."
2129$ echo ""
2130$ echo "Perl can be built to take advantage of 64-bit integer types"
2131$ echo "on some systems, To do so, Configure can be run with -Duse64bitint."
2132$ echo "Choosing this option will most probably introduce binary incompatibilities."
2133$ echo ""
2134$ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2135$ rp = "Try to use 64-bit integers, if available? [''bool_dflt'] "
2136$ GOSUB myread
2137$ use64bitint = ans
2138$!
2139$ bool_dflt = "n"
2140$ IF F$TYPE(use64bitall) .NES. ""
2141$ THEN
2142$ IF use64bitall .OR. use64bitall .eqs. "define" THEN bool_dflt = "y"
2143$ ENDIF
2144$ echo ""
2145$ echo "You may also choose to try maximal 64-bitness. It means using as much"
2146$ echo "64-bitness as possible on the platform. This in turn means even more"
2147$ echo "binary incompatibilities. On the other hand, your platform may not"
2148$ echo "have any more 64-bitness available than what you already have chosen."
2149$ echo ""
2150$ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2151$ rp = "Try to use maximal 64-bit support, if available? [''bool_dflt'] "
2152$ GOSUB myread
2153$ use64bitall=ans
2154$ IF use64bitall .AND. .NOT. use64bitint
2155$ THEN
2156$ echo ""
2157$ echo "Since you have chosen a maximally 64-bit build, I'm also turning on"
2158$ echo "the use of 64-bit integers."
2159$ use64bitint="Y"
2160$ ENDIF
2161$!
2162$ bool_dflt = use64bitall
2163$ IF F$TYPE(uselargefiles) .NES. ""
2164$ THEN
2165$ IF uselargefiles .OR. uselargefiles .eqs. "define" THEN bool_dflt = "y"
2166$ ENDIF
2167$ echo ""
2168$ echo "Perl can be built to understand large files (files larger than 2 gigabytes)"
2169$ echo "on some systems. To do so, Configure can be run with -Duselargefiles."
2170$ echo ""
2171$ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2172$ rp = "Try to understand large files, if available? [''bool_dflt'] "
2173$ GOSUB myread
2174$ uselargefiles=ans
2175$!
2176$ bool_dflt = "n"
2177$ IF F$TYPE(uselongdouble) .NES. ""
2178$ THEN
2179$ IF uselongdouble .OR. uselongdouble .eqs. "define" THEN bool_dflt = "y"
2180$ ENDIF
2181$ echo ""
2182$ echo "Perl can be built to take advantage of long doubles which"
2183$ echo "(if available) may give more accuracy and range for floating point numbers."
2184$ echo ""
2185$ echo "If this does not make any sense to you, just accept the default '" + bool_dflt + "'."
2186$ rp = "Try to use long doubles, if available? [''bool_dflt'] "
2187$ GOSUB myread
2188$ uselongdouble = ans
2189$!
2190$ ENDIF ! not VAX && >= 7.1
2191$!
2192$ IF usesitecustomize .OR. usesitecustomize .eqs. "define"
2193$ THEN
2194$ usesitecustomize = "define"
2195$ ELSE
2196$ usesitecustomize = "undef"
2197$ ENDIF
2198$!
498336ed 2199$! Case sensitive?
7558ebc2
PP
2200$ echo ""
2201$ echo "By default, perl (and pretty much everything else on VMS) uses"
2202$ echo "case-insensitive linker symbols. Which is to say, when the"
2203$ echo "underlying C code makes a call to a routine called Perl_foo in"
2204$ echo "the source, the name in the object modules or shareable images"
2205$ echo "is really PERL_FOO. There are some packages that use an"
2206$ echo "embedded perl interpreter that instead require case-sensitive"
2207$ echo "linker symbols."
2208$ echo ""
2209$ echo "If you have no idea what this means, and do not have"
2210$ echo "any program requiring anything, choose the default."
9b5c8979
JH
2211$ bool_dflt = be_case_sensitive
2212$ if f$type(usecasesensitive) .nes. ""
2213$ then
2214$ if usecasesensitive .or. usecasesensitive .eqs. "define" then bool_dflt = "y"
2215$ if f$extract(0,1,f$edit(usecasesensitive,"collapse,upcase")).eqs."N" .or. usecasesensitive .eqs. "undef" then bool_dflt = "n"
2216$ endif
2217$ rp = "Build with case-sensitive symbols? [''bool_dflt'] "
7558ebc2 2218$ GOSUB myread
9b5c8979 2219$ be_case_sensitive = ans
1171624b
CB
2220$!
2221$! Shortened symbols?
2222$ echo ""
2223$ echo "The VMS linker does not handle symbol names longer than 31 characters,"
2224$ echo "but the compiler can shorten long symbols if requested."
2225$ bool_dflt = shorten_long_symbols
2226$ if f$type(useshortenedsymbols) .nes. ""
2227$ then
2228$ if useshortenedsymbols .or. useshortenedsymbols .eqs. "define" then bool_dflt = "y"
2229$ if f$extract(0,1,f$edit(useshortenedsymbols,"collapse,upcase")) .eqs. "N" .or. useshortenedsymbols .eqs. "undef" then bool_dflt = "n"
2230$ endif
2231$ rp = "Build with long symbols shortened? [''bool_dflt'] "
2232$ GOSUB myread
2233$ shorten_long_symbols = ans
2b4b3ebb 2234$ IF F$ELEMENT(0, "-", archname) .NES. "VMS_VAX"
1171624b 2235$ THEN
498336ed 2236$! IEEE math?
7558ebc2 2237$ echo ""
3ad67d07
CB
2238$ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers on"
2239$ echo "Alpha and Itanium, but if you need G_FLOAT for binary compatibility"
24866caa
CB
2240$ echo "with an external library or existing data, you may wish to disable"
2241$ echo "the IEEE math option."
9b5c8979
JH
2242$ bool_dflt = use_ieee_math
2243$ if f$type(useieee) .nes. ""
2244$ then
17d0565f
CB
2245$ if useieee .or. useieee .eqs. "define"
2246$ then
2247$ bool_dflt="y"
2248$ else
2249$ bool_dflt="n"
2250$ endif
9b5c8979
JH
2251$ endif
2252$ rp = "Use IEEE math? [''bool_dflt'] "
7558ebc2 2253$ GOSUB myread
9b5c8979 2254$ use_ieee_math = ans
bb6f4497 2255$ ELSE
bb6f4497 2256$ use_ieee_math = "n"
7558ebc2 2257$ ENDIF
9b5c8979
JH
2258$ useieee = "undef"
2259$ usecasesensitive = "undef"
1171624b 2260$ useshortenedsymbols = "undef"
9b5c8979
JH
2261$ if (use_ieee_math) then useieee = "define"
2262$ if (be_case_sensitive) then usecasesensitive = "define"
1171624b 2263$ if (shorten_long_symbols) then useshortenedsymbols = "define"
4adb8845
CB
2264$! Unlink all versions?
2265$ echo ""
2266$ echo "By default, Perl's unlink() provides VMS-like behavior and only"
2267$ echo "deletes the latest version of a file. Enabling this option builds"
2268$ echo "Perl so that unlink() deletes all versions of a file."
2269$ bool_dflt = unlink_all_versions
2270$ if f$type(unlink_all_versions) .nes. ""
2271$ then
2272$ if unlink_all_versions .or. unlink_all_versions .eqs. "define"
2273$ then
2274$ bool_dflt="y"
2275$ else
2276$ bool_dflt="n"
2277$ endif
2278$ endif
2279$ rp = "Make unlink() delete all versions of a file? [''bool_dflt'] "
2280$ GOSUB myread
2281$ unlink_all_versions = ans
2282$ IF unlink_all_versions
2283$ THEN
2284$ d_unlink_all_versions = "define"
2285$ ELSE
2286$ d_unlink_all_versions = "undef"
2287$ ENDIF
e9df20f7 2288$!
498336ed
CB
2289$! CC Flags
2290$ echo ""
7558ebc2
PP
2291$ echo "Your compiler may want other flags. For this question you should include"
2292$ echo "/INCLUDE=(whatever) and /DEFINE=(whatever), flags and any other flags"
2293$ echo "or qualifiers used by the compiler."
2294$ echo ""
2295$ echo "To use no flags, specify the word ""none""."
498336ed 2296$ dflt = user_c_flags
7558ebc2
PP
2297$ rp = "Any additional cc flags? [''dflt'] "
2298$ GOSUB myread
7558ebc2 2299$ IF ans .EQS. "none" THEN ans = ""
498336ed 2300$ user_c_flags = "''ans'"
97abc6ad 2301$!
cc391245
CB
2302$! Ask whether they want to use secure logical translation when tainting
2303$ echo ""
2304$ echo "As Perl starts up, it checks several logical names, such as"
2305$ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2306$ echo "of its behavior. For additional security, you may limit this"
2307$ echo "process to executive- and kernel-mode translation when tainting"
2308$ echo "is enabled. In this case, logical names normally skipped when"
2309$ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2310$ echo "If you do not choose to do this, the usual order of access modes"
2311$ echo "is used for logical name translation."
2312$ echo ""
2313$ echo "This restriction does not apply to the %ENV hash or to implicit"
2314$ echo "logical name translation during parsing of file specifications;"
2315$ echo "these always use the normal sequence of access modes for logical"
2316$ echo "name translation."
9b5c8979
JH
2317$ bool_dflt = "y"
2318$ if f$type(usesecurelog) .nes. ""
2319$ then
2320$ if f$extract(0,1,f$edit(usesecurelog,"collapse,upcase")).eqs."N" .or. usesecurelog .eqs. "undef" then bool_dflt = "n"
2321$ endif
2322$ rp = "Use secure logical name translation? [''bool_dflt'] "
cc391245 2323$ GOSUB myread
9b5c8979
JH
2324$ d_secintgenv = ans
2325$ usesecurelog = "undef"
2326$ if (d_secintgenv) then usesecurelog = "define"
cc391245
CB
2327$!
2328$! Ask whether they want to default filetypes
2329$ echo ""
2330$ echo "When you pass the name of a program to Perl on the command line,"
2331$ echo "it generally doesn't supply any defaults unless the -S command"
2332$ echo "line switch is specified. In keeping with the VMS tradition of"
2333$ echo "default file types, however, you can configure Perl to try default"
2334$ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2335$ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2336$ echo "finally foo.com)."
8c99d73e 2337$ echo ""
7558ebc2
PP
2338$ echo "This is currently broken in some configurations. Only enable it if"
2339$ echo "you know what you are doing."
9b5c8979
JH
2340$ bool_dflt = "n"
2341$ if f$type(usedefaulttypes) .nes. ""
2342$ then
2343$ if usedefaulttypes .or. usedefaulttypes .eqs. "define" then bool_dflt="y"
2344$ endif
2345$ rp = "Always use default file types? [''bool_dflt'] "
cc391245 2346$ GOSUB myread
9b5c8979
JH
2347$ d_alwdeftype = ans
2348$ usedefaulttypes = "undef"
2349$ if (d_alwdeftype) then usedefaulttypes = "define"
2350$!
4581ada3
CB
2351$ dflt = archname
2352$ rp = "What is your architecture name? [''archname'] "
2353$ GOSUB myread
2354$ IF ans.NES.""
2355$ THEN
2356$ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
2357$ IF (ans.NES.archname) !.AND.knowitall
2358$ THEN
2359$ echo4 "I'll go with ''archname' anyway..."
2360$ ENDIF
2361$ ENDIF
35182409 2362$!
139a355e
CB
2363$ bool_dflt = "n"
2364$ if f$type(useversionedarchname) .nes. ""
2365$ then
2366$ if useversionedarchname .or. useversionedarchname .eqs. "define" then bool_dflt = "y"
2367$ endif
2368$ rp = "Add the Perl API version to your archname? [''bool_dflt'] "
2369$ GOSUB myread
2370$ IF ans
2371$ THEN
2372$ useversionedarchname = "define"
2373$ IF F$LOCATE("-''version'", archname) .EQ. F$LENGTH(archname)
2374$ THEN
2375$ archname = "''archname'-''version'"
2376$ echo4 "...setting architecture name to ''archname'."
2377$ ELSE
2378$ echo4 "...and architecture name already has -''version'."
2379$ ENDIF
2380$ ELSE
2381$ useversionedarchname = "undef"
2382$ ENDIF
2383$!
35182409
CB
2384$ IF usethreads .OR. usethreads .EQS. "define"
2385$ THEN
2386$ echo4 "Threads selected."
2387$ IF F$LOCATE("-thread", archname) .EQ. F$LENGTH(archname)
2388$ THEN
2389$ archname = "''archname'-thread"
2390$ echo4 "...setting architecture name to ''archname'."
2391$ ELSE
2392$ echo4 "...and architecture name already has -thread."
2393$ ENDIF
2394$ ENDIF
2395$!
2396$ IF usemultiplicity .OR. usemultiplicity .EQS. "define"
2397$ THEN
2398$ echo4 "Multiplicity selected."
2399$ IF F$LOCATE("-multi", archname) .EQ. F$LENGTH(archname)
2400$ THEN
2401$ archname = "''archname'-multi"
2402$ echo4 "...setting architecture name to ''archname'."
2403$ ELSE
2404$ echo4 "...and architecture name already has -multi."
2405$ ENDIF
2406$ ENDIF
2407$!
2408$ IF uselongdouble .OR. uselongdouble .EQS. "define"
2409$ THEN
2410$ echo4 "Long doubles selected."
2411$ IF F$LOCATE("-ld", archname) .EQ. F$LENGTH(archname)
2412$ THEN
2413$ archname = "''archname'-ld"
2414$ echo4 "...setting architecture name to ''archname'."
2415$ ELSE
2416$ echo4 "...and architecture name already has -ld."
2417$ ENDIF
2418$ ENDIF
2419$!
4581ada3
CB
2420$ bool_dflt = "n"
2421$ vms_prefix = "perl_root"
2422$ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
2423$ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''bool_dflt'] "
2424$ GOSUB myread
2425$ IF .NOT. ans
2426$ THEN
2427$ sharedperl = "N"
2428$ ELSE
2429$ sharedperl = "Y"
2430$ IF (F$ELEMENT(0, "-", archname).EQS."VMS_AXP")
2431$ THEN
2432$ macros = macros + """AXE=1"","
2433$ ENDIF
2434$ IF (F$ELEMENT(0, "-", archname).EQS."VMS_IA64")
2435$ THEN
2436$ macros = macros + """IXE=1"","
2437$ ENDIF
2438$ ENDIF
2439$!
2440$!: is AFS running? !sfn
2441$!: decide how portable to be. Allow command line overrides. !sfn
2442$!: set up shell script to do ~ expansion !sfn
2443$!: expand filename !sfn
2444$!: now set up to get a file name !sfn
2445$!
2446$ IF F$TYPE(prefix) .EQS. ""
2447$ THEN
2448$ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
2449$ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - "000000." - ".000000" - ".;"
2450$ prefixbase = prefix - "]"
2451$! Add _ROOT to make install PERL_ROOT differ from build directory.
2452$ prefix = prefixbase + "_ROOT.]"
2453$ ENDIF
2454$ ! more redundant scrubbing of values
2455$ prefix = prefix - "000000."
2456$ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN prefix = prefix - "]" + ".]"
c556ea94 2457$ src = prefix - "_ROOT."
4581ada3
CB
2458$!: determine root of directory hierarchy where package will be installed.
2459$ dflt = prefix
2460$ IF .NOT.silent
2461$ THEN
2462$ echo ""
2463$ echo "By default, ''package' will be installed in ''dflt', pod"
2464$ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
2465$ echo "all installation directories."
2466$ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
2467$ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
2468$ ENDIF
2469$ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
2470$ GOSUB myread
2471$ IF ans.NES.""
2472$ THEN
2473$ prefix = ans
2474$ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
2475$ ELSE
2476$ prefix = dflt
2477$ ENDIF
2478$ perl_root = prefix
2479$!
2480$! Check here for pre-existing PERL_ROOT.
2481$! -> ask if removal desired.
2482$! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
2483$! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
2484$!
2485$ tmp = perl_root - ".]" + "]"
2486$ dflt = f$parse(tmp,,,,)
2487$ IF dflt .eqs. ""
2488$ THEN
2489$ echo4 "''tmp' does not yet exist."
2490$! create/directory 'tmp'
2491$ ELSE
2492$ echo4 "''tmp' already exists."
2493$ ENDIF
2494$!
2495$ vms_skip_install = "true"
2496$ bool_dflt = "y"
2497$! echo ""
2498$ rp = "Skip the remaining """"where install"""" questions? [''bool_dflt'] "
2499$ GOSUB myread
2500$ IF (.NOT.ans) THEN vms_skip_install = "false"
2501$ IF (.NOT.vms_skip_install)
2502$ THEN
2503$!
2504$!: set the prefixit variable, to compute a suitable default value
2505$!
2506$!: determine where private library files go
2507$!: Usual default is /usr/local/lib/perl5. Also allow things like
2508$!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
2509$ IF .NOT.silent
2510$ THEN
2511$ TYPE SYS$INPUT:
2512$ DECK
2513
2514There are some auxiliary files for perl5 that need to be put into a
2515private library directory that is accessible by everyone.
2516$ EOD
2517$ ENDIF
2518$ IF F$TYPE(privlib) .NES. ""
2519$ THEN dflt = privlib
2520$ ELSE dflt = "''vms_prefix':[lib]"
2521$ ENDIF
2522$ rp = "Pathname where the private library files will reside? "
2523$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2524$ GOSUB myread
2525$ privlib = ans
2526$!
2527$ ENDIF !%Config-I-VMS, skip remaining "where install" questions
2528$!
2529$ IF F$TYPE(perl_symbol) .EQS. "" THEN perl_symbol := true
2530$ IF F$TYPE(perl_verb) .EQS. "" THEN perl_verb = ""
2531$ IF perl_symbol
2532$ THEN bool_dflt = "y"
2533$ ELSE bool_dflt = "n"
2534$ ENDIF
2535$ IF .NOT.silent
2536$ THEN
2537$ echo ""
2538$ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
2539$ echo "symbol to invoke ''package', which is the usual method."
2540$ echO "If you do not do so then you would need a DCL command verb at the"
2541$ echo "process or the system wide level."
2542$ ENDIF
2543$ rp = "Invoke perl as a global symbol foreign command? [''bool_dflt'] "
2544$ GOSUB myread
2545$ IF (.NOT.ans) THEN perl_symbol = "false"
2546$!
2547$ IF (.NOT.perl_symbol)
2548$ THEN
2549$ IF perl_verb .EQS. "DCLTABLES"
2550$ THEN bool_dflt = "n"
2551$ ELSE bool_dflt = "y"
2552$ ENDIF
2553$ IF .NOT.silent
2554$ THEN
2555$ echo ""
2556$ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
2557$ echo "verb in a per-process table or in the system wide DCLTABLES (which"
2558$ echo "would require write privilege)."
2559$ ENDIF
2560$ rp = "Invoke perl as a per process command verb? [ ''bool_dflt' ] "
2561$ GOSUB myread
2562$ IF (.NOT.ans)
2563$ THEN perl_verb = "DCLTABLES"
2564$ ELSE perl_verb = "PROCESS"
2565$ ENDIF
2566$ ENDIF ! (.NOT.perl_symbol)
2567$!
2568$ IF (.NOT.vms_skip_install)
2569$ THEN
2570$!: set the prefixup variable, to restore leading tilde escape !sfn
2571$!
2572$!: determine where public architecture dependent libraries go
2573$ IF (.NOT.silent)
2574$ THEN
2575$ echo ""
2576$ echo "''package' contains architecture-dependent library files. If you are"
2577$ ENDIF
2578$ IF (.NOT.silent)
2579$ THEN
2580$ TYPE SYS$INPUT:
2581$ DECK
2582sharing libraries in a heterogeneous environment, you might store
2583these files in a separate location. Otherwise, you can just include
2584them with the rest of the public library files.
2585$ EOD
2586$ ENDIF
2587$ IF F$TYPE(archlib) .NES. ""
2588$ THEN dflt = archlib
2589$ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
2590$ ENDIF
2591$ rp = "Where do you want to put the public architecture-dependent libraries? "
2592$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2593$ GOSUB myread
2594$ archlib = ans
2595$!
2596$ ENDIF !%Config-I-VMS, skip "where install" questions
2597$ IF (.NOT.vms_skip_install)
2598$ THEN
2599$!: it so happens the Eunice I know will not run shell scripts in Unix format
2600$!
2601$!: see if setuid scripts can be secure !sfn
2602$!: now see if they want to do setuid emulation !sfn
2603$!
2604$!: determine where site specific libraries go.
2605$ IF .NOT.silent
2606$ THEN
2607$ TYPE SYS$INPUT:
2608$ DECK
2609
2610The installation process will also create a directory for
2611site-specific extensions and modules. Some users find it convenient
2612to place all local files in this directory rather than in the main
2613distribution directory.
2614$ EOD
2615$ ENDIF
2616$ IF F$TYPE(sitelib) .NES. ""
2617$ THEN dflt = sitelib
2618$ ELSE dflt = privlib - "]" + ".SITE_PERL]"
2619$ ENDIF
2620$ rp = "Pathname for the site-specific library files? "
2621$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2622$ GOSUB myread
2623$ sitelib = ans
2624$!
2625$!: determine where site specific architecture-dependent libraries go.
2626$ IF .NOT.silent
2627$ THEN TYPE SYS$INPUT:
2628$ DECK
2629
2630The installation process will also create a directory for
2631architecture-dependent site-specific extensions and modules.
2632$ EOD
2633$ ENDIF
2634$ IF F$TYPE(sitearch) .NES. ""
2635$ THEN dflt = sitearch
2636$ ELSE dflt = sitelib - "]" + "." + archname + "]"
2637$ ENDIF
2638$ rp = "Pathname for the site-specific architecture-dependent library files? "
2639$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2640$ GOSUB myread
2641$ sitearch = ans
2642$!
2643$!: determine where old public architecture dependent libraries might be
2644$!
2645$!: determine where public executables go
2646$ IF F$TYPE(bin) .NES. ""
2647$ THEN dflt = bin
2648$! ELSE dflt = prefix - ".]" + ".BIN]"
2649$ ELSE dflt = "/''vms_prefix'"
2650$ ENDIF
2651$ rp = "Pathname where the public executables will reside? "
2652$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2653$ GOSUB myread
2654$ bin = ans
2655$!
2656$!: determine where add-on public executables go
2657$ IF F$TYPE(sitebin) .NES. ""
2658$ THEN dflt = sitebin
2659$ ELSE dflt = "''vms_prefix':[bin.''archname']"
2660$ ENDIF
2661$ rp = "Pathname where the add-on public executables should be installed? "
2662$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
2663$ GOSUB myread
2664$ sitebin = ans
2665$!
2666$!: determine where manual pages are on this system
2667$!: What suffix to use on installed man pages
2668$!: see if we can have long filenames
2669$!: determine where library module manual pages go
2670$!: What suffix to use on installed man pages
2671$!: see what memory models we can support
2672$!
2673$ ELSE ! skipping "where install" questions, we must set some symbols
2674$ IF F$TYPE(archlib).EQS."" THEN -
2675 archlib="''vms_prefix':[lib.''archname'.''version']"
2676$ IF F$TYPE(bin) .EQS. "" THEN -
2677 bin="/''vms_prefix'"
2678$ IF F$TYPE(privlib) .EQS. "" THEN -
2679 privlib ="''vms_prefix':[lib]"
2680$ IF F$TYPE(sitearch) .EQS. "" THEN -
2681 sitearch="''vms_prefix':[lib.site_perl.''archname']"
2682$ IF F$TYPE(sitelib) .EQS. "" THEN -
2683 sitelib ="''vms_prefix':[lib.site_perl]"
2684$ IF F$TYPE(sitebin) .EQS. "" THEN -
2685 sitebin="''vms_prefix':[bin.''archname']"
2686$ ENDIF !%Config-I-VMS, skip "where install" questions
2687$!
2688$! These derived locations can be set whether we've opted to
2689$! skip the where install questions or not.
2690$!
2691$ IF F$TYPE(archlibexp) .EQS. "" THEN -
2692 archlibexp="''vms_prefix':[lib.''archname'.''version']"
2693$ IF F$TYPE(binexp) .EQS. "" THEN -
2694 binexp ="''vms_prefix':[000000]"
2695$ IF F$TYPE(builddir) .EQS. "" THEN -
2696 builddir ="''vms_prefix':[000000]"
2697$ IF F$TYPE(installarchlib) .EQS. "" THEN -
2698 installarchlib="''vms_prefix':[lib.''archname'.''version']"
2699$ IF F$TYPE(installbin) .EQS. "" THEN -
2700 installbin ="''vms_prefix':[000000]"
2701$ IF F$TYPE(installscript) .EQS. "" THEN -
2702 installscript ="''vms_prefix':[utils]"
2703$ IF F$TYPE(installman1dir) .EQS. "" THEN -
2704 installman1dir ="''vms_prefix':[man.man1]"
2705$ IF F$TYPE(installman3dir) .EQS. "" THEN -
2706 installman3dir ="''vms_prefix':[man.man3]"
2707$ IF F$TYPE(installprivlib) .EQS. "" THEN -
2708 installprivlib ="''vms_prefix':[lib]"
2709$ IF F$TYPE(installsitearch) .EQS. "" THEN -
2710 installsitearch="''vms_prefix':[lib.site_perl.''archname']"
2711$ IF F$TYPE(installsitelib) .EQS. "" THEN -
2712 installsitelib ="''vms_prefix':[lib.site_perl]"
2713$ IF F$TYPE(oldarchlib) .EQS. "" THEN -
2714 oldarchlib="''vms_prefix':[lib.''archname']"
2715$ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
2716 oldarchlibexp="''vms_prefix':[lib.''archname']"
2717$ IF F$TYPE(privlibexp) .EQS. "" THEN -
2718 privlibexp ="''vms_prefix':[lib]"
2719$ IF F$TYPE(scriptdir) .EQS. "" THEN -
2720 scriptdir ="''vms_prefix':[utils]"
2721$ IF F$TYPE(sitearchexp) .EQS. "" THEN -
2722 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
2723$ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
2724 sitelib_stem ="''vms_prefix':[lib.site_perl]"
2725$ IF F$TYPE(sitelibexp) .EQS. "" THEN -
2726 sitelibexp ="''vms_prefix':[lib.site_perl]"
2727$!
dc8c9d5a
CB
2728$! determine whether to use malloc wrapping
2729$ echo ""
dc9da78b 2730$ bool_dflt = "y"
dc8c9d5a
CB
2731$ IF F$TYPE(usemallocwrap) .nes. ""
2732$ then
dc9da78b 2733$ if .NOT. usemallocwrap .or. usemallocwrap .eqs. "undef" then bool_dflt = "n"
dc8c9d5a
CB
2734$ endif
2735$ rp = "Do you wish to wrap malloc calls to protect against potential overflows? [''bool_dflt'] "
2736$ GOSUB myread
2737$ IF ans
2738$ THEN usemallocwrap = "define"
2739$ ELSE usemallocwrap = "undef"
2740$ ENDIF
2741$!
97abc6ad
HM
2742$! Ask if they want to use perl's memory allocator
2743$ echo ""
7558ebc2
PP
2744$ echo "Perl has a built-in memory allocator that is tuned for normal"
2745$ echo "memory usage. It is oftentimes better than the standard system"
2746$ echo "memory allocator. It also has the advantage of providing memory"
2747$ echo "allocation statistics, if you choose to enable them."
9b5c8979
JH
2748$ bool_dflt = "n"
2749$ IF F$TYPE(usemymalloc) .nes. ""
2750$ then
2751$ if usemymalloc .or. usemymalloc .eqs. "define" then bool_dflt = "y"
2752$ endif
2753$ rp = "Do you wish to attempt to use the malloc that comes with ''package'? [''bool_dflt'] "
97abc6ad 2754$ GOSUB myread
9b5c8979 2755$ mymalloc = ans
570bb66e 2756$ IF mymalloc
429a5e67 2757$ THEN
570bb66e 2758$ IF use_debugging_perl
429a5e67
DS
2759$ THEN
2760$ echo ""
7558ebc2
PP
2761$ echo "Perl can keep statistics on memory usage if you choose to use"
2762$ echo "them. This is useful for debugging, but does have some"
2763$ echo "performance overhead."
9b5c8979
JH
2764$ bool_dflt = "n"
2765$ rp = "Do you want the debugging memory allocator? [''bool_dflt'] "
429a5e67 2766$ gosub myread
9b5c8979 2767$ use_debugmalloc = ans
429a5e67
DS
2768$ ENDIF
2769$ ! Check which memory allocator we want
2770$ echo ""
7558ebc2
PP
2771$ echo "There are currently three different memory allocators: the"
2772$ echo "default (which is a pretty good general-purpose memory manager),"
2773$ echo "the TWO_POT allocator (which is optimized to save memory for"
2774$ echo "larger allocations), and PACK_MALLOC (which is optimized to save"
2775$ echo "memory for smaller allocations). They're all good, but if your"
2776$ echo "usage tends towards larger chunks use TWO_POT, otherwise use"
429a5e67 2777$ echo "PACK_MALLOC."
429a5e67
DS
2778$ dflt = "DEFAULT"
2779$ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2780$ GOSUB myread
429a5e67
DS
2781$ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2782$ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2783$ ENDIF
97abc6ad 2784$!
86ad859e 2785$ xs_extensions = ""
a3bd614a
PP
2786$ xxx = ""
2787$ OPEN/READ CONFIG 'manifestfound'
2788$ext_loop:
2789$ READ/END_OF_FILE=end_ext/ERROR=end_ext CONFIG line
0189e3e0 2790$ IF F$EXTRACT(0,4,line) .NES. "ext/" .AND. -
a193a2db 2791 F$EXTRACT(0,5,line) .NES. "dist/".AND. -
0189e3e0 2792 F$EXTRACT(0,5,line) .NES. "cpan/" THEN goto ext_loop
a3bd614a
PP
2793$ line = F$EDIT(line,"COMPRESS")
2794$ line = F$ELEMENT(0," ",line)
619cec6d
CB
2795$ IF F$EXTRACT(0,4,line) .EQS. "ext/"
2796$ THEN
2797$ xxx = F$ELEMENT(1,"/",line)
2798$ IF F$SEARCH("[-.ext]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2799$ ENDIF
a193a2db
NC
2800$ IF F$EXTRACT(0,5,line) .EQS. "dist/"
2801$ THEN
2802$ xxx = F$ELEMENT(1,"/",line)
2803$ IF F$SEARCH("[-.dist]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2804$ ENDIF
0189e3e0
NC
2805$ IF F$EXTRACT(0,5,line) .EQS. "cpan/"
2806$ THEN
2807$ xxx = F$ELEMENT(1,"/",line)
2808$ IF F$SEARCH("[-.cpan]''xxx'.DIR;1") .EQS. "" THEN GOTO ext_loop
2809$ ENDIF
a3bd614a 2810$ IF xxx .EQS. "DynaLoader" THEN goto ext_loop ! omit
1f29050e
NC
2811$!
2812$! (extspec = xxx) =~ tr!-!/!
2813$ extspec = ""
2814$ idx = 0
d1ce36d7 2815$ extension_dir_name = xxx
1f29050e
NC
2816$ replace_dash_with_slash:
2817$ before = F$ELEMENT(idx, "-", xxx)
2818$ IF before .EQS. "-" THEN goto end_replace_dash_with_slash
2819$ IF extspec .NES. ""
2820$ THEN
2821$ extspec = extspec + "/"
2822$ ENDIF
2823$ extspec = extspec + before
2824$ idx = idx + 1
2825$ goto replace_dash_with_slash
2826$
2827$ end_replace_dash_with_slash:
2828$
86ad859e 2829$ xxx = xs_extensions
d1ce36d7
CB
2830$ gosub may_already_have_extension
2831$ IF $STATUS .EQ. 1
2832$ THEN
2833$ xxx = nonxs_ext
2834$ gosub may_already_have_extension
2835$ ENDIF
bd2aeadf
CB
2836$ IF $STATUS .EQ. 1
2837$ THEN
2838$ xxx = nonxs_ext2
2839$ gosub may_already_have_extension
2840$ ENDIF
d1ce36d7
CB
2841$ IF $STATUS .NE. 1 THEN goto ext_loop
2842$ goto found_new_extension
2843$!
619cec6d
CB
2844$ may_already_have_extension:
2845$ idx = F$LOCATE(extspec, xxx)
2846$ extlen = F$LENGTH(xxx)
bd2aeadf
CB
2847$ IF idx .EQ. extlen THEN return 1 ! didn't find it
2848$! But "Flirble" may just be part of "Acme-Flirble". This is not
2849$! bullet-proof because we may only be looking at one chunk of the
2850$! existing extension list.
619cec6d
CB
2851$ IF idx .GT. 0 .AND. F$EXTRACT(idx - 1, 1, xxx) .NES. " "
2852$ THEN
2853$ xxx = F$EXTRACT(idx + F$LENGTH(extspec) + 1, extlen, xxx)
2854$ GOTO may_already_have_extension
2855$ ENDIF
2856$! But "Foo" may just be part of "Foo-Bar" so check for equality.
2857$ xxx = F$EXTRACT(idx, extlen - idx, xxx)
2858$ IF F$ELEMENT(0, " ", xxx) .EQS. extspec
2859$ THEN
d1ce36d7 2860$ RETURN 3
619cec6d
CB
2861$ ELSE
2862$ xxx = F$EXTRACT(F$LENGTH(extspec) + 1, extlen, xxx)
2863 GOTO may_already_have_extension
2864$ ENDIF
2865$!
2866$ found_new_extension:
86ad859e
CB
2867$ IF F$SEARCH("[-.ext.''extension_dir_name']*.xs") .EQS. "" -
2868 .AND. F$SEARCH("[-.dist.''extension_dir_name']*.xs") .EQS. "" -
2869 .AND. F$SEARCH("[-.cpan.''extension_dir_name']*.xs") .EQS. "" -
2870 .AND. extension_dir_name .NES. "VMS-Filespec"
d1ce36d7 2871$ THEN
bd2aeadf
CB
2872$! Bit if a hack to get around the 1K buffer on older systems.
2873$ IF F$LENGTH(nonxs_ext) .GT. 950
2874$ THEN
2875$ nonxs_ext2 = nonxs_ext2 + " ''extspec'"
2876$ ELSE
2877$ nonxs_ext = nonxs_ext + " ''extspec'"
2878$ ENDIF
0189e3e0 2879$ ELSE
86ad859e 2880$ xs_extensions = xs_extensions + " ''extspec'"
d1ce36d7 2881$ ENDIF
a3bd614a
PP
2882$ goto ext_loop
2883$end_ext:
2884$ close CONFIG
2885$ DELETE/SYMBOL xxx
1f29050e
NC
2886$ DELETE/SYMBOL idx
2887$ DELETE/SYMBOL extspec
619cec6d 2888$ DELETE/SYMBOL extlen
d1ce36d7 2889$ DELETE/SYMBOL extension_dir_name
86ad859e
CB
2890$ xs_extensions = F$EDIT(xs_extensions,"TRIM,COMPRESS")
2891$ dflt = xs_extensions
a3bd614a
PP
2892$ IF ccname .NES. "DEC" .AND. ccname .NES. "CXX"
2893$ THEN
2894$ dflt = dflt - "POSIX" ! not with VAX C or GCC
2895$ ENDIF
2896$ dflt = dflt - "ByteLoader" ! needs to be ported
2897$ dflt = dflt - "DB_File" ! needs to be ported
2898$ dflt = dflt - "GDBM_File" ! needs porting/special library
1f29050e 2899$ dflt = dflt - "IPC/SysV" ! needs to be ported
a3bd614a
PP
2900$ dflt = dflt - "NDBM_File" ! needs porting/special library
2901$ dflt = dflt - "ODBM_File" ! needs porting/special library
1f29050e 2902$ dflt = dflt - "Sys/Syslog" ! needs porting/special library "GDBM_File macro LOG_DEBUG"
046cc26c 2903$ IF .NOT. Has_Dec_C_Sockets
9b5878df
CB
2904$ THEN
2905$ dflt = dflt - "Socket" ! optional on VMS
2906$ ENDIF
d1ce36d7
CB
2907$ dflt = dflt - "Win32API/File" - "Win32" ! need Dave Cutler's other project
2908$ nonxs_ext = nonxs_ext - "Win32CORE"
bd2aeadf 2909$ nonxs_ext2 = nonxs_ext2 - "Win32CORE"
a3bd614a 2910$ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
d1ce36d7 2911$ nonxs_ext = F$EDIT(nonxs_ext,"TRIM,COMPRESS")
bd2aeadf 2912$ nonxs_ext2 = F$EDIT(nonxs_ext2,"TRIM,COMPRESS")
a3bd614a 2913$!
97abc6ad
HM
2914$! Ask for their default list of extensions to build
2915$ echo ""
7558ebc2
PP
2916$ echo "It is time to specify which modules you want to build into"
2917$ echo "perl. Most of these are standard and should be chosen, though"
2918$ echo "you might, for example, want to build GDBM_File instead of"
2919$ echo "SDBM_File if you have the GDBM library built on your machine."
2920$ echo ""
97abc6ad 2921$ echo "Which modules do you want to build into perl?"
97abc6ad
HM
2922$ rp = "[''dflt'] "
2923$ GOSUB myread
63d52911 2924$ dynamic_ext = F$EDIT(ans,"TRIM,COMPRESS")
97abc6ad
HM
2925$!
2926$! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2927$ echo ""
570bb66e 2928$ echo "Checking your ""make"" utilities..."
97abc6ad
HM
2929$! If the 'build' that you use is not here add it and it's test
2930$! switch to the _END_ of these strings (and increment max_build)
2931$! (e.g. builders = builders + "/FOOMAKE"
2932$! probers = probers + " -fooVersionSwitch"
2933$! ) & please let me know about it.
2934$ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2935$ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2936$ max_build = 7
2937$!
96021e87
JM
2938$ orig_dflt = f$edit(builder,"UPCASE")
2939$ if orig_dflt .eqs. "" then orig_dflt = "MMK"
97abc6ad
HM
2940$ default_set = ""
2941$ ok_builders = ""
2942$ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2943$ WRITE CONFIG "dont_make_anything_yet:"
2944$ WRITE CONFIG F$FAO("!_")
2945$ CLOSE CONFIG
2946$ n = 0
2947$ messages = F$ENVIRONMENT("MESSAGE")
2948$Build_probe:
2949$ build = F$ELEMENT(n,"/",builders)
2950$ probe = F$ELEMENT(n,"!",probers)
2951$ echo "Testing whether you have ''build' on your system..."
570bb66e
JH
2952$!
2953$! Noted with GNU Make version 3.60 that the $status and $severity
2954$! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2955$! $SEVERITY == "4".
2956$!
a3ef2c6f
GS
2957$ SET NOON
2958$ ON CONTROL_Y THEN GOTO Reenable_messages_build
2959$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
97abc6ad 2960$ 'build' 'probe'
570bb66e 2961$ IF ($SEVERITY .EQ. 1) ! not adequate?
97abc6ad
HM
2962$ THEN
2963$ echo "OK."
2964$ IF (build .EQS. orig_dflt)
2965$ THEN
2966$ default_set = "TRUE"
2967$ dflt = build
2968$ ENDIF
2969$ ok_builders = ok_builders + " " + build
2970$ IF (.NOT. default_set) THEN dflt = build
2971$ ELSE
2972$ echo "Nope."
2973$ ENDIF
a3ef2c6f
GS
2974$Reenable_messages_build:
2975$ SET MESSAGE 'messages'
2976$ SET ON
9b5c8979 2977$ on control_y then goto clean_up
97abc6ad
HM
2978$ n = n + 1
2979$ IF (n .LT. max_build) THEN GOTO Build_probe
2980$!
2981$ echo ""
2982$ IF (ok_builders .NES. "")
2983$ THEN
2984$ echo "Here is the list of builders you can apparently use:"
2985$ echo "(",ok_builders," )"
a5fddd44 2986$ rp = "Which """"make"""" utility do you wish to use? [''dflt'] "
97abc6ad
HM
2987$ GOSUB myread
2988$ ans = F$EDIT(ans,"TRIM, COMPRESS")
2989$ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2990$ IF (ans .EQS. "")
2991$ THEN build = dflt
2992$ ELSE build = ans
2993$ ENDIF
2994$ ELSE
2995$ TYPE SYS$INPUT:
7558ebc2 2996$ DECK
97abc6ad
HM
2997
2998%Config-E-VMS, ERROR:
2999 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
3000 utility of some sort and after checking my "builders" list I cannot find
3001 the symbol or command you use on your system to compile programs.
3002
7558ebc2 3003$ EOD
570bb66e 3004$ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
97abc6ad
HM
3005$ ans = F$EDIT(ans,"TRIM, COMPRESS")
3006$ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
3007$ IF (ans .EQS. "")
3008$ THEN build = dflt
7558ebc2 3009$ echo "I do not know where ""make"" is, and my life depends on it."
97abc6ad
HM
3010$ echo "Go find a make program or fix your DCL$PATH setting!"
3011$ echo "ABORTING..."
3012$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
3013$ STOP
3014$ EXIT 2 !$STATUS = "%X00000002" (error)
3015$ ELSE
3016$ build = ans
3017$ ENDIF
3018$ ENDIF
3019$!
fcc434ad 3020$ DELETE/NOLOG/NOCONFIRM Makefile.;
97abc6ad
HM
3021$ GOTO Beyond_open
3022$Open_error:
3023$ TYPE SYS$INPUT:
7558ebc2 3024$ DECK
97abc6ad
HM
3025
3026 There seems to be trouble. I just tried to create a file in
7558ebc2 3027$ EOD
97abc6ad
HM
3028$ echo4 'F$ENVIRONMENT("DEFAULT")'
3029$ TYPE SYS$INPUT:
7558ebc2 3030$ DECK
97abc6ad
HM
3031 but was unsuccessful. I am stopping now. Please check that directories'
3032 PROTECTION bits. I will leave you in the directory where you started
3033 Configure.com
7558ebc2 3034$ EOD
97abc6ad
HM
3035$ echo4 "ABORTING..."
3036$ GOTO Clean_up
3037$ STOP
3038$ EXIT
3039$!
3040$Beyond_open:
3041$! echo " Very well I will proceed with ""''build'"""
3042$ make = F$EDIT(build,"UPCASE")
3043$!
3044$!: locate the preferred pager for this system
3045$!pagers = "most|more|less|type/page"
936f6df1
CB
3046$ IF osvers .GES. "V6.1"
3047$ THEN
3048$ dflt = "type/page=save=10"
3049$ ELSE
3050$ dflt = "type/page"
3051$ ENDIF
dfe814dc
PP
3052$! assume that the presence of a most symbol indicates the presence
3053$! of the pager.
3054$ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most"
3055$ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager
3056$ rp="What pager is used on your system? [''dflt'] "
3057$ GOSUB myread
9b5c8979 3058$ pager = ans
97abc6ad 3059$!
97abc6ad
HM
3060$! update makefile here
3061$! echo4 "Updating makefile..."
3062$!
3063$ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
3064$ THEN
08c7cbbb
GS
3065$ makefile = "" !wrt MANIFEST dir
3066$ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
3067$ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
570bb66e 3068$ Makefile_SH = "descrip_mms.template"
97abc6ad 3069$ ELSE
08c7cbbb
GS
3070$ makefile = " -f Makefile." !wrt MANIFEST dir
3071$ UUmakefile = "[-]Makefile." !wrt CWD dir
3072$ DEFmakefile = "Makefile." !wrt DEF dir (?)
570bb66e 3073$ Makefile_SH = "Makefile.in"
97abc6ad
HM
3074$ ENDIF
3075$!
7558ebc2
PP
3076$ IF macros .NES. ""
3077$ THEN
97abc6ad
HM
3078$ tmp = F$LENGTH(macros)
3079$ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
3080$ macros = "/macro=(" + macros + ")"
3081$ ENDIF
498336ed
CB
3082$! Build up the extra C flags
3083$!
7558ebc2
PP
3084$ IF use_ieee_math
3085$ THEN
e0261ef8 3086$ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm"
3ad67d07 3087$ ELSE
2b4b3ebb 3088$ IF (F$ELEMENT(0, "-", archname).EQS."VMS_IA64")
3ad67d07
CB
3089$ THEN
3090$ extra_flags = "''extra_flags'" + "/float=g_float"
3091$ ENDIF
7558ebc2 3092$ ENDIF
1171624b 3093$ names_flags = ""
7558ebc2
PP
3094$ IF be_case_sensitive
3095$ THEN
1171624b 3096$ names_flags = "AS_IS"
7558ebc2 3097$ ENDIF
1171624b
CB
3098$ IF shorten_long_symbols
3099$ THEN
3100$ IF be_case_sensitive
3101$ THEN
3102$ names_flags = "''names_flags',SHORTENED"
3103$ ELSE
3104$ names_flags = "SHORTENED"
3105$ ENDIF
3106$ ENDIF
3107$ IF F$LENGTH(names_flags) .ne. 0
3108$ THEN
3109$ extra_flags = "''extra_flags'" + "/NAMES=(''names_flags')"
3110$ ENDIF
3111$ DELETE/SYMBOLS names_flags
498336ed 3112$ extra_flags = "''extra_flags'" + "''user_c_flags'"
97abc6ad 3113$!
570bb66e
JH
3114$ min_pgflquota = "100000"
3115$ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
3116$ IF pgflquota .LES. min_pgflquota
3117$ THEN
3118$ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
3119$ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
3120$ IF ans
3121$ THEN
3122$ echo4 "Continuing..."
3123$ ELSE
3124$ echo4 "ABORTING..."
3125$ GOTO Clean_up
3126$ ENDIF
3127$ ENDIF
97abc6ad
HM
3128$!
3129$ echo ""
570bb66e
JH
3130$ echo4 "Checking the C run-time library."
3131$!
56aeb0ae 3132$! Former SUBCONFIGURE.COM
570bb66e
JH
3133$!
3134$! - build a config.sh for VMS Perl.
3135$! - use built config.sh to take config_h.SH -> config.h
3136$! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
3137$! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
3138$! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
570bb66e
JH
3139$!
3140$! Note for folks from other platforms changing things in here:
3141$!
3142$! Fancy changes (based on compiler capabilities or VMS version or
3143$! whatever) are tricky, so go ahead and punt on those.
3144$!
3145$! Simple changes, though (say, always setting something to 1, or undef,
3146$! or something like that) are straightforward. Adding a new constant
3147$! item for the ultimately created config.sh requires at least one
3148$! (possibly more) line(s) to this file.
3149$!
3150$! Add a line in the format:
3151$!
3152$! $ WC "foo='undef'"
3153$!
3154$! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
3155$! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
3156$! is sorted ASCII and corresponds to the output of config.sh in the
3157$! Bourne shell version of Configure).
3158$! Be very careful with quoting, as it can be tricky.
3159$! For example if instead of a constant string like 'undef' or 'define'
3160$! you wanted to add something to VMS's config.sh that looks like:
3161$!
3162$! blank_string=''
3163$!
3164$! then add a line that looks like this before the
3165$! '##END WRITE NEW CONSTANTS HERE##' tagged line:
3166$!
3167$! $ WC "blank_string='" + "'"
3168$!
3169$! (+ is the string concatenator and "''var'" has the effect
3170$! of "${var}" in perl or sh, but "'const'" is not interpolated).
3171$!
3172$! Note that unitialized variables, such as a line like:
3173$!
3174$! $ WC "new_var='" + new_var + "'"
3175$!
3176$! should be avoided unless new_var has a value assigned prior
3177$! to that line (think of perl's -w warnings).
3178$!
3179$! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
3180$! \NEW_VAR\
3181$!
3182$!
3183$ vms_ver = F$EXTRACT(1,3, osvers)
3184$ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
3185$ MCC = f$edit(mcc, "UPCASE")
3186$ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
414b89cc 3187$ IF ccname .EQS. "DEC"
570bb66e
JH
3188$ THEN
3189$ Checkcc := "''Mcc'/prefix=all"
3190$ ELSE
414b89cc 3191$ IF ccname .EQS. "CXX"
570bb66e
JH
3192$ THEN
3193$ Checkcc := cxx
3194$ ELSE
3195$ Checkcc := "''Mcc'"
3196$ ENDIF
3197$ ENDIF
3198$ ccflags = ccflags + extra_flags
3199$ IF be_case_sensitive
3200$ THEN
3201$ d_vms_be_case_sensitive = "define"
3202$ ELSE
3203$ d_vms_be_case_sensitive = "undef"
3204$ ENDIF
1171624b
CB
3205$ IF shorten_long_symbols
3206$ THEN
3207$ d_vms_shorten_long_symbols = "define"
3208$ ELSE
3209$ d_vms_shorten_long_symbols = "undef"
3210$ ENDIF
570bb66e
JH
3211$! Some constant defaults.
3212$ hwname = f$getsyi("HW_NAME")
3213$ myname = myhostname
3214$ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
3215$!
3216$ ccdlflags=""
3217$ cccdlflags=""
3218$!
50ddda1d
CB
3219$! FIXME -- This section does not really handle all the different permutations
3220$! of 64-bitness, and it does not provide for the /POINTER_SIZE=64 compiler
3221$! option that would be necessary to support the "explicit 64-bit interfaces"
3222$! promised by -Dusemorebits.
3223$!
3224$ usemorebits = "undef"
570bb66e
JH
3225$ IF use64bitint .OR. use64bitint .EQS. "define"
3226$ THEN
3227$ use64bitint = "define"
842bcadf
CB
3228$ ivdformat="""Ld"""
3229$ uvuformat="""Lu"""
3230$ uvoformat="""Lo"""
3231$ uvxformat="""Lx"""
3232$ uvXUformat="""LX"""
570bb66e
JH
3233$ ELSE
3234$ use64bitint = "undef"
842bcadf
CB
3235$ ivdformat="""ld"""
3236$ uvuformat="""lu"""
3237$ uvoformat="""lo"""
3238$ uvxformat="""lx"""
3239$ uvXUformat="""lX"""
3240$ ENDIF
3241$ IF uselongdouble .OR. uselongdouble .EQS. "define"
3242$ THEN
50ddda1d
CB
3243$ uselongdouble = "define"
3244$ alignbytes="16"
842bcadf 3245$ nveformat="""Le"""
d677d0fc 3246$ nvEUformat="""LE"""
842bcadf 3247$ nvfformat="""Lf"""
d677d0fc 3248$ nvFUformat="""LF"""
842bcadf 3249$ nvgformat="""Lg"""
d677d0fc 3250$ nvGUformat="""LG"""
842bcadf 3251$ ELSE
50ddda1d 3252$ uselongdouble = "undef"
842bcadf 3253$ nveformat="""e"""
d677d0fc 3254$ nvEUformat="""E"""
842bcadf 3255$ nvfformat="""f"""
d677d0fc 3256$ nvFUformat="""F"""
842bcadf 3257$ nvgformat="""g"""
d677d0fc 3258$ nvGUformat="""G"""
570bb66e
JH
3259$ ENDIF
3260$ IF use64bitall .OR. use64bitall .EQS. "define"
3261$ THEN
3262$ use64bitall = "define"
3263$ ELSE
3264$ use64bitall = "undef"
3265$ ENDIF
e366167b
CB
3266$ IF uselargefiles .OR. uselargefiles .EQS. "define"
3267$ THEN
3268$ uselargefiles = "define"
3269$ ELSE
3270$ uselargefiles = "undef"
3271$ ENDIF
570bb66e 3272$!
9b5c8979
JH
3273$ usemymalloc = "undef"
3274$ if mymalloc then usemymalloc = "define"
570bb66e
JH
3275$!
3276$ perl_cc=Mcc
3277$!
2b4b3ebb 3278$ IF (sharedperl .AND. F$ELEMENT(0, "-", archname) .EQS. "VMS_AXP")
570bb66e
JH
3279$ THEN
3280$ obj_ext=".abj"
3281$ so="axe"
3282$ dlext="axe"
3283$ exe_ext=".axe"
3284$ lib_ext=".alb"
3285$ ELSE
2b4b3ebb 3286$ IF (sharedperl .AND. F$ELEMENT(0, "-", archname) .EQS. "VMS_IA64")
a50752f9
CB
3287$ THEN
3288$ obj_ext=".ibj"
3289$ so="ixe"
3290$ dlext="ixe"
3291$ exe_ext=".ixe"
3292$ lib_ext=".ilb"
3293$ ELSE
3294$ obj_ext=".obj"
3295$ so="exe"
3296$ dlext="exe"
3297$ exe_ext=".exe"
3298$ lib_ext=".olb"
3299$ ENDIF
570bb66e
JH
3300$ ENDIF
3301$ dlobj="dl_vms''obj_ext'"
3302$!
1b24ed4b 3303$ cppstdin="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
570bb66e 3304$ cppminus=" "
1b24ed4b 3305$ cpprun="''perl_cc'/noobj/comments=as_is/preprocess=sys$output sys$input"
570bb66e
JH
3306$ cpplast=" "
3307$!
3308$ timetype="time_t"
3309$ signal_t="void"
3310$ stdchar="char"
3311$!
3312$ IF mymalloc
3313$ THEN d_mymalloc="define"
3314$ ELSE d_mymalloc="undef"
3315$ ENDIF
3316$!
1be1b388 3317$ usedevel="undef"
570bb66e 3318$ usedl="define"
ef060a86 3319$ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
4a5365b8 3320$ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
570bb66e 3321$!
32995a38 3322$ libs=" "
414b89cc 3323$ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
570bb66e
JH
3324$ THEN
3325$ libc="(DECCRTL)"
3326$ ELSE
3327$ libc=" "
3328$ ENDIF
3329$!
94928b12
JH
3330$! perllibs should be libs with all non-core libs (such as gdbm) removed.
3331$!
3332$ perllibs=libs
3333$!
570bb66e 3334$!
2b4b3ebb 3335$ IF F$ELEMENT(0, "-", archname) .NES. "VMS_VAX"
570bb66e
JH
3336$ THEN
3337$ d_PRId64 = "define"
d677d0fc 3338$ d_PRIi64 = "define"
570bb66e
JH
3339$ d_PRIu64 = "define"
3340$ d_PRIo64 = "define"
3341$ d_PRIx64 = "define"
842bcadf 3342$ d_PRIXU64 = "define"
570bb66e 3343$ sPRId64 = """Ld"""
6b356c8e 3344$ sPRIXU64 = """LX"""
59a27e12 3345$ sPRIi64 = """Li"""
570bb66e
JH
3346$ sPRIo64 = """Lo"""
3347$ sPRIu64 = """Lu"""
3348$ sPRIx64 = """Lx"""
3349$ d_quad = "define"
3350$ quadtype = "long long"
3351$ uquadtype = "unsigned long long"
d207eff1
CB
3352$ quadkind = "3"
3353$!
3354$ d_frexpl = "define"
3355$ d_modfl = "define"
3356$ d_modflproto = "define"
570bb66e
JH
3357$ ELSE
3358$ d_PRId64 = "undef"
d677d0fc 3359$ d_PRIi64 = "undef"
6b356c8e 3360$ d_PRIXU64 = "undef"
570bb66e
JH
3361$ d_PRIu64 = "undef"
3362$ d_PRIo64 = "undef"
3363$ d_PRIx64 = "undef"
3364$ sPRId64 = ""
6b356c8e 3365$ sPRIXU64 = """lX"""
59a27e12 3366$ sPRIi64 = ""
570bb66e
JH
3367$ sPRIo64 = ""
3368$ sPRIu64 = ""
3369$ sPRIx64 = ""
3370$ d_quad = "undef"
d207eff1
CB
3371$ quadtype = "undef"
3372$ uquadtype = "undef"
3373$ quadkind = "undef"
a175606a 3374$!
570bb66e 3375$ d_frexpl = "undef"
570bb66e 3376$ d_modfl = "undef"
8725ccc4 3377$ d_modflproto = "undef"
570bb66e
JH
3378$ ENDIF
3379$!
6732c5ab 3380$ IF useieee .OR. useieee .EQS. "define"
a175606a
CB
3381$ THEN
3382$ d_isnan = "define"
3383$ d_isnanl = "define"
3384$ ELSE
3385$ d_isnan = "undef"
3386$ d_isnanl = "undef"
3387$ ENDIF
3388$!
570bb66e
JH
3389$! Now some that we build up
3390$!
0f7b1033
CB
3391$ use5005threads = "undef"
3392$ d_old_pthread_create_joinable = "undef"
3393$ old_pthread_create_joinable = " "
a92ae878 3394$ IF use_threads
570bb66e 3395$ THEN
0f7b1033 3396$ useithreads = "define"
570bb66e 3397$ ELSE
570bb66e
JH
3398$ useithreads = "undef"
3399$ ENDIF
3400$!
3401$! Some that we need to invoke the compiler for
3402$!
3403$!
3404$! handy construction aliases/symbols
3405$!
3406$ OS := "open/write CONFIG []try.c"
3407$ WS := "write CONFIG"
3408$ CS := "close CONFIG"
3409$ DS := "delete/nolog/noconfirm []try.*;*"
3410$ Needs_Opt := N
3411$ good_compile = %X10B90001
414b89cc 3412$ IF ccname .EQS. "GCC"
570bb66e
JH
3413$ THEN
3414$ open/write OPTCHAN []try.opt
3415$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
3416$ write OPTCHAN "Sys$Share:VAXCRTL/Share"
3417$ Close OPTCHAN
3418$ Needs_Opt := Y
3419$ good_compile = %X10000001
3420$ ENDIF
414b89cc 3421$ IF ccname .EQS. "CXX"
570bb66e
JH
3422$ THEN
3423$ good_compile = %X15F60001
3424$ ENDIF
3425$ good_link = %X10000001
3426$ tmp = "" ! null string default
3427$!
3428$ GOTO beyond_compile_ok
3429$!
3430$! Check for type sizes
3431$!
3432$type_size_check:
3433$!
3434$ OS
7558ebc2
PP
3435$ WS "#if defined(__DECC) || defined(__DECCXX)"
3436$ WS "#include <stdlib.h>"
3437$ WS "#endif"
3438$ WS "#include <stdio.h>"
3439$ WS "int main()"
570bb66e
JH
3440$ WS "{"
3441$ WS "printf(""%d\n"", sizeof(''tmp'));"
7558ebc2 3442$ WS "exit(0);"
570bb66e
JH
3443$ WS "}"
3444$ CS
3445$ GOSUB compile
3446$ RETURN
3447$!
3448$!: locate header file
3449$findhdr:
3450$!
3451$ OS
7558ebc2
PP
3452$ WS "#if defined(__DECC) || defined(__DECCXX)"
3453$ WS "#include <stdlib.h>"
3454$ WS "#endif"
3455$ WS "#include <stdio.h>"
570bb66e 3456$ WS "#include <''tmp'>"
7558ebc2 3457$ WS "int main()"
570bb66e
JH
3458$ WS "{"
3459$ WS "printf(""define\n"");"
7558ebc2 3460$ WS "exit(0);"
570bb66e
JH
3461$ WS "}"
3462$ CS
3463$ GOSUB link_ok
3464$ RETURN
3465$!
3466$!: define an alternate in-header-list? function
3467$inhdr:
3468$!
3469$ GOSUB findhdr
3470$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3471$ THEN
3472$ echo4 "<''tmp'> found."
3473$ tmp = "define"
3474$ ELSE
3475$ echo4 "<''tmp'> NOT found."
3476$ tmp = "undef"
3477$ ENDIF
3478$ RETURN
3479$!
3480$!: define an is-in-libc? function
3481$inlibc:
3482$ GOSUB link_ok
3483$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3484$ THEN
3485$ echo4 "''tmp'() found."
3486$ tmp = "define"
3487$ ELSE
3488$ echo4 "''tmp'() NOT found."
3489$ tmp = "undef"
3490$ ENDIF
3491$ RETURN
3492$!
3493$!: define a shorthand compile call
3494$compile:
3495$ GOSUB link_ok
3496$just_mcr_it:
3497$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3498$ THEN
3499$ OPEN/WRITE CONFIG []try.out
3500$ DEFINE/USER_MODE SYS$ERROR CONFIG
3501$ DEFINE/USER_MODE SYS$OUTPUT CONFIG
3502$ MCR []try.exe
3503$ CLOSE CONFIG
3504$ OPEN/READ CONFIG []try.out
3505$ READ CONFIG tmp
3506$ CLOSE CONFIG
3507$ DELETE/NOLOG/NOCONFIRM []try.out;
3508$ DELETE/NOLOG/NOCONFIRM []try.exe;
3509$ ELSE
3510$ tmp = "" ! null string default
3511$ ENDIF
3512$ RETURN
3513$!
3514$link_ok:
3515$ GOSUB compile_ok
3516$ DEFINE/USER_MODE SYS$ERROR _NLA0:
3517$ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3518$ SET NOON
3519$ IF Needs_Opt
3520$ THEN
3521$ 'ld' try.obj,try.opt/opt
3522$ link_status = $status
3523$ ELSE
3524$ 'ld' try.obj
3525$ link_status = $status
3526$ ENDIF
3527$ SET ON
3528$ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
3529$ RETURN
3530$!
3531$!: define a shorthand compile call for compilations that should be ok.
3532$compile_ok:
3533$ DEFINE/USER_MODE SYS$ERROR _NLA0:
3534$ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
3535$ SET NOON
3536$ 'Checkcc' try.c
3537$ compile_status = $status
3538$ SET ON
3539$ DELETE/NOLOG/NOCONFIRM try.c;
3540$ RETURN
3541$!
3542$beyond_compile_ok:
3543$!
3544$! Check for __STDC__
3545$!
3546$ OS
7558ebc2
PP
3547$ WS "#if defined(__DECC) || defined(__DECCXX)"
3548$ WS "#include <stdlib.h>"
3549$ WS "#endif"
3550$ WS "#include <stdio.h>"
3551$ WS "int main()"
570bb66e 3552$ WS "{"
7558ebc2
PP
3553$ WS "#ifdef __STDC__"
3554$ WS "printf(""42\n"");"
85fac3a9
CB
3555$ WS "#elif defined (__STD_ANSI)" ! for CXX
3556$ WS "printf(""42\n"");"
7558ebc2
PP
3557$ WS "#else"
3558$ WS "printf(""1\n"");"
3559$ WS "#endif"
3560$ WS "exit(0);"
570bb66e
JH
3561$ WS "}"
3562$ CS
3563$ GOSUB compile
3564$ cpp_stuff=tmp
3565$ IF F$INTEGER(tmp) .eq. 42
3566$ THEN
85fac3a9
CB
3567$ echo4 "Oh! Smells like ANSI's been here."
3568$ echo "We can catify or stringify, separately or together!"
570bb66e
JH
3569$ ENDIF
3570$!
3571$! Check for double size
3572$!
3573$ echo4 "Checking to see how big your double precision numbers are..."
3574$ tmp="double"
3575$ GOSUB type_size_check
3576$ doublesize = tmp
3577$ echo "Your double is ''doublesize' bytes long."
3578$!
3579$! Check for long double size
3580$!
3581$ OS
7558ebc2 3582$ WS "#if defined(__DECC) || defined(__DECCXX)"
0e965207 3583$ WS "#pragma message disable ALL" ! VAX compilers may have distracting informationals
7558ebc2
PP
3584$ WS "#include <stdlib.h>"
3585$ WS "#endif"
3586$ WS "#include <stdio.h>"
3587$ WS "int main()"
570bb66e 3588$ WS "{"
7558ebc2
PP
3589$ WS "printf(""%d\n"", sizeof(long double));"
3590$ WS "exit(0);"
570bb66e
JH
3591$ WS "}"
3592$ CS
3593$ echo4 "Checking to see if you have long double..."
3594$ GOSUB link_ok
3595$ IF link_status .NE. good_link
3596$ THEN
3597$ longdblsize="0"
3598$ d_longdbl="undef"
3599$ echo "You do not have long double."
3600$ ELSE
3601$ echo "You have long double."
3602$ echo4 "Checking to see how big your long doubles are..."
3603$ GOSUB just_mcr_it
3604$ longdblsize = tmp
3605$ d_longdbl = "define"
3606$ echo "Your long doubles are ''longdblsize' bytes long."
3607$ ENDIF
3608$!
7f830b7b
CB
3609$ IF d_longdbl .OR. d_longdbl .EQS. "define"
3610$ THEN
3611$ d_PRIEUldbl = "define"
3612$ d_PRIFUldbl = "define"
3613$ d_PRIGUldbl = "define"
3614$ d_PRIeldbl = "define"
3615$ d_PRIfldbl = "define"
3616$ d_PRIgldbl = "define"
3617$ sPRIEUldbl = """LE"""
3618$ sPRIFUldbl = """LF"""
3619$ sPRIGUldbl = """LG"""
3620$ sPRIeldbl = """Le"""
3621$ sPRIfldbl = """Lf"""
3622$ sPRIgldbl = """Lg"""
3623$ ELSE
3624$ d_PRIEUldbl = "undef"
3625$ d_PRIFUldbl = "undef"
3626$ d_PRIGUldbl = "undef"
3627$ d_PRIeldbl = "undef"
3628$ d_PRIfldbl = "undef"
3629$ d_PRIgldbl = "undef"
3630$ sPRIEUldbl = ""
3631$ sPRIFUldbl = ""
3632$ sPRIGUldbl = ""
3633$ sPRIeldbl = ""
3634$ sPRIfldbl = ""
3635$ sPRIgldbl = ""
3636$ ENDIF
3637$ d_SCNfldbl = d_PRIfldbl
3638$ sSCNfldbl = sPRIfldbl ! expect consistency
3639$!
570bb66e
JH
3640$!: check for long long
3641$ OS
7558ebc2
PP
3642$ WS "#if defined(__DECC) || defined(__DECCXX)"
3643$ WS "#include <stdlib.h>"
3644$ WS "#endif"
3645$ WS "#include <stdio.h>"
3646$ WS "int main()"
570bb66e 3647$ WS "{"
7558ebc2
PP
3648$ WS "printf(""%d\n"", sizeof(long long));"
3649$ WS "exit(0);"
570bb66e
JH
3650$ WS "}"
3651$ CS
3652$ echo4 "Checking to see if you have long long..."
3653$ GOSUB link_ok
3654$ IF link_status .NE. good_link
3655$ THEN
3656$ longlongsize="0"
3657$ d_longlong="undef"
3658$ echo "You do not have long long."
3659$ ELSE
3660$ echo "You have long long."
3661$ echo4 "Checking to see how big your long longs are..."
3662$ GOSUB just_mcr_it
3663$ longlongsize = tmp
3664$ d_longlong = "define"
3665$ echo "Your long longs are ''longlongsize' bytes long."
3666$ ENDIF
3667$!
3668$! Check the prototype for getgid
3669$!
3670$ echo "Looking for the type for group ids returned by getgid()."
3671$ OS
7558ebc2
PP
3672$ WS "#if defined(__DECC) || defined(__DECCXX)"
3673$ WS "#include <stdlib.h>"
3674$ WS "#endif"
3675$ WS "#include <stdio.h>"
3676$ WS "#include <types.h>"
3677$ WS "int main()"
570bb66e 3678$ WS "{"
7558ebc2
PP
3679$ WS "gid_t foo;"
3680$ WS "exit(0);"
570bb66e
JH
3681$ WS "}"
3682$ CS
3683$ GOSUB compile_ok
3684$ IF compile_status .NE. good_compile
3685$ THEN
3686$! Okay, gid_t failed. Must be unsigned int
3687$ gidtype = "unsigned int"
3688$ echo4 "assuming ""''gidtype'""."
3689$ ELSE
3690$ gidtype = "gid_t"
3691$ echo4 "gid_t found."
3692$ ENDIF
3693$!
3694$! Check to see if we've got dev_t
3695$!
3696$ echo "Looking for the type for dev."
3697$ OS
7558ebc2
PP
3698$ WS "#if defined(__DECC) || defined(__DECCXX)"
3699$ WS "#include <stdlib.h>"
3700$ WS "#endif"
3701$ WS "#include <stdio.h>"
3702$ WS "#include <types.h>"
3703$ WS "int main()"
570bb66e 3704$ WS "{"
7558ebc2
PP
3705$ WS "dev_t foo;"
3706$ WS "exit(0);"
570bb66e
JH
3707$ WS "}"
3708$ CS
3709$ GOSUB compile_ok
3710$ IF compile_status .NE. good_compile
3711$ THEN
3712$! Okay, dev_t failed. Must be unsigned int
3713$ devtype = "unsigned int"
3714$ echo4 "assuming ""''devtype'""."
3715$ ELSE
3716$ devtype = "dev_t"
3717$ echo4 "dev_t found."
3718$ ENDIF
3719$!
3720$! Check to see if we've got unistd.h (which we ought to, but you never know)
3721$!
3722$ i_netdb = "undef"
3723$ tmp = "unistd.h"
3724$ GOSUB inhdr
3725$ i_unistd = tmp
3726$!
704c2eb3
JM
3727$! Check to see if we've got utime.h (which we should use if we have)
3728$!
3729$ i_netdb = "undef"
3730$ tmp = "utime.h"
3731$ GOSUB inhdr
3732$ i_utime = tmp
3733$!
41cbbefa
CB
3734$! do we have getppid()?
3735$!
3736$ IF i_unistd .EQS. "define"
3737$ THEN
3738$ OS
3739$ WS "#include <stdio.h>"
3740$ WS "#include <unistd.h>"
3741$ WS "int main() {"
3742$ WS "printf(""%d\n"",getppid());"
3743$ WS "return(0);"
3744$ WS "}"
3745$ CS
3746$ tmp = "getppid"
3747$ GOSUB inlibc
3748$ d_getppid = tmp
3749$ ELSE
3750$ d_getppid = "undef"
3751$ ENDIF
3752$!
570bb66e
JH
3753$!: see if this is a libutil.h system
3754$!
3755$ tmp = "libutil.h"
3756$ GOSUB inhdr
3757$ i_libutil = tmp
3758$!
3759$! Check to see if we've got shadow.h (probably not, but...)
3760$!
3761$ tmp = "shadow.h"
3762$ GOSUB inhdr
3763$ i_shadow = tmp
3764$!
3765$! Check to see if we've got socks.h (probably not, but...)
3766$!
3767$ tmp = "socks.h"
3768$ GOSUB inhdr
3769$ i_socks = tmp
3770$!
3771$! Check the prototype for select
3772$!
046cc26c 3773$ IF Has_Dec_C_Sockets
570bb66e
JH
3774$ THEN
3775$ OS
7558ebc2
PP
3776$ WS "#if defined(__DECC) || defined(__DECCXX)"
3777$ WS "#include <stdlib.h>"
3778$ WS "#endif"
3779$ WS "#include <stdio.h>"
3780$ WS "#include <types.h>"
3781$ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
046cc26c
CB
3782$ WS "#include <time.h>"
3783$ WS "#include <socket.h>"
7558ebc2 3784$ WS "int main()"
570bb66e 3785$ WS "{"
7558ebc2
PP
3786$ WS "fd_set *foo;"
3787$ WS "int bar;"
3788$ WS "foo = NULL;"
3789$ WS "bar = select(2, foo, foo, foo, NULL);"
3790$ WS "exit(0);"
570bb66e
JH
3791$ WS "}"
3792$ CS
3793$ GOSUB compile_ok
3794$ IF compile_status .NE. good_compile
3795$ THEN
3796$! Okay, select failed. Must be an int *
3797$ selecttype = "int *"
3798$ echo4 "select() NOT found."
3799$ ELSE
3800$ selecttype="fd_set *"
3801$ echo4 "select() found."
3802$ ENDIF
3803$ ELSE
3804$ ! No sockets, so stick in an int * : no select, so pick a harmless default
3805$ selecttype = "int *"
3806$ ENDIF
3807$!
3808$! Check to see if fd_set exists
3809$!
3810$ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3811$ OS
7558ebc2
PP
3812$ WS "#if defined(__DECC) || defined(__DECCXX)"
3813$ WS "#include <stdlib.h>"
3814$ WS "#endif"
3815$ WS "#include <stdio.h>"
3816$ WS "#include <types.h>"
570bb66e
JH
3817$ IF Has_Dec_C_Sockets
3818$ THEN
7558ebc2
PP
3819$ WS "#include <time.h>"
3820$ WS "#include <socket.h>"
570bb66e 3821$ ENDIF
7558ebc2 3822$ WS "int main()"
570bb66e 3823$ WS "{"
7558ebc2
PP
3824$ WS "fd_set *foo;"
3825$ WS "int bar;"
3826$ WS "exit(0);"
570bb66e
JH
3827$ WS "}"
3828$ CS
3829$ GOSUB compile_ok
3830$ IF compile_status .ne. good_compile
3831$ THEN
3832$! Okay, fd_set failed. Must not exist
3833$ d_fd_set = "undef"
3834$ echo4 "Hmm, your compiler has some difficulty with fd_set."
3835$ ELSE
3836$ d_fd_set="define"
3837$ echo4 "Well, your system knows about the normal fd_set typedef..."
3838$ ENDIF
3839$!
3840$! Check for inttypes.h
3841$!
3842$ tmp = "inttypes.h"
3843$ GOSUB inhdr
3844$ i_inttypes = tmp
3845$!
3846$! Check to see if off64_t exists
3847$!
3848$ echo4 "Checking to see if you have off64_t..."
3849$ OS
7558ebc2
PP
3850$ WS "#if defined(__DECC) || defined(__DECCXX)"
3851$ WS "#include <stdlib.h>"
3852$ WS "#endif"
3853$ WS "#include <stdio.h>"
3854$ WS "#include <types.h>"
3855$ WS "#''i_inttypes' IIH"
3856$ WS "#ifdef IIH"
3857$ WS "#include <inttypes.h>"
3858$ WS "#endif"
3859$ WS "int main()"
570bb66e 3860$ WS "{"
7558ebc2
PP
3861$ WS "off64_t bar;"
3862$ WS "exit(0);"
570bb66e
JH
3863$ WS "}"
3864$ CS
3865$ GOSUB compile_ok
3866$ IF compile_status .EQ. good_compile
3867$ THEN
3868$ d_off64_t="define"
3869$ echo "You have off64_t."
3870$ ELSE
3871$ d_off64_t = "undef"
3872$ echo "You do not have off64_t."
3873$ ENDIF
3874$!
3875$! Check to see if fpos64_t exists
3876$!
3877$ echo4 "Checking to see if you have fpos64_t..."
3878$ OS
7558ebc2
PP
3879$ WS "#if defined(__DECC) || defined(__DECCXX)"
3880$ WS "#include <stdlib.h>"
3881$ WS "#endif"
3882$ WS "#include <stdio.h>"
3883$ WS "#include <types.h>"
3884$ WS "#''i_inttypes' IIH"
3885$ WS "#ifdef IIH"
3886$ WS "#include <inttypes.h>"
3887$ WS "#endif"
3888$ WS "int main()"
570bb66e 3889$ WS "{"
7558ebc2
PP
3890$ WS "fpos64_t bar;"
3891$ WS "exit(0);"
570bb66e
JH
3892$ WS "}"
3893$ CS
3894$ GOSUB compile_ok
3895$ IF compile_status .EQ. good_compile
3896$ THEN
3897$ d_fpos64_t="define"
3898$ echo "You have fpos64_t."
3899$ ELSE
3900$ d_fpos64_t = "undef"
3901$ echo "You do not have fpos64_t."
3902$ ENDIF
3903$!
3904$! Check to see if int64_t exists
3905$!
3906$ echo4 "Checking to see if you have int64_t..."
3907$ OS
7558ebc2
PP
3908$ WS "#if defined(__DECC) || defined(__DECCXX)"
3909$ WS "#include <stdlib.h>"
3910$ WS "#endif"
3911$ WS "#include <stdio.h>"
3912$ WS "#include <types.h>"
3913$ WS "#''i_inttypes' IIH"
3914$ WS "#ifdef IIH"
3915$ WS "#include <inttypes.h>"
3916$ WS "#endif"
3917$ WS "int main()"
570bb66e 3918$ WS "{"
7558ebc2
PP
3919$ WS "int64_t bar;"
3920$ WS "exit(0);"
570bb66e
JH
3921$ WS "}"
3922$ CS
3923$ GOSUB compile_ok
3924$ IF compile_status .EQ. good_compile
3925$ THEN
3926$ d_int64_t="define"
3927$ echo "You have int64_t."
3928$ ELSE
3929$ d_int64_t = "undef"
3930$ echo "You do not have int64_t."
3931$ ENDIF
3932$!
e0261ef8
CB
3933$! Check to see if fseeko exists
3934$!
3935$ OS
3936$ WS "#include <stdio.h>"
3937$ WS "int main()"
3938$ WS "{"
3939$ WS "FILE *f=NULL;"
3940$ WS "fseeko(f,(off_t)0,SEEK_SET);"
3941$ WS "return(0);"
3942$ WS "}"
3943$ CS
3944$ tmp = "fseeko"
3945$ GOSUB inlibc
3946$ d_fseeko = tmp
3947$!
3948$! Check to see if ftello exists
3949$!
3950$ OS
3951$ WS "#include <stdio.h>"
3952$ WS "int main()"
3953$ WS "{"
3954$ WS "FILE *f=NULL; off_t o=0;"
3955$ WS "o=ftello(f);"
3956$ WS "return(0);"
3957$ WS "}"
3958$ CS
3959$ tmp = "ftello"
3960$ GOSUB inlibc
3961$ d_ftello = tmp
3962$!
570bb66e
JH
3963$!: see if this is a netdb.h system
3964$ IF Has_Dec_C_Sockets
3965$ THEN
3966$ tmp = "netdb.h"
3967$ GOSUB inhdr
3968$ i_netdb = tmp
3969$ ENDIF
3970$!
3971$! Check for h_errno
3972$!
3973$ echo4 "Checking to see if you have h_errno..."
3974$ OS
7558ebc2
PP
3975$ WS "#if defined(__DECC) || defined(__DECCXX)"
3976$ WS "#include <stdlib.h>"
3977$ WS "#endif"
3978$ WS "#include <stdio.h>"
3979$ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3980$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
3981$ WS "int main()"
570bb66e 3982$ WS "{"
7558ebc2
PP
3983$ WS "h_errno = 3;"
3984$ WS "exit(0);"
570bb66e
JH
3985$ WS "}"
3986$ CS
3987$ GOSUB link_ok
3988$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3989$ THEN
3990$ d_herrno="define"
3991$ echo "You have h_errno."
3992$ ELSE
3993$ d_herrno="undef"
3994$ echo "You do not have h_errno."
3995$ ENDIF
3996$!
3997$! Check to see if gethostname exists
3998$!
046cc26c 3999$ IF Has_Dec_C_Sockets
570bb66e
JH
4000$ THEN
4001$ OS
7558ebc2
PP
4002$ WS "#if defined(__DECC) || defined(__DECCXX)"
4003$ WS "#include <stdlib.h>"
4004$ WS "#endif"
4005$ WS "#include <stdio.h>"
4006$ WS "#include <types.h>"
046cc26c
CB
4007$ WS "#include <time.h>"
4008$ WS "#include <socket.h>"
7558ebc2 4009$ WS "int main()"
570bb66e 4010$ WS "{"
7558ebc2
PP
4011$ WS "char name[100];"
4012$ WS "int bar, baz;"
4013$ WS "bar = 100;"
4014$ WS "baz = gethostname(name, bar);"
4015$ WS "exit(0);"
570bb66e
JH
4016$ WS "}"
4017$ CS
4018$ GOSUB link_ok
4019$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4020$ THEN
4021$ d_gethname="define"
4022$ echo4 "gethostname() found."
4023$ ELSE
4024$ d_gethname="undef"
4025$ ENDIF
4026$ ELSE
4027$ ! No sockets, so no gethname
4028$ d_gethname = "undef"
4029$ ENDIF
4030$!
4031$! Check for sys/file.h
4032$!
4033$ tmp = "sys/file.h"
4034$ GOSUB inhdr
4035$ i_sysfile = tmp
4036$!
670137c2
CB
4037$!
4038$! Check for sys/ioctl.h
4039$!
4040$ tmp = "sys/ioctl.h"
4041$ GOSUB inhdr
4042$ i_sysioctl = tmp
4043$!
570bb66e
JH
4044$! Check for sys/utsname.h
4045$!
4046$ tmp = "sys/utsname.h"
4047$ GOSUB inhdr
4048$ i_sysutsname = tmp
4049$!
4050$! Check for syslog.h
4051$!
4052$ tmp = "syslog.h"
4053$ GOSUB inhdr
4054$ i_syslog = tmp
4055$!
4056$! Check for poll.h
4057$!
4058$ tmp = "poll.h"
4059$ GOSUB inhdr
4060$ i_poll = tmp
4061$!
4062$! Check for sys/uio.h
4063$!
4064$ tmp = "sys/uio.h"
4065$ GOSUB inhdr
4066$ i_sysuio = tmp
4067$!
4068$! Check for sys/mode.h
4069$!
4070$ tmp = "sys/mode.h"
4071$ GOSUB inhdr
4072$ i_sysmode = tmp
4073$!
ed1b9de0
JM
4074$! Check for poll.h
4075$!
4076$ tmp = "sys/poll.h"
4077$ gosub inhdr
4078$ i_syspoll = tmp
4079$!
570bb66e
JH
4080$! Check for sys/access.h
4081$!
4082$ tmp = "sys/access.h"
4083$ GOSUB inhdr
4084$ i_sysaccess = tmp
4085$!
4086$! Check for sys/security.h
4087$!
4088$ tmp = "sys/security.h"
4089$ GOSUB inhdr
4090$ i_syssecrt = tmp
4091$!
4092$! Check for fcntl.h
4093$!
4094$ tmp = "fcntl.h"
4095$ GOSUB inhdr
4096$ i_fcntl = tmp
4097$!
4098$! Check for fcntl
4099$!
4100$ OS
7558ebc2
PP
4101$ WS "#if defined(__DECC) || defined(__DECCXX)"
4102$ WS "#include <stdlib.h>"
4103$ WS "#endif"
4104$ WS "#include <stdio.h>"
4105$ WS "#include <fcntl.h>"
4106$ WS "int main()"
570bb66e 4107$ WS "{"
7558ebc2
PP
4108$ WS "fcntl(1,2,3);"
4109$ WS "exit(0);"
570bb66e
JH
4110$ WS "}"
4111$ CS
4112$ tmp = "fcntl"
4113$ GOSUB inlibc
4114$ d_fcntl = tmp
4115$!
c44c4826
CB
4116$! Check for fcntl locking capability
4117$!
4118$ echo4 "Checking if fcntl-based file locking works... "
4119$ tmp = "undef"
4120$ IF d_fcntl .EQS. "define"
4121$ THEN
4122$ OS
4123$ WS "#include <stdio.h>"
4124$ WS "#if defined(__DECC) || defined(__DECCXX)"
4125$ WS "#include <stdlib.h>"
4126$ WS "#endif"
4127$ WS "#include <fcntl.h>"
4128$ WS "#include <unistd.h>"
4129$ WS "int main() {"
4130$ WS "#if defined(F_SETLK) && defined(F_SETLKW)"
4131$ WS " struct flock flock;"
4132$ WS " int retval, fd;"
5b36ee83 4133$ WS " fd = open(""[-]perl.c"", O_RDONLY);"
c44c4826
CB
4134$ WS " flock.l_type = F_RDLCK;"
4135$ WS " flock.l_whence = SEEK_SET;"
4136$ WS " flock.l_start = flock.l_len = 0;"
4137$ WS " retval = fcntl(fd, F_SETLK, &flock);"
4138$ WS " close(fd);"
4139$ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));"
4140$ WS "#else"
4141$ WS " printf(""undef\n"");"
4142$ WS "#endif"
4143$ WS "}"
4144$ CS
4145$ GOSUB link_ok
4146$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4147$ THEN
4148$ GOSUB just_mcr_it
4149$ IF tmp .EQS. "define"
4150$ THEN
4151$ echo4 "Yes, it seems to work."
4152$ ELSE
4153$ echo4 "Nope, it didn't work."
4154$ ENDIF
4155$ ELSE
4156$ echo4 "I'm unable to compile the test program, so I'll assume not."
4157$ tmp = "undef"
4158$ ENDIF
4159$ ELSE
4160$ echo4 "Nope, since you don't even have fcntl()."
4161$ ENDIF
4162$ d_fcntl_can_lock = tmp
4163$!
570bb66e
JH
4164$! Check for memchr
4165$!
4166$ OS
7558ebc2
PP
4167$ WS "#if defined(__DECC) || defined(__DECCXX)"
4168$ WS "#include <stdlib.h>"
4169$ WS "#endif"
4170$ WS "#include <string.h>"
4171$ WS "int main()"
570bb66e 4172$ WS "{"
7558ebc2 4173$ WS "char * place;"
85fac3a9 4174$ WS "place = (char *)memchr(""foo"", 47, 3);"
7558ebc2 4175$ WS "exit(0);"
570bb66e
JH
4176$ WS "}"
4177$ CS
4178$ tmp = "memchr"
4179$ GOSUB inlibc
4180$ d_memchr = tmp
4181$!
4182$! Check for strtoull
4183$!
4184$ OS
7558ebc2
PP
4185$ WS "#if defined(__DECC) || defined(__DECCXX)"
4186$ WS "#include <stdlib.h>"
4187$ WS "#endif"
4188$ WS "#include <string.h>"
4189$ WS "int main()"
570bb66e 4190$ WS "{"
7558ebc2
PP
4191$ WS "unsigned __int64 result;"
4192$ WS "result = strtoull(""123123"", NULL, 10);"
4193$ WS "exit(0);"
570bb66e
JH
4194$ WS "}"
4195$ CS
4196$ tmp = "strtoull"
4197$ GOSUB inlibc
4198$ d_strtoull = tmp
4199$!
4200$! Check for strtouq
4201$!
4202$ OS
7558ebc2
PP
4203$ WS "#if defined(__DECC) || defined(__DECCXX)"
4204$ WS "#include <stdlib.h>"
4205$ WS "#endif"
4206$ WS "#include <string.h>"
4207$ WS "int main()"
570bb66e 4208$ WS "{"
7558ebc2
PP
4209$ WS "unsigned __int64 result;"
4210$ WS "result = strtouq(""123123"", NULL, 10);"
4211$ WS "exit(0);"
570bb66e
JH
4212$ WS "}"
4213$ CS
4214$ tmp = "strtouq"
4215$ GOSUB inlibc
4216$ d_strtouq = tmp
4217$!
4218$! Check for strtoll
4219$!
4220$ OS
7558ebc2
PP
4221$ WS "#if defined(__DECC) || defined(__DECCXX)"
4222$ WS "#include <stdlib.h>"
4223$ WS "#endif"
4224$ WS "#include <string.h>"
4225$ WS "int main()"
570bb66e 4226$ WS "{"
7558ebc2
PP
4227$ WS "__int64 result;"
4228$ WS "result = strtoll(""123123"", NULL, 10);"
4229$ WS "exit(0);"
570bb66e
JH
4230$ WS "}"
4231$ CS
4232$ tmp = "strtoll"
4233$ GOSUB inlibc
4234$ d_strtoll = tmp
4235$!
d0e6d399
NC
4236$! Check for strtoq
4237$!
4238$ OS
4239$ WS "#if defined(__DECC) || defined(__DECCXX)"
4240$ WS "#include <stdlib.h>"
28e5dec8
JH
4241$ WS "#endif"
4242$ WS "#include <string.h>"
4243$ WS "int main()"
4244$ WS "{"
4245$ WS "__int64 result;"
4246$ WS "result = strtoq(""123123"", NULL, 10);"
4247$ WS "exit(0);"
4248$ WS "}"
4249$ CS
4250$ tmp = "strtoq"
4251$ GOSUB inlibc
4252$ d_strtoq = tmp
4253$!
570bb66e
JH
4254$! Check for strtold
4255$!
4256$ OS
7558ebc2
PP
4257$ WS "#if defined(__DECC) || defined(__DECCXX)"
4258$ WS "#include <stdlib.h>"
4259$ WS "#endif"
4260$ WS "#include <string.h>"
4261$ WS "int main()"
570bb66e 4262$ WS "{"
7558ebc2
PP
4263$ WS "long double result;"
4264$ WS "result = strtold(""123123"", NULL, 10);"
4265$ WS "exit(0);"
570bb66e
JH
4266$ WS "}"
4267$ CS
4268$ tmp = "strtold"
4269$ GOSUB inlibc
4270$ d_strtold = tmp
4271$!
4272$! Check for atoll
4273$!
4274$ OS
7558ebc2
PP
4275$ WS "#if defined(__DECC) || defined(__DECCXX)"
4276$ WS "#include <stdlib.h>"
4277$ WS "#endif"
4278$ WS "#include <string.h>"
4279$ WS "int main()"
570bb66e 4280$ WS "{"
7558ebc2
PP
4281$ WS " __int64 result;"
4282$ WS "result = atoll(""123123"");"
4283$ WS "exit(0);"
570bb66e
JH
4284$ WS "}"
4285$ CS
4286$ tmp = "atoll"
4287$ GOSUB inlibc
4288$ d_atoll = tmp
4289$!
4290$! Check for atolf
4291$!
4292$ OS
7558ebc2
PP
4293$ WS "#if defined(__DECC) || defined(__DECCXX)"
4294$ WS "#include <stdlib.h>"
4295$ WS "#endif"
4296$ WS "#include <string.h>"
4297$ WS "int main()"
570bb66e 4298$ WS "{"
7558ebc2
PP
4299$ WS "long double"
4300$ WS "result = atolf(""123123"");"
4301$ WS "exit(0);"
570bb66e
JH
4302$ WS "}"
4303$ CS
4304$ tmp = "atolf"
4305$ GOSUB inlibc
4306$ d_atolf = tmp
4307$!
4308$! Check for access
4309$!
4310$ OS
7558ebc2
PP
4311$ WS "#if defined(__DECC) || defined(__DECCXX)"
4312$ WS "#include <stdlib.h>"
4313$ WS "#endif"
4314$ WS "#include <stdio.h>"
4315$ WS "int main()"
570bb66e 4316$ WS "{"
7558ebc2
PP
4317$ WS "access(""foo"", F_OK);"
4318$ WS "exit(0);"
570bb66e
JH
4319$ WS "}"
4320$ CS
4321$ tmp = "acess"
4322$ GOSUB inlibc
4323$ d_access = tmp
4324$!
4325$! Check for bzero
4326$!
4327$ OS
7558ebc2
PP
4328$ WS "#if defined(__DECC) || defined(__DECCXX)"
4329$ WS "#include <stdlib.h>"
4330$ WS "#endif"
4331$ WS "#include <stdio.h>"
4332$ WS "#include <strings.h>"
4333$ WS "int main()"
570bb66e 4334$ WS "{"
7558ebc2
PP
4335$ WS "char foo[10];"
4336$ WS "bzero(foo, 10);"
4337$ WS "exit(0);"
570bb66e
JH
4338$ WS "}"
4339$ CS
4340$ tmp = "bzero"
4341$ GOSUB inlibc
4342$ d_bzero = tmp
4343$!
4344$! Check for bcopy
4345$!
4346$ OS
7558ebc2
PP
4347$ WS "#if defined(__DECC) || defined(__DECCXX)"
4348$ WS "#include <stdlib.h>"
4349$ WS "#endif"
4350$ WS "#include <stdio.h>"
4351$ WS "#include <strings.h>"
4352$ WS "int main()"
570bb66e 4353$ WS "{"
7558ebc2
PP
4354$ WS "char foo[10], bar[10];"
4355$ WS "bcopy(""foo"", bar, 3);"
4356$ WS "exit(0);"
570bb66e
JH
4357$ WS "}"
4358$ CS
4359$ tmp = "bcopy"
4360$ GOSUB inlibc
4361$ d_bcopy = tmp
4362$!
4363$! Check for mkstemp
4364$!
4365$ OS
7558ebc2
PP
4366$ WS "#if defined(__DECC) || defined(__DECCXX)"
4367$ WS "#include <stdlib.h>"
4368$ WS "#endif"
4369$ WS "#include <stdio.h>"
4370$ WS "int main()"
570bb66e 4371$ WS "{"
7558ebc2
PP
4372$ WS "mkstemp(""foo"");"
4373$ WS "exit(0);"
570bb66e
JH
4374$ WS "}"
4375$ CS
4376$ tmp = "mkstemp"
4377$ GOSUB inlibc
4378$ d_mkstemp = tmp
4379$!
4380$! Check for mkstemps
4381$!
4382$ OS
7558ebc2
PP
4383$ WS "#if defined(__DECC) || defined(__DECCXX)"
4384$ WS "#include <stdlib.h>"
4385$ WS "#endif"
4386$ WS "#include <stdio.h>"
4387$ WS "int main()"
570bb66e 4388$ WS "{"
7558ebc2
PP
4389$ WS "mkstemps(""foo"", 1);"
4390$ WS "exit(0);"
570bb66e
JH
4391$ WS "}"
4392$ CS
4393$ tmp = "mkstemps"
4394$ GOSUB inlibc
4395$ d_mkstemps = tmp
4396$!
570bb66e
JH
4397$! Check for mkdtemp
4398$!
4399$ OS
7558ebc2
PP
4400$ WS "#if defined(__DECC) || defined(__DECCXX)"
4401$ WS "#include <stdlib.h>"
4402$ WS "#endif"
4403$ WS "#include <stdio.h>"
4404$ WS "int main()"
570bb66e 4405$ WS "{"
7558ebc2
PP
4406$ WS "mkdtemp(""foo"");"
4407$ WS "exit(0);"
570bb66e
JH
4408$ WS "}"
4409$ CS
4410$ tmp = "mkdtemp"
4411$ GOSUB inlibc
4412$ d_mkdtemp = tmp
4413$!
d2d53deb
CB
4414$! Check for poll
4415$!
4416$ if i_poll .eqs. "define"
4417$ then
4418$ OS
4419$ WS "#if defined(__DECC) || defined(__DECCXX)"
4420$ WS "#include <stdlib.h>"
4421$ WS "#endif"
4422$ WS "#include <poll.h>"
4423$ WS "int main()"
4424$ WS "{"
4425$ WS "struct pollfd pfd;"
4426$ WS "int count=poll(&pfd,1,0);"
4427$ WS "exit(0);"
4428$ WS "}"
4429$ CS
4430$ tmp = "poll"
4431$ GOSUB inlibc
4432$ d_poll = tmp
4433$ else
4434$ d_poll = "undef"
4435$ endif
4436$!
570bb66e
JH
4437$! Check for setvbuf
4438$!
4439$ OS
7558ebc2
PP
4440$ WS "#if defined(__DECC) || defined(__DECCXX)"
4441$ WS "#include <stdlib.h>"
4442$ WS "#endif"
4443$ WS "#include <stdio.h>"
4444$ WS "int main()"
570bb66e 4445$ WS "{"
7558ebc2
PP
4446$ WS "FILE *foo;"
4447$ WS "char Buffer[99];"
4448$ WS "foo = fopen(""foo"", ""r"");"
4449$ WS "setvbuf(foo, Buffer, 0, 0);"
4450$ WS "exit(0);"
570bb66e
JH
4451$ WS "}"
4452$ CS
4453$ tmp = "setvbuf"
4454$ GOSUB inlibc
4455$ d_setvbuf = tmp
4456$!
3f88addd
CB
4457$! Check for the shm* routines.
4458$!
4459$ OS
4460$ WS "#if defined(__DECC) || defined(__DECCXX)"
4461$ WS "#include <stdlib.h>"
4462$ WS "#endif"
4463$ WS "#include <stdio.h>"
4464$ WS "#include <sys/shm.h>"
4465$ WS "#include <sys/stat.h>"
4466$ WS "int shmget(key_t key, size_t size, int shmflg);"
4467$ WS "void* shmat(int shmid,const void *shmaddr,int shmflg);"
4468$ WS "int shmctl(int shmid, int cmd, struct shmid_ds *buf);"
4469$ WS "int shmdt(const void *shmaddr);"
4470$ WS "int main() {"
4471$ WS "int shm_id = shmget(IPC_PRIVATE, 8, S_IRWXU);"
4472$ WS "if (shm_id == -1) printf(""0\n""); else printf (""1\n"");"
4473$ WS "}"
4474$ CS
4475$ GOSUB compile
4476$ IF tmp .EQS. "1"
4477$ THEN
4478$ d_shm = "define"
4479$ d_shmat = "define"
4480$ d_shmatprototype = "define"
4481$ d_shmctl = "define"
4482$ d_shmdt = "define"
4483$ d_shmget = "define"
4484$ shmattype = "void *"
4485$ ELSE
4486$ d_shm = "undef"
4487$ d_shmat = "undef"
4488$ d_shmatprototype = "undef"
4489$ d_shmctl = "undef"
4490$ d_shmdt = "undef"
4491$ d_shmget = "undef"
4492$ shmattype = "undef"
4493$ ENDIF
4494$!
570bb66e
JH
4495$! Check for setenv
4496$!
4497$ OS
7558ebc2
PP
4498$ WS "#if defined(__DECC) || defined(__DECCXX)"
4499$ WS "#include <stdlib.h>"
4500$ WS "#endif"
4501$ WS "#include <stdio.h>"
4502$ WS "int main()"
570bb66e 4503$ WS "{"
7558ebc2
PP
4504$ WS "setenv(""FOO"", ""BAR"", 0);"
4505$ WS "exit(0);"
570bb66e
JH
4506$ WS "}"
4507$ CS
4508$ tmp = "setenv"
4509$ GOSUB inlibc
4510$ d_setenv = tmp
4511$!
4512$! Check for setproctitle
4513$!
4514$ OS
7558ebc2
PP
4515$ WS "#if defined(__DECC) || defined(__DECCXX)"
4516$ WS "#include <stdlib.h>"
4517$ WS "#endif"
4518$ WS "#include <stdio.h>"
4519$ WS "int main()"
570bb66e 4520$ WS "{"
7558ebc2
PP
4521$ WS "setproctitle(""%s"", ""FOO"");"
4522$ WS "exit(0);"
570bb66e
JH
4523$ WS "}"
4524$ CS
4525$ tmp = "setproctitle"
4526$ GOSUB inlibc
4527$ d_setproctitle = tmp
4528$!
4529$! Check for <netinet/in.h>
4530$!
046cc26c 4531$ IF Has_Dec_C_Sockets
570bb66e
JH
4532$ THEN
4533$ tmp = "netinet/in.h"
4534$ GOSUB inhdr
4535$ i_niin = tmp
4536$ ELSE
4537$ i_niin="undef"
4538$ ENDIF
4539$!
53eda0bf
CB
4540$! Check for <arpa/inet.h>
4541$!
4542$ IF Has_Dec_C_Sockets
4543$ THEN
4544$ tmp = "arpa/inet.h"
4545$ GOSUB inhdr
4546$ i_arpainet = tmp
4547$ ELSE
4548$ i_arpainet="undef"
4549$ ENDIF
4550$!
4551$! Check for <sys/un.h>
4552$!
4553$ IF Has_Dec_C_Sockets
4554$ THEN
4555$ tmp = "sys/un.h"
4556$ GOSUB inhdr
4557$ i_sysun = tmp
4558$ ELSE
4559$ i_sysun="undef"
4560$ ENDIF
4561$!
4562$!
570bb66e
JH
4563$! Check for <netinet/tcp.h>
4564$!
046cc26c 4565$ IF Has_Dec_C_Sockets
570bb66e
JH
4566$ THEN
4567$ tmp = "netinet/tcp.h"
4568$ GOSUB inhdr
4569$ i_netinettcp = tmp
4570$ ELSE
4571$ i_netinettcp="undef"
4572$ ENDIF
4573$!
4574$! Check for endhostent
4575$!
046cc26c 4576$ IF Has_Dec_C_Sockets
570bb66e
JH
4577$ THEN
4578$ OS
7558ebc2
PP
4579$ WS "#if defined(__DECC) || defined(__DECCXX)"
4580$ WS "#include <stdlib.h>"
4581$ WS "#endif"
4582$ WS "#include <stdio.h>"
046cc26c 4583$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4584$ WS "int main()"
570bb66e 4585$ WS "{"
7558ebc2
PP
4586$ WS "endhostent();"
4587$ WS "exit(0);"
570bb66e
JH
4588$ WS "}"
4589$ CS
4590$ tmp = "endhostent"
4591$ GOSUB inlibc
4592$ d_endhent = tmp
4593$ ELSE
4594$ d_endhent="undef"
4595$ ENDIF
4596$!
4597$! Check for endnetent
4598$!
046cc26c 4599$ IF Has_Dec_C_Sockets
570bb66e
JH
4600$ THEN
4601$ OS
7558ebc2
PP
4602$ WS "#if defined(__DECC) || defined(__DECCXX)"
4603$ WS "#include <stdlib.h>"
4604$ WS "#endif"
4605$ WS "#include <stdio.h>"
046cc26c 4606$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e
JH
4607$ WS "int main()"
4608$ WS "{"
4609$ WS "endnetent();"
4610$ WS "exit(0);"
4611$ WS "}"
4612$ CS
4613$ tmp = "endnetent"
4614$ GOSUB inlibc
4615$ d_endnent = tmp
4616$ ELSE
4617$ d_endnent="undef"
4618$ ENDIF
4619$!
4620$! Check for endprotoent
4621$!
046cc26c 4622$ IF Has_Dec_C_Sockets
570bb66e
JH
4623$ THEN
4624$ OS
7558ebc2
PP
4625$ WS "#if defined(__DECC) || defined(__DECCXX)"
4626$ WS "#include <stdlib.h>"
4627$ WS "#endif"
4628$ WS "#include <stdio.h>"
046cc26c 4629$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4630$ WS "int main()"
570bb66e 4631$ WS "{"
7558ebc2
PP
4632$ WS "endprotoent();"
4633$ WS "exit(0);"
570bb66e
JH
4634$ WS "}"
4635$ CS
4636$ tmp = "endprotoent"
4637$ GOSUB inlibc
4638$ d_endpent = tmp
4639$ ELSE
4640$ d_endpent="undef"
4641$ ENDIF
4642$!
4643$! Check for endservent
4644$!
046cc26c 4645$ IF Has_Dec_C_Sockets
570bb66e
JH
4646$ THEN
4647$ OS
7558ebc2
PP
4648$ WS "#if defined(__DECC) || defined(__DECCXX)"
4649$ WS "#include <stdlib.h>"
4650$ WS "#endif"
4651$ WS "#include <stdio.h>"
046cc26c 4652$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4653$ WS "int main()"
570bb66e 4654$ WS "{"
7558ebc2
PP
4655$ WS "endservent();"
4656$ WS "exit(0);"
570bb66e
JH
4657$ WS "}"
4658$ CS
4659$ tmp = "endservent"
4660$ GOSUB inlibc
4661$ d_endsent = tmp
4662$ ELSE
4663$ d_endsent="undef"
4664$ ENDIF
4665$!
4666$! Check for sethostent
4667$!
046cc26c 4668$ IF Has_Dec_C_Sockets
570bb66e
JH
4669$ THEN
4670$ OS
7558ebc2
PP
4671$ WS "#if defined(__DECC) || defined(__DECCXX)"
4672$ WS "#include <stdlib.h>"
4673$ WS "#endif"
4674$ WS "#include <stdio.h>"
046cc26c 4675$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4676$ WS "int main()"
570bb66e 4677$ WS "{"
7558ebc2
PP
4678$ WS "sethostent(1);"
4679$ WS "exit(0);"
570bb66e
JH
4680$ WS "}"
4681$ CS
4682$ tmp = "sethostent"
4683$ GOSUB inlibc
4684$ d_sethent = tmp
4685$ ELSE
4686$ d_sethent="undef"
4687$ ENDIF
4688$!
4689$! Check for setnetent
4690$!
046cc26c 4691$ IF Has_Dec_C_Sockets
570bb66e
JH
4692$ THEN
4693$ OS
7558ebc2
PP
4694$ WS "#if defined(__DECC) || defined(__DECCXX)"
4695$ WS "#include <stdlib.h>"
4696$ WS "#endif"
4697$ WS "#include <stdio.h>"
046cc26c 4698$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4699$ WS "int main()"
570bb66e 4700$ WS "{"
7558ebc2
PP
4701$ WS "setnetent(1);"
4702$ WS "exit(0);"
570bb66e
JH
4703$ WS "}"
4704$ CS
4705$ tmp = "setnetent"
4706$ GOSUB inlibc
4707$ d_setnent = tmp
4708$ ELSE
4709$ d_setnent="undef"
4710$ ENDIF
4711$!
4712$! Check for setprotoent
4713$!
046cc26c 4714$ IF Has_Dec_C_Sockets
570bb66e
JH
4715$ THEN
4716$ OS
7558ebc2
PP
4717$ WS "#if defined(__DECC) || defined(__DECCXX)"
4718$ WS "#include <stdlib.h>"
4719$ WS "#endif"
4720$ WS "#include <stdio.h>"
046cc26c 4721$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4722$ WS "int main()"
570bb66e 4723$ WS "{"
7558ebc2
PP
4724$ WS "setprotoent(1);"
4725$ WS "exit(0);"
570bb66e
JH
4726$ WS "}"
4727$ CS
4728$ tmp = "setprotoent"
4729$ GOSUB inlibc
4730$ d_setpent = tmp
4731$ ELSE
4732$ d_setpent="undef"
4733$ ENDIF
4734$!
4735$! Check for setservent
4736$!
046cc26c 4737$ IF Has_Dec_C_Sockets
570bb66e
JH
4738$ THEN
4739$ OS
7558ebc2
PP
4740$ WS "#if defined(__DECC) || defined(__DECCXX)"
4741$ WS "#include <stdlib.h>"
4742$ WS "#endif"
4743$ WS "#include <stdio.h>"
046cc26c 4744$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4745$ WS "int main()"
570bb66e 4746$ WS "{"
7558ebc2
PP
4747$ WS "setservent(1);"
4748$ WS "exit(0);"
570bb66e
JH
4749$ WS "}"
4750$ CS
4751$ tmp = "setservent"
4752$ GOSUB inlibc
4753$ d_setsent = tmp
4754$ ELSE
4755$ d_setsent="undef"
4756$ ENDIF
4757$!
4758$! Check for gethostent
4759$!
046cc26c 4760$ IF Has_Dec_C_Sockets
570bb66e
JH
4761$ THEN
4762$ OS
7558ebc2
PP
4763$ WS "#if defined(__DECC) || defined(__DECCXX)"
4764$ WS "#include <stdlib.h>"
4765$ WS "#endif"
4766$ WS "#include <stdio.h>"
046cc26c 4767$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4768$ WS "int main()"
570bb66e 4769$ WS "{"
7558ebc2
PP
4770$ WS "gethostent();"
4771$ WS "exit(0);"
570bb66e
JH
4772$ WS "}"
4773$ CS
4774$ tmp = "gethostent"
4775$ GOSUB inlibc
4776$ d_gethent = tmp
4777$ ELSE
4778$ d_gethent="undef"
4779$ ENDIF
4780$!
4781$! Check for getnetent
4782$!
046cc26c 4783$ IF Has_Dec_C_Sockets
570bb66e
JH
4784$ THEN
4785$ OS
7558ebc2
PP
4786$ WS "#if defined(__DECC) || defined(__DECCXX)"
4787$ WS "#include <stdlib.h>"
4788$ WS "#endif"
4789$ WS "#include <stdio.h>"
046cc26c 4790$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4791$ WS "int main()"
570bb66e 4792$ WS "{"
7558ebc2
PP
4793$ WS "getnetent();"
4794$ WS "exit(0);"
570bb66e
JH
4795$ WS "}"
4796$ CS
4797$ tmp = "getnetent"
4798$ GOSUB inlibc
4799$ d_getnent = tmp
4800$ ELSE
4801$ d_getnent="undef"
4802$ ENDIF
4803$!
4804$! Check for getprotoent
4805$!
046cc26c 4806$ IF Has_Dec_C_Sockets
570bb66e
JH
4807$ THEN
4808$ OS
7558ebc2
PP
4809$ WS "#if defined(__DECC) || defined(__DECCXX)"
4810$ WS "#include <stdlib.h>"
4811$ WS "#endif"
4812$ WS "#include <stdio.h>"
046cc26c 4813$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4814$ WS "int main()"
570bb66e 4815$ WS "{"
7558ebc2
PP
4816$ WS "getprotoent();"
4817$ WS "exit(0);"
570bb66e
JH
4818$ WS "}"
4819$ CS
4820$ tmp = "getprotoent"
4821$ GOSUB inlibc
4822$ d_getpent = tmp
4823$ ELSE
4824$ d_getpent="undef"
4825$ ENDIF
4826$!
4827$! Check for getservent
4828$!
046cc26c 4829$ IF Has_Dec_C_Sockets
570bb66e
JH
4830$ THEN
4831$ OS
7558ebc2
PP
4832$ WS "#if defined(__DECC) || defined(__DECCXX)"
4833$ WS "#include <stdlib.h>"
4834$ WS "#endif"
4835$ WS "#include <stdio.h>"
046cc26c 4836$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4837$ WS "int main()"
570bb66e 4838$ WS "{"
7558ebc2
PP
4839$ WS "getservent();"
4840$ WS "exit(0);"
570bb66e
JH
4841$ WS "}"
4842$ CS
4843$ tmp = "getservent"
4844$ GOSUB inlibc
4845$ d_getsent = tmp
4846$ ELSE
4847$ d_getsent="undef"
4848$ ENDIF
4849$!
234242ca
CB
4850$!
4851$! Check for sa_len
4852$!
4853$ echo4 "Checking the availability of sa_len in the sockaddr struct ..."
046cc26c 4854$ IF Has_Dec_C_Sockets
234242ca
CB
4855$ THEN
4856$ OS
4857$ WS "#if defined(__DECC) || defined(__DECCXX)"
4858$ WS "#include <stdlib.h>"
4859$ WS "#endif"
4860$ WS "#define _SOCKADDR_LEN"
4861$ WS "#include <types.h>"
046cc26c 4862$ WS "#include <socket.h>"
85fac3a9 4863$ WS "#include <string.h>"
234242ca
CB
4864$ WS "int main() {"
4865$ WS "struct sockaddr sa;"
85fac3a9 4866$ WS "memset((char *)&sa, 0, sizeof(sa));"
234242ca
CB
4867$ WS "return (sa.sa_len);"
4868$ WS "}"
4869$ CS
4870$ GOSUB compile_ok
4871$ IF compile_status .EQ. good_compile
4872$ THEN
4873$ d_sockaddr_sa_len="define"
4874$ echo "You have sa_len in the sockaddr struct."
4875$ ELSE
4876$ d_sockaddr_sa_len="undef"
4877$ echo "You do not have sa_len in the sockaddr struct."
4878$ ENDIF
4879$ ELSE
4880$ d_sockaddr_sa_len="undef"
4881$ echo "You do not have sa_len in the sockaddr struct."
4882$ ENDIF
d9484470
CB
4883$!
4884$! Check for sin6_scope_id
4885$!
4886$ echo4 "Checking the availability of sin6_scope_id in the struct sockaddr_in6 ..."
046cc26c 4887$ IF Has_Dec_C_Sockets
d9484470
CB
4888$ THEN
4889$ OS
4890$ WS "#include <types.h>"
046cc26c 4891$ WS "#include <socket.h>"
d9484470 4892$ WS "#include <in.h>"
85fac3a9 4893$ WS "#include <string.h>"
d9484470
CB
4894$ WS "int main() {"
4895$ WS "struct sockaddr_in6 sin6;"
85fac3a9 4896$ WS "memset((char *)&sin6, 0, sizeof(sin6));"
d9484470
CB
4897$ WS "return (sin6.sin6_scope_id);"
4898$ WS "}"
4899$ CS
4900$ GOSUB compile_ok
4901$ IF compile_status .EQ. good_compile
4902$ THEN
4903$ d_sin6_scope_id="define"
4904$ echo "You have sin6_scope_id in the sockaddr_in6 struct."
4905$ ELSE
4906$ d_sin6_scope_id="undef"
4907$ echo "You do not have sin6_scope_id in the sockaddr_in6 struct."
4908$ ENDIF
4909$ ELSE
4910$ d_sin6_scope_id="undef"
4911$ echo "You do not have sin6_scope_id in the sockaddr_in6 struct."
4912$ ENDIF
4913$!
02e1c2f1
CB
4914$! Check for nanosleep
4915$!
4916$ OS
4917$ WS "#if defined(__DECC) || defined(__DECCXX)"
4918$ WS "#include <stdlib.h>"
4919$ WS "#endif"
4920$ WS "#include <time.h>"
4921$ WS "int main()"
4922$ WS "{"
4923$ WS "int asleep = nanosleep(NULL,NULL);"
4924$ WS "exit(0);"
4925$ WS "}"
4926$ CS
4927$ tmp = "nanosleep"
4928$ GOSUB inlibc
4929$ d_nanosleep = tmp
4930$!
570bb66e
JH
4931$! Check for socklen_t
4932$!
046cc26c 4933$ IF Has_Dec_C_Sockets
570bb66e
JH
4934$ THEN
4935$ echo4 "Checking to see if you have socklen_t..."
4936$ OS
7558ebc2
PP
4937$ WS "#if defined(__DECC) || defined(__DECCXX)"
4938$ WS "#include <stdlib.h>"
4939$ WS "#endif"
4940$ WS "#include <stdio.h>"
046cc26c 4941$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
7558ebc2 4942$ WS "int main()"
570bb66e 4943$ WS "{"
7558ebc2
PP
4944$ WS "socklen_t x = 16;"
4945$ WS "exit(0);"
570bb66e
JH
4946$ WS "}"
4947$ CS
4948$ GOSUB link_ok
4949$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4950$ THEN
4951$ d_socklen_t="define"
4952$ echo "You have socklen_t."
4953$ ELSE
4954$ d_socklen_t="undef"
4955$ echo "You do not have socklen_t."
4956$ ENDIF
4957$ ELSE
4958$ d_socklen_t="undef"
4959$ ENDIF
4960$!
4961$! Check for pthread_yield
4962$!
4963$ IF use_threads
4964$ THEN
4965$ OS
7558ebc2
PP
4966$ WS "#if defined(__DECC) || defined(__DECCXX)"
4967$ WS "#include <stdlib.h>"
4968$ WS "#endif"
4969$ WS "#include <pthread.h>"
4970$ WS "#include <stdio.h>"
4971$ WS "int main()"
570bb66e 4972$ WS "{"
7558ebc2
PP
4973$ WS "pthread_yield();"
4974$ WS "exit(0);"
570bb66e
JH
4975$ WS "}"
4976$ CS
4977$ tmp = "pthread_yield"
4978$ GOSUB inlibc
4979$ d_pthread_yield = tmp
4980$ ELSE
4981$ d_pthread_yield="undef"
4982$ ENDIF
4983$!
4984$! Check for sched_yield
4985$!
4986$ IF use_threads
4987$ THEN
4988$ OS
7558ebc2
PP
4989$ WS "#if defined(__DECC) || defined(__DECCXX)"
4990$ WS "#include <stdlib.h>"
4991$ WS "#endif"
4992$ WS "#include <pthread.h>"
4993$ WS "#include <stdio.h>"
4994$ WS "int main()"
570bb66e 4995$ WS "{"
7558ebc2
PP
4996$ WS "sched_yield();"
4997$ WS "exit(0);"
570bb66e
JH
4998$ WS "}"
4999$ CS
5000$ tmp = "sched_yield"
5001$ GOSUB inlibc
5002$ d_sched_yield = tmp
5003$ IF d_sched_yield .EQS. "define"
5004$ THEN sched_yield = "sched_yield"
5005$ ELSE sched_yield = " "
5006$ ENDIF
5007$ ELSE
5008$ d_sched_yield="undef"
5009$ sched_yield = " "
5010$ ENDIF
5011$!
e0e3c57a
JH
5012$! Check for pthread_attr_setscope and PTHREAD_SCOPE_SYSTEM.
5013$! (The actual test is to be written.)
5014$!
5015$ d_pthread_attr_setscope="undef"
5016$!
570bb66e
JH
5017$! Check for generic pointer size
5018$!
5019$ echo4 "Checking to see how big your pointers are..."
5020$ OS
7558ebc2
PP
5021$ WS "#if defined(__DECC) || defined(__DECCXX)"
5022$ WS "#include <stdlib.h>"
5023$ WS "#endif"
5024$ WS "#include <stdio.h>"
5025$ WS "int main()"
570bb66e 5026$ WS "{"
7558ebc2
PP
5027$ WS "int foo;"
5028$ WS "foo = sizeof(char *);"
5029$ WS "printf(""%d\n"", foo);"
5030$ WS "exit(0);"
570bb66e
JH
5031$ WS "}"
5032$ CS
5033$ tmp = "char *"
5034$ GOSUB type_size_check
5035$ ptrsize = tmp
5036$ echo "Your pointers are ''ptrsize' bytes long."
5037$!
5038$! Check for size_t size
5039$!
5040$ tmp = "size_t"
5041$ zzz = tmp
5042$ echo4 "Checking the size of ''zzz'..."
5043$ GOSUB type_size_check
5044$ sizesize = tmp
5045$ echo "Your ''zzz' size is ''sizesize' bytes."
5046$!
e0261ef8
CB
5047$! Check for _LARGEFILE capability.
5048$!
5049$ off_t_size = 4
5050$ OS
5051$ WS "#define _LARGEFILE"
5052$ WS "#include <stdio.h>"
5053$ WS "int main()"
5054$ WS "{"
5055$ WS "printf(""%d\n"", sizeof(off_t));"
5056$ WS "return(0);"
5057$ WS "}"
5058$ CS
5059$ GOSUB link_ok
5060$ IF link_status .EQ. good_link
5061$ THEN
5062$ GOSUB just_mcr_it
5063$ off_t_size = tmp
5064$ ENDIF
5065$ echo "Your off_t size is ''off_t_size' bytes when _LARGEFILE is defined."
5066$ IF off_t_size .ne. 8 .AND. (uselargefiles .OR. uselargefiles .eqs. "define")
5067$ THEN
5068$ echo4 "You configured with -Duselargefiles but your CRTL does not support _LARGEFILE."
5069$ echo4 "I'm disabling large file support."
5070$ uselargefiles = "undef"
5071$ ENDIF
5072$!
17660758
CB
5073$! Check for st_ino size.
5074$!
5075$ st_ino_size = 4
5076$ OS
5077$ WS "#include <sys/stat.h>"
5078$ WS "#include <stdio.h>"
5079$ WS "#if defined(__DECC) || defined(__DECCXX)"
5080$ WS "#include <stdlib.h>
5081$ WS "#endif"
5082$ WS "int main() {
5083$ WS "#''uselargefiles' _LARGEFILE"
5084$ WS "#ifdef _LARGEFILE"
5085$ WS " printf(""%d\n"", sizeof(__ino64_t));"
5086$ WS "#else"
5087$ WS " printf(""%d\n"", sizeof(unsigned short)*3);"
5088$ WS "#endif"
5089$ WS " exit(0);"
5090$ WS "}"
5091$ CS
5092$ GOSUB link_ok
5093$ IF link_status .EQ. good_link
5094$ THEN
5095$ GOSUB just_mcr_it
5096$ st_ino_size = tmp
5097$ ENDIF
5098$ echo "Your st_ino size is ''st_ino_size' bytes."
5099$!
96021e87
JM
5100$! Tests for hard link, symbolic links, and 7.3 + CRTL features
5101$!
5102$ d_lchown = "undef"
5103$ d_link = "undef"
5104$ d_lstat = "undef"
5105$ d_readlink = "undef"
5106$ d_symlink = "undef"
5107$ d_realpath = "undef"
96021e87
JM
5108$!
5109$! Hard link support has been present since 7.3-1 except for the
5110$! easy to use DCL test to see if hardlinks are enabled on the build
5111$! disk. That would require more work to test, and I am only testing
5112$! this on 8.2, so that is why the 8.2 test.
5113$!
2b4b3ebb 5114$ IF (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
96021e87
JM
5115$ THEN
5116$ IF f$getdvi("SYS$DISK","HARDLINKS_SUPPORTED")
5117$ THEN
5118$ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links enabled on build disk."
5119$ echo "I will build with hard link support"
5120$ d_link = "define"
5121$ ELSE
5122$ echo "I Found 64 bit OpenVMS 8.2 or later, and hard links disabled on build disk."
5123$ echo "I will not build with hard link support."
5124$ ENDIF
5125$ ELSE
d00eb249 5126$ echo4 "I can not detect if your CRTL and build disk support hard links."
96021e87
JM
5127$ echo4 "I am disabling hard link support."
5128$ ENDIF
5129$!
5130$ IF uselargefiles .OR. uselargefiles .eqs. "define"
5131$ THEN
2b4b3ebb 5132$ IF (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
96021e87 5133$ THEN
fe6e2aaa
CB
5134$ echo4 "Largefile support enabled, so enabling standard stat support too."
5135$ usestdstat = "y"
96021e87
JM
5136$ echo4 -
5137 "Looking for the realpath() function to indicate symbolic link support..."
5138$ OS
85fac3a9 5139$ WS "#include <stdlib.h>"
96021e87
JM
5140$ WS "char *realpath(const char *file_name, char * resolved_name, ...);"
5141$ WS "int main()"
5142$ WS "{"
5143$ WS "char result[255];"
5144$ WS "realpath(""foo"",result);"
5145$ WS "exit(0);"
5146$ WS "}"
5147$ CS
5148$ GOSUB link_ok
5149$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
5150$ THEN
5151$ echo -
5152 "Found realpath() which indicates symbolic link support is present."
5153$ d_lchown = "define"
5154$ d_lstat = "define"
5155$ d_readlink = "define"
5156$ d_symlink = "define"
5157$! d_realpath = "define" ! Perl will not put it in the config.h file?
5158$! Perl apparently does not use a built in realpath() on other platforms,
5159$! but there is a severe performance penatly on OpenVMS to use the Perl
5160$! script that implements a realpath(). The d_symlink symbol is used
5161$! as a replacement for the d_realpath since they are related and both
5162$! were activated by the CRTL at the same time.
5163$!
5164$ ELSE
5165$ echo4 "Your system does not support symbolic links."
5166$ echo4 "I am disabling symbolic link support."
5167$ ENDIF
5168$ ELSE
5169$ echo4 "Your system does not support symbolic links."
5170$ echo4 "I am disabling symbolic link support."
5171$ ENDIF
5172$ ELSE
2b4b3ebb 5173$ IF (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
96021e87 5174$ THEN
d00eb249 5175$ echo4 "-Duselargefiles is required for symbolic link support."
96021e87
JM
5176$ echo4 "You did not specify that, so I am disabling symbolic link support."
5177$ ENDIF
5178$ ENDIF
5179$!
9fa802f3
CB
5180$!
5181$! Check for grp.h -- should be 7.3 and later, but test to be sure
5182$!
5183$ tmp = "grp.h"
5184$ GOSUB inhdr
5185$ i_grp = tmp
5186$!
96021e87
JM
5187$! VMS V7.3-2 powered options
5188$! We know that it is only available for V7.3-2 and later on 64 bit platforms.
96021e87
JM
5189$!
5190$ d_getgrgid_r = "undef"
5191$ getgrgid_r_proto = "0"
5192$ d_getgrnam_r = "undef"
5193$ getgrnam_r_proto = "0"
5194$ d_getpgid = "undef"
5195$ d_getpgrp = "undef"
9fa802f3
CB
5196$! N.B. We already have home-grown thread-safe versions of
5197$! getpwnam and getpwuid -- no need to use CRTL versions
96021e87
JM
5198$ d_getpwnam_r = "undef"
5199$ getpwnam_r_proto = "0"
5200$ d_getpwuid_r = "undef"
5201$ getpwuid_r_proto = "0"
5202$ d_setgrent = "undef"
5203$ d_ttyname_r = "undef"
5204$ ttyname_r_proto = "0"
d00eb249
CB
5205$ d_snprintf = "undef"
5206$ d_vsnprintf = "undef"
2b4b3ebb 5207$ if (vms_ver .GES. "7.3-2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
96021e87 5208$ then
d00eb249 5209$ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 routines"
96021e87
JM
5210$ d_getgrgid_r = "define"
5211$ getgrgid_r_proto = "1"
5212$ d_getgrnam_r = "define"
5213$ getgrnam_r_proto = "1"
5214$ if d_symlink .or. d_symlink .EQS. "define"
5215$ then
5216$! FIXME: Need to find how to activate this.
5217$! d_getpgid = "define"
5218$! d_getpgrp = "define"
5219$ endif
96021e87
JM
5220$ d_setgrent = "define"
5221$ d_ttyname_r = "define"
5222$ ttyname_r_proto = "1"
d00eb249
CB
5223$ d_snprintf = "define"
5224$ d_vsnprintf = "define"
96021e87
JM
5225$ endif
5226$!
5227$! VMS V7.3-2 powered options
5228$! We know that it is only available for V7.3-2 and later on 64 bit platforms.
5229$! Only implementing right now on 8.2 because that is what I am testing
5230$! These functions may require POSIX UIDs/GIDs to be active, so I am
5231$! not activating the features at this time, just preparing this file
5232$! to easily use them in the future.
5233$!
5234$ d_seteuid = "undef"
5235$ d_setpgid = "undef"
5236$ d_setpgrp = "undef"
5237$ d_setregid = "undef"
5238$ d_setreuid = "undef"
5239$ d_setsid = "undef"
d00eb249 5240$ ! Disable this section for now.
2b4b3ebb 5241$!$ if (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
d00eb249 5242$ if .NOT. 1
96021e87 5243$ then
d00eb249 5244$ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 UID setting routines"
96021e87
JM
5245$ d_seteuid = "define"
5246$ d_setpgid = "define"
5247$ d_setpgrp = "define"
5248$ d_setregid = "define"
5249$ d_setreuid = "define"
5250$ d_setsid = "define"
5251$ endif
5252$!
5253$! VMS V8 powered options
5254$! We know that it is only available for 8.2 and later on 64 bit platforms.
5255$!
5256$ d_fstatvfs = "undef"
c487cd5b 5257$ d_statvfs = "undef"
96021e87 5258$ i_sysstatvfs = "undef"
2b4b3ebb 5259$ if (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
96021e87 5260$ then
d00eb249 5261$ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with 8.2 routines"
96021e87 5262$ d_fstatvfs = "define"
c487cd5b 5263$ d_statvfs = "define"
96021e87
JM
5264$ i_sysstatvfs = "define"
5265$ endif
5266$!
570bb66e
JH
5267$! Check rand48 and its ilk
5268$!
7e0a9dba
CB
5269$ echo4 "Using our internal random number implementation..."
5270$!
5271$ randfunc = "Perl_drand48"
5272$ drand01 = "Perl_drand48()"
5273$ seedfunc = "Perl_drand48_init"
5274$ randbits = "48"
5275$ randseedtype = "U32"
5276$ d_drand48proto = "define"
5277$!
570bb66e
JH
5278$! Done with compiler checks. Clean up.
5279$ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
5280$ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
5281$ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
5282$ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
5283$ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
414b89cc 5284$ IF ccname .EQS. "CXX"
570bb66e
JH
5285$ THEN
5286$ CALL Cxx_demangler_cleanup
5287$ ENDIF
5288$!
5289$! Some that are compiler or VMS version sensitive
5290$!
5291$! Gnu C stuff
414b89cc 5292$ IF ccname .EQS. "GCC"
570bb66e
JH
5293$ THEN
5294$ d_attribut="define"
5295$ vms_cc_type="gcc"
5296$ ELSE
85fac3a9
CB
5297$ IF ccname .EQS. "CXX"
5298$ THEN
5299$ vms_cc_type="cxx"
5300$ ELSE
5301$ vms_cc_type="cc"
5302$ ENDIF
570bb66e
JH
5303$ d_attribut="undef"
5304$ ENDIF
5305$!
85fac3a9
CB
5306$ d_bcmp="define"
5307$ d_getitimer="define"
5308$ d_gettimeod="define"
5309$ d_mmap="define"
5310$ d_mprotect="define"
5311$ d_munmap="define"
5312$ d_msync="define"
5313$ d_ualarm="define"
5314$ d_uname="define"
5315$! d_unsetenv="define" ! Fix me - Activating requires changing VMS code
5316$ d_unsetenv="undef" ! Change will be needed to allow GNV integration
5317$ d_clearenv="undef"
5318$ d_usleep="define"
5319$ d_setitimer="define"
5320$ d_sigaction="define"
5321$ d_sigprocmask="define"
5322$ d_truncate="define"
5323$ d_wait4="define"
5324$ d_index="define"
5325$ pidtype="pid_t"
5326$ sig_name1="ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE"
5327$ sig_name2=" ALRM TERM USR1 USR2 NUM18 NUM19 CHLD CONT STOP TSTP TTIN TTOU DEBUG"
5328$ IF (vms_ver .GES. "7.3")
5329$ THEN
fe1de8ce 5330$ sig_name2 = sig_name2 + " NUM27 WINCH"
85fac3a9 5331$ ENDIF
fe1de8ce
CB
5332$!* signal.h defines SIGRTMIN as 33 and SIGRTMAX as 64, but there is no
5333$!* sigqueue function or other apparent means to do realtime signalling,
5334$!* so let's not try to include the realtime range for now.
5335$!* sig_name3=" NUM29 NUM30 NUM31 NUM32 RTMIN NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43"
5336$!* sig_name4=" NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58"
5337$!* sig_name5=" NUM59 NUM60 NUM61 NUMT62 NUM63 RTMAX"
85fac3a9
CB
5338$ sig_name = sig_name1 + sig_name2
5339$ sig_num = ""
5340$ sig_num_init = ""
5341$ sig_name_init = ""
5342$ sig_index = 0
fe1de8ce
CB
5343$!
5344$ PARSE_SIG_NAME_LOOP:
5345$!
5346$ tmp = F$ELEMENT(sig_index, " ", sig_name)
5347$ IF F$LENGTH(F$EDIT(tmp,"TRIM")) .eq. 0 THEN GOTO END_SIG_NAME_LOOP
5348$ sig_name_init = sig_name_init + """''tmp'"","
5349$ sig_num = sig_num + "''sig_index' "
5350$ sig_num_init = sig_num_init + "''sig_index',"
5351$ sig_index = sig_index + 1
5352$ GOTO PARSE_SIG_NAME_LOOP
5353$!
5354$ END_SIG_NAME_LOOP:
5355$!
5356$ sig_name_init = sig_name_init + "0"
5357$ sig_num_init = sig_num_init + "0"
5358$ sig_size = "''sig_index'"
5359$ sig_index = sig_index - 1
5360$ sig_count = "''sig_index'"
570bb66e
JH
5361$ uidtype="uid_t"
5362$ d_pathconf="define"
5363$ d_fpathconf="define"
5364$ d_sysconf="define"
5365$ d_sigsetjmp="define"
85fac3a9 5366$!
a3bd614a
PP
5367$!: see if tzname[] exists
5368$ OS
5369$ WS "#include <stdio.h>"
5370$ WS "#include <time.h>"
5371$ WS "int main() { extern short tzname[]; printf(""%hd"", tzname[0]); }"
5372$ CS
5373$ GOSUB compile_ok
5374$ IF compile_status .EQ. good_compile
5375$ THEN
5376$ d_tzname = "undef"
5377$ echo4 "tzname[] NOT found."
5378$ ELSE
5379$ d_tzname = "define"
5380$ echo4 "tzname[] found."
5381$ ENDIF
5382$ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
570bb66e 5383$!
414b89cc
CB
5384$ IF d_gethname .EQS. "undef" .AND. d_uname .EQS. "undef"
5385$ THEN
5386$ d_phostname="define"
5387$ ELSE
5388$ d_phostname="undef"
5389$ ENDIF
5390$!
570bb66e 5391$! Dec C alone
85fac3a9 5392$ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
570bb66e
JH
5393$ THEN
5394$ d_mbstowcs="define"
5395$ d_mbtowc="define"
5396$ d_stdiobase="define"
5397$ d_stdio_cnt_lval="define"
dedcc4d4 5398$ d_stdio_ptr_lval="define"
570bb66e 5399$ d_stdstdio="define"
1de32f2a 5400$ d_faststdio="define"
570bb66e
JH
5401$ d_wcstombs="define"
5402$ d_mblen="define"
5403$ d_mktime="define"
5404$ d_strcoll="define"
5405$ d_strxfrm="define"
5406$ d_wctomb="define"
5407$ i_locale="define"
2765b840 5408$ i_langinfo="define"
570bb66e 5409$ d_locconv="define"
32995a38 5410$ d_nl_langinfo="define"
570bb66e
JH
5411$ d_setlocale="define"
5412$ vms_cc_type="decc"
5413$ ELSE
5414$ d_mbstowcs="undef"
5415$ d_mbtowc="undef"
5416$ d_stdiobase="undef"
5417$ d_stdio_cnt_lval="undef"
5418$ d_stdio_ptr_lval="undef"
5419$ d_stdstdio="undef"
1de32f2a 5420$ d_faststdio="undef"
570bb66e
JH
5421$ d_wcstombs="undef"
5422$ d_mblen="undef"
5423$ d_mktime="undef"
5424$ d_strcoll="undef"
5425$ d_strxfrm="undef"
5426$ d_wctomb="undef"
5427$ i_locale="undef"
2765b840 5428$ i_langinfo="undef"
570bb66e 5429$ d_locconv="undef"
2765b840 5430$ d_nl_langinfo="undef"
570bb66e
JH
5431$ d_setlocale="undef"
5432$ ENDIF
a7ffa9b9 5433$ d_stdio_ptr_lval_sets_cnt="undef"
a15cef0c 5434$ d_stdio_ptr_lval_nochange_cnt="define"
1de32f2a 5435$ usefaststdio="undef"
570bb66e
JH
5436$!
5437$! Sockets?
046cc26c 5438$ if Has_Dec_C_Sockets
570bb66e
JH
5439$ THEN
5440$ d_vms_do_sockets="define"
5441$ d_htonl="define"
5442$ d_socket="define"
96021e87 5443$ d_sockpair = "undef"
2b4b3ebb 5444$ if (vms_ver .GES. "8.2") .AND. (F$ELEMENT(0, "-", archname) .NES. "VMS_VAX")
96021e87
JM
5445$ then
5446$ echo "Found 64 bit OpenVMS 8.2, will build with socketpair support"
5447$ d_sockpair = "define"
5448$ endif
570bb66e
JH
5449$ d_select="define"
5450$ netdb_hlen_type="int"
5451$ netdb_host_type="char *"
5452$ netdb_name_type="char *"
5453$ netdb_net_type="long"
5454$ d_gethbyaddr="define"
5455$ d_gethbyname="define"
5456$ d_getnbyaddr="define"
5457$ d_getnbyname="define"
5458$ d_getpbynumber="define"
5459$ d_getpbyname="define"
5460$ d_getsbyport="define"
5461$ d_getsbyname="define"
5462$ d_gethostprotos="define"
5463$ d_getnetprotos="define"
5464$ d_getprotoprotos="define"
5465$ d_getservprotos="define"
414b89cc 5466$ IF ccname .EQS. "DEC" .OR. ccname .EQS. "CXX"
570bb66e
JH
5467$ THEN
5468$ socksizetype="unsigned int"
5469$ ELSE
5470$ socksizetype="int *"
5471$ ENDIF
5472$ ELSE
5473$ d_vms_do_sockets="undef"
5474$ d_htonl="undef"
5475$ d_socket="undef"
96021e87 5476$ d_socketpair = "undef"
570bb66e
JH
5477$ d_select="undef"
5478$ netdb_hlen_type="int"
5479$ netdb_host_type="char *"
5480$ netdb_name_type="char *"
5481$ netdb_net_type="long"
5482$ d_gethbyaddr="undef"
5483$ d_gethbyname="undef"
5484$ d_getnbyaddr="undef"
5485$ d_getnbyname="undef"
5486$ d_getpbynumber="undef"
5487$ d_getpbyname="undef"
5488$ d_getsbyport="undef"
5489$ d_getsbyname="undef"
5490$ d_gethostprotos="undef"
5491$ d_getnetprotos="undef"
5492$ d_getprotoprotos="undef"
5493$ d_getservprotos="undef"
5494$ socksizetype="undef"
5495$ ENDIF
5496$! Threads
32995a38 5497$ d_oldpthreads="undef"
570bb66e
JH
5498$ IF use_threads
5499$ THEN
5500$ usethreads="define"
5501$ d_pthreads_created_joinable="define"
570bb66e 5502$ ELSE
570bb66e
JH
5503$ usethreads="undef"
5504$ d_pthreads_created_joinable="undef"
5505$ ENDIF
5506$!
5507$! new (5.005_62++) typedefs for primitives
5508$!
5509$ echo "Choosing the C types to be used for Perl's internal types..."
5510$ ivtype="long"
5511$ uvtype="unsigned long"
5512$ i8type="char"
5513$ u8type="unsigned char"
5514$ i16type="short"
5515$ u16type="unsigned short"
5516$ i32type="int"
5517$ u32type="unsigned int"
5518$ i64type="long long"
5519$ u64type="unsigned long long"
5520$ nvtype="double"
5521$!
5522$ IF use64bitint .OR. use64bitint .EQS. "define"
5523$ THEN
5524$ ivtype = "''i64type'"
5525$ uvtype = "''u64type'"
570bb66e
JH
5526$ ELSE
5527$ i64size="undef"
5528$ u64size="undef"
5529$ ENDIF
5530$!
50ddda1d
CB
5531$ IF uselongdouble .OR. uselongdouble .EQS. "define"
5532$ THEN
5533$ nvtype="long double"
5534$ ENDIF
5535$!
570bb66e
JH
5536$ tmp = "''ivtype'"
5537$ GOSUB type_size_check
5538$ ivsize = tmp
5539$ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp
5540$ IF ivtype .eqs. "long"
5541$ THEN longsize = tmp
5542$ ELSE
5543$ tmp = "long"
5544$ GOSUB type_size_check
5545$ longsize = tmp
5546$ ENDIF
7558ebc2 5547$!
570bb66e
JH
5548$ tmp = "''uvtype'"
5549$ GOSUB type_size_check
5550$ uvsize = tmp
5551$ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp
7558ebc2 5552$!
570bb66e
JH
5553$ tmp = "''i8type'"
5554$ GOSUB type_size_check
5555$ i8size = tmp
7558ebc2 5556$!
570bb66e
JH
5557$ tmp = "''u8type'"
5558$ GOSUB type_size_check
5559$ u8size = tmp
7558ebc2 5560$!
570bb66e
JH
5561$ tmp = "''i16type'"
5562$ GOSUB type_size_check
5563$ i16size = tmp
5564$ IF i16type .eqs. "short"
5565$ THEN shortsize = tmp
5566$ ELSE
5567$ tmp = "short"
5568$ gosub type_size_check
5569$ shortsize = tmp
5570$ ENDIF
7558ebc2 5571$!
570bb66e
JH
5572$ tmp = "''u16type'"
5573$ GOSUB type_size_check
5574$ u16size = tmp
7558ebc2 5575$!
570bb66e
JH
5576$ tmp = "''i32type'"
5577$ GOSUB type_size_check
5578$ i32size = tmp
5579$ IF i32type .eqs. "int"
5580$ THEN intsize = tmp
5581$ ELSE
5582$ tmp = "int"
5583$ gosub type_size_check
5584$ intsize = tmp
5585$ ENDIF
7558ebc2 5586$!
570bb66e
JH
5587$ tmp = "''u32type'"
5588$ gosub type_size_check
5589$ u32size = tmp
7558ebc2 5590$!
570bb66e
JH
5591$ tmp = "''nvtype'"
5592$ GOSUB type_size_check
5593$ nvsize = tmp
5594$!
5595$ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
5596$ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
5597$ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
5598$!
a5bd55ee
CB
5599$ d_nv_preserves_uv = "undef"
5600$ echo4 "Checking how many bits of your UVs your NVs can preserve..."
570bb66e 5601$ OS
7558ebc2
PP
5602$ WS "#if defined(__DECC) || defined(__DECCXX)"
5603$ WS "#include <stdlib.h>"
5604$ WS "#endif"
5605$ WS "#include <stdio.h>"
5606$ WS "int main() {"
a5bd55ee
CB
5607$ WS " ''uvtype' u = 0;"
5608$ WS " int n = 8 * ''uvsize';"
5609$ WS " int i;"
5610$ WS " for (i = 0; i < n; i++) {"
5611$ WS " u = u << 1 | (''uvtype')1;"
5612$ WS " if ((''uvtype')(''nvtype')u != u)"
5613$ WS " break;"
5614$ WS " }"
5615$ WS " printf(""%d\n"", i);"
7558ebc2
PP
5616$ WS " exit(0);"
5617$ WS "}"
570bb66e
JH
5618$ CS
5619$ GOSUB compile
a5bd55ee
CB
5620$ nv_preserves_uv_bits = tmp
5621$ IF F$INTEGER(nv_preserves_uv_bits) .GE. (F$INTEGER(uvsize) * 8)
5622$ THEN
570bb66e 5623$ d_nv_preserves_uv = "define"
a5bd55ee 5624$ echo "Your NVs can preserve all ''nv_preserves_uv_bits' bits of your UVs."
570bb66e 5625$ ELSE
a2ea9adf 5626$ d_nv_preserves_uv = "undef"
a5bd55ee 5627$ echo "Your NVs can preserve only ''nv_preserves_uv_bits' bits of your UVs."
570bb66e 5628$ ENDIF
f2610a60 5629$!
1e74786a
CB
5630$ nv_overflows_integers_at = "0"
5631$ echo4 "Checking to find the largest integer value your NVs can hold..."
5632$ OS
5633$ WS "#include <stdio.h>"
5634$ WS ""
5635$ WS "typedef ''nvtype' NV;"
5636$ WS ""
5637$ WS "int"
5638$ WS "main() {"
5639$ WS " NV value = 2;"
5640$ WS " int count = 1;"
5641$ WS ""
5642$ WS " while(count < 256) {"
5643$ WS " volatile NV up = value + 1.0;"
5644$ WS " volatile NV negated = -value;"
5645$ WS " volatile NV down = negated - 1.0;"
5646$ WS " volatile NV got_up = up - value;"
5647$ WS " int up_good = got_up == 1.0;"
5648$ WS " int got_down = down - negated;"
5649$ WS " int down_good = got_down == -1.0;"
5650$ WS ""
5651$ WS " if (down_good != up_good) {"
5652$ WS " fprintf(stderr,"
5653$ WS " ""Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n"","
5654$ WS " up_good, (double) got_up, down_good, (double) got_down,"
5655$ WS " count, (double) value);"
5656$ WS " return 1;"
5657$ WS " }"
5658$ WS " if (!up_good) {"
5659$ WS " while (1) {"
5660$ WS " if (count > 8) {"
5661$ WS " count -= 8;"
5662$ WS " fputs(""256.0"", stdout);"
5663$ WS " } else {"
5664$ WS " count--;"
5665$ WS " fputs(""2.0"", stdout);"
5666$ WS " }"
5667$ WS " if (!count) {"
5668$ WS " puts("""");"
5669$ WS " return 0;"
5670$ WS " }"
5671$ WS " fputs(""*"", stdout);"
5672$ WS " }"
5673$ WS " }"
5674$ WS " value *= 2;"
5675$ WS " ++count;"
5676$ WS " }"
5677$ WS " fprintf(stderr, ""Cannot overflow integer range, even at 2**%d (%.20f)\n"","
5678$ WS " count, (double) value);"
5679$ WS " return 1;"
5680$ WS "}"
5681$ CS
5682$ GOSUB compile
5683$ IF F$LENGTH(tmp) .GT. 0
5684$ THEN
5685$ IF F$EXTRACT(0,1,tmp) .EQS. "2"
5686$ THEN
5687$ echo "The largest integer your NVs can preserve is equal to ''tmp'"
5688$ nv_overflows_integers_at = tmp
5689$ ELSE
5690$ echo "Cannot determine the largest integer value your NVs can hold, unexpected output"
5691$ echo "''tmp'"
5692$ ENDIF
5693$ ELSE
5694$ echo "Cannot determine the largest integer value your NVs can hold"
5695$ ENDIF
5696$!
50ddda1d
CB
5697$! Check for signbit (must already know nvtype)
5698$!
5699$ echo4 "Checking to see if you have signbit() available to work on ''nvtype'..."
5700$ OS
5701$ WS "#if defined(__DECC) || defined(__DECCXX)"
5702$ WS "#include <stdlib.h>"
5703$ WS "#endif"
5704$ WS "#include <fp.h>"
5705$ WS "#include <stdio.h>"
5706$ WS "int main()"
5707$ WS "{"
5708$ WS " ''nvtype' x = 0.0;"
5709$ WS " ''nvtype' y = -0.0;"
5710$ WS " if ((signbit(x) == 0) && (signbit(y) != 0))"
5711$ WS " printf(""1\n"");"
5712$ WS " else"
5713$ WS " printf(""0\n"");"
5714$ WS "}"
5715$ CS
5716$ GOSUB compile
5717$ IF tmp .EQS. "1"
5718$ THEN
5719$ d_signbit = "define"
5720$ echo4 "Yes."
5721$ ELSE
5722$ d_signbit = "undef"
5723$ echo4 "Nope."
5724$ ENDIF
5725$!
db76cb3c
CB
5726$ echo4 "Checking if kill() uses SYS$FORCEX, can't be called from a signal handler,"
5727$ echo4 "or fails to handle a signal value of zero..."
f2610a60
CL
5728$ kill_by_sigprc = "undef"
5729$ OS
5730$ WS "#include <stdio.h>"
5731$ WS "#include <signal.h>"
37a3cbe4 5732$ WS "#include <unistd.h>"
05c058bc
CB
5733$ WS "void handler1(int s) { printf(""%d"",s); kill(getpid(),2); }"
5734$ WS "void handler2(int s) { printf(""%d"",s); }"
f2610a60
CL
5735$ WS "main(){"
5736$ WS " printf(""0"");"
05c058bc
CB
5737$ WS " signal(1,handler1);"
5738$ WS " signal(2,handler2);"
5739$ WS " kill(getpid(),1);"
5740$ WS " sleep(1);"
db76cb3c
CB
5741$ WS " kill(getpid(),0);"
5742$ WS " printf(""3\n"");"
f2610a60
CL
5743$ WS "}"
5744$ CS
5745$ ON ERROR THEN CONTINUE
5746$ GOSUB compile
db76cb3c 5747$ IF tmp .NES. "0123"
f2610a60 5748$ THEN
05c058bc
CB
5749$ echo4 "Yes, it has at least one of those limitations."
5750$ echo4 "Checking whether we can use SYS$SIGPRC instead..."
f2610a60
CL
5751$ OS
5752$ WS "#include <stdio.h>"
5753$ WS "#include <lib$routines.h>"
5754$ WS "unsigned long code = 0;"
85fac3a9
CB
5755$ WS "#define sys$sigprc SYS$SIGPRC"
5756$ WS "#ifdef __cplusplus"
5757$ WS "extern ""C"" {"
5758$ WS "#endif"
5759$ WS " int sys$sigprc(unsigned int *,void *,unsigned int);"
5760$ WS "#ifdef __cplusplus"
5761$ WS "}"
5762$ WS "#endif"
f2610a60
CL
5763$ WS "int handler(unsigned long *args) {"
5764$ WS " code = args[1];"
5765$ WS " return 1;"
5766$ WS "}"
5767$ WS "main() { "
85fac3a9 5768$ WS " int iss;"
f2610a60
CL
5769$ WS " lib$establish(handler);"
5770$ WS " iss = sys$sigprc(0,0,0x1234);"
5771$ WS " iss = ((iss&1)==1 && code == 0x1234);"
5772$ WS " printf(""%d\n"",iss);"
5773$ WS "}"
5774$ CS
dfc1d888
CB
5775$ ON ERROR THEN CONTINUE
5776$ GOSUB compile
f2610a60
CL
5777$ IF tmp .EQS. "1"
5778$ THEN
5cda9808 5779$ echo4 "Yep, we can."
f2610a60
CL
5780$ kill_by_sigprc = "define"
5781$!
5cda9808
CB
5782$ ELSE
5783$ echo4 "Nope, we can't."
f2610a60 5784$ ENDIF
5cda9808
CB
5785$ ELSE
5786$ echo4 "Nope, it doesn't."
f2610a60 5787$ ENDIF
570bb66e
JH
5788$ DELETE/SYMBOL tmp
5789$!
570bb66e
JH
5790$! Finally the composite ones. All config
5791$!
5792$ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
5793$!
414b89cc 5794$ IF ccname .EQS. "DEC"
570bb66e 5795$ THEN
a71134cc 5796$ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
570bb66e 5797$ ENDIF
414b89cc 5798$ IF ccname .EQS. "CXX"
7558ebc2 5799$ THEN
a71134cc 5800$ ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext' ''ccflags'"
7558ebc2 5801$ ENDIF
570bb66e
JH
5802$ IF use_vmsdebug_perl
5803$ THEN
a71134cc 5804$ optimize="/List/Debug/NoOpt"
31963e90 5805$ ldflags="/Debug/Trace/Map"
570bb66e
JH
5806$ dbgprefix = "DBG"
5807$ ELSE
a71134cc 5808$ optimize= "/NoList"
31963e90 5809$ ldflags="/NoTrace/NoMap"
570bb66e
JH
5810$ dbgprefix = ""
5811$ ENDIF
5812$!
5813$! Okay, we've got everything configured. Now go write out a config.sh.
5814$ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
5815$ echo4 "Creating ''basename_config_sh'..."
7558ebc2 5816$ open/write CONFIG 'config_sh'
570bb66e
JH
5817$ WC := write CONFIG
5818$!
5819$! ##BEGIN WRITE NEW CONSTANTS HERE##
5820$!
5821$ WC "#!/bin/sh"
5822$ WC "#"
5823$ WC "# This file was produced by Configure.COM on a ''osname' system."
5824$ WC "#"
5825$ WC "# Package name : ''package'"
5826$ WC "# Source directory : ''src'"
5827$ WC "# Configuration time: " + cf_time
5828$ WC "# Configuration by : " + cf_by
5829$ WC "# Target system : " + myuname
5830$ WC ""
570bb66e
JH
5831$ WC "Makefile_SH='" + Makefile_SH + "'"
5832$ WC "Mcc='" + Mcc + "'"
414b89cc
CB
5833$ WC "PERL_REVISION='" + revision + "'"
5834$ WC "PERL_VERSION='" + patchlevel + "'"
5835$ WC "PERL_SUBVERSION='" + subversion + "'"
30629e9c 5836$ WC "PERL_API_REVISION='" + api_revision + "'"
414b89cc
CB
5837$ WC "PERL_API_VERSION='" + api_version + "'"
5838$ WC "PERL_API_SUBVERSION='" + api_subversion + "'"
c4ac6101 5839$ WC "PERL_PATCHLEVEL='" + perl_patchlevel + "'"
14c175ff 5840$ WC "perl_patchlevel='" + perl_patchlevel + "'"
8c541774 5841$ WC "PERL_CONFIG_SH='true'"
002721d5 5842$ WC "_a='" + lib_ext + "'"
45e8d1dd 5843$ WC "_exe='" + exe_ext + "'"
002721d5 5844$ WC "_o='" + obj_ext + "'"
570bb66e 5845$ WC "alignbytes='" + alignbytes + "'"
414b89cc 5846$ WC "aphostname='write sys$output f$edit(f$getsyi(\""SCSNODE\""),\""TRIM,LOWERCASE\"")'"
614391c8
CB
5847$ WC "api_revision='" + api_revision + "'"
5848$ WC "api_subversion='" + api_subversion + "'"
5849$ WC "api_version='" + api_version + "'"
5850$ WC "api_versionstring='" + version + "'"
570bb66e
JH
5851$ WC "ar='" + "'"
5852$ WC "archlib='" + archlib + "'"
5853$ WC "archlibexp='" + archlibexp + "'"
5854$ WC "archname='" + archname + "'"
5855$ WC "baserev='" + baserev + "'"
5856$ WC "bin='" + bin + "'"
5857$ WC "binexp='" + binexp + "'"
9d1a8da0 5858$ WC "bootstrap_charset='undef'"
570bb66e
JH
5859$ WC "builddir='" + builddir + "'"
5860$ WC "byteorder='1234'"
5861$ WC "castflags='0'"
5862$ WC "cc='" + perl_cc + "'"
5863$ WC "cccdlflags='" + cccdlflags + "'"
5864$ WC "ccdlflags='" + ccdlflags + "'"
e0261ef8
CB
5865$ IF uselargefiles .OR. uselargefiles .EQS. "define"
5866$ THEN
cfcfe586
JM
5867$ IF usestdstat .OR. usestdstat .EQS. "define"
5868$ THEN
5869$ ccdefines = "_USE_STD_STAT=1"
5870$ ELSE
96021e87 5871$ ccdefines = "_LARGEFILE=1"
cfcfe586 5872$ ENDIF
cc57629d
CB
5873$ ELSE
5874$ ccdefines = ""
96021e87
JM
5875$ ENDIF
5876$ IF ccdefines .NES. ""
5877$ THEN
5878$ WC "ccflags='" + ccflags + "/Define=" + ccdefines + "'"
e0261ef8
CB
5879$ ELSE
5880$ WC "ccflags='" + ccflags + "'"
5881$ ENDIF
5882$ WC "ccflags_uselargefiles='" + "'"
414b89cc 5883$ WC "ccname='" + ccname + "'"
7558ebc2 5884$ WC "ccversion='" + ccversion + "'"
570bb66e
JH
5885$ WC "cf_by='" + cf_by + "'"
5886$ WC "cf_email='" + cf_email + "'"
5887$ WC "cf_time='" + cf_time + "'"
c193ef60 5888$ WC "charbits='8'"
570bb66e
JH
5889$ WC "config_args='" + config_args + "'"
5890$ WC "config_sh='" + config_sh + "'"
5891$ WC "cpp_stuff='" + cpp_stuff + "'"
5892$ WC "cpplast='" + cpplast + "'"
5893$ WC "cppminus='" + cppminus + "'"
5894$ WC "cpprun='" + cpprun + "'"
5895$ WC "cppstdin='" + cppstdin + "'"
79f41ce5
CB
5896$ IF use64bitint .OR. use64bitint .EQS. "define"
5897$ THEN
5898$! gcvt() does not work for > 16 decimal places; fallback to sprintf
5899$ WC "d_Gconvert='sprintf((b),""%.*" + (nvgformat-"""") + ",(n),(x))'"
5900$ ELSE
9fd42072 5901$ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
79f41ce5 5902$ ENDIF
d677d0fc
CB
5903$ WC "d_PRIEUldbl='" + d_PRIEUldbl + "'"
5904$ WC "d_PRIFUldbl='" + d_PRIFUldbl + "'"
5905$ WC "d_PRIGUldbl='" + d_PRIGUldbl + "'"
842bcadf 5906$ WC "d_PRIXU64='" + d_PRIXU64 + "'"
2ef53570 5907$ WC "d_PRId64='" + d_PRId64 + "'"
59a27e12 5908$ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
570bb66e
JH
5909$ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
5910$ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
186abd56 5911$ WC "d_PRIi64='" + d_PRIi64 + "'"
570bb66e
JH
5912$ WC "d_PRIo64='" + d_PRIo64 + "'"
5913$ WC "d_PRIu64='" + d_PRIu64 + "'"
5914$ WC "d_PRIx64='" + d_PRIx64 + "'"
b5ddfb46 5915$ WC "d_SCNfldbl='" + d_SCNfldbl + "'"
2ef53570 5916$ WC "d__fwalk='undef'"
570bb66e
JH
5917$ WC "d_access='" + d_access + "'"
5918$ WC "d_accessx='undef'"
e10940c3 5919$ WC "d_aintl='undef'"
570bb66e
JH
5920$ WC "d_alarm='define'"
5921$ WC "d_archlib='define'"
96938616 5922$ WC "d_asctime64='undef'"
570bb66e
JH
5923$ WC "d_atolf='" + d_atolf + "'"
5924$ WC "d_atoll='" + d_atoll + "'"
0dbb1585 5925$ WC "d_attribute_format='" + d_attribut + "'"
fcdf39cf 5926$ WC "d_attribute_deprecated='undef'"
0dbb1585
AL
5927$ WC "d_attribute_malloc='undef'"
5928$ WC "d_attribute_nonnull='undef'"
5929$ WC "d_attribute_noreturn='undef'"
5930$ WC "d_attribute_pure='undef'"
5931$ WC "d_attribute_unused='undef'"
5932$ WC "d_attribute_warn_unused_result='undef'"
8f13cdc7
MB
5933$ WC "d_prctl='undef'"
5934$ WC "d_prctl_set_name='undef'"
36f1aec4 5935$ WC "d_printf_format_null='undef'"
570bb66e
JH
5936$ WC "d_bcmp='" + d_bcmp + "'"
5937$ WC "d_bcopy='" + d_bcopy + "'"
5938$ WC "d_bincompat3='undef'"
c487cd5b 5939$ WC "d_bsd='undef'"
2ef53570 5940$ WC "d_bsdgetpgrp='undef'"
570bb66e 5941$ WC "d_bsdsetpgrp='undef'"
e8e09534
PP
5942$ WC "d_builtin_choose_expr='undef'" ! GCC only
5943$ WC "d_builtin_expect='undef'" ! GCC only
570bb66e
JH
5944$ WC "d_bzero='" + d_bzero + "'"
5945$ WC "d_casti32='define'"
5946$ WC "d_castneg='define'"
5947$ WC "d_charvspr='undef'"
5948$ WC "d_chown='define'"
5949$ WC "d_chroot='undef'"
5950$ WC "d_chsize='undef'"
758a5d79 5951$ WC "d_class='undef'"
c487cd5b 5952$ WC "d_closedir='define'"
570bb66e
JH
5953$ WC "d_cmsghdr_s='undef'"
5954$ WC "d_const='define'"
e10940c3 5955$ WC "d_copysignl='define'"
60f153db 5956$ WC "d_cplusplus='" + d_cplusplus + "'"
570bb66e
JH
5957$ WC "d_crypt='define'"
5958$ WC "d_csh='undef'"
0b57cc8d 5959$ WC "d_ctermid='define'"
96938616 5960$ WC "d_ctime64='undef'"
570bb66e 5961$ WC "d_cuserid='define'"
9802685f 5962$ WC "d_c99_variadic_macros='undef'"
570bb66e 5963$ WC "d_dbl_dig='define'"
2ef53570 5964$ WC "d_dbminitproto='undef'"
570bb66e 5965$ WC "d_difftime='define'"
96938616 5966$ WC "d_difftime64='undef'"
de52168c 5967$ WC "d_dir_dd_fd='undef'"
a838cfe5 5968$ WC "d_dirfd='undef'"
ddcbaa1c 5969$ WC "d_dirnamlen='define'"
c487cd5b
CB
5970$ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.2")
5971$ THEN
5972$ WC "d_dlerror='define'"
5973$ WC "d_dlopen='define'"
5974$ ELSE
5975$ WC "d_dlerror='undef'"
5976$ WC "d_dlopen='undef'"
5977$ ENDIF
570bb66e
JH
5978$ WC "d_dlsymun='undef'"
5979$ WC "d_dosuid='undef'"
5980$ WC "d_drand48proto='" + d_drand48proto + "'"
5981$ WC "d_dup2='define'"
5982$ WC "d_eaccess='undef'"
5983$ WC "d_endgrent='define'"
5984$ WC "d_endhent='" + d_endhent + "'"
5985$ WC "d_endnent='" + d_endnent + "'"
5986$ WC "d_endpent='" + d_endpent + "'"
5987$ WC "d_endpwent='define'"
5988$ WC "d_endsent='" + d_endsent + "'"
5989$ WC "d_eofnblk='undef'"
5990$ WC "d_eunice='undef'"
5991$ WC "d_fchmod='undef'"
b363b713 5992$ WC "d_fchdir='undef'"
570bb66e
JH
5993$ WC "d_fchown='undef'"
5994$ WC "d_fcntl='" + d_fcntl + "'"
1c21a19a 5995$ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
570bb66e 5996$ WC "d_fd_set='" + d_fd_set + "'"
06fb617f
CB
5997$ WC "d_fd_macros='define'"
5998$ WC "d_fds_bits='define'"
570bb66e 5999$ WC "d_fgetpos='define'"
758a5d79
JH
6000$ WC "d_finite='undef'"
6001$ WC "d_finitel='undef'"
570bb66e
JH
6002$ WC "d_flexfnam='define'"
6003$ WC "d_flock='undef'"
2ef53570 6004$ WC "d_flockproto='undef'"
570bb66e 6005$ WC "d_fork='undef'"
758a5d79 6006$ WC "d_fp_class='undef'"
570bb66e 6007$ WC "d_fpathconf='" + d_fpathconf + "'"
758a5d79
JH
6008$ WC "d_fpclass='undef'"
6009$ WC "d_fpclassify='undef'"
6010$ WC "d_fpclassl='undef'"
570bb66e
JH
6011$ WC "d_fpos64_t='" + d_fpos64_t + "'"
6012$ WC "d_frexpl='" + d_frexpl + "'"
6013$ WC "d_fs_data_s='undef'"
e0261ef8 6014$ WC "d_fseeko='" + d_fseeko + "'"
570bb66e
JH
6015$ WC "d_fsetpos='define'"
6016$ WC "d_fstatfs='undef'"
96021e87 6017$ WC "d_fstatvfs='" + d_fstatvfs + "'"
411ab01c 6018$ WC "d_fsync='undef'"
e0261ef8 6019$ WC "d_ftello='" + d_ftello + "'"
06fb617f 6020$ WC "d_ftime='define'"
eca5cfc5 6021$ WC "d_futimes='undef'"
36ba69be
CB
6022$ WC "d_gdbmndbm_h_uses_prototypes='undef'"
6023$ WC "d_gdbm_ndbm_h_uses_prototypes='undef'"
744841cb
CB
6024$ IF vms_ver .GES. "7.3"
6025$ THEN
6026$ WC "d_getaddrinfo='define'"
6027$ ELSE
6028$ WC "d_getaddrinfo='undef'"
6029$ ENDIF
fea629d8 6030$ WC "d_getcwd='define'"
570bb66e
JH
6031$ WC "d_getespwnam='undef'"
6032$ WC "d_getfsstat='undef'"
6033$ WC "d_getgrent='define'"
6034$ WC "d_getgrps='undef'"
6035$ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
6036$ WC "d_gethbyname='" + d_gethbyname + "'"
6037$ WC "d_gethent='" + d_gethent + "'"
6038$ WC "d_gethname='" + d_gethname + "'"
6039$ WC "d_gethostprotos='" + d_gethostprotos + "'"
10eefe7f 6040$ WC "d_getitimer='" + d_getitimer + "'"
570bb66e
JH
6041$ WC "d_getlogin='define'"
6042$ WC "d_getmnt='undef'"
6043$ WC "d_getmntent='undef'"
744841cb
CB
6044$ IF vms_ver .GES. "7.3"
6045$ THEN
6046$ WC "d_getnameinfo='define'"
6047$ ELSE
6048$ WC "d_getnameinfo='undef'"
6049$ ENDIF
570bb66e
JH
6050$ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
6051$ WC "d_getnbyname='" + d_getnbyname + "'"
6052$ WC "d_getnent='" + d_getnent + "'"
6053$ WC "d_getnetprotos='" + d_getnetprotos + "'"
0c0643d0 6054$ WC "d_getpagsz='undef'"
570bb66e
JH
6055$ WC "d_getpbyname='" + d_getpbyname + "'"
6056$ WC "d_getpbynumber='" + d_getpbynumber + "'"
6057$ WC "d_getpent='" + d_getpent + "'"
96021e87 6058$ WC "d_getpgid='" + d_getpgid + "'"
570bb66e 6059$ WC "d_getpgrp2='undef'"
96021e87 6060$ WC "d_getpgrp='" + d_getpgrp + "'"
41cbbefa 6061$ WC "d_getppid='" + d_getppid + "'"
570bb66e
JH
6062$ WC "d_getprior='undef'"
6063$ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
6064$ WC "d_getprpwnam='undef'"
6065$ WC "d_getpwent='define'"
6066$ WC "d_getsbyname='" + d_getsbyname + "'"
6067$ WC "d_getsbyport='" + d_getsbyport + "'"
6068$ WC "d_getsent='" + d_getsent + "'"
6069$ WC "d_getservprotos='" + d_getservprotos + "'"
6070$ WC "d_getspnam='undef'"
6071$ WC "d_gettimeod='" + d_gettimeod + "'"
96938616 6072$ WC "d_gmtime64='undef'"
570bb66e
JH
6073$ WC "d_gnulibc='undef'"
6074$ WC "d_grpasswd='undef'"
6075$ WC "d_hasmntopt='undef'"
6076$ WC "d_htonl='" + d_htonl + "'"
e10940c3 6077$ WC "d_ilogbl='undef'"
a04d9d89 6078$ WC "d_inc_version_list='undef'"
570bb66e 6079$ WC "d_index='" + d_index + "'"
744841cb
CB
6080$ WC "d_inetaton='define'"
6081$ WC "d_inetntop='define'"
6082$ WC "d_inetpton='define'"
570bb66e 6083$ WC "d_int64_t='" + d_int64_t + "'"
122b9bf4 6084$ WC "d_ip_mreq='define'"
3e06601f 6085$ WC "d_ip_mreq_source='undef'"
fd3bef80 6086$ WC "d_ipv6_mreq='define'"
3e06601f 6087$ WC "d_ipv6_mreq_source='undef'"
570bb66e 6088$ WC "d_isascii='define'"
269a7913 6089$ WC "d_isblank='undef'"
758a5d79
JH
6090$ WC "d_isfinite='undef'"
6091$ WC "d_isinf='undef'"
3a491987 6092$ WC "d_isnan='" + d_isnan + "'"
570bb66e
JH
6093$ WC "d_isnanl='" + d_isnanl + "'"
6094$ WC "d_killpg='undef'"
96021e87 6095$ WC "d_lchown='" + d_lchown + "'"
570bb66e 6096$ WC "d_ldbl_dig='define'"
5b55c156 6097$ WC "d_libm_lib_version='undef'"
96021e87 6098$ WC "d_link='" + d_link + "'"
570bb66e 6099$ WC "d_llseek='undef'"
96938616 6100$ WC "d_localtime64='undef'"
570bb66e
JH
6101$ WC "d_locconv='" + d_locconv + "'"
6102$ WC "d_lockf='undef'"
6103$ WC "d_longdbl='" + d_longdbl + "'"
6104$ WC "d_longlong='" + d_longlong + "'"
6105$ WC "d_lseekproto='define'"
96021e87 6106$ WC "d_lstat='" + d_lstat + "'"
570bb66e 6107$ WC "d_madvise='undef'"
2b339242
JM
6108$ WC "d_malloc_size='undef'"
6109$ WC "d_malloc_good_size='undef'"
570bb66e
JH
6110$ WC "d_mblen='" + d_mblen + "'"
6111$ WC "d_mbstowcs='" + d_mbstowcs + "'"
6112$ WC "d_mbtowc='" + d_mbtowc + "'"
6113$ WC "d_memchr='" + d_memchr + "'"
6114$ WC "d_memcmp='define'"
6115$ WC "d_memcpy='define'"
6116$ WC "d_memmove='define'"
6117$ WC "d_memset='define'"
6118$ WC "d_mkdir='define'"
6119$ WC "d_mkdtemp='" + d_mkdtemp + "'"
6120$ WC "d_mkfifo='undef'"
6121$ WC "d_mknod='undef'"
6122$ WC "d_mkstemp='" + d_mkstemp + "'"
6123$ WC "d_mkstemps='" + d_mkstemps + "'"
6124$ WC "d_mktime='" + d_mktime + "'"
96938616 6125$ WC "d_mktime64='undef'"
10eefe7f 6126$ WC "d_mmap='" + d_mmap + "'"
570bb66e 6127$ WC "d_modfl='" + d_modfl + "'"
8725ccc4 6128$ WC "d_modflproto='" + d_modflproto + "'"
7b826da8 6129$ WC "d_modfl_pow32_bug='undef'"
10eefe7f 6130$ WC "d_mprotect='" + d_mprotect + "'"
570bb66e 6131$ WC "d_msg='undef'"
c487cd5b
CB
6132$ WC "d_msgctl='undef'"
6133$ WC "d_msgget='undef'"
6134$ WC "d_msgrcv='undef'"
6135$ WC "d_msgsnd='undef'"
570bb66e
JH
6136$ WC "d_msg_ctrunc='undef'"
6137$ WC "d_msg_dontroute='undef'"
6138$ WC "d_msg_oob='undef'"
6139$ WC "d_msg_peek='undef'"
6140$ WC "d_msg_proxy='undef'"
6141$ WC "d_msghdr_s='undef'"
10eefe7f
CB
6142$ WC "d_msync='" + d_msync + "'"
6143$ WC "d_munmap='" + d_munmap + "'"
570bb66e 6144$ WC "d_mymalloc='" + d_mymalloc + "'"
02e1c2f1 6145$ WC "d_nanosleep='" + d_nanosleep + "'"
06fb617f 6146$ WC "d_ndbm='undef'"
36ba69be 6147$ WC "d_ndbm_h_uses_prototypes='undef'"
570bb66e 6148$ WC "d_nice='define'"
2765b840 6149$ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
570bb66e 6150$ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
1e74786a 6151$ WC "nv_overflows_integers_at='" + nv_overflows_integers_at + "'"
53133ed1 6152$ WC "nv_preserves_uv_bits='" + nv_preserves_uv_bits + "'"
f607920a 6153$ WC "d_nv_zero_is_allbits_zero='define'"
570bb66e
JH
6154$ WC "d_off64_t='" + d_off64_t + "'"
6155$ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
6156$ WC "d_oldarchlib='define'"
6157$ WC "d_oldpthreads='" + d_oldpthreads + "'"
06fb617f 6158$ WC "d_oldsock='undef'"
570bb66e
JH
6159$ WC "d_open3='define'"
6160$ WC "d_pathconf='" + d_pathconf + "'"
6161$ WC "d_pause='define'"
6162$ WC "d_perl_otherlibdirs='undef'"
414b89cc 6163$ WC "d_phostname='" + d_phostname + "'"
570bb66e 6164$ WC "d_pipe='define'"
d2d53deb 6165$ WC "d_poll='" + d_poll + "'"
06fb617f 6166$ WC "d_portable='define'"
e9a8643a 6167$ WC "d_procselfexe='undef'"
734e0e83 6168$ WC "d_pseudofork='undef'"
d6483fcc 6169$ WC "d_pthread_atfork='undef'"
e0e3c57a 6170$ WC "d_pthread_attr_setscope='" + d_pthread_attr_setscope + "'"
570bb66e
JH
6171$ WC "d_pthread_yield='" + d_pthread_yield + "'"
6172$ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
6173$ WC "d_pwage='undef'"
6174$ WC "d_pwchange='undef'"
6175$ WC "d_pwclass='undef'"
6176$ WC "d_pwcomment='define'"
6177$ WC "d_pwexpire='undef'"
6178$ WC "d_pwgecos='define'"
6179$ WC "d_pwpasswd='define'"
6180$ WC "d_pwquota='undef'"
6181$ WC "d_qgcvt='undef'"
6182$ WC "d_quad='" + d_quad + "'"
6183$ WC "d_readdir='define'"
96021e87 6184$ WC "d_readlink='" + d_readlink + "'"
570bb66e 6185$ WC "d_readv='undef'"
96021e87 6186$ WC "d_realpath='" + d_realpath + "'"
570bb66e
JH
6187$ WC "d_recvmsg='undef'"
6188$ WC "d_rename='define'"
6189$ WC "d_rewinddir='define'"
6190$ WC "d_rmdir='define'"
6191$ WC "d_safebcpy='undef'"
6192$ WC "d_safemcpy='define'"
6193$ WC "d_sanemcmp='define'"
414b89cc 6194$ WC "d_sbrkproto='define'"
e10940c3 6195$ WC "d_scalbnl='undef'"
570bb66e
JH
6196$ WC "d_sched_yield='" + d_sched_yield + "'"
6197$ WC "d_scm_rights='undef'"
6198$ WC "d_seekdir='define'"
6199$ WC "d_select='" + d_select + "'"
a429ddf7
CB
6200$ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."8.4")
6201$ THEN
6202$ WC "d_sem='define'"
14fb7316 6203$ WC "d_semctl='define'"
a429ddf7
CB
6204$ WC "d_semctl_semid_ds='define'"
6205$ WC "d_semctl_semun='define'"
6206$ WC "d_semget='define'"
6207$ WC "d_semop='define'"
6208$ ELSE
6209$ WC "d_sem='undef'"
14fb7316 6210$ WC "d_semctl='undef'"
a429ddf7
CB
6211$ WC "d_semctl_semid_ds='undef'"
6212$ WC "d_semctl_semun='undef'"
6213$ WC "d_semget='undef'"
6214$ WC "d_semop='undef'"
6215$ ENDIF
570bb66e
JH
6216$ WC "d_sendmsg='undef'"
6217$ WC "d_setegid='undef'"
6218$ WC "d_setenv='" + d_setenv + "'"
96021e87
JM
6219$ WC "d_seteuid='" + d_seteuid + "'"
6220$ WC "d_setgrent='" + d_setgrent + "'"
570bb66e
JH
6221$ WC "d_setgrps='undef'"
6222$ WC "d_sethent='" + d_sethent + "'"
10eefe7f 6223$ WC "d_setitimer='" + d_setitimer + "'"
570bb66e
JH
6224$ WC "d_setlinebuf='undef'"
6225$ WC "d_setlocale='" + d_setlocale + "'"
6226$ WC "d_setnent='" + d_setnent + "'"
6227$ WC "d_setpent='" + d_setpent + "'"
96021e87 6228$ WC "d_setpgid='" + d_setpgid + "'"
570bb66e 6229$ WC "d_setpgrp2='undef'"
96021e87 6230$ WC "d_setpgrp='" + d_setpgrp + "'"
570bb66e
JH
6231$ WC "d_setprior='undef'"
6232$ WC "d_setproctitle='" + d_setproctitle + "'"
6233$ WC "d_setpwent='define'"
96021e87 6234$ WC "d_setregid='" + d_setregid + "'"
570bb66e
JH
6235$ WC "d_setresgid='undef'"
6236$ WC "d_setresuid='undef'"
96021e87 6237$ WC "d_setreuid='" + d_setreuid + "'"
570bb66e
JH
6238$ WC "d_setrgid='undef'"
6239$ WC "d_setruid='undef'"
6240$ WC "d_setsent='" + d_setsent + "'"
96021e87 6241$ WC "d_setsid='" + d_setsid + "'"
570bb66e 6242$ WC "d_setvbuf='" + d_setvbuf + "'"
3f88addd
CB
6243$ WC "d_shm='" + d_shm + "'"
6244$ WC "d_shmat='" + d_shmat + "'"
6245$ WC "d_shmatprototype='" + d_shmatprototype + "'"
6246$ WC "d_shmctl='" + d_shmctl + "'"
6247$ WC "d_shmdt='" + d_shmdt + "'"
6248$ WC "d_shmget='" + d_shmget + "'"
570bb66e 6249$ WC "d_sigaction='" + d_sigaction + "'"
50ddda1d 6250$ WC "d_signbit='" + d_signbit + "'"
983dbef6 6251$ WC "d_sigprocmask='" + d_sigprocmask + "'"
570bb66e 6252$ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
d9484470 6253$ WC "d_sin6_scope_id='" + d_sin6_scope_id + "'"
a04d9d89 6254$ WC "d_sitearch='define'"
fd3bef80 6255$ WC "d_sockaddr_in6='define'"
234242ca 6256$ WC "d_sockaddr_sa_len='" + d_sockaddr_sa_len + "'"
49a78c82 6257$ WC "d_sockatmark='undef'"
2ef53570 6258$ WC "d_sockatmarkproto='undef'"
570bb66e
JH
6259$ WC "d_socket='" + d_socket + "'"
6260$ WC "d_socklen_t='" + d_socklen_t + "'"
96021e87 6261$ WC "d_sockpair='" + d_sockpair + "'"
1b9c9cf5 6262$ WC "d_socks5_init='undef'"
a1f21542 6263$ WC "d_sprintf_returns_strlen='define'"
570bb66e 6264$ WC "d_sqrtl='define'"
eef837ea 6265$ WC "d_sresgproto='undef'"
2ef53570
JH
6266$ WC "d_sresgproto='undef'"
6267$ WC "d_sresproto='undef'"
f42f5b4c 6268$ WC "d_sresuproto='undef'"
570bb66e
JH
6269$ WC "d_statblks='undef'"
6270$ WC "d_statfs_f_flags='undef'"
6271$ WC "d_statfs_s='undef'"
6272$ WC "d_statfsflags='undef'"
b0e839b3 6273$ WC "d_static_inline='define'"
570bb66e
JH
6274$ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
6275$ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
a7ffa9b9 6276$ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'"
2ef53570 6277$ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'"
570bb66e
JH
6278$ WC "d_stdio_stream_array='undef'"
6279$ WC "d_stdiobase='" + d_stdiobase + "'"
6280$ WC "d_stdstdio='" + d_stdstdio + "'"
ea77424f 6281$ WC "d_faststdio='" + d_faststdio + "'"
c487cd5b 6282$ WC "d_statvfs='" + d_statvfs + "'"
570bb66e
JH
6283$ WC "d_strchr='define'"
6284$ WC "d_strcoll='" + d_strcoll + "'"
6285$ WC "d_strctcpy='define'"
6286$ WC "d_strerrm='strerror((e),vaxc$errno)'"
6287$ WC "d_strerror='define'"
b3c85772 6288$ WC "d_strftime='define'"
81aa54e6
CB
6289$ WC "d_strlcat='undef'"
6290$ WC "d_strlcpy='undef'"
570bb66e
JH
6291$ WC "d_strtod='define'"
6292$ WC "d_strtol='define'"
6293$ WC "d_strtold='" + d_strtold + "'"
6294$ WC "d_strtoll='" + d_strtoll + "'"
b8c0d87f 6295$ WC "d_strtoq='" + d_strtoq + "'"
570bb66e
JH
6296$ WC "d_strtoul='define'"
6297$ WC "d_strtoull='" + d_strtoull + "'"
6298$ WC "d_strtouq='" + d_strtouq + "'"
6299$ WC "d_strxfrm='" + d_strxfrm + "'"
6300$ WC "d_suidsafe='undef'"
96021e87 6301$ WC "d_symlink='" + d_symlink + "'"
570bb66e 6302$ WC "d_syscall='undef'"
2ef53570 6303$ WC "d_syscallproto='undef'"
570bb66e 6304$ WC "d_sysconf='" + d_sysconf + "'"
06fb617f 6305$ WC "d_sysernlst='undef'"
570bb66e
JH
6306$ WC "d_syserrlst='undef'"
6307$ WC "d_system='define'"
6308$ WC "d_tcgetpgrp='undef'"
6309$ WC "d_tcsetpgrp='undef'"
6310$ WC "d_telldir='define'"
6311$ WC "d_telldirproto='define'"
8f44d1a8 6312$ WC "d_time='define'"
597140e2 6313$ WC "d_timegm='undef'"
570bb66e 6314$ WC "d_times='define'"
7bb28473
CB
6315$ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.0")
6316$ THEN
6317$ WC "d_tm_tm_gmtoff='define'"
6318$ WC "d_tm_tm_zone='define'"
6319$ ELSE
6320$ WC "d_tm_tm_gmtoff='undef'"
6321$ WC "d_tm_tm_zone='undef'"
6322$ ENDIF
570bb66e 6323$ WC "d_truncate='" + d_truncate + "'"
a3bd614a 6324$ WC "d_tzname='" + d_tzname + "'"
4e0554ec 6325$ WC "d_u32align='define'"
10eefe7f 6326$ WC "d_ualarm='" + d_ualarm + "'"
570bb66e
JH
6327$ WC "d_umask='define'"
6328$ WC "d_uname='" + d_uname + "'"
6329$ WC "d_union_semun='undef'"
4adb8845 6330$ WC "d_unlink_all_versions='" + d_unlink_all_versions + "'" ! VMS-specific
758a5d79 6331$ WC "d_unordered='undef'"
0ee1060b 6332$ WC "d_unsetenv='" + d_unsetenv + "'"
5ff34fde 6333$ WC "d_clearenv='" + d_clearenv + "'"
10eefe7f
CB
6334$ WC "d_usleep='" + d_usleep + "'"
6335$ WC "d_usleepproto='" + d_usleep + "'"
570bb66e
JH
6336$ WC "d_ustat='undef'"
6337$ WC "d_vendorarch='undef'"
06fb617f 6338$ WC "d_vendorbin='undef'"
570bb66e 6339$ WC "d_vendorlib='undef'"
06fb617f 6340$ WC "d_vendorscript='undef'"
570bb66e
JH
6341$ WC "d_vfork='define'"
6342$ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
6343$ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
1171624b 6344$ WC "d_vms_shorten_long_symbols='" + d_vms_shorten_long_symbols + "'" ! VMS
570bb66e 6345$ WC "d_void_closedir='define'"
06fb617f
CB
6346$ WC "d_voidsig='undef'"
6347$ WC "d_voidtty='" + "'"
570bb66e
JH
6348$ WC "d_volatile='define'"
6349$ WC "d_vprintf='define'"
d00eb249 6350$ WC "d_vsnprintf='" + d_vsnprintf + "'"
570bb66e
JH
6351$ WC "d_wait4='" + d_wait4 + "'"
6352$ WC "d_waitpid='define'"
6353$ WC "d_wcstombs='" + d_wcstombs + "'"
6354$ WC "d_wctomb='" + d_wctomb + "'"
6355$ WC "d_writev='undef'"
06fb617f 6356$ WC "d_xenix='undef'"
570bb66e
JH
6357$ WC "db_hashtype=' '"
6358$ WC "db_prefixtype=' '"
fcc434ad
PP
6359$ WC "db_version_major='" + "'"
6360$ WC "db_version_minor='" + "'"
6361$ WC "db_version_patch='" + "'"
570bb66e 6362$ WC "dbgprefix='" + dbgprefix + "'"
570bb66e
JH
6363$ WC "devtype='" + devtype + "'"
6364$ WC "direntrytype='struct dirent'"
6365$ WC "dlext='" + dlext + "'"
6366$ WC "dlobj='" + dlobj + "'"
ae0a0fb2 6367$ WC "dlsrc='dl_vms.xs'"
570bb66e
JH
6368$ WC "doublesize='" + doublesize + "'"
6369$ WC "drand01='" + drand01 + "'"
83d8c294 6370$ WC "dtrace='" + "'"
a3bd614a 6371$!
63d52911 6372$! The dynamic_ext symbol may be quite long
a3bd614a 6373$!
63d52911 6374$ tmp = "dynamic_ext='" + dynamic_ext + "'"
a3bd614a
PP
6375$ WC/symbol tmp
6376$ DELETE/SYMBOL tmp
570bb66e
JH
6377$ WC "eagain=' '"
6378$ WC "ebcdic='undef'"
9b5c8979 6379$ WC "embedmymalloc='" + usemymalloc + "'"
570bb66e
JH
6380$ WC "eunicefix=':'"
6381$ WC "exe_ext='" + exe_ext + "'"
a3bd614a 6382$!
63d52911 6383$! The extensions symbols may be quite long
a3bd614a 6384$!
bd2aeadf 6385$ WC/symbol "extensions='", nonxs_ext, " ", nonxs_ext2, " ", dynamic_ext, "'"
570bb66e
JH
6386$ WC "fflushNULL='define'"
6387$ WC "fflushall='undef'"
6388$ WC "fpostype='fpos_t'"
6389$ WC "freetype='void'"
6390$ WC "full_ar='" + "'"
6391$ WC "full_csh='" + " '"
6392$ WC "full_sed='_NLA0:'"
6393$ WC "gccversion='" + gccversion + "'"
6394$ WC "gidformat='lu'"
6395$ WC "gidsign='1'"
6396$ WC "gidsize='4'"
6397$ WC "gidtype='" + gidtype + "'"
6398$ WC "groupstype='Gid_t'"
82446b56
CB
6399$ WC "h_fcntl='false'"
6400$ WC "h_sysfile='false'"
570bb66e
JH
6401$ WC "hint='none'"
6402$ WC "hintfile='" + "'"
6403$ WC "i16size='" + i16size + "'"
6404$ WC "i16type='" + i16type + "'"
6405$ WC "i32size='" + i32size + "'"
6406$ WC "i32type='" + i32type + "'"
6407$ WC "i64size='" + i64size + "'"
6408$ WC "i64type='" + i64type + "'"
6409$ WC "i8size='" + i8size + "'"
6410$ WC "i8type='" + i8type + "'"
53eda0bf 6411$ WC "i_arpainet='" + i_arpainet + "'"
2a0de2c5 6412$ WC "i_assert='define'"
82446b56 6413$ WC "i_bsdioctl='undef'"
4f93eb5d 6414$ WC "i_crypt='undef'"
fcc434ad 6415$ WC "i_db='undef'"
570bb66e 6416$ WC "i_dbm='undef'"
85fac3a9 6417$ WC "i_dirent='undef'" ! we roll our own
570bb66e
JH
6418$ WC "i_dlfcn='undef'"
6419$ WC "i_fcntl='" + i_fcntl + "'"
6420$ WC "i_float='define'"
758a5d79
JH
6421$ WC "i_fp='undef'"
6422$ WC "i_fp_class='undef'"
0b57cc8d 6423$ WC "i_gdbm='undef'"
3ab94133
AD
6424$ WC "i_gdbm_ndbm='undef'"
6425$ WC "i_gdbmndbm='undef'"
9fa802f3 6426$ WC "i_grp='" + i_grp + "'"
570bb66e
JH
6427$ WC "i_ieeefp='undef'"
6428$ WC "i_inttypes='" + i_inttypes + "'"
2765b840 6429$ WC "i_langinfo='" + i_langinfo + "'"
570bb66e
JH
6430$ WC "i_libutil='" + i_libutil + "'"
6431$ WC "i_limits='define'"
6432$ WC "i_locale='" + i_locale + "'"
6433$ WC "i_machcthr='undef'"
6434$ WC "i_machcthreads='undef'"
82446b56 6435$ WC "i_malloc='undef'"
1cd66f7c 6436$ WC "i_mallocmalloc='undef'"
570bb66e
JH
6437$ WC "i_math='define'"
6438$ WC "i_memory='undef'"
6439$ WC "i_mntent='undef'"
6440$ WC "i_ndbm='undef'"
6441$ WC "i_netdb='" + i_netdb + "'"
6442$ WC "i_neterrno='define'"
6443$ WC "i_netinettcp='" + i_netinettcp + "'"
6444$ WC "i_niin='" + i_niin + "'"
6445$ WC "i_poll='" + i_poll + "'"
6446$ WC "i_prot='undef'"
6447$ WC "i_pthread='define'"
6448$ WC "i_pwd='undef'"
6449$ WC "i_rpcsvcdbm='undef'"
570bb66e
JH
6450$ WC "i_sgtty='undef'"
6451$ WC "i_shadow='" + i_shadow + "'"
6452$ WC "i_socks='" + i_socks + "'"
6453$ WC "i_stdarg='define'"
85fac3a9 6454$ IF ccname .EQS. "DEC" .AND. F$INTEGER(Dec_C_Version).GE.60400000
f29eb9c4
CB
6455$ THEN
6456$ WC "i_stdbool='define'"
6457$ ELSE
6458$ WC "i_stdbool='undef'"
6459$ ENDIF
570bb66e
JH
6460$ WC "i_stddef='define'"
6461$ WC "i_stdlib='define'"
6462$ WC "i_string='define'"
6463$ WC "i_sunmath='undef'"
6464$ WC "i_sysaccess='" + i_sysaccess + "'"
6465$ WC "i_sysdir='undef'"
6466$ WC "i_sysfile='" + i_sysfile + "'"
82446b56
CB
6467$ WC "i_sysfilio='undef'"
6468$ WC "i_sysin='undef'"
670137c2 6469$ WC "i_sysioctl='" + i_sysioctl + "'"
570bb66e
JH
6470$ WC "i_syslog='" + i_syslog + "'"
6471$ WC "i_sysmman='undef'"
6472$ WC "i_sysmode='" + i_sysmode + "'"
6473$ WC "i_sysmount='undef'"
6474$ WC "i_sysndir='undef'"
6475$ WC "i_sysparam='undef'"
ed1b9de0 6476$ WC "i_syspoll='" + i_syspoll + "'"
570bb66e
JH
6477$ WC "i_sysresrc='undef'"
6478$ WC "i_syssecrt='" + i_syssecrt + "'"
6479$ WC "i_sysselct='undef'"
49a78c82 6480$ WC "i_syssockio='undef'"
570bb66e
JH
6481$ WC "i_sysstat='define'"
6482$ WC "i_sysstatfs='undef'"
96021e87 6483$ WC "i_sysstatvfs='" + i_sysstatvfs + "'"
570bb66e
JH
6484$ WC "i_systime='undef'"
6485$ WC "i_systimek='undef'"
6486$ WC "i_systimes='undef'"
6487$ WC "i_systypes='define'"
6488$ WC "i_sysuio='" + i_sysuio + "'"
53eda0bf 6489$ WC "i_sysun='" + i_sysun + "'"
570bb66e
JH
6490$ WC "i_sysutsname='" + i_sysutsname + "'"
6491$ WC "i_sysvfs='undef'"
6492$ WC "i_syswait='undef'"
6493$ WC "i_termio='undef'"
6494$ WC "i_termios='undef'"
6495$ WC "i_time='define'"
6496$ WC "i_unistd='" + i_unistd + "'"
6497$ WC "i_ustat='undef'"
704c2eb3 6498$ WC "i_utime='" + i_utime + "'"
570bb66e
JH
6499$ WC "i_values='undef'"
6500$ WC "i_varargs='undef'"
82446b56 6501$ WC "i_varhdr='stdarg.h'"
570bb66e
JH
6502$ WC "i_vfork='undef'"
6503$ WC "inc_version_list='0'"
6504$ WC "inc_version_list_init='0'"
6505$ WC "installarchlib='" + installarchlib + "'"
6506$ WC "installbin='" + installbin + "'"
6507$ WC "installman1dir='" + installman1dir + "'"
6508$ WC "installman3dir='" + installman3dir + "'"
ec18bc92
CB
6509$ WC "installprefix='" + vms_prefix + "'"
6510$ WC "installprefixexp='" + vms_prefix + ":'"
570bb66e
JH
6511$ WC "installprivlib='" + installprivlib + "'"
6512$ WC "installscript='" + installscript + "'"
6513$ WC "installsitearch='" + installsitearch + "'"
ec18bc92 6514$ WC "installsitebin='" + sitebin + "'"
570bb66e
JH
6515$ WC "installsitelib='" + installsitelib + "'"
6516$ WC "installusrbinperl='undef'"
6517$ WC "intsize='" + intsize + "'"
6518$ WC "ivdformat='" + ivdformat + "'"
6519$ WC "ivsize='" + ivsize + "'"
6520$ WC "ivtype='" + ivtype + "'"
a3bd614a 6521$!
86ad859e 6522$! The xs_extensions symbol may be quite long
a3bd614a 6523$!
86ad859e 6524$ WC/symbol "known_extensions='", xs_extensions, " ", nonxs_ext, " ", nonxs_ext2, "'"
570bb66e 6525$ WC "ld='" + ld + "'"
8e15b544 6526$ WC "ld_can_script='undef'"
570bb66e 6527$ WC "lddlflags='/Share'"
f24fb74c 6528$ WC "ldflags='" + ldflags + "'"
e0261ef8 6529$ WC "ldflags_uselargefiles='" + "'"
8e15b544 6530$ WC "ldlibpthname='" + "'"
570bb66e
JH
6531$ WC "lib_ext='" + lib_ext + "'"
6532$ WC "libc='" + libc + "'"
6533$ WC "libpth='/sys$share /sys$library'"
6534$ WC "libs='" + libs + "'"
e0261ef8
CB
6535$ WC "libswanted='" + "'"
6536$ WC "libswanted_uselargefiles='" + "'"
570bb66e
JH
6537$ WC "longdblsize='" + longdblsize + "'"
6538$ WC "longlongsize='" + longlongsize + "'"
6539$ WC "longsize='" + longsize + "'"
e0261ef8
CB
6540$ IF uselargefiles .OR. uselargefiles .EQS. "define"
6541$ THEN
6542$ WC "lseeksize='8'"
6543$ WC "lseektype='off_t'"
6544$ ELSE
6545$ WC "lseeksize='4'"
6546$ WC "lseektype='int'"
6547$ ENDIF
570bb66e 6548$ WC "mab='" + "'"
a724edfe 6549$ WC "mad='undef'"
570bb66e
JH
6550$ WC "make='" + make + "'"
6551$ WC "malloctype='void *'"
dc8c9d5a 6552$ WC "usemallocwrap='" + usemallocwrap + "'"
570bb66e
JH
6553$ WC "man1ext='rno'"
6554$ WC "man3ext='rno'"
10eefe7f 6555$ WC "mmaptype='void *'"
570bb66e
JH
6556$ WC "modetype='unsigned int'"
6557$ WC "multiarch='undef'"
6558$ WC "mydomain='" + mydomain + "'"
6559$ WC "myhostname='" + myhostname + "'"
6560$ WC "myuname='" + myuname + "'"
2cc61e15 6561$ WC "need_va_copy='undef'"
570bb66e
JH
6562$ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
6563$ WC "netdb_host_type='" + netdb_host_type + "'"
6564$ WC "netdb_name_type='" + netdb_name_type + "'"
6565$ WC "netdb_net_type='" + netdb_net_type + "'"
bd2aeadf 6566$ WC/symbol "nonxs_ext='", nonxs_ext, " ", nonxs_ext2, "'"
fd47df60 6567$ WC "nveformat='" + nveformat + "'"
d677d0fc 6568$ WC "nvEUformat='" + nvEUformat + "'"
fd47df60 6569$ WC "nvfformat='" + nvfformat + "'"
d677d0fc 6570$ WC "nvFUformat='" + nvFUformat + "'"
fd47df60 6571$ WC "nvgformat='" + nvgformat + "'"
d677d0fc 6572$ WC "nvGUformat='" + nvGUformat + "'"
570bb66e
JH
6573$ WC "nvsize='" + nvsize + "'"
6574$ WC "nvtype='" + nvtype + "'"
6575$ WC "o_nonblock=' '"
6576$ WC "obj_ext='" + obj_ext + "'"
6577$ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
6578$ WC "oldarchlib='" + oldarchlib + "'"
6579$ WC "oldarchlibexp='" + oldarchlibexp + "'"
6580$ WC "optimize='" + optimize + "'"
6581$ WC "osname='" + osname + "'"
6582$ WC "osvers='" + osvers + "'"
6583$ WC "otherlibdirs='" + "'"
6584$ WC "package='" + package + "'"
6585$ WC "pager='" + pager + "'"
6586$ WC "patchlevel='" + patchlevel + "'"
6587$ WC "path_sep='|'"
6588$ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
6589$ WC "perladmin='" + perladmin + "'"
94928b12 6590$ WC "perllibs='" + perllibs + "'"
972e9305 6591$ WC "perlpath='" + "''vms_prefix':[000000]Perl''exe_ext'" + "'"
b0e839b3 6592$ WC "perl_static_inline='static inline'"
9b5c8979
JH
6593$ WC "perl_symbol='" + perl_symbol + "'" ! VMS specific
6594$ WC "perl_verb='" + perl_verb + "'" ! VMS specific
570bb66e
JH
6595$ WC "pgflquota='" + pgflquota + "'"
6596$ WC "pidtype='" + pidtype + "'"
70c20b69 6597$ WC "prefix='" + vms_prefix + "'"
b4558e59 6598$ WC "prefixexp='" + vms_prefix + ":'"
570bb66e
JH
6599$ WC "privlib='" + privlib + "'"
6600$ WC "privlibexp='" + privlibexp + "'"
357cef76 6601$ WC "procselfexe=' '"
570bb66e
JH
6602$ WC "prototype='define'"
6603$ WC "ptrsize='" + ptrsize + "'"
6604$ WC "quadkind='" + quadkind + "'"
6605$ WC "quadtype='" + quadtype + "'"
cd3eeb19
CB
6606$ WC "randbits='" + randbits + "'"
6607$ WC "randfunc='" + randfunc + "'"
570bb66e
JH
6608$ WC "randseedtype='" + randseedtype + "'"
6609$ WC "ranlib='" + "'"
6610$ WC "rd_nodata=' '"
6611$ WC "revision='" + revision + "'"
d83484c2 6612$ WC "sGMTIME_max='4294967295'"
96938616 6613$ WC "sGMTIME_min='0'"
d83484c2 6614$ WC "sLOCALTIME_max='4294967295'"
96938616 6615$ WC "sLOCALTIME_min='0'"
570bb66e 6616$ WC "sPRId64='" + sPRId64 + "'"
d677d0fc
CB
6617$ WC "sPRIEUldbl='" + sPRIEUldbl + "'"
6618$ WC "sPRIFUldbl='" + sPRIFUldbl + "'"
6619$ WC "sPRIGUldbl='" + sPRIGUldbl + "'"
6620$ WC "sPRIXU64='" + sPRIXU64 + "'"
59a27e12 6621$ WC "sPRIeldbl='" + sPRIeldbl + "'"
570bb66e
JH
6622$ WC "sPRIfldbl='" + sPRIfldbl + "'"
6623$ WC "sPRIgldbl='" + sPRIgldbl + "'"
d677d0fc 6624$ WC "sPRIi64='" + sPRIi64 + "'"
570bb66e
JH
6625$ WC "sPRIo64='" + sPRIo64 + "'"
6626$ WC "sPRIu64='" + sPRIu64 + "'"
6627$ WC "sPRIx64='" + sPRIx64 + "'"
b5ddfb46 6628$ WC "sSCNfldbl='" + sSCNfldbl + "'"
570bb66e 6629$ WC "sched_yield='" + sched_yield + "'"
f688e3ac 6630$ WC "scriptdir='" + scriptdir + "'"
86761af6 6631$ WC "scriptdirexp='" + scriptdir + "'" ! use scriptdir for now
570bb66e
JH
6632$ WC "seedfunc='" + seedfunc + "'"
6633$ WC "selectminbits='32'"
6634$ WC "selecttype='" + selecttype + "'"
6635$ WC "sh='MCR'"
58046ef3 6636$ WC "sharpbang='#!'"
3f88addd 6637$ WC "shmattype='" + shmattype + "'"
570bb66e 6638$ WC "shortsize='" + shortsize + "'"
fe1de8ce
CB
6639$ IF (f$length(sig_name) .GE. 244)
6640$ THEN
6641$ tmp = "sig_name='" + sig_name + "'"
6642$ WC/symbol tmp
6643$ DELETE/SYMBOL tmp
6644$ ELSE
6645$ WC "sig_name='" + sig_name + "'"
6646$ ENDIF
6647$ IF (f$length(sig_name_init) .GE. 244)
ecd6e098
AT
6648$ THEN
6649$ tmp = "sig_name_init='" + sig_name_init + "'"
6650$ WC/symbol tmp
6651$ DELETE/SYMBOL tmp
6652$ ELSE
6653$ WC "sig_name_init='" + sig_name_init + "'"
6654$ ENDIF
570bb66e
JH
6655$ WC "sig_num='" + sig_num + "'"
6656$ WC "sig_num_init='" + sig_num_init + "'"
acabf64b 6657$ WC "sig_count='" + sig_count + "'"
76d3c696 6658$ WC "sig_size='" + sig_size + "'"
570bb66e
JH
6659$ WC "signal_t='" + signal_t + "'"
6660$ WC "sitearch='" + sitearch + "'"
6661$ WC "sitearchexp='" + sitearchexp + "'"
ec18bc92
CB
6662$ WC "sitebin='" + sitebin + "'"
6663$ WC "sitebinexp='" + sitebin + "'"
570bb66e
JH
6664$ WC "sitelib='" + sitelib + "'"
6665$ WC "sitelib_stem='" + sitelib_stem + "'"
6666$ WC "sitelibexp='" + sitelibexp + "'"
ec18bc92
CB
6667$ WC "siteprefix='" + vms_prefix + "'"
6668$ WC "siteprefixexp='" + vms_prefix + ":'"
570bb66e
JH
6669$ WC "sizesize='" + sizesize + "'"
6670$ WC "sizetype='size_t'"
6671$ WC "so='" + so + "'"
6672$ WC "socksizetype='" + socksizetype + "'"
6673$ WC "spitshell='write sys$output '"
6674$ WC "src='" + src + "'"
6675$ WC "ssizetype='int'"
6676$ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
17e8697d 6677$ WC "static_ext='" + static_ext + "'"
17660758 6678$ WC "st_ino_size='" + st_ino_size + "'"
adf2bd28 6679$ WC "st_ino_sign='1'"
570bb66e
JH
6680$ WC "stdchar='" + stdchar + "'"
6681$ WC "stdio_base='((*fp)->_base)'"
6682$ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
6683$ WC "stdio_cnt='((*fp)->_cnt)'"
6684$ WC "stdio_ptr='((*fp)->_ptr)'"
59a27e12 6685$ WC "stdio_stream_array=' " + "'"
570bb66e 6686$ WC "subversion='" + subversion + "'"
d91e3179 6687$ WC "targetarch='" + "'"
d643f78d 6688$ WC "targetsh='MCR'"
570bb66e
JH
6689$ WC "timetype='" + timetype + "'"
6690$ WC "u16size='" + u16size + "'"
6691$ WC "u16type='" + u16type + "'"
6692$ WC "u32size='" + u32size + "'"
6693$ WC "u32type='" + u32type + "'"
6694$ WC "u64size='" + u64size + "'"
6695$ WC "u64type='" + u64type + "'"
6696$ WC "u8size='" + u8size + "'"
6697$ WC "u8type='" + u8type + "'"
6698$ WC "uidformat='lu'"
6699$ WC "uidsign='1'"
6700$ WC "uidsize='4'"
6701$ WC "uidtype='" + uidtype + "'"
6702$ WC "uquadtype='" + uquadtype + "'"
6703$ WC "use5005threads='" + use5005threads + "'"
6704$ WC "use64bitall='" + use64bitall + "'"
6705$ WC "use64bitint='" + use64bitint + "'"
9b5c8979
JH
6706$ WC "usecasesensitive='" + be_case_sensitive + "'" ! VMS-specific
6707$ WC "usedebugging_perl='"+use_debugging_perl+"'"
6708$ WC "usedefaulttypes='" + usedefaulttypes + "'" ! VMS-specific
5440bc8e 6709$ WC "usecrosscompile='undef'"
580410d2 6710$ WC "usedevel='" + usedevel + "'"
570bb66e 6711$ WC "usedl='" + usedl + "'"
5ac1e9b2 6712$ WC "usedtrace='undef'"
ea77424f 6713$ WC "usefaststdio='" + usefaststdio + "'"
9b5c8979 6714$ WC "useieee='" + useieee + "'" ! VMS-specific
570bb66e 6715$ WC "useithreads='" + useithreads + "'"
3f39e13a 6716$ WC "usekernelthreads='" + usekernelthreads + "'" ! VMS-specific
2982a345 6717$ WC "usekernprocpathname='undef'"
ae60cb46 6718$ WC "usensgetexecutablepath='undef'"
570bb66e
JH
6719$ WC "uselargefiles='" + uselargefiles + "'"
6720$ WC "uselongdouble='" + uselongdouble + "'"
6721$ WC "usemorebits='" + usemorebits + "'"
6722$ WC "usemultiplicity='" + usemultiplicity + "'"
6723$ WC "usemymalloc='" + usemymalloc + "'"
712b953a 6724$ WC "useperlio='define'"
570bb66e 6725$ WC "useposix='false'"
9514c62b 6726$ WC "usereentrant='undef'"
4fd0a66c 6727$ WC "userelocatableinc='undef'"
9b5c8979 6728$ WC "usesecurelog='" + usesecurelog + "'" ! VMS-specific
1171624b 6729$ WC "useshortenedsymbols='" + useshortenedsymbols + "'" ! VMS-specific
b672680a 6730$ WC "useshrplib='true'"
79e63f36 6731$ WC "usesitecustomize='" + usesitecustomize + "'"
570bb66e
JH
6732$ WC "usesocks='undef'"
6733$ WC "usethreads='" + usethreads + "'"
3f39e13a 6734$ WC "usethreadupcalls='" + usethreadupcalls + "'" ! VMS-specific
ec18bc92 6735$ WC "usevendorprefix='" + "'" ! try to say no, though we'll be ignored as of MM 5.90_01
139a355e 6736$ WC "useversionedarchname='" + useversionedarchname + "'"
570bb66e 6737$ WC "usevfork='true'"
9b5c8979 6738$ WC "usevmsdebug='" + usevmsdebug + "'" ! VMS-specific
570bb66e
JH
6739$ WC "uvoformat='" + uvoformat + "'"
6740$ WC "uvsize='" + uvsize + "'"
6741$ WC "uvtype='" + uvtype + "'"
6742$ WC "uvuformat='" + uvuformat + "'"
6743$ WC "uvxformat='" + uvxformat + "'"
414b89cc 6744$ WC "uvXUformat='" + uvXUformat + "'"
ec18bc92 6745$ WC "vendorarch='" + "'"
a1bd83cf 6746$ WC "vaproto='define'"
570bb66e 6747$ WC "vendorarchexp='" + "'"
ec18bc92
CB
6748$ WC "vendorbin='" + "'"
6749$ WC "vendorbinexp='" + "'"
570bb66e 6750$ WC "vendorlib_stem='" + "'"
ec18bc92 6751$ WC "vendorlib='" + "'"
570bb66e 6752$ WC "vendorlibexp='" + "'"
ec18bc92
CB
6753$ WC "vendorprefix='" + "'"
6754$ WC "vendorprefixexp='" + "'"
570bb66e 6755$ WC "version='" + version + "'"
9ec25520 6756$ WC "version_patchlevel_string='" + version_patchlevel_string + "'"
570bb66e
JH
6757$ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific
6758$ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific
6759$ WC "vms_ver='" + vms_ver + "'" ! VMS specific
10bc17b6
JH
6760$!
6761$! ## The UNIXy POSIXy reentrantey thingys ##
8df869cb
CB
6762$! See "Appendix B, Version-Dependency Tables" in the C RTL
6763$! manual for when assorted _r functions became available.
10bc17b6 6764$!
8df869cb
CB
6765$ IF use_threads .AND. vms_ver .GES. "7.2"
6766$ THEN
4f93eb5d 6767$ WC "asctime_r_proto='REENTRANT_PROTO_B_SB'"
8df869cb 6768$ WC "d_asctime_r='define'"
4f93eb5d 6769$ WC "ctime_r_proto='REENTRANT_PROTO_B_SB'"
8df869cb 6770$ WC "d_ctime_r='define'"
8df869cb
CB
6771$ ELSE
6772$ WC "asctime_r_proto='0'"
6773$ WC "d_asctime_r='undef'"
4f93eb5d 6774$ WC "ctime_r_proto='0'"
8df869cb 6775$ WC "d_ctime_r='undef'"
8df869cb 6776$ ENDIF
10bc17b6
JH
6777$ WC "d_crypt_r='undef'"
6778$ WC "d_ctermid_r='undef'"
10bc17b6
JH
6779$ WC "d_drand48_r='undef'"
6780$ WC "d_endgrent_r='undef'"
6781$ WC "d_endhostent_r='undef'"
6782$ WC "d_endnetent_r='undef'"
6783$ WC "d_endprotoent_r='undef'"
6784$ WC "d_endpwent_r='undef'"
6785$ WC "d_endservent_r='undef'"
6786$ WC "d_getgrent_r='undef'"
96021e87
JM
6787$ WC "d_getgrgid_r='" + d_getgrgid_r + "'"
6788$ WC "d_getgrnam_r='" + d_getgrnam_r + "'"
10bc17b6
JH
6789$ WC "d_gethostbyaddr_r='undef'"
6790$ WC "d_gethostbyname_r='undef'"
6791$ WC "d_gethostent_r='undef'"
6792$ WC "d_getlogin_r='undef'"
6793$ WC "d_getnetbyaddr_r='undef'"
6794$ WC "d_getnetbyname_r='undef'"
6795$ WC "d_getnetent_r='undef'"
6796$ WC "d_getprotobyname_r='undef'"
6797$ WC "d_getprotobynumber_r='undef'"
6798$ WC "d_getprotoent_r='undef'"
6799$ WC "d_getpwent_r='undef'"
96021e87
JM
6800$ WC "d_getpwnam_r='" + d_getpwnam_r + "'"
6801$ WC "d_getpwuid_r='" + d_getpwuid_r + "'"
10bc17b6
JH
6802$ WC "d_getservbyname_r='undef'"
6803$ WC "d_getservbyport_r='undef'"
6804$ WC "d_getservent_r='undef'"
6805$ WC "d_getspnam_r='undef'"
4f93eb5d
CB
6806$ WC "d_gmtime_r='undef'" ! leave undef'd; we use my_gmtime
6807$ WC "d_localtime_r='undef'" ! leave undef'd; we use my_localtime
f025e94b 6808$ WC "d_localtime_r_needs_tzset='undef'"
10bc17b6 6809$ WC "d_random_r='undef'"
a9852f7c 6810$ WC "d_readdir_r='define'" ! always defined; we roll our own
10bc17b6 6811$ WC "d_readdir64_r='undef'"
10bc17b6
JH
6812$ WC "d_setgrent_r='undef'"
6813$ WC "d_sethostent_r='undef'"
6814$ WC "d_setlocale_r='undef'"
6815$ WC "d_setnetent_r='undef'"
6816$ WC "d_setprotoent_r='undef'"
6817$ WC "d_setpwent_r='undef'"
6818$ WC "d_setservent_r='undef'"
d00eb249 6819$ WC "d_snprintf='" + d_snprintf + "'"
10bc17b6
JH
6820$ WC "d_srand48_r='undef'"
6821$ WC "d_srandom_r='undef'"
6822$ WC "d_strerror_r='undef'"
6823$ WC "d_tmpnam_r='undef'"
96021e87 6824$ WC "d_ttyname_r='" + d_ttyname_r + "'"
4f93eb5d
CB
6825$ WC "ctermid_r_proto='0'"
6826$ WC "crypt_r_proto='0'"
10bc17b6
JH
6827$ WC "drand48_r_proto='0'"
6828$ WC "endgrent_r_proto='0'"
6829$ WC "endhostent_r_proto='0'"
6830$ WC "endnetent_r_proto='0'"
6831$ WC "endprotoent_r_proto='0'"
6832$ WC "endpwent_r_proto='0'"
6833$ WC "endservent_r_proto='0'"
6834$ WC "getgrent_r_proto='0'"
96021e87
JM
6835$ WC "getgrgid_r_proto='" + getgrgid_r_proto + "'"
6836$ WC "getgrnam_r_proto='" + getgrnam_r_proto + "'"
10bc17b6
JH
6837$ WC "gethostbyaddr_r_proto='0'"
6838$ WC "gethostbyname_r_proto='0'"
6839$ WC "gethostent_r_proto='0'"
6840$ WC "getlogin_r_proto='0'"
6841$ WC "getnetbyaddr_r_proto='0'"
6842$ WC "getnetbyname_r_proto='0'"
6843$ WC "getnetent_r_proto='0'"
6844$ WC "getprotobyname_r_proto='0'"
6845$ WC "getprotobynumber_r_proto='0'"
6846$ WC "getprotoent_r_proto='0'"
6847$ WC "getpwent_r_proto='0'"
6848$ WC "getpwnam_r_proto='0'"
6849$ WC "getpwuid_r_proto='0'"
6850$ WC "getservbyname_r_proto='0'"
6851$ WC "getservbyport_r_proto='0'"
6852$ WC "getservent_r_proto='0'"
6853$ WC "getspnam_r_proto='0'"
6854$ WC "gmtime_r_proto='0'"
10bc17b6
JH
6855$ WC "localtime_r_proto='0'"
6856$ WC "random_r_proto='0'"
a9852f7c 6857$ WC "readdir_r_proto='REENTRANT_PROTO_I_TSR'" ! always defined; we roll our own
4f93eb5d 6858$ WC "readdir64_r_proto='0'"
10bc17b6
JH
6859$ WC "setgrent_r_proto='0'"
6860$ WC "sethostent_r_proto='0'"
6861$ WC "setlocale_r_proto='0'"
6862$ WC "setnetent_r_proto='0'"
6863$ WC "setprotoent_r_proto='0'"
6864$ WC "setpwent_r_proto='0'"
6865$ WC "setservent_r_proto='0'"
6866$ WC "srand48_r_proto='0'"
6867$ WC "srandom_r_proto='0'"
6868$ WC "strerror_r_proto='0'"
6869$ WC "tmpnam_r_proto='0'"
96021e87 6870$ WC "ttyname_r_proto='" + ttyname_r_proto + "'"
570bb66e
JH
6871$!
6872$! ##END WRITE NEW CONSTANTS HERE##
6873$!
6874$ CLOSE CONFIG
6875$!
6876$! Okay, we've gotten here. Build munchconfig.exe
6877$ COPY/NOLOG [-.vms]munchconfig.c []
7558ebc2 6878$ COPY/NOLOG [-.vms]'Makefile_SH' []
1632ad18 6879$ 'Perl_CC' 'ccflags' munchconfig.c
570bb66e
JH
6880$ IF Needs_Opt
6881$ THEN
6882$ OPEN/WRITE CONFIG []munchconfig.opt
414b89cc 6883$ IF ccname .EQS. "GCC"
570bb66e
JH
6884$ THEN
6885$ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library"
6886$ ENDIF
6887$ WRITE CONFIG "Sys$Share:VAXCRTL/Share"
6888$ CLOSE CONFIG
6889$ 'ld' munchconfig.obj,munchconfig.opt/opt
6890$ DELETE/NOLOG/NOCONFIRM munchconfig.opt;
6891$ ELSE
6892$ 'ld' munchconfig.obj
6893$ ENDIF
6894$ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj;
6895$ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
414b89cc 6896$ IF ccname .EQS. "CXX"
570bb66e
JH
6897$ THEN
6898$ CALL Cxx_demangler_cleanup
6899$ ENDIF
6900$!
6901$ IF alldone .EQS. ""
6902$ THEN
6903$ cat4 SYS$INPUT:
7558ebc2 6904$ DECK
570bb66e
JH
6905
6906If you'd like to make any changes to the config.sh file before I begin
6907to configure things, answer yes to the following question.
6908
7558ebc2 6909$ EOD
9b5c8979
JH
6910$ bool_dflt="n"
6911$ rp="Do you wish to edit ''basename_config_sh'? [''bool_dflt'] "
570bb66e 6912$ GOSUB myread
570bb66e
JH
6913$ IF ans
6914$ THEN
6915$ echo4 ""
6916$ echo4 "Be sure to type LOGOUT after you have edited the file,"
6917$ echo4 "then this procedure will resume."
6918$ echo4 ""
6919$ default = F$ENVIRONMENT("DEFAULT")
7558ebc2 6920$ DIRECTORY 'config_sh'
570bb66e
JH
6921$ SET DEFAULT [-]
6922$ SPAWN/WAIT
7558ebc2 6923$ SET DEFAULT 'default'
570bb66e
JH
6924$ ENDIF
6925$ ENDIF
6926$!
6927$ echo ""
6928$ echo4 "Adding ''osname' specific preprocessor commands."
6929$ !
6930$ ! we need an fdl file
6931$ CREATE [-]CONFIG.FDL
7558ebc2 6932$ DECK
570bb66e
JH
6933RECORD
6934 FORMAT STREAM_LF
7558ebc2 6935$ EOD
570bb66e
JH
6936$ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
6937$ ! First spit out the header info with the local defines (to get
6938$ ! around the 255 character command line limit)
6939$ OPEN/APPEND CONFIG [-]config.local
6940$ IF use_debugging_perl THEN WC "#define DEBUGGING"
6941$ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
6942$ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
6943$ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
6944$ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
414b89cc 6945$ IF ccname .EQS. "GCC" THEN WC "#define GNUC_ATTRIBUTE_CHECK"
570bb66e
JH
6946$ IF (Has_Dec_C_Sockets)
6947$ THEN
6948$ WC "#define VMS_DO_SOCKETS"
6949$ WC "#define DECCRTL_SOCKETS"
570bb66e
JH
6950$ ENDIF
6951$! This is VMS-specific for now
6952$ WC "#''d_setenv' HAS_SETENV"
6953$ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
6954$ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
6955$ IF use64bitint .OR. use64bitint .EQS. "define"
6956$ THEN
6957$ WC "#define USE_64_BIT_INT"
e5be143b
CB
6958$ ENDIF
6959$ IF uselongdouble .OR. uselongdouble .EQS. "define"
6960$ THEN
570bb66e
JH
6961$ WC "#define USE_LONG_DOUBLE"
6962$ ENDIF
6963$ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
6964 WC "#define USE_64_BIT_ALL"
6965$ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
1171624b 6966$ IF shorten_long_symbols THEN WC "#define VMS_SHORTEN_LONG_SYMBOLS"
3ffb755e 6967$ IF use_ieee_math THEN WC "#define USE_IEEE"
570bb66e
JH
6968$ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
6969$ WC "#define HAS_ENVGETENV"
6970$ WC "#define PERL_EXTERNAL_GLOB"
f2610a60 6971$ IF kill_by_sigprc .EQS. "define" then WC "#define KILL_BY_SIGPRC"
4adb8845
CB
6972$ IF unlink_all_versions .OR. unlink_all_versions .EQS. "define" THEN -
6973 WC "#define UNLINK_ALL_VERSIONS"
234242ca 6974$ IF d_sockaddr_sa_len .EQS. "define" then WC "#define _SOCKADDR_LEN 1"
85fac3a9
CB
6975$ IF ccname .EQS. "CXX" then WC "#define NO_ENVIRON_ARRAY"
6976$ IF ccname .EQS. "CXX" then WC "#define VMS" ! only has __VMS by default
570bb66e
JH
6977$ CLOSE CONFIG
6978$!
6979$ echo4 "Doing variable substitutions on .SH files..."
6980$ echo4 "Extracting config.h (with variable substitutions)"
6981$!
6982$! Now build the normal config.h
6983$ DEFINE/USER_MODE sys$output [-]config.main
7558ebc2 6984$ mcr []munchconfig 'config_sh' [-]config_h.sh
570bb66e
JH
6985$ ! Concatenate them together
6986$ copy [-]config.local,[-]config.main [-]config.h
6987$! Clean up
fcc434ad
PP
6988$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.MAIN;*
6989$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.LOCAL;*
6990$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;*
570bb66e 6991$!
414b89cc 6992$ IF ccname .EQS. "DEC"
570bb66e
JH
6993$ THEN
6994$ DECC_REPLACE = "DECC=decc=1"
6995$ ELSE
7558ebc2
PP
6996$ DECC_REPLACE = "DECC="
6997$ ENDIF
414b89cc 6998$ IF ccname .EQS. "CXX"
7558ebc2
PP
6999$ THEN
7000$ DECCXX_REPLACE = "DECCXX=DECCXX=1"
7001$ ELSE
7002$ DECCXX_REPLACE = "DECCXX="
570bb66e 7003$ ENDIF
414b89cc 7004$ IF ccname .EQS. "GCC"
570bb66e
JH
7005$ THEN
7006$ GNUC_REPLACE = "GNUC=gnuc=1"
7007$ ELSE
7008$ GNUC_REPLACE = "GNUC="
7009$ ENDIF
7010$ IF Has_Dec_C_Sockets
7011$ THEN
7012$ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
7013$ ELSE
046cc26c 7014$ SOCKET_REPLACE = "SOCKET="
570bb66e 7015$ ENDIF
a92ae878 7016$ IF use_threads
570bb66e 7017$ THEN
32995a38 7018$ THREAD_REPLACE = "THREAD=THREADED=1"
570bb66e
JH
7019$ ELSE
7020$ THREAD_REPLACE = "THREAD="
7021$ ENDIF
7022$ IF mymalloc
7023$ THEN
7024$ MALLOC_REPLACE = "MALLOC=MALLOC=1"
7025$ ELSE
7026$ MALLOC_REPLACE = "MALLOC="
7027$ ENDIF
e0261ef8
CB
7028$ IF uselargefiles .OR. uselargefiles .EQS. "define"
7029$ THEN
cfcfe586
JM
7030$ IF usestdstat .or. usestdstat .eqs. "define"
7031$ THEN
7032$ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_USE_STD_STAT=1"
7033$ ELSE
96021e87 7034$ LARGEFILE_REPLACE = "LARGEFILE=LARGEFILE=_LARGEFILE=1"
cfcfe586 7035$ ENDIF
e0261ef8
CB
7036$ ELSE
7037$ LARGEFILE_REPLACE = "LARGEFILE="
7038$ ENDIF
9152021d
CB
7039$ IF use_vmsdebug_perl
7040$ THEN
7041$ DEBUG_REPLACE = "USEVMSDEBUG=__DEBUG__=1"
7042$ ELSE
7043$ DEBUG_REPLACE = "USEVMSDEBUG="
7044$ ENDIF
b545184e 7045$ PREFIX_REPLACE = "PREFIX=PREFIX=''prefix'"
b8df70f4
CB
7046$!
7047$! In order not to stress the tiny command buffer on pre-7.3-2 systems,
7048$! we put the following substitutions in a file and pass the file to
7049$! munchconfig.
7050$!
7051$ open/write CONFIG extra_subs.txt
7052$ WC := write CONFIG
7053$ WC "''DECC_REPLACE'"
7054$ WC "''DECCXX_REPLACE'"
7055$ WC "''ARCH_TYPE'"
7056$ WC "''GNUC_REPLACE'"
7057$ WC "''SOCKET_REPLACE'"
7058$ WC "''THREAD_REPLACE'"
7059$ WC "''C_Compiler_Replace'"
7060$ WC "''MALLOC_REPLACE'"
7061$ WC "''THREAD_UPCALLS'"
7062$ WC "''THREAD_KERNEL'"
7063$ WC "PV=''version'"
7064$ WC "FLAGS=FLAGS=''extra_flags'"
7065$ WC "''LARGEFILE_REPLACE'"
44caa20c 7066$ WC "ARCHNAME=ARCHNAME=''archname'"
9152021d 7067$ WC "''DEBUG_REPLACE'"
b545184e 7068$ WC "''PREFIX_REPLACE'"
b8df70f4
CB
7069$ close CONFIG
7070$!
570bb66e 7071$ echo4 "Extracting ''defmakefile' (with variable substitutions)"
7558ebc2 7072$ DEFINE/USER_MODE sys$output 'UUmakefile'
b8df70f4 7073$ mcr []munchconfig 'config_sh' 'Makefile_SH' -f extra_subs.txt
7558ebc2
PP
7074$! Clean up after ourselves
7075$ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
b8df70f4 7076$ DELETE/NOLOG/NOCONFIRM []extra_subs.txt;
a3bd614a 7077$!
414b89cc
CB
7078$! Note that the /key qualifier to search, as in:
7079$! search README.* "=head"/key=(position=1)/window=0/output=extra.pods
7080$! is not supported on VMS V5.5-2, hence not used in extra_pods.com.
7081$!
7082$ echo4 "Extracting extra_pods.com (without variable substitutions)"
7083$ Create Sys$Disk:[-]extra_pods.com
7084$ Deck/Dollar="$EOExtra_Pods$"
7085$!++ extra_pods.com
7086$! NOTE: This file is extracted as part of the VMS configuration process.
7087$! Any changes made to it directly will be lost. If you need to make any
7088$! changes, please edit the template in Configure.Com instead.
7089$! Use FORCE if you've just podified a README.* file on VMS.
7090$ if f$search("extra.pods") .eqs. "" .or. P1 .eqs. "FORCE" then -
7091 search README.* "=head"/window=0/output=extra.pods
7092$ open/read/error=extra_close EXTRA extra.pods
7093$extra_loop:
7094$ read/error=extra_close/END_OF_FILE=extra_close EXTRA file
1f74f634 7095$ file_type = f$edit(f$parse(file,,,"TYPE",),"LOWERCASE") - "."
414b89cc
CB
7096$ if file_type .nes. "VMS" .and. file_type .nes. "vms"
7097$ then
7098$ pod_file = "[.pod]perl''file_type'.pod"
7099$ file = file - "''f$parse(file,,,"VERSION",)'"
7100$ if p1 .eqs. "CLEAN"
7101$ then if f$search(pod_file) .nes. "" then delete/log 'pod_file';*
7102$ else
7103$ do_copy := false
7104$ if f$search(pod_file) .eqs. ""
7105$ then do_copy := true
7106$ else
7107$ file_rdt = f$cvtime(f$file_attributes(file,"RDT"))
7108$ pod_file_rdt = f$cvtime(f$file_attributes(pod_file,"RDT"))
7109$ if file_rdt .GTS. pod_file_rdt then do_copy := true
7110$ endif
1f74f634
CB
7111$ ! wacky method to preserve case on ODS-5 even when parse style is traditional
7112$ if do_copy then mcr sys$disk:[]miniperl.exe -e "exit 0+$^E unless File::Copy::rmscopy(q{''file'}, q{''pod_file'});"
414b89cc
CB
7113$ endif
7114$ endif
7115$ goto extra_loop
7116$extra_close:
7117$ close EXTRA
7118$ if p1 .eqs. "CLEAN" .and. f$search("extra.pods;-1") .nes. "" then -
7119 purge/nolog extra.pods
7120$!-- extra_pods.com
7121$EOExtra_Pods$
97abc6ad 7122$!
146174a9 7123$! Warn of dangerous symbols or logical names
a4521476 7124$!
146174a9
CB
7125$Bad_environment: SUBROUTINE
7126$ Bad_env = ""
7127$ IF p2 .eqs. "SYMBOL"
7128$ THEN
7558ebc2 7129$ IF f$type('p1') .nes. "" THEN Bad_env := SYMBOL
146174a9
CB
7130$ ELSE
7131$ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
7132$ ENDIF
7133$ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
a4521476
PP
7134$ THEN
7135$ IF f$search("config.msg") .nes. ""
7136$ THEN
7137$ OPEN/APPEND CONFIG config.msg
7138$ ELSE
7139$ OPEN/WRITE CONFIG config.msg
7140$ ENDIF
146174a9
CB
7141$ IF Bad_env .eqs. "SYMBOL"
7142$ THEN
7143$ WRITE CONFIG ""
7144$ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
7145$ WRITE CONFIG " delete before building ''package' via:"
7146$ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
7147$ IF f$locate("""",&p1) .ge. f$length(&p1)
7148$ THEN
7558ebc2 7149$ WRITE CONFIG " after building, testing, and installing ''package'"
146174a9
CB
7150$ WRITE CONFIG " restore the symbol with:"
7151$ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
7152$ ENDIF
7153$ ENDIF
7154$ IF Bad_env .eqs. "LOGICAL"
7155$ THEN
7156$ WRITE CONFIG ""
7157$ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
7158$ WRITE CONFIG " deassign before building ''package'"
7159$ ENDIF
a4521476 7160$ CLOSE CONFIG
146174a9 7161$ Bad_env = ""
a4521476
PP
7162$ ENDIF
7163$ EXIT
146174a9 7164$ ENDSUBROUTINE ! Bad_environment
a4521476 7165$ echo ""
570bb66e 7166$ echo4 "Checking for dangerous pre-existing global symbols and logical names."
b3b333bf 7167$ CALL Bad_environment "COMP"
139df077
CB
7168$ CALL Bad_environment "EXT"
7169$ CALL Bad_environment "FOO"
146174a9 7170$ CALL Bad_environment "LIB"
139df077
CB
7171$ CALL Bad_environment "LIST"
7172$ CALL Bad_environment "MIME"
7173$ CALL Bad_environment "POSIX"
7174$ CALL Bad_environment "SYS"
146174a9 7175$ CALL Bad_environment "T"
139df077
CB
7176$ CALL Bad_environment "THREAD"
7177$ CALL Bad_environment "THREADS"
7178$ CALL Bad_environment "TIME"
7179$ CALL Bad_environment "TMP"
7180$ CALL Bad_environment "UNICODE"
7181$ CALL Bad_environment "UTIL"
146174a9 7182$ CALL Bad_environment "TEST" "SYMBOL"
a4521476
PP
7183$ IF f$search("config.msg") .eqs. "" THEN echo "OK."
7184$!
97abc6ad
HM
7185$! %Config-I-VMS, write perl_setup.com here
7186$!
86fced14
CB
7187$ IF (.NOT.perl_symbol)
7188$ THEN
7189$ file_2_find = "[-]''packageup'.cld"
7190$ echo ""
570bb66e 7191$ echo4 "The perl.cld file is now being written..."
86fced14 7192$ OPEN/WRITE CONFIG 'file_2_find'
c645ec3f 7193$ ext = ".exe"
2b4b3ebb
CB
7194$ IF (sharedperl .AND. F$ELEMENT(0, "-", archname) .EQS. "VMS_AXP") THEN ext := .AXE
7195$ IF (sharedperl .AND. F$ELEMENT(0, "-", archname) .EQS. "VMS_IA64") THEN ext := .IXE
86fced14
CB
7196$ IF (use_vmsdebug_perl)
7197$ THEN
7198$ WRITE CONFIG "define verb dbgperl"
570bb66e 7199$ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
86fced14
CB
7200$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7201$ WRITE CONFIG ""
7202$ WRITE CONFIG "define verb perl"
570bb66e 7203$ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
86fced14
CB
7204$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7205$ ELSE
7206$ WRITE CONFIG "define verb perl"
570bb66e 7207$ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
86fced14
CB
7208$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
7209$ ENDIF
7210$ CLOSE CONFIG
7211$ ENDIF ! (.NOT.perl_symbol)
97abc6ad 7212$ echo ""
570bb66e 7213$ echo4 "The perl_setup.com file is now being written..."
a3ef2c6f 7214$ file_2_find = "[-]perl_setup.com"
fcc434ad
PP
7215$!
7216$! Folks are likely to want to edit perl_setup.com.
7217$! STMLF RFM plays nicer with ported editors than does VFC.
7218$!
7219$ CREATE [-]CONFIG.FDL
7220$ DECK
7221RECORD
7222 FORMAT STREAM_LF
7223$ EOD
7224$ CREATE /FDL=[-]CONFIG.FDL 'file_2_find'
7225$ OPEN/APPEND CONFIG 'file_2_find'
7226$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;
97abc6ad
HM
7227$ WRITE CONFIG "$!"
7228$ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
7229$ IF cf_email.NES.perladmin
7230$ THEN
7231$ WRITE CONFIG "$! perl configured by ''cf_email'"
7232$ ELSE
7233$ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
7234$ ENDIF
7235$ WRITE CONFIG "$!"
b545184e
CB
7236$ WRITE CONFIG "$ if P1 .EQS. """""
7237$ WRITE CONFIG "$ then"
7238$ WRITE CONFIG "$ myproc = f$environment(""PROCEDURE"")"
7239$ WRITE CONFIG "$ myroot_dev = f$parse(myproc,,,""DEVICE"",""NO_CONCEAL"")"
7240$ WRITE CONFIG "$ myroot_dir = f$parse(myproc,,,""DIRECTORY"",""NO_CONCEAL"")"
7241$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000."" - ""><000000."""
7242$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""][000000]"" - ""><000000>"""
7243$ WRITE CONFIG "$ myroot_dir = myroot_dir - ""]["" - ""><"""
7244$ WRITE CONFIG "$ myroot_dir = myroot_dir - "".]"" - "".>"" - ""["" - ""]"" - ""<"" - "">"""
7245$ WRITE CONFIG "$ root_spec = myroot_dev + ""["" + myroot_dir + "".]"""
7246$ WRITE CONFIG "$ else"
7247$ WRITE CONFIG "$ root_spec = P1"
7248$ WRITE CONFIG "$ endif"
7249$ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' 'root_spec'"
86fced14 7250$ WRITE CONFIG "$ ext = "".exe"""
570bb66e 7251$ IF sharedperl
86fced14 7252$ THEN
86da1428
CB
7253$ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 2 then ext = "".AXE"""
7254$ WRITE CONFIG "$ if f$getsyi(""ARCH_TYPE"") .eq. 3 then ext = "".IXE"""
86fced14
CB
7255$ ENDIF
7256$ IF (perl_symbol)
7257$ THEN
972e9305 7258$ perl_setup_perl = "'" + "'perl'" ! triple quoted foreign command symbol
86fced14
CB
7259$ IF (use_vmsdebug_perl)
7260$ THEN
972e9305
PP
7261$ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgperl'ext'"
7262$ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgperl'ext'"
7263$ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
86fced14 7264$ ELSE
570bb66e 7265$ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
972e9305 7266$ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
86fced14
CB
7267$ ENDIF
7268$ ELSE ! .NOT.perl_symbol
972e9305 7269$ perl_setup_perl = "perl" ! command verb
86fced14
CB
7270$ IF (use_vmsdebug_perl)
7271$ THEN
972e9305 7272$ WRITE CONFIG "$ define dbgperlshr ''vms_prefix':[000000]dbgperlshr'ext'"
86fced14 7273$ ELSE
972e9305 7274$ WRITE CONFIG "$ define perlshr ''vms_prefix':[000000]perlshr'ext'"
86fced14
CB
7275$ ENDIF
7276$ IF perl_verb .EQS. "PROCESS"
7277$ THEN
570bb66e 7278$ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
86fced14
CB
7279$ ENDIF
7280$ ENDIF ! perl_symbol
3eeba6fb 7281$!
97abc6ad
HM
7282$ IF (tzneedset)
7283$ THEN
7284$ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
7285$ ELSE !leave in but commented out (in case setting was from perl :-)
7286$ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
7287$ ENDIF
7288$ WRITE CONFIG "$!"
9ee2021e 7289$ WRITE CONFIG "$! Symbols for Perl-based utility programs:"
97abc6ad 7290$ WRITE CONFIG "$!"
972e9305 7291$ WRITE CONFIG "$ c2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]c2ph.com"""
9ee2021e
CB
7292$ WRITE CONFIG "$ config_data== """ + perl_setup_perl + " ''vms_prefix':[utils]config_data.com"""
7293$ WRITE CONFIG "$ corelist == """ + perl_setup_perl + " ''vms_prefix':[utils]corelist.com"""
972e9305 7294$ WRITE CONFIG "$ cpan == """ + perl_setup_perl + " ''vms_prefix':[utils]cpan.com"""
972e9305 7295$ WRITE CONFIG "$ enc2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]enc2xs.com"""
88be34b6 7296$ WRITE CONFIG "$ find2perl == """ + perl_setup_perl + " ''vms_prefix':[utils]find2perl.com"""
972e9305
PP
7297$ WRITE CONFIG "$ h2ph == """ + perl_setup_perl + " ''vms_prefix':[utils]h2ph.com"""
7298$ WRITE CONFIG "$ h2xs == """ + perl_setup_perl + " ''vms_prefix':[utils]h2xs.com"""
88be34b6 7299$ WRITE CONFIG "$ instmodsh == """ + perl_setup_perl + " ''vms_prefix':[utils]instmodsh.com"""
972e9305 7300$ WRITE CONFIG "$ libnetcfg == """ + perl_setup_perl + " ''vms_prefix':[utils]libnetcfg.com"""
e8e09534 7301$ WRITE CONFIG "$ perlbug == """ + perl_setup_perl + " ''vms_prefix':[utils]perlbug.com"""
e8e09534 7302$ WRITE CONFIG "$ perldoc == """ + perl_setup_perl + " ''vms_prefix':[utils]perldoc.com """"-t"""""""
972e9305
PP
7303$ WRITE CONFIG "$ perlivp == """ + perl_setup_perl + " ''vms_prefix':[utils]perlivp.com"""
7304$ WRITE CONFIG "$ piconv == """ + perl_setup_perl + " ''vms_prefix':[utils]piconv.com"""
7305$ WRITE CONFIG "$ pl2pm == """ + perl_setup_perl + " ''vms_prefix':[utils]pl2pm.com"""
e8e09534 7306$ WRITE CONFIG "$ pod2html == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2html.com"""
e8e09534
PP
7307$ WRITE CONFIG "$ pod2text == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2text.com"""
7308$ WRITE CONFIG "$!pod2man == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2man.com"""
972e9305
PP
7309$ WRITE CONFIG "$ pod2usage == """ + perl_setup_perl + " ''vms_prefix':[utils]pod2usage.com"""
7310$ WRITE CONFIG "$ podchecker == """ + perl_setup_perl + " ''vms_prefix':[utils]podchecker.com"""
7311$ WRITE CONFIG "$ podselect == """ + perl_setup_perl + " ''vms_prefix':[utils]podselect.com"""
20997843 7312$ WRITE CONFIG "$ prove == """ + perl_setup_perl + " ''vms_prefix':[utils]prove.com"""
972e9305
PP
7313$ WRITE CONFIG "$ psed == """ + perl_setup_perl + " ''vms_prefix':[utils]psed.com"""
7314$ WRITE CONFIG "$ pstruct == """ + perl_setup_perl + " ''vms_prefix':[utils]pstruct.com"""
7315$ WRITE CONFIG "$ s2p == """ + perl_setup_perl + " ''vms_prefix':[utils]s2p.com"""
9ee2021e
CB
7316$ WRITE CONFIG "$ ptar == """ + perl_setup_perl + " ''vms_prefix':[utils]ptar.com"""
7317$ WRITE CONFIG "$ ptardiff == """ + perl_setup_perl + " ''vms_prefix':[utils]ptardiff.com"""
deabda19 7318$ WRITE CONFIG "$ ptargrep == """ + perl_setup_perl + " ''vms_prefix':[utils]ptargrep.com"""
9ee2021e 7319$ WRITE CONFIG "$ shasum == """ + perl_setup_perl + " ''vms_prefix':[utils]shasum.com"""
972e9305
PP
7320$ WRITE CONFIG "$ splain == """ + perl_setup_perl + " ''vms_prefix':[utils]splain.com"""
7321$ WRITE CONFIG "$ xsubpp == """ + perl_setup_perl + " ''vms_prefix':[utils]xsubpp.com"""
08ad9465 7322$ WRITE CONFIG "$ zipdetails == """ + perl_setup_perl + " ''vms_prefix':[utils]zipdetails.com"""
97abc6ad
HM
7323$ CLOSE CONFIG
7324$!
7325$ echo ""
570bb66e
JH
7326$ echo "The file can be found at:"
7327$ echo4 " ''F$SEARCH(file_2_find)'"
7328$ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
7329$ echo "when you are satisfied with a successful compilation,"
7330$ echo "testing, and installation of your perl."
97abc6ad 7331$ echo ""
86fced14
CB
7332$ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
7333$ THEN
7334$ file_2_find = "[-]''packageup'_install.com"
7558ebc2 7335$ OPEN/WRITE CONFIG 'file_2_find'
86fced14
CB
7336$ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
7337$ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
7338$ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
7339$ CLOSE CONFIG
7340$ echo4 ""
570bb66e
JH
7341$ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
7342$ echo4 " @ ''F$SEARCH(file_2_find)'"
7343$ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
86fced14
CB
7344$ echo4 ""
7345$ ENDIF
97abc6ad
HM
7346$!
7347$!figure out where we "are" by parsing 'vms_default_directory_name'
7348$!
7349$ set_def_command = ""
7350$ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
7351$ tmp = vms_default_directory_name - dflt - "]"
7352$ i = 0
7353$ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
7354$Set_def_loop:
7355$ tmp1 = F$ELEMENT(i,".",tmp)
7356$ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
7357$ IF i .EQ. 0
7358$ THEN set_def_command = "set default [-"
7359$ ELSE set_def_command = set_def_command + "-"
7360$ ENDIF
7361$ i = i + 1
7362$ GOTO Set_def_loop
7363$Beyond_set_def_loop:
7364$ IF set_def_command.NES.""
7365$ THEN
7366$ set_def_command = set_def_command - "-" + "]"
7367$ echo4 ""
7368$ echo4 "In order to build ''package' you must now issue the commands:"
7369$ echo4 ""
7370$ echo4 " ''set_def_command'"
7371$ ELSE
7372$ echo4 ""
7373$ echo4 "In order to build ''package' you must now issue the command:"
7374$ echo4 ""
7375$ ENDIF
7376$ echo4 " ''make'''makefile'", macros
7377$ echo4 ""
7378$!
a4521476
PP
7379$ IF ( F$SEARCH("config.msg").NES."" )
7380$ THEN
139df077
CB
7381$ echo4 "Hmm. I also noted the following information while running:"
7382$ echo4 ""
7383$ TYPE/OUTPUT=SYS$ERROR: config.msg
a4521476
PP
7384$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
7385$ DELETE/NOLOG/NOCONFIRM config.msg;
7386$ ENDIF
7387$!
97abc6ad 7388$Clean_up:
17d0565f 7389$ SET NOON
97abc6ad
HM
7390$ IF (silent)
7391$ THEN
17d0565f 7392$ CLOSE/NOLOG STDOUT
97abc6ad 7393$ DEASSIGN SYS$OUTPUT
97abc6ad 7394$ ENDIF
17d0565f 7395$ CLOSE/NOLOG CONFIG
414b89cc 7396$ IF F$GETJPI("","FILCNT").GT.vms_filcnt
97abc6ad
HM
7397$ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
7398$ ENDIF
7399$ dflt = F$ENVIRONMENT("DEFAULT")
7400$ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
7401$ THEN
1171624b
CB
7402$ IF ( F$SEARCH("[.CXX_REPOSITORY]*.*").NES."" )
7403$ THEN
7404$ DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
7405$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
7406$ ENDIF
97abc6ad
HM
7407$ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
7408$ SET DEFAULT [-]
7409$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
7410$ DELETE/NOLOG/NOCONFIRM UU.DIR;
7411$ ENDIF
7412$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
97abc6ad
HM
7413$ EXIT
7414$!: End of Configure