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