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