1 $! make libz under VMS written by
4 $! In case of problems with the install you might contact me at
5 $! zinser@zinser.no-ip.info(preferred) or
6 $! martin.zinser@eurexchange.com (work)
8 $! Make procedure history for Zlib
10 $!------------------------------------------------------------------------------
12 $! 0.01 20060120 First version to receive a number
13 $! 0.02 20061008 Adapt to new Makefile.in
14 $! 0.03 20091224 Add support for large file check
15 $! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite
16 $! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in
17 $! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new exmples
18 $! subdir path, update module search in makefile.in
19 $! 0.07 20120115 Triggered by work done by Alexey Chupahin completly redesigned
20 $! shared image creation
21 $! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared
24 $ on error then goto err_exit
28 $ tmpnam = "temp_" + f$getjpi("","pid")
29 $ tt = tmpnam + ".txt"
32 $ define/nolog tconfig 'th'
38 $! Setup variables holding "config" information
43 $ v_string = "ZLIB_VERSION"
48 $ aconf_in_file = "zconf.h.in#zconf.h_in#zconf_h.in"
49 $ conf_check_string = ""
51 $ optfile = name + ".opt"
52 $ mapfile = name + ".map"
54 $ vax = f$getsyi("HW_MODEL").lt.1024
55 $ axp = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096
56 $ ia64 = f$getsyi("HW_MODEL").ge.4096
58 $ if axp .or. ia64 then set proc/parse=extended
59 $ whoami = f$parse(f$enviornment("Procedure"),,,,"NO_CONCEAL")
60 $ mydef = F$parse(whoami,,,"DEVICE")
61 $ mydir = f$parse(whoami,,,"DIRECTORY") - "]["
62 $ myproc = f$parse(whoami,,,"Name") + f$parse(whoami,,,"type")
66 $ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
67 $ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
72 $ open/write topt tmp.opt
73 $ open/write optf 'optfile'
77 $! Look for the compiler used
79 $ gosub check_compiler
85 $ ccopt = "/prefix=all" + ccopt
86 $ if f$trnlnm("SYS") .eqs. ""
90 $ define sys sys$library:
92 $ ccopt = "/decc" + ccopt
93 $ define sys decc$library_include:
98 $ ccopt = ccopt + "/name=as_is/opt=(inline=speed)"
102 $ if its_vaxc .or. its_gnuc
104 $ if f$trnlnm("SYS").eqs."" then define sys sys$library:
107 $! Build a fake configure input header
109 $ open/write conf_hin config.hin
110 $ write conf_hin "#undef _LARGEFILE64_SOURCE"
116 $ fname = f$element(i,"#",aconf_in_file)
117 $ if fname .eqs. "#" then goto AMISS_ERR
118 $ if f$search(fname) .eqs. ""
123 $ open/read/err=aconf_err aconf_in 'fname'
124 $ open/write aconf zconf.h
126 $ read/end_of_file=aconf_exit aconf_in line
127 $ work = f$edit(line, "compress,trim")
128 $ if f$extract(0,6,work) .nes. "#undef"
130 $ if f$extract(0,12,work) .nes. "#cmakedefine"
135 $ cdef = f$element(1," ",work)
140 $ write aconf "#define VMS 1"
141 $ write aconf "#include <unistd.h>"
142 $ write aconf "#include <unixio.h>"
143 $ write aconf "#ifdef _LARGEFILE"
144 $ write aconf "#define off64_t __off64_t"
145 $ write aconf "#define fopen64 fopen"
146 $ write aconf "#define fseeko64 fseeko"
147 $ write aconf "#define lseek64 lseek"
148 $ write aconf "#define ftello64 ftell"
149 $ write aconf "#endif"
152 $ if f$search("''th'") .nes. "" then delete 'th';*
153 $! Build the thing plain or with mms
155 $ write sys$output "Compiling Zlib sources ..."
158 $ dele example.obj;*,minigzip.obj;*
159 $ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" -
160 adler32.c zlib.h zconf.h
161 $ CALL MAKE compress.OBJ "CC ''CCOPT' compress" -
162 compress.c zlib.h zconf.h
163 $ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" -
164 crc32.c zlib.h zconf.h
165 $ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" -
166 deflate.c deflate.h zutil.h zlib.h zconf.h
167 $ CALL MAKE gzclose.OBJ "CC ''CCOPT' gzclose" -
168 gzclose.c zutil.h zlib.h zconf.h
169 $ CALL MAKE gzlib.OBJ "CC ''CCOPT' gzlib" -
170 gzlib.c zutil.h zlib.h zconf.h
171 $ CALL MAKE gzread.OBJ "CC ''CCOPT' gzread" -
172 gzread.c zutil.h zlib.h zconf.h
173 $ CALL MAKE gzwrite.OBJ "CC ''CCOPT' gzwrite" -
174 gzwrite.c zutil.h zlib.h zconf.h
175 $ CALL MAKE infback.OBJ "CC ''CCOPT' infback" -
176 infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
177 $ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" -
178 inffast.c zutil.h zlib.h zconf.h inffast.h
179 $ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" -
180 inflate.c zutil.h zlib.h zconf.h infblock.h
181 $ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" -
182 inftrees.c zutil.h zlib.h zconf.h inftrees.h
183 $ CALL MAKE trees.OBJ "CC ''CCOPT' trees" -
184 trees.c deflate.h zutil.h zlib.h zconf.h
185 $ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" -
186 uncompr.c zlib.h zconf.h
187 $ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
188 zutil.c zutil.h zlib.h zconf.h
189 $ write sys$output "Building Zlib ..."
190 $ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
191 $ write sys$output "Building example..."
192 $ CALL MAKE example.OBJ "CC ''CCOPT'/include=[] [.test]example" -
193 [.test]example.c zlib.h zconf.h
194 $ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
195 $ if f$search("x11vms:xvmsutils.olb") .nes. ""
197 $ write sys$output "Building minigzip..."
198 $ CALL MAKE minigzip.OBJ "CC ''CCOPT'/include=[] [.test]minigzip" -
199 [.test]minigzip.c zlib.h zconf.h
200 $ call make minigzip.exe -
201 "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" -
202 minigzip.obj libz.olb
206 $ write sys$output "Make ''name' ''version' with ''Make' "
210 $! Create shareable image
213 $ write sys$output "Creating libzshr.exe"
214 $ call map_2_shopt 'mapfile' 'optfile'
215 $ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,'optfile'/opt
216 $ write sys$output "Zlib build completed"
217 $ delete/nolog tmp.opt;*
220 $ write sys$output "No source for config.hin found."
221 $ write sys$output "Tried any of ''aconf_in_file'"
224 $ write sys$output "C compiler required to build ''name'"
227 $ set message/facil/ident/sever/text
230 $ close/nolog conf_hin
231 $ close/nolog aconf_in
237 $ write sys$output "Exiting..."
241 $MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
243 $! P1 = What we are trying to make
244 $! P2 = Command to make it
245 $! P3 - P8 What it depends on
247 $ If F$Search(P1) .Eqs. "" Then Goto Makeit
248 $ Time = F$CvTime(F$File(P1,"RDT"))
252 $ If Argument .Eqs. "" Then Goto Exit
255 $ File = F$Element(El," ",Argument)
256 $ If File .Eqs. " " Then Goto Endl
260 $ AFile = F$Search(File)
261 $ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
262 $ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
269 $ If arg .Le. 8 Then Goto Loop
274 $ write sys$output P2
278 $ If V Then Set Verify
280 $!------------------------------------------------------------------------------
282 $! Check command line options and set symbols accordingly
284 $!------------------------------------------------------------------------------
286 $! 0.01 20041206 First version to receive a number
287 $! 0.02 20060126 Add new "HELP" target
293 $ cparm = f$edit(p'i',"upcase")
295 $! Check if parameter actually contains something
297 $ if f$edit(cparm,"trim") .nes. ""
299 $ if cparm .eqs. "DEBUG"
301 $ ccopt = ccopt + "/noopt/deb"
302 $ lopts = lopts + "/deb"
304 $ if f$locate("CCOPT=",cparm) .lt. f$length(cparm)
306 $ start = f$locate("=",cparm) + 1
307 $ len = f$length(cparm) - start
308 $ ccopt = ccopt + f$extract(start,len,cparm)
309 $ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) -
312 $ if cparm .eqs. "LINK" then linkonly = true
313 $ if f$locate("LOPTS=",cparm) .lt. f$length(cparm)
315 $ start = f$locate("=",cparm) + 1
316 $ len = f$length(cparm) - start
317 $ lopts = lopts + f$extract(start,len,cparm)
319 $ if f$locate("CC=",cparm) .lt. f$length(cparm)
321 $ start = f$locate("=",cparm) + 1
322 $ len = f$length(cparm) - start
323 $ cc_com = f$extract(start,len,cparm)
324 if (cc_com .nes. "DECC") .and. -
325 (cc_com .nes. "VAXC") .and. -
326 (cc_com .nes. "GNUC")
328 $ write sys$output "Unsupported compiler choice ''cc_com' ignored"
329 $ write sys$output "Use DECC, VAXC, or GNUC instead"
331 $ if cc_com .eqs. "DECC" then its_decc = true
332 $ if cc_com .eqs. "VAXC" then its_vaxc = true
333 $ if cc_com .eqs. "GNUC" then its_gnuc = true
336 $ if f$locate("MAKE=",cparm) .lt. f$length(cparm)
338 $ start = f$locate("=",cparm) + 1
339 $ len = f$length(cparm) - start
340 $ mmks = f$extract(start,len,cparm)
341 $ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS")
345 $ write sys$output "Unsupported make choice ''mmks' ignored"
346 $ write sys$output "Use MMK or MMS instead"
349 $ if cparm .eqs. "HELP" then gosub bhelp
355 $!------------------------------------------------------------------------------
357 $! Look for the compiler used
360 $! 0.01 20040223 First version to receive a number
361 $! 0.02 20040229 Save/set value of decc$no_rooted_search_lists
362 $! 0.03 20060202 Extend handling of GNU C
363 $! 0.04 20090402 Compaq -> hp
365 $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
367 $ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "")
368 $ its_vaxc = .not. its_decc .and. (F$Search("SYS$System:VAXC.Exe") .nes. "")
369 $ its_gnuc = .not. (its_decc .or. its_vaxc) .and. (f$trnlnm("gnu_cc") .nes. "")
372 $! Exit if no compiler available
374 $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
379 $ write sys$output "CC compiler check ... hp C"
380 $ if f$trnlnm("decc$no_rooted_search_lists") .nes. ""
382 $ dnrsl = f$trnlnm("decc$no_rooted_search_lists")
384 $ define/nolog decc$no_rooted_search_lists 1
386 $ if its_vaxc then write sys$output "CC compiler check ... VAX C"
389 $ write sys$output "CC compiler check ... GNU C"
390 $ if f$trnlnm(topt) then write topt "gnu_cc:[000000]gcclib.olb/lib"
391 $ if f$trnlnm(optf) then write optf "gnu_cc:[000000]gcclib.olb/lib"
394 $ if f$trnlnm(topt) then write topt "sys$share:vaxcrtl.exe/share"
395 $ if f$trnlnm(optf) then write optf "sys$share:vaxcrtl.exe/share"
399 $!------------------------------------------------------------------------------
401 $! If MMS/MMK are available dump out the descrip.mms if required
404 $ write sys$output "Creating descrip.mms..."
406 $ open/append out descrip.mms
407 $ copy sys$input: out
409 # descrip.mms: MMS description file for building zlib on VMS
410 # written by Martin P.J. Zinser
411 # <zinser@zinser.no-ip.info or martin.zinser@eurexchange.com>
413 OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzlib.obj\
414 gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\
415 deflate.obj, trees.obj, zutil.obj, inflate.obj, \
416 inftrees.obj, inffast.obj
419 $ write out "CFLAGS=", ccopt
420 $ write out "LOPTS=", lopts
421 $ if f$search("x11vms:xvmsutils.olb") .nes. ""
423 $ write out "all : example.exe minigzip.exe libz.olb"
425 $ write out "all : example.exe libz.olb"
427 $ copy sys$input: out
429 @ write sys$output " Example applications available"
431 libz.olb : libz.olb($(OBJS))
432 @ write sys$output " libz available"
434 example.exe : example.obj libz.olb
435 link $(LOPTS) example,libz.olb/lib
437 minigzip.exe : minigzip.obj libz.olb
438 link $(LOPTS) minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib
441 delete *.obj;*,libz.olb;*,*.opt;*,*.exe;*
444 # Other dependencies.
445 adler32.obj : adler32.c zutil.h zlib.h zconf.h
446 compress.obj : compress.c zlib.h zconf.h
447 crc32.obj : crc32.c zutil.h zlib.h zconf.h
448 deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h
449 example.obj : [.test]example.c zlib.h zconf.h
450 cc $(CFLAGS)/include=[] [.test]example.c
451 gzclose.obj : gzclose.c zutil.h zlib.h zconf.h
452 gzlib.obj : gzlib.c zutil.h zlib.h zconf.h
453 gzread.obj : gzread.c zutil.h zlib.h zconf.h
454 gzwrite.obj : gzwrite.c zutil.h zlib.h zconf.h
455 inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h
456 inflate.obj : inflate.c zutil.h zlib.h zconf.h
457 inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h
458 minigzip.obj : [.test]minigzip.c zlib.h zconf.h
459 cc $(CFLAGS)/include=[] [.test]minigzip.c
460 trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h
461 uncompr.obj : uncompr.c zlib.h zconf.h
462 zutil.obj : zutil.c zutil.h zlib.h zconf.h
463 infback.obj : infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
467 $!------------------------------------------------------------------------------
469 $! Read list of core library sources from makefile.in and create options
470 $! needed to build shareable image
473 $ open/read min makefile.in
474 $ open/write mod modules.opt
475 $ src_check_list = "OBJZ =#OBJG ="
477 $ read/end=mrdone min rec
480 $ src_check = f$element(i, "#", src_check_list)
482 $ if src_check .eqs. "#" then goto mrloop
483 $ if (f$extract(0,6,rec) .nes. src_check) then goto src_check_loop
484 $ rec = rec - src_check
486 $ if (f$element(1,"\",rec) .eqs. "\") then goto mrloop
488 $ read/end=mrdone min rec
490 $ if (f$element(1,"\",rec) .nes. "\") then goto mrsloop
495 $!------------------------------------------------------------------------------
497 $! Take record extracted in crea_olist and split it into single filenames
500 $ myrec = f$edit(rec - "\", "trim,compress")
503 $ srcfil = f$element(i," ", myrec)
504 $ if (srcfil .nes. " ")
506 $ write mod f$parse(srcfil,,,"NAME"), ".obj"
511 $!------------------------------------------------------------------------------
513 $! Find current Zlib version number
516 $ open/read h_in 'v_file'
518 $ read/end=hdone h_in rec
519 $ rec = f$edit(rec,"TRIM")
520 $ if (f$extract(0,1,rec) .nes. "#") then goto hloop
521 $ rec = f$edit(rec - "#", "TRIM")
522 $ if f$element(0," ",rec) .nes. "define" then goto hloop
523 $ if f$element(1," ",rec) .eqs. v_string
525 $ version = 'f$element(2," ",rec)'
532 $!------------------------------------------------------------------------------
536 $ in_ldef = f$locate(cdef,libdefs)
537 $ if (in_ldef .lt. f$length(libdefs))
539 $ write aconf "#define ''cdef' 1"
540 $ libdefs = f$extract(0,in_ldef,libdefs) + -
541 f$extract(in_ldef + f$length(cdef) + 1, -
542 f$length(libdefs) - in_ldef - f$length(cdef) - 1, -
545 $ if (f$type('cdef') .eqs. "INTEGER")
547 $ write aconf "#define ''cdef' ", 'cdef'
549 $ if (f$type('cdef') .eqs. "STRING")
551 $ write aconf "#define ''cdef' ", """", '''cdef'', """"
558 $!------------------------------------------------------------------------------
560 $! Check if this is a define relating to the properties of the C/C++
564 $ if (cdef .eqs. "_LARGEFILE64_SOURCE")
566 $ copy sys$input: 'tc'
574 fp = fopen("temp.txt","r");
575 fseeko(fp,1,SEEK_SET);
582 $ gosub cc_prop_check
585 $ write aconf "/* ", line, " */"
587 $!------------------------------------------------------------------------------
589 $! Check for properties of C/C++ compiler
592 $! 0.01 20031020 First version to receive a number
593 $! 0.02 20031022 Added logic for defines with value
594 $! 0.03 20040309 Make sure local config file gets not deleted
595 $! 0.04 20041230 Also write include for configure run
596 $! 0.05 20050103 Add processing of "comment defines"
600 $ is_need = (f$extract(0,4,cdef) .eqs. "NEED") .or. (test_inv .eq. true)
601 $ if f$search(th) .eqs. "" then create 'th'
602 $ set message/nofac/noident/nosever/notext
603 $ on error then continue
605 $ if .not. ($status) then cc_prop = false
606 $ on error then continue
607 $! The headers might lie about the capabilities of the RTL
608 $ link 'tmpnam',tmp.opt/opt
609 $ if .not. ($status) then cc_prop = false
610 $ set message/fac/ident/sever/text
611 $ on error then goto err_exit
612 $ delete/nolog 'tmpnam'.*;*/exclude='th'
613 $ if (cc_prop .and. .not. is_need) .or. -
614 (.not. cc_prop .and. is_need)
616 $ write sys$output "Checking for ''cdef'... yes"
617 $ if f$type('cdef_val'_yes) .nes. ""
619 $ if f$type('cdef_val'_yes) .eqs. "INTEGER" -
620 then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_yes)
621 $ if f$type('cdef_val'_yes) .eqs. "STRING" -
622 then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_yes)
624 $ call write_config f$fao("#define !AS 1",cdef)
626 $ if (cdef .eqs. "HAVE_FSEEKO") .or. (cdef .eqs. "_LARGE_FILES") .or. -
627 (cdef .eqs. "_LARGEFILE64_SOURCE") then -
628 call write_config f$string("#define _LARGEFILE 1")
630 $ write sys$output "Checking for ''cdef'... no"
633 call write_config f$fao("/* !AS */",line)
635 $ if f$type('cdef_val'_no) .nes. ""
637 $ if f$type('cdef_val'_no) .eqs. "INTEGER" -
638 then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_no)
639 $ if f$type('cdef_val'_no) .eqs. "STRING" -
640 then call write_config f$fao("#define !AS !AS",cdef,'cdef_val'_no)
642 $ call write_config f$fao("#undef !AS",cdef)
647 $!------------------------------------------------------------------------------
649 $! Check for properties of C/C++ compiler with multiple result values
652 $! 0.01 20040127 First version
653 $! 0.02 20050103 Reconcile changes from cc_prop up to version 0.05
659 $ if f$type(result_'i') .eqs. "STRING"
661 $ set message/nofac/noident/nosever/notext
662 $ on error then continue
664 $ if .not. ($status) then cc_prop = false
665 $ on error then continue
666 $! The headers might lie about the capabilities of the RTL
667 $ link 'tmpnam'_'i',tmp.opt/opt
668 $ if .not. ($status) then cc_prop = false
669 $ set message/fac/ident/sever/text
670 $ on error then goto err_exit
671 $ delete/nolog 'tmpnam'_'i'.*;*
674 $ write sys$output "Checking for ''cdef'... ", mdef_'i'
675 $ if f$type(mdef_'i') .eqs. "INTEGER" -
676 then call write_config f$fao("#define !AS !UL",cdef,mdef_'i')
677 $ if f$type('cdef_val'_yes) .eqs. "STRING" -
678 then call write_config f$fao("#define !AS !AS",cdef,mdef_'i')
685 $ write sys$output "Checking for ''cdef'... no"
686 $ call write_config f$fao("#undef !AS",cdef)
688 $ if (idel .le. msym_max)
690 $ delete/sym mdef_'idel'
695 $!------------------------------------------------------------------------------
697 $! Write configuration to both permanent and temporary config file
700 $! 0.01 20031029 First version to receive a number
702 $WRITE_CONFIG: SUBROUTINE
704 $ open/append confh 'th'
708 $!------------------------------------------------------------------------------
710 $! Analyze the project map file and create the symbol vector for a shareable
714 $! 0.01 20120128 First version
715 $! 0.02 20120226 Add pre-load logic
717 $ MAP_2_SHOPT: Subroutine
719 $ SAY := "WRITE_ SYS$OUTPUT"
721 $ IF F$SEARCH("''P1'") .EQS. ""
723 $ SAY "MAP_2_SHOPT-E-NOSUCHFILE: Error, inputfile ''p1' not available"
726 $ IF "''P2'" .EQS. ""
728 $ SAY "MAP_2_SHOPT: Error, no output file provided"
732 $ module1 = "deflate#deflateEnd#deflateInit_#deflateParams#deflateSetDictionary"
733 $ module2 = "gzclose#gzerror#gzgetc#gzgets#gzopen#gzprintf#gzputc#gzputs#gzread"
734 $ module3 = "gzseek#gztell#inflate#inflateEnd#inflateInit_#inflateSetDictionary"
735 $ module4 = "inflateSync#uncompress#zlibVersion#compress"
739 $ open/write aopt a.opt
740 $ open/write bopt b.opt
741 $ write aopt " CASE_SENSITIVE=YES"
742 $ write bopt "SYMBOL_VECTOR= (-"
745 $ if f$type(module'mod_sym_num') .nes. ""
749 $ shared_proc = f$element(mod_in, "#", module'mod_sym_num')
750 $ if shared_proc .nes. "#"
752 $ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",-
753 f$edit(shared_proc,"upcase"),shared_proc)
754 $ write bopt f$fao("!AS=PROCEDURE,-",shared_proc)
755 $ mod_in = mod_in + 1
758 $ mod_sym_num = mod_sym_num + 1
762 $ read/end=map_end map line
763 $ if (f$locate("{",line).lt. f$length(line)) .or. -
764 (f$locate("global:", line) .lt. f$length(line))
769 $ if f$locate("}",line).lt. f$length(line) then proc = false
770 $ if f$locate("local:", line) .lt. f$length(line) then proc = false
773 $ shared_proc = f$edit(line,"collapse")
774 $ chop_semi = f$locate(";", shared_proc)
775 $ if chop_semi .lt. f$length(shared_proc) then -
776 shared_proc = f$extract(0, chop_semi, shared_proc)
777 $ write aopt f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)",-
778 f$edit(shared_proc,"upcase"),shared_proc)
779 $ write bopt f$fao("!AS=PROCEDURE,-",shared_proc)
785 $ open/append libopt 'p2'
786 $ open/read aopt a.opt
787 $ open/read bopt b.opt
789 $ read/end=aloop_end aopt line
796 $ read/end=bloop_end bopt svn
799 $ if (sv.nes."") then write libopt sv
804 $ write libopt f$extract(0,f$length(sv)-2,sv), "-"
807 $ delete/nolog/noconf a.opt;*,b.opt;*
811 $ open/append libopt 'p2'
814 $ if f$type(module'mod_sym_num') .nes. ""
818 $ shared_proc = f$element(mod_in, "#", module'mod_sym_num')
819 $ if shared_proc .nes. "#"
821 $ write libopt f$fao("UNIVERSAL=!AS",-
822 f$edit(shared_proc,"upcase"))
823 $ mod_in = mod_in + 1
826 $ mod_sym_num = mod_sym_num + 1
830 $ read/end=vmap_end map line
831 $ if (f$locate("{",line).lt. f$length(line)) .or. -
832 (f$locate("global:", line) .lt. f$length(line))
837 $ if f$locate("}",line).lt. f$length(line) then proc = false
838 $ if f$locate("local:", line) .lt. f$length(line) then proc = false
841 $ shared_proc = f$edit(line,"collapse")
842 $ chop_semi = f$locate(";", shared_proc)
843 $ if chop_semi .lt. f$length(shared_proc) then -
844 shared_proc = f$extract(0, chop_semi, shared_proc)
845 $ write libopt f$fao("UNIVERSAL=!AS",-
846 f$edit(shared_proc,"upcase"))
851 $ write sys$output "Unknown Architecture (Not VAX, AXP, or IA64)"
852 $ write sys$output "No options file created"