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