applied patch, with tweak suggested by Michael Parker
[p5sagit/p5-mst-13.2.git] / vms / subconfigure.com
CommitLineData
97abc6ad 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 "" + "
33$ Dec_C_Version := "''Dec_C_Version'"
34$ Dec_C_Version = Dec_C_Version + 0
35$ Vms_Ver := "''f$extract(1,3, f$getsyi(""version""))'"
36$ perl_extensions := "''extensions'"
429a5e67 37$ if f$length(Mcc) .eq. 0 then Mcc := "cc"
38$ MCC = f$edit(mcc, "UPCASE")
39$ IF Mcc.eqs."CC
40$ THEN
41$ C_Compiler_Replace := "CC="
42$ ELSE
43$ C_Compiler_Replace := "CC=CC=''Mcc'"
44$ ENDIF
97abc6ad 45$ if "''Using_Dec_C'" .eqs. "Yes"
46$ THEN
47$ Checkcc := "''Mcc'/prefix=all"
48$ ELSE
49$ Checkcc := "''Mcc'"
50$ ENDIF
51$ cc_flags = ""
97abc6ad 52$! Some constant defaults.
53$
54$ hwname = f$getsyi("HW_NAME")
55$ myname = myhostname
56$ if "''myname'" .eqs. "" THEN myname = f$trnlnm("SYS$NODE")
9ef4b0a6 57$!
58$! ##ADD NEW CONSTANTS HERE##
97abc6ad 59$ perl_package="''package'"
60$ perl_baserev = "''baserev'"
429a5e67 61$ cc_defines=""
97abc6ad 62$ perl_CONFIG="true"
63$ perl_i_netdb="undef"
64$ perl_d_gnulibc="undef"
65$ perl_cf_by="unknown"
66$ perl_ccdlflags=""
67$ perl_cccdlflags=""
68$ perl_mab=""
69$ perl_libpth="/sys$share /sys$library"
70$ perl_ld="Link"
71$ perl_lddlflags="/Share"
72$ perl_ranlib=""
73$ perl_ar=""
74$ perl_eunicefix=":"
75$ perl_hint="none"
93341792 76$ perl_i_arpainet="undef"
b6e4eeb2 77$ perl_d_grpasswd="undef"
78$ perl_d_setgrent="undef"
79$ perl_d_getgrent="define"
80$ perl_d_endgrent="define"
81$ perl_d_pwpasswd="define"
82$ perl_d_setpwent="define"
83$ perl_d_getpwent="define"
84$ perl_d_endpwent="define"
9ef4b0a6 85$ perl_ebcdic="undef"
97abc6ad 86$ perl_hintfile=""
87$ perl_shrplib="define"
88$ perl_usemymalloc=mymalloc
89$ perl_usevfork="true"
90$ perl_useposix="false"
91$ perl_spitshell="write sys$output "
92$ perl_dlsrc="dl_vms.c"
93$ perl_man1ext="rno"
94$ perl_man3ext="rno"
95$ perl_prefix="perl_root"
96$ perl_binexp="''perl_prefix':[000000]"
97$ perl_builddir="''perl_prefix':[000000]"
98$ perl_installbin="''perl_prefix':[000000]"
99$ perl_installscript="''perl_prefix':[000000]"
100$ perl_installman1dir="''perl_prefix':[man.man1]"
101$ perl_installman3dir="''perl_prefix':[man.man3]"
102$ perl_installprivlib="''perl_prefix':[lib]"
103$ perl_installsitelib="''perl_prefix':[lib.site_perl]"
104$ perl_path_sep="|"
105$ perl_cc=Mcc
106$ perl_d_sockpair="undef"
107$ perl_i_neterrno="define"
108$ perl_ldflags="/NoTrace/NoMap"
109$ perl_d_lchown="undef"
c05f8f3d 110$ perl_d_mknod="undef"
97abc6ad 111$ perl_d_union_semun="undef"
112$ perl_d_semctl_semun="undef"
113$ perl_d_semctl_semid_ds="undef"
114$ IF (sharedperl.EQS."Y")
115$ THEN
116$ perl_obj_ext=".abj"
117$ perl_so="axe"
118$ perl_dlext="axe"
119$ perl_exe_ext=".axe"
120$ perl_lib_ext=".alb"
121$ ELSE
122$ perl_obj_ext=".obj"
123$ perl_so="exe"
124$ perl_dlext="exe"
125$ perl_exe_ext=".exe"
126$ perl_lib_ext=".olb"
127$ENDIF
128$ perl_dlobj="dl_vms''perl_obj_ext'"
129$ perl_osname="VMS"
130$ perl_d_archlib="define"
131$ perl_d_bincompat3="undef"
132$ perl_cppstdin="''Perl_CC'/noobj/preprocess=sys$output sys$input"
133$ perl_cppminus=""
134$ perl_d_castneg="define"
135$ perl_castflags="0"
136$ perl_d_chsize="undef"
137$ perl_d_const="define"
138$ perl_d_crypt="define"
139$ perl_byteorder="1234"
140$ perl_full_csh=""
141$ perl_d_csh="undef"
142$ perl_d_dup2="define"
143$ perl_d_fchmod="undef"
144$ perl_d_fchown="undef"
145$ perl_d_fcntl="undef"
146$ perl_d_fgetpos="define"
147$ perl_d_flexfnam="define"
148$ perl_d_flock="undef"
149$ perl_d_fsetpos="define"
150$ perl_d_getgrps="undef"
151$ perl_d_setgrps="undef"
152$ perl_d_getprior="undef"
153$ perl_d_killpg="undef"
154$ perl_d_link="undef"
155$ perl_d_lstat="undef"
156$ perl_d_lockf="undef"
157$ perl_d_memcmp="define"
158$ perl_d_memcpy="define"
159$ perl_d_memmove="define"
160$ perl_d_memset="define"
161$ perl_d_mkdir="define"
162$ perl_d_msg="undef"
163$ perl_d_open3="define"
164$ perl_d_poll="undef"
165$ perl_d_readdir="define"
166$ perl_d_seekdir="define"
167$ perl_d_telldir="define"
168$ perl_d_rewinddir="define"
169$ perl_d_rename="define"
170$ perl_d_rmdir="define"
171$ perl_d_sem="undef"
172$ perl_d_setegid="undef"
173$ perl_d_seteuid="undef"
174$ perl_d_setprior="undef"
175$ perl_d_setregid="undef"
176$ perl_d_setresgid="undef"
177$ perl_d_setreuid="undef"
178$ perl_d_setresuid="undef"
179$ perl_d_setrgid="undef"
180$ perl_d_setruid="undef"
181$ perl_d_setsid="undef"
182$ perl_d_shm="undef"
183$ perl_d_shmatprototype="undef"
184$ perl_d_statblks="undef"
185$ perl_stdio_ptr="((*fp)->_ptr)"
186$ perl_stdio_cnt="((*fp)->_cnt)"
187$ perl_stdio_base="((*fp)->_base)"
188$ perl_stdio_bufsiz="((*fp)->_cnt + (*fp)->_ptr - (*fp)->_base)"
189$ perl_d_strctcpy="define"
190$ perl_d_strerror="define"
191$ perl_d_syserrlst="undef"
192$ perl_d_strerrm="strerror((e),vaxc$errno)"
193$ perl_d_symlink="undef"
194$ perl_d_syscall="undef"
195$ perl_d_system="define"
196$ perl_timetype="time_t"
197$ perl_d_vfork="define"
198$ perl_signal_t="void"
199$ perl_d_volatile="define"
200$ perl_d_vprintf="define"
201$ perl_d_charvspr="undef"
202$ perl_d_waitpid="define"
203$ perl_i_dirent="undef"
204$ perl_d_dirnamlen="define"
205$ perl_direntrytype="struct dirent"
206$ perl_i_fcntl="undef"
207$ perl_i_grp="undef"
208$ perl_i_limits="define"
209$ perl_i_memory="undef"
210$ perl_i_ndbm="undef"
211$ perl_i_stdarg="define"
212$ perl_i_pwd="undef"
213$ perl_d_pwquota="undef"
214$ perl_d_pwage="undef"
215$ perl_d_pwchange="undef"
216$ perl_d_pwclass="undef"
217$ perl_d_pwexpire="undef"
218$ perl_d_pwcomment="define"
219$ perl_i_stddef="define"
220$ perl_i_stdlib="define"
221$ perl_i_string="define"
222$ perl_i_sysdir="undef"
223$ perl_i_sysfile="undef"
224$ perl_i_sysioctl="undef"
225$ perl_i_sysndir="undef"
226$ perl_i_sysresrc="undef"
227$ perl_i_sysselct="undef"
228$ perl_i_dbm="undef"
229$ perl_i_rpcsvcdbm="undef"
230$ perl_i_sfio="undef"
231$ perl_i_sysstat="define"
232$ perl_i_systimes="undef"
233$ perl_i_systypes="define"
234$ perl_i_sysun="undef"
235$ perl_i_syswait="undef"
236$ perl_i_termio="undef"
237$ perl_i_sgtty="undef"
238$ perl_i_termios="undef"
239$ perl_i_time="define"
240$ perl_i_systime="undef"
241$ perl_i_systimek="undef"
cb38e85f 242$! perl_i_unistd="undef"
97abc6ad 243$ perl_i_utime="undef"
244$ perl_i_varargs="undef"
245$ perl_i_vfork="undef"
246$ perl_prototype="define"
247$ perl_randbits="31"
248$ perl_stdchar="char"
249$ perl_d_unlink_all_versions="undef"
250$ perl_full_sed="_NLA0:"
251$ perl_bin="/''perl_prefix'/000000"
252$ perl_binexp="''perl_prefix':[000000]"
253$ perl_d_alarm="define"
254$ perl_d_casti32="define"
255$ perl_d_chown="define"
256$ perl_d_chroot="undef"
257$ perl_d_cuserid="define"
258$ perl_d_dbl_dig="define"
259$ perl_d_difftime="define"
260$ perl_d_fork="undef"
261$ perl_d_getlogin="define"
262$ perl_d_getppid="undef"
263$ perl_d_nice="define"
264$ perl_d_pause="define"
265$ perl_d_pipe="define"
266$ perl_d_readlink="undef"
267$ perl_d_setlinebuf="undef"
268$ perl_d_strchr="define"
269$ perl_d_strtod="define"
270$ perl_d_strtol="define"
271$ perl_d_strtoul="define"
272$ perl_d_tcgetpgrp="undef"
273$ perl_d_tcsetpgrp="undef"
274$ perl_d_times="define"
275$ perl_d_tzname="undef"
276$ perl_d_umask="define"
277$ perl_fpostype="fpos_t"
278$ perl_i_dlfcn="undef"
279$ perl_i_float="define"
280$ perl_i_math="define"
281$ perl_lseektype="int"
282$ perl_i_values="undef"
283$ perl_malloctype="void *"
284$ perl_freetype="void"
285$ if "''mymalloc'".eqs."Y"
286$ THEN
287$ perl_d_mymalloc="define"
288$ ELSE
289$ perl_d_mymalloc="undef"
290$ENDIF
291$ perl_sh="MCR"
292$ perl_modetype="unsigned int"
293$ perl_ssizetype="int"
294$ perl_o_nonblock=""
295$ perl_eagain=""
296$ perl_rd_nodata=""
297$ perl_d_eofnblk="undef"
298$ perl_d_oldarchlib="define"
299$ perl_privlibexp="''perl_prefix':[lib]"
300$ perl_privlib="''perl_prefix':[lib]"
301$ perl_sitelibexp="''perl_prefix':[lib.site_perl]"
302$ perl_sitelib="''perl_prefix':[lib.site_perl]"
303$ perl_sizetype="size_t"
304$ perl_i_sysparam="undef"
305$ perl_d_void_closedir="define"
306$ perl_d_dlerror="undef"
307$ perl_d_dlsymun="undef"
308$ perl_d_suidsafe="undef"
309$ perl_d_dosuid="undef"
310$ perl_d_inetaton="undef"
311$ perl_d_isascii="define"
312$ perl_d_mkfifo="undef"
313$ perl_d_safebcpy="undef"
314$ perl_d_safemcpy="define"
315$ perl_d_sanemcmp="define"
316$ perl_d_setpgrp="undef"
317$ perl_d_bsdsetpgrp="undef"
318$ perl_d_bsdpgrp="undef"
319$ perl_d_setpgid="undef"
320$ perl_d_setpgrp2="undef"
321$ perl_d_Gconvert="my_gconvert(x,n,t,b)"
322$ perl_d_getpgid="undef"
323$ perl_d_getpgrp="undef"
324$ perl_d_bsdgetpgrp="undef"
325$ perl_d_getpgrp2="undef"
326$ perl_d_sfio="undef"
327$ perl_usedl="define"
b6e4eeb2 328$ perl_startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8' !\n$ exit++ + ++$status != 0 and $exit = $status = undef;"""
97abc6ad 329$ perl_db_hashtype=""
330$ perl_db_prefixtype=""
331$ perl_useperlio="undef"
332$ perl_defvoidused="15"
333$ perl_voidflags="15"
334$ perl_d_eunice="undef"
335$ perl_d_pwgecos="define"
336$ IF ("''Use_Threads'".eqs."T").and.("''VMS_VER'".LES."6.2")
337$ THEN
338$ 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"
339$ ELSE
340$ perl_libs=""
341$ ENDIF
342$ IF ("''Using_Dec_C'".eqs."Yes")
343$ THEN
344$ perl_libc="(DECCRTL)"
345$ ELSE
346$ perl_libc=""
347$ ENDIF
348$ perl_PATCHLEVEL="''patchlevel'"
349$ perl_SUBVERSION="''subversion'"
350$ perl_pager="most"
351$!
352$!
353$! Now some that we build up
354$!
355$ LocalTime = f$time()
356$ perl_cf_time= f$extract(0, 3, f$cvtime(LocalTime,, "WEEKDAY")) + " " + -
357 f$edit(f$cvtime(LocalTime, "ABSOLUTE", "MONTH"), "LOWERCASE") + -
358 " " + f$cvtime(LocalTime,, "DAY") + " " + f$cvtime(LocalTime,, "TIME") + -
359 " " + f$cvtime(LocalTime,, "YEAR")
360$ if f$getsyi("HW_MODEL").ge.1024
361$ THEN
362$ perl_arch="VMS_AXP"
363$ perl_archname="VMS_AXP"
364$ perl_alignbytes="8"
365$ ELSE
366$ perl_arch="VMS_VAX"
367$ perl_archname="VMS_VAX"
368$ perl_alignbytes="8"
369$ ENDIF
9ef4b0a6 370$ if ("''Use_Threads'".eqs."T")
371$ THEN
372$ perl_arch = "''perl_arch'-thread"
373$ perl_archname = "''perl_archname'-thread"
374$ ENDIF
97abc6ad 375$ perl_osvers=f$edit(osvers, "TRIM")
376$ LocalPerlVer = "5_" + Perl_PATCHLEVEL + perl_subversion
377$!
378$! Some that we need to invoke the compiler for
379$ OS := "open/write SOURCECHAN []temp.c"
380$ WS := "write SOURCECHAN"
381$ CS := "close SOURCECHAN"
382$ DS := "delete/nolog []temp.*;*"
383$ Needs_Opt := "No"
384$ if ("''using_vax_c'".eqs."Yes").or.("''using_gnu_c'".eqs."Yes")
385$ THEN
386$ open/write OPTCHAN []temp.opt
387$ IF ("''using_gnu_c'".eqs."Yes")
388$ THEN
389$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
390$ endif
391$ write OPTCHAN "Sys$Share:VAXCRTL/Share"
392$ Close OPTCHAN
393$ Needs_Opt := "Yes"
394$ ENDIF
395$!
396$! Check for __STDC__
397$!
398$ OS
399$ WS "#ifdef __DECC
400$ WS "#include <stdlib.h>
401$ WS "#endif
402$ WS "#include <stdio.h>
403$ WS "int main()
404$ WS "{"
405$ WS "#ifdef __STDC__
406$ WS "printf(""42\n"");
407$ WS "#else
408$ WS "printf(""1\n"");
409$ WS "#endif
410$ WS "exit(0);
411$ WS "}"
412$ CS
413$ DEFINE SYS$ERROR _NLA0:
414$ DEFINE SYS$OUTPUT _NLA0:
415$ ON ERROR THEN CONTINUE
416$ ON WARNING THEN CONTINUE
9ef4b0a6 417$ 'Checkcc' temp.c
97abc6ad 418$ If (Needs_Opt.eqs."Yes")
419$ THEN
9ef4b0a6 420$ link temp.obj,temp.opt/opt
97abc6ad 421$ else
9ef4b0a6 422$ link temp.obj
97abc6ad 423$ endif
424$ DEASSIGN SYS$OUTPUT
425$ DEASSIGN SYS$ERROR
426$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
427$ DEFINE SYS$ERROR TEMPOUT
428$ DEFINE SYS$OUTPUT TEMPOUT
429$ mcr []temp
430$ CLOSE TEMPOUT
431$ DEASSIGN SYS$OUTPUT
432$ DEASSIGN SYS$ERROR
433$ OPEN/READ TEMPOUT [-.uu]tempout.lis
434$ READ TEMPOUT line
435$ CLOSE TEMPOUT
436$
437$ perl_cpp_stuff=line
438$ WRITE_RESULT "cpp_stuff is ''perl_cpp_stuff'"
439$!
440$! Check for double size
441$!
442$ OS
443$ WS "#ifdef __DECC
444$ WS "#include <stdlib.h>
445$ WS "#endif
446$ WS "#include <stdio.h>
447$ WS "int main()
448$ WS "{"
429a5e67 449$ WS "int foo;
450$ WS "foo = sizeof(double);
451$ WS "printf(""%d\n"", foo);
97abc6ad 452$ WS "exit(0);
453$ WS "}"
454$ CS
455$ DEFINE SYS$ERROR _NLA0:
456$ DEFINE SYS$OUTPUT _NLA0:
457$ ON ERROR THEN CONTINUE
458$ ON WARNING THEN CONTINUE
9ef4b0a6 459$ 'Checkcc' temp.c
97abc6ad 460$ If (Needs_Opt.eqs."Yes")
461$ THEN
9ef4b0a6 462$ link temp.obj,temp.opt/opt
97abc6ad 463$ else
9ef4b0a6 464$ link temp.obj
97abc6ad 465$ endif
9ef4b0a6 466$! link temp.obj
97abc6ad 467$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
468$ DEASSIGN SYS$OUTPUT
469$ DEASSIGN SYS$ERROR
470$ DEFINE SYS$ERROR TEMPOUT
471$ DEFINE SYS$OUTPUT TEMPOUT
472$ mcr []temp
473$ CLOSE TEMPOUT
474$ DEASSIGN SYS$OUTPUT
475$ DEASSIGN SYS$ERROR
476$ OPEN/READ TEMPOUT [-.uu]tempout.lis
477$ READ TEMPOUT line
478$ CLOSE TEMPOUT
479$
480$ perl_doublesize=line
481$ WRITE_RESULT "doublesize is ''perl_doublesize'"
482$!
483$! Check for long double size
484$!
485$ OS
486$ WS "#ifdef __DECC
487$ WS "#include <stdlib.h>
488$ WS "#endif
489$ WS "#include <stdio.h>
490$ WS "int main()
491$ WS "{"
429a5e67 492$ WS "printf(""%d\n"", sizeof(long double));
97abc6ad 493$ WS "exit(0);
494$ WS "}"
495$ CS
496$ DEFINE SYS$ERROR _NLA0:
497$ DEFINE SYS$OUTPUT _NLA0:
498$ ON ERROR THEN CONTINUE
499$ ON WARNING THEN CONTINUE
9ef4b0a6 500$ 'Checkcc' temp.c
97abc6ad 501$ teststatus = f$extract(9,1,$status)
502$ if (teststatus.nes."1")
503$ THEN
504$ perl_longdblsize="0"
505$ perl_d_longdbl="undef"
506$ ELSE
507$ ON ERROR THEN CONTINUE
508$ ON WARNING THEN CONTINUE
509$ If (Needs_Opt.eqs."Yes")
510$ THEN
9ef4b0a6 511$ link temp.obj,temp.opt/opt
97abc6ad 512$ else
9ef4b0a6 513$ link temp.obj
97abc6ad 514$ endif
515$ teststatus = f$extract(9,1,$status)
516$ DEASSIGN SYS$OUTPUT
517$ DEASSIGN SYS$ERROR
518$ if (teststatus.nes."1")
519$ THEN
520$ perl_longdblsize="0"
521$ perl_d_longdbl="undef"
522$ ELSE
523$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
524$ DEFINE SYS$ERROR TEMPOUT
525$ DEFINE SYS$OUTPUT TEMPOUT
526$ mcr []temp
527$ CLOSE TEMPOUT
528$ DEASSIGN SYS$OUTPUT
529$ DEASSIGN SYS$ERROR
530$ OPEN/READ TEMPOUT [-.uu]tempout.lis
531$ READ TEMPOUT line
532$ CLOSE TEMPOUT
533$
534$ perl_longdblsize=line
535$ perl_d_longdbl="define"
536$ ENDIF
537$ ENDIF
538$ WRITE_RESULT "longdblsize is ''perl_longdblsize'"
539$ WRITE_RESULT "d_longdbl is ''perl_d_longdbl'"
540$!
541$! Check for long long existance and size
542$!
543$ OS
544$ WS "#ifdef __DECC
545$ WS "#include <stdlib.h>
546$ WS "#endif
547$ WS "#include <stdio.h>
548$ WS "int main()
549$ WS "{"
429a5e67 550$ WS "printf(""%d\n"", sizeof(long long));
97abc6ad 551$ WS "exit(0);
552$ WS "}"
553$ CS
554$ DEFINE SYS$ERROR _NLA0:
555$ DEFINE SYS$OUTPUT _NLA0:
556$ on error then continue
557$ on warning then continue
9ef4b0a6 558$ 'Checkcc' temp.c
97abc6ad 559$ If (Needs_Opt.eqs."Yes")
560$ THEN
9ef4b0a6 561$ link temp.obj,temp.opt/opt
97abc6ad 562$ else
9ef4b0a6 563$ link temp.obj
97abc6ad 564$ endif
565$ teststatus = f$extract(9,1,$status)
566$ DEASSIGN SYS$OUTPUT
567$ DEASSIGN SYS$ERROR
568$ if (teststatus.nes."1")
569$ THEN
570$ perl_longlongsize="0"
571$ perl_d_longlong="undef"
572$ ELSE
573$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
574$ DEFINE SYS$ERROR TEMPOUT
575$ DEFINE SYS$OUTPUT TEMPOUT
576$ mcr []temp
577$ CLOSE TEMPOUT
578$ DEASSIGN SYS$OUTPUT
579$ DEASSIGN SYS$ERROR
580$ OPEN/READ TEMPOUT [-.uu]tempout.lis
581$ READ TEMPOUT line
582$ CLOSE TEMPOUT
583$
584$ perl_longlongsize=line
585$ perl_d_longlong="define"
586$ ENDIF
587$ WRITE_RESULT "longlongsize is ''perl_longlongsize'"
588$ WRITE_RESULT "d_longlong is ''perl_d_longlong'"
589$!
590$! Check for int size
591$!
592$ OS
593$ WS "#ifdef __DECC
594$ WS "#include <stdlib.h>
595$ WS "#endif
596$ WS "#include <stdio.h>
597$ WS "int main()
598$ WS "{"
429a5e67 599$ WS "printf(""%d\n"", sizeof(int));
97abc6ad 600$ WS "exit(0);
601$ WS "}"
602$ CS
603$ DEFINE SYS$ERROR _NLA0:
604$ DEFINE SYS$OUTPUT _NLA0:
605$ on error then continue
606$ on warning then continue
9ef4b0a6 607$ 'Checkcc' temp.c
97abc6ad 608$ If (Needs_Opt.eqs."Yes")
609$ THEN
9ef4b0a6 610$ link temp.obj,temp.opt/opt
97abc6ad 611$ else
9ef4b0a6 612$ link temp.obj
97abc6ad 613$ endif
614$ If (Needs_Opt.eqs."Yes")
615$ THEN
9ef4b0a6 616$ link temp.obj,temp.opt/opt
97abc6ad 617$ else
9ef4b0a6 618$ link temp.obj
97abc6ad 619$ endif
620$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
621$ DEASSIGN SYS$OUTPUT
622$ DEASSIGN SYS$ERROR
623$ DEFINE SYS$ERROR TEMPOUT
624$ DEFINE SYS$OUTPUT TEMPOUT
625$ mcr []temp
626$ CLOSE TEMPOUT
627$ DEASSIGN SYS$OUTPUT
628$ DEASSIGN SYS$ERROR
629$ OPEN/READ TEMPOUT [-.uu]tempout.lis
630$ READ TEMPOUT line
631$ CLOSE TEMPOUT
632$
633$ perl_intsize=line
634$ WRITE_RESULT "intsize is ''perl_intsize'"
635$!
636$! Check for short size
637$!
638$ OS
639$ WS "#ifdef __DECC
640$ WS "#include <stdlib.h>
641$ WS "#endif
642$ WS "#include <stdio.h>
643$ WS "int main()
644$ WS "{"
429a5e67 645$ WS "printf(""%d\n"", sizeof(short));
97abc6ad 646$ WS "exit(0);
647$ WS "}"
648$ CS
649$ DEFINE SYS$ERROR _NLA0:
650$ DEFINE SYS$OUTPUT _NLA0:
651$ on error then continue
652$ on warning then continue
9ef4b0a6 653$ 'Checkcc' temp.c
97abc6ad 654$ If (Needs_Opt.eqs."Yes")
655$ THEN
9ef4b0a6 656$ link temp.obj,temp.opt/opt
97abc6ad 657$ else
9ef4b0a6 658$ link temp.obj
97abc6ad 659$ endif
660$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
661$ DEASSIGN SYS$OUTPUT
662$ DEASSIGN SYS$ERROR
663$ DEFINE SYS$ERROR TEMPOUT
664$ DEFINE SYS$OUTPUT TEMPOUT
665$ mcr []temp
666$ CLOSE TEMPOUT
667$ DEASSIGN SYS$OUTPUT
668$ DEASSIGN SYS$ERROR
669$ OPEN/READ TEMPOUT [-.uu]tempout.lis
670$ READ TEMPOUT line
671$ CLOSE TEMPOUT
672$
673$ perl_shortsize=line
674$ WRITE_RESULT "shortsize is ''perl_shortsize'"
675$!
676$! Check for long 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 "int foo;
686$ WS "foo = sizeof(long);
687$ WS "printf(""%d\n"", foo);
97abc6ad 688$ WS "exit(0);
689$ WS "}"
690$ CS
691$ DEFINE SYS$ERROR _NLA0:
692$ DEFINE SYS$OUTPUT _NLA0:
693$ on error then continue
694$ on warning then continue
9ef4b0a6 695$ 'Checkcc' temp.c
97abc6ad 696$ If (Needs_Opt.eqs."Yes")
697$ THEN
9ef4b0a6 698$ link temp.obj,temp.opt/opt
97abc6ad 699$ else
9ef4b0a6 700$ link temp.obj
97abc6ad 701$ endif
702$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
703$ DEASSIGN SYS$OUTPUT
704$ DEASSIGN SYS$ERROR
705$ DEFINE SYS$ERROR TEMPOUT
706$ DEFINE SYS$OUTPUT TEMPOUT
707$ mcr []temp
708$ CLOSE TEMPOUT
709$ DEASSIGN SYS$OUTPUT
710$ DEASSIGN SYS$ERROR
711$ OPEN/READ TEMPOUT [-.uu]tempout.lis
712$ READ TEMPOUT line
713$ CLOSE TEMPOUT
714$
715$ perl_longsize=line
716$ WRITE_RESULT "longsize is ''perl_longsize'"
717$!
718$! Check the prototype for getgid
719$!
720$ OS
721$ WS "#ifdef __DECC
722$ WS "#include <stdlib.h>
723$ WS "#endif
724$ WS "#include <stdio.h>
725$ WS "#include <types.h>
726$ WS "#include <unistd.h>
727$ WS "int main()
728$ WS "{"
729$ WS "gid_t foo;
730$ WS "exit(0);
731$ WS "}"
732$ CS
733$ DEFINE SYS$ERROR _NLA0:
734$ DEFINE SYS$OUTPUT _NLA0:
735$ on error then continue
736$ on warning then continue
9ef4b0a6 737$ 'Checkcc' temp.c
97abc6ad 738$ teststatus = f$extract(9,1,$status)
739$ DEASSIGN SYS$OUTPUT
740$ DEASSIGN SYS$ERROR
741$ if (teststatus.nes."1")
742$ THEN
743$! Okay, gid_t failed. Must be unsigned int
744$ perl_gidtype = "unsigned int"
745$ ELSE
746$ perl_gidtype = "gid_t"
747$ ENDIF
748$ WRITE_RESULT "Gid_t is ''perl_gidtype'"
749$!
cb38e85f 750$! Check to see if we've got dev_t
c05f8f3d 751$!
752$ OS
753$ WS "#ifdef __DECC
754$ WS "#include <stdlib.h>
755$ WS "#endif
756$ WS "#include <stdio.h>
757$ WS "#include <types.h>
758$ WS "#include <unistd.h>
759$ WS "int main()
760$ WS "{"
761$ WS "dev_t foo;
762$ WS "exit(0);
763$ WS "}"
764$ CS
765$ DEFINE SYS$ERROR _NLA0:
766$ DEFINE SYS$OUTPUT _NLA0:
767$ on error then continue
768$ on warning then continue
9ef4b0a6 769$ 'Checkcc' temp.c
c05f8f3d 770$ teststatus = f$extract(9,1,$status)
771$ DEASSIGN SYS$OUTPUT
772$ DEASSIGN SYS$ERROR
773$ if (teststatus.nes."1")
774$ THEN
775$! Okay, dev_t failed. Must be unsigned int
776$ perl_devtype = "unsigned int"
777$ ELSE
778$ perl_devtype = "dev_t"
779$ ENDIF
780$ WRITE_RESULT "Dev_t is ''perl_devtype'"
781$!
cb38e85f 782$! Check to see if we've got unistd.h (which we ought to, but you never know)
783$!
784$ OS
785$ WS "#ifdef __DECC
786$ WS "#include <stdlib.h>
787$ WS "#endif
788$ WS "#include <unistd.h>
789$ WS "int main()
790$ WS "{"
791$ WS "exit(0);
792$ WS "}"
793$ CS
794$ DEFINE SYS$ERROR _NLA0:
795$ DEFINE SYS$OUTPUT _NLA0:
796$ on error then continue
797$ on warning then continue
9ef4b0a6 798$ 'Checkcc' temp.c
cb38e85f 799$ teststatus = f$extract(9,1,$status)
800$ DEASSIGN SYS$OUTPUT
801$ DEASSIGN SYS$ERROR
802$ if (teststatus.nes."1")
803$ THEN
804$! Okay, failed. Must not have it
805$ perl_i_unistd = "undef"
806$ ELSE
807$ perl_i_unistd = "define"
808
809$ ENDIF
810$ WRITE_RESULT "i_unistd is ''perl_i_unistd'"
811$!
97abc6ad 812$! Check the prototype for select
813$!
814$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
815$ THEN
816$ OS
817$ WS "#ifdef __DECC
818$ WS "#include <stdlib.h>
819$ WS "#endif
820$ WS "#include <stdio.h>
821$ WS "#include <types.h>
822$ WS "#include <unistd.h>
823$ if ("''Has_Socketshr'".eqs."T")
824$ THEN
825$ WS "#include <socketshr.h>"
826$ else
827$ WS "#include <time.h>
828$ WS "#include <socket.h>
829$ endif
830$ WS "int main()
831$ WS "{"
832$ WS "fd_set *foo;
833$ WS "int bar;
834$ WS "foo = NULL;
835$ WS "bar = select(2, foo, foo, foo, NULL);
836$ WS "exit(0);
837$ WS "}"
838$ CS
839$ DEFINE SYS$ERROR _NLA0:
840$ DEFINE SYS$OUTPUT _NLA0:
841$ on error then continue
842$ on warning then continue
9ef4b0a6 843$ 'Checkcc' temp.c
97abc6ad 844$ teststatus = f$extract(9,1,$status)
845$ DEASSIGN SYS$OUTPUT
846$ DEASSIGN SYS$ERROR
847$ if (teststatus.nes."1")
848$ THEN
849$! Okay, fd_set failed. Must be an int
850$ perl_selecttype = "int *"
851$ ELSE
852$ perl_selecttype="fd_set *"
853$ ENDIF
854$ ELSE
855$ ! No sockets, so stick in an int *
856$ perl_selecttype = "int *"
857$ ENDIF
858$ WRITE_RESULT "selectype is ''perl_selecttype'"
859$!
860$! Check for bzero
861$!
862$ OS
863$ WS "#ifdef __DECC
864$ WS "#include <stdlib.h>
865$ WS "#endif
866$ WS "#include <stdio.h>
867$ WS "#include <strings.h>
868$ WS "int main()
869$ WS "{"
870$ WS "char foo[10];
871$ WS "bzero(foo, 10);
872$ WS "exit(0);
873$ WS "}"
874$ CS
875$ DEFINE SYS$ERROR _NLA0:
876$ DEFINE SYS$OUTPUT _NLA0:
877$ on error then continue
878$ on warning then continue
9ef4b0a6 879$ 'Checkcc' temp.c
97abc6ad 880$ savedstatus = $status
881$ teststatus = f$extract(9,1,savedstatus)
882$ if (teststatus.nes."1")
883$ THEN
884$ perl_d_bzero="undef"
885$ DEASSIGN SYS$OUTPUT
886$ DEASSIGN SYS$ERROR
887$ ELSE
888$ If (Needs_Opt.eqs."Yes")
889$ THEN
9ef4b0a6 890$ link temp.obj,temp.opt/opt
97abc6ad 891$ else
9ef4b0a6 892$ link temp.obj
97abc6ad 893$ endif
894$ savedstatus = $status
895$ teststatus = f$extract(9,1,savedstatus)
896$ DEASSIGN SYS$OUTPUT
897$ DEASSIGN SYS$ERROR
898$ if (teststatus.nes."1")
899$ THEN
900$ perl_d_bzero="undef"
901$ ELSE
902$ perl_d_bzero="define"
903$ ENDIF
904$ ENDIF
905$ WRITE_RESULT "d_bzero is ''perl_d_bzero'"
906$!
907$! Check for bcopy
908$!
909$ OS
910$ WS "#ifdef __DECC
911$ WS "#include <stdlib.h>
912$ WS "#endif
913$ WS "#include <stdio.h>
914$ WS "#include <strings.h>
915$ WS "int main()
916$ WS "{"
917$ WS "char foo[10], bar[10];
918$ WS "bcopy(""foo"", bar, 3);
919$ WS "exit(0);
920$ WS "}"
921$ CS
922$ DEFINE SYS$ERROR _NLA0:
923$ DEFINE SYS$OUTPUT _NLA0:
924$ on error then continue
925$ on warning then continue
9ef4b0a6 926$ 'Checkcc' temp.c
97abc6ad 927$ savedstatus = $status
928$ teststatus = f$extract(9,1,savedstatus)
929$ if (teststatus.nes."1")
930$ THEN
931$ perl_d_bcopy="undef"
932$ DEASSIGN SYS$OUTPUT
933$ DEASSIGN SYS$ERROR
934$ ELSE
935$ If (Needs_Opt.eqs."Yes")
936$ THEN
9ef4b0a6 937$ link temp.obj,temp.opt/opt
97abc6ad 938$ else
9ef4b0a6 939$ link temp.obj
97abc6ad 940$ endif
941$ savedstatus = $status
942$ teststatus = f$extract(9,1,savedstatus)
943$ DEASSIGN SYS$OUTPUT
944$ DEASSIGN SYS$ERROR
945$ if (teststatus.nes."1")
946$ THEN
947$ perl_d_bcopy="undef"
948$ ELSE
949$ perl_d_bcopy="define"
950$ ENDIF
951$ ENDIF
952$ WRITE_RESULT "d_bcopy is ''perl_d_bcopy'"
953$!
954$! Check for mkstemp
955$!
956$ OS
957$ WS "#ifdef __DECC
958$ WS "#include <stdlib.h>
959$ WS "#endif
960$ WS "#include <stdio.h>
961$ WS "int main()
962$ WS "{"
963$ WS "mkstemp(""foo"");
964$ WS "exit(0);
965$ WS "}"
966$ CS
967$ DEFINE SYS$ERROR _NLA0:
968$ DEFINE SYS$OUTPUT _NLA0:
969$ on error then continue
970$ on warning then continue
9ef4b0a6 971$ 'Checkcc' temp.c
97abc6ad 972$ If (Needs_Opt.eqs."Yes")
973$ THEN
9ef4b0a6 974$ link temp.obj,temp.opt/opt
97abc6ad 975$ else
9ef4b0a6 976$ link temp.obj
97abc6ad 977$ endif
978$ savedstatus = $status
979$ teststatus = f$extract(9,1,savedstatus)
980$ DEASSIGN SYS$OUTPUT
981$ DEASSIGN SYS$ERROR
982$ if (teststatus.nes."1")
983$ THEN
984$ perl_d_mkstemp="undef"
985$ ELSE
986$ perl_d_mkstemp="define"
987$ ENDIF
988$ WRITE_RESULT "d_mkstemp is ''perl_d_mkstemp'"
989$!
990$! Check for setvbuf
991$!
992$ OS
993$ WS "#ifdef __DECC
994$ WS "#include <stdlib.h>
995$ WS "#endif
996$ WS "#include <stdio.h>
997$ WS "int main()
998$ WS "{"
999$ WS "FILE *foo;
1000$ WS "char Buffer[99];
1001$ WS "foo = fopen(""foo"", ""r"");
1002$ WS "setvbuf(foo, Buffer, 0, 0);
1003$ WS "exit(0);
1004$ WS "}"
1005$ CS
1006$ DEFINE SYS$ERROR _NLA0:
1007$ DEFINE SYS$OUTPUT _NLA0:
1008$ on error then continue
1009$ on warning then continue
9ef4b0a6 1010$ 'Checkcc' temp.c
97abc6ad 1011$ If (Needs_Opt.eqs."Yes")
1012$ THEN
9ef4b0a6 1013$ link temp.obj,temp.opt/opt
97abc6ad 1014$ else
9ef4b0a6 1015$ link temp.obj
97abc6ad 1016$ endif
1017$ teststatus = f$extract(9,1,$status)
1018$ DEASSIGN SYS$OUTPUT
1019$ DEASSIGN SYS$ERROR
1020$ if (teststatus.nes."1")
1021$ THEN
1022$ perl_d_setvbuf="undef"
1023$ ELSE
1024$ perl_d_setvbuf="define"
1025$ ENDIF
1026$ WRITE_RESULT "d_setvbuf is ''perl_d_setvbuf'"
1027$!
1028$! Check for <netinet/in.h>
1029$!
1030$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1031$ THEN
1032$ OS
1033$ WS "#ifdef __DECC
1034$ WS "#include <stdlib.h>
1035$ WS "#endif
1036$ WS "#include <stdio.h>
1037$ if ("''Has_Socketshr'".eqs."T")
1038$ THEN
1039$ WS "#include <socketshr.h>"
1040$ else
1041$ WS "#include <netdb.h>
1042$ endif
1043$ WS "#include <netinet/in.h>"
1044$ WS "int main()
1045$ WS "{"
1046$ WS "exit(0);
1047$ WS "}"
1048$ CS
1049$ DEFINE SYS$ERROR _NLA0:
1050$ DEFINE SYS$OUTPUT _NLA0:
1051$ on error then continue
1052$ on warning then continue
9ef4b0a6 1053$ 'Checkcc' temp.c
97abc6ad 1054$ If (Needs_Opt.eqs."Yes")
1055$ THEN
9ef4b0a6 1056$ link temp.obj,temp.opt/opt
97abc6ad 1057$ else
9ef4b0a6 1058$ link temp.obj
97abc6ad 1059$ endif
1060$ teststatus = f$extract(9,1,$status)
1061$ DEASSIGN SYS$OUTPUT
1062$ DEASSIGN SYS$ERROR
1063$ if (teststatus.nes."1")
1064$ THEN
1065$ perl_i_niin="undef"
1066$ ELSE
1067$ perl_i_niin="define"
1068$ ENDIF
1069$ ELSE
1070$ perl_i_niin="undef"
1071$ ENDIF
1072$ WRITE_RESULT "i_niin is ''perl_i_niin'"
1073$!
1074$! Check for endhostent
1075$!
1076$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1077$ THEN
1078$ OS
1079$ WS "#ifdef __DECC
1080$ WS "#include <stdlib.h>
1081$ WS "#endif
1082$ WS "#include <stdio.h>
1083$ if ("''Has_Socketshr'".eqs."T")
1084$ THEN
1085$ WS "#include <socketshr.h>"
1086$ else
1087$ WS "#include <netdb.h>
1088$ endif
1089$ WS "int main()
1090$ WS "{"
1091$ WS "endhostent();
1092$ WS "exit(0);
1093
1094$ CS
1095$ DEFINE SYS$ERROR _NLA0:
1096$ DEFINE SYS$OUTPUT _NLA0:
1097$ on error then continue
1098$ on warning then continue
9ef4b0a6 1099$ 'Checkcc' temp.c
97abc6ad 1100$ If (Needs_Opt.eqs."Yes")
1101$ THEN
9ef4b0a6 1102$ link temp.obj,temp.opt/opt
97abc6ad 1103$ else
9ef4b0a6 1104$ link temp.obj
97abc6ad 1105$ endif
1106$ teststatus = f$extract(9,1,$status)
1107$ DEASSIGN SYS$OUTPUT
1108$ DEASSIGN SYS$ERROR
1109$ if (teststatus.nes."1")
1110$ THEN
1111$ perl_d_endhent="undef"
1112$ ELSE
1113$ perl_d_endhent="define"
1114$ ENDIF
1115$ ELSE
1116$ perl_d_endhent="undef"
1117$ ENDIF
1118$ WRITE_RESULT "d_endhent is ''perl_d_endhent'"
1119$!
1120$! Check for endnetent
1121$!
1122$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1123$ THEN
1124$ OS
1125$ WS "#ifdef __DECC
1126$ WS "#include <stdlib.h>
1127$ WS "#endif
1128$ WS "#include <stdio.h>
1129$ if ("''Has_Socketshr'".eqs."T")
1130$ THEN
1131$ WS "#include <socketshr.h>"
1132$ else
1133$ WS "#include <netdb.h>
1134$ endif
1135$ WS "int main()
1136$ WS "{"
1137$ WS "endnetent();
1138$ WS "exit(0);
1139$ WS "}"
1140$ CS
1141$ DEFINE SYS$ERROR _NLA0:
1142$ DEFINE SYS$OUTPUT _NLA0:
1143$ on error then continue
1144$ on warning then continue
9ef4b0a6 1145$ 'Checkcc' temp.c
97abc6ad 1146$ If (Needs_Opt.eqs."Yes")
1147$ THEN
9ef4b0a6 1148$ link temp.obj,temp.opt/opt
97abc6ad 1149$ else
9ef4b0a6 1150$ link temp.obj
97abc6ad 1151$ endif
1152$ teststatus = f$extract(9,1,$status)
1153$ DEASSIGN SYS$OUTPUT
1154$ DEASSIGN SYS$ERROR
1155$ if (teststatus.nes."1")
1156$ THEN
1157$ perl_d_endnent="undef"
1158$ ELSE
1159$ perl_d_endnent="define"
1160$ ENDIF
1161$ ELSE
1162$ perl_d_endnent="undef"
1163$ ENDIF
1164$ WRITE_RESULT "d_endnent is ''perl_d_endnent'"
1165$!
1166$! Check for endprotoent
1167$!
1168$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1169$ THEN
1170$ OS
1171$ WS "#ifdef __DECC
1172$ WS "#include <stdlib.h>
1173$ WS "#endif
1174$ WS "#include <stdio.h>
1175$ if ("''Has_Socketshr'".eqs."T")
1176$ THEN
1177$ WS "#include <socketshr.h>"
1178$ else
1179$ WS "#include <netdb.h>
1180$ endif
1181$ WS "int main()
1182$ WS "{"
1183$ WS "endprotoent();
1184$ WS "exit(0);
1185$ WS "}"
1186$ CS
1187$ DEFINE SYS$ERROR _NLA0:
1188$ DEFINE SYS$OUTPUT _NLA0:
1189$ on error then continue
1190$ on warning then continue
9ef4b0a6 1191$ 'Checkcc' temp.c
97abc6ad 1192$ If (Needs_Opt.eqs."Yes")
1193$ THEN
9ef4b0a6 1194$ link temp.obj,temp.opt/opt
97abc6ad 1195$ else
9ef4b0a6 1196$ link temp.obj
97abc6ad 1197$ endif
1198$ teststatus = f$extract(9,1,$status)
1199$ DEASSIGN SYS$OUTPUT
1200$ DEASSIGN SYS$ERROR
1201$ if (teststatus.nes."1")
1202$ THEN
1203$ perl_d_endpent="undef"
1204$ ELSE
1205$ perl_d_endpent="define"
1206$ ENDIF
1207$ ELSE
1208$ perl_d_endpent="undef"
1209$ ENDIF
1210$ WRITE_RESULT "d_endpent is ''perl_d_endpent'"
1211$!
1212$! Check for endservent
1213$!
1214$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1215$ THEN
1216$ OS
1217$ WS "#ifdef __DECC
1218$ WS "#include <stdlib.h>
1219$ WS "#endif
1220$ WS "#include <stdio.h>
1221$ if ("''Has_Socketshr'".eqs."T")
1222$ THEN
1223$ WS "#include <socketshr.h>"
1224$ else
1225$ WS "#include <netdb.h>
1226$ endif
1227$ WS "int main()
1228$ WS "{"
1229$ WS "endservent();
1230$ WS "exit(0);
1231$ WS "}"
1232$ CS
1233$ DEFINE SYS$ERROR _NLA0:
1234$ DEFINE SYS$OUTPUT _NLA0:
1235$ on error then continue
1236$ on warning then continue
9ef4b0a6 1237$ 'Checkcc' temp.c
97abc6ad 1238$ If (Needs_Opt.eqs."Yes")
1239$ THEN
9ef4b0a6 1240$ link temp.obj,temp.opt/opt
97abc6ad 1241$ else
9ef4b0a6 1242$ link temp.obj
97abc6ad 1243$ endif
1244$ teststatus = f$extract(9,1,$status)
1245$ DEASSIGN SYS$OUTPUT
1246$ DEASSIGN SYS$ERROR
1247$ if (teststatus.nes."1")
1248$ THEN
1249$ perl_d_endsent="undef"
1250$ ELSE
1251$ perl_d_endsent="define"
1252$ ENDIF
1253$ ELSE
1254$ perl_d_endsent="undef"
1255$ ENDIF
1256$ WRITE_RESULT "d_endsent is ''perl_d_endsent'"
1257$!
1258$! Check for sethostent
1259$!
1260$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1261$ THEN
1262$ OS
1263$ WS "#ifdef __DECC
1264$ WS "#include <stdlib.h>
1265$ WS "#endif
1266$ WS "#include <stdio.h>
1267$ if ("''Has_Socketshr'".eqs."T")
1268$ THEN
1269$ WS "#include <socketshr.h>"
1270$ else
1271$ WS "#include <netdb.h>
1272$ endif
1273$ WS "int main()
1274$ WS "{"
1275$ WS "sethostent(1);
1276$ WS "exit(0);
1277$ WS "}"
1278$ CS
1279$ DEFINE SYS$ERROR _NLA0:
1280$ DEFINE SYS$OUTPUT _NLA0:
1281$ on error then continue
1282$ on warning then continue
9ef4b0a6 1283$ 'Checkcc' temp.c
97abc6ad 1284$ If (Needs_Opt.eqs."Yes")
1285$ THEN
9ef4b0a6 1286$ link temp.obj,temp.opt/opt
97abc6ad 1287$ else
9ef4b0a6 1288$ link temp.obj
97abc6ad 1289$ endif
1290$ teststatus = f$extract(9,1,$status)
1291$ DEASSIGN SYS$OUTPUT
1292$ DEASSIGN SYS$ERROR
1293$ if (teststatus.nes."1")
1294$ THEN
1295$ perl_d_sethent="undef"
1296$ ELSE
1297$ perl_d_sethent="define"
1298$ ENDIF
1299$ ELSE
1300$ perl_d_sethent="undef"
1301$ ENDIF
1302$ WRITE_RESULT "d_sethent is ''perl_d_sethent'"
1303$!
1304$! Check for setnetent
1305$!
1306$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1307$ THEN
1308$ OS
1309$ WS "#ifdef __DECC
1310$ WS "#include <stdlib.h>
1311$ WS "#endif
1312$ WS "#include <stdio.h>
1313$ if ("''Has_Socketshr'".eqs."T")
1314$ THEN
1315$ WS "#include <socketshr.h>"
1316$ else
1317$ WS "#include <netdb.h>
1318$ endif
1319$ WS "int main()
1320$ WS "{"
1321$ WS "setnetent(1);
1322$ WS "exit(0);
1323$ WS "}"
1324$ CS
1325$ DEFINE SYS$ERROR _NLA0:
1326$ DEFINE SYS$OUTPUT _NLA0:
1327$ on error then continue
1328$ on warning then continue
9ef4b0a6 1329$ 'Checkcc' temp.c
97abc6ad 1330$ If (Needs_Opt.eqs."Yes")
1331$ THEN
9ef4b0a6 1332$ link temp.obj,temp.opt/opt
97abc6ad 1333$ else
9ef4b0a6 1334$ link temp.obj
97abc6ad 1335$ endif
1336$ teststatus = f$extract(9,1,$status)
1337$ DEASSIGN SYS$OUTPUT
1338$ DEASSIGN SYS$ERROR
1339$ if (teststatus.nes."1")
1340$ THEN
1341$ perl_d_setnent="undef"
1342$ ELSE
1343$ perl_d_setnent="define"
1344$ ENDIF
1345$ ELSE
1346$ perl_d_setnent="undef"
1347$ ENDIF
1348$ WRITE_RESULT "d_setnent is ''perl_d_setnent'"
1349$!
1350$! Check for setprotoent
1351$!
1352$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1353$ THEN
1354$ OS
1355$ WS "#ifdef __DECC
1356$ WS "#include <stdlib.h>
1357$ WS "#endif
1358$ WS "#include <stdio.h>
1359$ if ("''Has_Socketshr'".eqs."T")
1360$ THEN
1361$ WS "#include <socketshr.h>"
1362$ else
1363$ WS "#include <netdb.h>
1364$ endif
1365$ WS "int main()
1366$ WS "{"
1367$ WS "setprotoent(1);
1368$ WS "exit(0);
1369$ WS "}"
1370$ CS
1371$ DEFINE SYS$ERROR _NLA0:
1372$ DEFINE SYS$OUTPUT _NLA0:
1373$ on error then continue
1374$ on warning then continue
9ef4b0a6 1375$ 'Checkcc' temp.c
97abc6ad 1376$ If (Needs_Opt.eqs."Yes")
1377$ THEN
9ef4b0a6 1378$ link temp.obj,temp.opt/opt
97abc6ad 1379$ else
9ef4b0a6 1380$ link temp.obj
97abc6ad 1381$ endif
1382$ teststatus = f$extract(9,1,$status)
1383$ DEASSIGN SYS$OUTPUT
1384$ DEASSIGN SYS$ERROR
1385$ if (teststatus.nes."1")
1386$ THEN
1387$ perl_d_setpent="undef"
1388$ ELSE
1389$ perl_d_setpent="define"
1390$ ENDIF
1391$ ELSE
1392$ perl_d_setpent="undef"
1393$ ENDIF
1394$ WRITE_RESULT "d_setpent is ''perl_d_setpent'"
1395$!
1396$! Check for setservent
1397$!
1398$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1399$ THEN
1400$ OS
1401$ WS "#ifdef __DECC
1402$ WS "#include <stdlib.h>
1403$ WS "#endif
1404$ WS "#include <stdio.h>
1405$ if ("''Has_Socketshr'".eqs."T")
1406$ THEN
1407$ WS "#include <socketshr.h>"
1408$ else
1409$ WS "#include <netdb.h>
1410$ endif
1411$ WS "int main()
1412$ WS "{"
1413$ WS "setservent(1);
1414$ WS "exit(0);
1415$ WS "}"
1416$ CS
1417$ DEFINE SYS$ERROR _NLA0:
1418$ DEFINE SYS$OUTPUT _NLA0:
1419$ on error then continue
1420$ on warning then continue
9ef4b0a6 1421$ 'Checkcc' temp.c
97abc6ad 1422$ If (Needs_Opt.eqs."Yes")
1423$ THEN
9ef4b0a6 1424$ link temp.obj,temp.opt/opt
97abc6ad 1425$ else
9ef4b0a6 1426$ link temp.obj
97abc6ad 1427$ endif
1428$ teststatus = f$extract(9,1,$status)
1429$ DEASSIGN SYS$OUTPUT
1430$ DEASSIGN SYS$ERROR
1431$ if (teststatus.nes."1")
1432$ THEN
1433$ perl_d_setsent="undef"
1434$ ELSE
1435$ perl_d_setsent="define"
1436$ ENDIF
1437$ ELSE
1438$ perl_d_setsent="undef"
1439$ ENDIF
1440$ WRITE_RESULT "d_setsent is ''perl_d_setsent'"
1441$!
1442$! Check for gethostent
1443$!
1444$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1445$ THEN
1446$ OS
1447$ WS "#ifdef __DECC
1448$ WS "#include <stdlib.h>
1449$ WS "#endif
1450$ WS "#include <stdio.h>
1451$ if ("''Has_Socketshr'".eqs."T")
1452$ THEN
1453$ WS "#include <socketshr.h>"
1454$ else
1455$ WS "#include <netdb.h>
1456$ endif
1457$ WS "int main()
1458$ WS "{"
1459$ WS "gethostent();
1460$ WS "exit(0);
1461$ WS "}"
1462$ CS
1463$ DEFINE SYS$ERROR _NLA0:
1464$ DEFINE SYS$OUTPUT _NLA0:
1465$ on error then continue
1466$ on warning then continue
9ef4b0a6 1467$ 'Checkcc' temp.c
97abc6ad 1468$ If (Needs_Opt.eqs."Yes")
1469$ THEN
9ef4b0a6 1470$ link temp.obj,temp.opt/opt
97abc6ad 1471$ else
9ef4b0a6 1472$ link temp.obj
97abc6ad 1473$ endif
1474$ teststatus = f$extract(9,1,$status)
1475$ DEASSIGN SYS$OUTPUT
1476$ DEASSIGN SYS$ERROR
1477$ if (teststatus.nes."1")
1478$ THEN
1479$ perl_d_gethent="undef"
1480$ ELSE
1481$ perl_d_gethent="define"
1482$ ENDIF
1483$ ELSE
1484$ perl_d_gethent="undef"
1485$ ENDIF
1486$ WRITE_RESULT "d_gethent is ''perl_d_gethent'"
1487$!
1488$! Check for getnetent
1489$!
1490$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1491$ THEN
1492$ OS
1493$ WS "#ifdef __DECC
1494$ WS "#include <stdlib.h>
1495$ WS "#endif
1496$ WS "#include <stdio.h>
1497$ if ("''Has_Socketshr'".eqs."T")
1498$ THEN
1499$ WS "#include <socketshr.h>"
1500$ else
1501$ WS "#include <netdb.h>
1502$ endif
1503$ WS "int main()
1504$ WS "{"
1505$ WS "getnetent();
1506$ WS "exit(0);
1507$ WS "}"
1508$ CS
1509$ DEFINE SYS$ERROR _NLA0:
1510$ DEFINE SYS$OUTPUT _NLA0:
1511$ on error then continue
1512$ on warning then continue
9ef4b0a6 1513$ 'Checkcc' temp.c
97abc6ad 1514$ If (Needs_Opt.eqs."Yes")
1515$ THEN
9ef4b0a6 1516$ link temp.obj,temp.opt/opt
97abc6ad 1517$ else
9ef4b0a6 1518$ link temp.obj
97abc6ad 1519$ endif
1520$ teststatus = f$extract(9,1,$status)
1521$ DEASSIGN SYS$OUTPUT
1522$ DEASSIGN SYS$ERROR
1523$ if (teststatus.nes."1")
1524$ THEN
1525$ perl_d_getnent="undef"
1526$ ELSE
1527$ perl_d_getnent="define"
1528$ ENDIF
1529$ ELSE
1530$ perl_d_getnent="undef"
1531$ ENDIF
1532$ WRITE_RESULT "d_getnent is ''perl_d_getnent'"
1533$!
1534$! Check for getprotoent
1535$!
1536$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1537$ THEN
1538$ OS
1539$ WS "#ifdef __DECC
1540$ WS "#include <stdlib.h>
1541$ WS "#endif
1542$ WS "#include <stdio.h>
1543$ if ("''Has_Socketshr'".eqs."T")
1544$ THEN
1545$ WS "#include <socketshr.h>"
1546$ else
1547$ WS "#include <netdb.h>
1548$ endif
1549$ WS "int main()
1550$ WS "{"
1551$ WS "getprotoent();
1552$ WS "exit(0);
1553$ WS "}"
1554$ CS
1555$ DEFINE SYS$ERROR _NLA0:
1556$ DEFINE SYS$OUTPUT _NLA0:
1557$ on error then continue
1558$ on warning then continue
9ef4b0a6 1559$ 'Checkcc' temp.c
97abc6ad 1560$ If (Needs_Opt.eqs."Yes")
1561$ THEN
9ef4b0a6 1562$ link temp.obj,temp.opt/opt
97abc6ad 1563$ else
9ef4b0a6 1564$ link temp.obj
97abc6ad 1565$ endif
1566$ teststatus = f$extract(9,1,$status)
1567$ DEASSIGN SYS$OUTPUT
1568$ DEASSIGN SYS$ERROR
1569$ if (teststatus.nes."1")
1570$ THEN
1571$ perl_d_getpent="undef"
1572$ ELSE
1573$ perl_d_getpent="define"
1574$ ENDIF
1575$ ELSE
1576$ perl_d_getpent="undef"
1577$ ENDIF
1578$ WRITE_RESULT "d_getpent is ''perl_d_getpent'"
1579$!
1580$! Check for getservent
1581$!
1582$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
1583$ THEN
1584$ OS
1585$ WS "#ifdef __DECC
1586$ WS "#include <stdlib.h>
1587$ WS "#endif
1588$ WS "#include <stdio.h>
1589$ if ("''Has_Socketshr'".eqs."T")
1590$ THEN
1591$ WS "#include <socketshr.h>"
1592$ else
1593$ WS "#include <netdb.h>
1594$ endif
1595$ WS "int main()
1596$ WS "{"
1597$ WS "getservent();
1598$ WS "exit(0);
1599$ WS "}"
1600$ CS
1601$ DEFINE SYS$ERROR _NLA0:
1602$ DEFINE SYS$OUTPUT _NLA0:
1603$ on error then continue
1604$ on warning then continue
9ef4b0a6 1605$ 'Checkcc' temp.c
97abc6ad 1606$ If (Needs_Opt.eqs."Yes")
1607$ THEN
9ef4b0a6 1608$ link temp.obj,temp.opt/opt
97abc6ad 1609$ else
9ef4b0a6 1610$ link temp.obj
97abc6ad 1611$ endif
1612$ teststatus = f$extract(9,1,$status)
1613$ DEASSIGN SYS$OUTPUT
1614$ DEASSIGN SYS$ERROR
1615$ if (teststatus.nes."1")
1616$ THEN
1617$ perl_d_getsent="undef"
1618$ ELSE
1619$ perl_d_getsent="define"
1620$ ENDIF
1621$ ELSE
1622$ perl_d_getsent="undef"
1623$ ENDIF
1624$ WRITE_RESULT "d_getsent is ''perl_d_getsent'"
1625$!
1626$! Check for pthread_yield
1627$!
1628$ if ("''use_threads'".eqs."T")
1629$ THEN
1630$ OS
1631$ WS "#ifdef __DECC
1632$ WS "#include <stdlib.h>
1633$ WS "#endif
1634$ WS "#include <pthread.h>
1635$ WS "#include <stdio.h>
1636$ WS "int main()
1637$ WS "{"
1638$ WS "pthread_yield();
1639$ WS "exit(0);
1640$ WS "}"
1641$ CS
1642$ DEFINE SYS$ERROR _NLA0:
1643$ DEFINE SYS$OUTPUT _NLA0:
1644$ on error then continue
1645$ on warning then continue
9ef4b0a6 1646$ 'Checkcc' temp.c
97abc6ad 1647$ teststatus = f$extract(9,1,$status)
1648$ DEASSIGN SYS$OUTPUT
1649$ DEASSIGN SYS$ERROR
1650$ if (teststatus.nes."1")
1651$ THEN
1652$ perl_d_pthread_yield="undef"
1653$ ELSE
1654$ perl_d_pthread_yield="define"
1655$ ENDIF
1656$ ELSE
1657$ perl_d_pthread_yield="undef"
1658$ ENDIF
1659$ WRITE_RESULT "d_pthread_yield is ''perl_d_pthread_yield'"
1660$!
1661$! Check for sched_yield
1662$!
1663$ if ("''use_threads'".eqs."T")
1664$ THEN
1665$ OS
1666$ WS "#ifdef __DECC
1667$ WS "#include <stdlib.h>
1668$ WS "#endif
1669$ WS "#include <pthread.h>
1670$ WS "#include <stdio.h>
1671$ WS "int main()
1672$ WS "{"
1673$ WS "sched_yield();
1674$ WS "exit(0);
1675$ WS "}"
1676$ CS
1677$ DEFINE SYS$ERROR _NLA0:
1678$ DEFINE SYS$OUTPUT _NLA0:
1679$ on error then continue
1680$ on warning then continue
9ef4b0a6 1681$ 'Checkcc' temp.c
97abc6ad 1682$ teststatus = f$extract(9,1,$status)
1683$ DEASSIGN SYS$OUTPUT
1684$ DEASSIGN SYS$ERROR
1685$ if (teststatus.nes."1")
1686$ THEN
1687$ perl_d_sched_yield="undef"
1688$ ELSE
1689$ perl_d_sched_yield="define"
1690$ ENDIF
1691$ ELSE
1692$ perl_d_sched_yield="undef"
1693$ ENDIF
1694$ WRITE_RESULT "d_sched_yield is ''perl_d_sched_yield'"
1695$!
1696$! Check for generic pointer size
1697$!
1698$ OS
1699$ WS "#ifdef __DECC
1700$ WS "#include <stdlib.h>
1701$ WS "#endif
1702$ WS "#include <stdio.h>
1703$ WS "int main()
1704$ WS "{"
429a5e67 1705$ WS "int foo;
1706$ WS "foo = sizeof(char *);
1707$ WS "printf(""%d\n"", foo);
97abc6ad 1708$ WS "exit(0);
1709$ WS "}"
1710$ CS
429a5e67 1711$! copy temp.c sys$output
1712$!
97abc6ad 1713$ DEFINE SYS$ERROR _NLA0:
1714$ DEFINE SYS$OUTPUT _NLA0:
1715$ ON ERROR THEN CONTINUE
1716$ ON WARNING THEN CONTINUE
9ef4b0a6 1717$ 'Checkcc' temp.c
97abc6ad 1718$ If (Needs_Opt.eqs."Yes")
1719$ THEN
9ef4b0a6 1720$ link temp.obj,temp.opt/opt
97abc6ad 1721$ else
9ef4b0a6 1722$ link temp.obj
97abc6ad 1723$ endif
1724$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis
1725$ DEASSIGN SYS$OUTPUT
1726$ DEASSIGN SYS$ERROR
1727$ DEFINE SYS$ERROR TEMPOUT
1728$ DEFINE SYS$OUTPUT TEMPOUT
1729$ mcr []temp
1730$ CLOSE TEMPOUT
1731$ DEASSIGN SYS$OUTPUT
1732$ DEASSIGN SYS$ERROR
1733$ OPEN/READ TEMPOUT [-.uu]tempout.lis
1734$ READ TEMPOUT line
1735$ CLOSE TEMPOUT
1736$
1737$ perl_ptrsize=line
1738$ WRITE_RESULT "ptrsize is ''perl_ptrsize'"
1739$!
1740$ set nover
1741$! Done with compiler checks. Clean up.
1742$ if f$search("temp.c").nes."" then DELETE/NOLOG temp.c;*
1743$ if f$search("temp.obj").nes."" then DELETE/NOLOG temp.obj;*
1744$ if f$search("temp.exe").nes."" then DELETE/NOLOG temp.exe;*
1745$ if f$search("temp.opt").nes."" then DELETE/NOLOG Temp.opt;*
1746$!
1747$!
1748$! Some that are compiler or VMS version sensitive
1749$!
1750$! Gnu C stuff
1751$ IF "''Using_Gnu_C'".EQS."Yes"
1752$ THEN
1753$ perl_d_attribut="define"
1754$ perl_vms_cc_type="gcc"
1755$ ELSE
1756$ perl_d_attribut="undef"
1757$ ENDIF
1758$
1759$! Dec C >= 5.2 and VMS ver >= 7.0
1760$ IF ("''Using_Dec_C'".EQS."Yes").AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.("''VMS_VER'".GES."7.0")
1761$ THEN
1762$ perl_d_bcmp="define"
1763$ perl_d_gettimeod="define"
1764$ perl_d_uname="define"
1765$ perl_d_sigaction="define"
1766$ perl_d_truncate="define"
1767$ perl_d_wait4="define"
1768$ perl_d_index="define"
1769$ perl_pidtype="pid_t"
1770$ 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"
1771$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
1772$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
1773$ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
1774$perl_sig_name_with_commas = psnwc1 + psnwc2 + psnwc3
1775$ 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"
1776$ perl_sig_num_with_commas=perl_sig_num
1777$ perl_uidtype="uid_t"
1778$ perl_d_pathconf="define"
1779$ perl_d_fpathconf="define"
1780$ perl_d_sysconf="define"
1781$ perl_d_sigsetjmp="define"
1782$ ELSE
1783$ perl_pidtype="unsigned int"
1784$ perl_d_gettimeod="undef"
1785$ perl_d_bcmp="undef"
1786$ perl_d_uname="undef"
1787$ perl_d_sigaction="undef"
1788$ perl_d_truncate="undef"
1789$ perl_d_wait4="undef"
1790$ perl_d_index="undef"
1791$ perl_sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM ABRT USR1 USR2"",0"
1792$ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
1793$ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
1794$ perl_sig_name_with_commas = psnwc1 + psnwc2
1795$ perl_sig_num="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
1796$ perl_sig_num_with_commas=perl_sig_num
1797$ perl_uidtype="unsigned int"
1798$ perl_d_pathconf="undef"
1799$ perl_d_fpathconf="undef"
1800$ perl_d_sysconf="undef"
1801$ perl_d_sigsetjmp="undef"
1802$ ENDIF
1803$!
1804$! Dec C alone
1805$ IF ("''Using_Dec_C'".EQS."Yes")
1806$ THEN
1807$ perl_d_mbstowcs="define"
1808$ perl_d_mbtowc="define"
1809$ perl_d_stdiobase="define"
1810$ perl_d_stdio_ptr_lval="define"
1811$ perl_d_stdio_cnt_lval="define"
1812$ perl_d_stdstdio="define"
1813$ perl_d_wcstombs="define"
1814$ perl_d_mblen="define"
1815$ perl_d_mktime="define"
1816$ perl_d_strcoll="define"
1817$ perl_d_strxfrm="define"
1818$ perl_d_wctomb="define"
1819$ perl_i_locale="define"
1820$ perl_d_locconv="define"
1821$ perl_d_setlocale="define"
1822$ perl_vms_cc_type="decc"
1823$ ELSE
1824$ perl_d_mbstowcs="undef"
1825$ perl_d_mbtowc="undef"
1826$ perl_d_stdiobase="undef"
1827$ perl_d_stdio_ptr_lval="undef"
1828$ perl_d_stdio_cnt_lval="undef"
1829$ perl_d_stdstdio="undef"
1830$ perl_d_wcstombs="undef"
1831$ perl_d_mblen="undef"
1832$ perl_d_mktime="undef"
1833$ perl_d_strcoll="undef"
1834$ perl_d_strxfrm="undef"
1835$ perl_d_wctomb="undef"
1836$ perl_i_locale="undef"
1837$ perl_d_locconv="undef"
1838$ perl_d_setlocale="undef"
1839$ ENDIF
1840$!
1841$! Vax C stuff
1842$ if ("''Using_Vax_C'".EQS."Yes")
1843$ THEN
1844$ perl_vms_cc_type="vaxc"
1845$ ENDIF
1846$!
1847$!
1848$! Sockets?
1849$ if ("''Has_Socketshr'".EQS."T").OR.("''Has_Dec_C_Sockets'".EQS."T")
1850$ THEN
1851$ perl_d_vms_do_sockets="define"
1852$ perl_d_htonl="define"
1853$ perl_d_socket="define"
1854$ perl_d_select="define"
1855$ perl_netdb_host_type="char *"
1856$ perl_netdb_hlen_type="int"
1857$ perl_netdb_name_type="char *"
1858$ perl_netdb_net_type="long"
1859$ perl_d_gethbyaddr="define"
1860$ perl_d_gethbyname="define"
1861$ perl_d_getnbyaddr="define"
1862$ perl_d_getnbyname="define"
1863$ perl_d_getpbynumber="define"
1864$ perl_d_getpbyname="define"
1865$ perl_d_getsbyport="define"
1866$ perl_d_getsbyname="define"
1867$ perl_d_gethostprotos="define"
1868$ perl_d_getnetprotos="define"
1869$ perl_d_getprotoprotos="define"
1870$ perl_d_getservprotos="define"
1871$ ELSE
1872$ perl_d_vms_do_sockets="undef"
1873$ perl_d_htonl="undef"
1874$ perl_d_socket="undef"
1875$ perl_d_select="undef"
1876$ perl_netdb_host_type="char *"
1877$ perl_netdb_hlen_type="int"
1878$ perl_netdb_name_type="char *"
1879$ perl_netdb_net_type="long"
1880$ perl_d_gethbyaddr="undef"
1881$ perl_d_gethbyname="undef"
1882$ perl_d_getnbyaddr="undef"
1883$ perl_d_getnbyname="undef"
1884$ perl_d_getpbynumber="undef"
1885$ perl_d_getpbyname="undef"
1886$ perl_d_getsbyport="undef"
1887$ perl_d_getsbyname="undef"
1888$ perl_d_gethostprotos="undef"
1889$ perl_d_getnetprotos="undef"
1890$ perl_d_getprotoprotos="undef"
1891$ perl_d_getservprotos="undef"
1892$ ENDIF
1893$! Threads
1894$ if ("''use_threads'".eqs."T")
1895$ THEN
1896$ perl_usethreads="define"
1897$ perl_d_pthreads_created_joinable="define"
1898$ if ("''VMS_VER'".ges."7.0")
1899$ THEN
1900$ perl_d_oldpthreads="undef"
1901$ ELSE
1902$ perl_d_oldpthreads="define"
1903$ ENDIF
1904$ ELSE
1905$ perl_d_oldpthreads="undef"
1906$ perl_usethreads="undef"
1907$
1908$ perl_d_pthreads_created_joinable="undef"
1909$ ENDIF
1910$!
1911$!
1912$! Finally the composite ones. All config
1913$ perl_installarchlib="''perl_prefix':[lib.''perl_arch'.''localperlver']"
1914$ perl_installsitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
1915$ perl_myhostname="''myhostname'"
1916$ perl_mydomain="''mydomain'"
1917$ perl_perladmin="''perladmin'"
1918$ perl_cf_email="''cf_email'"
1919$ perl_myuname:="VMS ''myname' ''f$edit(perl_osvers, "TRIM")' ''f$edit(hwname, "TRIM")'"
1920$ perl_archlibexp="''perl_prefix':[lib.''perl_arch'.''localperlver']"
1921$ perl_archlib="''perl_prefix':[lib.''perl_arch'.''lovalperlver']"
1922$ perl_oldarchlibexp="''perl_prefix':[lib.''perl_arch']"
1923$ perl_oldarchlib="''perl_prefix':[lib.''perl_arch']"
1924$ perl_sitearchexp="''perl_prefix':[lib.site_perl.''perl_arch']"
1925$ perl_sitearch="''perl_prefix':[lib.site_perl.''perl_arch']"
1926$ if "''Using_Dec_C'" .eqs. "Yes"
1927$ THEN
429a5e67 1928$ perl_ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'"
97abc6ad 1929$ ELSE
1930$ IF "''Using_Vax_C'" .eqs. "Yes"
1931$ THEN
429a5e67 1932$ perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
97abc6ad 1933$ ENDIF
1934$ ENDIF
1935$!
1936$! Finally clean off any leading zeros from the patchlevel or subversion
1937$ perl_patchlevel = perl_patchlevel + 0
1938$ perl_subversion = perl_subversion + 0
1939$!
1940$! Okay, we've got everything configured. Now go write out a config.sh.
1941$ open/write CONFIGSH [-]config.sh
1942$ WC := "write CONFIGSH"
1943$!
1944$ WC "# This file generated by Configure.COM on a VMS system."
1945$ WC "# Time: " + perl_cf_time
1946$ WC ""
1947$ WC "package='" + perl_package + "'"
1948$ WC "CONFIG='" + perl_config + "'"
1949$ WC "cf_time='" + perl_cf_time + "'"
1950$ WC "cf_by='" + perl_cf_by+ "'"
1951$ WC "cpp_stuff='" + perl_cpp_stuff + "'"
1952$ WC "ccdlflags='" + perl_ccdlflags + "'"
1953$ WC "cccdlflags='" + perl_cccdlflags + "'"
1954$ WC "mab='" + perl_mab + "'"
1955$ WC "libpth='" + perl_libpth + "'"
1956$ WC "ld='" + perl_ld + "'"
1957$ WC "lddlflags='" + perl_lddlflags + "'"
1958$ WC "ranlib='" + perl_ranlib + "'"
1959$ WC "ar='" + perl_ar + "'"
1960$ WC "eunicefix='" + perl_eunicefix + "'"
1961$ WC "hint='" + perl_hint +"'"
1962$ WC "hintfile='" + perl_hintfile + "'"
1963$ WC "shrplib='" + perl_shrplib + "'"
1964$ WC "usemymalloc='" + perl_usemymalloc + "'"
1965$ WC "usevfork='" + perl_usevfork + "'"
1966$ WC "useposix='false'"
1967$ WC "spitshell='write sys$output '"
1968$ WC "dlsrc='dl_vms.c'"
1969$ WC "binexp='" + perl_binexp + "'"
1970$ WC "man1ext='" + perl_man1ext + "'"
1971$ WC "man3ext='" + perl_man3ext + "'"
1972$ WC "arch='" + perl_arch + "'"
1973$ WC "archname='" + perl_archname + "'"
1974$ WC "osvers='" + perl_osvers + "'"
1975$ WC "prefix='" + perl_prefix + "'"
1976$ WC "builddir='" + perl_builddir + "'"
1977$ WC "installbin='" + perl_installbin + "'"
1978$ WC "installscript='" + perl_installscript + "'"
1979$ WC "installman1dir='" + perl_installman1dir + "'"
1980$ WC "installman3dir='" + perl_installman3dir + "'"
1981$ WC "installprivlib='" + perl_installprivlib + "'"
1982$ WC "installarchlib='" + perl_installarchlib + "'"
1983$ WC "installsitelib='" + perl_installsitelib + "'"
1984$ WC "installsitearch='" + perl_installsitearch + "'"
1985$ WC "path_sep='" + perl_path_sep + "'"
97abc6ad 1986$ WC "vms_cc_type='" + perl_vms_cc_type + "'"
1987$ WC "d_attribut='" + perl_d_attribut + "'"
1988$ WC "cc='" + perl_cc + "'"
1989$ WC "ccflags='" + perl_ccflags + "'"
1990$ WC "d_vms_do_sockets='" + perl_d_vms_do_sockets + "'"
1991$ WC "d_socket='" + perl_d_socket + "'"
1992$ WC "d_sockpair='" + perl_d_sockpair + "'"
1993$ WC "d_gethent='" + perl_d_gethent + "'"
1994$ WC "d_getsent='" + perl_d_getsent + "'"
1995$ WC "d_select='" + perl_d_select + "'"
1996$ WC "i_niin='" + perl_i_niin + "'"
1997$ WC "i_neterrno='" + perl_i_neterrno + "'"
1998$ WC "d_stdstdio='" + perl_d_stdstdio + "'"
1999$ WC "d_stdio_ptr_lval='" + perl_d_stdio_ptr_lval + "'"
2000$ WC "d_stdio_cnt_lval='" + perl_d_stdio_cnt_lval + "'"
2001$ WC "d_stdiobase='" + perl_d_stdiobase + "'"
2002$ WC "d_locconv='" + perl_d_locconv + "'"
2003$ WC "d_setlocale='" + perl_d_setlocale + "'"
2004$ WC "i_locale='" + perl_i_locale + "'"
2005$ WC "d_mbstowcs='" + perl_d_mbstowcs + "'"
2006$ WC "d_mbtowc='" + perl_d_mbtowc + "'"
2007$ WC "d_wcstombs='" + perl_d_wcstombs + "'"
2008$ WC "d_wctomb='" + perl_d_wctomb + "'"
2009$ WC "d_mblen='" + perl_d_mblen + "'"
2010$ WC "d_mktime='" + perl_d_mktime + "'"
2011$ WC "d_strcoll='" + perl_d_strcoll + "'"
2012$ WC "d_strxfrm='" + perl_d_strxfrm + "'"
2013$ WC "ldflags='" + perl_ldflags + "'"
2014$ WC "dlobj='" + perl_dlobj + "'"
2015$ WC "obj_ext='" + perl_obj_ext + "'"
2016$ WC "so='" + perl_so + "'"
2017$ WC "dlext='" + perl_dlext + "'"
2018$ WC "exe_ext='" + perl_exe_ext + "'"
2019$ WC "lib_ext='" + perl_lib_ext + "'"
2020$ WC "myhostname='" + perl_myhostname + "'"
2021$ WC "mydomain='" + perl_mydomain + "'"
2022$ WC "perladmin='" + perl_perladmin + "'"
2023$ WC "cf_email='" + perl_cf_email + "'"
2024$ WC "myuname='" + perl_myuname + "'"
2025$ WC "alignbytes='" + perl_alignbytes + "'"
2026$ WC "osname='" + perl_osname + "'"
2027$ WC "d_archlib='" + perl_d_archlib + "'"
2028$ WC "archlibexp='" + perl_archlibexp + "'"
2029$ WC "archlib='" + perl_archlib + "'"
2030$ WC "archname='" + perl_archname + "'"
2031$ WC "d_bincompat3='" + perl_d_bincompat3 + "'"
2032$ WC "cppstdin='" + perl_cppstdin + "'"
2033$ WC "cppminus='" + perl_cppminus + "'"
2034$ WC "d_bcmp='" + perl_d_bcmp + "'"
2035$ WC "d_bcopy='" + perl_d_bcopy + "'"
2036$ WC "d_bzero='" + perl_d_bzero + "'"
2037$ WC "d_castneg='" + perl_d_castneg + "'"
2038$ WC "castflags='" + perl_castflags + "'"
2039$ WC "d_chsize='" + perl_d_chsize + "'"
2040$ WC "d_const='" + perl_d_const + "'"
2041$ WC "d_crypt='" + perl_d_crypt + "'"
2042$ WC "byteorder='" + perl_byteorder + "'"
2043$ WC "full_csh='" + perl_full_csh + "'"
2044$ WC "d_csh='" + perl_d_csh + "'"
2045$ WC "d_dup2='" + perl_d_dup2 + "'"
2046$ WC "d_fchmod='" + perl_d_fchmod + "'"
2047$ WC "d_fchown='" + perl_d_fchown + "'"
2048$ WC "d_fcntl='" + perl_d_fcntl + "'"
2049$ WC "d_fgetpos='" + perl_d_fgetpos + "'"
2050$ WC "d_flexfnam='" + perl_d_flexfnam + "'"
2051$ WC "d_flock='" + perl_d_flock + "'"
2052$ WC "d_fsetpos='" + perl_d_fsetpos + "'"
2053$ WC "d_gettimeod='" + perl_d_gettimeod + "'"
2054$ WC "d_getgrps='" + perl_d_getgrps + "'"
2055$ WC "d_setgrps='" + perl_d_setgrps + "'"
2056$ WC "d_uname='" + perl_d_uname + "'"
2057$ WC "d_getprior='" + perl_d_getprior + "'"
2058$ WC "d_killpg='" + perl_d_killpg + "'"
2059$ WC "d_link='" + perl_d_link + "'"
2060$ WC "d_lstat='" + perl_d_lstat + "'"
2061$ WC "d_lockf='" + perl_d_lockf + "'"
2062$ WC "d_memcmp='" + perl_d_memcmp + "'"
2063$ WC "d_memcpy='" + perl_d_memcpy + "'"
2064$ WC "d_memmove='" + perl_d_memmove + "'"
2065$ WC "d_memset='" + perl_d_memset + "'"
2066$ WC "d_mkdir='" + perl_d_mkdir + "'"
2067$ WC "d_msg='" + perl_d_msg + "'"
2068$ WC "d_open3='" + perl_d_open3 + "'"
2069$ WC "d_poll='" + perl_d_poll + "'"
2070$ WC "d_readdir='" + perl_d_readdir + "'"
2071$ WC "d_seekdir='" + perl_d_seekdir + "'"
2072$ WC "d_telldir='" + perl_d_telldir + "'"
2073$ WC "d_rewinddir='" + perl_d_rewinddir + "'"
2074$ WC "d_rename='" + perl_d_rename + "'"
2075$ WC "d_rmdir='" + perl_d_rmdir + "'"
2076$ WC "d_sem='" + perl_d_sem + "'"
2077$ WC "d_setegid='" + perl_d_setegid + "'"
2078$ WC "d_seteuid='" + perl_d_seteuid + "'"
2079$ WC "d_setprior='" + perl_d_setprior + "'"
2080$ WC "d_setregid='" + perl_d_setregid + "'"
2081$ WC "d_setresgid='" + perl_d_setresgid + "'"
2082$ WC "d_setreuid='" + perl_d_setreuid + "'"
2083$ WC "d_setresuid='" + perl_d_setresuid + "'"
2084$ WC "d_setrgid='" + perl_d_setrgid + "'"
2085$ WC "d_setruid='" + perl_d_setruid + "'"
2086$ WC "d_setsid='" + perl_d_setsid + "'"
2087$ WC "d_shm='" + perl_d_shm + "'"
2088$ WC "d_shmatprototype='" + perl_d_shmatprototype + "'"
2089$ WC "d_sigaction='" + perl_d_sigaction + "'"
2090$ WC "d_statblks='" + perl_d_statblks + "'"
2091$ WC "stdio_ptr='" + perl_stdio_ptr + "'"
2092$ WC "stdio_cnt='" + perl_stdio_cnt + "'"
2093$ WC "stdio_base='" + perl_stdio_base + "'"
2094$ WC "stdio_bufsiz='" + perl_stdio_bufsiz + "'"
2095$ WC "d_strctcpy='" + perl_d_strctcpy + "'"
2096$ WC "d_strerror='" + perl_d_strerror + "'"
2097$ WC "d_syserrlst='" + perl_d_syserrlst + "'"
2098$ WC "d_strerrm='" + perl_d_strerrm + "'"
2099$ WC "d_symlink='" + perl_d_symlink + "'"
2100$ WC "d_syscall='" + perl_d_syscall + "'"
2101$ WC "d_system='" + perl_d_system + "'"
2102$ WC "timetype='" + perl_timetype + "'"
2103$ WC "d_truncate='" + perl_d_truncate + "'"
2104$ WC "d_vfork='" + perl_d_vfork + "'"
2105$ WC "signal_t='" + perl_signal_t + "'"
2106$ WC "d_volatile='" + perl_d_volatile + "'"
2107$ WC "d_vprintf='" + perl_d_vprintf + "'"
2108$ WC "d_charvspr='" + perl_d_charvspr + "'"
2109$ WC "d_wait4='" + perl_d_wait4 + "'"
2110$ WC "d_waitpid='" + perl_d_waitpid + "'"
2111$ WC "i_dirent='" + perl_i_dirent + "'"
2112$ WC "d_dirnamlen='" + perl_d_dirnamlen + "'"
2113$ WC "direntrytype='" + perl_direntrytype + "'"
2114$ WC "i_fcntl='" + perl_i_fcntl + "'"
2115$ WC "i_grp='" + perl_i_grp + "'"
2116$ WC "i_limits='" + perl_i_limits + "'"
2117$ WC "i_memory='" + perl_i_memory + "'"
2118$ WC "i_ndbm='" + perl_i_ndbm + "'"
2119$ WC "i_stdarg='" + perl_i_stdarg + "'"
2120$ WC "i_pwd='" + perl_i_pwd + "'"
2121$ WC "d_pwquota='" + perl_d_pwquota + "'"
2122$ WC "d_pwage='" + perl_d_pwage + "'"
2123$ WC "d_pwchange='" + perl_d_pwchange + "'"
2124$ WC "d_pwclass='" + perl_d_pwclass + "'"
2125$ WC "d_pwexpire='" + perl_d_pwexpire + "'"
2126$ WC "d_pwcomment='" + perl_d_pwcomment + "'"
2127$ WC "i_stddef='" + perl_i_stddef + "'"
2128$ WC "i_stdlib='" + perl_i_stdlib + "'"
2129$ WC "i_string='" + perl_i_string + "'"
2130$ WC "i_sysdir='" + perl_i_sysdir + "'"
2131$ WC "i_sysfile='" + perl_i_sysfile + "'"
2132$ WC "i_sysioctl='" + perl_i_sysioctl + "'"
2133$ WC "i_sysndir='" + perl_i_sysndir + "'"
2134$ WC "i_sysresrc='" + perl_i_sysresrc + "'"
2135$ WC "i_sysselct='" + perl_i_sysselct + "'"
2136$ WC "i_dbm='" + perl_i_dbm + "'"
2137$ WC "i_rpcsvcdbm='" + perl_i_rpcsvcdbm + "'"
2138$ WC "i_sfio='" + perl_i_sfio + "'"
2139$ WC "i_sysstat='" + perl_i_sysstat + "'"
2140$ WC "i_systimes='" + perl_i_systimes + "'"
2141$ WC "i_systypes='" + perl_i_systypes + "'"
2142$ WC "i_sysun='" + perl_i_sysun + "'"
2143$ WC "i_syswait='" + perl_i_syswait + "'"
2144$ WC "i_termio='" + perl_i_termio + "'"
2145$ WC "i_sgtty='" + perl_i_sgtty + "'"
2146$ WC "i_termios='" + perl_i_termios + "'"
2147$ WC "i_time='" + perl_i_time + "'"
2148$ WC "i_systime='" + perl_i_systime + "'"
2149$ WC "i_systimek='" + perl_i_systimek + "'"
2150$ WC "i_unistd='" + perl_i_unistd + "'"
2151$ WC "i_utime='" + perl_i_utime + "'"
2152$ WC "i_varargs='" + perl_i_varargs + "'"
2153$ WC "i_vfork='" + perl_i_vfork + "'"
2154$ WC "prototype='" + perl_prototype + "'"
2155$ WC "randbits='" + perl_randbits +"'"
2156$ WC "selecttype='" + perl_selecttype + "'"
2157$ WC "stdchar='" + perl_stdchar + "'"
2158$ WC "d_unlink_all_versions='" + perl_d_unlink_all_versions + "'"
2159$ WC "full_sed='" + perl_full_sed + "'"
2160$ WC "bin='" + perl_bin + "'"
2161$ WC "binexp='" + perl_binexp + "'"
2162$ WC "d_alarm='" + perl_d_alarm + "'"
2163$ WC "d_casti32='" + perl_d_casti32 + "'"
2164$ WC "d_chown='" + perl_d_chown + "'"
2165$ WC "d_chroot='" + perl_d_chroot + "'"
2166$ WC "d_cuserid='" + perl_d_cuserid + "'"
2167$ WC "d_dbl_dig='" + perl_d_dbl_dig + "'"
2168$ WC "d_difftime='" + perl_d_difftime + "'"
2169$ WC "d_fork='" + perl_d_fork + "'"
2170$ WC "d_getlogin='" + perl_d_getlogin + "'"
2171$ WC "d_getppid='" + perl_d_getppid + "'"
2172$ WC "d_htonl='" + perl_d_htonl + "'"
2173$ WC "d_nice='" + perl_d_nice + "'"
2174$ WC "d_pause='" + perl_d_pause + "'"
2175$ WC "d_pipe='" + perl_d_pipe + "'"
2176$ WC "d_readlink='" + perl_d_readlink + "'"
2177$ WC "d_setlinebuf='" + perl_d_setlinebuf + "'"
2178$ WC "d_strchr='" + perl_d_strchr + "'"
2179$ WC "d_index='" + perl_d_index + "'"
2180$ WC "d_strtod='" + perl_d_strtod + "'"
2181$ WC "d_strtol='" + perl_d_strtol + "'"
2182$ WC "d_strtoul='" + perl_d_strtoul + "'"
2183$ WC "d_tcgetpgrp='" + perl_d_tcgetpgrp + "'"
2184$ WC "d_tcsetpgrp='" + perl_d_tcsetpgrp + "'"
2185$ WC "d_times='" + perl_d_times + "'"
2186$ WC "d_tzname='" + perl_d_tzname + "'"
2187$ WC "d_umask='" + perl_d_umask + "'"
2188$ WC "fpostype='" + perl_fpostype + "'"
2189$ WC "i_dlfcn='" + perl_i_dlfcn + "'"
2190$ WC "i_float='" + perl_i_float + "'"
2191$ WC "i_math='" + perl_i_math + "'"
2192$ WC "intsize='" + perl_intsize + "'"
2193$ WC "longsize='" + perl_longsize + "'"
2194$ WC "shortsize='" + perl_shortsize + "'"
2195$ WC "lseektype='" + perl_lseektype + "'"
2196$ WC "i_values='" + perl_i_values + "'"
2197$ WC "malloctype='" + perl_malloctype + "'"
2198$ WC "freetype='" + perl_freetype + "'"
2199$ WC "d_mymalloc='" + perl_d_mymalloc + "'"
2200$ WC "sh='" + perl_sh + "'"
2201$ WC "sig_name='" + perl_sig_name + "'"
2202$ WC "sig_num='" + perl_sig_num + "'"
2203$ tempsym = "sig_name_init='" + perl_sig_name_with_commas + "'"
2204$ WC/symbol tempsym
2205$ WC "modetype='" + perl_modetype + "'"
2206$ WC "ssizetype='" + perl_ssizetype + "'"
2207$ WC "o_nonblock='" + perl_o_nonblock + "'"
2208$ WC "eagain='" + perl_eagain + "'"
2209$ WC "rd_nodata='" + perl_rd_nodata + "'"
2210$ WC "d_eofnblk='" + perl_d_eofnblk + "'"
2211$ WC "d_oldarchlib='" + perl_d_oldarchlib + "'"
2212$ WC "oldarchlibexp='" + perl_oldarchlibexp + "'"
2213$ WC "oldarchlib='" + perl_oldarchlib + "'"
2214$ WC "privlibexp='" + perl_privlibexp + "'"
2215$ WC "privlib='" + perl_privlib + "'"
2216$ WC "sitelibexp='" + perl_sitelibexp + "'"
2217$ WC "sitelib='" + perl_sitelib + "'"
2218$ WC "sitearchexp='" + perl_sitearchexp + "'"
2219$ WC "sitearch='" + perl_sitearch + "'"
2220$ WC "sizetype='" + perl_sizetype + "'"
2221$ WC "i_sysparam='" + perl_i_sysparam + "'"
2222$ WC "d_void_closedir='" + perl_d_void_closedir + "'"
2223$ WC "d_dlerror='" + perl_d_dlerror + "'"
2224$ WC "d_dlsymun='" + perl_d_dlsymun + "'"
2225$ WC "d_suidsafe='" + perl_d_suidsafe + "'"
2226$ WC "d_dosuid='" + perl_d_dosuid + "'"
2227$ WC "d_inetaton='" + perl_d_inetaton + "'"
2228$ WC "d_isascii='" + perl_d_isascii + "'"
2229$ WC "d_mkfifo='" + perl_d_mkfifo + "'"
2230$ WC "d_pathconf='" + perl_d_pathconf + "'"
2231$ WC "d_fpathconf='" + perl_d_fpathconf + "'"
2232$ WC "d_safebcpy='" + perl_d_safebcpy + "'"
2233$ WC "d_safemcpy='" + perl_d_safemcpy + "'"
2234$ WC "d_sanemcmp='" + perl_d_sanemcmp + "'"
2235$ WC "d_setpgrp='" + perl_d_setpgrp + "'"
2236$ WC "d_bsdsetpgrp='" + perl_d_bsdsetpgrp + "'"
2237$ WC "d_bsdpgrp='" + perl_d_bsdpgrp + "'"
2238$ WC "d_setpgid='" + perl_d_setpgid + "'"
2239$ WC "d_setpgrp2='" + perl_d_setpgrp2 + "'"
2240$ WC "d_sysconf='" + perl_d_sysconf + "'"
2241$ WC "d_Gconvert='" + perl_d_Gconvert + "'"
2242$ WC "d_getpgid='" + perl_d_getpgid + "'"
2243$ WC "d_getpgrp='" + perl_d_getpgrp + "'"
2244$ WC "d_bsdgetpgrp='" + perl_d_bsdgetpgrp + "'"
2245$ WC "d_getpgrp2='" + perl_d_getpgrp2 + "'"
2246$ WC "d_sfio='" + perl_d_sfio + "'"
2247$ WC "d_sigsetjmp='" + perl_d_sigsetjmp + "'"
2248$ WC "usedl='" + perl_usedl + "'"
b6e4eeb2 2249$ WC "startperl=" + perl_startperl ! This one's special--no enclosing single quotes
97abc6ad 2250$ WC "db_hashtype='" + perl_db_hashtype + "'"
2251$ WC "db_prefixtype='" + perl_db_prefixtype + "'"
2252$ WC "useperlio='" + perl_useperlio + "'"
2253$ WC "defvoidused='" + perl_defvoidused + "'"
2254$ WC "voidflags='" + perl_voidflags + "'"
2255$ WC "d_eunice='" + perl_d_eunice + "'"
2256$ WC "libs='" + perl_libs + "'"
2257$ WC "libc='" + perl_libc + "'"
2258$ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'"
2259$ WC tempstring
2260$ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'"
2261$ WC tempstring
2262$ WC "pager='" + perl_pager + "'"
2263$ WC "uidtype='" + perl_uidtype + "'"
2264$ WC "gidtype='" + perl_gidtype + "'"
2265$ WC "usethreads='" + perl_usethreads + "'"
2266$ WC "d_pthread_yield='" + perl_d_pthread_yield + "'"
2267$ WC "d_pthreads_created_joinable='" + perl_d_pthreads_created_joinable + "'"
2268$ WC "d_gnulibc='" + perl_d_gnulibc + "'"
2269$ WC "i_netdb='" + perl_i_netdb + "'"
2270$ WC "pidtype='" + perl_pidtype + "'"
2271$ WC "netdb_host_type='" + perl_netdb_host_type + "'"
2272$ WC "netdb_hlen_type='" + perl_netdb_hlen_type + "'"
2273$ WC "netdb_name_type='" + perl_netdb_name_type + "'"
2274$ WC "netdb_net_type='" + perl_netdb_net_type + "'"
2275$ WC "baserev='" + perl_baserev + "'"
2276$ WC "doublesize='" + perl_doublesize + "'"
2277$ WC "ptrsize='" + perl_ptrsize + "'"
2278$ WC "d_gethbyaddr='" + perl_d_gethbyaddr + "'"
2279$ WC "d_gethbyname='" + perl_d_gethbyname + "'"
2280$ WC "d_getnbyaddr='" + perl_d_getnbyaddr + "'"
2281$ WC "d_getnbyname='" + perl_d_getnbyname + "'"
2282$ WC "d_getpbynumber='" + perl_d_getpbynumber + "'"
2283$ WC "d_getpbyname='" + perl_d_getpbyname + "'"
2284$ WC "d_getsbyport='" + perl_d_getsbyport + "'"
2285$ WC "d_getsbyname='" + perl_d_getsbyname + "'"
2286$ WC "d_sethent='" + perl_d_sethent + "'"
2287$ WC "d_oldpthreads='" + perl_d_oldpthreads + "'"
2288$ WC "d_longdbl='" + perl_d_longdbl + "'"
2289$ WC "longdblsize='" + perl_longdblsize + "'"
2290$ WC "d_longlong='" + perl_d_longlong + "'"
2291$ WC "longlongsize='" + perl_longlongsize + "'"
2292$ WC "d_mkstemp='" + perl_d_mkstemp + "'"
2293$ WC "d_setvbuf='" + perl_d_setvbuf + "'"
2294$ WC "d_endhent='" + perl_d_endhent + "'"
2295$ WC "d_endnent='" + perl_d_endsent + "'"
2296$ WC "d_endpent='" + perl_d_endpent + "'"
2297$ WC "d_endsent='" + perl_d_endsent + "'"
2298$ WC "d_gethent='" + perl_d_gethent + "'"
2299$ WC "d_getnent='" + perl_d_getsent + "'"
2300$ WC "d_getpent='" + perl_d_getpent + "'"
2301$ WC "d_getsent='" + perl_d_getsent + "'"
2302$ WC "d_sethent='" + perl_d_sethent + "'"
2303$ WC "d_setnent='" + perl_d_setsent + "'"
2304$ WC "d_setpent='" + perl_d_setpent + "'"
9ef4b0a6 2305$ WC "ebcdic='" + perl_ebcdic + "'"
97abc6ad 2306$ WC "d_setsent='" + perl_d_setsent + "'"
2307$ WC "d_gethostprotos='" + perl_d_gethostprotos + "'"
2308$ WC "d_getnetprotos='" + perl_d_getnetprotos + "'"
2309$ WC "d_getprotoprotos='" + perl_d_getprotoprotos + "'"
2310$ WC "d_getservprotos='" + perl_d_getservprotos + "'"
2311$ WC "d_pwgecos='" + perl_d_pwgecos + "'"
b6e4eeb2 2312$ WC "d_sched_yield='" + perl_d_sched_yield + "'"
2313$ WC "d_lchown='" + perl_d_lchown + "'"
2314$ WC "d_union_semun='" + perl_d_union_semun + "'"
93341792 2315$ WC "i_arpainet='" + perl_i_arpainet + "'"
28e8609d 2316$ WC "d_grpasswd='" + perl_d_grpasswd + "'"
2317$ WC "d_setgrent='" + perl_d_setgrent + "'"
2318$ WC "d_getgrent='" + perl_d_getgrent + "'"
2319$ WC "d_endgrent='" + perl_d_endgrent + "'"
b6e4eeb2 2320$ WC "d_pwpasswd='" + perl_d_pwpasswd + "'"
2321$ WC "d_setpwent='" + perl_d_setpwent + "'"
2322$ WC "d_getpwent='" + perl_d_getpwent + "'"
2323$ WC "d_endpwent='" + perl_d_endpwent + "'"
97abc6ad 2324$ WC "d_semctl_semun='" + perl_d_semctl_semun + "'"
2325$ WC "d_semctl_semid_ds='" + perl_d_semctl_semid_ds + "'"
2326$ WC "extensions='" + perl_extensions + "'"
c05f8f3d 2327$ WC "d_mknod='" + perl_d_mknod + "'"
2328$ WC "devtype='" + perl_devtype + "'"
97abc6ad 2329$!
9ef4b0a6 2330$! ##WRITE NEW CONSTANTS HERE##
2331$!
97abc6ad 2332$ Close CONFIGSH
2333$
2334$! Okay, we've gotten here. Build munchconfig and run it
9ef4b0a6 2335$ 'Perl_CC' munchconfig.c
97abc6ad 2336$ If (Needs_Opt.eqs."Yes")
2337$ THEN
2338$ open/write OPTCHAN []munchconfig.opt
2339$ IF ("''using_gnu_c'".eqs."Yes")
2340$ THEN
2341$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
2342$ endif
2343$ write OPTCHAN "Sys$Share:VAXCRTL/Share"
2344$ Close OPTCHAN
9ef4b0a6 2345$ link munchconfig.obj,munchconfig.opt/opt
97abc6ad 2346$ delete munchconfig.opt;*
2347$ else
9ef4b0a6 2348$ link munchconfig.obj
97abc6ad 2349$ endif
2350$ WRITE_RESULT "Writing config.h"
429a5e67 2351$ !
2352$ ! we need an fdl file
2353$ CREATE [-]CONFIG.FDL
2354RECORD
2355 FORMAT STREAM_LF
2356$ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
2357$ ! First spit out the header info with the local defines (to get
2358$ ! around the 255 character command line limit)
2359$ OPEN/APPEND CONFIG [-]config.local
2360$ if use_debugging_perl.eqs."Y"
2361$ THEN
2362$ WRITE CONFIG "#define DEBUGGING"
2363$ ENDIF
2364$ if preload_env.eqs."Y"
2365$ THEN
2366$ WRITE CONFIG "#define PRIME_ENV_AT_STARTUP"
2367$ ENDIF
2368$ if use_two_pot_malloc.eqs."Y"
2369$ THEN
2370$ WRITE CONFIG "#define TWO_POT_OPTIMIZE"
2371$ endif
2372$ if mymalloc.eqs."Y"
2373$ THEN
2374$ WRITE CONFIG "#define EMBEDMYMALLOC"
2375$ ENDIF
2376$ if use_pack_malloc.eqs."Y"
2377$ THEN
2378$ WRITE CONFIG "#define PACK_MALLOC"
2379$ endif
2380$ if use_debugmalloc.eqs."Y"
2381$ THEN
2382$ write config "#define DEBUGGING_MSTATS"
2383$ ENDIF
2384$ if "''Using_Gnu_C'" .eqs."Yes"
2385$ THEN
2386$ WRITE CONFIG "#define GNUC_ATTRIBUTE_CHECK"
2387$ ENDIF
2388$ if "''Has_Dec_C_Sockets'".eqs."T"
2389$ THEN
2390$ WRITE CONFIG "#define VMS_DO_SOCKETS"
2391$ WRITE CONFIG "#define DECCRTL_SOCKETS"
2392$ ENDIF
2393$ if "''Has_Socketshr'".eqs."T"
2394$ THEN
2395$ WRITE CONFIG "#define VMS_DO_SOCKETS"
2396$ ENDIF
2397$ CLOSE CONFIG
2398$!
2399$! Now build the normal config.h
2400$ define/user sys$output [-]config.main
97abc6ad 2401$ mcr []munchconfig [-]config.sh [-]config_h.sh
429a5e67 2402$ ! Concatenate them together
2403$ copy [-]config.local,[-]config.main [-]config.h
2404$! Clean up
2405$ DELETE/NOLOG [-]CONFIG.MAIN;*
2406$ DELETE/NOLOG [-]CONFIG.LOCAL;*
2407$ DELETE/NOLOG [-]CONFIG.FDL;*
2408$!
97abc6ad 2409$ if "''Using_Dec_C'" .eqs."Yes"
2410$ THEN
2411$ DECC_REPLACE = "DECC=decc=1"
2412$ ELSE
2413$ DECC_REPLACE = "DECC="
2414$ ENDIF
2415$ if "''Using_Gnu_C'" .eqs."Yes"
2416$ THEN
2417$ GNUC_REPLACE = "GNUC=gnuc=1"
2418$ ELSE
2419$ GNUC_REPLACE = "GNUC="
2420$ ENDIF
2421$ if "''Has_Dec_C_Sockets'" .eqs."T"
2422$ THEN
2423$ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
2424$ ELSE
2425$ if "''Has_Socketshr'" .eqs."T"
2426$ THEN
2427$ SOCKET_REPLACE = "SOCKET=SOCKETSHRSOCKETS=1"
2428$ ELSE
2429$ SOCKET_REPLACE = "SOCKET="
2430$ ENDIF
2431$ ENDIF
2432$ IF ("''Use_Threads'".eqs."T")
2433$ THEN
2434$ if ("''VMS_VER'".LES."6.2")
2435$ THEN
2436$ THREAD_REPLACE = "THREAD=OLDTHREADED=1"
2437$ ELSE
2438$ THREAD_REPLACE = "THREAD=THREADED=1"
2439$ ENDIF
429a5e67 2440$ ELSE
2441$ THREAD_REPLACE = "THREAD="
2442$ ENDIF
2443$ if mymalloc.eqs."Y"
2444$ THEN
2445$ MALLOC_REPLACE = "MALLOC=MALLOC=1"
2446$ ELSE
2447$ MALLOC_REPLACE = "MALLOC="
97abc6ad 2448$ ENDIF
2449$ if f$getsyi("HW_MODEL").ge.1024
2450$ THEN
2451$ ARCH_TYPE = "ARCH-TYPE=__AXP__"
2452$ ELSE
2453$ ARCH_TYPE = "ARCH-TYPE=__VAX__"
2454$ ENDIF
2455$ WRITE_RESULT "Writing DESCRIP.MMS"
2456$!set ver
2457$ define/user sys$output [-]descrip.mms
429a5e67 2458$ 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'"
97abc6ad 2459$! set nover
2460$!
2461$! Clean up after ourselves
2462$ delete/nolog munchconfig.exe;*
2463$ delete/nolog munchconfig.obj;*