perl
view release on metacpan or search on metacpan
configure.com view on Meta::CPAN
$ endif
$!
$! Check for setvbuf
$!
$ OS
$ WS "#if defined(__DECC) || defined(__DECCXX)"
$ WS "#include <stdlib.h>"
$ WS "#endif"
$ WS "#include <stdio.h>"
$ WS "int main()"
$ WS "{"
$ WS "FILE *foo;"
$ WS "char Buffer[99];"
$ WS "foo = fopen(""foo"", ""r"");"
$ WS "setvbuf(foo, Buffer, 0, 0);"
$ WS "exit(0);"
$ WS "}"
$ CS
$ tmp = "setvbuf"
$ GOSUB inlibc
$ d_setvbuf = tmp
$!
$! Check for the shm* routines.
$!
$ OS
$ WS "#if defined(__DECC) || defined(__DECCXX)"
$ WS "#include <stdlib.h>"
$ WS "#endif"
$ WS "#include <stdio.h>"
$ WS "#include <sys/shm.h>"
$ WS "#include <sys/stat.h>"
$ WS "int shmget(key_t key, size_t size, int shmflg);"
$ WS "void* shmat(int shmid,const void *shmaddr,int shmflg);"
$ WS "int shmctl(int shmid, int cmd, struct shmid_ds *buf);"
$ WS "int shmdt(const void *shmaddr);"
$ WS "int main() {"
$ WS "int shm_id = shmget(IPC_PRIVATE, 8, S_IRWXU);"
$ WS "if (shm_id == -1) printf(""0\n""); else printf (""1\n"");"
$ WS "}"
$ CS
$ GOSUB compile
$ IF tmp .EQS. "1"
$ THEN
$ d_shm = "define"
$ d_shmat = "define"
$ d_shmatprototype = "define"
$ d_shmctl = "define"
$ d_shmdt = "define"
$ d_shmget = "define"
$ shmattype = "void *"
$ ELSE
$ d_shm = "undef"
$ d_shmat = "undef"
$ d_shmatprototype = "undef"
$ d_shmctl = "undef"
$ d_shmdt = "undef"
$ d_shmget = "undef"
$ shmattype = "undef"
$ ENDIF
$!
$! Check for setenv
$!
$ OS
$ WS "#if defined(__DECC) || defined(__DECCXX)"
$ WS "#include <stdlib.h>"
$ WS "#endif"
$ WS "#include <stdio.h>"
$ WS "int main()"
$ WS "{"
$ WS "setenv(""FOO"", ""BAR"", 0);"
$ WS "exit(0);"
$ WS "}"
$ CS
$ tmp = "setenv"
$ GOSUB inlibc
$ d_setenv = tmp
$!
$! Check for setproctitle
$!
$ OS
$ WS "#if defined(__DECC) || defined(__DECCXX)"
$ WS "#include <stdlib.h>"
$ WS "#endif"
$ WS "#include <stdio.h>"
$ WS "int main()"
$ WS "{"
$ WS "setproctitle(""%s"", ""FOO"");"
$ WS "exit(0);"
$ WS "}"
$ CS
$ tmp = "setproctitle"
$ GOSUB inlibc
$ d_setproctitle = tmp
$!
$! Check for <netinet/in.h>
$!
$ IF Has_Dec_C_Sockets
$ THEN
$ tmp = "netinet/in.h"
$ GOSUB inhdr
$ i_niin = tmp
$ ELSE
$ i_niin="undef"
$ ENDIF
$!
$! Check for <arpa/inet.h>
$!
$ IF Has_Dec_C_Sockets
$ THEN
$ tmp = "arpa/inet.h"
$ GOSUB inhdr
$ i_arpainet = tmp
$ ELSE
$ i_arpainet="undef"
$ ENDIF
$!
$! Check for <sys/un.h>
$!
$ IF Has_Dec_C_Sockets
$ THEN
$ tmp = "sys/un.h"
$ GOSUB inhdr
$ i_sysun = tmp
$ ELSE
$ i_sysun="undef"
$ ENDIF
$!
$!
$! Check for <netinet/tcp.h>
$!
$ IF Has_Dec_C_Sockets
$ THEN
$ tmp = "netinet/tcp.h"
$ GOSUB inhdr
$ i_netinettcp = tmp
$ ELSE
configure.com view on Meta::CPAN
$ d_setpgrp = "define"
$ d_setregid = "define"
$ d_setreuid = "define"
$ d_setsid = "define"
$ endif
$!
$! VMS V8 powered options
$! We know that it is only available for 8.2 and later on 64 bit platforms.
$!
$ d_fstatvfs = "undef"
$ d_statvfs = "undef"
$ i_sysstatvfs = "undef"
$ if (vms_ver .GES. "8.2")
$ then
$ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with 8.2 routines"
$ d_fstatvfs = "define"
$ d_statvfs = "define"
$ i_sysstatvfs = "define"
$ endif
$!
$! Check rand48 and its ilk
$!
$ echo4 "Using our internal random number implementation..."
$!
$ randfunc = "Perl_drand48"
$ drand01 = "Perl_drand48()"
$ seedfunc = "Perl_drand48_init"
$ randbits = "48"
$ randseedtype = "U32"
$ d_drand48proto = "define"
$!
$! Done with compiler checks. Clean up.
$ IF F$SEARCH("try.c") .NES."" THEN DELETE/NOLOG/NOCONFIRM try.c;*
$ IF F$SEARCH("try.obj").NES."" THEN DELETE/NOLOG/NOCONFIRM try.obj;*
$ IF F$SEARCH("try.exe").NES."" THEN DELETE/NOLOG/NOCONFIRM try.exe;*
$ IF F$SEARCH("try.opt").NES."" THEN DELETE/NOLOG/NOCONFIRM try.opt;*
$ IF F$SEARCH("try.out").NES."" THEN DELETE/NOLOG/NOCONFIRM try.out;*
$ IF ccname .EQS. "CXX"
$ THEN
$ CALL Cxx_demangler_cleanup
$ ENDIF
$!
$! Some that are compiler or VMS version sensitive
$!
$ IF ccname .EQS. "CXX"
$ THEN
$ vms_cc_type="cxx"
$ ELSE
$ vms_cc_type="cc"
$ ENDIF
$!
$ d_attribut="undef"
$ d_getitimer="define"
$ d_gettimeod="define"
$ d_mmap="define"
$ d_mprotect="define"
$ d_munmap="define"
$ d_msync="define"
$ d_ualarm="define"
$ d_uname="define"
$! d_unsetenv="define" ! Fix me - Activating requires changing VMS code
$ d_unsetenv="undef" ! Change will be needed to allow GNV integration
$ d_clearenv="undef"
$ d_usleep="define"
$ d_setitimer="define"
$ d_sigaction="define"
$ d_siginfo_si_addr="define"
$ d_siginfo_si_band="define"
$ d_siginfo_si_errno="define"
$ d_siginfo_si_fd="define"
$ d_siginfo_si_pid="define"
$ d_siginfo_si_status="define"
$ d_siginfo_si_uid="define"
$ d_siginfo_si_value="define"
$ d_sigprocmask="define"
$ d_truncate="define"
$ d_wait4="define"
$ d_index="define"
$ pidtype="pid_t"
$ sig_name1="ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE"
$ sig_name2=" ALRM TERM USR1 USR2 NUM18 NUM19 CHLD CONT STOP TSTP TTIN TTOU DEBUG"
$ sig_name2 = sig_name2 + " NUM27 WINCH"
$!* signal.h defines SIGRTMIN as 33 and SIGRTMAX as 64, but there is no
$!* sigqueue function or other apparent means to do realtime signalling,
$!* so let's not try to include the realtime range for now.
$!* sig_name3=" NUM29 NUM30 NUM31 NUM32 RTMIN NUM34 NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43"
$!* sig_name4=" NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58"
$!* sig_name5=" NUM59 NUM60 NUM61 NUMT62 NUM63 RTMAX"
$ sig_name = sig_name1 + sig_name2
$ sig_num = ""
$ sig_num_init = ""
$ sig_name_init = ""
$ sig_index = 0
$!
$ PARSE_SIG_NAME_LOOP:
$!
$ tmp = F$ELEMENT(sig_index, " ", sig_name)
$ IF F$LENGTH(F$EDIT(tmp,"TRIM")) .eq. 0 THEN GOTO END_SIG_NAME_LOOP
$ sig_name_init = sig_name_init + """''tmp'"","
$ sig_num = sig_num + "''sig_index' "
$ sig_num_init = sig_num_init + "''sig_index',"
$ sig_index = sig_index + 1
$ GOTO PARSE_SIG_NAME_LOOP
$!
$ END_SIG_NAME_LOOP:
$!
$ sig_name_init = sig_name_init + "0"
$ sig_num_init = sig_num_init + "0"
$ sig_size = "''sig_index'"
$ sig_index = sig_index - 1
$ sig_count = "''sig_index'"
$ uidtype="uid_t"
$ d_pathconf="define"
$ d_fpathconf="define"
$ d_sysconf="define"
$ d_sigsetjmp="define"
$!
$!: see if tzname[] exists
$ OS
$ WS "#include <stdio.h>"
$ WS "#include <time.h>"
$ WS "int main() { extern short tzname[]; printf(""%hd"", tzname[0]); }"
configure.com view on Meta::CPAN
$ WC "d_pipe2='undef'"
$ WC "d_poll='" + d_poll + "'"
$ WC "d_portable='define'"
$ WC "d_procselfexe='undef'"
$ WC "d_pseudofork='undef'"
$ WC "d_pthread_atfork='undef'"
$ WC "d_pthread_attr_setscope='" + d_pthread_attr_setscope + "'"
$ WC "d_pthread_yield='" + d_pthread_yield + "'"
$ WC "d_pthreads_created_joinable='" + d_pthreads_created_joinable + "'"
$ WC "d_ptrdiff_t='define'"
$ WC "d_pwage='undef'"
$ WC "d_pwchange='undef'"
$ WC "d_pwclass='undef'"
$ WC "d_pwcomment='define'"
$ WC "d_pwexpire='undef'"
$ WC "d_pwgecos='define'"
$ WC "d_pwpasswd='define'"
$ WC "d_pwquota='undef'"
$ WC "d_qgcvt='undef'"
$ WC "d_quad='" + d_quad + "'"
$ WC "d_re_comp='undef'"
$ WC "d_readdir='define'"
$ WC "d_readlink='" + d_readlink + "'"
$ WC "d_readv='define'"
$ WC "d_realpath='" + d_realpath + "'"
$ WC "d_recvmsg='define'"
$ WC "d_regcmp='undef'"
$ WC "d_regcomp='undef'"
$ WC "d_remainder='" + d_remainder + "'"
$ WC "d_remquo='" + d_remquo + "'"
$ WC "d_rename='define'"
$ WC "d_rewinddir='define'"
$ WC "d_rint='" + d_rint + "'"
$ WC "d_rmdir='define'"
$ WC "d_round='" + d_round + "'"
$ WC "d_sbrkproto='define'"
$ WC "d_scalbn='" + d_scalbn + "'"
$ WC "d_scalbnl='" + d_scalbnl + "'"
$ WC "d_sched_yield='" + d_sched_yield + "'"
$ WC "d_scm_rights='undef'"
$ WC "d_seekdir='define'"
$ WC "d_select='" + d_select + "'"
$ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."8.4")
$ THEN
$ WC "d_sem='define'"
$ WC "d_semctl='define'"
$ WC "d_semctl_semid_ds='define'"
$ WC "d_semctl_semun='define'"
$ WC "d_semget='define'"
$ WC "d_semop='define'"
$ ELSE
$ WC "d_sem='undef'"
$ WC "d_semctl='undef'"
$ WC "d_semctl_semid_ds='undef'"
$ WC "d_semctl_semun='undef'"
$ WC "d_semget='undef'"
$ WC "d_semop='undef'"
$ ENDIF
$ WC "d_sendmsg='define'"
$ WC "d_setegid='undef'"
$ WC "d_setenv='" + d_setenv + "'"
$ WC "d_seteuid='" + d_seteuid + "'"
$ WC "d_setgrent='" + d_setgrent + "'"
$ WC "d_setgrps='undef'"
$ WC "d_sethent='" + d_sethent + "'"
$ WC "d_setitimer='" + d_setitimer + "'"
$ WC "d_setlinebuf='undef'"
$ WC "d_setlocale='" + d_setlocale + "'"
$ WC "d_setlocale_accepts_any_locale_name='" + d_setlocale_accepts_any_locale_name + "'"
$ WC "d_setnent='" + d_setnent + "'"
$ WC "d_setpent='" + d_setpent + "'"
$ WC "d_setpgid='" + d_setpgid + "'"
$ WC "d_setpgrp2='undef'"
$ WC "d_setpgrp='" + d_setpgrp + "'"
$ WC "d_setprior='undef'"
$ WC "d_setproctitle='" + d_setproctitle + "'"
$ WC "d_setpwent='define'"
$ WC "d_setregid='" + d_setregid + "'"
$ WC "d_setresgid='undef'"
$ WC "d_setresuid='undef'"
$ WC "d_setreuid='" + d_setreuid + "'"
$ WC "d_setrgid='undef'"
$ WC "d_setruid='undef'"
$ WC "d_setsent='" + d_setsent + "'"
$ WC "d_setsid='" + d_setsid + "'"
$ WC "d_setvbuf='" + d_setvbuf + "'"
$ WC "d_shm='" + d_shm + "'"
$ WC "d_shmat='" + d_shmat + "'"
$ WC "d_shmatprototype='" + d_shmatprototype + "'"
$ WC "d_shmctl='" + d_shmctl + "'"
$ WC "d_shmdt='" + d_shmdt + "'"
$ WC "d_shmget='" + d_shmget + "'"
$ WC "d_sigaction='" + d_sigaction + "'"
$ WC "d_siginfo_si_addr='" + d_siginfo_si_addr + "'"
$ WC "d_siginfo_si_band='" + d_siginfo_si_band + "'"
$ WC "d_siginfo_si_errno='" + d_siginfo_si_errno + "'"
$ WC "d_siginfo_si_fd='" + d_siginfo_si_fd + "'"
$ WC "d_siginfo_si_pid='" + d_siginfo_si_pid + "'"
$ WC "d_siginfo_si_status='" + d_siginfo_si_status + "'"
$ WC "d_siginfo_si_uid='" + d_siginfo_si_uid + "'"
$ WC "d_siginfo_si_value='" + d_siginfo_si_value + "'"
$ WC "d_signbit='" + d_signbit + "'"
$ WC "d_sigprocmask='" + d_sigprocmask + "'"
$ WC "d_sigsetjmp='" + d_sigsetjmp + "'"
$ WC "d_sin6_scope_id='" + d_sin6_scope_id + "'"
$ WC "d_sitearch='define'"
$ WC "d_sockaddr_in6='define'"
$ WC "d_sockaddr_sa_len='" + d_sockaddr_sa_len + "'"
$ WC "d_sockaddr_storage='undef'"
$ WC "d_sockatmark='undef'"
$ WC "d_sockatmarkproto='undef'"
$ WC "d_socket='" + d_socket + "'"
$ WC "d_socklen_t='" + d_socklen_t + "'"
$ WC "d_sockpair='" + d_sockpair + "'"
$ WC "d_socks5_init='undef'"
$ WC "d_sqrtl='define'"
$ WC "d_sresgproto='undef'"
$ WC "d_sresgproto='undef'"
$ WC "d_sresproto='undef'"
$ WC "d_sresuproto='undef'"
$ WC "d_stat='define'"
configure.com view on Meta::CPAN
$ WC "d_stdio_ptr_lval_nochange_cnt='" + d_stdio_ptr_lval_nochange_cnt + "'"
$ WC "d_stdio_ptr_lval_sets_cnt='" + d_stdio_ptr_lval_sets_cnt + "'"
$ WC "d_stdio_stream_array='undef'"
$ WC "d_stdiobase='" + d_stdiobase + "'"
$ WC "d_stdstdio='" + d_stdstdio + "'"
$ WC "d_faststdio='" + d_faststdio + "'"
$ WC "d_statvfs='" + d_statvfs + "'"
$ WC "d_strcoll='" + d_strcoll + "'"
$ WC "d_strftime='define'"
$ WC "d_strlcat='undef'"
$ WC "d_strlcpy='undef'"
$ WC "d_strnlen='" + d_strnlen + "'"
$ WC "d_strtod='define'"
$ WC "d_strtod_l='undef'"
$ WC "d_strtol='define'"
$ WC "d_strtold='" + d_strtold + "'"
$ WC "d_strtold_l='undef'"
$ WC "d_strtoll='" + d_strtoll + "'"
$ WC "d_strtoq='" + d_strtoq + "'"
$ WC "d_strtoul='define'"
$ WC "d_strtoull='" + d_strtoull + "'"
$ WC "d_strtouq='" + d_strtouq + "'"
$ WC "d_strxfrm='" + d_strxfrm + "'"
$ WC "d_strxfrm_l='" + d_strxfrm_l + "'"
$ WC "d_suidsafe='undef'"
$ WC "d_symlink='" + d_symlink + "'"
$ WC "d_syscall='undef'"
$ WC "d_syscallproto='undef'"
$ WC "d_sysconf='" + d_sysconf + "'"
$ WC "d_sysernlst='undef'"
$ WC "d_syserrlst='undef'"
$ WC "d_system='define'"
$ WC "d_tcgetpgrp='undef'"
$ WC "d_tcsetpgrp='undef'"
$ WC "d_telldir='define'"
$ WC "d_telldirproto='define'"
$ WC "d_tgamma='" + d_tgamma + "'"
$ WC "d_thread_safe_nl_langinfo_l='undef'"
$ WC "d_time='define'"
$ WC "d_timegm='undef'"
$ WC "d_times='define'"
$ IF ("''F$EXTRACT(1,3, F$GETSYI(""VERSION""))'".GES."7.0")
$ THEN
$ WC "d_tm_tm_gmtoff='define'"
$ WC "d_tm_tm_zone='define'"
$ ELSE
$ WC "d_tm_tm_gmtoff='undef'"
$ WC "d_tm_tm_zone='undef'"
$ ENDIF
$ WC "d_truncate='" + d_truncate + "'"
$ WC "d_trunc='" + d_trunc + "'"
$ WC "d_truncl='" + d_truncl + "'"
$ WC "d_tzname='" + d_tzname + "'"
$ WC "d_u32align='define'"
$ WC "d_ualarm='" + d_ualarm + "'"
$ WC "d_umask='define'"
$ WC "d_uname='" + d_uname + "'"
$ WC "d_union_semun='undef'"
$ WC "d_unlink_all_versions='" + d_unlink_all_versions + "'" ! VMS-specific
$ WC "d_unordered='undef'"
$ WC "d_unsetenv='" + d_unsetenv + "'"
$ WC "d_clearenv='" + d_clearenv + "'"
$ WC "d_usleep='" + d_usleep + "'"
$ WC "d_usleepproto='" + d_usleep + "'"
$ WC "d_ustat='undef'"
$ WC "d_vendorarch='undef'"
$ WC "d_vendorbin='undef'"
$ WC "d_vendorlib='undef'"
$ WC "d_vendorscript='undef'"
$ WC "d_vfork='define'"
$ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" ! VMS
$ WC "d_vms_do_sockets='" + d_vms_do_sockets + "'" ! VMS
$ WC "d_vms_shorten_long_symbols='" + d_vms_shorten_long_symbols + "'" ! VMS
$ WC "d_void_closedir='define'"
$ WC "d_voidsig='undef'"
$ WC "d_voidtty='" + "'"
$ WC "d_vsnprintf='" + d_vsnprintf + "'"
$ WC "d_wait4='" + d_wait4 + "'"
$ WC "d_waitpid='define'"
$ WC "d_wcrtomb='define'"
$ WC "d_wcscmp='define'"
$ WC "d_wcstombs='define'"
$ WC "d_wcsxfrm='define'"
$ WC "d_wctomb='define'"
$ WC "d_writev='define'"
$ WC "d_xenix='undef'"
$ WC "db_hashtype=' '"
$ WC "db_prefixtype=' '"
$ WC "db_version_major='" + "'"
$ WC "db_version_minor='" + "'"
$ WC "db_version_patch='" + "'"
$ WC "dbgprefix='" + dbgprefix + "'"
$ WC "devtype='" + devtype + "'"
$ WC "default_inc_excludes_dot='" + default_inc_excludes_dot + "'"
$ WC "direntrytype='struct dirent'"
$ WC "dlext='" + dlext + "'"
$ WC "dlobj='" + dlobj + "'"
$ WC "dlsrc='dl_vms.xs'"
$ WC "doublekind='3'"
$ WC "doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'"
$ WC "doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f'"
$ WC "doublemantbits='" + doublemantbits + "'"
$ WC "doublesize='" + doublesize + "'"
$ WC "drand01='" + drand01 + "'"
$ WC "dtrace='" + "'"
$!
$! The dynamic_ext symbol may be quite long
$!
$ tmp = "dynamic_ext='" + dynamic_ext + "'"
$ WC/symbol tmp
$ DELETE/SYMBOL tmp
$ WC "eagain=' '"
$ WC "ebcdic='undef'"
$ WC "embedmymalloc='" + usemymalloc + "'"
$ WC "eunicefix=':'"
$ WC "exe_ext='" + exe_ext + "'"
$!
$! The extensions symbols may be quite long
$!
$ WC/symbol "extensions='", nonxs_ext, " ", nonxs_ext2, " ", dynamic_ext, "'"
$ WC "fflushNULL='define'"
configure.com view on Meta::CPAN
$ COPY/NOLOG [-.vms]'Makefile_SH' []
$ 'Perl_CC' 'ccflags' munchconfig.c
$ 'ld'/EXE='exe_ext' munchconfig'obj_ext'
$ IF F$SEARCH("munchconfig''obj_ext'") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig'obj_ext';
$ IF F$SEARCH("munchconfig.c") .NES. "" THEN DELETE/NOLOG/NOCONFIRM munchconfig.c;
$ IF ccname .EQS. "CXX"
$ THEN
$ CALL Cxx_demangler_cleanup
$ ENDIF
$!
$ IF alldone .EQS. ""
$ THEN
$ cat4 SYS$INPUT:
$ DECK
If you'd like to make any changes to the config.sh file before I begin
to configure things, answer yes to the following question.
$ EOD
$ bool_dflt="n"
$ rp="Do you wish to edit ''basename_config_sh'? [''bool_dflt'] "
$ GOSUB myread
$ IF ans
$ THEN
$ echo4 ""
$ echo4 "Be sure to type LOGOUT after you have edited the file,"
$ echo4 "then this procedure will resume."
$ echo4 ""
$ default = F$ENVIRONMENT("DEFAULT")
$ DIRECTORY 'config_sh'
$ SET DEFAULT [-]
$ SPAWN/WAIT
$ SET DEFAULT 'default'
$ ENDIF
$ ENDIF
$!
$ echo ""
$ echo4 "Adding ''osname' specific preprocessor commands."
$ !
$ ! we need an fdl file
$ CREATE [-]CONFIG.FDL
$ DECK
RECORD
FORMAT STREAM_LF
$ EOD
$ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL
$ ! First spit out the header info with the local defines (to get
$ ! around the 255 character command line limit)
$ OPEN/APPEND CONFIG [-]config.local
$ IF use_debugging_perl THEN WC "#define DEBUGGING"
$ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE"
$ IF mymalloc THEN WC "#define EMBEDMYMALLOC"
$ IF use_pack_malloc THEN WC "#define PACK_MALLOC"
$ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS"
$ IF (Has_Dec_C_Sockets)
$ THEN
$ WC "#define VMS_DO_SOCKETS"
$ WC "#define DECCRTL_SOCKETS"
$ ENDIF
$! This is VMS-specific for now
$ WC "#''d_setenv' HAS_SETENV"
$ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV"
$ IF d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES"
$ IF use64bitint .OR. use64bitint .EQS. "define"
$ THEN
$ WC "#define USE_64_BIT_INT"
$ ENDIF
$ IF uselongdouble .OR. uselongdouble .EQS. "define"
$ THEN
$ WC "#define USE_LONG_DOUBLE"
$ ENDIF
$ IF use64bitall .OR. use64bitall .EQS. "define" THEN -
WC "#define USE_64_BIT_ALL"
$ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE"
$ IF shorten_long_symbols THEN WC "#define VMS_SHORTEN_LONG_SYMBOLS"
$ IF use_ieee_math THEN WC "#define USE_IEEE"
$ IF d_herrno .EQS. "undef" THEN WC "#define NEED_AN_H_ERRNO"
$ WC "#define HAS_ENVGETENV"
$ WC "#define PERL_EXTERNAL_GLOB"
$ IF kill_by_sigprc .EQS. "define" then WC "#define KILL_BY_SIGPRC"
$ IF unlink_all_versions .OR. unlink_all_versions .EQS. "define" THEN -
WC "#define UNLINK_ALL_VERSIONS"
$ IF d_sockaddr_sa_len .EQS. "define" then WC "#define _SOCKADDR_LEN 1"
$ IF ccname .EQS. "CXX" then WC "#define NO_ENVIRON_ARRAY"
$ IF ccname .EQS. "CXX" then WC "#define VMS" ! only has __VMS by default
$ WC "#define _PTHREAD_EXC_INCL_CLEAN" ! avoid conflict between DECthreads TRY/CATCH and Perl TRY/CATCH
$ CLOSE CONFIG
$!
$ echo4 "Doing variable substitutions on .SH files..."
$ echo4 "Extracting config.h (with variable substitutions)"
$!
$! Now build the normal config.h
$ DEFINE/USER_MODE sys$output [-]config.main
$ mcr []munchconfig'exe_ext' 'config_sh' [-]config_h.sh
$ ! Concatenate them together
$ copy [-]config.local,[-]config.main [-]config.h
$! Clean up
$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.MAIN;*
$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.LOCAL;*
$ DELETE/NOLOG/NOCONFIRM [-]CONFIG.FDL;*
$!
$ IF ccname .EQS. "DEC"
$ THEN
$ DECC_REPLACE = "DECC=decc=1"
$ ELSE
$ DECC_REPLACE = "DECC="
$ ENDIF
$ IF ccname .EQS. "CXX"
$ THEN
$ DECCXX_REPLACE = "DECCXX=DECCXX=1"
$ ELSE
$ DECCXX_REPLACE = "DECCXX="
$ ENDIF
$ IF Has_Dec_C_Sockets
$ THEN
$ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
$ ELSE
$ SOCKET_REPLACE = "SOCKET="
$ ENDIF
$ IF use_threads
$ THEN
( run in 0.574 second using v1.01-cache-2.11-cpan-39bf76dae61 )