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