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