$! This .COM file expects to be called by configure.com, and thus expects
$! a few symbols in the environment. Notably:
$!
-$! One of: Using_Dec_C, Using_Vax_C, Using_Gnu_C set to "YES"
+$! One of: Using_Dec_C, Using_Gnu_C set to "YES"
$! Dec_C_Version set to the Dec C version (defaults to 0 if not specified)
$! Has_Socketshr set to "T" if using socketshr
$! Has_Dec_C_Sockets set to "T" if using Dec C sockets
$! Use_Threads set to "T" if they're using threads
$! C_Compiler_Invoke is the command needed to invoke the C compiler
$!
+$! We'll be playing with Sys$Output; don't clutter it
+$ Set NoVerify
+$!
$! Set Dec_C_Version to something
$ WRITE_RESULT := "WRITE SYS$OUTPUT ""%CONFIG-I-RESULT "" + "
$ echo = "Write Sys$Output "
$ ELSE
$ Checkcc := "''Mcc'"
$ ENDIF
-$! cc_flags = ""
+$ cc_flags = cc_flags + extra_flags
+$ if be_case_sensitive
+$ then
+$ d_vms_be_case_sensitive = "define"
+$ else
+$ d_vms_be_case_sensitive = "undef"
+$ endif
$ if use_multiplicity .eqs. "Y"
$ THEN
$ perl_usemultiplicity = "define"
$ if "''myname'" .eqs. "" THEN myname = f$trnlnm("SYS$NODE")
$!
$! ##ADD NEW CONSTANTS HERE##
+$ perl_shmattype = ""
+$ perl_mmaptype = ""
+$ perl_gidformat = "lu"
+$ perl_gidsize = "4"
+$ perl_groupstype = "Gid_t"
+$ perl_stdio_stream_array = ""
+$ perl_uidformat = "lu"
+$ perl_uidsize = "4"
$ perl_d_getcwd = "undef"
$ perl_d_nv_preserves_uv = "define"
$ perl_d_fs_data_s = "undef"
$ perl_d_statfs_f_flags = "undef"
$ perl_d_statfs_s = "undef"
$ perl_d_ustat = "undef"
+$ perl_i_ieeefp = "undef"
+$ perl_i_sunmath = "undef"
$ perl_i_sysstatfs = "undef"
$ perl_i_sysvfs = "undef"
$ perl_i_ustat = "undef"
$ perl_d_llseek="undef"
$ perl_d_iconv="undef"
$ perl_d_madvise="undef"
-$ perl_selectminbits=32
+$ perl_selectminbits="32"
+$ perl_d_vendorarch="undef"
+$ perl_vendorarchexp=""
$ perl_d_msync="undef"
$ perl_d_mprotect="undef"
$ perl_d_munmap="undef"
$ perl_usesocks="undef"
$ perl_d_vendorlib="undef"
$ perl_vendorlibexp=""
+$ perl_vendorlib_stem=""
$ perl_d_statfsflags="undef"
$ perl_i_sysstatvfs="undef"
$ perl_i_mntent="undef"
$ perl_CONFIG="true"
$ perl_d_fseeko="undef"
$ perl_d_ftello="undef"
+$ perl_d_qgcvt="undef"
$ perl_d_readv="undef"
$ perl_d_writev="undef"
$ perl_i_machcthr="undef"
$ perl_d_recvmsg = "undef"
$ perl_d_msghdr_s = "undef"
$ perl_d_cmsghdr_s = "undef"
-$ IF use_64bit .eqs. "Y"
+$ IF (use64bitint)
$ THEN
-$ perl_use64bits = "define"
+$ perl_use64bitint = "define"
$ perl_uselargefiles = "define"
$ perl_uselongdouble = "define"
$ perl_usemorebits = "define"
$ ELSE
-$ perl_use64bits = "undef"
+$ perl_use64bitint = "undef"
$ perl_uselargefiles = "undef"
$ perl_uselongdouble = "undef"
$ perl_usemorebits = "undef"
$ ENDIF
-$ IF use_full64bit .eqs. "Y"
+$ IF (use64bitall)
$ THEN
-$ perl_usefull64bits = "define"
+$ perl_use64bitall = "define"
$ ELSE
-$ perl_usefull64bits = "undef"
+$ perl_use64bitall = "undef"
$ ENDIF
$ perl_d_drand48proto = "define"
$ perl_d_lseekproto = "define"
$ perl_d_bincompat3="undef"
$ perl_cppstdin="''Perl_CC'/noobj/preprocess=sys$output sys$input"
$ perl_cppminus=" "
+$ perl_cpprun="''Perl_CC'/noobj/preprocess=sys$output sys$input"
+$ perl_cpplast=" "
+$ perl_aphostname=""
$ perl_d_castneg="define"
$ perl_castflags="0"
$ perl_d_chsize="undef"
$ perl_privlib="''perl_prefix':[lib]"
$ perl_sitelibexp="''perl_prefix':[lib.site_perl]"
$ perl_sitelib="''perl_prefix':[lib.site_perl]"
+$ perl_sitelib_stem="''perl_prefix':[lib.site_perl]"
$ perl_sizetype="size_t"
$ perl_i_sysparam="undef"
$ perl_d_void_closedir="define"
$!
$! Are we 64 bit?
$!
-$ if (use_64bit .eqs. "Y")
+$ if (use64bitint)
$ THEN
$ perl_d_PRIfldbl = "define"
$ perl_d_PRIgldbl = "define"
$ perl_d_quad = "define"
$ perl_quadtype = "long long"
$ perl_uquadtype = "unsigned long long"
+$ perl_quadkind = "QUAD_IS_LONG_LONG"
$ ELSE
$ perl_d_PRIfldbl = "undef"
$ perl_d_PRIgldbl = "undef"
$ perl_sPRIo64 = ""
$ perl_sPRIx64 = ""
$ perl_d_quad = "undef"
+$ perl_quadtype = "long"
+$ perl_uquadtype = "unsigned long"
+$ perl_quadkind = "QUAD_IS_LONG"
$ ENDIF
$!
$! Now some that we build up
$ ENDIF
$ if ("''Use_Threads'".eqs."T")
$ THEN
-$ perl_arch = "''perl_arch'-thread"
-$ perl_archname = "''perl_archname'-thread"
-$ perl_d_old_pthread_create_joinable = "undef"
-$ perl_old_pthread_create_joinable = " "
-$ perl_use5005threads = "define"
+$ if use_5005_threads
+$ THEN
+$ perl_arch = "''perl_arch'-thread"
+$ perl_archname = "''perl_archname'-thread"
+$ perl_d_old_pthread_create_joinable = "undef"
+$ perl_old_pthread_create_joinable = " "
+$ perl_use5005threads = "define"
+$ perl_useithreads = "undef"
+$ ELSE
+$ perl_arch = "''perl_arch'-ithread"
+$ perl_archname = "''perl_archname'-ithread"
+$ perl_d_old_pthread_create_joinable = "undef"
+$ perl_old_pthread_create_joinable = " "
+$ perl_use5005threads = "undef"
+$ perl_useithreads = "define"
+$ ENDIF
$ ELSE
-$ perl_d_old_pthread_create_joinable = "undef"
-$ perl_old_pthread_create_joinable = " "
-$ perl_use5005threads = "undef"
+$ perl_d_old_pthread_create_joinable = "undef"
+$ perl_old_pthread_create_joinable = " "
+$ perl_use5005threads = "undef"
+$ perl_useithreads = "undef"
$ ENDIF
-$ perl_useithreads = "undef"
$ perl_osvers=f$edit(osvers, "TRIM")
$ if (perl_subversion + 0).eq.0
$ THEN
$ CS := "close SOURCECHAN"
$ DS := "delete/nolog []temp.*;*"
$ Needs_Opt := "No"
-$ if ("''using_vax_c'".eqs."Yes").or.("''using_gnu_c'".eqs."Yes")
+$ if ("''using_gnu_c'".eqs."Yes")
$ THEN
$ open/write OPTCHAN []temp.opt
-$ IF ("''using_gnu_c'".eqs."Yes")
-$ THEN
-$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
-$ endif
+$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
$ write OPTCHAN "Sys$Share:VAXCRTL/Share"
$ Close OPTCHAN
$ Needs_Opt := "Yes"
$ ENDIF
$ WRITE_RESULT "i_inttypes is ''perl_i_inttypes'"
$!
+$! Check for h_errno
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <netdb.h>
+$ WS "int main()
+$ WS "{"
+$ WS "h_errno = 3;
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_herrno="undef"
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ ELSE
+$ If (Needs_Opt)
+$ THEN
+$ link temp.obj,temp.opt/opt
+$ else
+$ link temp.obj
+$ endif
+$ savedstatus = $status
+$ teststatus = f$extract(9,1,savedstatus)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$ perl_d_herrno="undef"
+$ ELSE
+$ perl_d_herrno="define"
+$ ENDIF
+$ ENDIF
+$ WRITE_RESULT "d_herrno is ''perl_d_herrno'"
+$!
$! Check to see if int64_t exists
$!
$ OS
$ if (teststatus.nes."1")
$ THEN
$! Okay, compile failed. Must not have it
-$ perl_dgethname = "undef"
+$ perl_d_gethname = "undef"
$ ELSE
$ If (Needs_Opt.eqs."Yes")
$ THEN
$ WS "#include <iconv.h>
$ WS "int main()
$ WS "{"
-$ WS " iconv_t cd;"
+$ WS " iconv_t cd = (iconv_t)0;"
$ WS " char *inbuf, *outbuf;"
$ WS " size_t inleft, outleft;"
$ WS " iconv(cd, &inbuf, &inleft, &outbuf, &outleft);"
$ perl_d_setlocale="undef"
$ ENDIF
$!
-$! Vax C stuff
-$ if ("''Using_Vax_C'".EQS."Yes")
-$ THEN
-$ perl_vms_cc_type="vaxc"
-$ ENDIF
-$!
$! Sockets?
$ if ("''Has_Socketshr'".EQS."T").OR.("''Has_Dec_C_Sockets'".EQS."T")
$ THEN
$ perl_d_getnetprotos="define"
$ perl_d_getprotoprotos="define"
$ perl_d_getservprotos="define"
-$ perl_sock_size_type="int *"
+$ IF ("''Using_Dec_C'".EQS."Yes")
+$ THEN
+$ perl_socksizetype="unsigned int"
+$ ELSE
+$ perl_socksizetype="int *"
+$ ENDIF
$ ELSE
$ perl_d_vms_do_sockets="undef"
$ perl_d_htonl="undef"
$ perl_d_getnetprotos="undef"
$ perl_d_getprotoprotos="undef"
$ perl_d_getservprotos="undef"
-$ perl_sock_size_type="undef"
+$ perl_socksizetype="undef"
$ ENDIF
$! Threads
$ if ("''use_threads'".eqs."T")
$ gosub type_size_check
$ perl_u32size="''line'"
$
-$ type = "''perl_i64type'"
-$ size_name = "i64size"
-$ gosub type_size_check
-$ perl_i64size="''line'"
+$ If use64bitint
+$ Then
+$ type = "''perl_i64type'"
+$ size_name = "i64size"
+$ gosub type_size_check
+$ perl_i64size="''line'"
+$ perl_ivtype="''perl_i64type'"
$
-$ type = "''perl_u64type'"
-$ size_name = "u64size"
-$ gosub type_size_check
-$ perl_u64size="''line'"
+$ type = "''perl_u64type'"
+$ size_name = "u64size"
+$ gosub type_size_check
+$ perl_u64size="''line'"
+$ perl_uvtype="''perl_u64type'"
+$ perl_nvtype="long double"
+$ Else
+$ perl_i64size="undef"
+$ perl_u64size="undef"
+$ EndIf
$!
$ perl_ivdformat="""ld"""
$ perl_uvuformat="""lu"""
$ if "''Using_Dec_C'" .eqs. "Yes"
$ THEN
$ perl_ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'"
-$ ELSE
-$ IF "''Using_Vax_C'" .eqs. "Yes"
-$ THEN
-$ perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
-$ ENDIF
$ ENDIF
$ if use_vmsdebug_perl .eqs. "Y"
$ then
$ WC "d_bincompat3='" + perl_d_bincompat3 + "'"
$ WC "cppstdin='" + perl_cppstdin + "'"
$ WC "cppminus='" + perl_cppminus + "'"
+$ WC "cpprun='" + perl_cpprun + "'"
+$ WC "cpplast='" + perl_cpplast + "'"
$ WC "d_bcmp='" + perl_d_bcmp + "'"
$ WC "d_bcopy='" + perl_d_bcopy + "'"
$ WC "d_bzero='" + perl_d_bzero + "'"
$ WC "d_gettimeod='" + perl_d_gettimeod + "'"
$ WC "d_getgrps='" + perl_d_getgrps + "'"
$ WC "d_setgrps='" + perl_d_setgrps + "'"
+$ WC "groupstype='" + perl_groupstype + "'"
$ WC "d_uname='" + perl_d_uname + "'"
$ WC "d_getprior='" + perl_d_getprior + "'"
$ WC "d_killpg='" + perl_d_killpg + "'"
$ WC "d_setsid='" + perl_d_setsid + "'"
$ WC "d_shm='" + perl_d_shm + "'"
$ WC "d_shmatprototype='" + perl_d_shmatprototype + "'"
+$ WC "shmattype='" + perl_shmattype + "'"
$ WC "d_sigaction='" + perl_d_sigaction + "'"
$ WC "d_statblks='" + perl_d_statblks + "'"
$ WC "stdio_ptr='" + perl_stdio_ptr + "'"
$ WC "prototype='" + perl_prototype + "'"
$ WC "randbits='" + perl_randbits +"'"
$ WC "selecttype='" + perl_selecttype + "'"
+$ WC "selectminbits='" + perl_selectminbits + "'"
$ WC "stdchar='" + perl_stdchar + "'"
$ WC "d_unlink_all_versions='" + perl_d_unlink_all_versions + "'"
$ WC "full_sed='" + perl_full_sed + "'"
$ WC "privlib='" + perl_privlib + "'"
$ WC "sitelibexp='" + perl_sitelibexp + "'"
$ WC "sitelib='" + perl_sitelib + "'"
+$ WC "sitelib_stem='" + perl_sitelib_stem + "'"
$ WC "sitearchexp='" + perl_sitearchexp + "'"
$ WC "sitearch='" + perl_sitearch + "'"
$ WC "sizetype='" + perl_sizetype + "'"
$ WC tempstring
$ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'"
$ WC tempstring
+$ WC "xs_apiversion='" + localperlver + "'"
+$ WC "pm_apiversion='" + localperlver + "'"
$ WC "pager='" + perl_pager + "'"
$ WC "uidtype='" + perl_uidtype + "'"
+$ WC "uidformat='" + perl_uidformat + "'"
+$ WC "uidsize='" + perl_uidsize + "'"
$ WC "gidtype='" + perl_gidtype + "'"
+$ WC "gidformat='" + perl_gidformat + "'"
+$ WC "gidsize='" + perl_gidsize + "'"
$ WC "usethreads='" + perl_usethreads + "'"
$ WC "d_pthread_yield='" + perl_d_pthread_yield + "'"
$ WC "d_pthreads_created_joinable='" + perl_d_pthreads_created_joinable + "'"
$ WC "netdb_hlen_type='" + perl_netdb_hlen_type + "'"
$ WC "netdb_name_type='" + perl_netdb_name_type + "'"
$ WC "netdb_net_type='" + perl_netdb_net_type + "'"
-$ WC "sock_size_type='" + perl_sock_size_type + "'"
+$ WC "socksizetype='" + perl_socksizetype + "'"
$ WC "baserev='" + perl_baserev + "'"
$ WC "doublesize='" + perl_doublesize + "'"
$ WC "ptrsize='" + perl_ptrsize + "'"
$ WC "devtype='" + perl_devtype + "'"
$ WC "d_gethname='" + perl_d_gethname + "'"
$ WC "d_phostname='" + perl_d_phostname + "'"
+$ WC "aphostname='" + perl_aphostname + "'"
$ WC "d_accessx='" + perl_d_accessx + "'"
$ WC "d_eaccess='" + perl_d_eaccess + "'"
+$ WC "i_ieeefp='" + perl_i_ieeefp + "'"
+$ WC "i_sunmath='" + perl_i_sunmath + "'"
$ WC "i_sysaccess='" + perl_i_sysaccess + "'"
$ WC "i_syssecrt='" + perl_i_syssecrt + "'"
$ WC "d_fd_set='" + perl_d_fd_set + "'"
$ WC "i_sysuio='" + perl_i_sysuio + "'"
$ WC "d_fseeko='" + perl_d_fseeko + "'"
$ WC "d_ftello='" + perl_d_ftello + "'"
+$ WC "d_qgcvt='" + perl_d_qgcvt + "'"
$ WC "d_readv='" + perl_d_readv + "'"
$ WC "d_writev='" + perl_d_writev + "'"
$ WC "i_machcthr='" + perl_i_machcthr + "'"
$ WC "i_inttypes='" + perl_i_inttypes + "'"
$ WC "d_off64_t='" + perl_d_off64_t + "'"
$ WC "d_fpos64_t='" + perl_d_fpos64_t + "'"
-$ WC "use64bits='" + perl_use64bits + "'"
-$ WC "usefull64bits='" + perl_usefull64bits + "'"
+$ WC "use64bitall='" + perl_use64bitall + "'"
+$ WC "use64bitint='" + perl_use64bitint + "'"
$ WC "d_drand48proto='" + perl_d_drand48proto + "'"
$ WC "d_lseekproto='" + perl_d_drand48proto + "'"
$ WC "d_old_pthread_create_joinable='" + perl_d_old_pthread_create_joinable + "'"
$ WC "fflushNULL='define'"
$ WC "fflushall='undef'"
$ WC "d_stdio_stream_array='undef'"
+$ WC "stdio_stream_array='" + perl_stdio_stream_array + "'"
$ WC "i_sysstatvfs='" + perl_i_sysstatvfs + "'"
$ WC "i_syslog='" + perl_i_syslog + "'"
$ WC "i_sysmode='" + perl_i_sysmode + "'"
$ WC "d_mprotect='" + perl_d_mprotect + "'"
$ WC "d_munmap='" + perl_d_munmap + "'"
$ WC "d_mmap='" + perl_d_mmap + "'"
+$ WC "mmaptype='" + perl_mmaptype + "'"
$ WC "i_sysmman='" + perl_i_sysmman + "'"
$ WC "installusrbinperl='" + perl_installusrbinperl + "'"
$! WC "selectminbits='" + perl_selectminbits + "'"
$ WC "usesocks='" + perl_usesocks + "'"
$ WC "d_vendorlib='" + perl_d_vendorlib + "'"
$ WC "vendorlibexp='" + perl_vendorlibexp + "'"
+$ WC "vendorlib_stem='" + perl_vendorlib_stem + "'"
$ WC "d_atolf='" + perl_d_atolf + "'"
$ WC "d_atoll='" + perl_d_atoll + "'"
$ WC "d_bincompat5005='" + perl_d_bincompat + "'"
$ WC "d_llseek='" + perl_d_llseek + "'"
$ WC "d_iconv='" + perl_d_iconv +"'"
$ WC "i_iconv='" + perl_i_iconv +"'"
-$ WC "inc_version_list_init='""""'"
+$ WC "inc_version_list='0'"
+$ WC "inc_version_list_init='0'"
$ WC "uselargefiles='" + perl_uselargefiles + "'"
$ WC "uselongdouble='" + perl_uselongdouble + "'"
$ WC "usemorebits='" + perl_usemorebits + "'"
$ WC "d_quad='" + perl_d_quad + "'"
-$ if (use_64bit .eqs. "Y")
-$ THEN
-$ WC "quadtype='" + perl_quadtype + "'"
-$ WC "uquadtype='" + perl_uquadtype + "'"
-$ ENDIF
+$ WC "quadtype='" + perl_quadtype + "'"
+$ WC "uquadtype='" + perl_uquadtype + "'"
+$ WC "quadkind='" + perl_quadkind + "'"
$ WC "d_fs_data_s='" + perl_d_fs_data_s + "'"
$ WC "d_getcwd='" + perl_d_getcwd + "'"
$ WC "d_getmnt='" + perl_d_getmnt + "'"
$ WC "d_statfs_f_flags='" + perl_d_statfs_f_flags + "'"
$ WC "d_statfs_s='" + perl_d_statfs_s + "'"
$ WC "d_ustat='" + perl_d_ustat + "'"
+$ WC "d_vendorarch='" + perl_d_vendorarch + "'"
+$ WC "vendorarchexp='" + perl_vendorarchexp + "'"
$ WC "i_sysstatfs='" + perl_i_sysstatfs + "'"
$ WC "i_sysvfs='" + perl_i_sysvfs + "'"
$ WC "i_ustat='" + perl_i_ustat + "'"
$ WC "uvuformat='" + perl_uvuformat + "'"
$ WC "uvoformat='" + perl_uvoformat + "'"
$ WC "uvxformat='" + perl_uvxformat + "'"
+$ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'"
$!
$! ##WRITE NEW CONSTANTS HERE##
$!
$ ELSE
$ WRITE CONFIG "#undef ALWAYS_DEFTYPES"
$ ENDIF
-$ if use_64bit.eqs."Y"
+$ IF (use64bitint)
$ THEN
-$ WRITE CONFIG "#define USE_64_BITS"
+$ WRITE CONFIG "#define USE_64_BIT_INT"
$ WRITE CONFIG "#define USE_LONG_DOUBLE"
$ ENDIF
-$ if use_full64bit.eqs."Y"
+$ IF (use64bitall)
+$ THEN
+$ WRITE CONFIG "#define USE_64_BIT_ALL"
+$ ENDIF
+$ if be_case_sensitive
+$ then
+$ write config "#define VMS_WE_ARE_CASE_SENSITIVE"
+$ endif
+$ if perl_d_herrno .eqs. "undef"
$ THEN
-$ WRITE CONFIG "#define USE_FULL_64_BITS"
+$ write config "#define NEED_AN_H_ERRNO"
$ ENDIF
$ WRITE CONFIG "#define HAS_ENVGETENV"
$ WRITE CONFIG "#define PERL_EXTERNAL_GLOB"
$ echo "Writing DESCRIP.MMS"
$!set ver
$ define/user sys$output [-]descrip.mms
-$ mcr []munchconfig [-]config.sh descrip_mms.template "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'" "PV=''LocalPerlVer'"
+$ mcr []munchconfig [-]config.sh descrip_mms.template "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" -
+"''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'" "PV=''LocalPerlVer'" "FLAGS=FLAGS=''extra_flags'"
$ echo "Extracting Build_Ext.Com"
$ Create Sys$Disk:[-]Build_Ext.Com
$ Deck/Dollar="$EndOfTpl$"
$ Define/User Perl_Env_Tables CLISYM_LOCAL
$ miniperl
($extdir = $ENV{'ext'}) =~ s/::/./g;
+ $extdir =~ s#/#.#g;
if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
else { $extdir = ".ext.$extdir"; }
($ENV{'extdir'} = "[$extdir]");