 $     write libopt ")"
 $     close/nolog bopt
 $     delete/nolog/noconf a.opt;*,b.opt;*
-$ else 
+$ else
 $     if vax
 $     then
+$     open/append libopt 'p2'
+$     mod_sym_num = 1
+$ VMOD_SYM_LOOP:
+$     if f$type(module'mod_sym_num') .nes. ""
+$     then
+$         mod_in = 0
+$ VMOD_SYM_IN:
+$         shared_proc = f$element(mod_in, "#", module'mod_sym_num')
+$         if shared_proc .nes. "#"
+$         then
+$     	      write libopt f$fao("UNIVERSAL=!AS",-
+      	  			     f$edit(shared_proc,"upcase"))
+$             mod_in = mod_in + 1
+$             goto vmod_sym_in
+$         endif
+$         mod_sym_num = mod_sym_num + 1
+$         goto vmod_sym_loop
+$     endif
 $VMAP_LOOP:
 $     	  read/end=vmap_end map line
 $     	  if (f$locate("{",line).lt. f$length(line)) .or. -
-$     	      (f$locate("global:", line) .lt. f$length(line))
+   	      (f$locate("global:", line) .lt. f$length(line))
 $     	  then
 $     	      proc = true
 $     	      goto vmap_loop

$ EXIT_M2S:
$ close/nolog map
$ close/nolog libopt
$ endsubroutine 
$!------------------------------------------------------------------------------

$! 0.03 20091224 Add support for large file check
$! 0.04 20100110 Add new gzclose, gzlib, gzread, gzwrite
$! 0.05 20100221 Exchange zlibdefs.h by zconf.h.in
$! 0.06 20120111 Fix missing amiss_err, update zconf_h.in, fix new exmples
$!               subdir path, update module search in makefile.in
$! 0.07 20120115 Triggered by work done by Alexey Chupahin completly redesigned
$!               shared image creation
$! 0.08 20120219 Make it work on VAX again, pre-load missing symbols to shared
$!               image
$!
$ on error then goto err_exit
$!
$ true  = 1
$ false = 0
