$ macros = ""
$ extra_flags = ""
$ user_c_flags = ""
-$ use_ieee_math = "n"
+$ use_ieee_math = "y"
$ be_case_sensitive = "n"
$ use_vmsdebug_perl = "n"
$ use64bitall = "n"
$ GOTO Beyond_manifest
$ ENDIF
$ ELSE
-$! MANIFEST. has been found and we have set def'ed there -
-$! time to bail out before it's too late.
-$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
-$ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
-$ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("Default")).nes.".")
+$! MANIFEST. has been found and we have set def'ed there.
+$! Time to bail out before it's too late, i.e. too deep.
+$! Depth check is unnecessary on Alpha VMS V7.2++ (even for ODS-2).
+$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
+$ IF (tmp .GES. "7.2") .AND. (F$GETSYI("HW_MODEL") .GE. 1024) THEN GOTO Beyond_depth_check
+$! Depth check also unnecessary on ODS 5 (or later) file systems.
+$ tmp = F$INTEGER(F$GETDVI(F$ENVIRONMENT("DEFAULT"),"ACPTYPE") - "F11V")
+$ IF (tmp .GE. 5) THEN GOTO Beyond_depth_check
+$ IF (F$ELEMENT(max_allowed_dir_depth,".",F$ENVIRONMENT("DEFAULT")).nes.".")
$ THEN
$ TYPE SYS$INPUT:
$ DECK
$ i_rp = 0
$ firstread_rp_loop:
$ sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
-$ echo4 "''sub_rp'"
$ i_rp = i_rp + COLUMNS
+$ if i_rp .LT. len_rp THEN echo4 "''sub_rp'"
$ IF i_rp .LT. len_rp THEN GOTO firstread_rp_loop
$ READ SYS$COMMAND/PROMPT="''sub_rp'" ans
$ ELSE
$! genconfig.pl has either archname='VMS_AXP' or 'VMS_VAX'
$! Note that DCL in VMS V5.4 does not have F$GETSYI("ARCH_NAME")
$! but does have F$GETSYI("HW_MODEL").
+$! Please try to use either archname .EQS. "VMS_VAX" or archname .EQS.
+$! "VMS_AXP" from here on to allow cross-platform configuration (e.g.
+$! configure a VAX build on an Alpha).
$!
$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
$ THEN
$ vms_prefixup = F$EDIT(vms_prefix,"UPCASE")
$ rp = "Will you be sharing your ''vms_prefixup' with ''otherarch'? [''dflt'] "
$ GOSUB myread
-$ if ans.NES.""
-$ THEN
-$ ans = F$EXTRACT(0,1,F$EDIT(ans,"COLLAPSE, UPCASE"))
-$ ENDIF
-$ IF (ans.NES."Y")
+$ if ans .EQS. "" THEN ans = dflt
+$ IF .NOT. ans
$ THEN
$ sharedperl = "N"
$ ELSE
$ prefix = F$ENVIRONMENT("DEFAULT") - ".UU]" + "]"
$ prefix = F$PARSE(prefix,,,,"NO_CONCEAL") - "][" - ".;"
$ prefixbase = prefix - "]"
-$ prefix = prefixbase + ".]"
+$! Add _ROOT to make install PERL_ROOT differ from build directory.
+$ prefix = prefixbase + "_ROOT.]"
$ ENDIF
$ src = prefix
$!: determine root of directory hierarchy where package will be installed.
$! Check here for writability of requested PERL_ROOT if it is not the default (cwd).
$! -> recommend letting PERL_ROOT be PERL_SRC if requested PERL_ROOT is not writable.
$!
+$ IF .NOT. F$GETDVI(perl_root,"MNT")
+$ THEN
+$ tmp = F$PARSE(perl_root,,,"DEVICE",)
+$ echo4 "''tmp' is not mounted."
+$ ELSE
+$ tmp = perl_root - ".]" + "]"
+$ dflt = F$PARSE(tmp,,,,)
+$ IF dflt .eqs. ""
+$ THEN
+$ echo4 "''tmp' does not yet exist."
+$! create/directory 'tmp'
+$ ELSE
+$ echo4 "''tmp' already exists."
+$ ENDIF
+$ ENDIF
+$!
$ vms_skip_install = "true"
$ dflt = "y"
$! echo ""
oldarchlibexp="''vms_prefix':[lib.''archname']"
$ IF F$TYPE(privlibexp) .EQS. "" THEN -
privlibexp ="''vms_prefix':[lib]"
+$ IF F$TYPE(scriptdir) .EQS. "" THEN -
+ scriptdir ="''vms_prefix':[utils]"
$ IF F$TYPE(sitearchexp) .EQS. "" THEN -
sitearchexp ="''vms_prefix':[lib.site_perl.''archname']"
$ IF F$TYPE(sitelib_stem) .EQS. "" THEN -
$List_Parse:
$ OPEN/READ CONFIG ccvms.lis
$ READ CONFIG line
-$ IF (F$GETSYI("HW_MODEL") .LT. 1024)
+$ IF archname .EQS. "VMS_VAX"
$ THEN
$ read CONFIG line
$ archsufx = "VAX"
$! Ask if they want to build with 64-bit support
$ IF (archname.eqs."VMS_AXP").and.("''f$extract(1,3, f$getsyi(""version""))'".ges."7.1")
$ THEN
-$ dflt = use64bitint
+$ dflt = "n"
+$ IF F$TYPE(use64bitint) .NES. ""
+$ THEN
+$ IF use64bitint .OR. use64bitint .eqs. "define" THEN dflt = "y"
+$ ENDIF
$ echo ""
$ echo "You can have native 64-bit long integers."
$ echo ""
$ THEN use64bitint="Y"
$ ELSE use64bitint="N"
$ ENDIF
-$ IF (use64bitint)
+$!
+$ dflt = "n"
+$ IF F$TYPE(use64bitall) .NES. ""
+$ THEN
+$ IF use64bitall .OR. use64bitall .eqs. "define" THEN dflt = "y"
+$ ENDIF
+$ echo ""
+$ echo "You may also choose to try maximal 64-bitness. It means using as much"
+$ echo "64-bitness as possible on the platform. This in turn means even more"
+$ echo "binary incompatibilities. On the other hand, your platform may not"
+$ echo "have any more 64-bitness available than what you already have chosen."
+$ echo ""
+$ echo "If this does not make any sense to you, just accept the default ''dflt'."
+$ rp = "Try to use maximal 64-bit support, if available? [''dflt'] "
+$ GOSUB myread
+$ IF ans .EQS. "" THEN ans = dflt
+$ IF ans
+$ THEN use64bitall="Y"
+$ ELSE use64bitall="N"
+$ ENDIF
+$ IF use64bitall .AND. .NOT. use64bitint
$ THEN
-$ dflt = use64bitall
-$ echo ""
-$ echo "Since you chose 64-bitness you may want to try maximal 64-bitness."
-$ echo "What you have chosen is minimal 64-bitness which means just enough"
-$ echo "to get 64-bit integers. The maximal means using as much 64-bitness"
-$ echo "as is possible on the platform. This in turn means even more binary"
-$ echo "incompatibilities. On the other hand, your platform may not have"
-$ echo "any more maximal 64-bitness than what you already have chosen."
$ echo ""
-$ echo "If this does not make any sense to you, just accept the default ''dflt'."
-$ rp = "Try to use full 64-bit support, if available? [''dflt'] "
-$ GOSUB myread
-$ IF ans .EQS. "" THEN ans = dflt
-$ IF ans
-$ THEN use64bitall="Y"
-$ ELSE use64bitall="N"
-$ ENDIF
+$ echo "Since you have chosen a maximally 64-bit build, I'm also turning on"
+$ echo "the use of 64-bit integers."
+$ use64bitint="Y"
$ ENDIF
$ ENDIF ! AXP && >= 7.1
$!
$ be_case_sensitive = "''ans'"
$! IEEE math?
$ echo ""
-$ echo "Perl normally uses G_FLOAT format floating point numbers"
-$ echo "internally, as do most things on VMS. You can, however, build"
-$ echo "with IEEE floating point numbers instead if you need to."
+$ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers"
+$ echo "internally on Alpha, but if you need G_FLOAT for binary compatibility"
+$ echo "with an external library or existing data, you may wish to disable"
+$ echo "the IEEE math option."
$ dflt = use_ieee_math
$ rp = "Use IEEE math? [''dflt'] "
$ GOSUB myread
$ IF ans .eqs. "" THEN ans = "''dflt'"
$ use_ieee_math = "''ans'"
+$ ELSE
+$ be_case_sensitive = "n"
+$ use_ieee_math = "n"
$ ENDIF
$! CC Flags
$ echo ""
$ dflt = dflt - "IPC/SysV" ! needs to be ported
$ dflt = dflt - "NDBM_File" ! needs porting/special library
$ dflt = dflt - "ODBM_File" ! needs porting/special library
+$ dflt = dflt - "Sys/Syslog" ! needs porting/special library "GDBM_File macro LOG_DEBUG"
$ IF .NOT. Has_socketshr .AND. .NOT. Has_Dec_C_Sockets
$ THEN
$ dflt = dflt - "Socket" ! optional on VMS
$ ENDIF
+$ IF .NOT. use_ithreads THEN dflt = dflt - "threads"
$ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
$!
$! Ask for their default list of extensions to build
$!
$! PerlIO abstraction
$!
-$ dflt = "n"
+$ dflt = "y"
$ IF F$TYPE(useperlio) .NES. ""
$ THEN
-$ IF useperlio THEN dflt = "y"
-$ IF useperlio .EQS. "define" THEN dflt = "y"
+$ IF useperlio .EQS. "undef" THEN dflt = "n"
$ ENDIF
$ IF .NOT. silent
$ THEN
-$ echo "Previous version of ''package' used the standard IO mechanisms as"
+$ echo "Previous versions of ''package' used the standard IO mechanisms as"
$ TYPE SYS$INPUT:
$ DECK
defined in <stdio.h>. Versions 5.003_02 and later of perl allow
alternate IO mechanisms via the PerlIO abstraction layer, but the
-stdio mechanism is still the default. This abstraction layer can
-use AT&T's sfio (if you already have sfio installed) or regular stdio.
+stdio mechanism is still available if needed. The abstraction layer
+can use AT&T's sfio (if you already have sfio installed) or regular stdio.
Using PerlIO with sfio may cause problems with some extension modules.
$ EOD
$ echo "If this does not make any sense to you, just accept the default '" + dflt + "'."
$ ENDIF
-$ rp = "Use the experimental PerlIO abstraction layer? [''dflt'] "
+$ rp = "Use the PerlIO abstraction layer? [''dflt'] "
$ GOSUB myread
$ IF ans .EQS. "" THEN ans = dflt
$ IF ans
$ uselongdouble = "define"
$ alignbytes="16"
$ usemorebits = "define"
+$ ivdformat="""Ld"""
+$ uvuformat="""Lu"""
+$ uvoformat="""Lo"""
+$ uvxformat="""Lx"""
+$ uvXUformat="""LX"""
$ ELSE
$ use64bitint = "undef"
$ uselargefiles = "undef"
$ uselongdouble = "undef"
$ usemorebits = "undef"
+$ ivdformat="""ld"""
+$ uvuformat="""lu"""
+$ uvoformat="""lo"""
+$ uvxformat="""lx"""
+$ uvXUformat="""lX"""
+$ ENDIF
+$ IF uselongdouble .OR. uselongdouble .EQS. "define"
+$ THEN
+$ nveformat="""Le"""
+$ nvfformat="""Lf"""
+$ nvgformat="""Lg"""
+$ ELSE
+$ nveformat="""e"""
+$ nvfformat="""f"""
+$ nvgformat="""g"""
$ ENDIF
$ IF use64bitall .OR. use64bitall .EQS. "define"
$ THEN
$!
$ perl_cc=Mcc
$!
-$ IF (sharedperl .AND. F$GETSYI("HW_MODEL") .GE. 1024)
+$ IF (sharedperl .AND. archname .EQS. "VMS_AXP")
$ THEN
$ obj_ext=".abj"
$ so="axe"
$ d_PRIu64 = "define"
$ d_PRIo64 = "define"
$ d_PRIx64 = "define"
+$ d_PRIXU64 = "define"
$ sPRId64 = """Ld"""
$ sPRIEUldbl = """LE"""
$ sPRIFUldbl = """LF"""
$ GOSUB inlibc
$ d_mkstemps = tmp
$!
-$! Check for iconv
-$!
-$ OS
-$ WS "#if defined(__DECC) || defined(__DECCXX)"
-$ WS "#include <stdlib.h>"
-$ WS "#endif"
-$ WS "#include <stdio.h>"
-$ WS "#include <iconv.h>"
-$ WS "int main()"
-$ WS "{"
-$ WS " iconv_t cd = (iconv_t)0;"
-$ WS " char *inbuf, *outbuf;"
-$ WS " size_t inleft, outleft;"
-$ WS " iconv(cd, &inbuf, &inleft, &outbuf, &outleft);"
-$ WS " exit(0);"
-$ WS "}"
-$ CS
-$ GOSUB link_ok
-$ IF compile_status .ne. good_compile
-$ THEN
-$ d_iconv="undef"
-$ i_iconv="undef"
-$ ELSE
-$ IF link_status .ne. good_link
-$ THEN
-$ d_iconv="undef"
-$ i_iconv="undef"
-$ ELSE
-$ d_iconv="define"
-$ i_iconv="define"
-$ ENDIF
-$ ENDIF
-$ IF i_iconv .eqs. "define"
-$ THEN echo4 "<iconv.h> found."
-$ ELSE echo4 "<iconv.h> NOT found."
-$ ENDIF
-$!
$! Check for mkdtemp
$!
$ OS
$ THEN
$ echo4 "OK, found random()."
$ ELSE
-$ drand01="(((float)rand())/((float)RAND_MAX))"
+$ drand01="(((float)rand())*MY_INV_RAND_MAX)"
$ randseedtype = "unsigned"
$ seedfunc = "srand"
$ echo4 "Yick, looks like I have to use rand()."
$ d_strxfrm="define"
$ d_wctomb="define"
$ i_locale="define"
+$ i_langinfo="define"
$ d_locconv="define"
+$ d_nl_langinfo="define"
$ d_setlocale="define"
$ vms_cc_type="decc"
$ ELSE
$ d_strxfrm="undef"
$ d_wctomb="undef"
$ i_locale="undef"
+$ i_langinfo="undef"
$ d_locconv="undef"
+$ d_nl_langinfo="undef"
$ d_setlocale="undef"
$ ENDIF
$ d_stdio_ptr_lval_sets_cnt="undef"
$ ENDIF
$ DELETE/SYMBOL tmp
$!
-$ ivdformat="""ld"""
-$ uvuformat="""lu"""
-$ uvoformat="""lo"""
-$ uvxformat="""lx"""
-$ uvXUformat="""lX"""
-$! uselongdouble?
-$ nveformat="""e"""
-$ nvfformat="""f"""
-$ nvgformat="""g"""
-$!
$! Finally the composite ones. All config
$!
$ myuname="''osname' ''myname' ''osvers' ''F$EDIT(hwname, "TRIM")'"
$ WC "d_PRIEldbl='" + d_PRIEUldbl + "'"
$ WC "d_PRIFldbl='" + d_PRIFUldbl + "'"
$ WC "d_PRIGldbl='" + d_PRIGUldbl + "'"
-$ WC "d_PRIX64='" + d_PRIXU64 + "'"
+$ WC "d_PRIXU64='" + d_PRIXU64 + "'"
$ WC "d_PRId64='" + d_PRId64 + "'"
$ WC "d_PRIeldbl='" + d_PRIeldbl + "'"
$ WC "d_PRIfldbl='" + d_PRIfldbl + "'"
$ WC "d_chown='define'"
$ WC "d_chroot='undef'"
$ WC "d_chsize='undef'"
+$ WC "d_class='undef'"
$ WC "d_cmsghdr_s='undef'"
$ WC "d_const='define'"
$ WC "d_crypt='define'"
$ WC "d_fcntl_can_lock='" + d_fcntl_can_lock + "'"
$ WC "d_fd_set='" + d_fd_set + "'"
$ WC "d_fgetpos='define'"
+$ WC "d_finite='undef'"
+$ WC "d_finitel='undef'"
$ WC "d_flexfnam='define'"
$ WC "d_flock='undef'"
$ WC "d_flockproto='undef'"
$ WC "d_fork='undef'"
+$ WC "d_fp_class='undef'"
$ WC "d_fpathconf='" + d_fpathconf + "'"
+$ WC "d_fpclass='undef'"
+$ WC "d_fpclassify='undef'"
+$ WC "d_fpclassl='undef'"
$ WC "d_fpos64_t='" + d_fpos64_t + "'"
$ WC "d_frexpl='" + d_frexpl + "'"
$ WC "d_fs_data_s='undef'"
$ WC "d_grpasswd='undef'"
$ WC "d_hasmntopt='undef'"
$ WC "d_htonl='" + d_htonl + "'"
-$ WC "d_iconv='" + d_iconv +"'"
$ WC "d_index='" + d_index + "'"
$ WC "d_inetaton='undef'"
$ WC "d_int64_t='" + d_int64_t + "'"
$ WC "d_isascii='define'"
+$ WC "d_isfinite='undef'"
+$ WC "d_isinf='undef'"
$ WC "d_isnan='" + d_isnan + "'"
$ WC "d_isnanl='" + d_isnanl + "'"
$ WC "d_killpg='undef'"
$ WC "d_munmap='undef'"
$ WC "d_mymalloc='" + d_mymalloc + "'"
$ WC "d_nice='define'"
+$ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
$ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
$ WC "d_nv_preserves_uv_bits='" + d_nv_preserves_uv_bits + "'"
$ WC "d_off64_t='" + d_off64_t + "'"
$ WC "d_phostname='" + d_phostname + "'"
$ WC "d_pipe='define'"
$ WC "d_poll='undef'"
+$ WC "d_pthread_atfork='undef'"
$ WC "d_pthread_yield='" + d_pthread_yield + "'"
$ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
$ WC "d_pwage='undef'"
$ WC "d_uname='" + d_uname + "'"
$ WC "d_union_semun='undef'"
$ WC "d_unlink_all_versions='undef'"
+$ WC "d_unordered='undef'"
$ WC "d_usleep='undef'"
$ WC "d_usleepproto='undef'"
$ WC "d_ustat='undef'"
$ WC "i_dlfcn='undef'"
$ WC "i_fcntl='" + i_fcntl + "'"
$ WC "i_float='define'"
+$ WC "i_fp='undef'"
+$ WC "i_fp_class='undef'"
$ WC "i_grp='undef'"
-$ WC "i_iconv='" + i_iconv +"'"
$ WC "i_ieeefp='undef'"
$ WC "i_inttypes='" + i_inttypes + "'"
+$ WC "i_langinfo='" + i_langinfo + "'"
$ WC "i_libutil='" + i_libutil + "'"
$ WC "i_limits='define'"
$ WC "i_locale='" + i_locale + "'"
$ WC "sPRIx64='" + sPRIx64 + "'"
$ WC "sSCNfldbl='" + sSCNfldbl + "'"
$ WC "sched_yield='" + sched_yield + "'"
+$ WC "scriptdir='" + scriptdir + "'"
$ WC "seedfunc='" + seedfunc + "'"
$ WC "selectminbits='32'"
$ WC "selecttype='" + selecttype + "'"
$ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
$ WC "#define HAS_ENVGETENV"
$ WC "#define PERL_EXTERNAL_GLOB"
+$ IF archname .EQS. "VMS_VAX" .AND. -
+ ccname .EQS. "DEC" .AND. -
+ ccversion .LE. 50390006
+$ THEN
+$! Alas this does not help to build Fcntl
+$! WC "#define PERL_IGNORE_FPUSIG SIGFPE"
+$ ENDIF
$ CLOSE CONFIG
$!
$ echo4 "Doing variable substitutions on .SH files..."
$ echo4 "The perl.cld file is now being written..."
$ OPEN/WRITE CONFIG 'file_2_find'
$ ext = ".exe"
-$ IF ((sharedperl) .AND. (F$GETSYI("HW_MODEL") .GE. 1024)) THEN ext := .AXE
+$ IF (sharedperl .AND. archname .EQS. "VMS_AXP") THEN ext := .AXE
$ IF (use_vmsdebug_perl)
$ THEN
$ WRITE CONFIG "define verb dbgperl"
$ WRITE CONFIG "$! define SYS$TIMEZONE_DIFFERENTIAL ''tzd'"
$ ENDIF
$ WRITE CONFIG "$!"
-$ WRITE CONFIG "$! Symbols for commonly used scripts:"
+$ WRITE CONFIG "$! Symbols for commonly used programs:"
$ WRITE CONFIG "$!"
$ IF (perl_symbol)
$ THEN
$ WRITE CONFIG "$ h2ph == ""'"+"'Perl' ''vms_prefix':[utils]h2ph.com"""
$ WRITE CONFIG "$ h2xs == ""'"+"'Perl' ''vms_prefix':[utils]h2xs.com"""
$ WRITE CONFIG "$!perlcc == ""'"+"'Perl' ''vms_prefix':[utils]perlcc.com"""
+$ WRITE CONFIG "$ perlivp == ""'"+"'Perl' ''vms_prefix':[utils]perlivp.com"""
$ WRITE CONFIG "$ splain == ""'"+"'Perl' ''vms_prefix':[utils]splain.com"""
$ ELSE
$ WRITE CONFIG "$ Perldoc == ""Perl ''vms_prefix':[lib.pod]Perldoc.com -t"""
$ WRITE CONFIG "$ h2ph == ""Perl ''vms_prefix':[utils]h2ph.com"""
$ WRITE CONFIG "$ h2xs == ""Perl ''vms_prefix':[utils]h2xs.com"""
$ WRITE CONFIG "$!perlcc == ""Perl ''vms_prefix':[utils]perlcc.com"""
+$ WRITE CONFIG "$ perlivp == ""Perl ''vms_prefix':[utils]perlivp.com"""
$ WRITE CONFIG "$ splain == ""Perl ''vms_prefix':[utils]splain.com"""
$ ENDIF
$ CLOSE CONFIG