up patchlevel &c
[p5sagit/p5-mst-13.2.git] / vms / subconfigure.com
CommitLineData
3eeba6fb 1$! SUBCONFIGURE.COM - build a config.sh for VMS Perl.
9ef4b0a6 2$!
3$! Note for folks from other platforms changing things in here:
4$! Fancy changes (based on compiler capabilities or VMS version or
5$! whatever) are tricky, so go ahead and punt on those.
6$!
7$! Simple changes, though (say, always setting something to 1, or undef,
8$! or something like that) are straightforward. Adding a new item for the
9$! ultimately created config.sh requires adding two lines to this file.
10$!
11$! First, a line in the format:
12$! $ perl_foo = "bar"
13$! after the line tagged ##ADD NEW CONSTANTS HERE##. Replace foo with the
14$! variable name as it appears in config.sh.
15$!
16$! Second, add a line in the format:
17$! $ WC "foo='" + perl_foo + "'"
18$! after the line tagged ##WRITE NEW CONSTANTS HERE##. Careful of the
19$! quoting, as it can be tricky.
97abc6ad 20$!
21$! This .COM file expects to be called by configure.com, and thus expects
22$! a few symbols in the environment. Notably:
23$!
24$! One of: Using_Dec_C, Using_Vax_C, Using_Gnu_C set to "YES"
25$! Dec_C_Version set to the Dec C version (defaults to 0 if not specified)
26$! Has_Socketshr set to "T" if using socketshr
27$! Has_Dec_C_Sockets set to "T" if using Dec C sockets
28$! Use_Threads set to "T" if they're using threads
29$! C_Compiler_Invoke is the command needed to invoke the C compiler
30$!
31$! Set Dec_C_Version to something
32$ WRITE_RESULT := "WRITE SYS$OUTPUT ""%CONFIG-I-RESULT "" + "
cc391245 33$ echo = "Write Sys$Output "
97abc6ad 34$ Dec_C_Version := "''Dec_C_Version'"
35$ Dec_C_Version = Dec_C_Version + 0
36$ Vms_Ver := "''f$extract(1,3, f$getsyi(""version""))'"
37$ perl_extensions := "''extensions'"
429a5e67 38$ if f$length(Mcc) .eq. 0 then Mcc := "cc"
39$ MCC = f$edit(mcc, "UPCASE")
40$ IF Mcc.eqs."CC
41$ THEN
42$ C_Compiler_Replace := "CC="
43$ ELSE
44$ C_Compiler_Replace := "CC=CC=''Mcc'"
45$ ENDIF
97abc6ad 46$ if "''Using_Dec_C'" .eqs. "Yes"
47$ THEN
48$ Checkcc := "''Mcc'/prefix=all"
49$ ELSE
50$ Checkcc := "''Mcc'"
51$ ENDIF
52$ cc_flags = ""
3937c24e 53$ if use_multiplicity .eqs. "Y"
54$ THEN
55$ perl_usemultiplicity = "define"
56$ ELSE
57$ perl_usemultiplicity = "undef"
58$ ENDIF
97abc6ad 59$! Some constant defaults.
60$
61$ hwname = f$getsyi("HW_NAME")
62$ myname = myhostname
63$ if "''myname'" .eqs. "" THEN myname = f$trnlnm("SYS$NODE")
9ef4b0a6 64$!
65$! ##ADD NEW CONSTANTS HERE##
9ecfa05e 66$ perl_d_madvise="undef"
67$ perl_d_msync="undef"
68$ perl_d_mprotect="undef"
69$ perl_d_munmap="undef"
a12fb911 70$ perl_crosscompile="undef"
71$ perl_multiarch="undef"
9ecfa05e 72$ perl_d_mmap="undef"
73$ perl_i_sysmman="undef"
cb86ce0e 74$ perl_d_telldirproto="define"
953103e7 75$ perl_i_sysmount="undef"
76$ perl_d_fstatfs="undef"
c2da85ba 77$ perl_i_machcthreads="undef"
78$ perl_i_pthread="define"
13789a15 79$ perl_d_fstatvfs="undef"
953103e7 80$ perl_d_statfsflags="undef"
81$ perl_i_sysstatvfs="undef"
953103e7 82$ perl_i_mntent="undef"
83$ perl_d_getmntent="undef"
84$ perl_d_hasmntopt="undef"
97abc6ad 85$ perl_package="''package'"
86$ perl_baserev = "''baserev'"
429a5e67 87$ cc_defines=""
a12fb911 88$ perl_installusrbinperl="undef"
97abc6ad 89$ perl_CONFIG="true"
3937c24e 90$ perl_d_fseeko="undef"
91$ perl_d_ftello="undef"
92$ perl_d_readv="undef"
93$ perl_d_writev="undef"
94$ perl_i_machcthr="undef"
97abc6ad 95$ perl_i_netdb="undef"
96$ perl_d_gnulibc="undef"
97$ perl_cf_by="unknown"
98$ perl_ccdlflags=""
99$ perl_cccdlflags=""
100$ perl_mab=""
cc391245 101$ perl_drand01 = "drand48()"
102$ perl_randseedtype = "long int"
103$ perl_seedfunc = "srand48"
3937c24e 104$ perl_d_msg_ctrunc = "undef"
105$ perl_d_msg_dontroute = "undef"
106$ perl_d_msg_oob = "undef"
107$ perl_d_msg_peek = "undef"
108$ perl_d_msg_proxy = "undef"
109$ perl_d_scm_rights = "undef"
110$ perl_d_sendmsg = "undef"
111$ perl_d_recvmsg = "undef"
112$ perl_d_msghdr_s = "undef"
113$ perl_d_cmsghdr_s = "undef"
114$ perl_d_dbminit64 = "undef"
115$ perl_d_dbmclose64 = "undef"
116$ perl_d_fetch64 = "undef"
117$ perl_d_store64 = "undef"
118$ perl_d_delete64 = "undef"
119$ perl_d_firstkey64 = "undef"
120$ perl_d_nextkey64 = "undef"
121$ perl_d_fstat64 = "undef"
122$ perl_d_ftruncate64 = "undef"
123$ perl_d_lseek64 = "undef"
124$ perl_d_lstat64 = "undef"
125$ perl_d_open64 = "undef"
126$ perl_d_opendir64 = "undef"
127$ perl_d_readdir64 = "undef"
128$ perl_d_seekdir64 = "undef"
129$ perl_d_stat64 = "undef"
130$ perl_d_telldir64 = "undef"
131$ perl_d_truncate64 = "undef"
132$ perl_d_dirent64_s = "undef"
133$ perl_d_fgetpos64 = "undef"
134$ perl_d_fopen64 = "undef"
135$ perl_d_freopen64 = "undef"
136$ perl_d_fseek64 = "undef"
137$ perl_d_fseeko64 = "undef"
138$ perl_d_fsetpos64 = "undef"
139$ perl_d_ftell64 = "undef"
140$ perl_d_ftello64 = "undef"
141$ perl_d_tmpfile64 = "undef"
142$ perl_use64bits = "undef"
143$ perl_d_drand48proto = "define"
97abc6ad 144$ perl_libpth="/sys$share /sys$library"
145$ perl_ld="Link"
146$ perl_lddlflags="/Share"
147$ perl_ranlib=""
148$ perl_ar=""
149$ perl_eunicefix=":"
150$ perl_hint="none"
93341792 151$ perl_i_arpainet="undef"
b6e4eeb2 152$ perl_d_grpasswd="undef"
153$ perl_d_setgrent="undef"
154$ perl_d_getgrent="define"
155$ perl_d_endgrent="define"
156$ perl_d_pwpasswd="define"
157$ perl_d_setpwent="define"
158$ perl_d_getpwent="define"
159$ perl_d_endpwent="define"
3937c24e 160$ perl_d_phostname="undef"
161$ perl_d_accessx="undef"
162$ perl_d_eaccess="undef"
9ef4b0a6 163$ perl_ebcdic="undef"
97abc6ad 164$ perl_hintfile=""
165$ perl_shrplib="define"
166$ perl_usemymalloc=mymalloc
167$ perl_usevfork="true"
168$ perl_useposix="false"
169$ perl_spitshell="write sys$output "
170$ perl_dlsrc="dl_vms.c"
171$ perl_man1ext="rno"
172$ perl_man3ext="rno"
173$ perl_prefix="perl_root"
174$ perl_binexp="''perl_prefix':[000000]"
175$ perl_builddir="''perl_prefix':[000000]"
176$ perl_installbin="''perl_prefix':[000000]"
be46aa5a 177$ perl_installscript="''perl_prefix':[utils]"
97abc6ad 178$ perl_installman1dir="''perl_prefix':[man.man1]"
179$ perl_installman3dir="''perl_prefix':[man.man3]"
180$ perl_installprivlib="''perl_prefix':[lib]"
181$ perl_installsitelib="''perl_prefix':[lib.site_perl]"
182$ perl_path_sep="|"
183$ perl_cc=Mcc
184$ perl_d_sockpair="undef"
185$ perl_i_neterrno="define"
186$ perl_ldflags="/NoTrace/NoMap"
187$ perl_d_lchown="undef"
c05f8f3d 188$ perl_d_mknod="undef"
97abc6ad 189$ perl_d_union_semun="undef"
190$ perl_d_semctl_semun="undef"
191$ perl_d_semctl_semid_ds="undef"
192$ IF (sharedperl.EQS."Y")
193$ THEN
194$ perl_obj_ext=".abj"
195$ perl_so="axe"
196$ perl_dlext="axe"
197$ perl_exe_ext=".axe"
198$ perl_lib_ext=".alb"
199$ ELSE
200$ perl_obj_ext=".obj"
201$ perl_so="exe"
202$ perl_dlext="exe"
203$ perl_exe_ext=".exe"
204$ perl_lib_ext=".olb"
205$ENDIF
206$ perl_dlobj="dl_vms''perl_obj_ext'"
207$ perl_osname="VMS"
208$ perl_d_archlib="define"
209$ perl_d_bincompat3="undef"
210$ perl_cppstdin="''Perl_CC'/noobj/preprocess=sys$output sys$input"
a12fb911 211$ perl_cppminus=" "
97abc6ad 212$ perl_d_castneg="define"
213$ perl_castflags="0"
214$ perl_d_chsize="undef"
215$ perl_d_const="define"
216$ perl_d_crypt="define"
217$ perl_byteorder="1234"
a12fb911 218$ perl_full_csh=" "
97abc6ad 219$ perl_d_csh="undef"
220$ perl_d_dup2="define"
221$ perl_d_fchmod="undef"
222$ perl_d_fchown="undef"
223$ perl_d_fcntl="undef"
224$ perl_d_fgetpos="define"
225$ perl_d_flexfnam="define"
226$ perl_d_flock="undef"
227$ perl_d_fsetpos="define"
228$ perl_d_getgrps="undef"
229$ perl_d_setgrps="undef"
230$ perl_d_getprior="undef"
231$ perl_d_killpg="undef"
232$ perl_d_link="undef"
233$ perl_d_lstat="undef"
234$ perl_d_lockf="undef"
235$ perl_d_memcmp="define"
236$ perl_d_memcpy="define"
237$ perl_d_memmove="define"
238$ perl_d_memset="define"
239$ perl_d_mkdir="define"
240$ perl_d_msg="undef"
241$ perl_d_open3="define"
242$ perl_d_poll="undef"
243$ perl_d_readdir="define"
244$ perl_d_seekdir="define"
245$ perl_d_telldir="define"
246$ perl_d_rewinddir="define"
247$ perl_d_rename="define"
248$ perl_d_rmdir="define"
249$ perl_d_sem="undef"
250$ perl_d_setegid="undef"
251$ perl_d_seteuid="undef"
252$ perl_d_setprior="undef"
253$ perl_d_setregid="undef"
254$ perl_d_setresgid="undef"
255$ perl_d_setreuid="undef"
256$ perl_d_setresuid="undef"
257$ perl_d_setrgid="undef"
258$ perl_d_setruid="undef"
259$ perl_d_setsid="undef"
260$ perl_d_shm="undef"
261$ perl_d_shmatprototype="undef"
262$ perl_d_statblks="undef"
263$ perl_stdio_ptr="((*fp)->_ptr)"
264$ perl_stdio_cnt="((*fp)->_cnt)"
265$ perl_stdio_base="((*fp)->_base)"
266$ perl_stdio_bufsiz="((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)"
267$ perl_d_strctcpy="define"
268$ perl_d_strerror="define"
269$ perl_d_syserrlst="undef"
270$ perl_d_strerrm="strerror((e),vaxc$errno)"
271$ perl_d_symlink="undef"
272$ perl_d_syscall="undef"
273$ perl_d_system="define"
274$ perl_timetype="time_t"
275$ perl_d_vfork="define"
276$ perl_signal_t="void"
277$ perl_d_volatile="define"
278$ perl_d_vprintf="define"
279$ perl_d_charvspr="undef"
280$ perl_d_waitpid="define"
281$ perl_i_dirent="undef"
282$ perl_d_dirnamlen="define"
283$ perl_direntrytype="struct dirent"
284$ perl_i_fcntl="undef"
285$ perl_i_grp="undef"
286$ perl_i_limits="define"
287$ perl_i_memory="undef"
288$ perl_i_ndbm="undef"
289$ perl_i_stdarg="define"
290$ perl_i_pwd="undef"
291$ perl_d_pwquota="undef"
292$ perl_d_pwage="undef"
293$ perl_d_pwchange="undef"
294$ perl_d_pwclass="undef"
295$ perl_d_pwexpire="undef"
296$ perl_d_pwcomment="define"
297$ perl_i_stddef="define"
298$ perl_i_stdlib="define"
299$ perl_i_string="define"
300$ perl_i_sysdir="undef"
301$ perl_i_sysfile="undef"
302$ perl_i_sysioctl="undef"
303$ perl_i_sysndir="undef"
304$ perl_i_sysresrc="undef"
305$ perl_i_sysselct="undef"
306$ perl_i_dbm="undef"
307$ perl_i_rpcsvcdbm="undef"
308$ perl_i_sfio="undef"
309$ perl_i_sysstat="define"
310$ perl_i_systimes="undef"
311$ perl_i_systypes="define"
312$ perl_i_sysun="undef"
313$ perl_i_syswait="undef"
314$ perl_i_termio="undef"
315$ perl_i_sgtty="undef"
316$ perl_i_termios="undef"
317$ perl_i_time="define"
318$ perl_i_systime="undef"
319$ perl_i_systimek="undef"
cb38e85f 320$! perl_i_unistd="undef"
97abc6ad 321$ perl_i_utime="undef"
322$ perl_i_varargs="undef"
323$ perl_i_vfork="undef"
324$ perl_prototype="define"
325$ perl_randbits="31"
326$ perl_stdchar="char"
327$ perl_d_unlink_all_versions="undef"
328$ perl_full_sed="_NLA0:"
329$ perl_bin="/''perl_prefix'/000000"
330$ perl_binexp="''perl_prefix':[000000]"
331$ perl_d_alarm="define"
332$ perl_d_casti32="define"
333$ perl_d_chown="define"
334$ perl_d_chroot="undef"
335$ perl_d_cuserid="define"
336$ perl_d_dbl_dig="define"
337$ perl_d_difftime="define"
338$ perl_d_fork="undef"
339$ perl_d_getlogin="define"
340$ perl_d_getppid="undef"
341$ perl_d_nice="define"
342$ perl_d_pause="define"
343$ perl_d_pipe="define"
344$ perl_d_readlink="undef"
345$ perl_d_setlinebuf="undef"
346$ perl_d_strchr="define"
347$ perl_d_strtod="define"
348$ perl_d_strtol="define"
349$ perl_d_strtoul="define"
350$ perl_d_tcgetpgrp="undef"
351$ perl_d_tcsetpgrp="undef"
352$ perl_d_times="define"
353$ perl_d_tzname="undef"
354$ perl_d_umask="define"
355$ perl_fpostype="fpos_t"
356$ perl_i_dlfcn="undef"
357$ perl_i_float="define"
358$ perl_i_math="define"
359$ perl_lseektype="int"
360$ perl_i_values="undef"
361$ perl_malloctype="void *"
362$ perl_freetype="void"
363$ if "''mymalloc'".eqs."Y"
364$ THEN
365$ perl_d_mymalloc="define"
366$ ELSE
367$ perl_d_mymalloc="undef"
368$ENDIF
369$ perl_sh="MCR"
370$ perl_modetype="unsigned int"
371$ perl_ssizetype="int"
a12fb911 372$ perl_o_nonblock=" "
373$ perl_eagain=" "
374$ perl_rd_nodata=" "
97abc6ad 375$ perl_d_eofnblk="undef"
376$ perl_d_oldarchlib="define"
377$ perl_privlibexp="''perl_prefix':[lib]"
378$ perl_privlib="''perl_prefix':[lib]"
379$ perl_sitelibexp="''perl_prefix':[lib.site_perl]"
380$ perl_sitelib="''perl_prefix':[lib.site_perl]"
381$ perl_sizetype="size_t"
382$ perl_i_sysparam="undef"
383$ perl_d_void_closedir="define"
384$ perl_d_dlerror="undef"
385$ perl_d_dlsymun="undef"
386$ perl_d_suidsafe="undef"
387$ perl_d_dosuid="undef"
388$ perl_d_inetaton="undef"
389$ perl_d_isascii="define"
390$ perl_d_mkfifo="undef"
391$ perl_d_safebcpy="undef"
392$ perl_d_safemcpy="define"
393$ perl_d_sanemcmp="define"
394$ perl_d_setpgrp="undef"
395$ perl_d_bsdsetpgrp="undef"
396$ perl_d_bsdpgrp="undef"
397$ perl_d_setpgid="undef"
398$ perl_d_setpgrp2="undef"
399$ perl_d_Gconvert="my_gconvert(x,n,t,b)"
400$ perl_d_getpgid="undef"
401$ perl_d_getpgrp="undef"
402$ perl_d_bsdgetpgrp="undef"
403$ perl_d_getpgrp2="undef"
404$ perl_d_sfio="undef"
405$ perl_usedl="define"
b6e4eeb2 406$ perl_startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !\n$ exit++ + ++$status != 0 and $exit = $status = undef;"""
a12fb911 407$ perl_db_hashtype=" "
408$ perl_db_prefixtype=" "
97abc6ad 409$ perl_useperlio="undef"
410$ perl_defvoidused="15"
411$ perl_voidflags="15"
412$ perl_d_eunice="undef"
413$ perl_d_pwgecos="define"
414$ IF ("''Use_Threads'".eqs."T").and.("''VMS_VER'".LES."6.2")
415$ THEN
416$ perl_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"
417$ ELSE
a12fb911 418$ perl_libs=" "
97abc6ad 419$ ENDIF
420$ IF ("''Using_Dec_C'".eqs."Yes")
421$ THEN
422$ perl_libc="(DECCRTL)"
423$ ELSE
a12fb911 424$ perl_libc=" "
97abc6ad 425$ ENDIF
426$ perl_PATCHLEVEL="''patchlevel'"
427$ perl_SUBVERSION="''subversion'"
428$ perl_pager="most"
429$!
430$!
431$! Now some that we build up
432$!
433$ LocalTime = f$time()
434$ perl_cf_time= f$extract(0, 3, f$cvtime(LocalTime,, "WEEKDAY")) + " " + -
435 f$edit(f$cvtime(LocalTime, "ABSOLUTE", "MONTH"), "LOWERCASE") + -
436 " " + f$cvtime(LocalTime,, "DAY") + " " + f$cvtime(LocalTime,, "TIME") + -
437 " " + f$cvtime(LocalTime,, "YEAR")
438$ if f$getsyi("HW_MODEL").ge.1024
439$ THEN
440$ perl_arch="VMS_AXP"
441$ perl_archname="VMS_AXP"
442$ perl_alignbytes="8"
443$ ELSE
444$ perl_arch="VMS_VAX"
445$ perl_archname="VMS_VAX"
446$ perl_alignbytes="8"
447$ ENDIF
9ef4b0a6 448$ if ("''Use_Threads'".eqs."T")
449$ THEN
450$ perl_arch = "''perl_arch'-thread"
451$ perl_archname = "''perl_archname'-thread"
3937c24e 452$ ELSE
a12fb911 453$ perl_d_old_pthread_create_joinable = "undef"
454$ perl_old_pthread_create_joinable = " "
9ef4b0a6 455$ ENDIF
97abc6ad 456$ perl_osvers=f$edit(osvers, "TRIM")
85988417 457$ if (perl_subversion + 0).eq.0
458$ THEN
459$ LocalPerlVer = "5_" + Perl_PATCHLEVEL
460$ ELSE
97abc6ad 461$ LocalPerlVer = "5_" + Perl_PATCHLEVEL + perl_subversion
85988417 462$ ENDIF
97abc6ad 463$!
464$! Some that we need to invoke the compiler for
465$ OS := "open/write SOURCECHAN []temp.c"
466$ WS := "write SOURCECHAN"
467$ CS := "close SOURCECHAN"
468$ DS := "delete/nolog []temp.*;*"
469$ Needs_Opt := "No"
470$ if ("''using_vax_c'".eqs."Yes").or.("''using_gnu_c'".eqs."Yes")
471$ THEN
472$ open/write OPTCHAN []temp.opt
473$ IF ("''using_gnu_c'".eqs."Yes")
474$ THEN
475$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
476$ endif
477$ write OPTCHAN "Sys$Share:VAXCRTL/Share"
478$ Close OPTCHAN
479$ Needs_Opt := "Yes"
480$ ENDIF
481$!
482$! Check for __STDC__
483$!
484$ OS
485$ WS "#ifdef __DECC
486$ WS "#include <stdlib.h>
487$ WS "#endif
488$ WS "#include <stdio.h>
489$ WS "int main()
490$ WS "{"
491$ WS "#ifdef __STDC__
492$ WS "printf(""42\n"");
493$ WS "#else
494$ WS "printf(""1\n"");
495$ WS "#endif
496$ WS "exit(0);
497$ WS "}"
498$ CS
499$ DEFINE SYS$ERROR _NLA0:
500$ DEFINE SYS$OUTPUT _NLA0:
501$ ON ERROR THEN CONTINUE
502$ ON WARNING THEN CONTINUE
9ef4b0a6 503$ 'Checkcc' temp.c
97abc6ad 504$ If (Needs_Opt.eqs."Yes")
505$ THEN
9ef4b0a6 506$ link temp.obj,temp.opt/opt
97abc6ad 507$ else
9ef4b0a6 508$ link temp.obj
97abc6ad 509$ endif
510$ DEASSIGN SYS$OUTPUT
511$ DEASSIGN SYS$ERROR
512$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
513$ DEFINE SYS$ERROR TEMPOUT
514$ DEFINE SYS$OUTPUT TEMPOUT
515$ mcr []temp
516$ CLOSE TEMPOUT
517$ DEASSIGN SYS$OUTPUT
518$ DEASSIGN SYS$ERROR
519$ OPEN/READ TEMPOUT [-.uu]tempout.lis
520$ READ TEMPOUT line
521$ CLOSE TEMPOUT
522$
523$ perl_cpp_stuff=line
524$ WRITE_RESULT "cpp_stuff is ''perl_cpp_stuff'"
525$!
526$! Check for double size
527$!
528$ OS
529$ WS "#ifdef __DECC
530$ WS "#include <stdlib.h>
531$ WS "#endif
532$ WS "#include <stdio.h>
533$ WS "int main()
534$ WS "{"
429a5e67 535$ WS "int foo;
536$ WS "foo = sizeof(double);
537$ WS "printf(""%d\n"", foo);
97abc6ad 538$ WS "exit(0);
539$ WS "}"
540$ CS
541$ DEFINE SYS$ERROR _NLA0:
542$ DEFINE SYS$OUTPUT _NLA0:
543$ ON ERROR THEN CONTINUE
544$ ON WARNING THEN CONTINUE
9ef4b0a6 545$ 'Checkcc' temp.c
97abc6ad 546$ If (Needs_Opt.eqs."Yes")
547$ THEN
9ef4b0a6 548$ link temp.obj,temp.opt/opt
97abc6ad 549$ else
9ef4b0a6 550$ link temp.obj
97abc6ad 551$ endif
9ef4b0a6 552$! link temp.obj
97abc6ad 553$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
554$ DEASSIGN SYS$OUTPUT
555$ DEASSIGN SYS$ERROR
556$ DEFINE SYS$ERROR TEMPOUT
557$ DEFINE SYS$OUTPUT TEMPOUT
558$ mcr []temp
559$ CLOSE TEMPOUT
560$ DEASSIGN SYS$OUTPUT
561$ DEASSIGN SYS$ERROR
562$ OPEN/READ TEMPOUT [-.uu]tempout.lis
563$ READ TEMPOUT line
564$ CLOSE TEMPOUT
565$
566$ perl_doublesize=line
567$ WRITE_RESULT "doublesize is ''perl_doublesize'"
568$!
569$! Check for long double size
570$!
571$ OS
572$ WS "#ifdef __DECC
573$ WS "#include <stdlib.h>
574$ WS "#endif
575$ WS "#include <stdio.h>
576$ WS "int main()
577$ WS "{"
429a5e67 578$ WS "printf(""%d\n"", sizeof(long double));
97abc6ad 579$ WS "exit(0);
580$ WS "}"
581$ CS
582$ DEFINE SYS$ERROR _NLA0:
583$ DEFINE SYS$OUTPUT _NLA0:
584$ ON ERROR THEN CONTINUE
585$ ON WARNING THEN CONTINUE
9ef4b0a6 586$ 'Checkcc' temp.c
97abc6ad 587$ teststatus = f$extract(9,1,$status)
588$ if (teststatus.nes."1")
589$ THEN
590$ perl_longdblsize="0"
591$ perl_d_longdbl="undef"
592$ ELSE
593$ ON ERROR THEN CONTINUE
594$ ON WARNING THEN CONTINUE
595$ If (Needs_Opt.eqs."Yes")
596$ THEN
9ef4b0a6 597$ link temp.obj,temp.opt/opt
97abc6ad 598$ else
9ef4b0a6 599$ link temp.obj
97abc6ad 600$ endif
601$ teststatus = f$extract(9,1,$status)
602$ DEASSIGN SYS$OUTPUT
603$ DEASSIGN SYS$ERROR
604$ if (teststatus.nes."1")
605$ THEN
606$ perl_longdblsize="0"
607$ perl_d_longdbl="undef"
608$ ELSE
609$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
610$ DEFINE SYS$ERROR TEMPOUT
611$ DEFINE SYS$OUTPUT TEMPOUT
612$ mcr []temp
613$ CLOSE TEMPOUT
614$ DEASSIGN SYS$OUTPUT
615$ DEASSIGN SYS$ERROR
616$ OPEN/READ TEMPOUT [-.uu]tempout.lis
617$ READ TEMPOUT line
618$ CLOSE TEMPOUT
619$
620$ perl_longdblsize=line
621$ perl_d_longdbl="define"
622$ ENDIF
623$ ENDIF
624$ WRITE_RESULT "longdblsize is ''perl_longdblsize'"
625$ WRITE_RESULT "d_longdbl is ''perl_d_longdbl'"
626$!
627$! Check for long long existance and size
628$!
629$ OS
630$ WS "#ifdef __DECC
631$ WS "#include <stdlib.h>
632$ WS "#endif
633$ WS "#include <stdio.h>
634$ WS "int main()
635$ WS "{"
429a5e67 636$ WS "printf(""%d\n"", sizeof(long long));
97abc6ad 637$ WS "exit(0);
638$ WS "}"
639$ CS
640$ DEFINE SYS$ERROR _NLA0:
641$ DEFINE SYS$OUTPUT _NLA0:
642$ on error then continue
643$ on warning then continue
9ef4b0a6 644$ 'Checkcc' temp.c
97abc6ad 645$ If (Needs_Opt.eqs."Yes")
646$ THEN
9ef4b0a6 647$ link temp.obj,temp.opt/opt
97abc6ad 648$ else
9ef4b0a6 649$ link temp.obj
97abc6ad 650$ endif
651$ teststatus = f$extract(9,1,$status)
652$ DEASSIGN SYS$OUTPUT
653$ DEASSIGN SYS$ERROR
654$ if (teststatus.nes."1")
655$ THEN
656$ perl_longlongsize="0"
657$ perl_d_longlong="undef"
658$ ELSE
659$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
660$ DEFINE SYS$ERROR TEMPOUT
661$ DEFINE SYS$OUTPUT TEMPOUT
662$ mcr []temp
663$ CLOSE TEMPOUT
664$ DEASSIGN SYS$OUTPUT
665$ DEASSIGN SYS$ERROR
666$ OPEN/READ TEMPOUT [-.uu]tempout.lis
667$ READ TEMPOUT line
668$ CLOSE TEMPOUT
669$
670$ perl_longlongsize=line
671$ perl_d_longlong="define"
672$ ENDIF
673$ WRITE_RESULT "longlongsize is ''perl_longlongsize'"
674$ WRITE_RESULT "d_longlong is ''perl_d_longlong'"
675$!
676$! Check for int size
677$!
678$ OS
679$ WS "#ifdef __DECC
680$ WS "#include <stdlib.h>
681$ WS "#endif
682$ WS "#include <stdio.h>
683$ WS "int main()
684$ WS "{"
429a5e67 685$ WS "printf(""%d\n"", sizeof(int));
97abc6ad 686$ WS "exit(0);
687$ WS "}"
688$ CS
689$ DEFINE SYS$ERROR _NLA0:
690$ DEFINE SYS$OUTPUT _NLA0:
691$ on error then continue
692$ on warning then continue
9ef4b0a6 693$ 'Checkcc' temp.c
97abc6ad 694$ If (Needs_Opt.eqs."Yes")
695$ THEN
9ef4b0a6 696$ link temp.obj,temp.opt/opt
97abc6ad 697$ else
9ef4b0a6 698$ link temp.obj
97abc6ad 699$ endif
700$ If (Needs_Opt.eqs."Yes")
701$ THEN
9ef4b0a6 702$ link temp.obj,temp.opt/opt
97abc6ad 703$ else
9ef4b0a6 704$ link temp.obj
97abc6ad 705$ endif
706$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
707$ DEASSIGN SYS$OUTPUT
708$ DEASSIGN SYS$ERROR
709$ DEFINE SYS$ERROR TEMPOUT
710$ DEFINE SYS$OUTPUT TEMPOUT
711$ mcr []temp
712$ CLOSE TEMPOUT
713$ DEASSIGN SYS$OUTPUT
714$ DEASSIGN SYS$ERROR
715$ OPEN/READ TEMPOUT [-.uu]tempout.lis
716$ READ TEMPOUT line
717$ CLOSE TEMPOUT
718$
719$ perl_intsize=line
720$ WRITE_RESULT "intsize is ''perl_intsize'"
721$!
722$! Check for short size
723$!
724$ OS
725$ WS "#ifdef __DECC
726$ WS "#include <stdlib.h>
727$ WS "#endif
728$ WS "#include <stdio.h>
729$ WS "int main()
730$ WS "{"
429a5e67 731$ WS "printf(""%d\n"", sizeof(short));
97abc6ad 732$ WS "exit(0);
733$ WS "}"
734$ CS
735$ DEFINE SYS$ERROR _NLA0:
736$ DEFINE SYS$OUTPUT _NLA0:
737$ on error then continue
738$ on warning then continue
9ef4b0a6 739$ 'Checkcc' temp.c
97abc6ad 740$ If (Needs_Opt.eqs."Yes")
741$ THEN
9ef4b0a6 742$ link temp.obj,temp.opt/opt
97abc6ad 743$ else
9ef4b0a6 744$ link temp.obj
97abc6ad 745$ endif
746$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
747$ DEASSIGN SYS$OUTPUT
748$ DEASSIGN SYS$ERROR
749$ DEFINE SYS$ERROR TEMPOUT
750$ DEFINE SYS$OUTPUT TEMPOUT
751$ mcr []temp
752$ CLOSE TEMPOUT
753$ DEASSIGN SYS$OUTPUT
754$ DEASSIGN SYS$ERROR
755$ OPEN/READ TEMPOUT [-.uu]tempout.lis
756$ READ TEMPOUT line
757$ CLOSE TEMPOUT
758$
759$ perl_shortsize=line
760$ WRITE_RESULT "shortsize is ''perl_shortsize'"
761$!
762$! Check for long size
763$!
764$ OS
765$ WS "#ifdef __DECC
766$ WS "#include <stdlib.h>
767$ WS "#endif
768$ WS "#include <stdio.h>
769$ WS "int main()
770$ WS "{"
429a5e67 771$ WS "int foo;
772$ WS "foo = sizeof(long);
773$ WS "printf(""%d\n"", foo);
97abc6ad 774$ WS "exit(0);
775$ WS "}"
776$ CS
777$ DEFINE SYS$ERROR _NLA0:
778$ DEFINE SYS$OUTPUT _NLA0:
779$ on error then continue
780$ on warning then continue
9ef4b0a6 781$ 'Checkcc' temp.c
97abc6ad 782$ If (Needs_Opt.eqs."Yes")
783$ THEN
9ef4b0a6 784$ link temp.obj,temp.opt/opt
97abc6ad 785$ else
9ef4b0a6 786$ link temp.obj
97abc6ad 787$ endif
788$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
789$ DEASSIGN SYS$OUTPUT
790$ DEASSIGN SYS$ERROR
791$ DEFINE SYS$ERROR TEMPOUT
792$ DEFINE SYS$OUTPUT TEMPOUT
793$ mcr []temp
794$ CLOSE TEMPOUT
795$ DEASSIGN SYS$OUTPUT
796$ DEASSIGN SYS$ERROR
797$ OPEN/READ TEMPOUT [-.uu]tempout.lis
798$ READ TEMPOUT line
799$ CLOSE TEMPOUT
800$
801$ perl_longsize=line
802$ WRITE_RESULT "longsize is ''perl_longsize'"
803$!
804$! Check the prototype for getgid
805$!
806$ OS
807$ WS "#ifdef __DECC
808$ WS "#include <stdlib.h>
809$ WS "#endif
810$ WS "#include <stdio.h>
811$ WS "#include <types.h>
812$ WS "#include <unistd.h>
813$ WS "int main()
814$ WS "{"
815$ WS "gid_t foo;
816$ WS "exit(0);
817$ WS "}"
818$ CS
819$ DEFINE SYS$ERROR _NLA0:
820$ DEFINE SYS$OUTPUT _NLA0:
821$ on error then continue
822$ on warning then continue
9ef4b0a6 823$ 'Checkcc' temp.c
97abc6ad 824$ teststatus = f$extract(9,1,$status)
825$ DEASSIGN SYS$OUTPUT
826$ DEASSIGN SYS$ERROR
827$ if (teststatus.nes."1")
828$ THEN
829$! Okay, gid_t failed. Must be unsigned int
830$ perl_gidtype = "unsigned int"
831$ ELSE
832$ perl_gidtype = "gid_t"
833$ ENDIF
834$ WRITE_RESULT "Gid_t is ''perl_gidtype'"
835$!
cb38e85f 836$! Check to see if we've got dev_t
c05f8f3d 837$!
838$ OS
839$ WS "#ifdef __DECC
840$ WS "#include <stdlib.h>
841$ WS "#endif
842$ WS "#include <stdio.h>
843$ WS "#include <types.h>
844$ WS "#include <unistd.h>
845$ WS "int main()
846$ WS "{"
847$ WS "dev_t foo;
848$ WS "exit(0);
849$ WS "}"
850$ CS
851$ DEFINE SYS$ERROR _NLA0:
852$ DEFINE SYS$OUTPUT _NLA0:
853$ on error then continue
854$ on warning then continue
9ef4b0a6 855$ 'Checkcc' temp.c
c05f8f3d 856$ teststatus = f$extract(9,1,$status)
857$ DEASSIGN SYS$OUTPUT
858$ DEASSIGN SYS$ERROR
859$ if (teststatus.nes."1")
860$ THEN
861$! Okay, dev_t failed. Must be unsigned int
862$ perl_devtype = "unsigned int"
863$ ELSE
864$ perl_devtype = "dev_t"
865$ ENDIF
866$ WRITE_RESULT "Dev_t is ''perl_devtype'"
867$!
cb38e85f 868$! Check to see if we've got unistd.h (which we ought to, but you never know)
869$!
870$ OS
871$ WS "#ifdef __DECC
872$ WS "#include <stdlib.h>
873$ WS "#endif
874$ WS "#include <unistd.h>
875$ WS "int main()
876$ WS "{"
877$ WS "exit(0);
878$ WS "}"
879$ CS
880$ DEFINE SYS$ERROR _NLA0:
881$ DEFINE SYS$OUTPUT _NLA0:
882$ on error then continue
883$ on warning then continue
9ef4b0a6 884$ 'Checkcc' temp.c
cb38e85f 885$ teststatus = f$extract(9,1,$status)
886$ DEASSIGN SYS$OUTPUT
887$ DEASSIGN SYS$ERROR
888$ if (teststatus.nes."1")
889$ THEN
890$! Okay, failed. Must not have it
891$ perl_i_unistd = "undef"
892$ ELSE
893$ perl_i_unistd = "define"
894
895$ ENDIF
896$ WRITE_RESULT "i_unistd is ''perl_i_unistd'"
897$!
97abc6ad 898$! Check the prototype for select
899$!
900$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
901$ THEN
902$ OS
903$ WS "#ifdef __DECC
904$ WS "#include <stdlib.h>
905$ WS "#endif
906$ WS "#include <stdio.h>
907$ WS "#include <types.h>
908$ WS "#include <unistd.h>
909$ if ("''Has_Socketshr'".eqs."T")
910$ THEN
911$ WS "#include <socketshr.h>"
912$ else
913$ WS "#include <time.h>
914$ WS "#include <socket.h>
915$ endif
916$ WS "int main()
917$ WS "{"
918$ WS "fd_set *foo;
919$ WS "int bar;
920$ WS "foo = NULL;
921$ WS "bar = select(2, foo, foo, foo, NULL);
922$ WS "exit(0);
923$ WS "}"
924$ CS
925$ DEFINE SYS$ERROR _NLA0:
926$ DEFINE SYS$OUTPUT _NLA0:
927$ on error then continue
928$ on warning then continue
9ef4b0a6 929$ 'Checkcc' temp.c
97abc6ad 930$ teststatus = f$extract(9,1,$status)
931$ DEASSIGN SYS$OUTPUT
932$ DEASSIGN SYS$ERROR
933$ if (teststatus.nes."1")
934$ THEN
935$! Okay, fd_set failed. Must be an int
936$ perl_selecttype = "int *"
937$ ELSE
938$ perl_selecttype="fd_set *"
939$ ENDIF
940$ ELSE
941$ ! No sockets, so stick in an int *
942$ perl_selecttype = "int *"
943$ ENDIF
944$ WRITE_RESULT "selectype is ''perl_selecttype'"
945$!
3937c24e 946$! Check to see if fd_set exists
947$!
948$ OS
949$ WS "#ifdef __DECC
950$ WS "#include <stdlib.h>
951$ WS "#endif
952$ WS "#include <stdio.h>
953$ WS "#include <types.h>
954$ WS "#include <unistd.h>
955$ if ("''Has_Socketshr'".eqs."T")
956$ THEN
957$ WS "#include <socketshr.h>"
958$ ENDIF
959$ IF ("''Has_Dec_C_Sockets'".eqs."T")
960$ THEN
961$ WS "#include <time.h>
962$ WS "#include <socket.h>
963$ endif
964$ WS "int main()
965$ WS "{"
966$ WS "fd_set *foo;
967$ WS "int bar;
968$ WS "exit(0);
969$ WS "}"
970$ CS
971$ DEFINE SYS$ERROR _NLA0:
972$ DEFINE SYS$OUTPUT _NLA0:
973$ on error then continue
974$ on warning then continue
975$ 'Checkcc' temp.c
976$ teststatus = f$extract(9,1,$status)
977$ DEASSIGN SYS$OUTPUT
978$ DEASSIGN SYS$ERROR
979$ if (teststatus.nes."1")
980$ THEN
981$! Okay, fd_set failed. Must not exist
982$ perl_d_fd_set = "undef"
983$ ELSE
984$ perl_d_fd_set="define"
985$ ENDIF
986$ WRITE_RESULT "d_fd_set is ''perl_d_fd_set'"
987$!
988$! Check for inttypes.h
989$!
990$ OS
991$ WS "#ifdef __DECC
992$ WS "#include <stdlib.h>
993$ WS "#endif
994$ WS "#include <stdio.h>
995$ WS "#include <unistd.h>
996$ WS "#include <inttypes.h>
997$ WS "int main()
998$ WS "{"
999$ WS "exit(0);
1000$ WS "}"
1001$ CS
1002$ DEFINE SYS$ERROR _NLA0:
1003$ DEFINE SYS$OUTPUT _NLA0:
1004$ on error then continue
1005$ on warning then continue
1006$ 'Checkcc' temp.c
1007$ savedstatus = $status
1008$ teststatus = f$extract(9,1,savedstatus)
1009$ if (teststatus.nes."1")
1010$ THEN
1011$ perl_i_inttypes="undef"
1012$ DEASSIGN SYS$OUTPUT
1013$ DEASSIGN SYS$ERROR
1014$ ELSE
1015$ If (Needs_Opt.eqs."Yes")
1016$ THEN
1017$ link temp.obj,temp.opt/opt
1018$ else
1019$ link temp.obj
1020$ endif
1021$ savedstatus = $status
1022$ teststatus = f$extract(9,1,savedstatus)
1023$ DEASSIGN SYS$OUTPUT
1024$ DEASSIGN SYS$ERROR
1025$ if (teststatus.nes."1")
1026$ THEN
1027$ perl_i_inttypes="undef"
1028$ ELSE
1029$ perl_i_inttypes="define"
1030$ ENDIF
1031$ ENDIF
1032$ WRITE_RESULT "i_inttypes is ''perl_i_inttypes'"
1033$!
1034$! Check to see if int64_t exists
1035$!
1036$ OS
1037$ WS "#ifdef __DECC
1038$ WS "#include <stdlib.h>
1039$ WS "#endif
1040$ WS "#include <stdio.h>
1041$ WS "#include <types.h>
1042$ WS "#''perl_i_inttypes IIH
1043$ WS "#ifdef IIH
1044$ WS "#include <inttypes.h>
1045$ WS "#endif
1046$ WS "#include <unistd.h>
1047$ WS "int main()
1048$ WS "{"
1049$ WS "int64_t bar;
1050$ WS "exit(0);
1051$ WS "}"
1052$ CS
1053$ DEFINE SYS$ERROR _NLA0:
1054$ DEFINE SYS$OUTPUT _NLA0:
1055$ on error then continue
1056$ on warning then continue
1057$ 'Checkcc' temp.c
1058$ teststatus = f$extract(9,1,$status)
1059$ DEASSIGN SYS$OUTPUT
1060$ DEASSIGN SYS$ERROR
1061$ if (teststatus.nes."1")
1062$ THEN
1063$! Okay, int64_t failed. Must not exist
1064$ perl_d_int64t = "undef"
1065$ ELSE
1066$ perl_d_int64t="define"
1067$ ENDIF
1068$ WRITE_RESULT "d_int64t is ''perl_d_int64t'"
1069$!
1070$! Check to see if off64_t exists
1071$!
1072$ OS
1073$ WS "#ifdef __DECC
1074$ WS "#include <stdlib.h>
1075$ WS "#endif
1076$ WS "#include <stdio.h>
1077$ WS "#include <types.h>
1078$ WS "#''perl_i_inttypes IIH
1079$ WS "#ifdef IIH
1080$ WS "#include <inttypes.h>
1081$ WS "#endif
1082$ WS "#include <unistd.h>
1083$ WS "int main()
1084$ WS "{"
1085$ WS "off64_t bar;
1086$ WS "exit(0);
1087$ WS "}"
1088$ CS
1089$ DEFINE SYS$ERROR _NLA0:
1090$ DEFINE SYS$OUTPUT _NLA0:
1091$ on error then continue
1092$ on warning then continue
1093$ 'Checkcc' temp.c
1094$ teststatus = f$extract(9,1,$status)
1095$ DEASSIGN SYS$OUTPUT
1096$ DEASSIGN SYS$ERROR
1097$ if (teststatus.nes."1")
1098$ THEN
1099$! Okay, off64_t failed. Must not exist
1100$ perl_d_off64t = "undef"
1101$ ELSE
1102$ perl_d_off64t="define"
1103$ ENDIF
1104$ WRITE_RESULT "d_off64t is ''perl_d_off64t'"
1105$!
1106$! Check to see if gethostname exists
1107$!
1108$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1109$ THEN
1110$ OS
1111$ WS "#ifdef __DECC
1112$ WS "#include <stdlib.h>
1113$ WS "#endif
1114$ WS "#include <stdio.h>
1115$ WS "#include <types.h>
1116$ WS "#include <unistd.h>
1117$ if ("''Has_Socketshr'".eqs."T")
1118$ THEN
1119$ WS "#include <socketshr.h>"
1120$ else
1121$ WS "#include <time.h>
1122$ WS "#include <socket.h>
1123$ endif
1124$ WS "int main()
1125$ WS "{"
1126$ WS "char name[100];
1127$ WS "int bar, baz;
1128$ WS "bar = 100;
1129$ WS "baz = gethostname(name, bar);
1130$ WS "exit(0);
1131$ WS "}"
1132$ CS
1133$ DEFINE SYS$ERROR _NLA0:
1134$ DEFINE SYS$OUTPUT _NLA0:
1135$ on error then continue
1136$ on warning then continue
1137$ 'Checkcc' temp.c
1138$ teststatus = f$extract(9,1,$status)
1139$ DEASSIGN SYS$OUTPUT
1140$ DEASSIGN SYS$ERROR
1141$ if (teststatus.nes."1")
1142$ THEN
1143$! Okay, compile failed. Must not have it
1144$ perl_dgethname = "undef"
1145$ ELSE
1146$ If (Needs_Opt.eqs."Yes")
1147$ THEN
1148$ link temp.obj,temp.opt/opt
1149$ else
1150$ link temp.obj
1151$ endif
1152$ savedstatus = $status
1153$ teststatus = f$extract(9,1,savedstatus)
1154$ if (teststatus.nes."1")
1155$ THEN
1156$ perl_d_gethname="undef"
1157$ ELSE
1158$ perl_d_gethname="define"
1159$ ENDIF
1160$ ENDIF
1161$ ELSE
1162$ ! No sockets, so no gethname
1163$ perl_d_gethname = "undef"
1164$ ENDIF
1165$ WRITE_RESULT "d_gethname is ''perl_d_gethname'"
1166$!
e6df7ed1 1167$! Check for sys/file.h
1168$!
1169$ OS
1170$ WS "#ifdef __DECC
1171$ WS "#include <stdlib.h>
1172$ WS "#endif
1173$ WS "#include <stdio.h>
1174$ WS "#include <unistd.h>
1175$ WS "#include <sys/file.h>
1176$ WS "int main()
1177$ WS "{"
1178$ WS "exit(0);
1179$ WS "}"
1180$ CS
1181$ DEFINE SYS$ERROR _NLA0:
1182$ DEFINE SYS$OUTPUT _NLA0:
1183$ on error then continue
1184$ on warning then continue
1185$ 'Checkcc' temp.c
1186$ savedstatus = $status
1187$ teststatus = f$extract(9,1,savedstatus)
1188$ if (teststatus.nes."1")
1189$ THEN
1190$ perl_i_sysfile="undef"
1191$ DEASSIGN SYS$OUTPUT
1192$ DEASSIGN SYS$ERROR
1193$ ELSE
1194$ If (Needs_Opt.eqs."Yes")
1195$ THEN
1196$ link temp.obj,temp.opt/opt
1197$ else
1198$ link temp.obj
1199$ endif
1200$ savedstatus = $status
1201$ teststatus = f$extract(9,1,savedstatus)
1202$ DEASSIGN SYS$OUTPUT
1203$ DEASSIGN SYS$ERROR
1204$ if (teststatus.nes."1")
1205$ THEN
1206$ perl_i_sysfile="undef"
1207$ ELSE
1208$ perl_i_sysfile="define"
1209$ ENDIF
1210$ ENDIF
1211$ WRITE_RESULT "i_sysfile is ''perl_i_sysfile'"
1212$!
3937c24e 1213$! Check for poll.h
1214$!
1215$ OS
1216$ WS "#ifdef __DECC
1217$ WS "#include <stdlib.h>
1218$ WS "#endif
1219$ WS "#include <stdio.h>
1220$ WS "#include <unistd.h>
1221$ WS "#include <poll.h>
1222$ WS "int main()
1223$ WS "{"
1224$ WS "exit(0);
1225$ WS "}"
1226$ CS
1227$ DEFINE SYS$ERROR _NLA0:
1228$ DEFINE SYS$OUTPUT _NLA0:
1229$ on error then continue
1230$ on warning then continue
1231$ 'Checkcc' temp.c
1232$ savedstatus = $status
1233$ teststatus = f$extract(9,1,savedstatus)
1234$ if (teststatus.nes."1")
1235$ THEN
1236$ perl_i_poll="undef"
1237$ DEASSIGN SYS$OUTPUT
1238$ DEASSIGN SYS$ERROR
1239$ ELSE
1240$ If (Needs_Opt.eqs."Yes")
1241$ THEN
1242$ link temp.obj,temp.opt/opt
1243$ else
1244$ link temp.obj
1245$ endif
1246$ savedstatus = $status
1247$ teststatus = f$extract(9,1,savedstatus)
1248$ DEASSIGN SYS$OUTPUT
1249$ DEASSIGN SYS$ERROR
1250$ if (teststatus.nes."1")
1251$ THEN
1252$ perl_i_poll="undef"
1253$ ELSE
1254$ perl_i_poll="define"
1255$ ENDIF
1256$ ENDIF
1257$ WRITE_RESULT "i_poll is ''perl_i_poll'"
1258$!
1259$! Check for sys/uio.h
1260$!
1261$ OS
1262$ WS "#ifdef __DECC
1263$ WS "#include <stdlib.h>
1264$ WS "#endif
1265$ WS "#include <stdio.h>
1266$ WS "#include <unistd.h>
1267$ WS "#include <sys/uio.h>
1268$ WS "int main()
1269$ WS "{"
1270$ WS "exit(0);
1271$ WS "}"
1272$ CS
1273$ DEFINE SYS$ERROR _NLA0:
1274$ DEFINE SYS$OUTPUT _NLA0:
1275$ on error then continue
1276$ on warning then continue
1277$ 'Checkcc' temp.c
1278$ savedstatus = $status
1279$ teststatus = f$extract(9,1,savedstatus)
1280$ if (teststatus.nes."1")
1281$ THEN
1282$ perl_i_sysuio="undef"
1283$ DEASSIGN SYS$OUTPUT
1284$ DEASSIGN SYS$ERROR
1285$ ELSE
1286$ If (Needs_Opt.eqs."Yes")
1287$ THEN
1288$ link temp.obj,temp.opt/opt
1289$ else
1290$ link temp.obj
1291$ endif
1292$ savedstatus = $status
1293$ teststatus = f$extract(9,1,savedstatus)
1294$ DEASSIGN SYS$OUTPUT
1295$ DEASSIGN SYS$ERROR
1296$ if (teststatus.nes."1")
1297$ THEN
1298$ perl_i_sysuio="undef"
1299$ ELSE
1300$ perl_i_sysuio="define"
1301$ ENDIF
1302$ ENDIF
1303$ WRITE_RESULT "i_sysuio is ''perl_i_sysuio'"
1304$!
1305$! Check for sys/access.h
1306$!
1307$ OS
1308$ WS "#ifdef __DECC
1309$ WS "#include <stdlib.h>
1310$ WS "#endif
1311$ WS "#include <stdio.h>
1312$ WS "#include <unistd.h>
1313$ WS "#include <sys/access.h>
1314$ WS "int main()
1315$ WS "{"
1316$ WS "exit(0);
1317$ WS "}"
1318$ CS
1319$ DEFINE SYS$ERROR _NLA0:
1320$ DEFINE SYS$OUTPUT _NLA0:
1321$ on error then continue
1322$ on warning then continue
1323$ 'Checkcc' temp.c
1324$ savedstatus = $status
1325$ teststatus = f$extract(9,1,savedstatus)
1326$ if (teststatus.nes."1")
1327$ THEN
1328$ perl_i_sysaccess="undef"
1329$ DEASSIGN SYS$OUTPUT
1330$ DEASSIGN SYS$ERROR
1331$ ELSE
1332$ If (Needs_Opt.eqs."Yes")
1333$ THEN
1334$ link temp.obj,temp.opt/opt
1335$ else
1336$ link temp.obj
1337$ endif
1338$ savedstatus = $status
1339$ teststatus = f$extract(9,1,savedstatus)
1340$ DEASSIGN SYS$OUTPUT
1341$ DEASSIGN SYS$ERROR
1342$ if (teststatus.nes."1")
1343$ THEN
1344$ perl_i_sysaccess="undef"
1345$ ELSE
1346$ perl_i_sysaccess="define"
1347$ ENDIF
1348$ ENDIF
1349$ WRITE_RESULT "i_sysaccess is ''perl_i_sysaccess'"
1350$!
1351$! Check for sys/security.h
1352$!
1353$ OS
1354$ WS "#ifdef __DECC
1355$ WS "#include <stdlib.h>
1356$ WS "#endif
1357$ WS "#include <stdio.h>
1358$ WS "#include <unistd.h>
1359$ WS "#include <sys/security.h>
1360$ WS "int main()
1361$ WS "{"
1362$ WS "exit(0);
1363$ WS "}"
1364$ CS
1365$ DEFINE SYS$ERROR _NLA0:
1366$ DEFINE SYS$OUTPUT _NLA0:
1367$ on error then continue
1368$ on warning then continue
1369$ 'Checkcc' temp.c
1370$ savedstatus = $status
1371$ teststatus = f$extract(9,1,savedstatus)
1372$ if (teststatus.nes."1")
1373$ THEN
1374$ perl_i_syssecrt="undef"
1375$ DEASSIGN SYS$OUTPUT
1376$ DEASSIGN SYS$ERROR
1377$ ELSE
1378$ If (Needs_Opt.eqs."Yes")
1379$ THEN
1380$ link temp.obj,temp.opt/opt
1381$ else
1382$ link temp.obj
1383$ endif
1384$ savedstatus = $status
1385$ teststatus = f$extract(9,1,savedstatus)
1386$ DEASSIGN SYS$OUTPUT
1387$ DEASSIGN SYS$ERROR
1388$ if (teststatus.nes."1")
1389$ THEN
1390$ perl_i_syssecrt="undef"
1391$ ELSE
1392$ perl_i_syssecrt="define"
1393$ ENDIF
1394$ ENDIF
1395$ WRITE_RESULT "i_syssecrt is ''perl_i_syssecrt'"
1396$!
e6df7ed1 1397$! Check for fcntl.h
1398$!
1399$ OS
1400$ WS "#ifdef __DECC
1401$ WS "#include <stdlib.h>
1402$ WS "#endif
1403$ WS "#include <stdio.h>
1404$ WS "#include <unistd.h>
1405$ WS "#include <fcntl.h>
1406$ WS "int main()
1407$ WS "{"
1408$ WS "exit(0);
1409$ WS "}"
1410$ CS
1411$ DEFINE SYS$ERROR _NLA0:
1412$ DEFINE SYS$OUTPUT _NLA0:
1413$ on error then continue
1414$ on warning then continue
1415$ 'Checkcc' temp.c
1416$ savedstatus = $status
1417$ teststatus = f$extract(9,1,savedstatus)
1418$ if (teststatus.nes."1")
1419$ THEN
1420$ perl_i_fcntl="undef"
1421$ DEASSIGN SYS$OUTPUT
1422$ DEASSIGN SYS$ERROR
1423$ ELSE
1424$ If (Needs_Opt.eqs."Yes")
1425$ THEN
1426$ link temp.obj,temp.opt/opt
1427$ else
1428$ link temp.obj
1429$ endif
1430$ savedstatus = $status
1431$ teststatus = f$extract(9,1,savedstatus)
1432$ DEASSIGN SYS$OUTPUT
1433$ DEASSIGN SYS$ERROR
1434$ if (teststatus.nes."1")
1435$ THEN
1436$ perl_i_fcntl="undef"
1437$ ELSE
1438$ perl_i_fcntl="define"
1439$ ENDIF
1440$ ENDIF
1441$ WRITE_RESULT "i_fcntl is ''perl_i_fcntl'"
1442$!
1443$! Check for fcntl
1444$!
1445$ OS
1446$ WS "#ifdef __DECC
1447$ WS "#include <stdlib.h>
1448$ WS "#endif
1449$ WS "#include <stdio.h>
1450$ WS "#include <unistd.h>
1451$ WS "#include <fcntl.h>
1452$ WS "int main()
1453$ WS "{"
1454$ WS "fcntl(1,2,3);
1455$ WS "exit(0);
1456$ WS "}"
1457$ CS
1458$ DEFINE SYS$ERROR _NLA0:
1459$ DEFINE SYS$OUTPUT _NLA0:
1460$ on error then continue
1461$ on warning then continue
1462$ 'Checkcc' temp.c
1463$ savedstatus = $status
1464$ teststatus = f$extract(9,1,savedstatus)
1465$ if (teststatus.nes."1")
1466$ THEN
1467$ perl_d_fcntl="undef"
1468$ DEASSIGN SYS$OUTPUT
1469$ DEASSIGN SYS$ERROR
1470$ ELSE
1471$ If (Needs_Opt.eqs."Yes")
1472$ THEN
1473$ link temp.obj,temp.opt/opt
1474$ else
1475$ link temp.obj
1476$ endif
1477$ savedstatus = $status
1478$ teststatus = f$extract(9,1,savedstatus)
1479$ DEASSIGN SYS$OUTPUT
1480$ DEASSIGN SYS$ERROR
1481$ if (teststatus.nes."1")
1482$ THEN
1483$ perl_d_fcntl="undef"
1484$ ELSE
1485$ perl_d_fcntl="define"
1486$ ENDIF
1487$ ENDIF
1488$ WRITE_RESULT "d_fcntl is ''perl_d_fcntl'"
1489$!
3937c24e 1490$! Check for access
1491$!
1492$ OS
1493$ WS "#ifdef __DECC
1494$ WS "#include <stdlib.h>
1495$ WS "#endif
1496$ WS "#include <stdio.h>
1497$ WS "#include <unistd.h>
1498$ WS "int main()
1499$ WS "{"
1500$ WS "access("foo", F_OK);
1501$ WS "exit(0);
1502$ WS "}"
1503$ CS
1504$ DEFINE SYS$ERROR _NLA0:
1505$ DEFINE SYS$OUTPUT _NLA0:
1506$ on error then continue
1507$ on warning then continue
1508$ 'Checkcc' temp.c
1509$ savedstatus = $status
1510$ teststatus = f$extract(9,1,savedstatus)
1511$ if (teststatus.nes."1")
1512$ THEN
1513$ perl_d_access="undef"
1514$ DEASSIGN SYS$OUTPUT
1515$ DEASSIGN SYS$ERROR
1516$ ELSE
1517$ If (Needs_Opt.eqs."Yes")
1518$ THEN
1519$ link temp.obj,temp.opt/opt
1520$ else
1521$ link temp.obj
1522$ endif
1523$ savedstatus = $status
1524$ teststatus = f$extract(9,1,savedstatus)
1525$ DEASSIGN SYS$OUTPUT
1526$ DEASSIGN SYS$ERROR
1527$ if (teststatus.nes."1")
1528$ THEN
1529$ perl_d_access="undef"
1530$ ELSE
1531$ perl_d_access="define"
1532$ ENDIF
1533$ ENDIF
1534$ WRITE_RESULT "d_access is ''perl_d_access'"
1535$!
97abc6ad 1536$! Check for bzero
1537$!
1538$ OS
1539$ WS "#ifdef __DECC
1540$ WS "#include <stdlib.h>
1541$ WS "#endif
1542$ WS "#include <stdio.h>
1543$ WS "#include <strings.h>
1544$ WS "int main()
1545$ WS "{"
1546$ WS "char foo[10];
1547$ WS "bzero(foo, 10);
1548$ WS "exit(0);
1549$ WS "}"
1550$ CS
1551$ DEFINE SYS$ERROR _NLA0:
1552$ DEFINE SYS$OUTPUT _NLA0:
1553$ on error then continue
1554$ on warning then continue
9ef4b0a6 1555$ 'Checkcc' temp.c
97abc6ad 1556$ savedstatus = $status
1557$ teststatus = f$extract(9,1,savedstatus)
1558$ if (teststatus.nes."1")
1559$ THEN
1560$ perl_d_bzero="undef"
1561$ DEASSIGN SYS$OUTPUT
1562$ DEASSIGN SYS$ERROR
1563$ ELSE
1564$ If (Needs_Opt.eqs."Yes")
1565$ THEN
9ef4b0a6 1566$ link temp.obj,temp.opt/opt
97abc6ad 1567$ else
9ef4b0a6 1568$ link temp.obj
97abc6ad 1569$ endif
1570$ savedstatus = $status
1571$ teststatus = f$extract(9,1,savedstatus)
1572$ DEASSIGN SYS$OUTPUT
1573$ DEASSIGN SYS$ERROR
1574$ if (teststatus.nes."1")
1575$ THEN
1576$ perl_d_bzero="undef"
1577$ ELSE
1578$ perl_d_bzero="define"
1579$ ENDIF
1580$ ENDIF
1581$ WRITE_RESULT "d_bzero is ''perl_d_bzero'"
1582$!
1583$! Check for bcopy
1584$!
1585$ OS
1586$ WS "#ifdef __DECC
1587$ WS "#include <stdlib.h>
1588$ WS "#endif
1589$ WS "#include <stdio.h>
1590$ WS "#include <strings.h>
1591$ WS "int main()
1592$ WS "{"
1593$ WS "char foo[10], bar[10];
1594$ WS "bcopy(""foo"", bar, 3);
1595$ WS "exit(0);
1596$ WS "}"
1597$ CS
1598$ DEFINE SYS$ERROR _NLA0:
1599$ DEFINE SYS$OUTPUT _NLA0:
1600$ on error then continue
1601$ on warning then continue
9ef4b0a6 1602$ 'Checkcc' temp.c
97abc6ad 1603$ savedstatus = $status
1604$ teststatus = f$extract(9,1,savedstatus)
1605$ if (teststatus.nes."1")
1606$ THEN
1607$ perl_d_bcopy="undef"
1608$ DEASSIGN SYS$OUTPUT
1609$ DEASSIGN SYS$ERROR
1610$ ELSE
1611$ If (Needs_Opt.eqs."Yes")
1612$ THEN
9ef4b0a6 1613$ link temp.obj,temp.opt/opt
97abc6ad 1614$ else
9ef4b0a6 1615$ link temp.obj
97abc6ad 1616$ endif
1617$ savedstatus = $status
1618$ teststatus = f$extract(9,1,savedstatus)
1619$ DEASSIGN SYS$OUTPUT
1620$ DEASSIGN SYS$ERROR
1621$ if (teststatus.nes."1")
1622$ THEN
1623$ perl_d_bcopy="undef"
1624$ ELSE
1625$ perl_d_bcopy="define"
1626$ ENDIF
1627$ ENDIF
1628$ WRITE_RESULT "d_bcopy is ''perl_d_bcopy'"
1629$!
1630$! Check for mkstemp
1631$!
1632$ OS
1633$ WS "#ifdef __DECC
1634$ WS "#include <stdlib.h>
1635$ WS "#endif
1636$ WS "#include <stdio.h>
1637$ WS "int main()
1638$ WS "{"
1639$ WS "mkstemp(""foo"");
1640$ WS "exit(0);
1641$ WS "}"
1642$ CS
1643$ DEFINE SYS$ERROR _NLA0:
1644$ DEFINE SYS$OUTPUT _NLA0:
1645$ on error then continue
1646$ on warning then continue
9ef4b0a6 1647$ 'Checkcc' temp.c
97abc6ad 1648$ If (Needs_Opt.eqs."Yes")
1649$ THEN
9ef4b0a6 1650$ link temp.obj,temp.opt/opt
97abc6ad 1651$ else
9ef4b0a6 1652$ link temp.obj
97abc6ad 1653$ endif
1654$ savedstatus = $status
1655$ teststatus = f$extract(9,1,savedstatus)
1656$ DEASSIGN SYS$OUTPUT
1657$ DEASSIGN SYS$ERROR
1658$ if (teststatus.nes."1")
1659$ THEN
1660$ perl_d_mkstemp="undef"
1661$ ELSE
1662$ perl_d_mkstemp="define"
1663$ ENDIF
1664$ WRITE_RESULT "d_mkstemp is ''perl_d_mkstemp'"
1665$!
1666$! Check for setvbuf
1667$!
1668$ OS
1669$ WS "#ifdef __DECC
1670$ WS "#include <stdlib.h>
1671$ WS "#endif
1672$ WS "#include <stdio.h>
1673$ WS "int main()
1674$ WS "{"
1675$ WS "FILE *foo;
1676$ WS "char Buffer[99];
1677$ WS "foo = fopen(""foo"", ""r"");
1678$ WS "setvbuf(foo, Buffer, 0, 0);
1679$ WS "exit(0);
1680$ WS "}"
1681$ CS
1682$ DEFINE SYS$ERROR _NLA0:
1683$ DEFINE SYS$OUTPUT _NLA0:
1684$ on error then continue
1685$ on warning then continue
9ef4b0a6 1686$ 'Checkcc' temp.c
97abc6ad 1687$ If (Needs_Opt.eqs."Yes")
1688$ THEN
9ef4b0a6 1689$ link temp.obj,temp.opt/opt
97abc6ad 1690$ else
9ef4b0a6 1691$ link temp.obj
97abc6ad 1692$ endif
1693$ teststatus = f$extract(9,1,$status)
1694$ DEASSIGN SYS$OUTPUT
1695$ DEASSIGN SYS$ERROR
1696$ if (teststatus.nes."1")
1697$ THEN
1698$ perl_d_setvbuf="undef"
1699$ ELSE
1700$ perl_d_setvbuf="define"
1701$ ENDIF
1702$ WRITE_RESULT "d_setvbuf is ''perl_d_setvbuf'"
1703$!
cc391245 1704$! Check for setenv
1705$!
1706$ OS
1707$ WS "#ifdef __DECC
1708$ WS "#include <stdlib.h>
1709$ WS "#endif
1710$ WS "#include <stdio.h>
1711$ WS "int main()
1712$ WS "{"
1713$ WS "setenv(""FOO"", ""BAR"", 0);
1714$ WS "exit(0);
1715$ WS "}"
1716$ CS
1717$ DEFINE SYS$ERROR _NLA0:
1718$ DEFINE SYS$OUTPUT _NLA0:
1719$ on error then continue
1720$ on warning then continue
1721$ 'Checkcc' temp
1722$ If (Needs_Opt.eqs."Yes")
1723$ THEN
1724$ link temp,temp/opt
1725$ else
1726$ link temp
1727$ endif
1728$ teststatus = f$extract(9,1,$status)
1729$ DEASSIGN SYS$OUTPUT
1730$ DEASSIGN SYS$ERROR
1731$ if (teststatus.nes."1")
1732$ THEN
1733$ perl_d_setenv="undef"
1734$ ELSE
1735$ perl_d_setenv="define"
1736$ ENDIF
1737$ WRITE_RESULT "d_setenv is ''perl_d_setenv'"
1738$!
97abc6ad 1739$! Check for <netinet/in.h>
1740$!
1741$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1742$ THEN
1743$ OS
1744$ WS "#ifdef __DECC
1745$ WS "#include <stdlib.h>
1746$ WS "#endif
1747$ WS "#include <stdio.h>
1748$ if ("''Has_Socketshr'".eqs."T")
1749$ THEN
1750$ WS "#include <socketshr.h>"
1751$ else
1752$ WS "#include <netdb.h>
1753$ endif
1754$ WS "#include <netinet/in.h>"
1755$ WS "int main()
1756$ WS "{"
1757$ WS "exit(0);
1758$ WS "}"
1759$ CS
1760$ DEFINE SYS$ERROR _NLA0:
1761$ DEFINE SYS$OUTPUT _NLA0:
1762$ on error then continue
1763$ on warning then continue
9ef4b0a6 1764$ 'Checkcc' temp.c
97abc6ad 1765$ If (Needs_Opt.eqs."Yes")
1766$ THEN
9ef4b0a6 1767$ link temp.obj,temp.opt/opt
97abc6ad 1768$ else
9ef4b0a6 1769$ link temp.obj
97abc6ad 1770$ endif
1771$ teststatus = f$extract(9,1,$status)
1772$ DEASSIGN SYS$OUTPUT
1773$ DEASSIGN SYS$ERROR
1774$ if (teststatus.nes."1")
1775$ THEN
1776$ perl_i_niin="undef"
1777$ ELSE
1778$ perl_i_niin="define"
1779$ ENDIF
1780$ ELSE
1781$ perl_i_niin="undef"
1782$ ENDIF
1783$ WRITE_RESULT "i_niin is ''perl_i_niin'"
1784$!
1785$! Check for endhostent
1786$!
1787$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1788$ THEN
1789$ OS
1790$ WS "#ifdef __DECC
1791$ WS "#include <stdlib.h>
1792$ WS "#endif
1793$ WS "#include <stdio.h>
1794$ if ("''Has_Socketshr'".eqs."T")
1795$ THEN
1796$ WS "#include <socketshr.h>"
1797$ else
1798$ WS "#include <netdb.h>
1799$ endif
1800$ WS "int main()
1801$ WS "{"
1802$ WS "endhostent();
1803$ WS "exit(0);
1804
1805$ CS
1806$ DEFINE SYS$ERROR _NLA0:
1807$ DEFINE SYS$OUTPUT _NLA0:
1808$ on error then continue
1809$ on warning then continue
9ef4b0a6 1810$ 'Checkcc' temp.c
97abc6ad 1811$ If (Needs_Opt.eqs."Yes")
1812$ THEN
9ef4b0a6 1813$ link temp.obj,temp.opt/opt
97abc6ad 1814$ else
9ef4b0a6 1815$ link temp.obj
97abc6ad 1816$ endif
1817$ teststatus = f$extract(9,1,$status)
1818$ DEASSIGN SYS$OUTPUT
1819$ DEASSIGN SYS$ERROR
1820$ if (teststatus.nes."1")
1821$ THEN
1822$ perl_d_endhent="undef"
1823$ ELSE
1824$ perl_d_endhent="define"
1825$ ENDIF
1826$ ELSE
1827$ perl_d_endhent="undef"
1828$ ENDIF
1829$ WRITE_RESULT "d_endhent is ''perl_d_endhent'"
1830$!
1831$! Check for endnetent
1832$!
1833$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1834$ THEN
1835$ OS
1836$ WS "#ifdef __DECC
1837$ WS "#include <stdlib.h>
1838$ WS "#endif
1839$ WS "#include <stdio.h>
1840$ if ("''Has_Socketshr'".eqs."T")
1841$ THEN
1842$ WS "#include <socketshr.h>"
1843$ else
1844$ WS "#include <netdb.h>
1845$ endif
1846$ WS "int main()
1847$ WS "{"
1848$ WS "endnetent();
1849$ WS "exit(0);
1850$ WS "}"
1851$ CS
1852$ DEFINE SYS$ERROR _NLA0:
1853$ DEFINE SYS$OUTPUT _NLA0:
1854$ on error then continue
1855$ on warning then continue
9ef4b0a6 1856$ 'Checkcc' temp.c
97abc6ad 1857$ If (Needs_Opt.eqs."Yes")
1858$ THEN
9ef4b0a6 1859$ link temp.obj,temp.opt/opt
97abc6ad 1860$ else
9ef4b0a6 1861$ link temp.obj
97abc6ad 1862$ endif
1863$ teststatus = f$extract(9,1,$status)
1864$ DEASSIGN SYS$OUTPUT
1865$ DEASSIGN SYS$ERROR
1866$ if (teststatus.nes."1")
1867$ THEN
1868$ perl_d_endnent="undef"
1869$ ELSE
1870$ perl_d_endnent="define"
1871$ ENDIF
1872$ ELSE
1873$ perl_d_endnent="undef"
1874$ ENDIF
1875$ WRITE_RESULT "d_endnent is ''perl_d_endnent'"
1876$!
1877$! Check for endprotoent
1878$!
1879$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1880$ THEN
1881$ OS
1882$ WS "#ifdef __DECC
1883$ WS "#include <stdlib.h>
1884$ WS "#endif
1885$ WS "#include <stdio.h>
1886$ if ("''Has_Socketshr'".eqs."T")
1887$ THEN
1888$ WS "#include <socketshr.h>"
1889$ else
1890$ WS "#include <netdb.h>
1891$ endif
1892$ WS "int main()
1893$ WS "{"
1894$ WS "endprotoent();
1895$ WS "exit(0);
1896$ WS "}"
1897$ CS
1898$ DEFINE SYS$ERROR _NLA0:
1899$ DEFINE SYS$OUTPUT _NLA0:
1900$ on error then continue
1901$ on warning then continue
9ef4b0a6 1902$ 'Checkcc' temp.c
97abc6ad 1903$ If (Needs_Opt.eqs."Yes")
1904$ THEN
9ef4b0a6 1905$ link temp.obj,temp.opt/opt
97abc6ad 1906$ else
9ef4b0a6 1907$ link temp.obj
97abc6ad 1908$ endif
1909$ teststatus = f$extract(9,1,$status)
1910$ DEASSIGN SYS$OUTPUT
1911$ DEASSIGN SYS$ERROR
1912$ if (teststatus.nes."1")
1913$ THEN
1914$ perl_d_endpent="undef"
1915$ ELSE
1916$ perl_d_endpent="define"
1917$ ENDIF
1918$ ELSE
1919$ perl_d_endpent="undef"
1920$ ENDIF
1921$ WRITE_RESULT "d_endpent is ''perl_d_endpent'"
1922$!
1923$! Check for endservent
1924$!
1925$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1926$ THEN
1927$ OS
1928$ WS "#ifdef __DECC
1929$ WS "#include <stdlib.h>
1930$ WS "#endif
1931$ WS "#include <stdio.h>
1932$ if ("''Has_Socketshr'".eqs."T")
1933$ THEN
1934$ WS "#include <socketshr.h>"
1935$ else
1936$ WS "#include <netdb.h>
1937$ endif
1938$ WS "int main()
1939$ WS "{"
1940$ WS "endservent();
1941$ WS "exit(0);
1942$ WS "}"
1943$ CS
1944$ DEFINE SYS$ERROR _NLA0:
1945$ DEFINE SYS$OUTPUT _NLA0:
1946$ on error then continue
1947$ on warning then continue
9ef4b0a6 1948$ 'Checkcc' temp.c
97abc6ad 1949$ If (Needs_Opt.eqs."Yes")
1950$ THEN
9ef4b0a6 1951$ link temp.obj,temp.opt/opt
97abc6ad 1952$ else
9ef4b0a6 1953$ link temp.obj
97abc6ad 1954$ endif
1955$ teststatus = f$extract(9,1,$status)
1956$ DEASSIGN SYS$OUTPUT
1957$ DEASSIGN SYS$ERROR
1958$ if (teststatus.nes."1")
1959$ THEN
1960$ perl_d_endsent="undef"
1961$ ELSE
1962$ perl_d_endsent="define"
1963$ ENDIF
1964$ ELSE
1965$ perl_d_endsent="undef"
1966$ ENDIF
1967$ WRITE_RESULT "d_endsent is ''perl_d_endsent'"
1968$!
1969$! Check for sethostent
1970$!
1971$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1972$ THEN
1973$ OS
1974$ WS "#ifdef __DECC
1975$ WS "#include <stdlib.h>
1976$ WS "#endif
1977$ WS "#include <stdio.h>
1978$ if ("''Has_Socketshr'".eqs."T")
1979$ THEN
1980$ WS "#include <socketshr.h>"
1981$ else
1982$ WS "#include <netdb.h>
1983$ endif
1984$ WS "int main()
1985$ WS "{"
1986$ WS "sethostent(1);
1987$ WS "exit(0);
1988$ WS "}"
1989$ CS
1990$ DEFINE SYS$ERROR _NLA0:
1991$ DEFINE SYS$OUTPUT _NLA0:
1992$ on error then continue
1993$ on warning then continue
9ef4b0a6 1994$ 'Checkcc' temp.c
97abc6ad 1995$ If (Needs_Opt.eqs."Yes")
1996$ THEN
9ef4b0a6 1997$ link temp.obj,temp.opt/opt
97abc6ad 1998$ else
9ef4b0a6 1999$ link temp.obj
97abc6ad 2000$ endif
2001$ teststatus = f$extract(9,1,$status)
2002$ DEASSIGN SYS$OUTPUT
2003$ DEASSIGN SYS$ERROR
2004$ if (teststatus.nes."1")
2005$ THEN
2006$ perl_d_sethent="undef"
2007$ ELSE
2008$ perl_d_sethent="define"
2009$ ENDIF
2010$ ELSE
2011$ perl_d_sethent="undef"
2012$ ENDIF
2013$ WRITE_RESULT "d_sethent is ''perl_d_sethent'"
2014$!
2015$! Check for setnetent
2016$!
2017$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2018$ THEN
2019$ OS
2020$ WS "#ifdef __DECC
2021$ WS "#include <stdlib.h>
2022$ WS "#endif
2023$ WS "#include <stdio.h>
2024$ if ("''Has_Socketshr'".eqs."T")
2025$ THEN
2026$ WS "#include <socketshr.h>"
2027$ else
2028$ WS "#include <netdb.h>
2029$ endif
2030$ WS "int main()
2031$ WS "{"
2032$ WS "setnetent(1);
2033$ WS "exit(0);
2034$ WS "}"
2035$ CS
2036$ DEFINE SYS$ERROR _NLA0:
2037$ DEFINE SYS$OUTPUT _NLA0:
2038$ on error then continue
2039$ on warning then continue
9ef4b0a6 2040$ 'Checkcc' temp.c
97abc6ad 2041$ If (Needs_Opt.eqs."Yes")
2042$ THEN
9ef4b0a6 2043$ link temp.obj,temp.opt/opt
97abc6ad 2044$ else
9ef4b0a6 2045$ link temp.obj
97abc6ad 2046$ endif
2047$ teststatus = f$extract(9,1,$status)
2048$ DEASSIGN SYS$OUTPUT
2049$ DEASSIGN SYS$ERROR
2050$ if (teststatus.nes."1")
2051$ THEN
2052$ perl_d_setnent="undef"
2053$ ELSE
2054$ perl_d_setnent="define"
2055$ ENDIF
2056$ ELSE
2057$ perl_d_setnent="undef"
2058$ ENDIF
2059$ WRITE_RESULT "d_setnent is ''perl_d_setnent'"
2060$!
2061$! Check for setprotoent
2062$!
2063$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2064$ THEN
2065$ OS
2066$ WS "#ifdef __DECC
2067$ WS "#include <stdlib.h>
2068$ WS "#endif
2069$ WS "#include <stdio.h>
2070$ if ("''Has_Socketshr'".eqs."T")
2071$ THEN
2072$ WS "#include <socketshr.h>"
2073$ else
2074$ WS "#include <netdb.h>
2075$ endif
2076$ WS "int main()
2077$ WS "{"
2078$ WS "setprotoent(1);
2079$ WS "exit(0);
2080$ WS "}"
2081$ CS
2082$ DEFINE SYS$ERROR _NLA0:
2083$ DEFINE SYS$OUTPUT _NLA0:
2084$ on error then continue
2085$ on warning then continue
9ef4b0a6 2086$ 'Checkcc' temp.c
97abc6ad 2087$ If (Needs_Opt.eqs."Yes")
2088$ THEN
9ef4b0a6 2089$ link temp.obj,temp.opt/opt
97abc6ad 2090$ else
9ef4b0a6 2091$ link temp.obj
97abc6ad 2092$ endif
2093$ teststatus = f$extract(9,1,$status)
2094$ DEASSIGN SYS$OUTPUT
2095$ DEASSIGN SYS$ERROR
2096$ if (teststatus.nes."1")
2097$ THEN
2098$ perl_d_setpent="undef"
2099$ ELSE
2100$ perl_d_setpent="define"
2101$ ENDIF
2102$ ELSE
2103$ perl_d_setpent="undef"
2104$ ENDIF
2105$ WRITE_RESULT "d_setpent is ''perl_d_setpent'"
2106$!
2107$! Check for setservent
2108$!
2109$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2110$ THEN
2111$ OS
2112$ WS "#ifdef __DECC
2113$ WS "#include <stdlib.h>
2114$ WS "#endif
2115$ WS "#include <stdio.h>
2116$ if ("''Has_Socketshr'".eqs."T")
2117$ THEN
2118$ WS "#include <socketshr.h>"
2119$ else
2120$ WS "#include <netdb.h>
2121$ endif
2122$ WS "int main()
2123$ WS "{"
2124$ WS "setservent(1);
2125$ WS "exit(0);
2126$ WS "}"
2127$ CS
2128$ DEFINE SYS$ERROR _NLA0:
2129$ DEFINE SYS$OUTPUT _NLA0:
2130$ on error then continue
2131$ on warning then continue
9ef4b0a6 2132$ 'Checkcc' temp.c
97abc6ad 2133$ If (Needs_Opt.eqs."Yes")
2134$ THEN
9ef4b0a6 2135$ link temp.obj,temp.opt/opt
97abc6ad 2136$ else
9ef4b0a6 2137$ link temp.obj
97abc6ad 2138$ endif
2139$ teststatus = f$extract(9,1,$status)
2140$ DEASSIGN SYS$OUTPUT
2141$ DEASSIGN SYS$ERROR
2142$ if (teststatus.nes."1")
2143$ THEN
2144$ perl_d_setsent="undef"
2145$ ELSE
2146$ perl_d_setsent="define"
2147$ ENDIF
2148$ ELSE
2149$ perl_d_setsent="undef"
2150$ ENDIF
2151$ WRITE_RESULT "d_setsent is ''perl_d_setsent'"
2152$!
2153$! Check for gethostent
2154$!
2155$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2156$ THEN
2157$ OS
2158$ WS "#ifdef __DECC
2159$ WS "#include <stdlib.h>
2160$ WS "#endif
2161$ WS "#include <stdio.h>
2162$ if ("''Has_Socketshr'".eqs."T")
2163$ THEN
2164$ WS "#include <socketshr.h>"
2165$ else
2166$ WS "#include <netdb.h>
2167$ endif
2168$ WS "int main()
2169$ WS "{"
2170$ WS "gethostent();
2171$ WS "exit(0);
2172$ WS "}"
2173$ CS
2174$ DEFINE SYS$ERROR _NLA0:
2175$ DEFINE SYS$OUTPUT _NLA0:
2176$ on error then continue
2177$ on warning then continue
9ef4b0a6 2178$ 'Checkcc' temp.c
97abc6ad 2179$ If (Needs_Opt.eqs."Yes")
2180$ THEN
9ef4b0a6 2181$ link temp.obj,temp.opt/opt
97abc6ad 2182$ else
9ef4b0a6 2183$ link temp.obj
97abc6ad 2184$ endif
2185$ teststatus = f$extract(9,1,$status)
2186$ DEASSIGN SYS$OUTPUT
2187$ DEASSIGN SYS$ERROR
2188$ if (teststatus.nes."1")
2189$ THEN
2190$ perl_d_gethent="undef"
2191$ ELSE
2192$ perl_d_gethent="define"
2193$ ENDIF
2194$ ELSE
2195$ perl_d_gethent="undef"
2196$ ENDIF
2197$ WRITE_RESULT "d_gethent is ''perl_d_gethent'"
2198$!
2199$! Check for getnetent
2200$!
2201$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2202$ THEN
2203$ OS
2204$ WS "#ifdef __DECC
2205$ WS "#include <stdlib.h>
2206$ WS "#endif
2207$ WS "#include <stdio.h>
2208$ if ("''Has_Socketshr'".eqs."T")
2209$ THEN
2210$ WS "#include <socketshr.h>"
2211$ else
2212$ WS "#include <netdb.h>
2213$ endif
2214$ WS "int main()
2215$ WS "{"
2216$ WS "getnetent();
2217$ WS "exit(0);
2218$ WS "}"
2219$ CS
2220$ DEFINE SYS$ERROR _NLA0:
2221$ DEFINE SYS$OUTPUT _NLA0:
2222$ on error then continue
2223$ on warning then continue
9ef4b0a6 2224$ 'Checkcc' temp.c
97abc6ad 2225$ If (Needs_Opt.eqs."Yes")
2226$ THEN
9ef4b0a6 2227$ link temp.obj,temp.opt/opt
97abc6ad 2228$ else
9ef4b0a6 2229$ link temp.obj
97abc6ad 2230$ endif
2231$ teststatus = f$extract(9,1,$status)
2232$ DEASSIGN SYS$OUTPUT
2233$ DEASSIGN SYS$ERROR
2234$ if (teststatus.nes."1")
2235$ THEN
2236$ perl_d_getnent="undef"
2237$ ELSE
2238$ perl_d_getnent="define"
2239$ ENDIF
2240$ ELSE
2241$ perl_d_getnent="undef"
2242$ ENDIF
2243$ WRITE_RESULT "d_getnent is ''perl_d_getnent'"
2244$!
2245$! Check for getprotoent
2246$!
2247$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2248$ THEN
2249$ OS
2250$ WS "#ifdef __DECC
2251$ WS "#include <stdlib.h>
2252$ WS "#endif
2253$ WS "#include <stdio.h>
2254$ if ("''Has_Socketshr'".eqs."T")
2255$ THEN
2256$ WS "#include <socketshr.h>"
2257$ else
2258$ WS "#include <netdb.h>
2259$ endif
2260$ WS "int main()
2261$ WS "{"
2262$ WS "getprotoent();
2263$ WS "exit(0);
2264$ WS "}"
2265$ CS
2266$ DEFINE SYS$ERROR _NLA0:
2267$ DEFINE SYS$OUTPUT _NLA0:
2268$ on error then continue
2269$ on warning then continue
9ef4b0a6 2270$ 'Checkcc' temp.c
97abc6ad 2271$ If (Needs_Opt.eqs."Yes")
2272$ THEN
9ef4b0a6 2273$ link temp.obj,temp.opt/opt
97abc6ad 2274$ else
9ef4b0a6 2275$ link temp.obj
97abc6ad 2276$ endif
2277$ teststatus = f$extract(9,1,$status)
2278$ DEASSIGN SYS$OUTPUT
2279$ DEASSIGN SYS$ERROR
2280$ if (teststatus.nes."1")
2281$ THEN
2282$ perl_d_getpent="undef"
2283$ ELSE
2284$ perl_d_getpent="define"
2285$ ENDIF
2286$ ELSE
2287$ perl_d_getpent="undef"
2288$ ENDIF
2289$ WRITE_RESULT "d_getpent is ''perl_d_getpent'"
2290$!
2291$! Check for getservent
2292$!
2293$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
2294$ THEN
2295$ OS
2296$ WS "#ifdef __DECC
2297$ WS "#include <stdlib.h>
2298$ WS "#endif
2299$ WS "#include <stdio.h>
2300$ if ("''Has_Socketshr'".eqs."T")
2301$ THEN
2302$ WS "#include <socketshr.h>"
2303$ else
2304$ WS "#include <netdb.h>
2305$ endif
2306$ WS "int main()
2307$ WS "{"
2308$ WS "getservent();
2309$ WS "exit(0);
2310$ WS "}"
2311$ CS
2312$ DEFINE SYS$ERROR _NLA0:
2313$ DEFINE SYS$OUTPUT _NLA0:
2314$ on error then continue
2315$ on warning then continue
9ef4b0a6 2316$ 'Checkcc' temp.c
97abc6ad 2317$ If (Needs_Opt.eqs."Yes")
2318$ THEN
9ef4b0a6 2319$ link temp.obj,temp.opt/opt
97abc6ad 2320$ else
9ef4b0a6 2321$ link temp.obj
97abc6ad 2322$ endif
2323$ teststatus = f$extract(9,1,$status)
2324$ DEASSIGN SYS$OUTPUT
2325$ DEASSIGN SYS$ERROR
2326$ if (teststatus.nes."1")
2327$ THEN
2328$ perl_d_getsent="undef"
2329$ ELSE
2330$ perl_d_getsent="define"
2331$ ENDIF
2332$ ELSE
2333$ perl_d_getsent="undef"
2334$ ENDIF
2335$ WRITE_RESULT "d_getsent is ''perl_d_getsent'"
2336$!
2337$! Check for pthread_yield
2338$!
2339$ if ("''use_threads'".eqs."T")
2340$ THEN
2341$ OS
2342$ WS "#ifdef __DECC
2343$ WS "#include <stdlib.h>
2344$ WS "#endif
2345$ WS "#include <pthread.h>
2346$ WS "#include <stdio.h>
2347$ WS "int main()
2348$ WS "{"
2349$ WS "pthread_yield();
2350$ WS "exit(0);
2351$ WS "}"
2352$ CS
2353$ DEFINE SYS$ERROR _NLA0:
2354$ DEFINE SYS$OUTPUT _NLA0:
2355$ on error then continue
2356$ on warning then continue
9ef4b0a6 2357$ 'Checkcc' temp.c
97abc6ad 2358$ teststatus = f$extract(9,1,$status)
2359$ DEASSIGN SYS$OUTPUT
2360$ DEASSIGN SYS$ERROR
2361$ if (teststatus.nes."1")
2362$ THEN
2363$ perl_d_pthread_yield="undef"
2364$ ELSE
2365$ perl_d_pthread_yield="define"
2366$ ENDIF
2367$ ELSE
2368$ perl_d_pthread_yield="undef"
2369$ ENDIF
2370$ WRITE_RESULT "d_pthread_yield is ''perl_d_pthread_yield'"
2371$!
2372$! Check for sched_yield
2373$!
2374$ if ("''use_threads'".eqs."T")
2375$ THEN
2376$ OS
2377$ WS "#ifdef __DECC
2378$ WS "#include <stdlib.h>
2379$ WS "#endif
2380$ WS "#include <pthread.h>
2381$ WS "#include <stdio.h>
2382$ WS "int main()
2383$ WS "{"
2384$ WS "sched_yield();
2385$ WS "exit(0);
2386$ WS "}"
2387$ CS
2388$ DEFINE SYS$ERROR _NLA0:
2389$ DEFINE SYS$OUTPUT _NLA0:
2390$ on error then continue
2391$ on warning then continue
9ef4b0a6 2392$ 'Checkcc' temp.c
97abc6ad 2393$ teststatus = f$extract(9,1,$status)
2394$ DEASSIGN SYS$OUTPUT
2395$ DEASSIGN SYS$ERROR
2396$ if (teststatus.nes."1")
2397$ THEN
2398$ perl_d_sched_yield="undef"
2399$ ELSE
2400$ perl_d_sched_yield="define"
2401$ ENDIF
2402$ ELSE
2403$ perl_d_sched_yield="undef"
2404$ ENDIF
2405$ WRITE_RESULT "d_sched_yield is ''perl_d_sched_yield'"
2406$!
2407$! Check for generic pointer size
2408$!
2409$ OS
2410$ WS "#ifdef __DECC
2411$ WS "#include <stdlib.h>
2412$ WS "#endif
2413$ WS "#include <stdio.h>
2414$ WS "int main()
2415$ WS "{"
429a5e67 2416$ WS "int foo;
2417$ WS "foo = sizeof(char *);
2418$ WS "printf(""%d\n"", foo);
97abc6ad 2419$ WS "exit(0);
2420$ WS "}"
2421$ CS
429a5e67 2422$! copy temp.c sys$output
2423$!
97abc6ad 2424$ DEFINE SYS$ERROR _NLA0:
2425$ DEFINE SYS$OUTPUT _NLA0:
2426$ ON ERROR THEN CONTINUE
2427$ ON WARNING THEN CONTINUE
9ef4b0a6 2428$ 'Checkcc' temp.c
97abc6ad 2429$ If (Needs_Opt.eqs."Yes")
2430$ THEN
9ef4b0a6 2431$ link temp.obj,temp.opt/opt
97abc6ad 2432$ else
9ef4b0a6 2433$ link temp.obj
97abc6ad 2434$ endif
2435$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
2436$ DEASSIGN SYS$OUTPUT
2437$ DEASSIGN SYS$ERROR
2438$ DEFINE SYS$ERROR TEMPOUT
2439$ DEFINE SYS$OUTPUT TEMPOUT
2440$ mcr []temp
2441$ CLOSE TEMPOUT
2442$ DEASSIGN SYS$OUTPUT
2443$ DEASSIGN SYS$ERROR
2444$ OPEN/READ TEMPOUT [-.uu]tempout.lis
2445$ READ TEMPOUT line
2446$ CLOSE TEMPOUT
2447$
2448$ perl_ptrsize=line
2449$ WRITE_RESULT "ptrsize is ''perl_ptrsize'"
2450$!
3eeba6fb 2451$!
2452$! Check rand48 and its ilk
2453$!
2454$ OS
2455$ WS "#ifdef __DECC
2456$ WS "#include <stdlib.h>
2457$ WS "#endif
2458$ WS "#include <stdio.h>
2459$ WS "int main()
2460$ WS "{"
2461$ WS "srand48(12L);"
2462$ WS "exit(0);
2463$ WS "}"
2464$ CS
2465$! copy temp.c sys$output
2466$!
2467$ DEFINE SYS$ERROR _NLA0:
2468$ DEFINE SYS$OUTPUT _NLA0:
2469$ ON ERROR THEN CONTINUE
2470$ ON WARNING THEN CONTINUE
2471$ 'Checkcc' temp
2472$ If (Needs_Opt.eqs."Yes")
2473$ THEN
2474$ link temp,temp.opt/opt
2475$ else
2476$ link temp
2477$ endif
2478$ teststatus = f$extract(9,1,$status)
2479$ DEASSIGN SYS$OUTPUT
2480$ DEASSIGN SYS$ERROR
2481$ if (teststatus.nes."1")
2482$ THEN
2483$ perl_drand01="random()"
2484$ perl_randseedtype = "unsigned"
2485$ perl_seedfunc = "srandom"
2486$ ENDIF
2487$ OS
2488$ WS "#ifdef __DECC
2489$ WS "#include <stdlib.h>
2490$ WS "#endif
2491$ WS "#include <stdio.h>
2492$ WS "int main()
2493$ WS "{"
2494$ WS "srandom(12);"
2495$ WS "exit(0);
2496$ WS "}"
2497$ CS
2498$! copy temp.c sys$output
2499$!
2500$ DEFINE SYS$ERROR _NLA0:
2501$ DEFINE SYS$OUTPUT _NLA0:
2502$ ON ERROR THEN CONTINUE
2503$ ON WARNING THEN CONTINUE
2504$ 'Checkcc' temp
2505$ If (Needs_Opt.eqs."Yes")
2506$ THEN
2507$ link temp,temp.opt/opt
2508$ else
2509$ link temp
2510$ endif
2511$ teststatus = f$extract(9,1,$status)
2512$ DEASSIGN SYS$OUTPUT
2513$ DEASSIGN SYS$ERROR
2514$ if (teststatus.nes."1")
2515$ THEN
2516$ perl_drand01="(((float)rand())/((float)RAND_MAX))"
2517$ perl_randseedtype = "unsigned"
2518$ perl_seedfunc = "srand"
2519$ ENDIF
2520$ WRITE_RESULT "drand01 is ''perl_drand01'"
2521$!
97abc6ad 2522$ set nover
2523$! Done with compiler checks. Clean up.
2524$ if f$search("temp.c").nes."" then DELETE/NOLOG temp.c;*
2525$ if f$search("temp.obj").nes."" then DELETE/NOLOG temp.obj;*
2526$ if f$search("temp.exe").nes."" then DELETE/NOLOG temp.exe;*
2527$ if f$search("temp.opt").nes."" then DELETE/NOLOG Temp.opt;*
2528$!
2529$!
2530$! Some that are compiler or VMS version sensitive
2531$!
2532$! Gnu C stuff
2533$ IF "''Using_Gnu_C'".EQS."Yes"
2534$ THEN
2535$ perl_d_attribut="define"
2536$ perl_vms_cc_type="gcc"
2537$ ELSE
2538$ perl_d_attribut="undef"
2539$ ENDIF
2540$
2541$! Dec C >= 5.2 and VMS ver >= 7.0
2542$ IF ("''Using_Dec_C'".EQS."Yes").AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.("''VMS_VER'".GES."7.0")
2543$ THEN
2544$ perl_d_bcmp="define"
2545$ perl_d_gettimeod="define"
2546$ perl_d_uname="define"
2547$ perl_d_sigaction="define"
2548$ perl_d_truncate="define"
2549$ perl_d_wait4="define"
2550$ perl_d_index="define"
2551$ perl_pidtype="pid_t"
2552$ perl_sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2 SPARE18 SPARE19 CHLD CONT STOP TSTP TTIN TTOU DEBUG SPARE27 SPARE28 SPARE29 SPARE30 SPARE31 SPARE32 RTMIN RTMAX"",0"
2553$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
2554$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
2555$ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
2556$perl_sig_name_with_commas = psnwc1 + psnwc2 + psnwc3
a3ba788f 2557$ perl_sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 64"","0"
2558$ perl_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"
2559$ perl_sig_num_with_commas=perl_sig_num_init
97abc6ad 2560$ perl_uidtype="uid_t"
2561$ perl_d_pathconf="define"
2562$ perl_d_fpathconf="define"
2563$ perl_d_sysconf="define"
2564$ perl_d_sigsetjmp="define"
2565$ ELSE
2566$ perl_pidtype="unsigned int"
2567$ perl_d_gettimeod="undef"
2568$ perl_d_bcmp="undef"
2569$ perl_d_uname="undef"
2570$ perl_d_sigaction="undef"
2571$ perl_d_truncate="undef"
2572$ perl_d_wait4="undef"
2573$ perl_d_index="undef"
2574$ perl_sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"",0"
2575$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
2576$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
2577$ perl_sig_name_with_commas = psnwc1 + psnwc2
a3ba788f 2578$ perl_sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"",0"
2579$ perl_sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
2580$ perl_sig_num_with_commas=perl_sig_num_init
97abc6ad 2581$ perl_uidtype="unsigned int"
2582$ perl_d_pathconf="undef"
2583$ perl_d_fpathconf="undef"
2584$ perl_d_sysconf="undef"
2585$ perl_d_sigsetjmp="undef"
2586$ ENDIF
2587$!
2588$! Dec C alone
2589$ IF ("''Using_Dec_C'".EQS."Yes")
2590$ THEN
2591$ perl_d_mbstowcs="define"
2592$ perl_d_mbtowc="define"
2593$ perl_d_stdiobase="define"
2594$ perl_d_stdio_ptr_lval="define"
2595$ perl_d_stdio_cnt_lval="define"
2596$ perl_d_stdstdio="define"
2597$ perl_d_wcstombs="define"
2598$ perl_d_mblen="define"
2599$ perl_d_mktime="define"
2600$ perl_d_strcoll="define"
2601$ perl_d_strxfrm="define"
2602$ perl_d_wctomb="define"
2603$ perl_i_locale="define"
2604$ perl_d_locconv="define"
2605$ perl_d_setlocale="define"
2606$ perl_vms_cc_type="decc"
2607$ ELSE
2608$ perl_d_mbstowcs="undef"
2609$ perl_d_mbtowc="undef"
2610$ perl_d_stdiobase="undef"
2611$ perl_d_stdio_ptr_lval="undef"
2612$ perl_d_stdio_cnt_lval="undef"
2613$ perl_d_stdstdio="undef"
2614$ perl_d_wcstombs="undef"
2615$ perl_d_mblen="undef"
2616$ perl_d_mktime="undef"
2617$ perl_d_strcoll="undef"
2618$ perl_d_strxfrm="undef"
2619$ perl_d_wctomb="undef"
2620$ perl_i_locale="undef"
2621$ perl_d_locconv="undef"
2622$ perl_d_setlocale="undef"
2623$ ENDIF
2624$!
2625$! Vax C stuff
2626$ if ("''Using_Vax_C'".EQS."Yes")
2627$ THEN
2628$ perl_vms_cc_type="vaxc"
2629$ ENDIF
2630$!
2631$!
2632$! Sockets?
2633$ if ("''Has_Socketshr'".EQS."T").OR.("''Has_Dec_C_Sockets'".EQS."T")
2634$ THEN
2635$ perl_d_vms_do_sockets="define"
2636$ perl_d_htonl="define"
2637$ perl_d_socket="define"
2638$ perl_d_select="define"
2639$ perl_netdb_host_type="char *"
2640$ perl_netdb_hlen_type="int"
2641$ perl_netdb_name_type="char *"
2642$ perl_netdb_net_type="long"
2643$ perl_d_gethbyaddr="define"
2644$ perl_d_gethbyname="define"
2645$ perl_d_getnbyaddr="define"
2646$ perl_d_getnbyname="define"
2647$ perl_d_getpbynumber="define"
2648$ perl_d_getpbyname="define"
2649$ perl_d_getsbyport="define"
2650$ perl_d_getsbyname="define"
2651$ perl_d_gethostprotos="define"
2652$ perl_d_getnetprotos="define"
2653$ perl_d_getprotoprotos="define"
2654$ perl_d_getservprotos="define"
2655$ ELSE
2656$ perl_d_vms_do_sockets="undef"
2657$ perl_d_htonl="undef"
2658$ perl_d_socket="undef"
2659$ perl_d_select="undef"
2660$ perl_netdb_host_type="char *"
2661$ perl_netdb_hlen_type="int"
2662$ perl_netdb_name_type="char *"
2663$ perl_netdb_net_type="long"
2664$ perl_d_gethbyaddr="undef"
2665$ perl_d_gethbyname="undef"
2666$ perl_d_getnbyaddr="undef"
2667$ perl_d_getnbyname="undef"
2668$ perl_d_getpbynumber="undef"
2669$ perl_d_getpbyname="undef"
2670$ perl_d_getsbyport="undef"
2671$ perl_d_getsbyname="undef"
2672$ perl_d_gethostprotos="undef"
2673$ perl_d_getnetprotos="undef"
2674$ perl_d_getprotoprotos="undef"
2675$ perl_d_getservprotos="undef"
2676$ ENDIF
2677$! Threads
2678$ if ("''use_threads'".eqs."T")
2679$ THEN
2680$ perl_usethreads="define"
2681$ perl_d_pthreads_created_joinable="define"
2682$ if ("''VMS_VER'".ges."7.0")
2683$ THEN
2684$ perl_d_oldpthreads="undef"
2685$ ELSE
2686$ perl_d_oldpthreads="define"
2687$ ENDIF
2688$ ELSE
2689$ perl_d_oldpthreads="undef"
2690$ perl_usethreads="undef"
2691$
2692$ perl_d_pthreads_created_joinable="undef"
2693$ ENDIF
2694$!
2695$!
2696$! Finally the composite ones. All config
2697$ perl_installarchlib="''perl_prefix':[lib.''perl_arch'.''localperlver']"
2698$ perl_installsitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
2699$ perl_myhostname="''myhostname'"
2700$ perl_mydomain="''mydomain'"
2701$ perl_perladmin="''perladmin'"
2702$ perl_cf_email="''cf_email'"
2703$ perl_myuname:="VMS ''myname' ''f$edit(perl_osvers, "TRIM")' ''f$edit(hwname, "TRIM")'"
2704$ perl_archlibexp="''perl_prefix':[lib.''perl_arch'.''localperlver']"
2705$ perl_archlib="''perl_prefix':[lib.''perl_arch'.''lovalperlver']"
2706$ perl_oldarchlibexp="''perl_prefix':[lib.''perl_arch']"
2707$ perl_oldarchlib="''perl_prefix':[lib.''perl_arch']"
2708$ perl_sitearchexp="''perl_prefix':[lib.site_perl.''perl_arch']"
2709$ perl_sitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
2710$ if "''Using_Dec_C'" .eqs. "Yes"
2711$ THEN
429a5e67 2712$ perl_ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'"
97abc6ad 2713$ ELSE
2714$ IF "''Using_Vax_C'" .eqs. "Yes"
2715$ THEN
429a5e67 2716$ perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
97abc6ad 2717$ ENDIF
2718$ ENDIF
3eeba6fb 2719$ if use_vmsdebug_perl .eqs. "Y"
2720$ then
2721$ perl_optimize="/Debug/NoOpt"
2722$ perl_dbgprefix = "DBG"
2723$ else
2724$ perl_optimize= ""
2725$ perl_dbgprefix = ""
2726$ endif
97abc6ad 2727$!
2728$! Finally clean off any leading zeros from the patchlevel or subversion
2729$ perl_patchlevel = perl_patchlevel + 0
2730$ perl_subversion = perl_subversion + 0
2731$!
2732$! Okay, we've got everything configured. Now go write out a config.sh.
2733$ open/write CONFIGSH [-]config.sh
2734$ WC := "write CONFIGSH"
2735$!
2736$ WC "# This file generated by Configure.COM on a VMS system."
2737$ WC "# Time: " + perl_cf_time
2738$ WC ""
2739$ WC "package='" + perl_package + "'"
2740$ WC "CONFIG='" + perl_config + "'"
2741$ WC "cf_time='" + perl_cf_time + "'"
2742$ WC "cf_by='" + perl_cf_by+ "'"
2743$ WC "cpp_stuff='" + perl_cpp_stuff + "'"
2744$ WC "ccdlflags='" + perl_ccdlflags + "'"
2745$ WC "cccdlflags='" + perl_cccdlflags + "'"
2746$ WC "mab='" + perl_mab + "'"
2747$ WC "libpth='" + perl_libpth + "'"
2748$ WC "ld='" + perl_ld + "'"
2749$ WC "lddlflags='" + perl_lddlflags + "'"
2750$ WC "ranlib='" + perl_ranlib + "'"
2751$ WC "ar='" + perl_ar + "'"
2752$ WC "eunicefix='" + perl_eunicefix + "'"
2753$ WC "hint='" + perl_hint +"'"
2754$ WC "hintfile='" + perl_hintfile + "'"
2755$ WC "shrplib='" + perl_shrplib + "'"
2756$ WC "usemymalloc='" + perl_usemymalloc + "'"
2757$ WC "usevfork='" + perl_usevfork + "'"
2758$ WC "useposix='false'"
2759$ WC "spitshell='write sys$output '"
2760$ WC "dlsrc='dl_vms.c'"
2761$ WC "binexp='" + perl_binexp + "'"
2762$ WC "man1ext='" + perl_man1ext + "'"
2763$ WC "man3ext='" + perl_man3ext + "'"
2764$ WC "arch='" + perl_arch + "'"
2765$ WC "archname='" + perl_archname + "'"
2766$ WC "osvers='" + perl_osvers + "'"
2767$ WC "prefix='" + perl_prefix + "'"
2768$ WC "builddir='" + perl_builddir + "'"
2769$ WC "installbin='" + perl_installbin + "'"
2770$ WC "installscript='" + perl_installscript + "'"
2771$ WC "installman1dir='" + perl_installman1dir + "'"
2772$ WC "installman3dir='" + perl_installman3dir + "'"
2773$ WC "installprivlib='" + perl_installprivlib + "'"
2774$ WC "installarchlib='" + perl_installarchlib + "'"
2775$ WC "installsitelib='" + perl_installsitelib + "'"
2776$ WC "installsitearch='" + perl_installsitearch + "'"
2777$ WC "path_sep='" + perl_path_sep + "'"
97abc6ad 2778$ WC "vms_cc_type='" + perl_vms_cc_type + "'"
2779$ WC "d_attribut='" + perl_d_attribut + "'"
2780$ WC "cc='" + perl_cc + "'"
2781$ WC "ccflags='" + perl_ccflags + "'"
3eeba6fb 2782$ WC "optimize='" + perl_optimize + "'"
2783$ WC "dbgprefix='" + perl_dbgprefix + "'"
97abc6ad 2784$ WC "d_vms_do_sockets='" + perl_d_vms_do_sockets + "'"
2785$ WC "d_socket='" + perl_d_socket + "'"
2786$ WC "d_sockpair='" + perl_d_sockpair + "'"
2787$ WC "d_gethent='" + perl_d_gethent + "'"
2788$ WC "d_getsent='" + perl_d_getsent + "'"
2789$ WC "d_select='" + perl_d_select + "'"
2790$ WC "i_niin='" + perl_i_niin + "'"
2791$ WC "i_neterrno='" + perl_i_neterrno + "'"
2792$ WC "d_stdstdio='" + perl_d_stdstdio + "'"
2793$ WC "d_stdio_ptr_lval='" + perl_d_stdio_ptr_lval + "'"
2794$ WC "d_stdio_cnt_lval='" + perl_d_stdio_cnt_lval + "'"
2795$ WC "d_stdiobase='" + perl_d_stdiobase + "'"
2796$ WC "d_locconv='" + perl_d_locconv + "'"
2797$ WC "d_setlocale='" + perl_d_setlocale + "'"
2798$ WC "i_locale='" + perl_i_locale + "'"
2799$ WC "d_mbstowcs='" + perl_d_mbstowcs + "'"
2800$ WC "d_mbtowc='" + perl_d_mbtowc + "'"
2801$ WC "d_wcstombs='" + perl_d_wcstombs + "'"
2802$ WC "d_wctomb='" + perl_d_wctomb + "'"
2803$ WC "d_mblen='" + perl_d_mblen + "'"
2804$ WC "d_mktime='" + perl_d_mktime + "'"
2805$ WC "d_strcoll='" + perl_d_strcoll + "'"
2806$ WC "d_strxfrm='" + perl_d_strxfrm + "'"
2807$ WC "ldflags='" + perl_ldflags + "'"
2808$ WC "dlobj='" + perl_dlobj + "'"
2809$ WC "obj_ext='" + perl_obj_ext + "'"
2810$ WC "so='" + perl_so + "'"
2811$ WC "dlext='" + perl_dlext + "'"
2812$ WC "exe_ext='" + perl_exe_ext + "'"
2813$ WC "lib_ext='" + perl_lib_ext + "'"
2814$ WC "myhostname='" + perl_myhostname + "'"
2815$ WC "mydomain='" + perl_mydomain + "'"
2816$ WC "perladmin='" + perl_perladmin + "'"
2817$ WC "cf_email='" + perl_cf_email + "'"
2818$ WC "myuname='" + perl_myuname + "'"
2819$ WC "alignbytes='" + perl_alignbytes + "'"
2820$ WC "osname='" + perl_osname + "'"
2821$ WC "d_archlib='" + perl_d_archlib + "'"
2822$ WC "archlibexp='" + perl_archlibexp + "'"
2823$ WC "archlib='" + perl_archlib + "'"
2824$ WC "archname='" + perl_archname + "'"
2825$ WC "d_bincompat3='" + perl_d_bincompat3 + "'"
2826$ WC "cppstdin='" + perl_cppstdin + "'"
2827$ WC "cppminus='" + perl_cppminus + "'"
2828$ WC "d_bcmp='" + perl_d_bcmp + "'"
2829$ WC "d_bcopy='" + perl_d_bcopy + "'"
2830$ WC "d_bzero='" + perl_d_bzero + "'"
2831$ WC "d_castneg='" + perl_d_castneg + "'"
2832$ WC "castflags='" + perl_castflags + "'"
2833$ WC "d_chsize='" + perl_d_chsize + "'"
2834$ WC "d_const='" + perl_d_const + "'"
2835$ WC "d_crypt='" + perl_d_crypt + "'"
2836$ WC "byteorder='" + perl_byteorder + "'"
2837$ WC "full_csh='" + perl_full_csh + "'"
2838$ WC "d_csh='" + perl_d_csh + "'"
2839$ WC "d_dup2='" + perl_d_dup2 + "'"
2840$ WC "d_fchmod='" + perl_d_fchmod + "'"
2841$ WC "d_fchown='" + perl_d_fchown + "'"
2842$ WC "d_fcntl='" + perl_d_fcntl + "'"
2843$ WC "d_fgetpos='" + perl_d_fgetpos + "'"
2844$ WC "d_flexfnam='" + perl_d_flexfnam + "'"
2845$ WC "d_flock='" + perl_d_flock + "'"
2846$ WC "d_fsetpos='" + perl_d_fsetpos + "'"
2847$ WC "d_gettimeod='" + perl_d_gettimeod + "'"
2848$ WC "d_getgrps='" + perl_d_getgrps + "'"
2849$ WC "d_setgrps='" + perl_d_setgrps + "'"
2850$ WC "d_uname='" + perl_d_uname + "'"
2851$ WC "d_getprior='" + perl_d_getprior + "'"
2852$ WC "d_killpg='" + perl_d_killpg + "'"
2853$ WC "d_link='" + perl_d_link + "'"
2854$ WC "d_lstat='" + perl_d_lstat + "'"
2855$ WC "d_lockf='" + perl_d_lockf + "'"
2856$ WC "d_memcmp='" + perl_d_memcmp + "'"
2857$ WC "d_memcpy='" + perl_d_memcpy + "'"
2858$ WC "d_memmove='" + perl_d_memmove + "'"
2859$ WC "d_memset='" + perl_d_memset + "'"
2860$ WC "d_mkdir='" + perl_d_mkdir + "'"
2861$ WC "d_msg='" + perl_d_msg + "'"
2862$ WC "d_open3='" + perl_d_open3 + "'"
2863$ WC "d_poll='" + perl_d_poll + "'"
2864$ WC "d_readdir='" + perl_d_readdir + "'"
2865$ WC "d_seekdir='" + perl_d_seekdir + "'"
2866$ WC "d_telldir='" + perl_d_telldir + "'"
2867$ WC "d_rewinddir='" + perl_d_rewinddir + "'"
2868$ WC "d_rename='" + perl_d_rename + "'"
2869$ WC "d_rmdir='" + perl_d_rmdir + "'"
2870$ WC "d_sem='" + perl_d_sem + "'"
2871$ WC "d_setegid='" + perl_d_setegid + "'"
2872$ WC "d_seteuid='" + perl_d_seteuid + "'"
2873$ WC "d_setprior='" + perl_d_setprior + "'"
2874$ WC "d_setregid='" + perl_d_setregid + "'"
2875$ WC "d_setresgid='" + perl_d_setresgid + "'"
2876$ WC "d_setreuid='" + perl_d_setreuid + "'"
2877$ WC "d_setresuid='" + perl_d_setresuid + "'"
2878$ WC "d_setrgid='" + perl_d_setrgid + "'"
2879$ WC "d_setruid='" + perl_d_setruid + "'"
2880$ WC "d_setsid='" + perl_d_setsid + "'"
2881$ WC "d_shm='" + perl_d_shm + "'"
2882$ WC "d_shmatprototype='" + perl_d_shmatprototype + "'"
2883$ WC "d_sigaction='" + perl_d_sigaction + "'"
2884$ WC "d_statblks='" + perl_d_statblks + "'"
2885$ WC "stdio_ptr='" + perl_stdio_ptr + "'"
2886$ WC "stdio_cnt='" + perl_stdio_cnt + "'"
2887$ WC "stdio_base='" + perl_stdio_base + "'"
2888$ WC "stdio_bufsiz='" + perl_stdio_bufsiz + "'"
2889$ WC "d_strctcpy='" + perl_d_strctcpy + "'"
2890$ WC "d_strerror='" + perl_d_strerror + "'"
2891$ WC "d_syserrlst='" + perl_d_syserrlst + "'"
2892$ WC "d_strerrm='" + perl_d_strerrm + "'"
2893$ WC "d_symlink='" + perl_d_symlink + "'"
2894$ WC "d_syscall='" + perl_d_syscall + "'"
2895$ WC "d_system='" + perl_d_system + "'"
2896$ WC "timetype='" + perl_timetype + "'"
2897$ WC "d_truncate='" + perl_d_truncate + "'"
2898$ WC "d_vfork='" + perl_d_vfork + "'"
2899$ WC "signal_t='" + perl_signal_t + "'"
2900$ WC "d_volatile='" + perl_d_volatile + "'"
2901$ WC "d_vprintf='" + perl_d_vprintf + "'"
2902$ WC "d_charvspr='" + perl_d_charvspr + "'"
2903$ WC "d_wait4='" + perl_d_wait4 + "'"
2904$ WC "d_waitpid='" + perl_d_waitpid + "'"
2905$ WC "i_dirent='" + perl_i_dirent + "'"
2906$ WC "d_dirnamlen='" + perl_d_dirnamlen + "'"
2907$ WC "direntrytype='" + perl_direntrytype + "'"
2908$ WC "i_fcntl='" + perl_i_fcntl + "'"
2909$ WC "i_grp='" + perl_i_grp + "'"
2910$ WC "i_limits='" + perl_i_limits + "'"
2911$ WC "i_memory='" + perl_i_memory + "'"
2912$ WC "i_ndbm='" + perl_i_ndbm + "'"
2913$ WC "i_stdarg='" + perl_i_stdarg + "'"
2914$ WC "i_pwd='" + perl_i_pwd + "'"
2915$ WC "d_pwquota='" + perl_d_pwquota + "'"
2916$ WC "d_pwage='" + perl_d_pwage + "'"
2917$ WC "d_pwchange='" + perl_d_pwchange + "'"
2918$ WC "d_pwclass='" + perl_d_pwclass + "'"
2919$ WC "d_pwexpire='" + perl_d_pwexpire + "'"
2920$ WC "d_pwcomment='" + perl_d_pwcomment + "'"
2921$ WC "i_stddef='" + perl_i_stddef + "'"
2922$ WC "i_stdlib='" + perl_i_stdlib + "'"
2923$ WC "i_string='" + perl_i_string + "'"
2924$ WC "i_sysdir='" + perl_i_sysdir + "'"
2925$ WC "i_sysfile='" + perl_i_sysfile + "'"
2926$ WC "i_sysioctl='" + perl_i_sysioctl + "'"
2927$ WC "i_sysndir='" + perl_i_sysndir + "'"
2928$ WC "i_sysresrc='" + perl_i_sysresrc + "'"
2929$ WC "i_sysselct='" + perl_i_sysselct + "'"
2930$ WC "i_dbm='" + perl_i_dbm + "'"
2931$ WC "i_rpcsvcdbm='" + perl_i_rpcsvcdbm + "'"
2932$ WC "i_sfio='" + perl_i_sfio + "'"
2933$ WC "i_sysstat='" + perl_i_sysstat + "'"
2934$ WC "i_systimes='" + perl_i_systimes + "'"
2935$ WC "i_systypes='" + perl_i_systypes + "'"
2936$ WC "i_sysun='" + perl_i_sysun + "'"
2937$ WC "i_syswait='" + perl_i_syswait + "'"
2938$ WC "i_termio='" + perl_i_termio + "'"
2939$ WC "i_sgtty='" + perl_i_sgtty + "'"
2940$ WC "i_termios='" + perl_i_termios + "'"
2941$ WC "i_time='" + perl_i_time + "'"
2942$ WC "i_systime='" + perl_i_systime + "'"
2943$ WC "i_systimek='" + perl_i_systimek + "'"
2944$ WC "i_unistd='" + perl_i_unistd + "'"
2945$ WC "i_utime='" + perl_i_utime + "'"
2946$ WC "i_varargs='" + perl_i_varargs + "'"
2947$ WC "i_vfork='" + perl_i_vfork + "'"
2948$ WC "prototype='" + perl_prototype + "'"
2949$ WC "randbits='" + perl_randbits +"'"
2950$ WC "selecttype='" + perl_selecttype + "'"
2951$ WC "stdchar='" + perl_stdchar + "'"
2952$ WC "d_unlink_all_versions='" + perl_d_unlink_all_versions + "'"
2953$ WC "full_sed='" + perl_full_sed + "'"
2954$ WC "bin='" + perl_bin + "'"
2955$ WC "binexp='" + perl_binexp + "'"
2956$ WC "d_alarm='" + perl_d_alarm + "'"
2957$ WC "d_casti32='" + perl_d_casti32 + "'"
2958$ WC "d_chown='" + perl_d_chown + "'"
2959$ WC "d_chroot='" + perl_d_chroot + "'"
2960$ WC "d_cuserid='" + perl_d_cuserid + "'"
2961$ WC "d_dbl_dig='" + perl_d_dbl_dig + "'"
2962$ WC "d_difftime='" + perl_d_difftime + "'"
2963$ WC "d_fork='" + perl_d_fork + "'"
2964$ WC "d_getlogin='" + perl_d_getlogin + "'"
2965$ WC "d_getppid='" + perl_d_getppid + "'"
2966$ WC "d_htonl='" + perl_d_htonl + "'"
2967$ WC "d_nice='" + perl_d_nice + "'"
2968$ WC "d_pause='" + perl_d_pause + "'"
2969$ WC "d_pipe='" + perl_d_pipe + "'"
2970$ WC "d_readlink='" + perl_d_readlink + "'"
2971$ WC "d_setlinebuf='" + perl_d_setlinebuf + "'"
2972$ WC "d_strchr='" + perl_d_strchr + "'"
2973$ WC "d_index='" + perl_d_index + "'"
2974$ WC "d_strtod='" + perl_d_strtod + "'"
2975$ WC "d_strtol='" + perl_d_strtol + "'"
2976$ WC "d_strtoul='" + perl_d_strtoul + "'"
2977$ WC "d_tcgetpgrp='" + perl_d_tcgetpgrp + "'"
2978$ WC "d_tcsetpgrp='" + perl_d_tcsetpgrp + "'"
2979$ WC "d_times='" + perl_d_times + "'"
2980$ WC "d_tzname='" + perl_d_tzname + "'"
2981$ WC "d_umask='" + perl_d_umask + "'"
2982$ WC "fpostype='" + perl_fpostype + "'"
2983$ WC "i_dlfcn='" + perl_i_dlfcn + "'"
2984$ WC "i_float='" + perl_i_float + "'"
2985$ WC "i_math='" + perl_i_math + "'"
2986$ WC "intsize='" + perl_intsize + "'"
2987$ WC "longsize='" + perl_longsize + "'"
2988$ WC "shortsize='" + perl_shortsize + "'"
2989$ WC "lseektype='" + perl_lseektype + "'"
2990$ WC "i_values='" + perl_i_values + "'"
2991$ WC "malloctype='" + perl_malloctype + "'"
2992$ WC "freetype='" + perl_freetype + "'"
2993$ WC "d_mymalloc='" + perl_d_mymalloc + "'"
2994$ WC "sh='" + perl_sh + "'"
2995$ WC "sig_name='" + perl_sig_name + "'"
2996$ WC "sig_num='" + perl_sig_num + "'"
2997$ tempsym = "sig_name_init='" + perl_sig_name_with_commas + "'"
2998$ WC/symbol tempsym
2999$ WC "modetype='" + perl_modetype + "'"
3000$ WC "ssizetype='" + perl_ssizetype + "'"
3001$ WC "o_nonblock='" + perl_o_nonblock + "'"
3002$ WC "eagain='" + perl_eagain + "'"
3003$ WC "rd_nodata='" + perl_rd_nodata + "'"
3004$ WC "d_eofnblk='" + perl_d_eofnblk + "'"
3005$ WC "d_oldarchlib='" + perl_d_oldarchlib + "'"
3006$ WC "oldarchlibexp='" + perl_oldarchlibexp + "'"
3007$ WC "oldarchlib='" + perl_oldarchlib + "'"
3008$ WC "privlibexp='" + perl_privlibexp + "'"
3009$ WC "privlib='" + perl_privlib + "'"
3010$ WC "sitelibexp='" + perl_sitelibexp + "'"
3011$ WC "sitelib='" + perl_sitelib + "'"
3012$ WC "sitearchexp='" + perl_sitearchexp + "'"
3013$ WC "sitearch='" + perl_sitearch + "'"
3014$ WC "sizetype='" + perl_sizetype + "'"
3015$ WC "i_sysparam='" + perl_i_sysparam + "'"
3016$ WC "d_void_closedir='" + perl_d_void_closedir + "'"
3017$ WC "d_dlerror='" + perl_d_dlerror + "'"
3018$ WC "d_dlsymun='" + perl_d_dlsymun + "'"
3019$ WC "d_suidsafe='" + perl_d_suidsafe + "'"
3020$ WC "d_dosuid='" + perl_d_dosuid + "'"
3021$ WC "d_inetaton='" + perl_d_inetaton + "'"
3022$ WC "d_isascii='" + perl_d_isascii + "'"
3023$ WC "d_mkfifo='" + perl_d_mkfifo + "'"
3024$ WC "d_pathconf='" + perl_d_pathconf + "'"
3025$ WC "d_fpathconf='" + perl_d_fpathconf + "'"
3026$ WC "d_safebcpy='" + perl_d_safebcpy + "'"
3027$ WC "d_safemcpy='" + perl_d_safemcpy + "'"
3028$ WC "d_sanemcmp='" + perl_d_sanemcmp + "'"
3029$ WC "d_setpgrp='" + perl_d_setpgrp + "'"
3030$ WC "d_bsdsetpgrp='" + perl_d_bsdsetpgrp + "'"
3031$ WC "d_bsdpgrp='" + perl_d_bsdpgrp + "'"
3032$ WC "d_setpgid='" + perl_d_setpgid + "'"
3033$ WC "d_setpgrp2='" + perl_d_setpgrp2 + "'"
3034$ WC "d_sysconf='" + perl_d_sysconf + "'"
3035$ WC "d_Gconvert='" + perl_d_Gconvert + "'"
3036$ WC "d_getpgid='" + perl_d_getpgid + "'"
3037$ WC "d_getpgrp='" + perl_d_getpgrp + "'"
3038$ WC "d_bsdgetpgrp='" + perl_d_bsdgetpgrp + "'"
3039$ WC "d_getpgrp2='" + perl_d_getpgrp2 + "'"
3040$ WC "d_sfio='" + perl_d_sfio + "'"
3041$ WC "d_sigsetjmp='" + perl_d_sigsetjmp + "'"
3042$ WC "usedl='" + perl_usedl + "'"
b6e4eeb2 3043$ WC "startperl=" + perl_startperl ! This one's special--no enclosing single quotes
97abc6ad 3044$ WC "db_hashtype='" + perl_db_hashtype + "'"
3045$ WC "db_prefixtype='" + perl_db_prefixtype + "'"
3046$ WC "useperlio='" + perl_useperlio + "'"
3047$ WC "defvoidused='" + perl_defvoidused + "'"
3048$ WC "voidflags='" + perl_voidflags + "'"
3049$ WC "d_eunice='" + perl_d_eunice + "'"
3050$ WC "libs='" + perl_libs + "'"
3051$ WC "libc='" + perl_libc + "'"
cceca5ed 3052$ tempstring = "PERL_VERSION='" + "''perl_patchlevel'" + "'"
3053$ WC tempstring
3054$ tempstring = "PERL_SUBVERSION='" + "''perl_patchlevel'" + "'"
3055$ WC tempstring
97abc6ad 3056$ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'"
3057$ WC tempstring
3058$ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'"
3059$ WC tempstring
3060$ WC "pager='" + perl_pager + "'"
3061$ WC "uidtype='" + perl_uidtype + "'"
3062$ WC "gidtype='" + perl_gidtype + "'"
3063$ WC "usethreads='" + perl_usethreads + "'"
3064$ WC "d_pthread_yield='" + perl_d_pthread_yield + "'"
3065$ WC "d_pthreads_created_joinable='" + perl_d_pthreads_created_joinable + "'"
3066$ WC "d_gnulibc='" + perl_d_gnulibc + "'"
3067$ WC "i_netdb='" + perl_i_netdb + "'"
3068$ WC "pidtype='" + perl_pidtype + "'"
3069$ WC "netdb_host_type='" + perl_netdb_host_type + "'"
3070$ WC "netdb_hlen_type='" + perl_netdb_hlen_type + "'"
3071$ WC "netdb_name_type='" + perl_netdb_name_type + "'"
3072$ WC "netdb_net_type='" + perl_netdb_net_type + "'"
3073$ WC "baserev='" + perl_baserev + "'"
3074$ WC "doublesize='" + perl_doublesize + "'"
3075$ WC "ptrsize='" + perl_ptrsize + "'"
3076$ WC "d_gethbyaddr='" + perl_d_gethbyaddr + "'"
3077$ WC "d_gethbyname='" + perl_d_gethbyname + "'"
3078$ WC "d_getnbyaddr='" + perl_d_getnbyaddr + "'"
3079$ WC "d_getnbyname='" + perl_d_getnbyname + "'"
3080$ WC "d_getpbynumber='" + perl_d_getpbynumber + "'"
3081$ WC "d_getpbyname='" + perl_d_getpbyname + "'"
3082$ WC "d_getsbyport='" + perl_d_getsbyport + "'"
3083$ WC "d_getsbyname='" + perl_d_getsbyname + "'"
3084$ WC "d_sethent='" + perl_d_sethent + "'"
3085$ WC "d_oldpthreads='" + perl_d_oldpthreads + "'"
3086$ WC "d_longdbl='" + perl_d_longdbl + "'"
3087$ WC "longdblsize='" + perl_longdblsize + "'"
3088$ WC "d_longlong='" + perl_d_longlong + "'"
3089$ WC "longlongsize='" + perl_longlongsize + "'"
3090$ WC "d_mkstemp='" + perl_d_mkstemp + "'"
3091$ WC "d_setvbuf='" + perl_d_setvbuf + "'"
cc391245 3092$ WC "d_setenv='" + perl_d_setenv + "'"
97abc6ad 3093$ WC "d_endhent='" + perl_d_endhent + "'"
3094$ WC "d_endnent='" + perl_d_endsent + "'"
3095$ WC "d_endpent='" + perl_d_endpent + "'"
3096$ WC "d_endsent='" + perl_d_endsent + "'"
3097$ WC "d_gethent='" + perl_d_gethent + "'"
3098$ WC "d_getnent='" + perl_d_getsent + "'"
3099$ WC "d_getpent='" + perl_d_getpent + "'"
3100$ WC "d_getsent='" + perl_d_getsent + "'"
3101$ WC "d_sethent='" + perl_d_sethent + "'"
3102$ WC "d_setnent='" + perl_d_setsent + "'"
3103$ WC "d_setpent='" + perl_d_setpent + "'"
9ef4b0a6 3104$ WC "ebcdic='" + perl_ebcdic + "'"
97abc6ad 3105$ WC "d_setsent='" + perl_d_setsent + "'"
3106$ WC "d_gethostprotos='" + perl_d_gethostprotos + "'"
3107$ WC "d_getnetprotos='" + perl_d_getnetprotos + "'"
3108$ WC "d_getprotoprotos='" + perl_d_getprotoprotos + "'"
3109$ WC "d_getservprotos='" + perl_d_getservprotos + "'"
3110$ WC "d_pwgecos='" + perl_d_pwgecos + "'"
b6e4eeb2 3111$ WC "d_sched_yield='" + perl_d_sched_yield + "'"
3112$ WC "d_lchown='" + perl_d_lchown + "'"
3113$ WC "d_union_semun='" + perl_d_union_semun + "'"
93341792 3114$ WC "i_arpainet='" + perl_i_arpainet + "'"
28e8609d 3115$ WC "d_grpasswd='" + perl_d_grpasswd + "'"
3116$ WC "d_setgrent='" + perl_d_setgrent + "'"
3117$ WC "d_getgrent='" + perl_d_getgrent + "'"
3118$ WC "d_endgrent='" + perl_d_endgrent + "'"
b6e4eeb2 3119$ WC "d_pwpasswd='" + perl_d_pwpasswd + "'"
3120$ WC "d_setpwent='" + perl_d_setpwent + "'"
3121$ WC "d_getpwent='" + perl_d_getpwent + "'"
3122$ WC "d_endpwent='" + perl_d_endpwent + "'"
97abc6ad 3123$ WC "d_semctl_semun='" + perl_d_semctl_semun + "'"
3124$ WC "d_semctl_semid_ds='" + perl_d_semctl_semid_ds + "'"
3125$ WC "extensions='" + perl_extensions + "'"
c05f8f3d 3126$ WC "d_mknod='" + perl_d_mknod + "'"
3127$ WC "devtype='" + perl_devtype + "'"
3937c24e 3128$ WC "d_gethname='" + perl_d_gethname + "'"
3129$ WC "d_phostname='" + perl_d_phostname + "'"
3130$ WC "d_accessx='" + perl_d_accessx + "'"
3131$ WC "d_eaccess='" + perl_d_eaccess + "'"
3132$ WC "i_sysaccess='" + perl_i_sysaccess + "'"
3133$ WC "i_syssecrt='" + perl_i_syssecrt + "'"
3134$ WC "d_fd_set='" + perl_d_fd_set + "'"
3135$ WC "d_access='" + perl_d_access + "'"
3136$ WC "d_msg_ctrunc='" + perl_d_msg_ctrunc + "'"
3137$ WC "d_msg_dontroute='" + perl_d_msg_dontroute + "'"
3138$ WC "d_msg_oob='" + perl_d_msg_oob + "'"
3139$ WC "d_msg_peek='" + perl_d_msg_peek + "'"
3140$ WC "d_msg_proxy='" + perl_d_msg_proxy + "'"
3141$ WC "d_scm_rights='" + perl_d_scm_rights + "'"
3142$ WC "d_sendmsg='" + perl_d_sendmsg + "'"
3143$ WC "d_recvmsg='" + perl_d_recvmsg + "'"
3144$ WC "d_msghdr_s='" + perl_d_msghdr_s + "'"
3145$ WC "d_cmsghdr_s='" + perl_d_cmsghdr_s + "'"
3146$ WC "i_sysuio='" + perl_i_sysuio + "'"
3147$ WC "d_fseeko='" + perl_d_fseeko + "'"
3148$ WC "d_ftello='" + perl_d_ftello + "'"
3149$ WC "d_readv='" + perl_d_readv + "'"
3150$ WC "d_writev='" + perl_d_writev + "'"
3151$ WC "i_machcthr='" + perl_i_machcthr + "'"
3152$ WC "usemultiplicity='" + perl_usemultiplicity + "'"
3153$ WC "d_dbminit64='" + perl_d_dbminit64 + "'"
3154$ WC "d_dbmclose64='" + perl_d_dbmclose64 + "'"
3155$ WC "d_fetch64='" + perl_d_fetch64 + "'"
3156$ WC "d_store64='" + perl_d_store64 + "'"
3157$ WC "d_delete64='" + perl_d_delete64 + "'"
3158$ WC "d_firstkey64='" + perl_d_firstkey64 + "'"
3159$ WC "d_nextkey64='" + perl_d_nextkey64 + "'"
3160$ WC "i_poll='" + perl_i_poll + "'"
3161$ WC "i_inttypes='" + perl_i_inttypes + "'"
3162$ WC "d_int64t='" + perl_d_int64t + "'"
3163$ WC "d_off64t='" + perl_d_off64t + "'"
3164$ WC "d_fstat64='" + perl_d_fstat64 + "'"
3165$ WC "d_ftruncate64='" + perl_d_ftruncate64 + "'"
3166$ WC "d_lseek64='" + perl_d_lseek64 + "'"
3167$ WC "d_lstat64='" + perl_d_lstat64 + "'"
3168$ WC "d_open64='" + perl_d_open64 + "'"
3169$ WC "d_opendir64='" + perl_d_opendir64 + "'"
3170$ WC "d_readdir64='" + perl_d_readdir64 + "'"
3171$ WC "d_seekdir64='" + perl_d_seekdir64 + "'"
3172$ WC "d_stat64='" + perl_d_stat64 + "'"
3173$ WC "d_telldir64='" + perl_d_telldir64 + "'"
3174$ WC "d_truncate64='" + perl_d_truncate64 + "'"
3175$ WC "d_dirent64_s='" + perl_d_dirent64_s + "'"
3176$ WC "use64bits='" + perl_use64bits + "'"
3177$ WC "d_fgetpos64='" + perl_d_fgetpos64 + "'"
3178$ WC "d_fopen64='" + perl_d_fopen64 + "'"
3179$ WC "d_freopen64='" + perl_d_freopen64 + "'"
3180$ WC "d_fseek64='" + perl_d_fseek64 + "'"
3181$ WC "d_fseeko64='" + perl_d_fseeko64 + "'"
3182$ WC "d_fsetpos64='" + perl_d_fsetpos64 + "'"
3183$ WC "d_ftell64='" + perl_d_ftell64 + "'"
3184$ WC "d_ftello64='" + perl_d_ftello64 + "'"
3185$ WC "d_tmpfile64='" + perl_d_tmpfile64 + "'"
3186$ WC "d_drand48proto='" + perl_d_drand48proto + "'"
a12fb911 3187$ WC "d_old_pthread_create_joinable='" + perl_d_old_pthread_create_joinable + "'"
3188$ WC "old_pthread_create_joinable='" + perl_old_pthread_create_joinable + "'"
3937c24e 3189$ WC "drand01='" + perl_drand01 + "'"
3190$ WC "randseedtype='" + perl_randseedtype + "'"
3191$ WC "seedfunc='" + perl_seedfunc + "'"
3192$ WC "sig_num_init='" + perl_sig_num_with_commas + "'"
953103e7 3193$ WC "i_sysmount='" + perl_i_sysmount + "'"
3194$ WC "d_fstatfs='" + perl_d_fstatfs + "'"
3195$ WC "d_statfsflags='" + perl_d_statfsflags + "'"
3196$ WC "i_sysstatvfs='" + perl_i_sysstatvfs + "'"
c2da85ba 3197$ WC "i_machcthreads='" + perl_i_machcthreads + "'"
3198$ WC "i_pthread='" + perl_i_pthread + "'"
13789a15 3199$ WC "d_fstatvfs='" + perl_d_fstatvfs + "'"
953103e7 3200$ WC "i_mntent='" + perl_i_mntent + "'"
3201$ WC "d_getmntent='" + perl_d_getmntent + "'"
3202$ WC "d_hasmntopt='" + perl_d_hasmntopt + "'"
cb86ce0e 3203$ WC "d_telldirproto='" + perl_d_telldirproto + "'"
9ecfa05e 3204$ WC "d_madvise='" + perl_d_madvise + "'"
3205$ WC "d_msync='" + perl_d_msync + "'"
3206$ WC "d_mprotect='" + perl_d_mprotect + "'"
3207$ WC "d_munmap='" + perl_d_munmap + "'"
3208$ WC "d_mmap='" + perl_d_mmap + "'"
3209$ WC "i_sysmman='" + perl_i_sysmman + "'"
a12fb911 3210$ WC "installusrbinperl='" + perl_installusrbinperl + "'"
d31f3823 3211$ WC "crosscompile='" + perl_crosscompile + "'"
a12fb911 3212$ WC "multiarch='" + perl_multiarch + "'"
97abc6ad 3213$!
9ef4b0a6 3214$! ##WRITE NEW CONSTANTS HERE##
3215$!
97abc6ad 3216$ Close CONFIGSH
3217$
3218$! Okay, we've gotten here. Build munchconfig and run it
9ef4b0a6 3219$ 'Perl_CC' munchconfig.c
97abc6ad 3220$ If (Needs_Opt.eqs."Yes")
3221$ THEN
3222$ open/write OPTCHAN []munchconfig.opt
3223$ IF ("''using_gnu_c'".eqs."Yes")
3224$ THEN
3225$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
3226$ endif
3227$ write OPTCHAN "Sys$Share:VAXCRTL/Share"
3228$ Close OPTCHAN
9ef4b0a6 3229$ link munchconfig.obj,munchconfig.opt/opt
97abc6ad 3230$ delete munchconfig.opt;*
3231$ else
9ef4b0a6 3232$ link munchconfig.obj
97abc6ad 3233$ endif
cc391245 3234$ echo ""
3235$ echo "Writing config.h"
429a5e67 3236$ !
3237$ ! we need an fdl file
3238$ CREATE [-]CONFIG.FDL
3239RECORD
3240 FORMAT STREAM_LF
3241$ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
3242$ ! First spit out the header info with the local defines (to get
3243$ ! around the 255 character command line limit)
3244$ OPEN/APPEND CONFIG [-]config.local
3245$ if use_debugging_perl.eqs."Y"
3246$ THEN
3247$ WRITE CONFIG "#define DEBUGGING"
3248$ ENDIF
429a5e67 3249$ if use_two_pot_malloc.eqs."Y"
3250$ THEN
3251$ WRITE CONFIG "#define TWO_POT_OPTIMIZE"
3252$ endif
3253$ if mymalloc.eqs."Y"
3254$ THEN
3255$ WRITE CONFIG "#define EMBEDMYMALLOC"
3256$ ENDIF
3257$ if use_pack_malloc.eqs."Y"
3258$ THEN
3259$ WRITE CONFIG "#define PACK_MALLOC"
3260$ endif
3261$ if use_debugmalloc.eqs."Y"
3262$ THEN
3263$ write config "#define DEBUGGING_MSTATS"
3264$ ENDIF
3265$ if "''Using_Gnu_C'" .eqs."Yes"
3266$ THEN
3267$ WRITE CONFIG "#define GNUC_ATTRIBUTE_CHECK"
3268$ ENDIF
3269$ if "''Has_Dec_C_Sockets'".eqs."T"
3270$ THEN
3271$ WRITE CONFIG "#define VMS_DO_SOCKETS"
3272$ WRITE CONFIG "#define DECCRTL_SOCKETS"
3273$ ENDIF
3274$ if "''Has_Socketshr'".eqs."T"
3275$ THEN
3276$ WRITE CONFIG "#define VMS_DO_SOCKETS"
3277$ ENDIF
cc391245 3278$! This is VMS-specific for now
3279$ WRITE CONFIG "#''perl_d_setenv' HAS_SETENV"
3280$ if d_alwdeftype.eqs."Y"
3281$ THEN
3282$ WRITE CONFIG "#define SECURE_INTERNAL_GETENV"
3283$ ELSE
3284$ WRITE CONFIG "#undef SECURE_INTERNAL_GETENV"
3285$ ENDIF
3286$ if d_secintgenv.eqs."Y"
3287$ THEN
3288$ WRITE CONFIG "#define ALWAYS_DEFTYPES"
3289$ ELSE
3290$ WRITE CONFIG "#undef ALWAYS_DEFTYPES"
3291$ ENDIF
3292$ WRITE CONFIG "#define HAS_ENVGETENV"
429a5e67 3293$ CLOSE CONFIG
3294$!
3295$! Now build the normal config.h
3296$ define/user sys$output [-]config.main
97abc6ad 3297$ mcr []munchconfig [-]config.sh [-]config_h.sh
429a5e67 3298$ ! Concatenate them together
3299$ copy [-]config.local,[-]config.main [-]config.h
3300$! Clean up
3301$ DELETE/NOLOG [-]CONFIG.MAIN;*
3302$ DELETE/NOLOG [-]CONFIG.LOCAL;*
3303$ DELETE/NOLOG [-]CONFIG.FDL;*
3304$!
97abc6ad 3305$ if "''Using_Dec_C'" .eqs."Yes"
3306$ THEN
3307$ DECC_REPLACE = "DECC=decc=1"
3308$ ELSE
3309$ DECC_REPLACE = "DECC="
3310$ ENDIF
3311$ if "''Using_Gnu_C'" .eqs."Yes"
3312$ THEN
3313$ GNUC_REPLACE = "GNUC=gnuc=1"
3314$ ELSE
3315$ GNUC_REPLACE = "GNUC="
3316$ ENDIF
3317$ if "''Has_Dec_C_Sockets'" .eqs."T"
3318$ THEN
3319$ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
3320$ ELSE
3321$ if "''Has_Socketshr'" .eqs."T"
3322$ THEN
e6df7ed1 3323$ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
97abc6ad 3324$ ELSE
3325$ SOCKET_REPLACE = "SOCKET="
3326$ ENDIF
3327$ ENDIF
3328$ IF ("''Use_Threads'".eqs."T")
3329$ THEN
3330$ if ("''VMS_VER'".LES."6.2")
3331$ THEN
3332$ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
3333$ ELSE
3334$ THREAD_REPLACE = "THREAD=THREADED=1"
3335$ ENDIF
429a5e67 3336$ ELSE
3337$ THREAD_REPLACE = "THREAD="
3338$ ENDIF
3339$ if mymalloc.eqs."Y"
3340$ THEN
3341$ MALLOC_REPLACE = "MALLOC=MALLOC=1"
3342$ ELSE
3343$ MALLOC_REPLACE = "MALLOC="
97abc6ad 3344$ ENDIF
3345$ if f$getsyi("HW_MODEL").ge.1024
3346$ THEN
3347$ ARCH_TYPE = "ARCH-TYPE=__AXP__"
3348$ ELSE
3349$ ARCH_TYPE = "ARCH-TYPE=__VAX__"
3350$ ENDIF
cc391245 3351$ echo "Writing DESCRIP.MMS"
97abc6ad 3352$!set ver
3353$ define/user sys$output [-]descrip.mms
85988417 3354$ mcr []munchconfig [-]config.sh descrip_mms.template "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'" "PV=''LocalPerlVer'"
cc391245 3355$ echo "Extracting Build_Ext.Com"
3356$ Create Sys$Disk:[-]Build_Ext.Com
3357$ Deck/Dollar="$EndOfTpl$"
3358$!++ Build_Ext.Com
3359$! NOTE: This files is extracted as part of the VMS configuration process.
3360$! Any changes made to it directly will be lost. If you need to make any
3361$! changes, please edit the template in [.vms]SubConfigure.Com instead.
3362$ def = F$Environment("Default")
3363$ exts1 = F$Edit(p1,"Compress")
3364$ p2 = F$Edit(p2,"Upcase,Compress,Trim")
3365$ If F$Locate("MCR ",p2).eq.0 Then p2 = F$Extract(3,255,p2)
3366$ miniperl = "$" + F$Search(F$Parse(p2,".Exe"))
3eeba6fb 3367$ makeutil = p3
3368$ if f$type('p3') .nes. "" then makeutil = 'p3'
cc391245 3369$ targ = F$Edit(p4,"Lowercase")
3370$ i = 0
3371$ next_ext:
3372$ ext = F$Element(i," ",p1)
3373$ If ext .eqs. " " Then Goto done
3374$ Define/User Perl_Env_Tables CLISYM_LOCAL
3375$ miniperl
3376 ($extdir = $ENV{'ext'}) =~ s/::/./g;
3377 if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
3378 else { $extdir = ".ext.$extdir"; }
3379 ($ENV{'extdir'} = "[$extdir]");
3380 ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
3381$ Set Default &extdir
3382$ redesc = 0
3383$ If F$Locate("clean",targ) .eqs. F$Length(targ)
3384$ Then
3385$ Write Sys$Output "Building ''ext' . . ."
3386$ On Error Then Goto done
3387$ If F$Search("Descrip.MMS") .eqs. ""
3388$ Then
3389$ redesc = 1
3390$ Else
3391$ If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. -
3392 F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1
3393$ EndIf
3394$ Else
3395$ Write Sys$Output "''targ'ing ''ext' . . ."
3396$ On Error Then Continue
3397$ EndIf
3398$ If redesc Then -
3399 miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]"
3eeba6fb 3400$ makeutil 'targ'
cc391245 3401$ i = i + 1
3402$ Set Def &def
3403$ Goto next_ext
3404$ done:
3405$ sts = $Status
3406$ Set Def &def
3407$ Exit sts
3408$!-- Build_Ext.Com
3409$EndOfTpl$
3410$
97abc6ad 3411$! set nover
3412$!
3413$! Clean up after ourselves
3414$ delete/nolog munchconfig.exe;*
3415$ delete/nolog munchconfig.obj;*