This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Edit edit edit.
[perl5.git] / configure.com
CommitLineData
7558ebc2 1$ sav_ver = 'F$VERIFY(0)'
97abc6ad
HM
2$! SET VERIFY
3$!
570bb66e 4$! For example, if you unpacked perl into: [USER.PERL-5n...] then you will
e6df7ed1 5$! want to cd into the tree and execute Configure:
97abc6ad 6$!
a3ef2c6f 7$! $ SET DEFAULT [USER.PERL5_xxx]
e6df7ed1 8$! $ @Configure
97abc6ad
HM
9$!
10$! or
11$!
a3ef2c6f 12$! $ SET DEFAULT [USER.PERL5_xxx]
e6df7ed1 13$! $ @Configure "-des"
97abc6ad
HM
14$!
15$! That's it. If you get into a bind trying to build perl on VMS then
429a5e67 16$! definitely read through the README.VMS file.
146174a9 17$! Beyond that send email to vmsperl@perl.org
97abc6ad
HM
18$!
19$! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20$!
97abc6ad 21$! send suggestions to:
a3ef2c6f 22$! Dan Sugalski <dan@sidhe.org>
97abc6ad
HM
23$! Thank you!!!!
24$!
25$! Adapted and converted from Larry Wall & Andy Dougherty's
429a5e67 26$! "Configure generated by metaconfig 3.0 PL60." by Peter Prymmer
146174a9
CB
27$! (a Bourne sh[ell] script for configuring the installation of perl
28$! on non-VMS systems) in the perl5.002|3 epoch (spring/summer 1996)
97abc6ad
HM
29$! with much valuable help from Charles Bailey &
30$! the whole VMSPerl crew.
429a5e67 31$! Extended and messed about with by Dan Sugalski
97abc6ad 32$!
ccc2aad8 33$ sav_ver = F$VERIFY(0)
97abc6ad
HM
34$!
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"
570bb66e 40$ ld = "Link"
97abc6ad
HM
41$ ans = ""
42$ macros = ""
c645ec3f 43$ extra_flags = ""
498336ed 44$ user_c_flags = ""
498336ed
CB
45$ use_ieee_math = "n"
46$ be_case_sensitive = "n"
a3ef2c6f 47$ use_vmsdebug_perl = "n"
f53b4005
CB
48$ use64bitall = "n"
49$ use64bitint = "n"
97abc6ad 50$ C_Compiler_Replace = "CC="
429a5e67
DS
51$ Thread_Live_Dangerously = "MT="
52$ use_two_pot_malloc = "N"
53$ use_pack_malloc = "N"
54$ use_debugmalloc = "N"
570bb66e 55$ ccflags = ""
17e8697d 56$ static_ext = ""
97abc6ad 57$ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
570bb66e
JH
58$ max_allowed_dir_depth = 3 ! e.g. [A.B.PERLxxx] not [A.B.C.PERLxxx]
59$! max_allowed_dir_depth = 2 ! e.g. [A.PERLxxx] not [A.B.PERLxxx]
97abc6ad
HM
60$!
61$ vms_filcnt = F$GETJPI ("","FILCNT")
62$!
63$!: compute my invocation name
64$ me = F$ENVIRONMENT("PROCEDURE")
65$!
66$! Many null statements (begin with colon ':') in the Bourne shell version of
67$! this script serve as comments/placeholders. I have retained some of the ones
68$! that will help you compare this .COM file to the sh version - as well as
69$! leave placeholders for future improvements to this .COM file.
70$! sfn = VMS "skipped for now"
71$!
72$!: Proper PATH separator !sfn
73$!: Proper PATH setting !sfn
74$!: Sanity checks !sfn "Say '@''$me''"
75$!: On HP-UX, large Configure scripts may exercise a bug in /bin/sh !sfn
76$!: Configure runs within the UU subdirectory !->after find MANIFEST
77$! <big long list of default values (mostly null)>
78$!: We must find out about Eunice early !(?)
79$!: list of known cpp symbols, sorted alphabetically !sfn
80$! al = al + "..."
81$!: default library list !sfn
82$! <no hints files in use (yet?)>
83$!: Extra object files, if any, needed on this platform. !sfn
84$!: Possible local include directories to search. !sfn
85$!: Set locincpth to "" in a hint file to defeat local include searches. !sfn
86$!locincpth="/usr/local/include /opt/local/include /usr/gnu/include" !sfn
87$!locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
88$!: no include file wanted by default !sfn
89$!inclwanted='' !sfn
90$!: Possible local library directories to search. !sfn
91$!loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" !sfn
92$!loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" !sfn
93$!: general looking path for locating libraries !sfn
94$!glibpth="/lib/pa1.1 /usr/shlib /usr/lib/large /lib /usr/lib" !sfn
95$!glibpth="$glibpth $xlibpth /lib/large /usr/lib/small /lib/small" !sfn
96$!glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/shlib" !sfn
97$!: Private path used by Configure to find libraries. Its value !sfn
98$!: is prepended to libpth. This variable takes care of special !sfn
99$!: machines, like the mips. Usually, it should be empty. !sfn
100$!plibpth='' !sfn
101$!: full support for void wanted by default !sfn
102$!defvoidused=15 !sfn
103$!: List of libraries we want. !sfn
104$!libswanted='net socket inet nsl nm ndbm gdbm dbm db malloc dl' !sfn
105$!libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt" !sfn
106$!libswanted="$libswanted ucb bsd BSD PW x" !sfn
107$!: We probably want to search /usr/shlib before most other libraries. !sfn
108$!: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. !sfn
109$!glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` !sfn
110$!glibpth="/usr/shlib $glibpth" !sfn
111$!: Do not use vfork unless overridden by a hint file. !sfn
112$!usevfork=false !sfn
113$!: script used to extract .SH files with variable substitutions !sfn
114$!: produce awk script to parse command line options !sfn
115$!sfn (assume no sed awk) see below
116$!: process the command line options
117$!
118$!: set up default values
119$ fastread=""
120$ reuseval="false"
c886fb20 121$ maniskip = "false"
570bb66e 122$ IF F$TYPE(config_sh) .EQS. "" THEN config_sh=""
97abc6ad
HM
123$ alldone=""
124$ error=""
125$ silent=""
126$ extractsh=""
127$ override=""
128$ knowitall=""
570bb66e
JH
129$ Using_Dec_C = "n"
130$ Using_Gnu_C = "n"
131$ using_cxx = "n"
97abc6ad 132$ Dec_C_Version = ""
570bb66e 133$ cxxversion = ""
97abc6ad 134$ use_threads = "F"
498336ed
CB
135$ use_5005_threads = "N"
136$ use_ithreads = "N"
97abc6ad
HM
137$!
138$!: option parsing
08c7cbbb 139$ config_args = ""
97abc6ad
HM
140$ IF (P1 .NES. "")
141$ THEN !one or more switches was thrown
142$ i = 1
143$ bang = 0
144$Param_loop:
08c7cbbb
GS
145$ IF (P'i'.NES."")
146$ THEN
147$ bang = bang + 1
148$ config_args = config_args + F$FAO(" !AS",P'i')
149$ ENDIF
97abc6ad
HM
150$ i = i + 1
151$ IF (i.LT.9) THEN GOTO Param_loop !DCL allows P1..P8
152$!
153$ i = 1
154$Opt_loop:
155$ IF (F$EXTRACT(0,1,P'i') .EQS. "-") THEN P'i' = P'i' - "-"
156$ IF (F$EXTRACT(0,1,P'i') .EQS. "/") THEN P'i' = P'i' - "/"
157$Remove_quotation_mark:
158$ P'i' = P'i' - """"
159$ IF F$LOCATE("""",P'i') .LT. F$LENGTH(P'i') THEN GOTO Remove_quotation_mark
160$ gotopt = "f" !"alse"
161$ gotshortopt = "f" !"alse"
162$ IF (F$EXTRACT(0,1,P'i') .EQS. "d")
163$ THEN
164$ fastread = "yes"
165$ gotopt = "t" !"rue"
166$ P'i' = P'i' - "d"
167$ gotshortopt = "t" !"rue"
168$ ENDIF
169$ IF (F$EXTRACT(0,1,P'i') .EQS. "e")
170$ THEN
171$ alldone = "cont"
172$ gotopt = "t"
173$ P'i' = P'i' - "e"
174$ gotshortopt = "t"
175$ ENDIF
570bb66e 176$ IF (F$EXTRACT(0,1,P'i') .EQS. "f") ! "-f"
97abc6ad
HM
177$ THEN
178$ P'i' = P'i' - "f"
179$ config_sh = P'i'
180$ IF (F$SEARCH(config_sh).NES."")
181$ THEN
8560c20d
CB
182$ test_config_sh = F$FILE_ATTRIBUTES(config_sh,"PRO")
183$ IF (F$LOCATE("R",test_config_sh).NE.F$LENGTH(test_config_sh))
97abc6ad 184$ THEN
570bb66e 185$ config_dflt = "y"
97abc6ad
HM
186$ CONTINUE !at this point check UIC && if test allows...
187$ !to be continued ?
188$ ELSE
189$ echo "''me': cannot read config file ''config_sh'."
190$ error="true"
191$ ENDIF
192$ ELSE
193$ echo "''me': cannot read config file ''config_sh'."
194$ error="true"
195$ ENDIF
196$ gotopt = "t"
197$ ENDIF
570bb66e 198$ IF (F$EXTRACT(0,1,P'i') .EQS. "h") ! "-h"
97abc6ad
HM
199$ THEN
200$ error = "true"
201$ gotopt = "t"
202$ P'i' = P'i' - "h"
203$ gotshortopt = "t"
204$ ENDIF
570bb66e 205$ IF (F$EXTRACT(0,1,P'i') .EQS. "m") ! "-m"
c886fb20
CB
206$ THEN
207$ maniskip = "true"
208$ gotopt = "t"
209$ P'i' = P'i' - "m"
210$ gotshortopt = "t"
211$ ENDIF
570bb66e 212$ IF (F$EXTRACT(0,1,P'i') .EQS. "r") ! "-r"
97abc6ad
HM
213$ THEN
214$ reuseval = "true"
215$ gotopt = "t"
216$ P'i' = P'i' - "r"
217$ gotshortopt = "t"
218$ ENDIF
570bb66e 219$ IF (F$EXTRACT(0,1,P'i') .EQS. "s") ! "-s"
97abc6ad
HM
220$ THEN
221$ silent = "true"
222$ gotopt = "t"
223$ P'i' = P'i' - "s"
224$ gotshortopt = "t"
225$ ENDIF
570bb66e 226$ IF (F$EXTRACT(0,1,P'i') .EQS. "E") ! "-E"
97abc6ad
HM
227$ THEN
228$ alldone = "exit"
229$ gotopt = "t"
230$ ENDIF
570bb66e 231$ IF (F$EXTRACT(0,1,P'i') .EQS. "K") ! "-K"
97abc6ad
HM
232$ THEN
233$ knowitall = "true"
234$ gotopt = "t"
235$ P'i' = P'i' - "K"
236$ gotshortopt = "t"
237$ ENDIF
570bb66e 238$ IF (F$EXTRACT(0,1,P'i') .EQS. "O") ! "-O"
97abc6ad
HM
239$ THEN
240$ override = "true"
241$ gotopt = "t"
242$ P'i' = P'i' - "O"
243$ gotshortopt = "t"
244$ ENDIF
570bb66e 245$ IF (F$EXTRACT(0,1,P'i') .EQS. "S") ! "-S"
97abc6ad 246$ THEN
570bb66e 247$ extractsh = "true" !VMS? Yes with munchconfig
97abc6ad
HM
248$ gotopt = "t"
249$ P'i' = P'i' - "S"
250$ gotshortopt = "t"
251$ ENDIF
570bb66e 252$ IF (F$EXTRACT(0,1,P'i') .EQS. "D") ! "-D"
97abc6ad
HM
253$ THEN
254$ P'i' = P'i' - "D"
97abc6ad
HM
255$ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
256$ THEN
570bb66e 257$ tmp = P'i' + "=""define"""
7558ebc2 258$ 'tmp'
570bb66e 259$ DELETE/SYMBOL tmp
97abc6ad
HM
260$ ELSE
261$ IF (F$LOCATE("=",P'i') .EQ. (F$LENGTH(P'i') - 1))
262$ THEN
263$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
7558ebc2 264$ echo "''me': use ""-Usymbol=val"" not ""-Dsymbol=""."
97abc6ad
HM
265$ echo "''me': ignoring -D",P'i'
266$ ELSE
570bb66e
JH
267$ tmp = F$EXTRACT(0,F$LOCATE("=",P'i'),P'i')
268$ tmp = tmp + "=""" + F$EXTRACT(F$LOCATE("=",P'i')+1,F$LENGTH(P'i'),P'i') + """"
7558ebc2 269$ 'tmp'
570bb66e 270$ DELETE/SYMBOL tmp
97abc6ad
HM
271$ ENDIF
272$ ENDIF
97abc6ad
HM
273$ gotopt = "t"
274$ ENDIF
570bb66e 275$ IF (F$EXTRACT(0,1,P'i') .EQS. "U") ! "-U"
97abc6ad
HM
276$ THEN
277$ P'i' = P'i' - "U"
278$ IF (F$LOCATE("=",P'i') .EQ. F$LENGTH(P'i'))
279$ THEN
570bb66e 280$ tmp = P'i' + "="""""
7558ebc2 281$ 'tmp'
570bb66e 282$ DELETE/SYMBOL tmp
97abc6ad
HM
283$ ELSE
284$ IF (F$LOCATE("=",P'i') .LT. (F$LENGTH(P'i') - 1))
285$ THEN
286$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
7558ebc2 287$ echo "''me': use ""-Dsymbol=val"" not ""-Usymbol=val""."
97abc6ad
HM
288$ echo "''me': ignoring -U",P'i'
289$ ELSE
570bb66e 290$ tmp = P'i' + "=""undef"""
7558ebc2 291$ 'tmp'
570bb66e 292$ DELETE/SYMBOL tmp
97abc6ad
HM
293$ ENDIF
294$ ENDIF
97abc6ad
HM
295$ gotopt = "t"
296$ ENDIF
297$ IF (F$EXTRACT(0,1,P'i') .EQS. "V")
298$ THEN
299$ me = F$PARSE(me,,,"NAME") + F$PARSE(me,,,"TYPE")
300$ echo "''me' generated by an unknown version of EDT."
301$ STOP
570bb66e 302$ EXIT
97abc6ad
HM
303$ ENDIF
304$ IF .NOT.gotopt
305$ THEN
306$ echo "''me': unknown option ",P'i'
307$ error = "true"
308$ ENDIF
309$ IF (F$LENGTH(P'i').GT.0).AND.(gotshortopt) THEN i = i - 1 !clustered switch
310$ i = i + 1
311$ IF (i .LT. (bang + 1)) THEN GOTO Opt_loop
312$!
313$ ENDIF ! (P1 .NES. "")
08c7cbbb 314$ config_args = F$EDIT(config_args,"TRIM")
97abc6ad
HM
315$!
316$ IF (error)
317$ THEN
318$ me = F$PARSE(me,,,"DIRECTORY")+ F$PARSE(me,,,"NAME")
7558ebc2 319$ echo "Usage: @''me' [-dehmr""EKOSV""] [-fconfig.sh] [""-Dsymbol""] [""-Dsymbol=value""]"
c886fb20 320$ echo " [-Usymbol] [-Usymbol=]"
7558ebc2
PP
321$ TYPE SYS$INPUT:
322$ DECK
97abc6ad
HM
323 "-d" : use defaults for all answers.
324 "-e" : go on without questioning past the production of config.sh. *
325 "-f" : specify an alternate default configuration file.
326 "-h" : print this help message and exit (with an error status).
c886fb20 327 "-m" : skip the MANIFEST check to see that all files are present
97abc6ad
HM
328 "-r" : reuse C symbols value if possible (skips costly nm extraction).*
329 "-s" : silent mode, only echoes questions and essential information.
330 -"D" : define symbol to have some value: *
331 -"Dsymbol" symbol gets the value 'define'
332 -"Dsymbol=value" symbol gets the value 'value'
333 -E : stop at the end of questions, after having produced config.sh. *
334 -K : do not use unless you know what you are doing.
335 -O : let -D and -U override definitions from loaded configuration file. *
336 -S : perform variable substitutions on all .SH files (can mix with -f) *
337 -"U" : undefine symbol: *
338 -"Usymbol" symbol gets the value 'undef'
339 -"Usymbol=" symbol gets completely empty
340 -V : print version number and exit (with a zero status).
7558ebc2 341$ EOD
97abc6ad
HM
342$ echo "%Config-I-VMS, lower case switches must be enclosed"
343$ echo "-Config-I-VMS, in double quotation marks, e.g.:"
344$ echo "-Config-I-VMS, @Configure ""-des"""
345$ echo "-Config-I-VMS, * indicates switch may not be fully implemented for VMS."
346$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
347$ STOP
348$ EXIT 3 ! $STATUS = "%X00000003" (informational)
349$ ENDIF
350$!
351$ GOTO Check_silence
352$!
353$Shut_up:
01792a70
CB
354$ IF F$Mode() .eqs. "BATCH"
355$ THEN
356$ STDOUT = F$GetQuI("DISPLAY_JOB","LOG_SPECIFICATION",,"THIS_JOB")
357$ WRITE SYS$OUTPUT "Warning: Executing in batch mode. To avoid file locking conflicts,"
358$ WRITE SYS$OUTPUT "output intended for SYS$OUTPUT will be sent to a new version"
359$ WRITE SYS$OUTPUT STDOUT
360$ ELSE
361$ STDOUT = F$TRNLNM("SYS$OUTPUT")
362$ ENDIF
97abc6ad
HM
363$ DEFINE SYS$OUTPUT "_NLA0:"
364$ echo4 = "write STDOUT "
365$ cat4 = "TYPE/OUTPUT=''STDOUT'"
01792a70 366$ open/write/share=read STDOUT 'STDOUT'
97abc6ad
HM
367$ RETURN
368$!
369$Check_silence:
370$ IF (silent)
371$ THEN
372$ GOSUB Shut_up
373$ ELSE
374$ echo4 = "write SYS$OUTPUT "
375$ cat4 = "TYPE"
376$ ENDIF
377$!
378$!: run the defines and the undefines, if any, but leave the file out there...
379$! Unfortunately Configure.COM in DCL is not yet set up to do this -
380$! maybe someday
381$!
382$!: set package name
383$ package = "perl5"
f53b4005 384$ packageup = F$EDIT((package - "5"),"UPCASE")
97abc6ad
HM
385$!
386$!: Eunice requires " " instead of "", can you believe it
387$ echo ""
388$!: Here we go...
389$ echo "Beginning of configuration questions for ''package'."
390$ echo ""
391$!
392$!: Some greps do not return status, grrr.
393$ contains = "SEARCH"
394$!
395$!: first determine how to suppress newline on echo command !cant DCL is record oriented
396$! echo "Checking ''echo' to see how to suppress newlines..."
397$! echo "giving up..."
398$! echo "The star should be here-->*"
399$!
400$!: Now test for existence of everything in MANIFEST
401$ echo ""
402$ echo4 "First let's make sure your kit is complete. Checking..."
403$ manifestfound = ""
404$ miss_list = ""
a5fddd44 405$! Here I assume we are in the [foo.PERLxxx...] tree
97abc6ad
HM
406$! because the search routine simply does set def [-] if necessary.
407$ file_2_find = "MANIFEST" !I hope this one is not in [foo.PERL5xxx.VMS...]
408$Research_manifest:
409$ manifestfound = F$SEARCH(file_2_find)
410$ IF (manifestfound .EQS. "")
411$ THEN
412$ IF F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY",).NES."[000000]"
413$ THEN
414$ SET DEFAULT [-]
415$ GOTO Research_manifest
416$ ELSE
417$ echo ""
418$ echo "There is no MANIFEST file. I hope your kit is complete !"
419$ miss_list = ""
420$ GOTO Beyond_manifest
421$ ENDIF
422$ ELSE
423$! MANIFEST. has been found and we have set def'ed there -
424$! time to bail out before it's too late.
e6df7ed1 425$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
a3ef2c6f 426$ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
97abc6ad
HM
427$ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".")
428$ THEN
429$ TYPE SYS$INPUT:
7558ebc2 430$ DECK
97abc6ad
HM
431%Config-E-VMS, ERROR:
432 Sorry! It apears as though your perl build sub-directory is already too
433 deep into the VMS file system. Please try moving stuff into a shallower
434 directory (or altering the "max_allowed_dir_depth" parameter).
7558ebc2 435$ EOD
97abc6ad
HM
436$ echo4 "ABORTING..."
437$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
438$ STOP
439$ EXIT !2 !$STATUS = "%X00000002" (error)
440$ ENDIF
e6df7ed1 441$Beyond_depth_check:
97abc6ad
HM
442$!
443$! after finding MANIFEST let's create (but not yet enter) the UU subdirectory
444$!
445$ IF (manifestfound .NES. "")
446$ THEN
447$ IF ( F$SEARCH("UU.DIR").EQS."" )
448$ THEN
449$ CREATE/DIRECTORY [.UU]
450$ ELSE
451$ IF ( F$SEARCH("[.UU]*.*").NES."" ) THEN DELETE/NOLOG [.UU]*.*;*
452$ ENDIF
453$!: Configure runs within the UU subdirectory
454$ SET DEFAULT [.UU]
455$!
456$! a little redundancy never hurt anybody?
457$ file_2_find = "[-]" + file_2_find
458$ manifestfound = F$SEARCH(file_2_find)
459$!
460$ OPEN/WRITE MISSING MISSING.
461$!change to "FALSE" if you wish to skip the manifest search
462$!(which after all is rather slow in DCL :-)
c886fb20 463$ IF (maniskip)
97abc6ad 464$ THEN
c886fb20
CB
465$ echo "Skipping MANIFEST check as requested"
466$ ELSE
467$!
97abc6ad
HM
468$ OPEN/READ CONFIG 'manifestfound'
469$Read_loop_manifest:
470$ READ/END_OF_FILE = Done_manifest CONFIG line
471$! This algorithm turns "foo/bar/baz.c" into "[.foo.bar]baz.c"
472$! pvhp@lns62.lns.cornell.edu 10-JUN-1996 20:31:46
473$! 2-MAR-1998 15:46:11 Improved to turn "foo/bar/baz.c.buz"
474$! into "[.foo.bar]baz.c_buz as happens with vmstar and unzip
475$ line = F$EDIT(line,"TRIM, COMPRESS")
476$ file_2_find = F$EXTRACT(0,F$LOCATE(" ",line),line)
477$ IF F$LOCATE("/",file_2_find) .NE. F$LENGTH(file_2_find)
478$ THEN
479$Re_strip_line_manifest:
480$ loca = F$LOCATE("/",file_2_find)
481$ ante = F$EXTRACT(0,loca,file_2_find)
482$ post = F$EXTRACT(loca,F$LENGTH(file_2_find),file_2_find)
483$ test_this = ante + "." + (post - "/")
484$ IF F$LOCATE("/",test_this) .NE. F$LENGTH(test_this)
485$ THEN
486$ file_2_find = ante + "." + (post - "/")
487$ GOTO Re_strip_line_manifest
488$ ELSE
489$ file_2_find = ante + "]" + (post - "/")
490$ ENDIF
491$ file_2_find = "[-."+file_2_find
492$ ELSE
493$ file_2_find = "[-]" + file_2_find
494$ ENDIF
495$!
496$ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
497$ file_2_find = file_2_find - dirname
498$ dots = 0
499$Dot_loop:
500$ dot_ele = F$ELEMENT(dots,".",file_2_find)
501$ IF dot_ele .EQS. "." THEN GOTO Eo_dot_loop
502$ IF dots .eq. 0
503$ THEN basename = f$extract(0,f$locate(".",file_2_find),file_2_find) + "."
504$ ELSE basename = basename + dot_ele + "_"
505$ ENDIF
506$ dots = dots + 1
507$ GOTO dot_loop
508$Eo_dot_loop:
509$ IF (((f$length(file_2_find)+1) .eq. f$length(basename)) .and. -
510 (f$extract(f$length(basename)-1,1,basename) .eqs. "_")) THEN -
511 basename = f$extract(0,f$length(basename)-1,basename)
512$ file_2_find = dirname + basename
513$!
514$ found = F$SEARCH(file_2_find)
146174a9
CB
515$ IF (found .EQS. "" .AND. dots .GT. 2)
516$ THEN
517$! 17-DEC-1999 Improved to turn "[.foo.bar]baz.c_buz" into
518$! "[.foo.bar]baz_c.buz" to cover unzipped archives and put
519$! "[.foo.bar]baz.c_buz,baz_c.buz" into missing list if neither is found.
520$ basename[f$locate(".",basename),1] := _
521$ dot_ele = F$ELEMENT(dots - 1,"_",basename)
522$ basename = -
523 f$extract(0,f$length(basename)-(f$length(dot_ele)+1),basename) -
524 + "." + dot_ele
525$ found = F$SEARCH(dirname + basename)
526$ file_2_find = file_2_find + "," + basename
527$ ENDIF
97abc6ad
HM
528$ IF (found .EQS. "")
529$ THEN
530$ WRITE MISSING file_2_find
531$ IF ((F$LENGTH(miss_list)+F$LENGTH(file_2_find)).LT.250)
532$ THEN
533$ miss_list = miss_list + "," + file_2_find
534$ ENDIF
535$ ENDIF
536$ GOTO Read_loop_manifest
537$Done_manifest:
538$ CLOSE CONFIG
539$ ENDIF !"TRUE"
540$ CLOSE MISSING
541$ ENDIF ! (manifestfound .NES. "")
542$Beyond_manifest:
543$ IF (miss_list .NES. "")
544$ THEN
545$ echo "Some of the files not found include:"
546$ cat4 MISSING.
547$ ENDIF
548$ IF ((miss_list .NES. "").OR.(manifestfound .EQS. ""))
549$ THEN
550$ TYPE SYS$INPUT:
7558ebc2
PP
551$ DECK
552
97abc6ad
HM
553
554THIS PACKAGE SEEMS TO BE INCOMPLETE.
555
556You have the option of continuing the configuration process, despite the
557distinct possibility that your kit is damaged, by typing 'y'es. If you
558do, don't blame me if something goes wrong. I advise you to type 'n'o
498336ed 559and contact the author (dan@sidhe.org)
97abc6ad 560
7558ebc2 561$ EOD
97abc6ad
HM
562$ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
563$ IF ans
564$ THEN
565$ echo4 "Continuing..."
566$ ELSE
567$ echo4 "ABORTING..."
568$ GOTO Clean_up
569$ ENDIF
570$ ELSE
571$ echo4 "Looks good..."
572$ DELETE/NOLOG MISSING.;
573$ ENDIF ! (miss_list .NES. "")
574$ ENDIF ! (manifestfound .EQS. "") ELSE
575$!
576$! after finding MANIFEST (see above)
577$!: Configure runs within the UU subdirectory
578$!
579$!: compute the number of columns on the terminal for proper question formatting
580$! (sfn, will assume 80-ish)
581$!
582$!: set up the echo used in my read !sfn
583$!: now set up to do reads with possible shell escape and default assignment !sfn
584$ GOTO Beyond_myread
585$!
586$myread:
587$ ans = ""
588$ If (fastread)
589$ Then
590$ echo4 "''rp'"
591$ Else
a5fddd44
PP
592$ If (.NOT. silent) Then echo ""
593$ READ SYS$COMMAND/PROMPT="''rp'" ans
594$ IF (ans .EQS. "&-d")
595$ THEN
596$ echo4 "(OK, I will run with -d after this question.)"
597$ IF (.NOT. silent) THEN echo ""
97abc6ad 598$ READ SYS$COMMAND/PROMPT="''rp'" ans
a5fddd44
PP
599$ fastread := yes
600$ ENDIF
601$ IF (ans .EQS. "&-s")
602$ THEN
603$ echo4 "(OK, I will run with -s after this question.)"
97abc6ad
HM
604$ echo ""
605$ READ SYS$COMMAND/PROMPT="''rp'" ans
a5fddd44
PP
606$ silent := true
607$ GOSUB Shut_up
608$ ENDIF
97abc6ad
HM
609$ Endif
610$ RETURN
611$!
612$Beyond_myread:
613$!
614$!: create .config dir to save info across Configure sessions
615$ IF ( F$SEARCH("[-]CONFIG.DIR").EQS."" )
616$ THEN
617$ CREATE/DIRECTORY [-.CONFIG]
618$ OPEN/WRITE CONFIG [-.CONFIG]README.
619$ WRITE CONFIG -
620 "This directory created by Configure to save information that should"
621$ WRITE CONFIG -
622 "persist across sessions."
623$ WRITE CONFIG ""
624$ WRITE CONFIG -
625 "You may safely delete it if you wish."
626$ CLOSE CONFIG
627$ ENDIF
628$!
56aeb0ae
PP
629$ IF F$TYPE(usedevel) .EQS. "" THEN usedevel := n
630$ patchlevel_h = F$SEARCH("[-]patchlevel.h")
631$ IF (patchlevel_h.NES."")
632$ THEN
7558ebc2 633$ SEARCH 'patchlevel_h' "define","PERL_VERSION","epoch"/match=and/out=[]ver.out
59a27e12 634$ IF .NOT. usedevel .AND. usedevel .NES. "define"
56aeb0ae
PP
635$ THEN
636$ OPEN/READ CONFIG []ver.out
637$ READ CONFIG line
638$ CLOSE CONFIG
639$ tmp = F$EDIT(line,"TRIM,COMPRESS")
640$ xpatchlevel = F$INTEGER(F$ELEMENT(2," ",tmp))
641$ line = xpatchlevel / 2
642$ tmp = xpatchlevel - ( line * 2 )
643$ IF tmp .NE. 0
644$ THEN
645$ echo4 "patchlevel is " + F$STRING(xpatchlevel)
646$ cat4 SYS$INPUT:
7558ebc2 647$ DECK
56aeb0ae
PP
648*** WHOA THERE!!! ***
649
650 This is an UNSTABLE DEVELOPMENT release.
651 (The patchlevel, is odd--as opposed to even,
652 and that signifies a development release. If you want a
653 maintenance release, you want an even-numbered release.)
654
655 Do ***NOT*** install this into production use.
656 Data corruption and crashes are possible.
657
658 It is most seriously suggested that you do not continue any further
659 unless you want to help in developing and debugging Perl.
660
7558ebc2 661$ EOD
56aeb0ae
PP
662$ dflt="n"
663$ rp="Do you really want to continue? [''dflt'] "
664$ IF (fastread) THEN fastread := FALSE
665$ GOSUB myread
666$ IF ans .EQS. "" THEN ans = dflt
667$ IF ans
668$ THEN
669$ echo4 "Okay, continuing."
670$ ELSE
671$ echo4 "Okay, bye."
672$ DELETE/NOLOG/NOCONFIRM []ver.out;
673$ GOTO Clean_up
56aeb0ae
PP
674$ ENDIF
675$ ENDIF
676$ DELETE/SYMBOL line
677$ DELETE/SYMBOL tmp
678$ ENDIF
679$ DELETE/NOLOG/NOCONFIRM []ver.out;
680$ ENDIF
97abc6ad
HM
681$!: general instructions
682$ needman = "true"
683$ firsttime = "true"
684$ user = F$EDIT(F$GETJPI("","USERNAME"),"TRIM,COLLAPSE")
685$ IF .NOT.(F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
686$ THEN
687$ messages = F$ENVIRONMENT("MESSAGE")
a3ef2c6f 688$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
97abc6ad
HM
689$ contains /NOOUTPUT [-.CONFIG]INSTRUCT. 'user'
690$ IF .NOT.($status.EQ.%X08D78053)
691$ THEN
692$ firsttime=""
693$ dflt = "n"
694$ rp = "Would you like to see the instructions? [''dflt'] "
695$ GOSUB myread
696$ if .NOT.ans THEN needman=""
697$ ENDIF
a3ef2c6f 698$ SET MESSAGE 'messages'
97abc6ad
HM
699$ ENDIF
700$ if (fastread.AND.silent.AND.(alldone.eqs."cont")) THEN needman=""
701$!
702$ IF (needman)
703$ THEN
704$ TYPE SYS$INPUT:
7558ebc2 705$ DECK
97abc6ad
HM
706
707This installation shell script will examine your system and ask you questions
708to determine how the perl5 package should be installed. If you get
709stuck on a question, you may use a ^C or ^Y shell escape to STOP this
710process, edit something, then restart this process as you just did.
711Many of the questions will have default answers in square
712brackets; typing carriage return will give you the default.
713
7558ebc2 714$ EOD
97abc6ad
HM
715$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
716$ TYPE SYS$INPUT:
7558ebc2 717$ DECK
97abc6ad 718
a3ef2c6f 719In a hurry? You may run '@Configure "-d"'. This will bypass nearly all
97abc6ad 720the questions and use the computed defaults (or the previous answers provided
a3ef2c6f 721there was already a config.sh file). Type '@Configure "-h"' for a list of
97abc6ad
HM
722options.
723
7558ebc2 724$ EOD
97abc6ad
HM
725$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
726$ TYPE SYS$INPUT:
7558ebc2 727$ DECK
97abc6ad
HM
728
729Much effort has been expended to ensure that this shell script will
730run on any VMS system. If despite that it blows up on yours, your
731best bet is to edit Configure.com and @ it again. Whatever problems
498336ed 732you have with Configure.com, let me (dan@sidhe.org) know how I blew
97abc6ad
HM
733it.
734
7558ebc2 735$ EOD
97abc6ad
HM
736$!This installation script affects things in two ways:
737$!
738$!1) it may do direct variable substitutions on some of the files included
739$! in this kit.
740$!2) it builds a config.h file for inclusion in C programs. You may edit
741$! any of these files as the need arises after running this script.
742$!
743$!If you make a mistake on a question, there is no easy way to back up to it
744$!currently.
745$!
746$ READ SYS$COMMAND/PROMPT="Type carriage return to continue " ans
747$ IF (F$SEARCH("[-.CONFIG]INSTRUCT.").EQS."")
748$ THEN
749$ OPEN/WRITE CONFIG [-.CONFIG]INSTRUCT.
750$ WRITE CONFIG user
751$ CLOSE CONFIG
752$ ENDIF
753$ ENDIF !(needman .EQS. "true")
754$!
755$!: see if sh knows # comments !sfn
756$ sharpbang = "$ "
757$!: figure out how to guarantee sh startup !sfn
758$!: find out where common programs are !sfn
759$!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
5869b1f1 760$!trylist="byacc/cpp/csh/date/egrep/less/line/more/nroff/perl/pg/sendmail/test/uname"
97abc6ad
HM
761$! echo "I don't know where '$file' is, and my life depends on it."
762$! echo "Go find a public domain implementation or fix your PATH setting!"
763$! echo ""
764$! echo "Don't worry if any of the following aren't found..."
765$!: determine whether symbolic links are supported !sfn
766$!: see whether [:lower:] and [:upper:] are supported character classes !sfn
767$!: set up the translation script tr, must be called with ./tr of course !sfn
768$!
769$!: Try to determine whether config.sh was made on this system
770$!: Get old answers from old config file if Configure was run on the
771$!: same system, otherwise use the hints.
772$ config_sh_es = "''config_sh'/[-]config.sh/[-.vms]config.vms/"
773$ i = 0
774$ max = 3
775$Config_sh_look:
776$ config_sh = F$ELEMENT(i,"/",config_sh_es)
777$ i = i + 1
778$ IF (config_sh.NES."/").AND.(config_sh.NES."")
779$ THEN
780$ configshfound = F$SEARCH(config_sh)
781$ IF (configshfound.NES."") THEN GOTO Config_sh_found
782$ ENDIF
783$ IF (i.LT.max) THEN GOTO Config_sh_look
570bb66e 784$! genconfig.pl has "osname='VMS'"
56aeb0ae 785$ osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
570bb66e
JH
786$ IF (configshfound.EQS."")
787$ THEN
788$ config_sh = "[-]config.sh" ! the fallback default
789$ GOTO Beyond_config_sh
790$ ENDIF
97abc6ad 791$Config_sh_found:
56aeb0ae 792$ IF F$TYPE(osname) .EQS. "" THEN osname = F$EDIT(F$GETSYI("NODE_SWTYPE"),"COLLAPSE")
570bb66e
JH
793$ IF F$TYPE(config_dflt) .EQS. "" THEN config_dflt = "n"
794$ rp = "Shall I @ ''config_sh' for default answers? [''config_dflt'] "
795$ GOSUB myread
56aeb0ae 796$ IF ans .EQS. "" THEN ans = config_dflt
570bb66e
JH
797$ IF ans
798$ THEN
799$ echo ""
800$ echo "Fetching default answers from ''config_sh'..."
801$!
802$! This @ is why config_sh must employ DCL syntax. Note that for
803$! symbols to be returned to this procedure they must be global.
804$! Which implies that assignments must be of the :== or == variety.
805$! Note further that the [-]config.sh file written by this procedure
806$! employs shell syntax. In order to convert shell syntax to DCL
807$! you might try:
808$!
809$! perl -ni -e "s/^#/!#/;s/='/==""/;s/'$/""/;print ""\$ $_"";" config.sh
810$!
811$! However, watch out for sig_nam, sig_nam_init, sig_num, startperl
812$! and any of the lower case double quoted variables such as the *format
813$! variables in such a config."sh".
814$!
7558ebc2 815$ @'config_sh'
570bb66e
JH
816$!
817$ ENDIF
818$ DELETE/SYMBOL config_dflt
819$!
97abc6ad
HM
820$!we actually do not have "hints/" for VMS
821$! TYPE SYS$INPUT:
7558ebc2 822$! DECK
97abc6ad
HM
823$!
824$!First time through, eh? I have some defaults handy for the following systems:
825$!
7558ebc2 826$! EOD
97abc6ad
HM
827$! echo " ","VMS_VAX"
828$! echo " ","VMS_AXP"
829$! : Now look for a hint file osname_osvers, unless one has been
830$! : specified already.
831$! TYPE SYS$INPUT:
832$!
833$!You may give one or more space-separated answers, or "none" if appropriate.
834$!If your OS version has no hints, DO NOT give a wrong version -- say "none".
835$!
836$! READ SYS$COMMAND/PROMPT="Which of these apply, if any? " ans
837$!
838$Beyond_config_sh:
839$!
840$!: Restore computed paths !sfn
841$!
97abc6ad
HM
842$! %Config-I-VMS, a necessary error trap (could be PC running VCL)
843$!
844$ IF (osname .NES. "VMS")
845$ THEN
846$ echo4 "Hmm.. I wonder what ''osname' is (?)"
847$ TYPE SYS$INPUT:
7558ebc2 848$ DECK
97abc6ad
HM
849
850%Config-E-VMS, ERROR:
851
852 Err, you do not appear to be running VMS!
146174a9 853 This procedure is intended to Configure the building of Perl for VMS.
97abc6ad 854
7558ebc2 855$ EOD
97abc6ad
HM
856$ READ SYS$COMMAND/PROMPT="Continue anyway? [n] " ans
857$ IF ans
858$ THEN
859$ echo4 "Continuing..."
860$ ELSE
861$ echo4 "ABORTING..."
862$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
863$ STOP
864$ EXIT 2 !$STATUS = "%X00000002" (error)
865$ ENDIF
866$ ELSE !we are on VMS huzzah!
867$ IF .NOT.silent
868$ THEN TYPE SYS$INPUT:
7558ebc2 869$ DECK
97abc6ad
HM
870
871Configure uses the operating system name and version to set some defaults.
872The default value is probably right if the name rings a bell. Otherwise,
873since spelling matters for me, either accept the default or answer "none"
874to leave it blank.
7558ebc2 875$ EOD
97abc6ad
HM
876$ ENDIF
877$ rp = "Operating system name? [''osname'] "
878$ GOSUB myread
879$ IF ans.nes.""
880$ THEN
881$ IF (ans.NES.osname) !.AND.knowitall
882$ THEN
883$ echo4 "I'll go with ''osname' anyway..."
884$ ENDIF
885$ ENDIF
886$ ENDIF !(osname .NES./.EQS. "VMS")
887$!
888$!: who configured the system
97abc6ad 889$ cf_by = F$EDIT(user,"LOWERCASE")
08c7cbbb 890$ osvers = F$EDIT(F$GETSYI("VERSION"),"TRIM")
97abc6ad
HM
891$!
892$! Peter Prymmer has seen:
893$! "SYS$TIMEZONE_DIFFERENTIAL" = "-46800" (sic)
894$! "SYS$TIME_ZONE" = "EDT"
895$!
896$! Charles Lane recommended:
897$! "SYS$TIMEZONE_DIFFERENTIAL" = "-14400"
898$! "NEWS_TIMEZONE" = "-0500"
899$! "ST_TIMEZONE" = "EDT"
900$! "JAN_TIME_ZONE" = "EST "
901$! "MULTINET_TIMEZONE" = "EST"
902$! "DAYLIGHT_SAVINGS" = "1"
903$!
904$! Charles Bailey recommends (in ANU NEWS Doc Jan 1995):
905$! "PMDF_Timezone"
906$! "Multinet_Timezone"
907$! "TCPware_Timezone"
908$! "WIN$Time_Zone"
909$!
910$! This snippet o' DCL returns a string in default Unix `date` format,
911$! and it will prompt to set SYS$TIMEZONE_DIFFERENTIAL.
97abc6ad
HM
912$!
913$ MIN_TZO = -840 !units are minutes here
914$ MAX_TZO = 840
915$!
916$ wkday = F$EXTRACT(0,3,F$CVTIME(,,"WEEKDAY"))
917$ monn = F$CVTIME(,,"MONTH")
918$ mday = F$EXTRACT(8,2,F$CVTIME(,,"DATE"))
919$ hour = F$CVTIME(,,"HOUR")
920$ min = F$CVTIME(,,"MINUTE")
921$ sec = F$CVTIME(,,"SECOND")
922$ year = F$CVTIME(,,"YEAR")
923$!
924$ months = "/Jan/Feb/Mar/Apr/May/Jun/Jul/Aug/Sep/Oct/Nov/Dec/"
925$ i = 0
926$Mon_loop:
927$ i = i + 1
928$ mon = F$ELEMENT(i,"/",months)
929$ IF i.LT.monn THEN GOTO Mon_loop
930$!
931$ tzneedset = "t"
932$ systz = F$TRNLNM("SYS$TIMEZONE_DIFFERENTIAL")
933$ IF systz.NES.""
934$ THEN
935$ tzhour = F$INTEGER(systz)/3600
936$ tzmins = F$INTEGER(systz)/60
937$ tzminrem = tzmins - tzhour*60
938$ IF tzminrem.lt.0 THEN tzminrem = -1*tzminrem !keeps !2ZL happy
939$ IF tzhour.ge.0
940$ THEN signothetime = "+"
941$ IF tzhour.EQ.0.AND.tzminrem.EQ.0
942$ THEN direction = "on GMT/"
943$ ELSE direction = "east of "
944$ ENDIF
945$ ELSE signothetime = "-"
946$ tzhour = -1*tzhour !keeps !UL happy
947$ direction = "west of "
948$ ENDIF
949$ echo ""
97abc6ad
HM
950$ echo "According to the setting of your ""SYS$TIMEZONE_DIFFERENTIAL"" (= ''systz')"
951$ IF tzminrem.ne.0
952$ THEN
953$ tzspan = "''tzhour' hours & ''tzminrem' minutes"
954$ ELSE
955$ tzspan = "''tzhour' hours"
956$ ENDIF
957$ dflt = "y"
958$ echo "Your system is ''tzspan' ''direction'UTC in England."
570bb66e 959$ rp = "(''systz') Is this UTC Time Zone Offset correct? [''dflt'] "
97abc6ad
HM
960$ GOSUB myread
961$ IF ans.OR.(ans.EQS."")
962$ THEN
963$ tzneedset = "f"
964$ tzd = systz
965$ GOTO Beyond_TimeZone
966$ ENDIF
967$ ELSE
968$ echo ""
97abc6ad
HM
969$ echo4 """SYS$TIMEZONE_DIFFERENTIAL"" does not appear to be DEFINEd on your system"
970$ ENDIF
971$!
972$TZSet:
973$ echo ""
974$ echo "Please tell me in hh:mm form what time offset from GMT/UTC in England"
146174a9 975$ echo "you are. As an example Eastern (US) Standard Time is -5:00 offset, but"
97abc6ad
HM
976$ echo "Eastern Daylight Time (summer) is -4:00 offset."
977$ dflt = "0:00"
978$ rp = "Enter the Time Zone offset: [''dflt'] "
979$ GOSUB myread
980$ ans = F$Edit(ans,"collapse,trim,uncomment,upcase")
981$ IF ans.EQS."" THEN ans = dflt
982$ tzhour = F$ELEMENT(0,":","''ans'") !first
983$ IF tzhour.EQS."" THEN tzhour = 0
984$ tzhour = F$INTEGER(tzhour)
985$ tzminrem = F$ELEMENT(1,":","''ans'") !second
986$ IF tzminrem.NES.""
987$ THEN
988$ tzminrem = F$INTEGER(tzminrem)
989$ IF F$EXTRACT(0,1,"''ans'") .EQS. "-" THEN tzminrem = tzminrem * -1
990$ ELSE
991$ tzminrem = 0
992$ ENDIF
993$ tzmins = tzhour*60 + tzminrem
994$ tzd = F$STRING(tzmins*60)
995$ IF tzhour .GE. 0
996$ THEN
997$ signothetime = "+"
998$ ELSE
999$ tzhour = -1*tzhour !keeps !UL happy
1000$ signothetime = "-"
1001$ ENDIF
1002$ IF (tzmins.GT.MAX_TZO).OR.(tzmins.LT.MIN_TZO)
1003$ THEN
1004$ echo ""
1005$ echo "%Config-W-VMS-TIMERANGE, Response must be in the range -14:00 to 14:00."
1006$ goto TZSet
1007$ ENDIF
1008$!
1009$Beyond_TimeZone:
1010$ tz = f$fao("UTC!AS!UL:!2ZL",signothetime,tzhour,tzminrem)
1011$ cf_time = "''wkday' ''mon' ''mday' ''hour':''min':''sec' ''tz' ''year'"
1012$!
1013$!: determine the architecture name
1014$! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
570bb66e
JH
1015$! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME")
1016$! but does have F$GETSYI("HW_MODEL").
97abc6ad
HM
1017$!
1018$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
1019$ THEN
1020$ archname = "VMS_VAX"
146174a9 1021$ otherarch = "an Alpha"
08c7cbbb
GS
1022$ alignbytes="8"
1023$ arch_type = "ARCH-TYPE=__VAX__"
97abc6ad
HM
1024$ ELSE
1025$ archname = "VMS_AXP"
146174a9 1026$ otherarch = "a VAX"
08c7cbbb
GS
1027$ alignbytes="8"
1028$ arch_type = "ARCH-TYPE=__AXP__"
97abc6ad
HM
1029$ ENDIF
1030$ rp = "What is your architecture name? [''archname'] "
1031$ GOSUB myread
1032$ IF ans.NES.""
1033$ THEN
1034$ ans = F$EDIT(ans,"COLLAPSE, UPCASE")
1035$ IF (ans.NES.archname) !.AND.knowitall
1036$ THEN
1037$ echo4 "I'll go with ''archname' anyway..."
1038$ ENDIF
1039$ ENDIF
146174a9 1040$ dflt = "n"
570bb66e
JH
1041$ vms_prefix = "perl_root"
1042$ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
1043$ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''dflt'] "
146174a9
CB
1044$ GOSUB myread
1045$ if ans.NES.""
97abc6ad 1046$ THEN
146174a9
CB
1047$ ans = F$EXTRACT(0,1,F$EDIT(ans,"COLLAPSE, UPCASE"))
1048$ ENDIF
1049$ IF (ans.NES."Y")
1050$ THEN
1051$ sharedperl = "N"
1052$ ELSE
1053$ sharedperl = "Y"
1054$ IF (archname.EQS."VMS_AXP")
97abc6ad 1055$ THEN
97abc6ad
HM
1056$ macros = macros + """AXE=1"","
1057$ ENDIF
97abc6ad
HM
1058$ ENDIF
1059$!
1060$!: is AFS running? !sfn
1061$!: decide how portable to be. Allow command line overrides. !sfn
1062$!: set up shell script to do ~ expansion !sfn
1063$!: expand filename !sfn
1064$!: now set up to get a file name !sfn
1065$!
570bb66e
JH
1066$ IF F$TYPE(prefix) .EQS. ""
1067$ THEN
1068$ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
1069$ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - ".;"
1070$ prefixbase = prefix - "]"
1071$ prefix = prefixbase + ".]"
1072$ ENDIF
1073$ src = prefix
f53b4005
CB
1074$!: determine root of directory hierarchy where package will be installed.
1075$ dflt = prefix
1076$ IF .NOT.silent
1077$ THEN
1078$ echo ""
1079$ echo "By default, ''package' will be installed in ''dflt', pod"
570bb66e 1080$ echo "pages under ''prefixbase'.LIB.POD], etc..., i.e. with ''dflt' as prefix for"
f53b4005 1081$ echo "all installation directories."
570bb66e 1082$ echo "On ''osname' the prefix is used to DEFINE the ''vms_prefixup' prior to installation"
f53b4005
CB
1083$ echo "as well as during subsequent use of ''package' via ''packageup'_SETUP.COM."
1084$ ENDIF
570bb66e 1085$ rp = "Installation prefix to use (for ''vms_prefixup')? [ ''dflt' ] "
f53b4005
CB
1086$ GOSUB myread
1087$ IF ans.NES.""
1088$ THEN
1089$ prefix = ans
1090$ IF F$LOCATE(".]",ans) .EQ. F$LENGTH(ans) THEN prefix = prefix - "]" + ".]"
1091$ ELSE
1092$ prefix = dflt
1093$ ENDIF
570bb66e 1094$ perl_root = prefix
f53b4005
CB
1095$!
1096$! Check here for pre-existing PERL_ROOT.
1097$! -> ask if removal desired.
1098$! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
1099$! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
1100$!
97abc6ad
HM
1101$ vms_skip_install = "true"
1102$ dflt = "y"
1103$! echo ""
570bb66e 1104$ rp = "Skip the remaining """"where install"""" questions? [''dflt'] "
97abc6ad
HM
1105$ GOSUB myread
1106$ IF (.NOT.ans).AND.(ans.NES."") THEN vms_skip_install = "false"
97abc6ad
HM
1107$ IF (.NOT.vms_skip_install)
1108$ THEN
97abc6ad
HM
1109$!
1110$!: set the prefixit variable, to compute a suitable default value
1111$!
1112$!: determine where private library files go
1113$!: Usual default is /usr/local/lib/perl5. Also allow things like
1114$!: /opt/perl/lib, since /opt/perl/lib/perl5 would be redundant.
1115$ IF .NOT.silent
7558ebc2
PP
1116$ THEN
1117$ TYPE SYS$INPUT:
1118$ DECK
97abc6ad
HM
1119
1120There are some auxiliary files for perl5 that need to be put into a
1121private library directory that is accessible by everyone.
7558ebc2 1122$ EOD
97abc6ad 1123$ ENDIF
570bb66e
JH
1124$ IF F$TYPE(privlib) .NES. ""
1125$ THEN dflt = privlib
1126$ ELSE dflt = "''vms_prefix':[lib]"
1127$ ENDIF
97abc6ad
HM
1128$ rp = "Pathname where the private library files will reside? "
1129$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1130$ GOSUB myread
1131$ IF ans.NES.""
1132$ THEN privlib = ans
1133$ ELSE privlib = dflt
1134$ ENDIF
1135$!
f53b4005 1136$ ENDIF !%Config-I-VMS, skip remaining "where install" questions
97abc6ad 1137$!
86fced14
CB
1138$ perl_symbol = "true"
1139$ perl_verb = ""
1140$ dflt = "y"
1141$ IF .NOT.silent
1142$ THEN
1143$ echo ""
570bb66e
JH
1144$ echo "You may choose to write ''packageup'_SETUP.COM to assign a foreign"
1145$ echo "symbol to invoke ''package', which is the usual method."
1146$ echO "If you do not do so then you would need a DCL command verb at the"
1147$ echo "process or the system wide level."
86fced14 1148$ ENDIF
570bb66e 1149$ rp = "Invoke perl as a global symbol foreign command? [''dflt'] "
86fced14
CB
1150$ GOSUB myread
1151$ IF (.NOT.ans).AND.(ans.NES."") THEN perl_symbol = "false"
1152$!
1153$ IF (.NOT.perl_symbol)
1154$ THEN
1155$ dflt = "y"
1156$ IF .NOT.silent
1157$ THEN
1158$ echo ""
570bb66e
JH
1159$ echo "Since you won't be using a symbol you must choose to put the ''packageup'"
1160$ echo "verb in a per-process table or in the system wide DCLTABLES (which"
1161$ echo "would require write privilege)."
86fced14 1162$ ENDIF
570bb66e 1163$ rp = "Invoke perl as a per process command verb? [ ''dflt' ] "
86fced14
CB
1164$ GOSUB myread
1165$ IF (.NOT.ans).AND.(ans.NES."")
1166$ THEN perl_verb = "DCLTABLES"
1167$ ELSE perl_verb = "PROCESS"
1168$ ENDIF
1169$ ENDIF ! (.NOT.perl_symbol)
1170$!
97abc6ad 1171$!: set the base revision
08c7cbbb
GS
1172$ baserev="5.0"
1173$ revision = baserev - ".0"
97abc6ad
HM
1174$!: get the patchlevel
1175$ echo ""
570bb66e 1176$ echo4 "Getting the current patchlevel..."
97abc6ad
HM
1177$ patchlevel_h = F$SEARCH("[-]patchlevel.h")
1178$ IF (patchlevel_h.NES."")
1179$ THEN
1180$ got_patch = "false"
1181$ got_sub = "false"
08c7cbbb
GS
1182$ got_api_revision = "false"
1183$ got_api_version = "false"
1184$ got_api_subversion = "false"
97abc6ad
HM
1185$ OPEN/READONLY CONFIG 'patchlevel_h'
1186$Patchlevel_h_loop:
570bb66e 1187$ READ/END_Of_File=Close_patch/ERROR=Close_patch CONFIG line
cceca5ed 1188$ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch))
97abc6ad
HM
1189$ THEN
1190$ line = F$EDIT(line,"COMPRESS, TRIM")
cc391245 1191$ patchlevel = F$ELEMENT(2," ",line)
97abc6ad
HM
1192$ got_patch = "true"
1193$ ENDIF
cceca5ed 1194$ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub))
97abc6ad
HM
1195$ THEN
1196$ line = F$EDIT(line,"COMPRESS, TRIM")
cc391245 1197$ subversion = F$ELEMENT(2," ",line)
97abc6ad
HM
1198$ got_sub = "true"
1199$ ENDIF
08c7cbbb
GS
1200$ IF ((F$LOCATE("#define PERL_API_REVISION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_revision))
1201$ THEN
1202$ line = F$EDIT(line,"COMPRESS, TRIM")
1203$ api_revision = F$ELEMENT(2," ",line)
1204$ got_api_revision = "true"
1205$ ENDIF
1206$ IF ((F$LOCATE("#define PERL_API_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_version))
1207$ THEN
1208$ line = F$EDIT(line,"COMPRESS, TRIM")
1209$ api_version = F$ELEMENT(2," ",line)
1210$ got_api_version = "true"
1211$ ENDIF
1212$ IF ((F$LOCATE("#define PERL_API_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_api_subversion))
1213$ THEN
1214$ line = F$EDIT(line,"COMPRESS, TRIM")
1215$ api_subversion = F$ELEMENT(2," ",line)
1216$ got_api_subversion = "true"
1217$ ENDIF
97abc6ad
HM
1218$ IF (.NOT.got_patch).OR.(.NOT.got_sub) THEN GOTO Patchlevel_h_loop
1219$Close_patch:
1220$ CLOSE CONFIG
570bb66e
JH
1221$ ELSE
1222$ patchlevel="0"
1223$ subversion="0"
97abc6ad 1224$ ENDIF
08c7cbbb 1225$ IF (F$STRING(subversion) .NES. "0")
97abc6ad 1226$ THEN
08c7cbbb
GS
1227$ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel' subversion ''subversion'.)"
1228$ ELSE
1229$ echo "(You have ''package' revision ''revision' patchlevel ''patchlevel'.)"
97abc6ad
HM
1230$ ENDIF
1231$!
08c7cbbb 1232$ version = revision + "_" + patchlevel + "_" + subversion
97abc6ad
HM
1233$!
1234$ IF (.NOT.vms_skip_install)
1235$ THEN
97abc6ad
HM
1236$!: set the prefixup variable, to restore leading tilde escape !sfn
1237$!
1238$!: determine where public architecture dependent libraries go
1239$ IF (.NOT.silent)
1240$ THEN
1241$ echo ""
1242$ echo "''package' contains architecture-dependent library files. If you are"
1243$ ENDIF
1244$ IF (.NOT.silent)
7558ebc2
PP
1245$ THEN
1246$ TYPE SYS$INPUT:
1247$ DECK
97abc6ad
HM
1248sharing libraries in a heterogeneous environment, you might store
1249these files in a separate location. Otherwise, you can just include
1250them with the rest of the public library files.
7558ebc2 1251$ EOD
97abc6ad 1252$ ENDIF
570bb66e
JH
1253$ IF F$TYPE(archlib) .NES. ""
1254$ THEN dflt = archlib
1255$ ELSE dflt = privlib - "]" + "." + archname + "." + version + "]"
1256$ ENDIF
97abc6ad
HM
1257$ rp = "Where do you want to put the public architecture-dependent libraries? "
1258$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1259$ GOSUB myread
1260$ IF ans.NES.""
1261$ THEN archlib = ans
1262$ ELSE archlib = dflt
1263$ ENDIF
1264$!
97abc6ad 1265$ ENDIF !%Config-I-VMS, skip "where install" questions
570bb66e 1266$!
97abc6ad 1267$! This quotation from Configure has to be included on VMS:
570bb66e 1268$!
97abc6ad 1269$ TYPE SYS$INPUT:
7558ebc2 1270$ DECK
97abc6ad
HM
1271
1272There is, however, a strange, musty smell in the air that reminds me of
1273something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
7558ebc2 1274$ EOD
97abc6ad
HM
1275$ IF (.NOT.vms_skip_install)
1276$ THEN
1277$!: it so happens the Eunice I know will not run shell scripts in Unix format
1278$!
1279$!: see if setuid scripts can be secure !sfn
1280$!: now see if they want to do setuid emulation !sfn
1281$!
1282$!: determine where site specific libraries go.
1283$ IF .NOT.silent
7558ebc2
PP
1284$ THEN
1285$ TYPE SYS$INPUT:
1286$ DECK
97abc6ad
HM
1287
1288The installation process will also create a directory for
1289site-specific extensions and modules. Some users find it convenient
1290to place all local files in this directory rather than in the main
1291distribution directory.
7558ebc2 1292$ EOD
97abc6ad 1293$ ENDIF
570bb66e
JH
1294$ IF F$TYPE(sitelib) .NES. ""
1295$ THEN dflt = sitelib
1296$ ELSE dflt = privlib - "]" + ".SITE_PERL]"
1297$ ENDIF
97abc6ad
HM
1298$ rp = "Pathname for the site-specific library files? "
1299$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1300$ GOSUB myread
1301$ IF ans.NES.""
1302$ THEN sitelib = ans
1303$ ELSE sitelib = dflt
1304$ ENDIF
1305$!
1306$!: determine where site specific architecture-dependent libraries go.
1307$ IF .NOT.silent
1308$ THEN TYPE SYS$INPUT:
7558ebc2 1309$ DECK
97abc6ad
HM
1310
1311The installation process will also create a directory for
1312architecture-dependent site-specific extensions and modules.
7558ebc2 1313$ EOD
97abc6ad 1314$ ENDIF
570bb66e
JH
1315$ IF F$TYPE(sitearch) .NES. ""
1316$ THEN dflt = sitearch
1317$ ELSE dflt = sitelib - "]" + "." + archname + "]"
1318$ ENDIF
97abc6ad
HM
1319$ rp = "Pathname for the site-specific architecture-dependent library files? "
1320$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1321$ GOSUB myread
1322$ IF ans.NES.""
1323$ THEN sitearch = ans
1324$ ELSE sitearch = dflt
1325$ ENDIF
1326$!
1327$!: determine where old public architecture dependent libraries might be
1328$!
1329$!: determine where public executables go
570bb66e
JH
1330$ IF F$TYPE(bin) .NES. ""
1331$ THEN dflt = bin
1332$! ELSE dflt = prefix - ".]" + ".BIN]"
1333$ ELSE dflt = "/''vms_prefix'/000000"
1334$ ENDIF
97abc6ad
HM
1335$ rp = "Pathname where the public executables will reside? "
1336$ rp = F$FAO("!AS!/!AS",rp,"[ ''dflt' ] ")
1337$ GOSUB myread
1338$ IF ans.NES.""
1339$ THEN bin = ans
1340$ ELSE bin = dflt
1341$ ENDIF
1342$!
1343$!: determine where manual pages are on this system
1344$!: What suffix to use on installed man pages
1345$!: see if we can have long filenames
1346$!: determine where library module manual pages go
1347$!: What suffix to use on installed man pages
1348$!: see what memory models we can support
1349$!
570bb66e
JH
1350$ ELSE ! skipping "where install" questions, we must set some symbols
1351$ IF F$TYPE(archlib).EQS."" THEN -
1352 archlib="''vms_prefix':[lib.''archname'.''version']"
1353$ IF F$TYPE(bin) .EQS. "" THEN -
1354 bin="/''vms_prefix'/000000"
1355$ IF F$TYPE(privlib) .EQS. "" THEN -
1356 privlib ="''vms_prefix':[lib]"
1357$ IF F$TYPE(sitearch) .EQS. "" THEN -
1358 sitearch="''vms_prefix':[lib.site_perl.''archname']"
1359$ IF F$TYPE(sitelib) .EQS. "" THEN -
1360 sitelib ="''vms_prefix':[lib.site_perl]"
97abc6ad
HM
1361$ ENDIF !%Config-I-VMS, skip "where install" questions
1362$!
570bb66e
JH
1363$! These derived locations can be set whether we've opted to
1364$! skip the where install questions or not.
1365$!
1366$ IF F$TYPE(archlibexp) .EQS. "" THEN -
1367 archlibexp="''vms_prefix':[lib.''archname'.''version']"
1368$ IF F$TYPE(binexp) .EQS. "" THEN -
1369 binexp ="''vms_prefix':[000000]"
1370$ IF F$TYPE(builddir) .EQS. "" THEN -
1371 builddir ="''vms_prefix':[000000]"
1372$ IF F$TYPE(installarchlib) .EQS. "" THEN -
1373 installarchlib="''vms_prefix':[lib.''archname'.''version']"
1374$ IF F$TYPE(installbin) .EQS. "" THEN -
1375 installbin ="''vms_prefix':[000000]"
1376$ IF F$TYPE(installscript) .EQS. "" THEN -
1377 installscript ="''vms_prefix':[utils]"
1378$ IF F$TYPE(installman1dir) .EQS. "" THEN -
1379 installman1dir ="''vms_prefix':[man.man1]"
1380$ IF F$TYPE(installman3dir) .EQS. "" THEN -
1381 installman3dir ="''vms_prefix':[man.man3]"
1382$ IF F$TYPE(installprivlib) .EQS. "" THEN -
1383 installprivlib ="''vms_prefix':[lib]"
1384$ IF F$TYPE(installsitearch) .EQS. "" THEN -
1385 installsitearch="''vms_prefix':[lib.site_perl.''archname']"
1386$ IF F$TYPE(installsitelib) .EQS. "" THEN -
1387 installsitelib ="''vms_prefix':[lib.site_perl]"
1388$ IF F$TYPE(oldarchlib) .EQS. "" THEN -
1389 oldarchlib="''vms_prefix':[lib.''archname']"
1390$ IF F$TYPE(oldarchlibexp) .EQS. "" THEN -
1391 oldarchlibexp="''vms_prefix':[lib.''archname']"
1392$ IF F$TYPE(privlibexp) .EQS. "" THEN -
1393 privlibexp ="''vms_prefix':[lib]"
1394$ IF F$TYPE(sitearchexp) .EQS. "" THEN -
1395 sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
1396$ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
1397 sitelib_stem ="''vms_prefix':[lib.site_perl]"
1398$ IF F$TYPE(sitelibexp) .EQS. "" THEN -
1399 sitelibexp ="''vms_prefix':[lib.site_perl]"
1400$!
97abc6ad 1401$!: see if we need a special compiler
01792a70 1402$! cc_list = "cc/decc|gcc" !%Config-I-VMS, compiler symbols/commands
97abc6ad
HM
1403$!
1404$ nocc = "f"
1405$ vms_cc_dflt = ""
1406$ vms_cc_available = ""
1407$!
1408$ OPEN/WRITE CONFIG ccvms.c
570bb66e 1409$ WRITE CONFIG "#ifdef __DECC"
97abc6ad 1410$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
570bb66e 1411$ WRITE CONFIG "#endif"
97abc6ad
HM
1412$ WRITE CONFIG "#include <stdio.h>"
1413$ WRITE CONFIG "int main() {"
1414$ WRITE CONFIG "#ifdef __DECC"
1415$ WRITE CONFIG " printf(""/DECC\n"");"
1416$ WRITE CONFIG "#else"
1417$ WRITE CONFIG " printf(""/VAXC\n"");"
1418$ WRITE CONFIG "#endif"
1419$ WRITE CONFIG " exit(0);"
1420$ WRITE CONFIG "}"
1421$ CLOSE CONFIG
1422$!
5af06f0d
DS
1423$! DEFINE SYS$ERROR _NLA0:
1424$! DEFINE SYS$OUTPUT _NLA0:
97abc6ad
HM
1425$ cc/NoObj/list=ccvms.lis ccvms.c
1426$ tmp = $status
5af06f0d
DS
1427$! DEASSIGN SYS$OUTPUT
1428$! DEASSIGN SYS$ERROR
97abc6ad 1429$ IF (silent) THEN GOSUB Shut_up
97abc6ad
HM
1430$ IF tmp.NE.%X10B90001
1431$ THEN
1432$ IF tmp.NE.%X10000001
1433$ THEN
1434$ nocc = "t" !%X10000001 is return from gcc
1435$ GOTO Gcc_initial_check
1436$ ENDIF
1437$ ENDIF
1438$!
1439$ GOSUB List_Parse
1440$ IF .NOT.silent THEN echo ""
570bb66e 1441$ echo "Default ""cc"" is ''line' ''archsufx' ''F$GETSYI("VERSION")'"
97abc6ad
HM
1442$ IF F$LOCATE("VAX",line).NE.F$LENGTH(line)
1443$ THEN
97abc6ad
HM
1444$ IF .NOT.silent
1445$ THEN
570bb66e 1446$ echo "Will try cc/decc..."
97abc6ad 1447$ ENDIF
570bb66e
JH
1448$ DEFINE/USER_MODE SYS$ERROR NL:
1449$ DEFINE/USER_MODE SYS$OUTPUT NL:
97abc6ad
HM
1450$ SET NOON
1451$ cc/decc/NoObj/list=ccvms.lis ccvms.c
1452$ tmp = $status
97abc6ad
HM
1453$ SET ON
1454$ IF (silent) THEN GOSUB Shut_up
1455$ IF tmp.NE.%X10B90001
1456$ THEN
570bb66e 1457$ echo "Apparently you don't have that one."
97abc6ad
HM
1458$ ELSE
1459$ GOSUB List_parse
570bb66e 1460$ echo "You also have: ''line' ''archsufx' ''F$GETSYI("VERSION")'"
97abc6ad
HM
1461$ vms_cc_available = vms_cc_available + "cc/decc "
1462$ ENDIF
1463$ ELSE
5af06f0d 1464$ IF (F$LOCATE("DEC",line).NE.F$LENGTH(line)).or.(F$LOCATE("Compaq",line).NE.F$LENGTH(line))
97abc6ad
HM
1465$ THEN
1466$ vms_cc_dflt = "/decc"
1467$ vms_cc_available = vms_cc_available + "cc/decc "
97abc6ad
HM
1468$ ENDIF
1469$ ENDIF
1470$!
1471$Gcc_initial_check:
570bb66e 1472$ echo "Checking for gcc"
97abc6ad 1473$ OPEN/WRITE CONFIG gccvers.lis
570bb66e
JH
1474$ DEFINE/USER_MODE SYS$ERROR CONFIG
1475$ DEFINE/USER_MODE SYS$OUTPUT CONFIG
97abc6ad
HM
1476$ 'gcc_symbol'/noobj/version _nla0:
1477$ tmp = $status
97abc6ad
HM
1478$ IF (silent) THEN GOSUB Shut_up
1479$ CLOSE CONFIG
1480$ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
1481$ THEN
7558ebc2 1482$ echo "Symbol ""''gcc_symbol'"" is not defined. I guess you do not have it."
570bb66e
JH
1483$ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1484$ GOTO Cxx_initial_check
97abc6ad
HM
1485$ ENDIF
1486$ OPEN/READ CONFIG gccvers.lis
1487$GCC_List_Read:
1488$ READ/END_OF_FILE=GCC_List_End CONFIG line
1489$ GOTO GCC_List_Read
1490$GCC_List_End:
1491$ CLOSE CONFIG
1492$ echo line
1493$ vms_cc_available = vms_cc_available + "''gcc_symbol' "
1494$ DELETE/NOLOG/NOCONFIRM gccvers.lis;
1495$!
570bb66e
JH
1496$Cxx_initial_check:
1497$!
1498$! Do note that [vms]perl source files have a ways to go before they will
1499$! compile under CXX.
7558ebc2
PP
1500$! In order to test Configure.com with CXX invoke it with "-Dtry_cxx" on
1501$! the command line.
570bb66e 1502$!
7558ebc2
PP
1503$ IF F$TYPE(try_cxx) .EQS. "" THEN try_cxx := n
1504$ IF try_cxx .OR. try_cxx .EQS. "define"
570bb66e
JH
1505$!
1506$ THEN
1507$!
1508$ echo "Checking for CXX..."
1509$ OPEN/WRITE CONFIG ccvms.c
1510$ WRITE CONFIG "#include <iostream>"
1511$ WRITE CONFIG "int main() {"
1512$ WRITE CONFIG "#ifdef __DECCXX"
1513$ WRITE CONFIG " cout << __DECCXX, endl;"
1514$ WRITE CONFIG "#else"
1515$ WRITE CONFIG " cout << 0,endl;"
1516$ WRITE CONFIG "#endif"
1517$! Todo: add G++ identifier check ??
1518$ WRITE CONFIG " return(0);"
1519$ WRITE CONFIG "}"
1520$ CLOSE CONFIG
1521$ SET NOON
1522$ DEFINE/USER_MODE SYS$OUTPUT NL:
1523$ DEFINE/USER_MODE SYS$ERROR NL:
1524$ cxx ccvms.c
1525$ tmp = $status
1526$ SET ON
1527$! success $status with:
1528$! DEC C++ V1.1-001 on VMS VAX V5.5-2
1529$! DEC C++ V5.6-013 on OpenVMS VAX V7.1
1530$! DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1531$! Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1532$ IF tmp .eq. %X15F60001
1533$ THEN
1534$! Which linker?
1535$ SET NOON
1536$ DEFINE/USER_MODE SYS$OUTPUT NL:
1537$ DEFINE/USER_MODE SYS$ERROR NL:
1538$ link ccvms.obj
1539$ tmp = $status
1540$ SET ON
1541$ ! success $status with:
1542$ ! link && DEC C++ V1.1-001 on VMS VAX V5.5-2
1543$ ! link && DEC C++ V5.6-013 on OpenVMS VAX V7.1
1544$ IF tmp .eq. %X10000001
1545$ THEN
1546$ ld_try = "Link"
1547$ vms_cc_available = vms_cc_available + "cxx "
1548$ echo "CXX and LINK are available."
1549$ ELSE
1550$ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1551$ SET NOON
1552$ DEFINE/USER_MODE SYS$OUTPUT NL:
1553$ DEFINE/USER_MODE SYS$ERROR NL:
1554$ cxxlink ccvms.obj
1555$ tmp = $status
1556$ SET ON
1557$ ! success $status with:
1558$ ! cxxlink && DEC C++ V6.1-003 on OpenVMS Alpha V7.1
1559$ ! cxxlink && Compaq C++ V6.2-016 for OpenVMS Alpha V7.2-1
1560$ IF tmp .eq. %X10000001
1561$ THEN
1562$ ld_try = "cxxlink"
1563$ vms_cc_available = vms_cc_available + "cxx "
1564$ echo "CXX and CXXLINK are available."
1565$ ENDIF
1566$ ENDIF
1567$ IF F$SEARCH("ccvms.exe") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.exe;
1568$ ELSE
1569$ echo "Nope."
1570$ ENDIF
1571$ DELETE/NOLOG/NOCONFIRM ccvms.c;
1572$ IF F$SEARCH("ccvms.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM ccvms.obj;
1573$ CALL Cxx_demangler_cleanup
1574$!
1575$ ENDIF ! 1 .eq. 0 or 1 .eq. 1
1576$!
97abc6ad
HM
1577$CC_Cleanup:
1578$ DELETE/NOLOG/NOCONFIRM ccvms.*;
1579$CC_Desired:
1580$!: see if we need a special compiler
1581$! echo ""
570bb66e 1582$ echo "Available compiler(s):"
97abc6ad
HM
1583$ echo "( ''vms_cc_available')"
1584$ IF .NOT.nocc
1585$ THEN
1586$ dflt = "cc''vms_cc_dflt'" !-> "cc" in case first compile went OK
1587$ ELSE
1588$ dflt = gcc_symbol
1589$ ENDIF
1590$ rp = "Use which C compiler? [''dflt'] "
1591$ GOSUB myread
1592$ IF ans.NES.""
1593$ THEN
1594$ ans = F$EDIT(ans,"TRIM, COMPRESS, LOWERCASE")
1595$ Mcc = ans
5af06f0d 1596$ IF (F$LOCATE("dec",ans).NE.F$LENGTH(ans)).or.(F$LOCATE("compaq",ans).NE.F$LENGTH(ans))
97abc6ad
HM
1597$ THEN
1598$ Mcc = "cc/decc"
570bb66e 1599$ Using_Dec_C := Y
429a5e67 1600$ C_COMPILER_Replace = "CC=cc=''Mcc'"
97abc6ad 1601$ ENDIF
570bb66e
JH
1602$ IF F$LOCATE("cxx",F$EDIT(ans,"COLLAPSE,LOWERCASE")) .NE. F$LENGTH(ans)
1603$ THEN
1604$ Mcc = "cxx"
1605$ using_cxx := Y
1606$ ld = ld_try
7558ebc2
PP
1607$ C_COMPILER_Replace = "CC=cc=''Mcc'"
1608$ ELSE ! Not_cxx
1609$ IF Mcc.NES.dflt
97abc6ad 1610$ THEN
7558ebc2
PP
1611$ IF F$LOCATE("dec",dflt) .NE. F$LENGTH(dflt) .or. -
1612 F$LOCATE("compaq",dflt) .NE. F$LENGTH(dflt)
1613$ THEN
1614$ C_COMPILER_Replace = "CC=cc=''Mcc'"
1615$ ELSE
1616$ Using_Dec_C := Y
1617$ ENDIF
1618$ ELSE
1619$ IF Mcc .EQS. "cc/decc"
1620$ THEN
1621$ Using_Dec_C := Y
1622$ C_COMPILER_Replace = "CC=cc=''Mcc'"
1623$ ENDIF
97abc6ad
HM
1624$ ENDIF
1625$ ENDIF
1626$ ELSE
1627$ Mcc = dflt
1628$ IF Mcc .EQS. "cc/decc"
1629$ THEN
570bb66e 1630$ Using_Dec_C := Y
429a5e67 1631$ C_COMPILER_Replace = "CC=cc=''Mcc'"
97abc6ad 1632$ ENDIF
97abc6ad
HM
1633$ IF Mcc .EQS. "gcc"
1634$ THEN
570bb66e 1635$ Using_Gnu_C := Y
429a5e67 1636$ C_COMPILER_Replace = "CC=cc=''Mcc'"
97abc6ad
HM
1637$ ENDIF
1638$ ENDIF
1639$Decc_Version_check:
570bb66e
JH
1640$ ccversion=""
1641$ IF Using_Dec_C
97abc6ad
HM
1642$ THEN
1643$ echo ""
7558ebc2 1644$ echo4 "Checking for the Dec C version number..."
97abc6ad
HM
1645$ OPEN/WRITE CONFIG deccvers.c
1646$ WRITE CONFIG "#include <stdlib.h>" !DECC is sooo picky
1647$ WRITE CONFIG "#include <stdio.h>"
1648$ WRITE CONFIG "int main() {"
1649$ WRITE CONFIG "#ifdef __DECC"
1650$ WRITE CONFIG "#ifdef __DECC_VER"
1651$ WRITE CONFIG " printf(""%i\n"", __DECC_VER);"
1652$ WRITE CONFIG "#else"
1653$ WRITE CONFIG " printf(""%i\n"", ""1"");"
1654$ WRITE CONFIG "#endif"
1655$ WRITE CONFIG "#endif"
1656$ WRITE CONFIG " exit(0);"
1657$ WRITE CONFIG "}"
1658$ CLOSE CONFIG
570bb66e
JH
1659$ SET NOON
1660$ DEFINE/USER_MODE SYS$ERROR NL:
1661$ DEFINE/USER_MODE SYS$OUTPUT NL:
97abc6ad
HM
1662$ 'Mcc' deccvers.c
1663$ tmp = $status
97abc6ad 1664$ IF (silent) THEN GOSUB Shut_up
570bb66e
JH
1665$ DEFINE/USER_MODE SYS$ERROR NL:
1666$ DEFINE/USER_MODE SYS$OUTPUT NL:
97abc6ad
HM
1667$ link deccvers.obj
1668$ tmp = $status
97abc6ad
HM
1669$ IF (silent) THEN GOSUB Shut_up
1670$ OPEN/WRITE CONFIG deccvers.out
570bb66e
JH
1671$ DEFINE/USER_MODE SYS$ERROR CONFIG
1672$ DEFINE/USER_MODE SYS$OUTPUT CONFIG
97abc6ad
HM
1673$ mcr []deccvers.exe
1674$ tmp = $status
570bb66e 1675$ SET ON
97abc6ad 1676$ CLOSE CONFIG
97abc6ad
HM
1677$ IF (silent) THEN GOSUB Shut_up
1678$ OPEN/READ CONFIG deccvers.out
1679$ READ/END_OF_FILE=Dec_c_cleanup CONFIG line
1680$Dec_c_cleanup:
1681$ CLOSE CONFIG
97abc6ad 1682$ echo "You are using Dec C ''line'"
570bb66e
JH
1683$ ccversion = line
1684$ Dec_C_Version = F$INTEGER(line)
1685$ IF Dec_C_Version .GE. 60200000
1686$ THEN
1687$ echo4 "adding /NOANSI_ALIAS qualifier to ccflags."
1688$ ccflags = ccflags + "/NOANSI_ALIAS"
1689$ ENDIF
1690$ DELETE/NOLOG/NOCONFIRM deccvers.*;
97abc6ad 1691$ ENDIF
97abc6ad 1692$Gcc_check:
570bb66e
JH
1693$ gccversion = ""
1694$ IF Using_Gnu_C
97abc6ad 1695$ THEN
570bb66e
JH
1696$ vaxcrtl_olb = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1697$ vaxcrtl_exe = F$SEARCH("SYS$SHARE:VAXCRTL.EXE")
1698$ gcclib_olb = F$SEARCH("GNU_CC:[000000]GCCLIB.OLB")
1699$ IF gcclib_olb .EQS. ""
97abc6ad 1700$ THEN
570bb66e
JH
1701$! These objects/libs come w/ gcc 2.7.2 for AXP:
1702$ tmp = F$SEARCH("GNU_CC:[000000]libgcc2.olb")
1703$ IF tmp .NES. "" then gcclib_olb = tmp
1704$ tmp = F$SEARCH("GNU_CC:[000000]libgcclib.olb")
1705$ IF tmp .NES. ""
1706$ THEN
1707$ IF gcclib_olb .EQS. ""
1708$ THEN gcclib_olb = tmp
1709$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1710$ ENDIF
97abc6ad 1711$ ENDIF
570bb66e
JH
1712$ tmp = F$SEARCH("SYS$LIBRARY:VAXCRTL.OLB")
1713$ IF tmp .NES. ""
1714$ THEN
1715$ IF gcclib_olb .EQS. ""
1716$ THEN gcclib_olb = tmp
1717$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1718$ ENDIF
97abc6ad 1719$ ENDIF
570bb66e
JH
1720$ tmp = F$SEARCH("GNU_CC:[000000]crt0.obj")
1721$ IF tmp .NES. ""
1722$ THEN
1723$ IF gcclib_olb .EQS. ""
1724$ THEN gcclib_olb = tmp
1725$ ELSE gcclib_olb = gcclib_olb + "/lib," + tmp
1726$ ENDIF
97abc6ad 1727$ ENDIF
570bb66e
JH
1728$ IF gcclib_olb .EQS. vaxcrtl_olb THEN gcclib_olb = "" !goofy order of axplibs
1729$ ELSE
1730$ gcclib_olb = gcclib_olb + "/lib"
97abc6ad 1731$ ENDIF
570bb66e 1732$ IF gcclib_olb .NES. "" .AND. -
97abc6ad
HM
1733 (vaxcrtl_olb .NES. "" .OR. -
1734 vaxcrtl_exe .NES. "" )
570bb66e
JH
1735$ THEN
1736$ echo ""
1737$ echo4 "Checking for GNU cc in disguise and/or its version number..." !>&4
1738$ OPEN/WRITE CONFIG gccvers.c
570bb66e
JH
1739$ WRITE CONFIG "#include <stdio.h>"
1740$ WRITE CONFIG "int main() {"
1741$ WRITE CONFIG "#ifdef __GNUC__"
1742$ WRITE CONFIG "#ifdef __VERSION__"
1743$ WRITE CONFIG " printf(""%s\n"", __VERSION__);"
1744$ WRITE CONFIG "#else"
1745$ WRITE CONFIG " printf(""%s\n"", ""1"");"
1746$ WRITE CONFIG "#endif"
1747$ WRITE CONFIG "#endif"
1748$ WRITE CONFIG " exit(0);"
1749$ WRITE CONFIG "}"
1750$ CLOSE CONFIG
1751$ DEFINE SYS$ERROR _NLA0:
1752$ DEFINE SYS$OUTPUT _NLA0:
1753$ 'Mcc' gccvers.c
1754$ tmp = $status
1755$ DEASSIGN SYS$ERROR _NLA0:
1756$ DEASSIGN SYS$OUTPUT _NLA0:
1757$ IF (silent) THEN GOSUB Shut_up
1758$ DEFINE SYS$ERROR _NLA0:
1759$ DEFINE SYS$OUTPUT _NLA0:
1760$ IF vaxcrtl_exe .EQS. ""
1761$ THEN
1762$ IF F$LOCATE("VAXCRTL",gcclib_olb).NE.F$LENGTH(gcclib_olb)
1763$ THEN
1764$ link gccvers.obj,'gcclib_olb',SYS$LIBRARY:VAXCRTL/Library
1765$ tmp = $status
1766$ ELSE
1767$ link gccvers.obj,'gcclib_olb'
1768$ tmp = $status
1769$ ENDIF
1770$ ELSE
1771$ OPEN/WRITE CONFIG GCCVERS.OPT
1772$ WRITE CONFIG "SYS$SHARE:VAXCRTL/SHARE"
1773$ CLOSE CONFIG
1774$ link gccvers.obj,GCCVERS.OPT/OPT,'gcclib_olb'
1775$ tmp = $status
1776$ ENDIF
1777$ DEASSIGN SYS$ERROR
1778$ DEASSIGN SYS$OUTPUT
1779$ IF (silent) THEN GOSUB Shut_up
1780$ OPEN/WRITE CONFIG gccvers.out
1781$ DEFINE SYS$ERROR CONFIG
1782$ DEFINE SYS$OUTPUT CONFIG
1783$ mcr []gccvers.exe
1784$ tmp = $status
1785$ CLOSE CONFIG
1786$ DEASSIGN SYS$OUTPUT
1787$ DEASSIGN SYS$ERROR
1788$ IF (silent) THEN GOSUB Shut_up
1789$ OPEN/READ CONFIG gccvers.out
1790$ READ/END_OF_FILE=Gcc_cleanup CONFIG line
1791$Gcc_cleanup:
1792$ CLOSE CONFIG
1793$ DELETE/NOLOG/NOCONFIRM gccvers.*;
1794$ IF F$LOCATE("GNU C version ",line).NE.F$LENGTH(line)
1795$ THEN
1796$ echo "You are not using GNU cc."
1797$ GOTO Host_name
1798$ ELSE
1799$ echo "You are using GNU cc ''line'"
1800$ gccversion = line
1801$ Using_Gnu_C := Y
1802$ C_COMPILER_Replace = "CC=cc=''Mcc'"
1803$ GOTO Include_dirs
1804$ ENDIF
1805$ ENDIF
1806$ ENDIF
1807$Cxx_Version_check:
1808$ IF using_cxx
97abc6ad 1809$ THEN
570bb66e 1810$ OPEN/WRITE CONFIG cxxvers.c
97abc6ad
HM
1811$ WRITE CONFIG "#include <stdio.h>"
1812$ WRITE CONFIG "int main() {"
570bb66e
JH
1813$ WRITE CONFIG "#ifdef __DECCXX_VER"
1814$ WRITE CONFIG " printf(""%i\n"", __DECCXX_VER);"
97abc6ad 1815$ WRITE CONFIG "#else"
570bb66e 1816$ WRITE CONFIG " printf(""%i\n"", ""0"");"
97abc6ad 1817$ WRITE CONFIG "#endif"
570bb66e 1818$ WRITE CONFIG " return(0);"
97abc6ad
HM
1819$ WRITE CONFIG "}"
1820$ CLOSE CONFIG
570bb66e
JH
1821$ SET NOON
1822$ DEFINE/USER_MODE SYS$ERROR NL:
1823$ DEFINE/USER_MODE SYS$OUTPUT NL:
1824$ 'Mcc' cxxvers.c
97abc6ad 1825$ tmp = $status
570bb66e 1826$ SET ON
97abc6ad 1827$ IF (silent) THEN GOSUB Shut_up
570bb66e
JH
1828$ SET NOON
1829$ DEFINE/USER_MODE SYS$ERROR NL:
1830$ DEFINE/USER_MODE SYS$OUTPUT NL:
1831$ 'ld' cxxvers.obj
1832$ tmp = $status
1833$ SET ON
97abc6ad 1834$ IF (silent) THEN GOSUB Shut_up
570bb66e
JH
1835$ OPEN/WRITE CONFIG cxxvers.out
1836$ SET NOON
1837$ DEFINE/USER_MODE SYS$ERROR CONFIG
1838$ DEFINE/USER_MODE SYS$OUTPUT CONFIG
1839$ mcr []cxxvers.exe
97abc6ad 1840$ tmp = $status
570bb66e 1841$ SET ON
97abc6ad 1842$ CLOSE CONFIG
97abc6ad 1843$ IF (silent) THEN GOSUB Shut_up
570bb66e
JH
1844$ OPEN/READ CONFIG cxxvers.out
1845$ READ/END_OF_FILE=Cxx_cleanup CONFIG line
1846$Cxx_cleanup:
97abc6ad 1847$ CLOSE CONFIG
570bb66e
JH
1848$ DELETE/NOLOG/NOCONFIRM cxxvers.*;
1849$ echo "You are using CXX ''line'"
1850$ cxxversion = line
1851$ ccversion = line
1852$ CALL Cxx_demangler_cleanup
1853$ ENDIF
1854$!
1855$Cxx_demangler_cleanup: SUBROUTINE
1856$!
1857$! If we do build with CXX these demangler Dbs will be left all over.
1858$! However, configure.com does try to remove the [.UU] sub directory.
1859$! Be sure to set default to the correct place before calling this sub.
1860$!
1861$ SET NOON
1862$ IF F$SEARCH("[.CXX_REPOSITORY]*.*") .NES. "" THEN DELETE/NOLOG/NOCONFIRM [.CXX_REPOSITORY]*.*;*
1863$ IF F$SEARCH("CXX_REPOSITORY.DIR") .NES. ""
1864$ THEN
1865$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) CXX_REPOSITORY.DIR
1866$ DELETE/NOLOG/NOCONFIRM CXX_REPOSITORY.DIR;
97abc6ad 1867$ ENDIF
570bb66e
JH
1868$ SET ON
1869$ EXIT
1870$ ENDSUBROUTINE ! Cxx_demangler_cleanup
1871$!
97abc6ad
HM
1872$ GOTO Host_name
1873$!
1874$List_Parse:
1875$ OPEN/READ CONFIG ccvms.lis
1876$ READ CONFIG line
1877$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
1878$ THEN
1879$ read CONFIG line
1880$ archsufx = "VAX"
1881$ ELSE
1882$ archsufx = "AXP"
1883$ ENDIF
1884$ CLOSE CONFIG
1885$ line = F$EDIT(line,"TRIM,COMPRESS")
1886$ line = line - "Page 1" ! occurs at end all compilers
1887$ line = line - "CCVMS " ! filename appears w/ VAXC
1888$ line = line - "Source Listing " ! Seen w/ AXP DECC
1889$ tmp = F$EXTRACT(0,20,line) !timestamp, e.g. "30-JUL-1996 21:12:54 "
1890$ line = line - tmp
1891$ line = F$EDIT(line,"TRIM") !bit redundant but we're in no big hurry
1892$ DELETE/NOLOG/NOCONFIRM ccvms.lis;
1893$ RETURN
1894$!
1895$Include_dirs:
570bb66e 1896$!: What should the include directory be ? (.TLB text libraries)
97abc6ad
HM
1897$ dflt = gcclib_olb
1898$ rp = "Where are the include files you want to use? "
1899$ IF f$length( rp + "[''dflt'] " ).gt.76
1900$ THEN rp = F$FAO("!AS!/!AS",rp,"[''dflt'] ")
1901$ ELSE rp = rp + "[''dflt'] "
1902$ ENDIF
1903$ GOSUB myread
1904$ usrinc = ans
1905$!
1906$!: see if we have to deal with yellow pages, now NIS.
1907$!: now get the host name
1908$Host_name:
1909$ echo ""
1910$ echo4 "Figuring out host name..." !>&4
1911$ myhostname = ""
1912$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("ARPANET_HOST_NAME")
1913$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("INTERNET_HOST_NAME")
1914$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("MULTINET_HOST_NAME")
1915$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("UCX$INET_HOST_NAME")
1916$ IF myhostname.eqs."".and. -
1917 F$TRNLNM("UCX$INET_HOST") .nes. "" .and. -
1918 F$TRNLNM("UCX$INET_DOMAIN") .nes. "" THEN -
1919 myhostname = F$TRNLNM("UCX$INET_HOST") + "." + F$TRNLNM("UCX$INET_DOMAIN")
1920$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("TCPWARE_DOMAINNAME")
1921$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("NEWS_ADDRESS")
1922$ IF myhostname.eqs."" THEN myhostname = F$TRNLNM("SYS$NODE") - "::"
1923$ IF myhostname.eqs."" THEN myhostname = F$EDIT(F$GETSYI("SCSNODE"),"TRIM")
1924$!: you do not want to know about this
1925$!: verify guess
1926$ rp = "Your host name appears to be """"''myhostname'"""". Right? "
1927$ GOSUB myread
1928$ IF (.not.ans).and.(ans.NES."")
1929$ THEN
1930$ READ SYS$COMMAND/PROMPT= -
1931 "Please type the (one word) name of your host: " ans
1932$ myhostname = ans
1933$ ENDIF
1934$!: translate upper to lower if necessary
1935$ myhostname = F$EDIT(myhostname,"COLLAPSE")
1936$ mylowhostname = F$EDIT(myhostname," LOWERCASE")
1937$ IF mylowhostname.NES.myhostname
1938$ THEN
1939$ echo "(Normalizing case in your host name)"
1940$ myhostname = mylowhostname
1941$ ENDIF
1942$!
1943$ fp = F$LOCATE(".",myhostname)
1944$ mydomain = F$EXTRACT(fp,(F$LENGTH(myhostname)-fp)+1,myhostname)
1945$ IF mydomain.NES."" !no periods in DECnet names like "MYDECNODE::"
1946$ THEN
1947$ rp = "What is your domain name? [''mydomain'] "
1948$ GOSUB myread
cc391245 1949$ IF ans .nes. "" THEN mydomain = ans
97abc6ad
HM
1950$!: translate upper to lower if necessary
1951$ mydomain = F$EDIT(mydomain,"COLLAPSE")
1952$ mylowdomain = F$EDIT(mydomain," LOWERCASE")
1953$ IF mylowdomain.NES.mydomain
1954$ THEN
1955$ echo "(Normalizing case in your domain name)"
1956$ mydomain = mylowdomain
1957$ ENDIF
1958$ ENDIF
1959$ myhostname = myhostname - mydomain
1960$ echo "(Trimming domain name from host name--host name is now ''myhostname')"
1961$ IF .NOT.silent
7558ebc2
PP
1962$ THEN
1963$ TYPE SYS$INPUT:
1964$ DECK
97abc6ad
HM
1965
1966I need to get your e-mail address in Internet format if possible, i.e.
1967something like user@host.domain. Please answer accurately since I have
1968no easy means to double check it. The default value provided below
1969is most probably close to the reality but may not be valid from outside
1970your organization...
7558ebc2 1971$ EOD
97abc6ad 1972$ ENDIF
146174a9 1973$ dflt = "''cf_by'@''myhostname'"+"''mydomain'"
97abc6ad
HM
1974$ rp = "What is your e-mail address? [''dflt'] "
1975$ GOSUB myread
cc391245 1976$ IF ans .nes. ""
97abc6ad
HM
1977$ THEN cf_email = ans
1978$ ELSE cf_email = dflt
1979$ ENDIF
1980$!
1981$ IF .NOT.silent
7558ebc2
PP
1982$ THEN
1983$ TYPE SYS$INPUT:
1984$ DECK
97abc6ad
HM
1985
1986If you or somebody else will be maintaining perl at your site, please
1987fill in the correct e-mail address here so that they may be contacted
1988if necessary. Currently, the "perlbug" program included with perl
1989will send mail to this address in addition to perlbug@perl.com. You may
1990enter "none" for no administrator.
7558ebc2 1991$ EOD
97abc6ad
HM
1992$ ENDIF
1993$ dflt = "''cf_email'"
1994$ rp = "Perl administrator e-mail address [''dflt'] "
1995$ GOSUB myread
cc391245 1996$ IF ans .nes. ""
97abc6ad
HM
1997$ THEN perladmin = ans
1998$ ELSE perladmin = dflt
1999$ ENDIF
2000$!
2001$!: determine where public executable scripts go
2002$!: determine perl absolute location
2003$!: figure out how to guarantee perl startup
2004$!
2005$!: see how we invoke the C preprocessor
2006$! echo ""
2007$! echo4 "Now, how can we feed standard input to your C preprocessor..." !>&4
2008$!: Set private lib path
2009$!: Now check and see which directories actually exist, avoiding duplicates
2010$!: determine optimize, if desired, or use for debug flag also
2011$!: We will not override a previous value, but we might want to
2012$!: augment a hint file
2013$!: the following weeds options from ccflags that are of no interest to cpp
2014$!: flags used in final linking phase
2015$!: Try to guess additional flags to pick up local libraries.
2016$!: coherency check
2017$! echo ""
2018$! echo4 "Checking your choice of C compiler and flags for coherency..." !>&4
2019$!: compute shared library extension
2020$!: Looking for optional libraries
2021$!: see if nm is to be used to determine whether a symbol is defined or not
2022$!: get list of predefined functions in a handy place
2023$!: see if we have sigaction
2024$!: see whether socketshr exists
2025$ IF (F$SEARCH(F$PARSE("SocketShr","Sys$Share:.Exe")).NES."")
2026$ THEN
570bb66e 2027$ Has_socketshr = "T"
97abc6ad 2028$ echo ""
7558ebc2 2029$ echo4 "Hmm... Looks like you have SOCKETSHR Berkeley networking support."
570bb66e
JH
2030$ ELSE
2031$ Has_socketshr = "F"
2032$ ENDIF
7558ebc2 2033$ IF (Dec_C_Version .GE. 50200000) .or. using_cxx
97abc6ad
HM
2034$ THEN
2035$ Has_Dec_C_Sockets = "T"
2036$ echo ""
7558ebc2 2037$ echo4 "Hmm... Looks like you have Dec C Berkeley networking support."
570bb66e
JH
2038$ ELSE
2039$ Has_Dec_C_Sockets = "F"
97abc6ad
HM
2040$ ENDIF
2041$ ! Hey, we've got both. Default to Dec C, then, since it's better
570bb66e 2042$ IF Has_socketshr .OR. Has_Dec_C_Sockets
97abc6ad
HM
2043$ THEN
2044$ echo ""
7558ebc2
PP
2045$ echo "You have sockets available. Which socket stack do you want to"
2046$ echo "build into Perl?"
570bb66e 2047$ IF Has_Dec_C_Sockets
97abc6ad
HM
2048$ THEN
2049$ dflt = "DECC"
2050$ else
e6df7ed1 2051$ dflt = "SOCKETSHR"
97abc6ad
HM
2052$ endif
2053$ rp = "Choose socket stack (NONE"
570bb66e
JH
2054$ IF Has_socketshr THEN rp = rp + ",SOCKETSHR"
2055$ IF Has_Dec_C_Sockets THEN rp = rp + ",DECC"
97abc6ad
HM
2056$ rp = rp + ") [''dflt'] "
2057$ GOSUB myread
570bb66e
JH
2058$ IF ans .EQS. "" THEN ans = "''dflt'"
2059$ Has_Dec_C_Sockets = "F"
2060$ Has_socketshr = "F"
97abc6ad 2061$ ans = F$EDIT(ans,"TRIM,COMPRESS,LOWERCASE")
570bb66e
JH
2062$ IF ans.eqs."decc" then Has_Dec_C_Sockets = "T"
2063$ IF ans.eqs."socketshr" then Has_socketshr = "T"
2064$ ENDIF
17e8697d
JH
2065$ IF Has_Dec_C_Sockets .or. Has_socketshr
2066$ THEN
2067$ static_ext = f$edit(static_ext+" "+"Socket","trim,compress")
2068$ ENDIF
97abc6ad
HM
2069$!
2070$!
3eeba6fb 2071$! Ask if they want to build with VMS_DEBUG perl
146174a9 2072$ echo ""
3eeba6fb
CB
2073$ echo "Perl can be built to run under the VMS debugger."
2074$ echo "You should only select this option if you are debugging"
2075$ echo "perl itself. This can be a useful feature if you are "
2076$ echo "embedding perl in a program."
146174a9 2077$ dflt = "n"
3eeba6fb
CB
2078$ rp = "Build a VMS-DEBUG version of Perl? [''dflt'] "
2079$ GOSUB myread
146174a9
CB
2080$ IF ans.eqs."" then ans = dflt
2081$ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
3eeba6fb
CB
2082$ THEN
2083$ use_vmsdebug_perl = "Y"
2084$ macros = macros + """__DEBUG__=1"","
2085$ ELSE
2086$ use_vmsdebug_perl = "N"
2087$ ENDIF
2088$!
8c99d73e
GS
2089$! Ask if they want to build with DEBUGGING
2090$ echo ""
7558ebc2
PP
2091$ echo "Perl can be built with extra runtime debugging enabled. This"
2092$ echo "enables the -D switch, at the cost of some performance. It"
2093$ echo "was mandatory on perl 5.005 and before on VMS, but is now"
2094$ echo "optional. If you do not generally use it you should probably"
2095$ echo "leave this off and gain a bit of extra speed."
8c99d73e
GS
2096$ dflt = "y"
2097$ rp = "Build a DEBUGGING version of Perl? [''dflt'] "
2098$ GOSUB myread
2099$ IF ans.eqs."" then ans = dflt
2100$ IF F$EXTRACT(0, 1, F$EDIT(ans,"COLLAPSE,UPCASE")) .eqs. "Y"
2101$ THEN
2102$ use_debugging_perl = "Y"
2103$ ELSE
2104$ use_debugging_perl = "N"
2105$ ENDIF
2106$!
3937c24e 2107$! Ask if they want to build with MULTIPLICITY
146174a9 2108$ echo ""
570bb66e
JH
2109$ echo "Perl can be built so that multiple Perl interpreters can coexist"
2110$ echo "within the same Perl executable."
7558ebc2
PP
2111$ echo "There is some performance overhead, however, so you"
2112$ echo "probably do not want to choose this unless you are going to be"
2113$ echo "doing things with embedded perl."
3937c24e 2114$ dflt = "n"
570bb66e 2115$ rp = "Build Perl for multiplicity? [''dflt'] "
3937c24e 2116$ GOSUB myread
570bb66e
JH
2117$ IF ans.eqs."" then ans = dflt
2118$ IF ans
3937c24e 2119$ THEN
570bb66e 2120$ usemultiplicity="define"
3937c24e 2121$ ELSE
570bb66e 2122$ usemultiplicity="undef"
3937c24e 2123$ ENDIF
fafa4fee
CB
2124$!
2125$! Ask if they want to build with 64-bit support
570bb66e 2126$ IF (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
fafa4fee 2127$ THEN
f53b4005 2128$ dflt = use64bitint
fafa4fee 2129$ echo ""
7558ebc2 2130$ echo "You can have native 64-bit long integers."
f53b4005 2131$ echo ""
7558ebc2
PP
2132$ echo "Perl can be built to take advantage of 64-bit integer types"
2133$ echo "on some systems, which provide a much larger range for perl's"
2134$ echo "mathematical operations. (Note that does *not* enable 64-bit"
f53b4005 2135$ echo "fileops at the moment, as Dec C doesn't do that yet)."
7558ebc2 2136$ echo "Choosing this option will most probably introduce binary incompatibilities."
f53b4005 2137$ echo ""
7558ebc2 2138$ echo "If this does not make any sense to you, just accept the default ''dflt'."
f53b4005 2139$ rp = "Try to use 64-bit integers, if available? [''dflt'] "
5e4ba136 2140$ GOSUB myread
f53b4005 2141$ IF ans .EQS. "" THEN ans = dflt
7558ebc2
PP
2142$ IF ans
2143$ THEN use64bitint="Y"
2144$ ELSE use64bitint="N"
5e4ba136 2145$ ENDIF
f53b4005
CB
2146$ IF (use64bitint)
2147$ THEN
2148$ dflt = use64bitall
2149$ echo ""
7558ebc2
PP
2150$ echo "Since you chose 64-bitness you may want to try maximal 64-bitness."
2151$ echo "What you have chosen is minimal 64-bitness which means just enough"
2152$ echo "to get 64-bit integers. The maximal means using as much 64-bitness"
2153$ echo "as is possible on the platform. This in turn means even more binary"
2154$ echo "incompatibilities. On the other hand, your platform may not have"
2155$ echo "any more maximal 64-bitness than what you already have chosen."
f53b4005 2156$ echo ""
7558ebc2 2157$ echo "If this does not make any sense to you, just accept the default ''dflt'."
f53b4005
CB
2158$ rp = "Try to use full 64-bit support, if available? [''dflt'] "
2159$ GOSUB myread
2160$ IF ans .EQS. "" THEN ans = dflt
7558ebc2
PP
2161$ IF ans
2162$ THEN use64bitall="Y"
2163$ ELSE use64bitall="N"
f53b4005
CB
2164$ ENDIF
2165$ ENDIF
2166$ ENDIF ! AXP && >= 7.1
146174a9 2167$!
97abc6ad 2168$! Ask about threads, if appropriate
7558ebc2 2169$ IF Using_Dec_C .OR. using_cxx
97abc6ad 2170$ THEN
146174a9 2171$ echo ""
7558ebc2
PP
2172$ echo "This version of Perl can be built with threads. While really nifty,"
2173$ echo "they are a beta feature, and there is a speed penalty for perl"
2174$ echo "programs if you build with threads *even if you do not use them*."
429a5e67 2175$ dflt = "n"
97abc6ad
HM
2176$ rp = "Build with threads? [''dflt'] "
2177$ GOSUB myread
2178$ if ans.eqs."" then ans = dflt
2179$ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
2180$ THEN
2181$ use_threads="T"
498336ed 2182$ ! Shall we do the 5.005-stype threads, or IThreads?
7558ebc2
PP
2183$ echo "As of 5.5.640, Perl has two different internal threading"
2184$ echo "implementations, the 5.005 version (5005threads) and an"
2185$ echo "interpreter-based version (ithreads) that has one"
2186$ echo "interpreter per thread. Both are very experimental. This"
2187$ echo "arrangement exists to help developers work out which one"
2188$ echo "is better."
2189$ echo ""
2190$ echo "If you are a casual user, you probably do not want"
2191$ echo "interpreter-threads at this time. There doesn't yet exist"
2192$ echo "a way to create threads from within Perl in this model,"
2193$ echo "i.e., ""use Thread;"" will NOT work."
2194$ echo ""
498336ed 2195$ dflt = "n"
7558ebc2 2196$ rp = "Build with Interpreter threads? [''dflt'] "
2974eb71 2197$ GOSUB myread
498336ed
CB
2198$ if ans.eqs."" then ans = dflt
2199$ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
2200$ THEN
2201$ use_ithreads="Y"
2202$ use_5005_threads="N"
2203$ ELSE
2204$ use_ithreads="N"
2205$ use_5005_threads="Y"
2206$ ENDIF
429a5e67 2207$ ! Are they on VMS 7.1 on an alpha?
570bb66e 2208$ if (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
429a5e67
DS
2209$ THEN
2210$ echo ""
7558ebc2
PP
2211$ echo "Threaded perl can be linked to use multiple kernel threads"
2212$ echo "and system upcalls on VMS 7.1+ on Alpha systems. This feature"
2213$ echo "allows multiple threads to execute simultaneously on an SMP"
2214$ echo "system as well as preventing a single thread from blocking"
2215$ echo "all the threads in a program, even on a single-processor"
2216$ echo "machine. Unfortunately, this feature isn't safe on an"
2217$ echo "unpatched 7.1 system (several OS patches were required when"
2218$ echo "this procedure was written)."
e6df7ed1 2219$ dflt = "n"
429a5e67
DS
2220$ rp = "Enable multiple kernel threads and upcalls? [''dflt'] "
2221$ gosub myread
2222$ if ans.eqs."" then ans="''dflt'"
2223$ if f$extract(0, 1, f$edit(ans,"TRIM,COMPRESS,UPCASE")).eqs."Y"
2224$ THEN
2225$ Thread_Live_Dangerously = "MT=MT=1"
2226$ ENDIF
2227$ ENDIF
97abc6ad
HM
2228$ ENDIF
2229$ ENDIF
7558ebc2
PP
2230$ IF archname .EQS. "VMS_AXP"
2231$ THEN
498336ed 2232$! Case sensitive?
7558ebc2
PP
2233$ echo ""
2234$ echo "By default, perl (and pretty much everything else on VMS) uses"
2235$ echo "case-insensitive linker symbols. Which is to say, when the"
2236$ echo "underlying C code makes a call to a routine called Perl_foo in"
2237$ echo "the source, the name in the object modules or shareable images"
2238$ echo "is really PERL_FOO. There are some packages that use an"
2239$ echo "embedded perl interpreter that instead require case-sensitive"
2240$ echo "linker symbols."
2241$ echo ""
2242$ echo "If you have no idea what this means, and do not have"
2243$ echo "any program requiring anything, choose the default."
2244$ dflt = be_case_sensitive
2245$ rp = "Build with case-sensitive symbols? [''dflt'] "
2246$ GOSUB myread
2247$ IF ans .EQS. "" THEN ans="''dflt'"
2248$ be_case_sensitive = "''ans'"
498336ed 2249$! IEEE math?
7558ebc2
PP
2250$ echo ""
2251$ echo "Perl normally uses G_FLOAT format floating point numbers"
2252$ echo "internally, as do most things on VMS. You can, however, build"
2253$ echo "with IEEE floating point numbers instead if you need to."
2254$ dflt = use_ieee_math
2255$ rp = "Use IEEE math? [''dflt'] "
2256$ GOSUB myread
2257$ IF ans .eqs. "" THEN ans = "''dflt'"
2258$ use_ieee_math = "''ans'"
2259$ ENDIF
498336ed
CB
2260$! CC Flags
2261$ echo ""
7558ebc2
PP
2262$ echo "Your compiler may want other flags. For this question you should include"
2263$ echo "/INCLUDE=(whatever) and /DEFINE=(whatever), flags and any other flags"
2264$ echo "or qualifiers used by the compiler."
2265$ echo ""
2266$ echo "To use no flags, specify the word ""none""."
498336ed 2267$ dflt = user_c_flags
7558ebc2
PP
2268$ rp = "Any additional cc flags? [''dflt'] "
2269$ GOSUB myread
2270$ IF ans .EQS. "" THEN ans = "''dflt'"
2271$ IF ans .EQS. "none" THEN ans = ""
498336ed 2272$ user_c_flags = "''ans'"
97abc6ad 2273$!
cc391245
CB
2274$! Ask whether they want to use secure logical translation when tainting
2275$ echo ""
2276$ echo "As Perl starts up, it checks several logical names, such as"
2277$ echo "PERL5LIB and PERL_ENV_TABLES, which allow you to modify aspects"
2278$ echo "of its behavior. For additional security, you may limit this"
2279$ echo "process to executive- and kernel-mode translation when tainting"
2280$ echo "is enabled. In this case, logical names normally skipped when"
2281$ echo "tainting is enabled (e.g. PERL5OPTS) are translated as well."
2282$ echo "If you do not choose to do this, the usual order of access modes"
2283$ echo "is used for logical name translation."
2284$ echo ""
2285$ echo "This restriction does not apply to the %ENV hash or to implicit"
2286$ echo "logical name translation during parsing of file specifications;"
2287$ echo "these always use the normal sequence of access modes for logical"
2288$ echo "name translation."
01792a70 2289$ dflt = "y"
cc391245
CB
2290$ rp = "Use secure logical name translation? [''dflt'] "
2291$ GOSUB myread
570bb66e
JH
2292$ IF ans .eqs. "" THEN ans = dflt
2293$ IF ans
2294$ THEN d_secintgenv := Y
2295$ ELSE d_secintgenv := N
2296$ ENDIF
cc391245
CB
2297$!
2298$! Ask whether they want to default filetypes
2299$ echo ""
2300$ echo "When you pass the name of a program to Perl on the command line,"
2301$ echo "it generally doesn't supply any defaults unless the -S command"
2302$ echo "line switch is specified. In keeping with the VMS tradition of"
2303$ echo "default file types, however, you can configure Perl to try default"
2304$ echo "file types of nothing, .pl, and .com, in that order (e.g. typing"
2305$ echo """$ perl foo"" would cause Perl to look for foo., then foo.pl, and"
2306$ echo "finally foo.com)."
8c99d73e 2307$ echo ""
7558ebc2
PP
2308$ echo "This is currently broken in some configurations. Only enable it if"
2309$ echo "you know what you are doing."
570bb66e 2310$ dflt = "n"
cc391245
CB
2311$ rp = "Always use default file types? [''dflt'] "
2312$ GOSUB myread
570bb66e
JH
2313$ IF ans .EQS. "" THEN ans = dflt
2314$ IF ans
2315$ THEN d_alwdeftype := Y
2316$ ELSE d_alwdeftype := N
2317$ ENDIF
97abc6ad
HM
2318$! Ask if they want to use perl's memory allocator
2319$ echo ""
7558ebc2
PP
2320$ echo "Perl has a built-in memory allocator that is tuned for normal"
2321$ echo "memory usage. It is oftentimes better than the standard system"
2322$ echo "memory allocator. It also has the advantage of providing memory"
2323$ echo "allocation statistics, if you choose to enable them."
e6df7ed1 2324$ dflt = "n"
7558ebc2
PP
2325$ IF F$TYPE(usemymalloc) .EQS. "STRING"
2326$ THEN
2327$ IF usemymalloc THEN dflt = "y"
2328$ ENDIF
2329$ rp = "Do you wish to attempt to use the malloc that comes with ''package'? [''dflt'] "
97abc6ad 2330$ GOSUB myread
570bb66e
JH
2331$ IF ans .eqs. "" THEN ans = dflt
2332$ IF ans
2333$ THEN mymalloc := Y
2334$ ELSE mymalloc := N
2335$ ENDIF
2336$ IF mymalloc
429a5e67 2337$ THEN
570bb66e 2338$ IF use_debugging_perl
429a5e67
DS
2339$ THEN
2340$ echo ""
7558ebc2
PP
2341$ echo "Perl can keep statistics on memory usage if you choose to use"
2342$ echo "them. This is useful for debugging, but does have some"
2343$ echo "performance overhead."
e6df7ed1 2344$ dflt = "n"
429a5e67
DS
2345$ rp = "Do you want the debugging memory allocator? [''dflt'] "
2346$ gosub myread
7558ebc2 2347$ IF ans .eqs. "" THEN ans = "''dflt'"
146174a9 2348$ use_debugmalloc = f$extract(0, 1, f$edit(ans, "COLLAPSE,UPCASE"))
429a5e67
DS
2349$ ENDIF
2350$ ! Check which memory allocator we want
2351$ echo ""
7558ebc2
PP
2352$ echo "There are currently three different memory allocators: the"
2353$ echo "default (which is a pretty good general-purpose memory manager),"
2354$ echo "the TWO_POT allocator (which is optimized to save memory for"
2355$ echo "larger allocations), and PACK_MALLOC (which is optimized to save"
2356$ echo "memory for smaller allocations). They're all good, but if your"
2357$ echo "usage tends towards larger chunks use TWO_POT, otherwise use"
429a5e67 2358$ echo "PACK_MALLOC."
429a5e67
DS
2359$ dflt = "DEFAULT"
2360$ rp = "Memory allocator (DEFAULT, TWO_POT, PACK_MALLOC) [''dflt'] "
2361$ GOSUB myread
2362$ if ans.eqs."" then ans = "''dflt'"
2363$ if ans.eqs."TWO_POT" then use_two_pot_malloc = "Y"
2364$ if ans.eqs."PACK_MALLOC" then use_pack_malloc = "Y"
2365$ ENDIF
97abc6ad
HM
2366$!
2367$! Ask for their default list of extensions to build
2368$ echo ""
7558ebc2
PP
2369$ echo "It is time to specify which modules you want to build into"
2370$ echo "perl. Most of these are standard and should be chosen, though"
2371$ echo "you might, for example, want to build GDBM_File instead of"
2372$ echo "SDBM_File if you have the GDBM library built on your machine."
2373$ echo ""
97abc6ad 2374$ echo "Which modules do you want to build into perl?"
7d4173ed 2375$! we need to add Byteloader to this list:
5e506771 2376$ dflt = "re Fcntl Encode Errno File::Glob Filter::Util::Call IO Opcode Devel::Peek Devel::DProf Data::Dumper attrs VMS::Stdio VMS::DCLsym B SDBM_File Storable Thread Sys::Hostname"
7558ebc2 2377$ IF Using_Dec_C .OR. using_cxx
97abc6ad
HM
2378$ THEN
2379$ dflt = dflt + " POSIX"
97abc6ad
HM
2380$ ENDIF
2381$ rp = "[''dflt'] "
2382$ GOSUB myread
2383$ if ans.eqs."" then ans = "''dflt'"
8f6c6e69
CB
2384$ a = ""
2385$ j = 0
2386$ xloop1:
2387$ x = f$elem(j," ",ans)
2388$ j = j + 1
2389$ if x .eqs. " " then goto exloop1
2390$ xloop2:
2391$ k = f$locate("::",x)
2392$ if k .ge. f$len(x) then goto exloop2
2393$ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$len(x)-2,x)
2394$ goto xloop2
2395$ exloop2:
2396$ a = a + " " + x
2397$ goto xloop1
2398$ exloop1:
2399$ ans = f$edit(a,"trim")
2400$!
2401$ a = ""
2402$ j = 0
2403$ xloop3:
2404$ x = f$elem(j," ",dflt)
2405$ j = j + 1
2406$ if x .eqs. " " then goto exloop3
2407$ xloop4:
2408$ k = f$locate("::",x)
2409$ if k .ge. f$len(x) then goto exloop4
2410$ x = f$extract(0,k,x) + "/" + f$extract(k+2,f$len(x)-2,x)
2411$ goto xloop4
2412$ exloop4:
2413$ a = a + " " + x
2414$ goto xloop3
2415$ exloop3:
2416$ dflt = f$edit(a,"trim")
2417$!
97abc6ad 2418$ extensions = "''ans'"
570bb66e 2419$ known_extensions = "''dflt'"
97abc6ad
HM
2420$!
2421$! %Config-I-VMS, determine build/make utility here (make gmake mmk mms)
2422$ echo ""
570bb66e 2423$ echo "Checking your ""make"" utilities..."
97abc6ad
HM
2424$! If the 'build' that you use is not here add it and it's test
2425$! switch to the _END_ of these strings (and increment max_build)
2426$! (e.g. builders = builders + "/FOOMAKE"
2427$! probers = probers + " -fooVersionSwitch"
2428$! ) & please let me know about it.
2429$ builders = "IMAKE/GNUMAKE/MGMAKE/GMAKE/MAKE/MMS/MMK"
2430$ probers = "-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!-f Makefile. -v!/IDENT!/IDENT"
2431$ max_build = 7
2432$!
2433$ orig_dflt = "MMK"
2434$ default_set = ""
2435$ ok_builders = ""
2436$ OPEN/WRITE/ERROR=Open_error CONFIG Makefile.
2437$ WRITE CONFIG "dont_make_anything_yet:"
2438$ WRITE CONFIG F$FAO("!_")
2439$ CLOSE CONFIG
2440$ n = 0
2441$ messages = F$ENVIRONMENT("MESSAGE")
2442$Build_probe:
2443$ build = F$ELEMENT(n,"/",builders)
2444$ probe = F$ELEMENT(n,"!",probers)
2445$ echo "Testing whether you have ''build' on your system..."
570bb66e
JH
2446$!
2447$! Noted with GNU Make version 3.60 that the $status and $severity
2448$! with the 'probe' Makefile appear to be: $STATUS == "%X1000000C"
2449$! $SEVERITY == "4".
2450$!
a3ef2c6f
GS
2451$ SET NOON
2452$ ON CONTROL_Y THEN GOTO Reenable_messages_build
2453$ SET MESSAGE/NOFAC/NOSEV/NOIDENT/NOTEXT
97abc6ad 2454$ 'build' 'probe'
570bb66e 2455$ IF ($SEVERITY .EQ. 1) ! not adequate?
97abc6ad
HM
2456$ THEN
2457$ echo "OK."
2458$ IF (build .EQS. orig_dflt)
2459$ THEN
2460$ default_set = "TRUE"
2461$ dflt = build
2462$ ENDIF
2463$ ok_builders = ok_builders + " " + build
2464$ IF (.NOT. default_set) THEN dflt = build
2465$ ELSE
2466$ echo "Nope."
2467$ ENDIF
a3ef2c6f
GS
2468$Reenable_messages_build:
2469$ SET MESSAGE 'messages'
2470$ SET ON
97abc6ad
HM
2471$ n = n + 1
2472$ IF (n .LT. max_build) THEN GOTO Build_probe
2473$!
2474$ echo ""
2475$ IF (ok_builders .NES. "")
2476$ THEN
2477$ echo "Here is the list of builders you can apparently use:"
2478$ echo "(",ok_builders," )"
a5fddd44 2479$ rp = "Which """"make"""" utility do you wish to use? [''dflt'] "
97abc6ad
HM
2480$ GOSUB myread
2481$ ans = F$EDIT(ans,"TRIM, COMPRESS")
2482$ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2483$ IF (ans .EQS. "")
2484$ THEN build = dflt
2485$ ELSE build = ans
2486$ ENDIF
2487$ ELSE
2488$ TYPE SYS$INPUT:
7558ebc2 2489$ DECK
97abc6ad
HM
2490
2491%Config-E-VMS, ERROR:
2492 Well this looks pretty serious. Perl5 cannot be compiled without a "make"
2493 utility of some sort and after checking my "builders" list I cannot find
2494 the symbol or command you use on your system to compile programs.
2495
7558ebc2 2496$ EOD
570bb66e 2497$ READ SYS$COMMAND/PROMPT="Which ""MMS"" do you use? " ans
97abc6ad
HM
2498$ ans = F$EDIT(ans,"TRIM, COMPRESS")
2499$ ans = F$EXTRACT(0,F$LOCATE(" ",ans),ans) !throw out "-f Makefile." here
2500$ IF (ans .EQS. "")
2501$ THEN build = dflt
7558ebc2 2502$ echo "I do not know where ""make"" is, and my life depends on it."
97abc6ad
HM
2503$ echo "Go find a make program or fix your DCL$PATH setting!"
2504$ echo "ABORTING..."
2505$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
2506$ STOP
2507$ EXIT 2 !$STATUS = "%X00000002" (error)
2508$ ELSE
2509$ build = ans
2510$ ENDIF
2511$ ENDIF
2512$!
2513$ DELETE/NOLOG Makefile.;
2514$ GOTO Beyond_open
2515$Open_error:
2516$ TYPE SYS$INPUT:
7558ebc2 2517$ DECK
97abc6ad
HM
2518
2519 There seems to be trouble. I just tried to create a file in
7558ebc2 2520$ EOD
97abc6ad
HM
2521$ echo4 'F$ENVIRONMENT("DEFAULT")'
2522$ TYPE SYS$INPUT:
7558ebc2 2523$ DECK
97abc6ad
HM
2524 but was unsuccessful. I am stopping now. Please check that directories'
2525 PROTECTION bits. I will leave you in the directory where you started
2526 Configure.com
7558ebc2 2527$ EOD
97abc6ad
HM
2528$ echo4 "ABORTING..."
2529$ GOTO Clean_up
2530$ STOP
2531$ EXIT
2532$!
2533$Beyond_open:
2534$! echo " Very well I will proceed with ""''build'"""
2535$ make = F$EDIT(build,"UPCASE")
2536$!
2537$!: locate the preferred pager for this system
2538$!pagers = "most|more|less|type/page"
dfe814dc
PP
2539$ dflt = "type/page"
2540$! assume that the presence of a most symbol indicates the presence
2541$! of the pager.
2542$ IF F$TYPE(most) .EQS. "STRING" THEN dflt = "most"
2543$ IF F$TYPE(pager) .EQS. "STRING" THEN dflt = pager
2544$ rp="What pager is used on your system? [''dflt'] "
2545$ GOSUB myread
2546$ IF (ans .EQS. "")
2547$ THEN pager = dflt
2548$ ELSE pager = ans
2549$ ENDIF
97abc6ad
HM
2550$!
2551$! update [.vms]config.vms here
2552$!
2553$! update makefile here
2554$! echo4 "Updating makefile..."
2555$!
2556$ IF (make .EQS. "MMS").OR.(make .EQS. "MMK")
2557$ THEN
08c7cbbb
GS
2558$ makefile = "" !wrt MANIFEST dir
2559$ UUmakefile = "[-]DESCRIP.MMS" !wrt CWD dir
2560$ DEFmakefile = "DESCRIP.MMS" !wrt DEF dir (?)
570bb66e 2561$ Makefile_SH = "descrip_mms.template"
97abc6ad 2562$ ELSE
08c7cbbb
GS
2563$ makefile = " -f Makefile." !wrt MANIFEST dir
2564$ UUmakefile = "[-]Makefile." !wrt CWD dir
2565$ DEFmakefile = "Makefile." !wrt DEF dir (?)
570bb66e 2566$ Makefile_SH = "Makefile.in"
97abc6ad
HM
2567$ ENDIF
2568$!
7558ebc2
PP
2569$ IF macros .NES. ""
2570$ THEN
97abc6ad
HM
2571$ tmp = F$LENGTH(macros)
2572$ macros = F$EXTRACT(0,(tmp-1),macros) !miss trailing comma
2573$ macros = "/macro=(" + macros + ")"
2574$ ENDIF
498336ed
CB
2575$! Build up the extra C flags
2576$!
7558ebc2
PP
2577$ IF use_ieee_math
2578$ THEN
498336ed 2579$ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm_results"
7558ebc2
PP
2580$ ENDIF
2581$ IF be_case_sensitive
2582$ THEN
498336ed 2583$ extra_flags = "''extra_flags'" + "/Names=As_Is"
7558ebc2 2584$ ENDIF
498336ed 2585$ extra_flags = "''extra_flags'" + "''user_c_flags'"
97abc6ad 2586$!
570bb66e
JH
2587$ min_pgflquota = "100000"
2588$ pgflquota = F$STRING(F$GETJPI("","PGFLQUOTA"))
2589$ IF pgflquota .LES. min_pgflquota
2590$ THEN
2591$ echo4 "Your PGFLQUOTA of ''pgflquota' appears too small to build ''package'."
2592$ READ SYS$COMMAND/PROMPT="Continue? [n] " ans
2593$ IF ans
2594$ THEN
2595$ echo4 "Continuing..."
2596$ ELSE
2597$ echo4 "ABORTING..."
2598$ GOTO Clean_up
2599$ ENDIF
2600$ ENDIF
97abc6ad
HM
2601$!
2602$ echo ""
570bb66e
JH
2603$ echo4 "Checking the C run-time library."
2604$!
56aeb0ae 2605$! Former SUBCONFIGURE.COM
570bb66e
JH
2606$!
2607$! - build a config.sh for VMS Perl.
2608$! - use built config.sh to take config_h.SH -> config.h
2609$! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile)
2610$! vms/Makefile.in -> Makefile. (VMS GNU Makefile?)
2611$! vms/Makefile.SH -> Makefile. (VMS GNU Makefile?)
7558ebc2 2612$! - build make_ext.com extension builder procedure.
570bb66e
JH
2613$!
2614$! Note for folks from other platforms changing things in here:
2615$!
2616$! Fancy changes (based on compiler capabilities or VMS version or
2617$! whatever) are tricky, so go ahead and punt on those.
2618$!
2619$! Simple changes, though (say, always setting something to 1, or undef,
2620$! or something like that) are straightforward. Adding a new constant
2621$! item for the ultimately created config.sh requires at least one
2622$! (possibly more) line(s) to this file.
2623$!
2624$! Add a line in the format:
2625$!
2626$! $ WC "foo='undef'"
2627$!
2628$! somewhere between the line tagged '##BEGIN WRITE NEW CONSTANTS HERE##'
2629$! and the one tagged '##END WRITE NEW CONSTANTS HERE##' (note the order
2630$! is sorted ASCII and corresponds to the output of config.sh in the
2631$! Bourne shell version of Configure).
2632$! Be very careful with quoting, as it can be tricky.
2633$! For example if instead of a constant string like 'undef' or 'define'
2634$! you wanted to add something to VMS's config.sh that looks like:
2635$!
2636$! blank_string=''
2637$!
2638$! then add a line that looks like this before the
2639$! '##END WRITE NEW CONSTANTS HERE##' tagged line:
2640$!
2641$! $ WC "blank_string='" + "'"
2642$!
2643$! (+ is the string concatenator and "''var'" has the effect
2644$! of "${var}" in perl or sh, but "'const'" is not interpolated).
2645$!
2646$! Note that unitialized variables, such as a line like:
2647$!
2648$! $ WC "new_var='" + new_var + "'"
2649$!
2650$! should be avoided unless new_var has a value assigned prior
2651$! to that line (think of perl's -w warnings).
2652$!
2653$! %DCL-W-UNDSYM, undefined symbol - check validity and spelling
2654$! \NEW_VAR\
2655$!
2656$!
2657$ vms_ver = F$EXTRACT(1,3, osvers)
2658$ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc"
2659$ MCC = f$edit(mcc, "UPCASE")
2660$ C_Compiler_Replace := "CC=CC=''Mcc'''ccflags'"
2661$ IF Using_Dec_C
2662$ THEN
2663$ Checkcc := "''Mcc'/prefix=all"
2664$ ELSE
2665$ IF using_cxx
2666$ THEN
2667$ Checkcc := cxx
2668$ ELSE
2669$ Checkcc := "''Mcc'"
2670$ ENDIF
2671$ ENDIF
2672$ ccflags = ccflags + extra_flags
2673$ IF be_case_sensitive
2674$ THEN
2675$ d_vms_be_case_sensitive = "define"
2676$ ELSE
2677$ d_vms_be_case_sensitive = "undef"
2678$ ENDIF
2679$! Some constant defaults.
2680$ hwname = f$getsyi("HW_NAME")
2681$ myname = myhostname
2682$ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE")
2683$!
2684$ ccdlflags=""
2685$ cccdlflags=""
2686$!
2687$ IF use64bitint .OR. use64bitint .EQS. "define"
2688$ THEN
2689$ use64bitint = "define"
2690$ uselargefiles = "define"
2691$ uselongdouble = "define"
2692$ usemorebits = "define"
2693$ ELSE
2694$ use64bitint = "undef"
2695$ uselargefiles = "undef"
2696$ uselongdouble = "undef"
2697$ usemorebits = "undef"
2698$ ENDIF
2699$ IF use64bitall .OR. use64bitall .EQS. "define"
2700$ THEN
2701$ use64bitall = "define"
2702$ ELSE
2703$ use64bitall = "undef"
2704$ ENDIF
2705$!
2706$ usemymalloc=mymalloc
2707$!
2708$ perl_cc=Mcc
2709$!
2710$ IF (sharedperl .AND. F$GETSYI("HW_MODEL") .GE. 1024)
2711$ THEN
2712$ obj_ext=".abj"
2713$ so="axe"
2714$ dlext="axe"
2715$ exe_ext=".axe"
2716$ lib_ext=".alb"
2717$ ELSE
2718$ obj_ext=".obj"
2719$ so="exe"
2720$ dlext="exe"
2721$ exe_ext=".exe"
2722$ lib_ext=".olb"
2723$ ENDIF
2724$ dlobj="dl_vms''obj_ext'"
2725$!
2726$ cppstdin="''perl_cc'/noobj/preprocess=sys$output sys$input"
2727$ cppminus=" "
2728$ cpprun="''perl_cc'/noobj/preprocess=sys$output sys$input"
2729$ cpplast=" "
2730$!
2731$ timetype="time_t"
2732$ signal_t="void"
2733$ stdchar="char"
2734$!
2735$ IF mymalloc
2736$ THEN d_mymalloc="define"
2737$ ELSE d_mymalloc="undef"
2738$ ENDIF
2739$!
2740$ usedl="define"
ef060a86 2741$ startperl="""$ perl 'f$env(\""procedure\"")' \""'"+"'p1'\"" \""'"+"'p2'\"" \""'"+"'p3'\"" \""'"+"'p4'\"" \""'"+"'p5'\"" \""'"+"'p6'\"" \""'"+"'p7'\"" \""'"+"'p8'\""!\n"
4a5365b8 2742$ startperl=startperl + "$ exit++ + ++$status!=0 and $exit=$status=undef; while($#ARGV != -1 and $ARGV[$#ARGV] eq '"+"'){pop @ARGV;}"""
570bb66e
JH
2743$!
2744$ IF ((Use_Threads) .AND. (vms_ver .LES. "6.2"))
2745$ THEN
2746$ libs="SYS$SHARE:CMA$LIB_SHR.EXE/SHARE SYS$SHARE:CMA$RTL.EXE/SHARE SYS$SHARE:CMA$OPEN_LIB_SHR.exe/SHARE SYS$SHARE:CMA$OPEN_RTL.exe/SHARE"
2747$ ELSE
2748$ libs=" "
2749$ ENDIF
7558ebc2 2750$ IF Using_Dec_C .OR. using_cxx
570bb66e
JH
2751$ THEN
2752$ libc="(DECCRTL)"
2753$ ELSE
2754$ libc=" "
2755$ ENDIF
2756$!
94928b12
JH
2757$! perllibs should be libs with all non-core libs (such as gdbm) removed.
2758$!
2759$ perllibs=libs
2760$!
570bb66e
JH
2761$! Are we 64 bit?
2762$!
2763$ IF use64bitint .OR. use64bitint .EQS. "define"
2764$ THEN
2765$ d_PRId64 = "define"
6b356c8e
JH
2766$ d_PRIEUldbl = "define"
2767$ d_PRIFUldbl = "define"
2768$ d_PRIGUldbl = "define"
59a27e12 2769$ d_PRIeldbl = "define"
570bb66e
JH
2770$ d_PRIfldbl = "define"
2771$ d_PRIgldbl = "define"
2772$ d_PRIu64 = "define"
2773$ d_PRIo64 = "define"
2774$ d_PRIx64 = "define"
2775$ sPRId64 = """Ld"""
6b356c8e
JH
2776$ sPRIEUldbl = """LE"""
2777$ sPRIFUldbl = """LF"""
2778$ sPRIGUldbl = """LG"""
2779$ sPRIXU64 = """LX"""
59a27e12 2780$ sPRIeldbl = """Le"""
570bb66e
JH
2781$ sPRIfldbl = """Lf"""
2782$ sPRIgldbl = """Lg"""
59a27e12 2783$ sPRIi64 = """Li"""
570bb66e
JH
2784$ sPRIo64 = """Lo"""
2785$ sPRIu64 = """Lu"""
2786$ sPRIx64 = """Lx"""
2787$ d_quad = "define"
2788$ quadtype = "long long"
2789$ uquadtype = "unsigned long long"
2790$ quadkind = "QUAD_IS_LONG_LONG"
2791$ d_frexpl = "define"
dfe814dc 2792$ d_isnan = "define"
570bb66e
JH
2793$ d_isnanl = "define"
2794$ d_modfl = "define"
2795$ ELSE
2796$ d_PRId64 = "undef"
6b356c8e
JH
2797$ d_PRIEUldbl = "define"
2798$ d_PRIFUldbl = "define"
2799$ d_PRIGUldbl = "define"
2800$ d_PRIXU64 = "undef"
59a27e12 2801$ d_PRIeldbl = "define"
570bb66e
JH
2802$ d_PRIfldbl = "undef"
2803$ d_PRIgldbl = "undef"
2804$ d_PRIu64 = "undef"
2805$ d_PRIo64 = "undef"
2806$ d_PRIx64 = "undef"
2807$ sPRId64 = ""
6b356c8e
JH
2808$ sPRIEUldbl = """E"""
2809$ sPRIFUldbl = """F"""
2810$ sPRIGUldbl = """G"""
2811$ sPRIXU64 = """lX"""
59a27e12
PP
2812$ sPRIeldbl = """e"""
2813$ sPRIfldbl = """f"""
2814$ sPRIgldbl = """g"""
2815$ sPRIi64 = ""
570bb66e
JH
2816$ sPRIo64 = ""
2817$ sPRIu64 = ""
2818$ sPRIx64 = ""
2819$ d_quad = "undef"
2820$ quadtype = "long"
2821$ uquadtype = "unsigned long"
2822$ quadkind = "QUAD_IS_LONG"
2823$ d_frexpl = "undef"
dfe814dc 2824$ d_isnan = "undef"
570bb66e
JH
2825$ d_isnanl = "undef"
2826$ d_modfl = "undef"
2827$ ENDIF
b5ddfb46
PP
2828$ d_SCNfldbl = d_PRIfldbl
2829$ sSCNfldbl = sPRIfldbl ! expect consistency
570bb66e
JH
2830$!
2831$! Now some that we build up
2832$!
2833$ IF Use_Threads
2834$ THEN
2835$ IF use_5005_threads
2836$ THEN
2837$ arch = "''arch'-thread"
2838$ archname = "''archname'-thread"
2839$ d_old_pthread_create_joinable = "undef"
2840$ old_pthread_create_joinable = " "
2841$ use5005threads = "define"
2842$ useithreads = "undef"
2843$ ELSE
2844$ arch = "''arch'-ithread"
2845$ archname = "''archname'-ithread"
2846$ d_old_pthread_create_joinable = "undef"
2847$ old_pthread_create_joinable = " "
2848$ use5005threads = "undef"
2849$ useithreads = "define"
2850$ ENDIF
2851$ ELSE
2852$ d_old_pthread_create_joinable = "undef"
2853$ old_pthread_create_joinable = " "
2854$ use5005threads = "undef"
2855$ useithreads = "undef"
2856$ ENDIF
2857$!
2858$! Some that we need to invoke the compiler for
2859$!
2860$!
2861$! handy construction aliases/symbols
2862$!
2863$ OS := "open/write CONFIG []try.c"
2864$ WS := "write CONFIG"
2865$ CS := "close CONFIG"
2866$ DS := "delete/nolog/noconfirm []try.*;*"
2867$ Needs_Opt := N
2868$ good_compile = %X10B90001
2869$ IF Using_Gnu_C
2870$ THEN
2871$ open/write OPTCHAN []try.opt
2872$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
2873$ write OPTCHAN "Sys$Share:VAXCRTL/Share"
2874$ Close OPTCHAN
2875$ Needs_Opt := Y
2876$ good_compile = %X10000001
2877$ ENDIF
2878$ IF using_cxx
2879$ THEN
2880$ good_compile = %X15F60001
2881$ ENDIF
2882$ good_link = %X10000001
2883$ tmp = "" ! null string default
2884$!
2885$ GOTO beyond_compile_ok
2886$!
2887$! Check for type sizes
2888$!
2889$type_size_check:
2890$!
2891$ OS
7558ebc2
PP
2892$ WS "#if defined(__DECC) || defined(__DECCXX)"
2893$ WS "#include <stdlib.h>"
2894$ WS "#endif"
2895$ WS "#include <stdio.h>"
2896$ WS "int main()"
570bb66e
JH
2897$ WS "{"
2898$ WS "printf(""%d\n"", sizeof(''tmp'));"
7558ebc2 2899$ WS "exit(0);"
570bb66e
JH
2900$ WS "}"
2901$ CS
2902$ GOSUB compile
2903$ RETURN
2904$!
2905$!: locate header file
2906$findhdr:
2907$!
2908$ OS
7558ebc2
PP
2909$ WS "#if defined(__DECC) || defined(__DECCXX)"
2910$ WS "#include <stdlib.h>"
2911$ WS "#endif"
2912$ WS "#include <stdio.h>"
570bb66e 2913$ WS "#include <''tmp'>"
7558ebc2 2914$ WS "int main()"
570bb66e
JH
2915$ WS "{"
2916$ WS "printf(""define\n"");"
7558ebc2 2917$ WS "exit(0);"
570bb66e
JH
2918$ WS "}"
2919$ CS
2920$ GOSUB link_ok
2921$ RETURN
2922$!
2923$!: define an alternate in-header-list? function
2924$inhdr:
2925$!
2926$ GOSUB findhdr
2927$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
2928$ THEN
2929$ echo4 "<''tmp'> found."
2930$ tmp = "define"
2931$ ELSE
2932$ echo4 "<''tmp'> NOT found."
2933$ tmp = "undef"
2934$ ENDIF
2935$ RETURN
2936$!
2937$!: define an is-in-libc? function
2938$inlibc:
2939$ GOSUB link_ok
2940$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
2941$ THEN
2942$ echo4 "''tmp'() found."
2943$ tmp = "define"
2944$ ELSE
2945$ echo4 "''tmp'() NOT found."
2946$ tmp = "undef"
2947$ ENDIF
2948$ RETURN
2949$!
2950$!: define a shorthand compile call
2951$compile:
2952$ GOSUB link_ok
2953$just_mcr_it:
2954$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
2955$ THEN
2956$ OPEN/WRITE CONFIG []try.out
2957$ DEFINE/USER_MODE SYS$ERROR CONFIG
2958$ DEFINE/USER_MODE SYS$OUTPUT CONFIG
2959$ MCR []try.exe
2960$ CLOSE CONFIG
2961$ OPEN/READ CONFIG []try.out
2962$ READ CONFIG tmp
2963$ CLOSE CONFIG
2964$ DELETE/NOLOG/NOCONFIRM []try.out;
2965$ DELETE/NOLOG/NOCONFIRM []try.exe;
2966$ ELSE
2967$ tmp = "" ! null string default
2968$ ENDIF
2969$ RETURN
2970$!
2971$link_ok:
2972$ GOSUB compile_ok
2973$ DEFINE/USER_MODE SYS$ERROR _NLA0:
2974$ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
2975$ SET NOON
2976$ IF Needs_Opt
2977$ THEN
2978$ 'ld' try.obj,try.opt/opt
2979$ link_status = $status
2980$ ELSE
2981$ 'ld' try.obj
2982$ link_status = $status
2983$ ENDIF
2984$ SET ON
2985$ IF F$SEARCH("try.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM try.obj;
2986$ RETURN
2987$!
2988$!: define a shorthand compile call for compilations that should be ok.
2989$compile_ok:
2990$ DEFINE/USER_MODE SYS$ERROR _NLA0:
2991$ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
2992$ SET NOON
2993$ 'Checkcc' try.c
2994$ compile_status = $status
2995$ SET ON
2996$ DELETE/NOLOG/NOCONFIRM try.c;
2997$ RETURN
2998$!
2999$beyond_compile_ok:
3000$!
3001$! Check for __STDC__
3002$!
3003$ OS
7558ebc2
PP
3004$ WS "#if defined(__DECC) || defined(__DECCXX)"
3005$ WS "#include <stdlib.h>"
3006$ WS "#endif"
3007$ WS "#include <stdio.h>"
3008$ WS "int main()"
570bb66e 3009$ WS "{"
7558ebc2
PP
3010$ WS "#ifdef __STDC__"
3011$ WS "printf(""42\n"");"
3012$ WS "#else"
3013$ WS "printf(""1\n"");"
3014$ WS "#endif"
3015$ WS "exit(0);"
570bb66e
JH
3016$ WS "}"
3017$ CS
3018$ GOSUB compile
3019$ cpp_stuff=tmp
3020$ IF F$INTEGER(tmp) .eq. 42
3021$ THEN
3022$ echo4 "Your C compiler and pre-processor defines the symbol:"
3023$ echo4 "__STDC__"
3024$ ENDIF
3025$!
3026$! Check for double size
3027$!
3028$ echo4 "Checking to see how big your double precision numbers are..."
3029$ tmp="double"
3030$ GOSUB type_size_check
3031$ doublesize = tmp
3032$ echo "Your double is ''doublesize' bytes long."
3033$!
3034$! Check for long double size
3035$!
3036$ OS
7558ebc2
PP
3037$ WS "#if defined(__DECC) || defined(__DECCXX)"
3038$ WS "#include <stdlib.h>"
3039$ WS "#endif"
3040$ WS "#include <stdio.h>"
3041$ WS "int main()"
570bb66e 3042$ WS "{"
7558ebc2
PP
3043$ WS "printf(""%d\n"", sizeof(long double));"
3044$ WS "exit(0);"
570bb66e
JH
3045$ WS "}"
3046$ CS
3047$ echo4 "Checking to see if you have long double..."
3048$ GOSUB link_ok
3049$ IF link_status .NE. good_link
3050$ THEN
3051$ longdblsize="0"
3052$ d_longdbl="undef"
3053$ echo "You do not have long double."
3054$ ELSE
3055$ echo "You have long double."
3056$ echo4 "Checking to see how big your long doubles are..."
3057$ GOSUB just_mcr_it
3058$ longdblsize = tmp
3059$ d_longdbl = "define"
3060$ echo "Your long doubles are ''longdblsize' bytes long."
3061$ ENDIF
3062$!
3063$!: check for long long
3064$ OS
7558ebc2
PP
3065$ WS "#if defined(__DECC) || defined(__DECCXX)"
3066$ WS "#include <stdlib.h>"
3067$ WS "#endif"
3068$ WS "#include <stdio.h>"
3069$ WS "int main()"
570bb66e 3070$ WS "{"
7558ebc2
PP
3071$ WS "printf(""%d\n"", sizeof(long long));"
3072$ WS "exit(0);"
570bb66e
JH
3073$ WS "}"
3074$ CS
3075$ echo4 "Checking to see if you have long long..."
3076$ GOSUB link_ok
3077$ IF link_status .NE. good_link
3078$ THEN
3079$ longlongsize="0"
3080$ d_longlong="undef"
3081$ echo "You do not have long long."
3082$ ELSE
3083$ echo "You have long long."
3084$ echo4 "Checking to see how big your long longs are..."
3085$ GOSUB just_mcr_it
3086$ longlongsize = tmp
3087$ d_longlong = "define"
3088$ echo "Your long longs are ''longlongsize' bytes long."
3089$ ENDIF
3090$!
3091$! Check the prototype for getgid
3092$!
3093$ echo "Looking for the type for group ids returned by getgid()."
3094$ OS
7558ebc2
PP
3095$ WS "#if defined(__DECC) || defined(__DECCXX)"
3096$ WS "#include <stdlib.h>"
3097$ WS "#endif"
3098$ WS "#include <stdio.h>"
3099$ WS "#include <types.h>"
3100$ WS "int main()"
570bb66e 3101$ WS "{"
7558ebc2
PP
3102$ WS "gid_t foo;"
3103$ WS "exit(0);"
570bb66e
JH
3104$ WS "}"
3105$ CS
3106$ GOSUB compile_ok
3107$ IF compile_status .NE. good_compile
3108$ THEN
3109$! Okay, gid_t failed. Must be unsigned int
3110$ gidtype = "unsigned int"
3111$ echo4 "assuming ""''gidtype'""."
3112$ ELSE
3113$ gidtype = "gid_t"
3114$ echo4 "gid_t found."
3115$ ENDIF
3116$!
3117$! Check to see if we've got dev_t
3118$!
3119$ echo "Looking for the type for dev."
3120$ OS
7558ebc2
PP
3121$ WS "#if defined(__DECC) || defined(__DECCXX)"
3122$ WS "#include <stdlib.h>"
3123$ WS "#endif"
3124$ WS "#include <stdio.h>"
3125$ WS "#include <types.h>"
3126$ WS "int main()"
570bb66e 3127$ WS "{"
7558ebc2
PP
3128$ WS "dev_t foo;"
3129$ WS "exit(0);"
570bb66e
JH
3130$ WS "}"
3131$ CS
3132$ GOSUB compile_ok
3133$ IF compile_status .NE. good_compile
3134$ THEN
3135$! Okay, dev_t failed. Must be unsigned int
3136$ devtype = "unsigned int"
3137$ echo4 "assuming ""''devtype'""."
3138$ ELSE
3139$ devtype = "dev_t"
3140$ echo4 "dev_t found."
3141$ ENDIF
3142$!
3143$! Check to see if we've got unistd.h (which we ought to, but you never know)
3144$!
3145$ i_netdb = "undef"
3146$ tmp = "unistd.h"
3147$ GOSUB inhdr
3148$ i_unistd = tmp
3149$!
3150$!: see if this is a libutil.h system
3151$!
3152$ tmp = "libutil.h"
3153$ GOSUB inhdr
3154$ i_libutil = tmp
3155$!
3156$! Check to see if we've got shadow.h (probably not, but...)
3157$!
3158$ tmp = "shadow.h"
3159$ GOSUB inhdr
3160$ i_shadow = tmp
3161$!
3162$! Check to see if we've got socks.h (probably not, but...)
3163$!
3164$ tmp = "socks.h"
3165$ GOSUB inhdr
3166$ i_socks = tmp
3167$!
3168$! Check the prototype for select
3169$!
3170$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3171$ THEN
3172$ OS
7558ebc2
PP
3173$ WS "#if defined(__DECC) || defined(__DECCXX)"
3174$ WS "#include <stdlib.h>"
3175$ WS "#endif"
3176$ WS "#include <stdio.h>"
3177$ WS "#include <types.h>"
3178$ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
570bb66e
JH
3179$ IF Has_Socketshr
3180$ THEN
3181$ WS "#include <socketshr.h>"
3182$ ELSE
7558ebc2
PP
3183$ WS "#include <time.h>"
3184$ WS "#include <socket.h>"
570bb66e 3185$ ENDIF
7558ebc2 3186$ WS "int main()"
570bb66e 3187$ WS "{"
7558ebc2
PP
3188$ WS "fd_set *foo;"
3189$ WS "int bar;"
3190$ WS "foo = NULL;"
3191$ WS "bar = select(2, foo, foo, foo, NULL);"
3192$ WS "exit(0);"
570bb66e
JH
3193$ WS "}"
3194$ CS
3195$ GOSUB compile_ok
3196$ IF compile_status .NE. good_compile
3197$ THEN
3198$! Okay, select failed. Must be an int *
3199$ selecttype = "int *"
3200$ echo4 "select() NOT found."
3201$ ELSE
3202$ selecttype="fd_set *"
3203$ echo4 "select() found."
3204$ ENDIF
3205$ ELSE
3206$ ! No sockets, so stick in an int * : no select, so pick a harmless default
3207$ selecttype = "int *"
3208$ ENDIF
3209$!
3210$! Check to see if fd_set exists
3211$!
3212$ echo "Checking to see how well your C compiler handles fd_set and friends ..."
3213$ OS
7558ebc2
PP
3214$ WS "#if defined(__DECC) || defined(__DECCXX)"
3215$ WS "#include <stdlib.h>"
3216$ WS "#endif"
3217$ WS "#include <stdio.h>"
3218$ WS "#include <types.h>"
570bb66e
JH
3219$ IF Has_Socketshr
3220$ THEN
3221$ WS "#include <socketshr.h>"
3222$ ENDIF
3223$ IF Has_Dec_C_Sockets
3224$ THEN
7558ebc2
PP
3225$ WS "#include <time.h>"
3226$ WS "#include <socket.h>"
570bb66e 3227$ ENDIF
7558ebc2 3228$ WS "int main()"
570bb66e 3229$ WS "{"
7558ebc2
PP
3230$ WS "fd_set *foo;"
3231$ WS "int bar;"
3232$ WS "exit(0);"
570bb66e
JH
3233$ WS "}"
3234$ CS
3235$ GOSUB compile_ok
3236$ IF compile_status .ne. good_compile
3237$ THEN
3238$! Okay, fd_set failed. Must not exist
3239$ d_fd_set = "undef"
3240$ echo4 "Hmm, your compiler has some difficulty with fd_set."
3241$ ELSE
3242$ d_fd_set="define"
3243$ echo4 "Well, your system knows about the normal fd_set typedef..."
3244$ ENDIF
3245$!
3246$! Check for inttypes.h
3247$!
3248$ tmp = "inttypes.h"
3249$ GOSUB inhdr
3250$ i_inttypes = tmp
3251$!
3252$! Check to see if off64_t exists
3253$!
3254$ echo4 "Checking to see if you have off64_t..."
3255$ OS
7558ebc2
PP
3256$ WS "#if defined(__DECC) || defined(__DECCXX)"
3257$ WS "#include <stdlib.h>"
3258$ WS "#endif"
3259$ WS "#include <stdio.h>"
3260$ WS "#include <types.h>"
3261$ WS "#''i_inttypes' IIH"
3262$ WS "#ifdef IIH"
3263$ WS "#include <inttypes.h>"
3264$ WS "#endif"
3265$ WS "int main()"
570bb66e 3266$ WS "{"
7558ebc2
PP
3267$ WS "off64_t bar;"
3268$ WS "exit(0);"
570bb66e
JH
3269$ WS "}"
3270$ CS
3271$ GOSUB compile_ok
3272$ IF compile_status .EQ. good_compile
3273$ THEN
3274$ d_off64_t="define"
3275$ echo "You have off64_t."
3276$ ELSE
3277$ d_off64_t = "undef"
3278$ echo "You do not have off64_t."
3279$ ENDIF
3280$!
3281$! Check to see if fpos64_t exists
3282$!
3283$ echo4 "Checking to see if you have fpos64_t..."
3284$ OS
7558ebc2
PP
3285$ WS "#if defined(__DECC) || defined(__DECCXX)"
3286$ WS "#include <stdlib.h>"
3287$ WS "#endif"
3288$ WS "#include <stdio.h>"
3289$ WS "#include <types.h>"
3290$ WS "#''i_inttypes' IIH"
3291$ WS "#ifdef IIH"
3292$ WS "#include <inttypes.h>"
3293$ WS "#endif"
3294$ WS "int main()"
570bb66e 3295$ WS "{"
7558ebc2
PP
3296$ WS "fpos64_t bar;"
3297$ WS "exit(0);"
570bb66e
JH
3298$ WS "}"
3299$ CS
3300$ GOSUB compile_ok
3301$ IF compile_status .EQ. good_compile
3302$ THEN
3303$ d_fpos64_t="define"
3304$ echo "You have fpos64_t."
3305$ ELSE
3306$ d_fpos64_t = "undef"
3307$ echo "You do not have fpos64_t."
3308$ ENDIF
3309$!
3310$! Check to see if int64_t exists
3311$!
3312$ echo4 "Checking to see if you have int64_t..."
3313$ OS
7558ebc2
PP
3314$ WS "#if defined(__DECC) || defined(__DECCXX)"
3315$ WS "#include <stdlib.h>"
3316$ WS "#endif"
3317$ WS "#include <stdio.h>"
3318$ WS "#include <types.h>"
3319$ WS "#''i_inttypes' IIH"
3320$ WS "#ifdef IIH"
3321$ WS "#include <inttypes.h>"
3322$ WS "#endif"
3323$ WS "int main()"
570bb66e 3324$ WS "{"
7558ebc2
PP
3325$ WS "int64_t bar;"
3326$ WS "exit(0);"
570bb66e
JH
3327$ WS "}"
3328$ CS
3329$ GOSUB compile_ok
3330$ IF compile_status .EQ. good_compile
3331$ THEN
3332$ d_int64_t="define"
3333$ echo "You have int64_t."
3334$ ELSE
3335$ d_int64_t = "undef"
3336$ echo "You do not have int64_t."
3337$ ENDIF
3338$!
3339$!: see if this is a netdb.h system
3340$ IF Has_Dec_C_Sockets
3341$ THEN
3342$ tmp = "netdb.h"
3343$ GOSUB inhdr
3344$ i_netdb = tmp
3345$ ENDIF
3346$!
3347$! Check for h_errno
3348$!
3349$ echo4 "Checking to see if you have h_errno..."
3350$ OS
7558ebc2
PP
3351$ WS "#if defined(__DECC) || defined(__DECCXX)"
3352$ WS "#include <stdlib.h>"
3353$ WS "#endif"
3354$ WS "#include <stdio.h>"
3355$ IF i_unistd .EQS. "define" THEN WS "#include <unistd.h>"
3356$ IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
3357$ WS "int main()"
570bb66e 3358$ WS "{"
7558ebc2
PP
3359$ WS "h_errno = 3;"
3360$ WS "exit(0);"
570bb66e
JH
3361$ WS "}"
3362$ CS
3363$ GOSUB link_ok
3364$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3365$ THEN
3366$ d_herrno="define"
3367$ echo "You have h_errno."
3368$ ELSE
3369$ d_herrno="undef"
3370$ echo "You do not have h_errno."
3371$ ENDIF
3372$!
3373$! Check to see if gethostname exists
3374$!
3375$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3376$ THEN
3377$ OS
7558ebc2
PP
3378$ WS "#if defined(__DECC) || defined(__DECCXX)"
3379$ WS "#include <stdlib.h>"
3380$ WS "#endif"
3381$ WS "#include <stdio.h>"
3382$ WS "#include <types.h>"
570bb66e
JH
3383$ IF Has_Socketshr
3384$ THEN
3385$ WS "#include <socketshr.h>"
3386$ ELSE
7558ebc2
PP
3387$ WS "#include <time.h>"
3388$ WS "#include <socket.h>"
570bb66e 3389$ ENDIF
7558ebc2 3390$ WS "int main()"
570bb66e 3391$ WS "{"
7558ebc2
PP
3392$ WS "char name[100];"
3393$ WS "int bar, baz;"
3394$ WS "bar = 100;"
3395$ WS "baz = gethostname(name, bar);"
3396$ WS "exit(0);"
570bb66e
JH
3397$ WS "}"
3398$ CS
3399$ GOSUB link_ok
3400$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3401$ THEN
3402$ d_gethname="define"
3403$ echo4 "gethostname() found."
3404$ ELSE
3405$ d_gethname="undef"
3406$ ENDIF
3407$ ELSE
3408$ ! No sockets, so no gethname
3409$ d_gethname = "undef"
3410$ ENDIF
3411$!
3412$! Check for sys/file.h
3413$!
3414$ tmp = "sys/file.h"
3415$ GOSUB inhdr
3416$ i_sysfile = tmp
3417$!
3418$! Check for sys/utsname.h
3419$!
3420$ tmp = "sys/utsname.h"
3421$ GOSUB inhdr
3422$ i_sysutsname = tmp
3423$!
3424$! Check for syslog.h
3425$!
3426$ tmp = "syslog.h"
3427$ GOSUB inhdr
3428$ i_syslog = tmp
3429$!
3430$! Check for poll.h
3431$!
3432$ tmp = "poll.h"
3433$ GOSUB inhdr
3434$ i_poll = tmp
3435$!
3436$! Check for sys/uio.h
3437$!
3438$ tmp = "sys/uio.h"
3439$ GOSUB inhdr
3440$ i_sysuio = tmp
3441$!
3442$! Check for sys/mode.h
3443$!
3444$ tmp = "sys/mode.h"
3445$ GOSUB inhdr
3446$ i_sysmode = tmp
3447$!
3448$! Check for sys/access.h
3449$!
3450$ tmp = "sys/access.h"
3451$ GOSUB inhdr
3452$ i_sysaccess = tmp
3453$!
3454$! Check for sys/security.h
3455$!
3456$ tmp = "sys/security.h"
3457$ GOSUB inhdr
3458$ i_syssecrt = tmp
3459$!
3460$! Check for fcntl.h
3461$!
3462$ tmp = "fcntl.h"
3463$ GOSUB inhdr
3464$ i_fcntl = tmp
3465$!
3466$! Check for fcntl
3467$!
3468$ OS
7558ebc2
PP
3469$ WS "#if defined(__DECC) || defined(__DECCXX)"
3470$ WS "#include <stdlib.h>"
3471$ WS "#endif"
3472$ WS "#include <stdio.h>"
3473$ WS "#include <fcntl.h>"
3474$ WS "int main()"
570bb66e 3475$ WS "{"
7558ebc2
PP
3476$ WS "fcntl(1,2,3);"
3477$ WS "exit(0);"
570bb66e
JH
3478$ WS "}"
3479$ CS
3480$ tmp = "fcntl"
3481$ GOSUB inlibc
3482$ d_fcntl = tmp
3483$!
c44c4826
CB
3484$! Check for fcntl locking capability
3485$!
3486$ echo4 "Checking if fcntl-based file locking works... "
3487$ tmp = "undef"
3488$ IF d_fcntl .EQS. "define"
3489$ THEN
3490$ OS
3491$ WS "#include <stdio.h>"
3492$ WS "#if defined(__DECC) || defined(__DECCXX)"
3493$ WS "#include <stdlib.h>"
3494$ WS "#endif"
3495$ WS "#include <fcntl.h>"
3496$ WS "#include <unistd.h>"
3497$ WS "int main() {"
3498$ WS "#if defined(F_SETLK) && defined(F_SETLKW)"
3499$ WS " struct flock flock;"
3500$ WS " int retval, fd;"
3501$ WS " fd = open(""try.c"", O_RDONLY);"
3502$ WS " flock.l_type = F_RDLCK;"
3503$ WS " flock.l_whence = SEEK_SET;"
3504$ WS " flock.l_start = flock.l_len = 0;"
3505$ WS " retval = fcntl(fd, F_SETLK, &flock);"
3506$ WS " close(fd);"
3507$ WS " (retval < 0 ? printf(""undef\n"") : printf(""define\n""));"
3508$ WS "#else"
3509$ WS " printf(""undef\n"");"
3510$ WS "#endif"
3511$ WS "}"
3512$ CS
3513$ GOSUB link_ok
3514$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
3515$ THEN
3516$ GOSUB just_mcr_it
3517$ IF tmp .EQS. "define"
3518$ THEN
3519$ echo4 "Yes, it seems to work."
3520$ ELSE
3521$ echo4 "Nope, it didn't work."
3522$ ENDIF
3523$ ELSE
3524$ echo4 "I'm unable to compile the test program, so I'll assume not."
3525$ tmp = "undef"
3526$ ENDIF
3527$ ELSE
3528$ echo4 "Nope, since you don't even have fcntl()."
3529$ ENDIF
3530$ d_fcntl_can_lock = tmp
3531$!
570bb66e
JH
3532$! Check for memchr
3533$!
3534$ OS
7558ebc2
PP
3535$ WS "#if defined(__DECC) || defined(__DECCXX)"
3536$ WS "#include <stdlib.h>"
3537$ WS "#endif"
3538$ WS "#include <string.h>"
3539$ WS "int main()"
570bb66e 3540$ WS "{"
7558ebc2
PP
3541$ WS "char * place;"
3542$ WS "place = memchr(""foo"", 47, 3)"
3543$ WS "exit(0);"
570bb66e
JH
3544$ WS "}"
3545$ CS
3546$ tmp = "memchr"
3547$ GOSUB inlibc
3548$ d_memchr = tmp
3549$!
3550$! Check for strtoull
3551$!
3552$ OS
7558ebc2
PP
3553$ WS "#if defined(__DECC) || defined(__DECCXX)"
3554$ WS "#include <stdlib.h>"
3555$ WS "#endif"
3556$ WS "#include <string.h>"
3557$ WS "int main()"
570bb66e 3558$ WS "{"
7558ebc2
PP
3559$ WS "unsigned __int64 result;"
3560$ WS "result = strtoull(""123123"", NULL, 10);"
3561$ WS "exit(0);"
570bb66e
JH
3562$ WS "}"
3563$ CS
3564$ tmp = "strtoull"
3565$ GOSUB inlibc
3566$ d_strtoull = tmp
3567$!
3568$! Check for strtouq
3569$!
3570$ OS
7558ebc2
PP
3571$ WS "#if defined(__DECC) || defined(__DECCXX)"
3572$ WS "#include <stdlib.h>"
3573$ WS "#endif"
3574$ WS "#include <string.h>"
3575$ WS "int main()"
570bb66e 3576$ WS "{"
7558ebc2
PP
3577$ WS "unsigned __int64 result;"
3578$ WS "result = strtouq(""123123"", NULL, 10);"
3579$ WS "exit(0);"
570bb66e
JH
3580$ WS "}"
3581$ CS
3582$ tmp = "strtouq"
3583$ GOSUB inlibc
3584$ d_strtouq = tmp
3585$!
3586$! Check for strtoll
3587$!
3588$ OS
7558ebc2
PP
3589$ WS "#if defined(__DECC) || defined(__DECCXX)"
3590$ WS "#include <stdlib.h>"
3591$ WS "#endif"
3592$ WS "#include <string.h>"
3593$ WS "int main()"
570bb66e 3594$ WS "{"
7558ebc2
PP
3595$ WS "__int64 result;"
3596$ WS "result = strtoll(""123123"", NULL, 10);"
3597$ WS "exit(0);"
570bb66e
JH
3598$ WS "}"
3599$ CS
3600$ tmp = "strtoll"
3601$ GOSUB inlibc
3602$ d_strtoll = tmp
3603$!
d0e6d399
NC
3604$! Check for strtoq
3605$!
3606$ OS
3607$ WS "#if defined(__DECC) || defined(__DECCXX)"
3608$ WS "#include <stdlib.h>"
28e5dec8
JH
3609$ WS "#endif"
3610$ WS "#include <string.h>"
3611$ WS "int main()"
3612$ WS "{"
3613$ WS "__int64 result;"
3614$ WS "result = strtoq(""123123"", NULL, 10);"
3615$ WS "exit(0);"
3616$ WS "}"
3617$ CS
3618$ tmp = "strtoq"
3619$ GOSUB inlibc
3620$ d_strtoq = tmp
3621$!
3622$! Check for strtoq
3623$!
3624$ OS
3625$ WS "#if defined(__DECC) || defined(__DECCXX)"
3626$ WS "#include <stdlib.h>"
d0e6d399
NC
3627$ WS "#endif"
3628$ WS "#include <string.h>"
3629$ WS "int main()"
3630$ WS "{"
3631$ WS "__int64 result;"
3632$ WS "result = strtoq(""123123"", NULL, 10);"
3633$ WS "exit(0);"
3634$ WS "}"
3635$ CS
3636$ tmp = "strtoq"
3637$ GOSUB inlibc
3638$ d_strtoq = tmp
3639$!
570bb66e
JH
3640$! Check for strtold
3641$!
3642$ OS
7558ebc2
PP
3643$ WS "#if defined(__DECC) || defined(__DECCXX)"
3644$ WS "#include <stdlib.h>"
3645$ WS "#endif"
3646$ WS "#include <string.h>"
3647$ WS "int main()"
570bb66e 3648$ WS "{"
7558ebc2
PP
3649$ WS "long double result;"
3650$ WS "result = strtold(""123123"", NULL, 10);"
3651$ WS "exit(0);"
570bb66e
JH
3652$ WS "}"
3653$ CS
3654$ tmp = "strtold"
3655$ GOSUB inlibc
3656$ d_strtold = tmp
3657$!
3658$! Check for atoll
3659$!
3660$ OS
7558ebc2
PP
3661$ WS "#if defined(__DECC) || defined(__DECCXX)"
3662$ WS "#include <stdlib.h>"
3663$ WS "#endif"
3664$ WS "#include <string.h>"
3665$ WS "int main()"
570bb66e 3666$ WS "{"
7558ebc2
PP
3667$ WS " __int64 result;"
3668$ WS "result = atoll(""123123"");"
3669$ WS "exit(0);"
570bb66e
JH
3670$ WS "}"
3671$ CS
3672$ tmp = "atoll"
3673$ GOSUB inlibc
3674$ d_atoll = tmp
3675$!
3676$! Check for atolf
3677$!
3678$ OS
7558ebc2
PP
3679$ WS "#if defined(__DECC) || defined(__DECCXX)"
3680$ WS "#include <stdlib.h>"
3681$ WS "#endif"
3682$ WS "#include <string.h>"
3683$ WS "int main()"
570bb66e 3684$ WS "{"
7558ebc2
PP
3685$ WS "long double"
3686$ WS "result = atolf(""123123"");"
3687$ WS "exit(0);"
570bb66e
JH
3688$ WS "}"
3689$ CS
3690$ tmp = "atolf"
3691$ GOSUB inlibc
3692$ d_atolf = tmp
3693$!
3694$! Check for access
3695$!
3696$ OS
7558ebc2
PP
3697$ WS "#if defined(__DECC) || defined(__DECCXX)"
3698$ WS "#include <stdlib.h>"
3699$ WS "#endif"
3700$ WS "#include <stdio.h>"
3701$ WS "int main()"
570bb66e 3702$ WS "{"
7558ebc2
PP
3703$ WS "access(""foo"", F_OK);"
3704$ WS "exit(0);"
570bb66e
JH
3705$ WS "}"
3706$ CS
3707$ tmp = "acess"
3708$ GOSUB inlibc
3709$ d_access = tmp
3710$!
3711$! Check for bzero
3712$!
3713$ OS
7558ebc2
PP
3714$ WS "#if defined(__DECC) || defined(__DECCXX)"
3715$ WS "#include <stdlib.h>"
3716$ WS "#endif"
3717$ WS "#include <stdio.h>"
3718$ WS "#include <strings.h>"
3719$ WS "int main()"
570bb66e 3720$ WS "{"
7558ebc2
PP
3721$ WS "char foo[10];"
3722$ WS "bzero(foo, 10);"
3723$ WS "exit(0);"
570bb66e
JH
3724$ WS "}"
3725$ CS
3726$ tmp = "bzero"
3727$ GOSUB inlibc
3728$ d_bzero = tmp
3729$!
3730$! Check for bcopy
3731$!
3732$ OS
7558ebc2
PP
3733$ WS "#if defined(__DECC) || defined(__DECCXX)"
3734$ WS "#include <stdlib.h>"
3735$ WS "#endif"
3736$ WS "#include <stdio.h>"
3737$ WS "#include <strings.h>"
3738$ WS "int main()"
570bb66e 3739$ WS "{"
7558ebc2
PP
3740$ WS "char foo[10], bar[10];"
3741$ WS "bcopy(""foo"", bar, 3);"
3742$ WS "exit(0);"
570bb66e
JH
3743$ WS "}"
3744$ CS
3745$ tmp = "bcopy"
3746$ GOSUB inlibc
3747$ d_bcopy = tmp
3748$!
3749$! Check for mkstemp
3750$!
3751$ OS
7558ebc2
PP
3752$ WS "#if defined(__DECC) || defined(__DECCXX)"
3753$ WS "#include <stdlib.h>"
3754$ WS "#endif"
3755$ WS "#include <stdio.h>"
3756$ WS "int main()"
570bb66e 3757$ WS "{"
7558ebc2
PP
3758$ WS "mkstemp(""foo"");"
3759$ WS "exit(0);"
570bb66e
JH
3760$ WS "}"
3761$ CS
3762$ tmp = "mkstemp"
3763$ GOSUB inlibc
3764$ d_mkstemp = tmp
3765$!
3766$! Check for mkstemps
3767$!
3768$ OS
7558ebc2
PP
3769$ WS "#if defined(__DECC) || defined(__DECCXX)"
3770$ WS "#include <stdlib.h>"
3771$ WS "#endif"
3772$ WS "#include <stdio.h>"
3773$ WS "int main()"
570bb66e 3774$ WS "{"
7558ebc2
PP
3775$ WS "mkstemps(""foo"", 1);"
3776$ WS "exit(0);"
570bb66e
JH
3777$ WS "}"
3778$ CS
3779$ tmp = "mkstemps"
3780$ GOSUB inlibc
3781$ d_mkstemps = tmp
3782$!
3783$! Check for iconv
3784$!
3785$ OS
7558ebc2
PP
3786$ WS "#if defined(__DECC) || defined(__DECCXX)"
3787$ WS "#include <stdlib.h>"
3788$ WS "#endif"
3789$ WS "#include <stdio.h>"
3790$ WS "#include <iconv.h>"
3791$ WS "int main()"
570bb66e
JH
3792$ WS "{"
3793$ WS " iconv_t cd = (iconv_t)0;"
3794$ WS " char *inbuf, *outbuf;"
3795$ WS " size_t inleft, outleft;"
3796$ WS " iconv(cd, &inbuf, &inleft, &outbuf, &outleft);"
7558ebc2 3797$ WS " exit(0);"
570bb66e
JH
3798$ WS "}"
3799$ CS
3800$ GOSUB link_ok
3801$ IF compile_status .ne. good_compile
3802$ THEN
3803$ d_iconv="undef"
3804$ i_iconv="undef"
3805$ ELSE
3806$ IF link_status .ne. good_link
3807$ THEN
3808$ d_iconv="undef"
3809$ i_iconv="undef"
3810$ ELSE
3811$ d_iconv="define"
3812$ i_iconv="define"
3813$ ENDIF
3814$ ENDIF
3815$ IF i_iconv .eqs. "define"
3816$ THEN echo4 "<iconv.h> found."
3817$ ELSE echo4 "<iconv.h> NOT found."
3818$ ENDIF
3819$!
3820$! Check for mkdtemp
3821$!
3822$ OS
7558ebc2
PP
3823$ WS "#if defined(__DECC) || defined(__DECCXX)"
3824$ WS "#include <stdlib.h>"
3825$ WS "#endif"
3826$ WS "#include <stdio.h>"
3827$ WS "int main()"
570bb66e 3828$ WS "{"
7558ebc2
PP
3829$ WS "mkdtemp(""foo"");"
3830$ WS "exit(0);"
570bb66e
JH
3831$ WS "}"
3832$ CS
3833$ tmp = "mkdtemp"
3834$ GOSUB inlibc
3835$ d_mkdtemp = tmp
3836$!
3837$! Check for setvbuf
3838$!
3839$ OS
7558ebc2
PP
3840$ WS "#if defined(__DECC) || defined(__DECCXX)"
3841$ WS "#include <stdlib.h>"
3842$ WS "#endif"
3843$ WS "#include <stdio.h>"
3844$ WS "int main()"
570bb66e 3845$ WS "{"
7558ebc2
PP
3846$ WS "FILE *foo;"
3847$ WS "char Buffer[99];"
3848$ WS "foo = fopen(""foo"", ""r"");"
3849$ WS "setvbuf(foo, Buffer, 0, 0);"
3850$ WS "exit(0);"
570bb66e
JH
3851$ WS "}"
3852$ CS
3853$ tmp = "setvbuf"
3854$ GOSUB inlibc
3855$ d_setvbuf = tmp
3856$!
3857$! Check for setenv
3858$!
3859$ OS
7558ebc2
PP
3860$ WS "#if defined(__DECC) || defined(__DECCXX)"
3861$ WS "#include <stdlib.h>"
3862$ WS "#endif"
3863$ WS "#include <stdio.h>"
3864$ WS "int main()"
570bb66e 3865$ WS "{"
7558ebc2
PP
3866$ WS "setenv(""FOO"", ""BAR"", 0);"
3867$ WS "exit(0);"
570bb66e
JH
3868$ WS "}"
3869$ CS
3870$ tmp = "setenv"
3871$ GOSUB inlibc
3872$ d_setenv = tmp
3873$!
3874$! Check for setproctitle
3875$!
3876$ OS
7558ebc2
PP
3877$ WS "#if defined(__DECC) || defined(__DECCXX)"
3878$ WS "#include <stdlib.h>"
3879$ WS "#endif"
3880$ WS "#include <stdio.h>"
3881$ WS "int main()"
570bb66e 3882$ WS "{"
7558ebc2
PP
3883$ WS "setproctitle(""%s"", ""FOO"");"
3884$ WS "exit(0);"
570bb66e
JH
3885$ WS "}"
3886$ CS
3887$ tmp = "setproctitle"
3888$ GOSUB inlibc
3889$ d_setproctitle = tmp
3890$!
3891$! Check for <netinet/in.h>
3892$!
3893$ IF Has_Dec_C_Sockets .or. Has_Socketshr
3894$ THEN
3895$ tmp = "netinet/in.h"
3896$ GOSUB inhdr
3897$ i_niin = tmp
3898$ ELSE
3899$ i_niin="undef"
3900$ ENDIF
3901$!
3902$! Check for <netinet/tcp.h>
3903$!
3904$ IF Has_Dec_C_Sockets .or. Has_Socketshr
3905$ THEN
3906$ tmp = "netinet/tcp.h"
3907$ GOSUB inhdr
3908$ i_netinettcp = tmp
3909$ ELSE
3910$ i_netinettcp="undef"
3911$ ENDIF
3912$!
3913$! Check for endhostent
3914$!
3915$ IF Has_Dec_C_Sockets .or. Has_Socketshr
3916$ THEN
3917$ OS
7558ebc2
PP
3918$ WS "#if defined(__DECC) || defined(__DECCXX)"
3919$ WS "#include <stdlib.h>"
3920$ WS "#endif"
3921$ WS "#include <stdio.h>"
570bb66e
JH
3922$ IF Has_Socketshr
3923$ THEN WS "#include <socketshr.h>"
7558ebc2 3924$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 3925$ ENDIF
7558ebc2 3926$ WS "int main()"
570bb66e 3927$ WS "{"
7558ebc2
PP
3928$ WS "endhostent();"
3929$ WS "exit(0);"
570bb66e
JH
3930$ WS "}"
3931$ CS
3932$ tmp = "endhostent"
3933$ GOSUB inlibc
3934$ d_endhent = tmp
3935$ ELSE
3936$ d_endhent="undef"
3937$ ENDIF
3938$!
3939$! Check for endnetent
3940$!
3941$ IF Has_Dec_C_Sockets .or. Has_Socketshr
3942$ THEN
3943$ OS
7558ebc2
PP
3944$ WS "#if defined(__DECC) || defined(__DECCXX)"
3945$ WS "#include <stdlib.h>"
3946$ WS "#endif"
3947$ WS "#include <stdio.h>"
570bb66e
JH
3948$ IF Has_Socketshr
3949$ THEN WS "#include <socketshr.h>"
7558ebc2 3950$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e
JH
3951$ ENDIF
3952$ WS "int main()"
3953$ WS "{"
3954$ WS "endnetent();"
3955$ WS "exit(0);"
3956$ WS "}"
3957$ CS
3958$ tmp = "endnetent"
3959$ GOSUB inlibc
3960$ d_endnent = tmp
3961$ ELSE
3962$ d_endnent="undef"
3963$ ENDIF
3964$!
3965$! Check for endprotoent
3966$!
3967$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3968$ THEN
3969$ OS
7558ebc2
PP
3970$ WS "#if defined(__DECC) || defined(__DECCXX)"
3971$ WS "#include <stdlib.h>"
3972$ WS "#endif"
3973$ WS "#include <stdio.h>"
570bb66e
JH
3974$ IF Has_Socketshr
3975$ THEN WS "#include <socketshr.h>"
7558ebc2 3976$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 3977$ ENDIF
7558ebc2 3978$ WS "int main()"
570bb66e 3979$ WS "{"
7558ebc2
PP
3980$ WS "endprotoent();"
3981$ WS "exit(0);"
570bb66e
JH
3982$ WS "}"
3983$ CS
3984$ tmp = "endprotoent"
3985$ GOSUB inlibc
3986$ d_endpent = tmp
3987$ ELSE
3988$ d_endpent="undef"
3989$ ENDIF
3990$!
3991$! Check for endservent
3992$!
3993$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
3994$ THEN
3995$ OS
7558ebc2
PP
3996$ WS "#if defined(__DECC) || defined(__DECCXX)"
3997$ WS "#include <stdlib.h>"
3998$ WS "#endif"
3999$ WS "#include <stdio.h>"
570bb66e
JH
4000$ IF Has_Socketshr
4001$ THEN WS "#include <socketshr.h>"
7558ebc2 4002$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 4003$ ENDIF
7558ebc2 4004$ WS "int main()"
570bb66e 4005$ WS "{"
7558ebc2
PP
4006$ WS "endservent();"
4007$ WS "exit(0);"
570bb66e
JH
4008$ WS "}"
4009$ CS
4010$ tmp = "endservent"
4011$ GOSUB inlibc
4012$ d_endsent = tmp
4013$ ELSE
4014$ d_endsent="undef"
4015$ ENDIF
4016$!
4017$! Check for sethostent
4018$!
4019$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4020$ THEN
4021$ OS
7558ebc2
PP
4022$ WS "#if defined(__DECC) || defined(__DECCXX)"
4023$ WS "#include <stdlib.h>"
4024$ WS "#endif"
4025$ WS "#include <stdio.h>"
570bb66e
JH
4026$ IF Has_Socketshr
4027$ THEN WS "#include <socketshr.h>"
7558ebc2 4028$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 4029$ ENDIF
7558ebc2 4030$ WS "int main()"
570bb66e 4031$ WS "{"
7558ebc2
PP
4032$ WS "sethostent(1);"
4033$ WS "exit(0);"
570bb66e
JH
4034$ WS "}"
4035$ CS
4036$ tmp = "sethostent"
4037$ GOSUB inlibc
4038$ d_sethent = tmp
4039$ ELSE
4040$ d_sethent="undef"
4041$ ENDIF
4042$!
4043$! Check for setnetent
4044$!
4045$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4046$ THEN
4047$ OS
7558ebc2
PP
4048$ WS "#if defined(__DECC) || defined(__DECCXX)"
4049$ WS "#include <stdlib.h>"
4050$ WS "#endif"
4051$ WS "#include <stdio.h>"
570bb66e
JH
4052$ IF Has_Socketshr
4053$ THEN WS "#include <socketshr.h>"
7558ebc2 4054$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 4055$ ENDIF
7558ebc2 4056$ WS "int main()"
570bb66e 4057$ WS "{"
7558ebc2
PP
4058$ WS "setnetent(1);"
4059$ WS "exit(0);"
570bb66e
JH
4060$ WS "}"
4061$ CS
4062$ tmp = "setnetent"
4063$ GOSUB inlibc
4064$ d_setnent = tmp
4065$ ELSE
4066$ d_setnent="undef"
4067$ ENDIF
4068$!
4069$! Check for setprotoent
4070$!
4071$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4072$ THEN
4073$ OS
7558ebc2
PP
4074$ WS "#if defined(__DECC) || defined(__DECCXX)"
4075$ WS "#include <stdlib.h>"
4076$ WS "#endif"
4077$ WS "#include <stdio.h>"
570bb66e
JH
4078$ IF Has_Socketshr
4079$ THEN WS "#include <socketshr.h>"
7558ebc2 4080$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 4081$ ENDIF
7558ebc2 4082$ WS "int main()"
570bb66e 4083$ WS "{"
7558ebc2
PP
4084$ WS "setprotoent(1);"
4085$ WS "exit(0);"
570bb66e
JH
4086$ WS "}"
4087$ CS
4088$ tmp = "setprotoent"
4089$ GOSUB inlibc
4090$ d_setpent = tmp
4091$ ELSE
4092$ d_setpent="undef"
4093$ ENDIF
4094$!
4095$! Check for setservent
4096$!
4097$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4098$ THEN
4099$ OS
7558ebc2
PP
4100$ WS "#if defined(__DECC) || defined(__DECCXX)"
4101$ WS "#include <stdlib.h>"
4102$ WS "#endif"
4103$ WS "#include <stdio.h>"
570bb66e
JH
4104$ IF Has_Socketshr
4105$ THEN WS "#include <socketshr.h>"
7558ebc2 4106$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 4107$ ENDIF
7558ebc2 4108$ WS "int main()"
570bb66e 4109$ WS "{"
7558ebc2
PP
4110$ WS "setservent(1);"
4111$ WS "exit(0);"
570bb66e
JH
4112$ WS "}"
4113$ CS
4114$ tmp = "setservent"
4115$ GOSUB inlibc
4116$ d_setsent = tmp
4117$ ELSE
4118$ d_setsent="undef"
4119$ ENDIF
4120$!
4121$! Check for gethostent
4122$!
4123$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4124$ THEN
4125$ OS
7558ebc2
PP
4126$ WS "#if defined(__DECC) || defined(__DECCXX)"
4127$ WS "#include <stdlib.h>"
4128$ WS "#endif"
4129$ WS "#include <stdio.h>"
570bb66e
JH
4130$ IF Has_Socketshr
4131$ THEN WS "#include <socketshr.h>"
7558ebc2 4132$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 4133$ ENDIF
7558ebc2 4134$ WS "int main()"
570bb66e 4135$ WS "{"
7558ebc2
PP
4136$ WS "gethostent();"
4137$ WS "exit(0);"
570bb66e
JH
4138$ WS "}"
4139$ CS
4140$ tmp = "gethostent"
4141$ GOSUB inlibc
4142$ d_gethent = tmp
4143$ ELSE
4144$ d_gethent="undef"
4145$ ENDIF
4146$!
4147$! Check for getnetent
4148$!
4149$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4150$ THEN
4151$ OS
7558ebc2
PP
4152$ WS "#if defined(__DECC) || defined(__DECCXX)"
4153$ WS "#include <stdlib.h>"
4154$ WS "#endif"
4155$ WS "#include <stdio.h>"
570bb66e
JH
4156$ IF Has_Socketshr
4157$ THEN WS "#include <socketshr.h>"
7558ebc2 4158$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 4159$ ENDIF
7558ebc2 4160$ WS "int main()"
570bb66e 4161$ WS "{"
7558ebc2
PP
4162$ WS "getnetent();"
4163$ WS "exit(0);"
570bb66e
JH
4164$ WS "}"
4165$ CS
4166$ tmp = "getnetent"
4167$ GOSUB inlibc
4168$ d_getnent = tmp
4169$ ELSE
4170$ d_getnent="undef"
4171$ ENDIF
4172$!
4173$! Check for getprotoent
4174$!
4175$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4176$ THEN
4177$ OS
7558ebc2
PP
4178$ WS "#if defined(__DECC) || defined(__DECCXX)"
4179$ WS "#include <stdlib.h>"
4180$ WS "#endif"
4181$ WS "#include <stdio.h>"
570bb66e
JH
4182$ IF Has_Socketshr
4183$ THEN WS "#include <socketshr.h>"
7558ebc2 4184$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 4185$ ENDIF
7558ebc2 4186$ WS "int main()"
570bb66e 4187$ WS "{"
7558ebc2
PP
4188$ WS "getprotoent();"
4189$ WS "exit(0);"
570bb66e
JH
4190$ WS "}"
4191$ CS
4192$ tmp = "getprotoent"
4193$ GOSUB inlibc
4194$ d_getpent = tmp
4195$ ELSE
4196$ d_getpent="undef"
4197$ ENDIF
4198$!
4199$! Check for getservent
4200$!
4201$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4202$ THEN
4203$ OS
7558ebc2
PP
4204$ WS "#if defined(__DECC) || defined(__DECCXX)"
4205$ WS "#include <stdlib.h>"
4206$ WS "#endif"
4207$ WS "#include <stdio.h>"
570bb66e
JH
4208$ IF Has_Socketshr
4209$ THEN WS "#include <socketshr.h>"
7558ebc2 4210$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 4211$ ENDIF
7558ebc2 4212$ WS "int main()"
570bb66e 4213$ WS "{"
7558ebc2
PP
4214$ WS "getservent();"
4215$ WS "exit(0);"
570bb66e
JH
4216$ WS "}"
4217$ CS
4218$ tmp = "getservent"
4219$ GOSUB inlibc
4220$ d_getsent = tmp
4221$ ELSE
4222$ d_getsent="undef"
4223$ ENDIF
4224$!
4225$! Check for socklen_t
4226$!
4227$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
4228$ THEN
4229$ echo4 "Checking to see if you have socklen_t..."
4230$ OS
7558ebc2
PP
4231$ WS "#if defined(__DECC) || defined(__DECCXX)"
4232$ WS "#include <stdlib.h>"
4233$ WS "#endif"
4234$ WS "#include <stdio.h>"
570bb66e
JH
4235$ IF Has_Socketshr
4236$ THEN WS "#include <socketshr.h>"
7558ebc2 4237$ ELSE IF i_netdb .EQS. "define" THEN WS "#include <netdb.h>"
570bb66e 4238$ ENDIF
7558ebc2 4239$ WS "int main()"
570bb66e 4240$ WS "{"
7558ebc2
PP
4241$ WS "socklen_t x = 16;"
4242$ WS "exit(0);"
570bb66e
JH
4243$ WS "}"
4244$ CS
4245$ GOSUB link_ok
4246$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4247$ THEN
4248$ d_socklen_t="define"
4249$ echo "You have socklen_t."
4250$ ELSE
4251$ d_socklen_t="undef"
4252$ echo "You do not have socklen_t."
4253$ ENDIF
4254$ ELSE
4255$ d_socklen_t="undef"
4256$ ENDIF
4257$!
4258$! Check for pthread_yield
4259$!
4260$ IF use_threads
4261$ THEN
4262$ OS
7558ebc2
PP
4263$ WS "#if defined(__DECC) || defined(__DECCXX)"
4264$ WS "#include <stdlib.h>"
4265$ WS "#endif"
4266$ WS "#include <pthread.h>"
4267$ WS "#include <stdio.h>"
4268$ WS "int main()"
570bb66e 4269$ WS "{"
7558ebc2
PP
4270$ WS "pthread_yield();"
4271$ WS "exit(0);"
570bb66e
JH
4272$ WS "}"
4273$ CS
4274$ tmp = "pthread_yield"
4275$ GOSUB inlibc
4276$ d_pthread_yield = tmp
4277$ ELSE
4278$ d_pthread_yield="undef"
4279$ ENDIF
4280$!
4281$! Check for sched_yield
4282$!
4283$ IF use_threads
4284$ THEN
4285$ OS
7558ebc2
PP
4286$ WS "#if defined(__DECC) || defined(__DECCXX)"
4287$ WS "#include <stdlib.h>"
4288$ WS "#endif"
4289$ WS "#include <pthread.h>"
4290$ WS "#include <stdio.h>"
4291$ WS "int main()"
570bb66e 4292$ WS "{"
7558ebc2
PP
4293$ WS "sched_yield();"
4294$ WS "exit(0);"
570bb66e
JH
4295$ WS "}"
4296$ CS
4297$ tmp = "sched_yield"
4298$ GOSUB inlibc
4299$ d_sched_yield = tmp
4300$ IF d_sched_yield .EQS. "define"
4301$ THEN sched_yield = "sched_yield"
4302$ ELSE sched_yield = " "
4303$ ENDIF
4304$ ELSE
4305$ d_sched_yield="undef"
4306$ sched_yield = " "
4307$ ENDIF
4308$!
4309$! Check for generic pointer size
4310$!
4311$ echo4 "Checking to see how big your pointers are..."
4312$ OS
7558ebc2
PP
4313$ WS "#if defined(__DECC) || defined(__DECCXX)"
4314$ WS "#include <stdlib.h>"
4315$ WS "#endif"
4316$ WS "#include <stdio.h>"
4317$ WS "int main()"
570bb66e 4318$ WS "{"
7558ebc2
PP
4319$ WS "int foo;"
4320$ WS "foo = sizeof(char *);"
4321$ WS "printf(""%d\n"", foo);"
4322$ WS "exit(0);"
570bb66e
JH
4323$ WS "}"
4324$ CS
4325$ tmp = "char *"
4326$ GOSUB type_size_check
4327$ ptrsize = tmp
4328$ echo "Your pointers are ''ptrsize' bytes long."
4329$!
4330$! Check for size_t size
4331$!
4332$ tmp = "size_t"
4333$ zzz = tmp
4334$ echo4 "Checking the size of ''zzz'..."
4335$ GOSUB type_size_check
4336$ sizesize = tmp
4337$ echo "Your ''zzz' size is ''sizesize' bytes."
4338$!
4339$! Check rand48 and its ilk
4340$!
4341$ echo4 "Looking for a random number function..."
4342$ OS
7558ebc2
PP
4343$ WS "#if defined(__DECC) || defined(__DECCXX)"
4344$ WS "#include <stdlib.h>"
4345$ WS "#endif"
4346$ WS "#include <stdio.h>"
4347$ WS "int main()"
570bb66e
JH
4348$ WS "{"
4349$ WS "srand48(12L);"
7558ebc2 4350$ WS "exit(0);"
570bb66e
JH
4351$ WS "}"
4352$ CS
4353$ GOSUB link_ok
4354$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4355$ THEN
4356$ drand01 = "drand48()"
4357$ randseedtype = "long int"
4358$ seedfunc = "srand48"
4359$ echo4 "Good, found drand48()."
4360$ d_drand48proto = "define"
4361$ ELSE
4362$ d_drand48proto = "undef"
4363$ drand01="random()"
4364$ randseedtype = "unsigned"
4365$ seedfunc = "srandom"
4366$ OS
7558ebc2
PP
4367$ WS "#if defined(__DECC) || defined(__DECCXX)"
4368$ WS "#include <stdlib.h>"
4369$ WS "#endif"
4370$ WS "#include <stdio.h>"
4371$ WS "int main()"
570bb66e
JH
4372$ WS "{"
4373$ WS "srandom(12);"
7558ebc2 4374$ WS "exit(0);"
570bb66e
JH
4375$ WS "}"
4376$ CS
4377$ GOSUB link_ok
4378$ IF compile_status .EQ. good_compile .AND. link_status .EQ. good_link
4379$ THEN
4380$ echo4 "OK, found random()."
4381$ ELSE
4382$ drand01="(((float)rand())/((float)RAND_MAX))"
4383$ randseedtype = "unsigned"
4384$ seedfunc = "srand"
4385$ echo4 "Yick, looks like I have to use rand()."
4386$ ENDIF
4387$ ENDIF
570bb66e
JH
4388$! Done with compiler checks. Clean up.
4389$ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
4390$ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
4391$ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
4392$ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
4393$ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
4394$ IF using_cxx
4395$ THEN
4396$ CALL Cxx_demangler_cleanup
4397$ ENDIF
4398$!
4399$! Some that are compiler or VMS version sensitive
4400$!
4401$! Gnu C stuff
4402$ IF Using_Gnu_C
4403$ THEN
4404$ d_attribut="define"
4405$ vms_cc_type="gcc"
4406$ ELSE
4407$ vms_cc_type="cc"
4408$ d_attribut="undef"
4409$ ENDIF
4410$!
4411$! Dec C >= 5.2 and VMS ver >= 7.0
4412$ IF (Using_Dec_C).AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.(vms_ver .GES. "7.0")
4413$ THEN
4414$ d_bcmp="define"
4415$ d_gettimeod="define"
4416$ d_uname="define"
4417$ d_sigaction="define"
4418$ d_truncate="define"
4419$ d_wait4="define"
4420$ d_index="define"
4421$ pidtype="pid_t"
4422$ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2 SPARE18 SPARE19 CHLD CONT STOP TSTP TTIN TTOU DEBUG SPARE27 SPARE28 SPARE29 SPARE30 SPARE31 SPARE32 RTMIN RTMAX"",0"
4423$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4424$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
4425$ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
4426$ sig_name_init = psnwc1 + psnwc2 + psnwc3
7558ebc2 4427$ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 64"",0"
570bb66e
JH
4428$ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,64,0"
4429$! perl_sig_num_with_commas=sig_num_init
4430$ uidtype="uid_t"
4431$ d_pathconf="define"
4432$ d_fpathconf="define"
4433$ d_sysconf="define"
4434$ d_sigsetjmp="define"
4435$ ELSE
4436$ pidtype="unsigned int"
4437$ d_gettimeod="undef"
4438$ d_bcmp="undef"
4439$ d_uname="undef"
4440$ d_sigaction="undef"
4441$ d_truncate="undef"
4442$ d_wait4="undef"
4443$ d_index="undef"
4444$ sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"",0"
4445$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
4446$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
4447$ sig_name_init = psnwc1 + psnwc2
4448$ sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"",0"
4449$ sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
4450$! perl_sig_num_with_commas=sig_num_init
4451$ uidtype="unsigned int"
4452$ d_pathconf="undef"
4453$ d_fpathconf="undef"
4454$ d_sysconf="undef"
4455$ d_sigsetjmp="undef"
4456$ ENDIF
4457$!
4458$! Dec C alone
4459$ IF Using_Dec_C
4460$ THEN
4461$ d_mbstowcs="define"
4462$ d_mbtowc="define"
4463$ d_stdiobase="define"
4464$ d_stdio_cnt_lval="define"
dedcc4d4 4465$ d_stdio_ptr_lval="define"
570bb66e
JH
4466$ d_stdstdio="define"
4467$ d_wcstombs="define"
4468$ d_mblen="define"
4469$ d_mktime="define"
4470$ d_strcoll="define"
4471$ d_strxfrm="define"
4472$ d_wctomb="define"
4473$ i_locale="define"
4474$ d_locconv="define"
4475$ d_setlocale="define"
4476$ vms_cc_type="decc"
4477$ ELSE
4478$ d_mbstowcs="undef"
4479$ d_mbtowc="undef"
4480$ d_stdiobase="undef"
4481$ d_stdio_cnt_lval="undef"
4482$ d_stdio_ptr_lval="undef"
4483$ d_stdstdio="undef"
4484$ d_wcstombs="undef"
4485$ d_mblen="undef"
4486$ d_mktime="undef"
4487$ d_strcoll="undef"
4488$ d_strxfrm="undef"
4489$ d_wctomb="undef"
4490$ i_locale="undef"
4491$ d_locconv="undef"
4492$ d_setlocale="undef"
4493$ ENDIF
a7ffa9b9
NC
4494$ d_stdio_ptr_lval_sets_cnt="undef"
4495$ d_stdio_ptr_lval_nochange_cnt="undef"
570bb66e
JH
4496$!
4497$! Sockets?
4498$ if Has_Socketshr .OR. Has_Dec_C_Sockets
4499$ THEN
4500$ d_vms_do_sockets="define"
4501$ d_htonl="define"
4502$ d_socket="define"
4503$ d_select="define"
4504$ netdb_hlen_type="int"
4505$ netdb_host_type="char *"
4506$ netdb_name_type="char *"
4507$ netdb_net_type="long"
4508$ d_gethbyaddr="define"
4509$ d_gethbyname="define"
4510$ d_getnbyaddr="define"
4511$ d_getnbyname="define"
4512$ d_getpbynumber="define"
4513$ d_getpbyname="define"
4514$ d_getsbyport="define"
4515$ d_getsbyname="define"
4516$ d_gethostprotos="define"
4517$ d_getnetprotos="define"
4518$ d_getprotoprotos="define"
4519$ d_getservprotos="define"
7558ebc2 4520$ IF Using_Dec_C .OR. using_cxx
570bb66e
JH
4521$ THEN
4522$ socksizetype="unsigned int"
4523$ ELSE
4524$ socksizetype="int *"
4525$ ENDIF
4526$ ELSE
4527$ d_vms_do_sockets="undef"
4528$ d_htonl="undef"
4529$ d_socket="undef"
4530$ d_select="undef"
4531$ netdb_hlen_type="int"
4532$ netdb_host_type="char *"
4533$ netdb_name_type="char *"
4534$ netdb_net_type="long"
4535$ d_gethbyaddr="undef"
4536$ d_gethbyname="undef"
4537$ d_getnbyaddr="undef"
4538$ d_getnbyname="undef"
4539$ d_getpbynumber="undef"
4540$ d_getpbyname="undef"
4541$ d_getsbyport="undef"
4542$ d_getsbyname="undef"
4543$ d_gethostprotos="undef"
4544$ d_getnetprotos="undef"
4545$ d_getprotoprotos="undef"
4546$ d_getservprotos="undef"
4547$ socksizetype="undef"
4548$ ENDIF
4549$! Threads
4550$ IF use_threads
4551$ THEN
4552$ usethreads="define"
4553$ d_pthreads_created_joinable="define"
4554$ if (vms_ver .GES. "7.0")
4555$ THEN
4556$ d_oldpthreads="undef"
4557$ ELSE
4558$ d_oldpthreads="define"
4559$ ENDIF
4560$ ELSE
4561$ d_oldpthreads="undef"
4562$ usethreads="undef"
4563$ d_pthreads_created_joinable="undef"
4564$ ENDIF
4565$!
4566$! new (5.005_62++) typedefs for primitives
4567$!
4568$ echo "Choosing the C types to be used for Perl's internal types..."
4569$ ivtype="long"
4570$ uvtype="unsigned long"
4571$ i8type="char"
4572$ u8type="unsigned char"
4573$ i16type="short"
4574$ u16type="unsigned short"
4575$ i32type="int"
4576$ u32type="unsigned int"
4577$ i64type="long long"
4578$ u64type="unsigned long long"
4579$ nvtype="double"
4580$!
4581$ IF use64bitint .OR. use64bitint .EQS. "define"
4582$ THEN
4583$ ivtype = "''i64type'"
4584$ uvtype = "''u64type'"
4585$ nvtype="long double"
4586$ ELSE
4587$ i64size="undef"
4588$ u64size="undef"
4589$ ENDIF
4590$!
4591$ tmp = "''ivtype'"
4592$ GOSUB type_size_check
4593$ ivsize = tmp
4594$ IF use64bitint .OR. use64bitint .EQS. "define" THEN i64size = tmp
4595$ IF ivtype .eqs. "long"
4596$ THEN longsize = tmp
4597$ ELSE
4598$ tmp = "long"
4599$ GOSUB type_size_check
4600$ longsize = tmp
4601$ ENDIF
7558ebc2 4602$!
570bb66e
JH
4603$ tmp = "''uvtype'"
4604$ GOSUB type_size_check
4605$ uvsize = tmp
4606$ IF use64bitint .OR. use64bitint .EQS. "define" THEN u64size = tmp
7558ebc2 4607$!
570bb66e
JH
4608$ tmp = "''i8type'"
4609$ GOSUB type_size_check
4610$ i8size = tmp
7558ebc2 4611$!
570bb66e
JH
4612$ tmp = "''u8type'"
4613$ GOSUB type_size_check
4614$ u8size = tmp
7558ebc2 4615$!
570bb66e
JH
4616$ tmp = "''i16type'"
4617$ GOSUB type_size_check
4618$ i16size = tmp
4619$ IF i16type .eqs. "short"
4620$ THEN shortsize = tmp
4621$ ELSE
4622$ tmp = "short"
4623$ gosub type_size_check
4624$ shortsize = tmp
4625$ ENDIF
7558ebc2 4626$!
570bb66e
JH
4627$ tmp = "''u16type'"
4628$ GOSUB type_size_check
4629$ u16size = tmp
7558ebc2 4630$!
570bb66e
JH
4631$ tmp = "''i32type'"
4632$ GOSUB type_size_check
4633$ i32size = tmp
4634$ IF i32type .eqs. "int"
4635$ THEN intsize = tmp
4636$ ELSE
4637$ tmp = "int"
4638$ gosub type_size_check
4639$ intsize = tmp
4640$ ENDIF
7558ebc2 4641$!
570bb66e
JH
4642$ tmp = "''u32type'"
4643$ gosub type_size_check
4644$ u32size = tmp
7558ebc2 4645$!
570bb66e
JH
4646$ tmp = "''nvtype'"
4647$ GOSUB type_size_check
4648$ nvsize = tmp
4649$!
4650$ echo "(IV will be ""''ivtype'"", ''ivsize' bytes)"
4651$ echo "(UV will be ""''uvtype'"", ''uvsize' bytes)"
4652$ echo "(NV will be ""''nvtype'"", ''nvsize' bytes)"
4653$!
4654$ echo4 "Checking whether your NVs can preserve your UVs..."
4655$ OS
7558ebc2
PP
4656$ WS "#if defined(__DECC) || defined(__DECCXX)"
4657$ WS "#include <stdlib.h>"
4658$ WS "#endif"
4659$ WS "#include <stdio.h>"
4660$ WS "int main() {"
4661$ WS " ''uvtype' k = (''uvtype')~0, l;"
4662$ WS " ''nvtype' d;"
4663$ WS " l = k;"
4664$ WS " d = (''nvtype')l;"
4665$ WS " l = (''uvtype')d;"
4666$ WS " if (l == k)"
4667$ WS " printf(""preserve\n"");"
4668$ WS " exit(0);"
4669$ WS "}"
570bb66e
JH
4670$ CS
4671$ GOSUB compile
4672$ IF tmp .EQS. "preserve"
4673$ THEN
4674$ d_nv_preserves_uv = "define"
4675$ echo "Yes, they can."
4676$ d_nv_preserves_uv_bits = F$STRING(F$INTEGER(uvsize) * 8)
4677$ ELSE
4678$ d_nv_preserves_uv = "undef"
4679$ echo "No, they can't."
4680$ echo4 "Checking how many bits of your UVs your NVs can preserve..."
4681$ OS
7558ebc2
PP
4682$ WS "#if defined(__DECC) || defined(__DECCXX)"
4683$ WS "#include <stdlib.h>"
4684$ WS "#endif"
4685$ WS "#include <stdio.h>"
4686$ WS "int main() {"
4687$ WS " ''uvtype' u = 0;"
4688$ WS " int n = 8 * ''uvsize';"
4689$ WS " int i;"
4690$ WS " for (i = 0; i < n; i++) {"
4691$ WS " u = u << 1 | (''uvtype')1;"
4692$ WS " if ((''uvtype')(''nvtype')u != u)"
4693$ WS " break;"
4694$ WS " }"
4695$ WS " printf(""%d\n"", i);"
4696$ WS " exit(0);"
4697$ WS "}"
570bb66e
JH
4698$ GOSUB compile
4699$ d_nv_preserves_uv_bits = tmp
4700$ ENDIF
4701$ DELETE/SYMBOL tmp
4702$!
4703$ ivdformat="""ld"""
4704$ uvuformat="""lu"""
4705$ uvoformat="""lo"""
4706$ uvxformat="""lx"""
fd47df60
JH
4707$! uselongdouble?
4708$ nveformat="""e"""
4709$ nvfformat="""f"""
4710$ nvgformat="""g"""
570bb66e
JH
4711$!
4712$! Finally the composite ones. All config
4713$!
4714$ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
4715$!
7558ebc2 4716$ IF Using_Dec_C .AND. (.NOT. using_cxx)
570bb66e
JH
4717$ THEN
4718$ ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''obj_ext'/NoList''ccflags'"
4719$ ENDIF
7558ebc2
PP
4720$ i_dirent = "undef"
4721$ IF using_cxx
4722$ THEN
4723$ i_dirent = "define"
4724$ ccflags="/Include=[]/Standard=ANSI/Prefix=All/Obj=''obj_ext'/NoList''ccflags'"
4725$ ENDIF
570bb66e
JH
4726$ IF use_vmsdebug_perl
4727$ THEN
4728$ optimize="/Debug/NoOpt"
4729$ dbgprefix = "DBG"
4730$ ELSE
4731$ optimize= ""
4732$ dbgprefix = ""
4733$ ENDIF
4734$!
4735$! Okay, we've got everything configured. Now go write out a config.sh.
4736$ basename_config_sh = F$PARSE(config_sh,,,"NAME",)+F$PARSE(config_sh,,,"TYPE",)
4737$ echo4 "Creating ''basename_config_sh'..."
7558ebc2 4738$ open/write CONFIG 'config_sh'
570bb66e
JH
4739$ WC := write CONFIG
4740$!
4741$! ##BEGIN WRITE NEW CONSTANTS HERE##
4742$!
4743$ WC "#!/bin/sh"
4744$ WC "#"
4745$ WC "# This file was produced by Configure.COM on a ''osname' system."
4746$ WC "#"
4747$ WC "# Package name : ''package'"
4748$ WC "# Source directory : ''src'"
4749$ WC "# Configuration time: " + cf_time
4750$ WC "# Configuration by : " + cf_by
4751$ WC "# Target system : " + myuname
4752$ WC ""
4753$ WC "CONFIG='true'"
4754$ WC "Makefile_SH='" + Makefile_SH + "'"
4755$ WC "Mcc='" + Mcc + "'"
4756$! WC "PERL_SUBVERSION='" + subversion + "'" ! VMS specific to descrip_mms.template
4757$ WC "PERL_VERSION='" + patchlevel + "'" ! VMS specific to descrip_mms.template
4758$ WC "alignbytes='" + alignbytes + "'"
4759$ WC "aphostname='" + "'"
4760$ WC "ar='" + "'"
4761$ WC "archlib='" + archlib + "'"
4762$ WC "archlibexp='" + archlibexp + "'"
4763$ WC "archname='" + archname + "'"
4764$ WC "baserev='" + baserev + "'"
4765$ WC "bin='" + bin + "'"
4766$ WC "binexp='" + binexp + "'"
4767$ WC "builddir='" + builddir + "'"
4768$ WC "byteorder='1234'"
4769$ WC "castflags='0'"
4770$ WC "cc='" + perl_cc + "'"
4771$ WC "cccdlflags='" + cccdlflags + "'"
4772$ WC "ccdlflags='" + ccdlflags + "'"
4773$ WC "ccflags='" + ccflags + "'"
7558ebc2 4774$ WC "ccversion='" + ccversion + "'"
570bb66e
JH
4775$ WC "cf_by='" + cf_by + "'"
4776$ WC "cf_email='" + cf_email + "'"
4777$ WC "cf_time='" + cf_time + "'"
4778$ WC "config_args='" + config_args + "'"
4779$ WC "config_sh='" + config_sh + "'"
4780$ WC "cpp_stuff='" + cpp_stuff + "'"
4781$ WC "cpplast='" + cpplast + "'"
4782$ WC "cppminus='" + cppminus + "'"
4783$ WC "cpprun='" + cpprun + "'"
4784$ WC "cppstdin='" + cppstdin + "'"
4785$ WC "crosscompile='undef'"
74cac757 4786$ WC "d__fwalk='undef'"
570bb66e
JH
4787$ WC "d_Gconvert='my_gconvert(x,n,t,b)'"
4788$ WC "d_PRId64='" + d_PRId64 + "'"
6b356c8e
JH
4789$ WC "d_PRIEldbl='" + d_PRIEUldbl + "'"
4790$ WC "d_PRIFldbl='" + d_PRIFUldbl + "'"
4791$ WC "d_PRIGldbl='" + d_PRIGUldbl + "'"
4792$ WC "d_PRIX64='" + d_PRIXU64 + "'"
59a27e12 4793$ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
570bb66e
JH
4794$ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
4795$ WC "d_PRIgldbl='" + d_PRIgldbl + "'"
4796$ WC "d_PRIo64='" + d_PRIo64 + "'"
4797$ WC "d_PRIu64='" + d_PRIu64 + "'"
4798$ WC "d_PRIx64='" + d_PRIx64 + "'"
b5ddfb46 4799$ WC "d_SCNfldbl='" + d_SCNfldbl + "'"
570bb66e
JH
4800$ WC "d_access='" + d_access + "'"
4801$ WC "d_accessx='undef'"
4802$ WC "d_alarm='define'"
4803$ WC "d_archlib='define'"
4804$ WC "d_atolf='" + d_atolf + "'"
4805$ WC "d_atoll='" + d_atoll + "'"
4806$ WC "d_attribut='" + d_attribut + "'"
4807$ WC "d_bcmp='" + d_bcmp + "'"
4808$ WC "d_bcopy='" + d_bcopy + "'"
4809$ WC "d_bincompat3='undef'"
4810$ WC "d_bincompat5005='undef'"
4811$ WC "d_bsdgetpgrp='undef'"
4812$! WC "d_bsdpgrp='undef'"
4813$ WC "d_bsdsetpgrp='undef'"
4814$ WC "d_bzero='" + d_bzero + "'"
4815$ WC "d_casti32='define'"
4816$ WC "d_castneg='define'"
4817$ WC "d_charvspr='undef'"
4818$ WC "d_chown='define'"
4819$ WC "d_chroot='undef'"
4820$ WC "d_chsize='undef'"
4821$ WC "d_cmsghdr_s='undef'"
4822$ WC "d_const='define'"
4823$ WC "d_crypt='define'"
4824$ WC "d_csh='undef'"
4825$ WC "d_cuserid='define'"
4826$ WC "d_dbl_dig='define'"
4827$ WC "d_difftime='define'"
4828$ WC "d_dirnamlen='define'"
4829$ WC "d_dlerror='undef'"
4830$ WC "d_dlsymun='undef'"
4831$ WC "d_dosuid='undef'"
4832$ WC "d_drand48proto='" + d_drand48proto + "'"
4833$ WC "d_dup2='define'"
4834$ WC "d_eaccess='undef'"
4835$ WC "d_endgrent='define'"
4836$ WC "d_endhent='" + d_endhent + "'"
4837$ WC "d_endnent='" + d_endnent + "'"
4838$ WC "d_endpent='" + d_endpent + "'"
4839$ WC "d_endpwent='define'"
4840$ WC "d_endsent='" + d_endsent + "'"
4841$ WC "d_eofnblk='undef'"
4842$ WC "d_eunice='undef'"
4843$ WC "d_fchmod='undef'"
4844$ WC "d_fchown='undef'"
4845$ WC "d_fcntl='" + d_fcntl + "'"
1c21a19a 4846$ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
570bb66e
JH
4847$ WC "d_fd_set='" + d_fd_set + "'"
4848$ WC "d_fgetpos='define'"
4849$ WC "d_flexfnam='define'"
4850$ WC "d_flock='undef'"
4851$ WC "d_fork='undef'"
4852$ WC "d_fpathconf='" + d_fpathconf + "'"
4853$ WC "d_fpos64_t='" + d_fpos64_t + "'"
4854$ WC "d_frexpl='" + d_frexpl + "'"
4855$ WC "d_fs_data_s='undef'"
4856$ WC "d_fseeko='undef'"
4857$ WC "d_fsetpos='define'"
4858$ WC "d_fstatfs='undef'"
4859$ WC "d_fstatvfs='undef'"
411ab01c 4860$ WC "d_fsync='undef'"
570bb66e
JH
4861$ WC "d_ftello='undef'"
4862$ WC "d_getcwd='undef'"
4863$ WC "d_getespwnam='undef'"
4864$ WC "d_getfsstat='undef'"
4865$ WC "d_getgrent='define'"
4866$ WC "d_getgrps='undef'"
4867$ WC "d_gethbyaddr='" + d_gethbyaddr + "'"
4868$ WC "d_gethbyname='" + d_gethbyname + "'"
4869$ WC "d_gethent='" + d_gethent + "'"
4870$ WC "d_gethname='" + d_gethname + "'"
4871$ WC "d_gethostprotos='" + d_gethostprotos + "'"
4872$ WC "d_getlogin='define'"
4873$ WC "d_getmnt='undef'"
4874$ WC "d_getmntent='undef'"
4875$ WC "d_getnbyaddr='" + d_getnbyaddr + "'"
4876$ WC "d_getnbyname='" + d_getnbyname + "'"
4877$ WC "d_getnent='" + d_getnent + "'"
4878$ WC "d_getnetprotos='" + d_getnetprotos + "'"
0c0643d0 4879$ WC "d_getpagsz='undef'"
570bb66e
JH
4880$ WC "d_getpbyname='" + d_getpbyname + "'"
4881$ WC "d_getpbynumber='" + d_getpbynumber + "'"
4882$ WC "d_getpent='" + d_getpent + "'"
4883$ WC "d_getpgid='undef'"
4884$ WC "d_getpgrp2='undef'"
4885$ WC "d_getpgrp='undef'"
4886$ WC "d_getppid='undef'"
4887$ WC "d_getprior='undef'"
4888$ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
4889$ WC "d_getprpwnam='undef'"
4890$ WC "d_getpwent='define'"
4891$ WC "d_getsbyname='" + d_getsbyname + "'"
4892$ WC "d_getsbyport='" + d_getsbyport + "'"
4893$ WC "d_getsent='" + d_getsent + "'"
4894$ WC "d_getservprotos='" + d_getservprotos + "'"
4895$ WC "d_getspnam='undef'"
4896$ WC "d_gettimeod='" + d_gettimeod + "'"
4897$ WC "d_gnulibc='undef'"
4898$ WC "d_grpasswd='undef'"
4899$ WC "d_hasmntopt='undef'"
4900$ WC "d_htonl='" + d_htonl + "'"
4901$ WC "d_iconv='" + d_iconv +"'"
4902$ WC "d_index='" + d_index + "'"
4903$ WC "d_inetaton='undef'"
4904$ WC "d_int64_t='" + d_int64_t + "'"
4905$ WC "d_isascii='define'"
3a491987 4906$ WC "d_isnan='" + d_isnan + "'"
570bb66e
JH
4907$ WC "d_isnanl='" + d_isnanl + "'"
4908$ WC "d_killpg='undef'"
4909$ WC "d_lchown='undef'"
4910$ WC "d_ldbl_dig='define'"
4911$ WC "d_link='undef'"
4912$ WC "d_llseek='undef'"
4913$ WC "d_locconv='" + d_locconv + "'"
4914$ WC "d_lockf='undef'"
4915$ WC "d_longdbl='" + d_longdbl + "'"
4916$ WC "d_longlong='" + d_longlong + "'"
4917$ WC "d_lseekproto='define'"
4918$ WC "d_lstat='undef'"
4919$ WC "d_madvise='undef'"
4920$ WC "d_mblen='" + d_mblen + "'"
4921$ WC "d_mbstowcs='" + d_mbstowcs + "'"
4922$ WC "d_mbtowc='" + d_mbtowc + "'"
4923$ WC "d_memchr='" + d_memchr + "'"
4924$ WC "d_memcmp='define'"
4925$ WC "d_memcpy='define'"
4926$ WC "d_memmove='define'"
4927$ WC "d_memset='define'"
4928$ WC "d_mkdir='define'"
4929$ WC "d_mkdtemp='" + d_mkdtemp + "'"
4930$ WC "d_mkfifo='undef'"
4931$ WC "d_mknod='undef'"
4932$ WC "d_mkstemp='" + d_mkstemp + "'"
4933$ WC "d_mkstemps='" + d_mkstemps + "'"
4934$ WC "d_mktime='" + d_mktime + "'"
4935$ WC "d_mmap='undef'"
4936$ WC "d_modfl='" + d_modfl + "'"
4937$ WC "d_mprotect='undef'"
4938$ WC "d_msg='undef'"
4939$ WC "d_msg_ctrunc='undef'"
4940$ WC "d_msg_dontroute='undef'"
4941$ WC "d_msg_oob='undef'"
4942$ WC "d_msg_peek='undef'"
4943$ WC "d_msg_proxy='undef'"
4944$ WC "d_msghdr_s='undef'"
4945$ WC "d_msync='undef'"
4946$ WC "d_munmap='undef'"
4947$ WC "d_mymalloc='" + d_mymalloc + "'"
4948$ WC "d_nice='define'"
4949$ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
4950$ WC "d_nv_preserves_uv_bits='" + d_nv_preserves_uv_bits + "'"
4951$ WC "d_off64_t='" + d_off64_t + "'"
4952$ WC "d_old_pthread_create_joinable='" + d_old_pthread_create_joinable + "'"
4953$ WC "d_oldarchlib='define'"
4954$ WC "d_oldpthreads='" + d_oldpthreads + "'"
4955$ WC "d_open3='define'"
4956$ WC "d_pathconf='" + d_pathconf + "'"
4957$ WC "d_pause='define'"
4958$ WC "d_perl_otherlibdirs='undef'"
4959$ WC "d_phostname='undef'"
4960$ WC "d_pipe='define'"
4961$ WC "d_poll='undef'"
4962$ WC "d_pthread_yield='" + d_pthread_yield + "'"
4963$ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
4964$ WC "d_pwage='undef'"
4965$ WC "d_pwchange='undef'"
4966$ WC "d_pwclass='undef'"
4967$ WC "d_pwcomment='define'"
4968$ WC "d_pwexpire='undef'"
4969$ WC "d_pwgecos='define'"
4970$ WC "d_pwpasswd='define'"
4971$ WC "d_pwquota='undef'"
4972$ WC "d_qgcvt='undef'"
4973$ WC "d_quad='" + d_quad + "'"
4974$ WC "d_readdir='define'"
4975$ WC "d_readlink='undef'"
4976$ WC "d_readv='undef'"
4977$ WC "d_recvmsg='undef'"
4978$ WC "d_rename='define'"
4979$ WC "d_rewinddir='define'"
4980$ WC "d_rmdir='define'"
4981$ WC "d_safebcpy='undef'"
4982$ WC "d_safemcpy='define'"
4983$ WC "d_sanemcmp='define'"
ef9f17be 4984$ WC "d_sbrkproto='undef'"
570bb66e
JH
4985$ WC "d_sched_yield='" + d_sched_yield + "'"
4986$ WC "d_scm_rights='undef'"
4987$ WC "d_seekdir='define'"
4988$ WC "d_select='" + d_select + "'"
4989$ WC "d_sem='undef'"
4990$ WC "d_semctl_semid_ds='undef'"
4991$ WC "d_semctl_semun='undef'"
4992$ WC "d_sendmsg='undef'"
4993$ WC "d_setegid='undef'"
4994$ WC "d_setenv='" + d_setenv + "'"
4995$ WC "d_seteuid='undef'"
4996$ WC "d_setgrent='undef'"
4997$ WC "d_setgrps='undef'"
4998$ WC "d_sethent='" + d_sethent + "'"
4999$ WC "d_setlinebuf='undef'"
5000$ WC "d_setlocale='" + d_setlocale + "'"
5001$ WC "d_setnent='" + d_setnent + "'"
5002$ WC "d_setpent='" + d_setpent + "'"
5003$ WC "d_setpgid='undef'"
5004$ WC "d_setpgrp2='undef'"
5005$ WC "d_setpgrp='undef'"
5006$ WC "d_setprior='undef'"
5007$ WC "d_setproctitle='" + d_setproctitle + "'"
5008$ WC "d_setpwent='define'"
5009$ WC "d_setregid='undef'"
5010$ WC "d_setresgid='undef'"
5011$ WC "d_setresuid='undef'"
5012$ WC "d_setreuid='undef'"
5013$ WC "d_setrgid='undef'"
5014$ WC "d_setruid='undef'"
5015$ WC "d_setsent='" + d_setsent + "'"
5016$ WC "d_setsid='undef'"
5017$ WC "d_setvbuf='" + d_setvbuf + "'"
5018$ WC "d_sfio='undef'"
5019$ WC "d_shm='undef'"
5020$ WC "d_shmatprototype='undef'"
5021$ WC "d_sigaction='" + d_sigaction + "'"
5022$ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
5023$ WC "d_socket='" + d_socket + "'"
5024$ WC "d_socklen_t='" + d_socklen_t + "'"
5025$ WC "d_sockpair='undef'"
1b9c9cf5 5026$ WC "d_socks5_init='undef'"
570bb66e
JH
5027$ WC "d_sqrtl='define'"
5028$ WC "d_statblks='undef'"
5029$ WC "d_statfs_f_flags='undef'"
5030$ WC "d_statfs_s='undef'"
5031$ WC "d_statfsflags='undef'"
5032$ WC "d_stdio_cnt_lval='" + d_stdio_cnt_lval + "'"
5033$ WC "d_stdio_ptr_lval='" + d_stdio_ptr_lval + "'"
a7ffa9b9
NC
5034$ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'"
5035$ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'"
570bb66e
JH
5036$ WC "d_stdio_stream_array='undef'"
5037$ WC "d_stdiobase='" + d_stdiobase + "'"
5038$ WC "d_stdstdio='" + d_stdstdio + "'"
5039$ WC "d_strchr='define'"
5040$ WC "d_strcoll='" + d_strcoll + "'"
5041$ WC "d_strctcpy='define'"
5042$ WC "d_strerrm='strerror((e),vaxc$errno)'"
5043$ WC "d_strerror='define'"
5044$ WC "d_strtod='define'"
5045$ WC "d_strtol='define'"
5046$ WC "d_strtold='" + d_strtold + "'"
5047$ WC "d_strtoll='" + d_strtoll + "'"
d0e6d399 5048$ WC "d_strtoq='define'"
570bb66e
JH
5049$ WC "d_strtoul='define'"
5050$ WC "d_strtoull='" + d_strtoull + "'"
5051$ WC "d_strtouq='" + d_strtouq + "'"
5052$ WC "d_strxfrm='" + d_strxfrm + "'"
5053$ WC "d_suidsafe='undef'"
5054$ WC "d_symlink='undef'"
5055$ WC "d_syscall='undef'"
5056$ WC "d_sysconf='" + d_sysconf + "'"
5057$ WC "d_syserrlst='undef'"
5058$ WC "d_system='define'"
5059$ WC "d_tcgetpgrp='undef'"
5060$ WC "d_tcsetpgrp='undef'"
5061$ WC "d_telldir='define'"
5062$ WC "d_telldirproto='define'"
5063$ WC "d_times='define'"
5064$ WC "d_truncate='" + d_truncate + "'"
5065$ WC "d_tzname='undef'"
5066$ WC "d_umask='define'"
5067$ WC "d_uname='" + d_uname + "'"
5068$ WC "d_union_semun='undef'"
5069$ WC "d_unlink_all_versions='undef'"
5070$ WC "d_ustat='undef'"
5071$ WC "d_vendorarch='undef'"
5072$ WC "d_vendorlib='undef'"
5073$ WC "d_vfork='define'"
5074$ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
5075$ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
5076$ WC "d_void_closedir='define'"
5077$ WC "d_volatile='define'"
5078$ WC "d_vprintf='define'"
5079$ WC "d_wait4='" + d_wait4 + "'"
5080$ WC "d_waitpid='define'"
5081$ WC "d_wcstombs='" + d_wcstombs + "'"
5082$ WC "d_wctomb='" + d_wctomb + "'"
5083$ WC "d_writev='undef'"
5084$ WC "db_hashtype=' '"
5085$ WC "db_prefixtype=' '"
5086$ WC "dbgprefix='" + dbgprefix + "'"
5087$ WC "defvoidused='15'"
5088$ WC "devtype='" + devtype + "'"
5089$ WC "direntrytype='struct dirent'"
5090$ WC "dlext='" + dlext + "'"
5091$ WC "dlobj='" + dlobj + "'"
5092$ WC "dlsrc='dl_vms.c'"
5093$ WC "doublesize='" + doublesize + "'"
5094$ WC "drand01='" + drand01 + "'"
5095$ WC "dynamic_ext='" + extensions + "'"
5096$ WC "eagain=' '"
5097$ WC "ebcdic='undef'"
403396f3 5098$ WC "embedmymalloc='" + mymalloc + "'"
570bb66e
JH
5099$ WC "eunicefix=':'"
5100$ WC "exe_ext='" + exe_ext + "'"
5101$ WC "extensions='" + extensions + "'"
5102$ WC "fflushNULL='define'"
5103$ WC "fflushall='undef'"
5104$ WC "fpostype='fpos_t'"
5105$ WC "freetype='void'"
5106$ WC "full_ar='" + "'"
5107$ WC "full_csh='" + " '"
5108$ WC "full_sed='_NLA0:'"
5109$ WC "gccversion='" + gccversion + "'"
5110$ WC "gidformat='lu'"
5111$ WC "gidsign='1'"
5112$ WC "gidsize='4'"
5113$ WC "gidtype='" + gidtype + "'"
5114$ WC "groupstype='Gid_t'"
5115$ WC "hint='none'"
5116$ WC "hintfile='" + "'"
5117$ WC "i16size='" + i16size + "'"
5118$ WC "i16type='" + i16type + "'"
5119$ WC "i32size='" + i32size + "'"
5120$ WC "i32type='" + i32type + "'"
5121$ WC "i64size='" + i64size + "'"
5122$ WC "i64type='" + i64type + "'"
5123$ WC "i8size='" + i8size + "'"
5124$ WC "i8type='" + i8type + "'"
5125$ WC "i_arpainet='undef'"
5126$ WC "i_dbm='undef'"
7558ebc2 5127$ WC "i_dirent='" + i_dirent + "'"
570bb66e
JH
5128$ WC "i_dlfcn='undef'"
5129$ WC "i_fcntl='" + i_fcntl + "'"
5130$ WC "i_float='define'"
5131$ WC "i_grp='undef'"
5132$ WC "i_iconv='" + i_iconv +"'"
5133$ WC "i_ieeefp='undef'"
5134$ WC "i_inttypes='" + i_inttypes + "'"
5135$ WC "i_libutil='" + i_libutil + "'"
5136$ WC "i_limits='define'"
5137$ WC "i_locale='" + i_locale + "'"
5138$ WC "i_machcthr='undef'"
5139$ WC "i_machcthreads='undef'"
5140$ WC "i_math='define'"
5141$ WC "i_memory='undef'"
5142$ WC "i_mntent='undef'"
5143$ WC "i_ndbm='undef'"
5144$ WC "i_netdb='" + i_netdb + "'"
5145$ WC "i_neterrno='define'"
5146$ WC "i_netinettcp='" + i_netinettcp + "'"
5147$ WC "i_niin='" + i_niin + "'"
5148$ WC "i_poll='" + i_poll + "'"
5149$ WC "i_prot='undef'"
5150$ WC "i_pthread='define'"
5151$ WC "i_pwd='undef'"
5152$ WC "i_rpcsvcdbm='undef'"
5153$ WC "i_sfio='undef'"
5154$ WC "i_sgtty='undef'"
5155$ WC "i_shadow='" + i_shadow + "'"
5156$ WC "i_socks='" + i_socks + "'"
5157$ WC "i_stdarg='define'"
5158$ WC "i_stddef='define'"
5159$ WC "i_stdlib='define'"
5160$ WC "i_string='define'"
5161$ WC "i_sunmath='undef'"
5162$ WC "i_sysaccess='" + i_sysaccess + "'"
5163$ WC "i_sysdir='undef'"
5164$ WC "i_sysfile='" + i_sysfile + "'"
5165$ WC "i_sysioctl='undef'"
5166$ WC "i_syslog='" + i_syslog + "'"
5167$ WC "i_sysmman='undef'"
5168$ WC "i_sysmode='" + i_sysmode + "'"
5169$ WC "i_sysmount='undef'"
5170$ WC "i_sysndir='undef'"
5171$ WC "i_sysparam='undef'"
5172$ WC "i_sysresrc='undef'"
5173$ WC "i_syssecrt='" + i_syssecrt + "'"
5174$ WC "i_sysselct='undef'"
5175$ WC "i_sysstat='define'"
5176$ WC "i_sysstatfs='undef'"
5177$ WC "i_sysstatvfs='undef'"
5178$ WC "i_systime='undef'"
5179$ WC "i_systimek='undef'"
5180$ WC "i_systimes='undef'"
5181$ WC "i_systypes='define'"
5182$ WC "i_sysuio='" + i_sysuio + "'"
5183$ WC "i_sysun='undef'"
5184$ WC "i_sysutsname='" + i_sysutsname + "'"
5185$ WC "i_sysvfs='undef'"
5186$ WC "i_syswait='undef'"
5187$ WC "i_termio='undef'"
5188$ WC "i_termios='undef'"
5189$ WC "i_time='define'"
5190$ WC "i_unistd='" + i_unistd + "'"
5191$ WC "i_ustat='undef'"
5192$ WC "i_utime='undef'"
5193$ WC "i_values='undef'"
5194$ WC "i_varargs='undef'"
5195$ WC "i_vfork='undef'"
5196$ WC "inc_version_list='0'"
5197$ WC "inc_version_list_init='0'"
5198$ WC "installarchlib='" + installarchlib + "'"
5199$ WC "installbin='" + installbin + "'"
5200$ WC "installman1dir='" + installman1dir + "'"
5201$ WC "installman3dir='" + installman3dir + "'"
5202$ WC "installprivlib='" + installprivlib + "'"
5203$ WC "installscript='" + installscript + "'"
5204$ WC "installsitearch='" + installsitearch + "'"
5205$ WC "installsitelib='" + installsitelib + "'"
5206$ WC "installusrbinperl='undef'"
5207$ WC "intsize='" + intsize + "'"
5208$ WC "ivdformat='" + ivdformat + "'"
5209$ WC "ivsize='" + ivsize + "'"
5210$ WC "ivtype='" + ivtype + "'"
5211$ WC "known_extensions='" + known_extensions + "'"
5212$ WC "ld='" + ld + "'"
5213$ WC "lddlflags='/Share'"
5214$ WC "ldflags='/NoTrace/NoMap'"
5215$ WC "lib_ext='" + lib_ext + "'"
5216$ WC "libc='" + libc + "'"
5217$ WC "libpth='/sys$share /sys$library'"
5218$ WC "libs='" + libs + "'"
5219$ WC "longdblsize='" + longdblsize + "'"
5220$ WC "longlongsize='" + longlongsize + "'"
5221$ WC "longsize='" + longsize + "'"
5222$ WC "lseeksize='4'"
5223$ WC "lseektype='int'"
5224$ WC "mab='" + "'"
5225$ WC "make='" + make + "'"
5226$ WC "malloctype='void *'"
5227$ WC "man1ext='rno'"
5228$ WC "man3ext='rno'"
59a27e12 5229$ WC "mmaptype=' " + "'"
570bb66e
JH
5230$ WC "modetype='unsigned int'"
5231$ WC "multiarch='undef'"
5232$ WC "mydomain='" + mydomain + "'"
5233$ WC "myhostname='" + myhostname + "'"
5234$ WC "myuname='" + myuname + "'"
2cc61e15 5235$ WC "need_va_copy='undef'"
570bb66e
JH
5236$ WC "netdb_hlen_type='" + netdb_hlen_type + "'"
5237$ WC "netdb_host_type='" + netdb_host_type + "'"
5238$ WC "netdb_name_type='" + netdb_name_type + "'"
5239$ WC "netdb_net_type='" + netdb_net_type + "'"
fd47df60
JH
5240$ WC "nveformat='" + nveformat + "'"
5241$ WC "nvfformat='" + nvfformat + "'"
5242$ WC "nvgformat='" + nvgformat + "'"
570bb66e
JH
5243$ WC "nvsize='" + nvsize + "'"
5244$ WC "nvtype='" + nvtype + "'"
5245$ WC "o_nonblock=' '"
5246$ WC "obj_ext='" + obj_ext + "'"
5247$ WC "old_pthread_create_joinable='" + old_pthread_create_joinable + "'"
5248$ WC "oldarchlib='" + oldarchlib + "'"
5249$ WC "oldarchlibexp='" + oldarchlibexp + "'"
5250$ WC "optimize='" + optimize + "'"
5251$ WC "osname='" + osname + "'"
5252$ WC "osvers='" + osvers + "'"
5253$ WC "otherlibdirs='" + "'"
5254$ WC "package='" + package + "'"
5255$ WC "pager='" + pager + "'"
5256$ WC "patchlevel='" + patchlevel + "'"
5257$ WC "path_sep='|'"
5258$ WC "perl_root='" + perl_root + "'" ! VMS specific $trnlnm()
5259$ WC "perladmin='" + perladmin + "'"
94928b12 5260$ WC "perllibs='" + perllibs + "'"
570bb66e
JH
5261$ WC "pgflquota='" + pgflquota + "'"
5262$ WC "pidtype='" + pidtype + "'"
5263$ WC "pm_apiversion='" + version + "'"
5264$! WC "prefix='" + vms_prefix + "'"
5265$ WC "prefix='" + prefix + "'"
5266$ WC "privlib='" + privlib + "'"
5267$ WC "privlibexp='" + privlibexp + "'"
5268$ WC "prototype='define'"
5269$ WC "ptrsize='" + ptrsize + "'"
5270$ WC "quadkind='" + quadkind + "'"
5271$ WC "quadtype='" + quadtype + "'"
5272$ WC "randbits='31'"
5273$ WC "randseedtype='" + randseedtype + "'"
5274$ WC "ranlib='" + "'"
5275$ WC "rd_nodata=' '"
5276$ WC "revision='" + revision + "'"
570bb66e 5277$ WC "sPRId64='" + sPRId64 + "'"
6b356c8e
JH
5278$ WC "sPRIEldbl='" + sPRIEUldbl + "'"
5279$ WC "sPRIFldbl='" + sPRIFUldbl + "'"
5280$ WC "sPRIGldbl='" + sPRIGUldbl + "'"
5281$ WC "sPRIX64='" + sPRIXU64 + "'"
59a27e12 5282$ WC "sPRIeldbl='" + sPRIeldbl + "'"
570bb66e
JH
5283$ WC "sPRIfldbl='" + sPRIfldbl + "'"
5284$ WC "sPRIgldbl='" + sPRIgldbl + "'"
5285$! WC "sPRIi64='" + sPRIi64 + "'"
5286$ WC "sPRIo64='" + sPRIo64 + "'"
5287$ WC "sPRIu64='" + sPRIu64 + "'"
5288$ WC "sPRIx64='" + sPRIx64 + "'"
b5ddfb46 5289$ WC "sSCNfldbl='" + sSCNfldbl + "'"
570bb66e
JH
5290$ WC "sched_yield='" + sched_yield + "'"
5291$ WC "seedfunc='" + seedfunc + "'"
5292$ WC "selectminbits='32'"
5293$ WC "selecttype='" + selecttype + "'"
5294$ WC "sh='MCR'"
5295$ WC "shmattype='" + "'"
5296$ WC "shortsize='" + shortsize + "'"
5297$ WC "shrplib='define'"
5298$ WC "sig_name='" + sig_name + "'"
5299$ tmp = "sig_name_init='" + sig_name_init + "'"
5300$ WC/symbol tmp
5301$ DELETE/SYMBOL tmp
5302$ WC "sig_num='" + sig_num + "'"
5303$ WC "sig_num_init='" + sig_num_init + "'"
5304$ WC "signal_t='" + signal_t + "'"
5305$ WC "sitearch='" + sitearch + "'"
5306$ WC "sitearchexp='" + sitearchexp + "'"
5307$ WC "sitelib='" + sitelib + "'"
5308$ WC "sitelib_stem='" + sitelib_stem + "'"
5309$ WC "sitelibexp='" + sitelibexp + "'"
5310$ WC "sizesize='" + sizesize + "'"
5311$ WC "sizetype='size_t'"
5312$ WC "so='" + so + "'"
5313$ WC "socksizetype='" + socksizetype + "'"
5314$ WC "spitshell='write sys$output '"
5315$ WC "src='" + src + "'"
5316$ WC "ssizetype='int'"
5317$ WC "startperl=" + startperl ! This one's special--no enclosing single quotes
17e8697d 5318$ WC "static_ext='" + static_ext + "'"
570bb66e
JH
5319$ WC "stdchar='" + stdchar + "'"
5320$ WC "stdio_base='((*fp)->_base)'"
5321$ WC "stdio_bufsiz='((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)'"
5322$ WC "stdio_cnt='((*fp)->_cnt)'"
5323$ WC "stdio_ptr='((*fp)->_ptr)'"
59a27e12 5324$ WC "stdio_stream_array=' " + "'"
570bb66e
JH
5325$ WC "subversion='" + subversion + "'"
5326$ WC "timetype='" + timetype + "'"
5327$ WC "u16size='" + u16size + "'"
5328$ WC "u16type='" + u16type + "'"
5329$ WC "u32size='" + u32size + "'"
5330$ WC "u32type='" + u32type + "'"
5331$ WC "u64size='" + u64size + "'"
5332$ WC "u64type='" + u64type + "'"
5333$ WC "u8size='" + u8size + "'"
5334$ WC "u8type='" + u8type + "'"
5335$ WC "uidformat='lu'"
5336$ WC "uidsign='1'"
5337$ WC "uidsize='4'"
5338$ WC "uidtype='" + uidtype + "'"
5339$ WC "uquadtype='" + uquadtype + "'"
5340$ WC "use5005threads='" + use5005threads + "'"
5341$ WC "use64bitall='" + use64bitall + "'"
5342$ WC "use64bitint='" + use64bitint + "'"
403396f3 5343$ WC "usedebugging_perl='" + use_debugging_perl + "'"
570bb66e
JH
5344$ WC "usedl='" + usedl + "'"
5345$ WC "useithreads='" + useithreads + "'"
5346$ WC "uselargefiles='" + uselargefiles + "'"
5347$ WC "uselongdouble='" + uselongdouble + "'"
5348$ WC "usemorebits='" + usemorebits + "'"
5349$ WC "usemultiplicity='" + usemultiplicity + "'"
5350$ WC "usemymalloc='" + usemymalloc + "'"
5351$ WC "useperlio='undef'"
5352$ WC "useposix='false'"
5353$ WC "usesocks='undef'"
5354$ WC "usethreads='" + usethreads + "'"
5355$ WC "usevfork='true'"
5356$ WC "uvoformat='" + uvoformat + "'"
5357$ WC "uvsize='" + uvsize + "'"
5358$ WC "uvtype='" + uvtype + "'"
5359$ WC "uvuformat='" + uvuformat + "'"
5360$ WC "uvxformat='" + uvxformat + "'"
5361$ WC "vendorarchexp='" + "'"
5362$ WC "vendorlib_stem='" + "'"
5363$ WC "vendorlibexp='" + "'"
5364$ WC "version='" + version + "'"
5365$ WC "vms_cc_type='" + vms_cc_type + "'" ! VMS specific
5366$ WC "vms_prefix='" + vms_prefix + "'" ! VMS specific
5367$ WC "vms_ver='" + vms_ver + "'" ! VMS specific
5368$ WC "voidflags='15'"
5369$ WC "xs_apiversion='" + version + "'"
5370$ WC "CONFIGDOTSH='true'"
5371$!
5372$! ##END WRITE NEW CONSTANTS HERE##
5373$!
5374$ CLOSE CONFIG
5375$!
5376$! Okay, we've gotten here. Build munchconfig.exe
5377$ COPY/NOLOG [-.vms]munchconfig.c []
7558ebc2 5378$ COPY/NOLOG [-.vms]'Makefile_SH' []
570bb66e
JH
5379$ 'Perl_CC' munchconfig.c
5380$ IF Needs_Opt
5381$ THEN
5382$ OPEN/WRITE CONFIG []munchconfig.opt
5383$ IF Using_Gnu_C
5384$ THEN
5385$ WRITE CONFIG "Gnu_CC:[000000]gcclib.olb/library"
5386$ ENDIF
5387$ WRITE CONFIG "Sys$Share:VAXCRTL/Share"
5388$ CLOSE CONFIG
5389$ 'ld' munchconfig.obj,munchconfig.opt/opt
5390$ DELETE/NOLOG/NOCONFIRM munchconfig.opt;
5391$ ELSE
5392$ 'ld' munchconfig.obj
5393$ ENDIF
5394$ IF F$SEARCH("munchconfig.obj") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.obj;
5395$ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
5396$ IF using_cxx
5397$ THEN
5398$ CALL Cxx_demangler_cleanup
5399$ ENDIF
5400$!
5401$ IF alldone .EQS. ""
5402$ THEN
5403$ cat4 SYS$INPUT:
7558ebc2 5404$ DECK
570bb66e
JH
5405
5406If you'd like to make any changes to the config.sh file before I begin
5407to configure things, answer yes to the following question.
5408
7558ebc2 5409$ EOD
570bb66e 5410$ dflt="n"
a5fddd44 5411$ rp="Do you wish to edit ''basename_config_sh'? [''dflt'] "
570bb66e
JH
5412$ GOSUB myread
5413$ IF ans .EQS. "" then ans = dflt
5414$ IF ans
5415$ THEN
5416$ echo4 ""
5417$ echo4 "Be sure to type LOGOUT after you have edited the file,"
5418$ echo4 "then this procedure will resume."
5419$ echo4 ""
5420$ default = F$ENVIRONMENT("DEFAULT")
7558ebc2 5421$ DIRECTORY 'config_sh'
570bb66e
JH
5422$ SET DEFAULT [-]
5423$ SPAWN/WAIT
7558ebc2 5424$ SET DEFAULT 'default'
570bb66e
JH
5425$ ENDIF
5426$ ENDIF
5427$!
5428$ echo ""
5429$ echo4 "Adding ''osname' specific preprocessor commands."
5430$ !
5431$ ! we need an fdl file
5432$ CREATE [-]CONFIG.FDL
7558ebc2 5433$ DECK
570bb66e
JH
5434RECORD
5435 FORMAT STREAM_LF
7558ebc2 5436$ EOD
570bb66e
JH
5437$ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
5438$ ! First spit out the header info with the local defines (to get
5439$ ! around the 255 character command line limit)
5440$ OPEN/APPEND CONFIG [-]config.local
5441$ IF use_debugging_perl THEN WC "#define DEBUGGING"
5442$ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
5443$ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
5444$ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
5445$ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
5446$ IF Using_Gnu_C THEN WC "#define GNUC_ATTRIBUTE_CHECK"
5447$ IF (Has_Dec_C_Sockets)
5448$ THEN
5449$ WC "#define VMS_DO_SOCKETS"
5450$ WC "#define DECCRTL_SOCKETS"
5451$ ELSE
5452$ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS"
5453$ ENDIF
5454$! This is VMS-specific for now
5455$ WC "#''d_setenv' HAS_SETENV"
5456$ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
5457$ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
5458$ IF use64bitint .OR. use64bitint .EQS. "define"
5459$ THEN
5460$ WC "#define USE_64_BIT_INT"
5461$ WC "#define USE_LONG_DOUBLE"
5462$ ENDIF
5463$ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
5464 WC "#define USE_64_BIT_ALL"
5465$ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
5466$ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
5467$ WC "#define HAS_ENVGETENV"
5468$ WC "#define PERL_EXTERNAL_GLOB"
5469$ CLOSE CONFIG
5470$!
5471$ echo4 "Doing variable substitutions on .SH files..."
5472$ echo4 "Extracting config.h (with variable substitutions)"
5473$!
5474$! Now build the normal config.h
5475$ DEFINE/USER_MODE sys$output [-]config.main
7558ebc2 5476$ mcr []munchconfig 'config_sh' [-]config_h.sh
570bb66e
JH
5477$ ! Concatenate them together
5478$ copy [-]config.local,[-]config.main [-]config.h
5479$! Clean up
5480$ DELETE/NOLOG [-]CONFIG.MAIN;*
5481$ DELETE/NOLOG [-]CONFIG.LOCAL;*
5482$ DELETE/NOLOG [-]CONFIG.FDL;*
5483$!
5484$ IF Using_Dec_C
5485$ THEN
5486$ DECC_REPLACE = "DECC=decc=1"
5487$ ELSE
7558ebc2
PP
5488$ DECC_REPLACE = "DECC="
5489$ ENDIF
5490$ IF using_cxx
5491$ THEN
5492$ DECCXX_REPLACE = "DECCXX=DECCXX=1"
5493$ ELSE
5494$ DECCXX_REPLACE = "DECCXX="
570bb66e
JH
5495$ ENDIF
5496$ IF Using_Gnu_C
5497$ THEN
5498$ GNUC_REPLACE = "GNUC=gnuc=1"
5499$ ELSE
5500$ GNUC_REPLACE = "GNUC="
5501$ ENDIF
5502$ IF Has_Dec_C_Sockets
5503$ THEN
5504$ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
5505$ ELSE
5506$ IF Has_Socketshr
5507$ THEN
5508$ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
5509$ ELSE
5510$ SOCKET_REPLACE = "SOCKET="
5511$ ENDIF
5512$ ENDIF
5513$ IF Use_Threads
5514$ THEN
5515$ IF (vms_ver .LES. "6.2")
5516$ THEN
5517$ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
5518$ ELSE
5519$ THREAD_REPLACE = "THREAD=THREADED=1"
5520$ ENDIF
5521$ ELSE
5522$ THREAD_REPLACE = "THREAD="
5523$ ENDIF
5524$ IF mymalloc
5525$ THEN
5526$ MALLOC_REPLACE = "MALLOC=MALLOC=1"
5527$ ELSE
5528$ MALLOC_REPLACE = "MALLOC="
5529$ ENDIF
5530$ echo4 "Extracting ''defmakefile' (with variable substitutions)"
7558ebc2
PP
5531$ DEFINE/USER_MODE sys$output 'UUmakefile'
5532$ mcr []munchconfig 'config_sh' 'Makefile_SH' "''DECC_REPLACE'" -
5533 "''DECCXX_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" -
5534 "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" -
5535 "''Thread_Live_Dangerously'" "PV=''version'" "FLAGS=FLAGS=''extra_flags'"
5536$! Clean up after ourselves
5537$ DELETE/NOLOG/NOCONFIRM []munchconfig.exe;
5538$ echo4 "Extracting make_ext.com (without variable substitutions)"
5539$ Create Sys$Disk:[-]make_ext.com
570bb66e 5540$ Deck/Dollar="$EndOfTpl$"
7558ebc2 5541$!++ make_ext.com
570bb66e
JH
5542$! NOTE: This file is extracted as part of the VMS configuration process.
5543$! Any changes made to it directly will be lost. If you need to make any
56aeb0ae 5544$! changes, please edit the template in Configure.Com instead.
570bb66e
JH
5545$ def = F$Environment("Default")
5546$ exts1 = F$Edit(p1,"Compress")
5547$ p2 = F$Edit(p2,"Upcase,Compress,Trim")
5548$ If F$Locate("MCR ",p2).eq.0 Then p2 = F$Extract(3,255,p2)
5549$ miniperl = "$" + F$Search(F$Parse(p2,".Exe"))
5550$ makeutil = p3
5551$ if f$type('p3') .nes. "" then makeutil = 'p3'
5552$ targ = F$Edit(p4,"Lowercase")
5553$ i = 0
5554$ next_ext:
5555$ ext = F$Element(i," ",p1)
5556$ If ext .eqs. " " Then Goto done
5557$ Define/User_mode Perl_Env_Tables CLISYM_LOCAL
5558$ miniperl
7558ebc2 5559$ deck
570bb66e
JH
5560 ($extdir = $ENV{'ext'}) =~ s/::/./g;
5561 $extdir =~ s#/#.#g;
5562 if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
5563 else { $extdir = ".ext.$extdir"; }
5564 ($ENV{'extdir'} = "[$extdir]");
5565 ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
7558ebc2 5566$ eod
570bb66e
JH
5567$ Set Default &extdir
5568$ redesc = 0
5569$ If F$Locate("clean",targ) .eqs. F$Length(targ)
5570$ Then
7558ebc2
PP
5571$ Write Sys$Output ""
5572$ Write Sys$Output " Making ''ext' (dynamic)"
570bb66e
JH
5573$ On Error Then Goto done
5574$ If F$Search("Descrip.MMS") .eqs. ""
5575$ Then
5576$ redesc = 1
5577$ Else
5578$ If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. -
5579 F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1
5580$ EndIf
5581$ Else
5582$ Write Sys$Output "''targ'ing ''ext' . . ."
5583$ On Error Then Continue
5584$ EndIf
5585$ If redesc Then -
5586 miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]"
5587$ makeutil 'targ'
5588$ i = i + 1
5589$ Set Def &def
5590$ Goto next_ext
5591$ done:
5592$ sts = $Status
5593$ Set Def &def
5594$ Exit sts
7558ebc2 5595$!-- make_ext.com
570bb66e
JH
5596$EndOfTpl$
5597$!
97abc6ad 5598$!
146174a9 5599$! Warn of dangerous symbols or logical names
a4521476 5600$!
146174a9
CB
5601$Bad_environment: SUBROUTINE
5602$ Bad_env = ""
5603$ IF p2 .eqs. "SYMBOL"
5604$ THEN
7558ebc2 5605$ IF f$type('p1') .nes. "" THEN Bad_env := SYMBOL
146174a9
CB
5606$ ELSE
5607$ IF f$trnlnm(p1) .nes. "" THEN Bad_env := LOGICAL
5608$ ENDIF
5609$ IF Bad_env .eqs. "SYMBOL" .or. Bad_env .eqs. "LOGICAL"
a4521476
PP
5610$ THEN
5611$ IF f$search("config.msg") .nes. ""
5612$ THEN
5613$ OPEN/APPEND CONFIG config.msg
5614$ ELSE
5615$ OPEN/WRITE CONFIG config.msg
5616$ ENDIF
146174a9
CB
5617$ IF Bad_env .eqs. "SYMBOL"
5618$ THEN
5619$ WRITE CONFIG ""
5620$ WRITE CONFIG "Symbol name ''p1' found in environment as " + &p1
5621$ WRITE CONFIG " delete before building ''package' via:"
5622$ WRITE CONFIG " $ DELETE/SYMBOL/GLOBAL ''p1'"
5623$ IF f$locate("""",&p1) .ge. f$length(&p1)
5624$ THEN
7558ebc2 5625$ WRITE CONFIG " after building, testing, and installing ''package'"
146174a9
CB
5626$ WRITE CONFIG " restore the symbol with:"
5627$ WRITE CONFIG " $ ''p1' == """ + &p1 + """"
5628$ ENDIF
5629$ ENDIF
5630$ IF Bad_env .eqs. "LOGICAL"
5631$ THEN
5632$ WRITE CONFIG ""
5633$ WRITE CONFIG "Logical name ''p1' found in environment as " + f$trnlnm(p1)
5634$ WRITE CONFIG " deassign before building ''package'"
5635$ ENDIF
a4521476 5636$ CLOSE CONFIG
146174a9 5637$ Bad_env = ""
a4521476
PP
5638$ ENDIF
5639$ EXIT
146174a9 5640$ ENDSUBROUTINE ! Bad_environment
a4521476 5641$ echo ""
570bb66e 5642$ echo4 "Checking for dangerous pre-existing global symbols and logical names."
146174a9
CB
5643$ CALL Bad_environment "TMP"
5644$ CALL Bad_environment "LIB"
5645$ CALL Bad_environment "T"
5646$ CALL Bad_environment "FOO"
5647$ CALL Bad_environment "EXT"
5648$ CALL Bad_environment "TEST" "SYMBOL"
a4521476
PP
5649$ IF f$search("config.msg") .eqs. "" THEN echo "OK."
5650$!
97abc6ad
HM
5651$! %Config-I-VMS, write perl_setup.com here
5652$!
86fced14
CB
5653$ IF (.NOT.perl_symbol)
5654$ THEN
5655$ file_2_find = "[-]''packageup'.cld"
5656$ echo ""
570bb66e 5657$ echo4 "The perl.cld file is now being written..."
86fced14 5658$ OPEN/WRITE CONFIG 'file_2_find'
c645ec3f 5659$ ext = ".exe"
570bb66e 5660$ IF ((sharedperl) .AND. (F$GETSYI("HW_MODEL") .GE. 1024)) THEN ext := .AXE
86fced14
CB
5661$ IF (use_vmsdebug_perl)
5662$ THEN
5663$ WRITE CONFIG "define verb dbgperl"
570bb66e 5664$ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]dbgperl''ext'")
86fced14
CB
5665$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5666$ WRITE CONFIG ""
5667$ WRITE CONFIG "define verb perl"
570bb66e 5668$ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]ndbgPerl''ext'")
86fced14
CB
5669$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5670$ ELSE
5671$ WRITE CONFIG "define verb perl"
570bb66e 5672$ WRITE CONFIG F$FAO("!_!AS","image ''vms_prefix':[000000]perl''ext'")
86fced14
CB
5673$ WRITE CONFIG F$FAO("!_!AS","cliflags (foreign)")
5674$ ENDIF
5675$ CLOSE CONFIG
5676$ ENDIF ! (.NOT.perl_symbol)
97abc6ad 5677$ echo ""
570bb66e 5678$ echo4 "The perl_setup.com file is now being written..."
a3ef2c6f 5679$ file_2_find = "[-]perl_setup.com"
97abc6ad
HM
5680$ OPEN/WRITE CONFIG 'file_2_find'
5681$ WRITE CONFIG "$!"
5682$ WRITE CONFIG "$! Perl_Setup.com ''cf_time'"
5683$ IF cf_email.NES.perladmin
5684$ THEN
5685$ WRITE CONFIG "$! perl configured by ''cf_email'"
5686$ ELSE
5687$ WRITE CONFIG "$! This perl configured & administered by ''perladmin'"
5688$ ENDIF
5689$ WRITE CONFIG "$!"
3eeba6fb 5690$ prefix = prefix - "000000."
97abc6ad
HM
5691$ IF F$LOCATE(".]",prefix) .EQ. F$LENGTH(prefix) THEN -
5692 prefix = prefix - "]" + ".]"
570bb66e 5693$ WRITE CONFIG "$ define/translation=concealed ''vms_prefix' ''prefix'"
86fced14 5694$ WRITE CONFIG "$ ext = "".exe"""
570bb66e 5695$ IF sharedperl
86fced14 5696$ THEN
570bb66e 5697$ write config "$ if f$getsyi(""HW_MODEL"") .ge. 1024 then ext = "".AXE"""
86fced14
CB
5698$ ENDIF
5699$ IF (perl_symbol)
5700$ THEN
5701$ IF (use_vmsdebug_perl)
5702$ THEN
570bb66e
JH
5703$ WRITE CONFIG "$ dbgperl :== $''vms_prefix':[000000]dbgPerl'ext'"
5704$ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]ndbgPerl'ext'"
5705$ WRITE CONFIG "$ define dbgPerlShr ''vms_prefix':[000000]dbgPerlShr'ext'"
86fced14 5706$ ELSE
570bb66e
JH
5707$ WRITE CONFIG "$ perl :== $''vms_prefix':[000000]Perl'ext'"
5708$ WRITE CONFIG "$ define PerlShr ''vms_prefix':[000000]PerlShr'ext'"
86fced14
CB
5709$ ENDIF
5710$ ELSE ! .NOT.perl_symbol
5711$ IF (use_vmsdebug_perl)
5712$ THEN
570bb66e 5713$ WRITE CONFIG "$ define dbgPerlShr ''vms_prefix':[000000]dbgPerlShr'ext'"
86fced14 5714$ ELSE
570bb66e 5715$ WRITE CONFIG "$ define PerlShr ''vms_prefix':[000000]PerlShr'ext'"
86fced14
CB
5716$ ENDIF
5717$ IF perl_verb .EQS. "PROCESS"
5718$ THEN
570bb66e 5719$ WRITE CONFIG "$ set command ''vms_prefix':[000000]''packageup'.CLD"
86fced14
CB
5720$ ENDIF
5721$ ENDIF ! perl_symbol
570bb66e
JH
5722$ WRITE CONFIG "$ define/nolog pod2text ''vms_prefix':[lib.pod]pod2text.com"
5723$ WRITE CONFIG "$ define/nolog pod2html ''vms_prefix':[lib.pod]pod2html.com"
5724$ WRITE CONFIG "$ define/nolog pod2man ''vms_prefix':[lib.pod]pod2man.com"
3eeba6fb 5725$!
97abc6ad
HM
5726$ IF (tzneedset)
5727$ THEN
5728$ WRITE CONFIG "$ define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
5729$ ELSE !leave in but commented out (in case setting was from perl :-)
5730$ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
5731$ ENDIF
5732$ WRITE CONFIG "$!"
5733$ WRITE CONFIG "$! Symbols for commonly used scripts:"
5734$ WRITE CONFIG "$!"
86fced14
CB
5735$ IF (perl_symbol)
5736$ THEN
570bb66e 5737$ WRITE CONFIG "$ Perldoc == ""'"+"'Perl' ''vms_prefix':[lib.pod]Perldoc.com -t"""
86fced14
CB
5738$ WRITE CONFIG "$ pod2text == ""'"+"'Perl' pod2text"""
5739$ WRITE CONFIG "$ pod2html == ""'"+"'Perl' pod2html"""
570bb66e 5740$ WRITE CONFIG "$ pod2latex == ""'"+"'Perl' ''vms_prefix':[lib.pod]pod2latex.com"""
86fced14 5741$ WRITE CONFIG "$!pod2man == ""'"+"'Perl' pod2man"""
570bb66e
JH
5742$ WRITE CONFIG "$!Perlbug == ""'"+"'Perl' ''vms_prefix':[lib]Perlbug.com"""
5743$ WRITE CONFIG "$ c2ph == ""'"+"'Perl' ''vms_prefix':[utils]c2ph.com"""
86fced14
CB
5744$ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
5745$ THEN
570bb66e 5746$ WRITE CONFIG "$ dprofpp == ""'"+"'Perl' ''vms_prefix':[utils]dprofpp.com"""
86fced14 5747$ ENDIF
570bb66e
JH
5748$ WRITE CONFIG "$ h2ph == ""'"+"'Perl' ''vms_prefix':[utils]h2ph.com"""
5749$ WRITE CONFIG "$ h2xs == ""'"+"'Perl' ''vms_prefix':[utils]h2xs.com"""
5750$ WRITE CONFIG "$!perlcc == ""'"+"'Perl' ''vms_prefix':[utils]perlcc.com"""
5751$ WRITE CONFIG "$ splain == ""'"+"'Perl' ''vms_prefix':[utils]splain.com"""
86fced14 5752$ ELSE
570bb66e 5753$ WRITE CONFIG "$ Perldoc == ""Perl ''vms_prefix':[lib.pod]Perldoc.com -t"""
86fced14
CB
5754$ WRITE CONFIG "$ pod2text == ""Perl pod2text"""
5755$ WRITE CONFIG "$ pod2html == ""Perl pod2html"""
570bb66e 5756$ WRITE CONFIG "$ pod2latex == ""Perl ''vms_prefix':[lib.pod]pod2latex.com"""
86fced14 5757$ WRITE CONFIG "$!pod2man == ""Perl pod2man"""
570bb66e
JH
5758$ WRITE CONFIG "$!Perlbug == ""Perl ''vms_prefix':[lib]Perlbug.com"""
5759$ WRITE CONFIG "$ c2ph == ""Perl ''vms_prefix':[utils]c2ph.com"""
86fced14
CB
5760$ IF F$LOCATE("Devel::DProf",extensions) .LT. F$LENGTH(extensions)
5761$ THEN
570bb66e 5762$ WRITE CONFIG "$ dprofpp == ""Perl ''vms_prefix':[utils]dprofpp.com"""
86fced14 5763$ ENDIF
570bb66e
JH
5764$ WRITE CONFIG "$ h2ph == ""Perl ''vms_prefix':[utils]h2ph.com"""
5765$ WRITE CONFIG "$ h2xs == ""Perl ''vms_prefix':[utils]h2xs.com"""
5766$ WRITE CONFIG "$!perlcc == ""Perl ''vms_prefix':[utils]perlcc.com"""
5767$ WRITE CONFIG "$ splain == ""Perl ''vms_prefix':[utils]splain.com"""
86fced14 5768$ ENDIF
97abc6ad
HM
5769$ CLOSE CONFIG
5770$!
5771$ echo ""
570bb66e
JH
5772$ echo "The file can be found at:"
5773$ echo4 " ''F$SEARCH(file_2_find)'"
5774$ echo "Add that file (or an @ call to it) to your [SY]LOGIN.COM"
5775$ echo "when you are satisfied with a successful compilation,"
5776$ echo "testing, and installation of your perl."
97abc6ad 5777$ echo ""
86fced14
CB
5778$ IF ((.NOT.perl_symbol) .AND. (perl_verb .EQS. "DCLTABLES"))
5779$ THEN
5780$ file_2_find = "[-]''packageup'_install.com"
7558ebc2 5781$ OPEN/WRITE CONFIG 'file_2_find'
86fced14
CB
5782$ WRITE CONFIG "$ set command perl /table=sys$common:[syslib]dcltables.exe -"
5783$ WRITE CONFIG " /output=sys$common:[syslib]dcltables.exe"
5784$ WRITE CONFIG "$ install replace sys$common:[syslib]dcltables.exe"
5785$ CLOSE CONFIG
5786$ echo4 ""
570bb66e
JH
5787$ echo4 "In order to install the ''packageup' verb into DCLTABLES run:"
5788$ echo4 " @ ''F$SEARCH(file_2_find)'"
5789$ echo4 "after a successful build, test, and install. Do so with CMKRNL privilege."
86fced14
CB
5790$ echo4 ""
5791$ ENDIF
97abc6ad
HM
5792$!
5793$!figure out where we "are" by parsing 'vms_default_directory_name'
5794$!
5795$ set_def_command = ""
5796$ dflt = F$ENVIRONMENT("DEFAULT") - ".UU]"
5797$ tmp = vms_default_directory_name - dflt - "]"
5798$ i = 0
5799$ IF tmp .EQS. "" THEN GOTO Beyond_set_def_loop
5800$Set_def_loop:
5801$ tmp1 = F$ELEMENT(i,".",tmp)
5802$ IF tmp1 .EQS. "." THEN GOTO Beyond_set_def_loop
5803$ IF i .EQ. 0
5804$ THEN set_def_command = "set default [-"
5805$ ELSE set_def_command = set_def_command + "-"
5806$ ENDIF
5807$ i = i + 1
5808$ GOTO Set_def_loop
5809$Beyond_set_def_loop:
5810$ IF set_def_command.NES.""
5811$ THEN
5812$ set_def_command = set_def_command - "-" + "]"
5813$ echo4 ""
5814$ echo4 "In order to build ''package' you must now issue the commands:"
5815$ echo4 ""
5816$ echo4 " ''set_def_command'"
5817$ ELSE
5818$ echo4 ""
5819$ echo4 "In order to build ''package' you must now issue the command:"
5820$ echo4 ""
5821$ ENDIF
5822$ echo4 " ''make'''makefile'", macros
5823$ echo4 ""
5824$!
a4521476
PP
5825$ IF ( F$SEARCH("config.msg").NES."" )
5826$ THEN
5827$ echo "Hmm. I also noted the following information while running:"
5828$ echo ""
5829$ type config.msg
5830$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
5831$ DELETE/NOLOG/NOCONFIRM config.msg;
5832$ ENDIF
5833$!
97abc6ad
HM
5834$Clean_up:
5835$ IF (silent)
5836$ THEN
5837$ DEASSIGN SYS$OUTPUT
5838$! DEASSIGN SYS$ERROR
5839$ ENDIF
5840$ IF F$GETJPI("","FILCNT").NE.vms_filcnt THEN CLOSE CONFIG
5841$ IF F$GETJPI("","FILCNT").NE.vms_filcnt
5842$ THEN WRITE SYS$ERROR "%Config-W-VMS, WARNING: There is a file still open"
5843$ ENDIF
5844$ dflt = F$ENVIRONMENT("DEFAULT")
5845$ IF F$LOCATE("UU]",dflt).EQS.(F$LENGTH(dflt)-3)
5846$ THEN
5847$ IF ( F$SEARCH("[]*.*").NES."" ) THEN DELETE/NOLOG/NOCONFIRM []*.*;*
5848$ SET DEFAULT [-]
5849$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) UU.DIR
5850$ DELETE/NOLOG/NOCONFIRM UU.DIR;
5851$ ENDIF
5852$ SET DEFAULT 'vms_default_directory_name' !be kind rewind
5853$ STOP
5854$ EXIT
5855$!: End of Configure