aboutsummaryrefslogtreecommitdiffstats
path: root/packages/vms
diff options
context:
space:
mode:
Diffstat (limited to 'packages/vms')
-rw-r--r--packages/vms/Makefile.am45
-rw-r--r--packages/vms/Makefile.in422
-rw-r--r--packages/vms/backup_gnv_curl_src.com132
-rw-r--r--packages/vms/build_curl-config_script.com154
-rw-r--r--packages/vms/build_gnv_curl.com38
-rw-r--r--packages/vms/build_gnv_curl_pcsi_desc.com488
-rw-r--r--packages/vms/build_gnv_curl_pcsi_text.com198
-rw-r--r--packages/vms/build_gnv_curl_release_notes.com102
-rw-r--r--packages/vms/build_libcurl_pc.com205
-rw-r--r--packages/vms/build_vms.com1023
-rw-r--r--packages/vms/clean_gnv_curl.com250
-rw-r--r--packages/vms/compare_curl_source.com371
-rw-r--r--packages/vms/config-vms.h371
-rw-r--r--packages/vms/config_h.com2184
-rw-r--r--packages/vms/curl_crtl_init.c311
-rw-r--r--packages/vms/curl_gnv_build_steps.txt288
-rw-r--r--packages/vms/curl_release_note_start.txt77
-rw-r--r--packages/vms/curl_startup.com100
-rw-r--r--packages/vms/curlmsg.h21
-rw-r--r--packages/vms/curlmsg_vms.h21
-rw-r--r--packages/vms/generate_config_vms_h_curl.com484
-rw-r--r--packages/vms/generate_vax_transfer.com274
-rw-r--r--packages/vms/gnv_conftest.c_first61
-rw-r--r--packages/vms/gnv_curl_configure.sh46
-rw-r--r--packages/vms/gnv_libcurl_symbols.opt181
-rw-r--r--packages/vms/gnv_link_curl.com852
-rw-r--r--packages/vms/hpssl_alpha.opt2
-rw-r--r--packages/vms/hpssl_ia64.opt2
-rw-r--r--packages/vms/hpssl_vax.opt2
-rw-r--r--packages/vms/ldap.opt1
-rw-r--r--packages/vms/macro32_exactcase.patch11
-rw-r--r--packages/vms/make_gnv_curl_install.sh45
-rw-r--r--packages/vms/make_pcsi_curl_kit_name.com190
-rw-r--r--packages/vms/openssl_alpha.opt2
-rw-r--r--packages/vms/openssl_ia64.opt2
-rw-r--r--packages/vms/openssl_ssl_alpha.opt2
-rw-r--r--packages/vms/openssl_ssl_ia64.opt2
-rw-r--r--packages/vms/openssl_ssl_vax.opt2
-rw-r--r--packages/vms/openssl_vax.opt2
-rw-r--r--packages/vms/pcsi_gnv_curl_file_list.txt127
-rw-r--r--packages/vms/pcsi_product_gnv_curl.com199
-rw-r--r--packages/vms/readme198
-rw-r--r--packages/vms/report_openssl_version.c100
-rw-r--r--packages/vms/setup_gnv_curl_build.com288
-rw-r--r--packages/vms/stage_curl_install.com177
-rw-r--r--packages/vms/vms_eco_level.h30
46 files changed, 8954 insertions, 1129 deletions
diff --git a/packages/vms/Makefile.am b/packages/vms/Makefile.am
index b6f0939..38f6585 100644
--- a/packages/vms/Makefile.am
+++ b/packages/vms/Makefile.am
@@ -1,17 +1,36 @@
-EXTRA_DIST = build_vms.com \
- config-vms.h \
+EXTRA_DIST = \
+ backup_gnv_curl_src.com \
+ build_curl-config_script.com \
+ build_gnv_curl.com \
+ build_gnv_curl_pcsi_desc.com \
+ build_gnv_curl_pcsi_text.com \
+ build_gnv_curl_release_notes.com \
+ build_libcurl_pc.com \
+ build_vms.com \
+ clean_gnv_curl.com \
+ compare_curl_source.com \
+ config_h.com \
+ curl_crtl_init.c \
+ curl_gnv_build_steps.txt \
+ curl_release_note_start.txt \
+ curl_startup.com \
curlmsg.h \
curlmsg.msg \
curlmsg.sdl \
curlmsg_vms.h \
- hpssl_alpha.opt \
- hpssl_ia64.opt \
- hpssl_vax.opt \
- ldap.opt \
- openssl_alpha.opt \
- openssl_ia64.opt \
- openssl_vax.opt \
- openssl_ssl_alpha.opt \
- openssl_ssl_ia64.opt \
- openssl_ssl_vax.opt \
- readme
+ generate_config_vms_h_curl.com \
+ generate_vax_transfer.com \
+ gnv_conftest.c_first \
+ gnv_curl_configure.sh \
+ gnv_libcurl_symbols.opt \
+ gnv_link_curl.com \
+ macro32_exactcase.patch \
+ make_gnv_curl_install.sh \
+ make_pcsi_curl_kit_name.com \
+ pcsi_gnv_curl_file_list.txt \
+ pcsi_product_gnv_curl.com \
+ readme \
+ report_openssl_version.c \
+ setup_gnv_curl_build.com \
+ stage_curl_install.com \
+ vms_eco_level.h
diff --git a/packages/vms/Makefile.in b/packages/vms/Makefile.in
deleted file mode 100644
index 3e83ae5..0000000
--- a/packages/vms/Makefile.in
+++ /dev/null
@@ -1,422 +0,0 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-subdir = packages/vms
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/curl-compilers.m4 \
- $(top_srcdir)/m4/curl-confopts.m4 \
- $(top_srcdir)/m4/curl-functions.m4 \
- $(top_srcdir)/m4/curl-override.m4 \
- $(top_srcdir)/m4/curl-reentrant.m4 \
- $(top_srcdir)/m4/curl-system.m4 $(top_srcdir)/m4/libtool.m4 \
- $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
- $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/lib/curl_config.h \
- $(top_builddir)/src/curl_config.h \
- $(top_builddir)/include/curl/curlbuild.h
-CONFIG_CLEAN_FILES =
-SOURCES =
-DIST_SOURCES =
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_LIBHOSTNAME_FALSE = @BUILD_LIBHOSTNAME_FALSE@
-BUILD_LIBHOSTNAME_TRUE = @BUILD_LIBHOSTNAME_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CROSSCOMPILING_FALSE = @CROSSCOMPILING_FALSE@
-CROSSCOMPILING_TRUE = @CROSSCOMPILING_TRUE@
-CURLDEBUG_FALSE = @CURLDEBUG_FALSE@
-CURLDEBUG_TRUE = @CURLDEBUG_TRUE@
-CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
-CURL_CFLAG_EXTRAS = @CURL_CFLAG_EXTRAS@
-CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
-CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
-CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
-CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
-CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
-CURL_DISABLE_IMAP = @CURL_DISABLE_IMAP@
-CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
-CURL_DISABLE_LDAPS = @CURL_DISABLE_LDAPS@
-CURL_DISABLE_POP3 = @CURL_DISABLE_POP3@
-CURL_DISABLE_PROXY = @CURL_DISABLE_PROXY@
-CURL_DISABLE_RTSP = @CURL_DISABLE_RTSP@
-CURL_DISABLE_SMTP = @CURL_DISABLE_SMTP@
-CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
-CURL_DISABLE_TFTP = @CURL_DISABLE_TFTP@
-CURL_LIBS = @CURL_LIBS@
-CURL_NETWORK_LIBS = @CURL_NETWORK_LIBS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-ENABLE_SHARED = @ENABLE_SHARED@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GREP = @GREP@
-HAVE_LDAP_SSL = @HAVE_LDAP_SSL@
-HAVE_LIBZ = @HAVE_LIBZ@
-HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
-HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
-HAVE_PK11_CREATEGENERICOBJECT = @HAVE_PK11_CREATEGENERICOBJECT@
-IDN_ENABLED = @IDN_ENABLED@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-IPV6_ENABLED = @IPV6_ENABLED@
-KRB4_ENABLED = @KRB4_ENABLED@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBCURL_LIBS = @LIBCURL_LIBS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-MANOPT = @MANOPT@
-MIMPURE_FALSE = @MIMPURE_FALSE@
-MIMPURE_TRUE = @MIMPURE_TRUE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
-NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
-NROFF = @NROFF@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH = @PATH@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PERL = @PERL@
-PKGADD_NAME = @PKGADD_NAME@
-PKGADD_PKG = @PKGADD_PKG@
-PKGADD_VENDOR = @PKGADD_VENDOR@
-PKGCONFIG = @PKGCONFIG@
-RANDOM_FILE = @RANDOM_FILE@
-RANLIB = @RANLIB@
-REQUIRE_LIB_DEPS = @REQUIRE_LIB_DEPS@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SONAME_BUMP_FALSE = @SONAME_BUMP_FALSE@
-SONAME_BUMP_TRUE = @SONAME_BUMP_TRUE@
-SSL_ENABLED = @SSL_ENABLED@
-STATICLIB_FALSE = @STATICLIB_FALSE@
-STATICLIB_TRUE = @STATICLIB_TRUE@
-STRIP = @STRIP@
-SUPPORT_FEATURES = @SUPPORT_FEATURES@
-SUPPORT_PROTOCOLS = @SUPPORT_PROTOCOLS@
-TEST_SERVER_LIBS = @TEST_SERVER_LIBS@
-USE_ARES = @USE_ARES@
-USE_EMBEDDED_ARES_FALSE = @USE_EMBEDDED_ARES_FALSE@
-USE_EMBEDDED_ARES_TRUE = @USE_EMBEDDED_ARES_TRUE@
-USE_GNUTLS = @USE_GNUTLS@
-USE_LIBRTMP = @USE_LIBRTMP@
-USE_LIBSSH2 = @USE_LIBSSH2@
-USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
-USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
-USE_NSS = @USE_NSS@
-USE_OPENLDAP = @USE_OPENLDAP@
-USE_POLARSSL = @USE_POLARSSL@
-USE_SSLEAY = @USE_SSLEAY@
-USE_WINDOWS_SSPI = @USE_WINDOWS_SSPI@
-VERSION = @VERSION@
-VERSIONNUM = @VERSIONNUM@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-libext = @libext@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-subdirs = @subdirs@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-EXTRA_DIST = build_vms.com \
- config-vms.h \
- curlmsg.h \
- curlmsg.msg \
- curlmsg.sdl \
- curlmsg_vms.h \
- hpssl_alpha.opt \
- hpssl_ia64.opt \
- hpssl_vax.opt \
- ldap.opt \
- openssl_alpha.opt \
- openssl_ia64.opt \
- openssl_vax.opt \
- openssl_ssl_alpha.opt \
- openssl_ssl_ia64.opt \
- openssl_ssl_vax.opt \
- readme
-
-all: all-am
-
-.SUFFIXES:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign packages/vms/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign packages/vms/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-am
- -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
- uninstall-info-am
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/packages/vms/backup_gnv_curl_src.com b/packages/vms/backup_gnv_curl_src.com
new file mode 100644
index 0000000..3857571
--- /dev/null
+++ b/packages/vms/backup_gnv_curl_src.com
@@ -0,0 +1,132 @@
+$! File: Backup_gnv_curl_src.com
+$!
+$! $Id$
+$!
+$! Procedure to create backup save sets for installing in a PCSI kit.
+$!
+$! To comply with most Open Source licenses, the source used for building
+$! a kit will be packaged with the distribution kit for the binary.
+$!
+$! Backup save sets are the only storage format that I can expect a
+$! VMS system to be able to extract ODS-5 filenames and directories.
+$!
+$! The make_pcsi_kit_name.com needs to be run before this procedure to
+$! properly name the files that will be created.
+$!
+$! This file is created from a template file for the purpose of making it
+$! easier to port Unix code, particularly open source code to VMS.
+$! Therefore permission is freely granted for any use.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 13-Jun-2009 J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$!
+$ if arch_code .nes. "V"
+$ then
+$ set proc/parse=extended
+$ endif
+$!
+$ ss_abort = 44
+$ status = ss_abort
+$!
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$ filename_base = f$trnlnm("GNV_PCSI_FILENAME_BASE")
+$ if filename_base .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$!
+$ node_swvers = f$getsyi("NODE_SWVERS")
+$ node_swvers_type = f$extract(0, 1, node_swvers)
+$ node_swvers_vers = f$extract(1, f$length(node_swvers), node_swvers)
+$ swvers_maj = f$element(0, ".", node_swvers_vers)
+$ node_swvers_min_update = f$element(1, ".", node_swvers_vers)
+$ swvers_min = f$element(0, "-", node_swvers_min_update)
+$ swvers_update = f$element(1, "-", node_swvers_min_update)
+$!
+$ if swvers_update .eqs. "-" then swvers_update = ""
+$!
+$ vms_vers = f$fao("!2ZB!2ZB!AS", 'swvers_maj', 'swvers_min', swvers_update)
+$!
+$!
+$!
+$! If available make an interchange save set
+$!-------------------------------------------
+$ interchange = ""
+$ if arch_code .eqs. "V"
+$ then
+$ interchange = "/interchange"
+$ endif
+$ if (swvers_maj .ges. "8") .and. (swvers_min .ges. 4)
+$ then
+$ interchange = "/interchange/noconvert"
+$ endif
+$!
+$!
+$! Move to the base directories
+$ set def [--]
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$ current_default = f$environment("DEFAULT")
+$ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
+$!
+$ src_root = "src_root:"
+$ if f$trnlnm("src_root1") .nes. "" then src_root = "src_root1:"
+$ backup'interchange' 'src_root'[curl...]*.*;0 -
+ 'filename_base'_original_src.bck/sav
+$ status = $status
+$!
+$! There may be a VMS specific source kit
+$!-----------------------------------------
+$ vms_root = "vms_root:"
+$ if f$trnlnm("vms_root1") .nes. "" then vms_root = "vms_root1:"
+$ files_found = 0
+$ define/user sys$error nl:
+$ define/user sys$output nl:
+$ directory 'vms_root'[...]*.*;*/exc=*.dir
+$ if '$severity' .eq. 1 then files_found = 1
+$!
+$ if files_found .eq. 1
+$ then
+$ backup'interchange' 'vms_root'[curl...]*.*;0 -
+ 'filename_base'_vms_src.bck/sav
+$ status = $status
+$ endif
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit
diff --git a/packages/vms/build_curl-config_script.com b/packages/vms/build_curl-config_script.com
new file mode 100644
index 0000000..ea1881d
--- /dev/null
+++ b/packages/vms/build_curl-config_script.com
@@ -0,0 +1,154 @@
+$! build_curl-config_script.com
+$!
+$! This generates the curl-config. script from the curl-config.in file.
+$!
+$! Copyright 2014, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 16-Dec-2014 J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Skip this if the curl-config. already exists.
+$ if f$search("[--]curl-config.") .nes. "" then goto all_exit
+$!
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$ arch_name = "VAX"
+$ else
+$ arch_name = ""
+$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$ if (arch_name .eqs. "") then arch_name = "UNK"
+$ endif
+$!
+$ x_prefix = "/usr"
+$ x_exec_prefix = "/usr"
+$ x_includedir = "${prefix}/include"
+$ x_cppflag_curl_staticlib = "-DCURL_STATICLIB"
+$ x_enabled_shared = "no"
+$ x_curl_ca_bundle = ""
+$ x_cc = "cc"
+$ x_support_features = "SSL IPv6 libz NTLM"
+$ x_support_protocols1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP"
+$ x_support_protocols2 = " LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP"
+$ x_support_protocols = x_support_protocols1 + x_support_protocols2
+$ x_curlversion = "0.0.0.0"
+$ x_versionnum = ""
+$ x_libdir = "${prefix}/lib"
+$ x_require_lib_deps = ""
+$ x_enable_static = ""
+$ x_ldflags = ""
+$ part1 = "-L/usr/lib -L/SSL_LIB -lssl -lcrypto -lz"
+$ if arch_name .eqs. "VAX"
+$ then
+$ x_libcurl_libs = part1
+$ else
+$ x_libcurl_libs = part1 + " -lgssapi"
+$ endif
+$ x_libext = "a"
+$!
+$! Get the version number
+$!-----------------------
+$ i = 0
+$ open/read/error=version_loop_end vhf [--.include.curl]curlver.h
+$ version_loop:
+$ read/end=version_loop_end vhf line_in
+$ if line_in .eqs. "" then goto version_loop
+$ if f$locate("#define LIBCURL_VERSION ", line_in) .eq. 0
+$ then
+$ x_curlversion = f$element(2," ", line_in) - """" - """"
+$ i = i + 1
+$ endif
+$ if f$locate("#define LIBCURL_VERSION_NUM ", line_in) .eq. 0
+$ then
+$ x_versionnum = f$element(2," ", line_in) - """" - """"
+$ i = i + 1
+$ endif
+$ if i .lt 2 then goto version_loop
+$ version_loop_end:
+$ close vhf
+$!
+$ kit_type = "V"
+$ if f$locate("-", x_curlversion) .lt. f$length(x_curlversion)
+$ then
+$ kit_type = "D"
+$ x_prefix = "/beta"
+$ x_exec_prefix = "/beta"
+$ endif
+$!
+$ if kit_type .nes. "D"
+$ then
+$ part1 = " echo "" '--prefix=/usr' '--exec-prefix=/usr' "
+$ else
+$ part1 = " echo "" '--prefix=/beta' '--exec_prefix=/beta' "
+$ endif
+$ if arch_name .eqs. "VAX"
+$ then
+$ part3 = ""
+$ else
+$ part3 = "'--with-gssapi' "
+$ endif
+$ part2 = "'--disable-dependency-tracking' '--disable-libtool-lock' "
+$ part4 = "'--disable-ntlm-wb' '--with-ca-path=gnv$curl_ca_path'"""
+$!
+$ x_configure_options = part1 + part2 + part3 + part4
+$!
+$!
+$ open/read/error=read_loop_end c_c_in sys$disk:[--]curl-config.in
+$ create sys$disk:[--]curl-config.
+$ open/append c_c_out sys$disk:[--]curl-config.
+$read_loop:
+$ read/end=read_loop_end c_c_in line_in
+$ line_in_len = f$length(line_in)
+$ if f$locate("@", line_in) .ge. line_in_len
+$ then
+$ write c_c_out line_in
+$ goto read_loop
+$ endif
+$ i = 0
+$ line_out = ""
+$sub_loop:
+$ ! Replace between pairs of @ by alternating the elements.
+$ ! If mis-matched pairs, do not substitute anything.
+$ section1 = f$element(i, "@", line_in)
+$ if section1 .eqs. "@"
+$ then
+$ goto sub_loop_end
+$ endif
+$ i = i + 1
+$ section2 = f$element(i, "@", line_in)
+$ if section2 .eqs. "@"
+$ then
+$ goto sub_loop_end
+$ endif
+$ i = i + 1
+$ section3 = f$element(i, "@", line_in)
+$ if section3 .eqs. "@"
+$ then
+$ if line_out .eqs. "" then line_out = line_in
+$ goto sub_loop_end
+$ endif
+$ line_out = line_out + section1
+$ if f$type(x_'section2') .eqs. "STRING"
+$ then
+$ line_out = line_out + x_'section2'
+$ endif
+$ goto sub_loop
+$sub_loop_end:
+$ write c_c_out line_out
+$ goto read_loop
+$read_loop_end:
+$ close c_c_in
+$ close c_c_out
diff --git a/packages/vms/build_gnv_curl.com b/packages/vms/build_gnv_curl.com
new file mode 100644
index 0000000..1eaa7d5
--- /dev/null
+++ b/packages/vms/build_gnv_curl.com
@@ -0,0 +1,38 @@
+$! File: build_gnv_curl.com
+$!
+$! $Id$
+$!
+$! All in one build procedure
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 11-Jun-2009 J. Malmberg
+$!-----------------------------------------------------------------------
+$!
+$ @setup_gnv_curl_build.com
+$!
+$ bash gnv_curl_configure.sh
+$!
+$ @clean_gnv_curl.com
+$!
+$ bash make_gnv_curl_install.sh
+$!
+$ @gnv_link_curl.com
+$!
+$ purge new_gnu:[*...]/log
+$!
+$!
+$exit
diff --git a/packages/vms/build_gnv_curl_pcsi_desc.com b/packages/vms/build_gnv_curl_pcsi_desc.com
new file mode 100644
index 0000000..572b9b8
--- /dev/null
+++ b/packages/vms/build_gnv_curl_pcsi_desc.com
@@ -0,0 +1,488 @@
+$! File: Build_GNV_CURL_PCSI_DESC.COM
+$!
+$! $Id$
+$!
+$! Build the *.pcsi$text file in the following sections:
+$! Required software dependencies.
+$! install/upgrade/postinstall steps.
+$! 1. Duplicate filenames need an alias procedure. (N/A for curl)
+$! 2. ODS-5 filenames need an alias procedure. (N/A for curl)
+$! 3. Special alias links for executables (curl. -> curl.exe)
+$! if a lot, then an alias procedure is needed.
+$! 4. Rename the files to lowercase.
+$! Move Release Notes to destination
+$! Source kit option
+$! Create directory lines
+$! Add file lines for curl.
+$! Add Link alias procedure file (N/A for curl)
+$! Add [.SYS$STARTUP]curl_startup file
+$! Add Release notes file.
+$!
+$! The file PCSI_GNV_CURL_FILE_LIST.TXT is read in to get the files other
+$! than the release notes file and the source backup file.
+$!
+$! The PCSI system can really only handle ODS-2 format filenames and
+$! assumes that there is only one source directory. It also assumes that
+$! all destination files with the same name come from the same source file.
+$! Fortunately CURL does not trip most of these issues, so those steps
+$! above are marked N/A.
+$!
+$! A rename action section is needed to make sure that the files are
+$! created in the GNV$GNU: in the correct case, and to create the alias
+$! link [usr.bin]curl. for [usr.bin]curl.exe.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2009 J. Malmberg
+$!
+$!===========================================================================
+$!
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$ filename_base = f$trnlnm("GNV_PCSI_FILENAME_BASE")
+$ if filename_base .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$! kit type of "D" means a daily build
+$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
+$!
+$!
+$ product_line = "product ''producer' ''base' ''product'"
+$ if updatepatch .eqs. ""
+$ then
+$ product_name = " ''majorver'.''minorver'"
+$ else
+$ product_name = " ''majorver'.''minorver'-''updatepatch'"
+$ endif
+$ product_line = product_line + " ''product_name' full;"
+$!write sys$output product_line
+$!
+$!
+$!
+$! Create the file as a VMS text file.
+$!----------------------------------------
+$ base_file = kit_name
+$ create 'base_file'.pcsi$desc
+$!
+$!
+$! Start building file.
+$!----------------------
+$ open/append pdsc 'base_file'.pcsi$desc
+$!
+$ write pdsc product_line
+$!
+$! Required product dependencies.
+$!----------------------------------
+$ vmsprd = "DEC"
+$ if base .eqs. "I64VMS" then vmsprd = "HP"
+$!
+$ write pdsc " software ''vmsprd' ''base' VMS ;"
+$ arch_type = f$getsyi("ARCH_NAME")
+$ node_swvers = f$getsyi("node_swvers")
+$ vernum = f$extract(1, f$length(node_swvers), node_swvers)
+$ majver = f$element(0, ".", vernum)
+$ minverdash = f$element(1, ".", vernum)
+$ minver = f$element(0, "-", minverdash)
+$ dashver = f$element(1, "-", minverdash)
+$ if dashver .eqs. "-" then dashver = ""
+$ vmstag = majver + minver + dashver
+$ code = f$extract(0, 1, arch_type)
+$ arch_code = f$extract(0, 1, arch_type)
+$ write pdsc -
+ " if (not <software ''vmsprd' ''base' VMS version minimum ''node_swvers'>) ;"
+$ write pdsc " error NEED_VMS''vmstag';"
+$ write pdsc " end if;"
+$!
+$write pdsc " software VMSPORTS ''base' ZLIB ;"
+$write pdsc -
+ " if (not <software VMSPORTS ''base' ZLIB version minimum V1.2-8>) ;"
+$write pdsc " error NEED_ZLIB;"
+$write pdsc " end if;"
+$!
+$!
+$!
+$! install/upgrade/postinstall steps.
+$!-----------------------------------
+$! 1. Duplicate filenames need an alias procedure. (N/A for curl)
+$! 2. ODS-5 filenames need an alias procedure. (N/A for curl)
+$! 3. Special alias links for executables (curl. -> curl.exe)
+$! if a lot, then an alias procedure is needed.
+$! 4. Rename the files to lowercase.
+$!
+$!
+$! Alias links needed.
+$!-------------------------
+$ add_alias_lines = ""
+$ rem_alias_lines = ""
+$ line_out = ""
+$!
+$! Read through the file list to set up aliases and rename commands.
+$!---------------------------------------------------------------------
+$ open/read flst pcsi_gnv_curl_file_list.txt
+$!
+$inst_alias_loop:
+$ read/end=inst_alias_loop_end flst line_in
+$ line_in = f$edit(line_in,"compress,trim,uncomment")
+$ if line_in .eqs. "" then goto inst_alias_loop
+$ pathname = f$element(0, " ", line_in)
+$ linkflag = f$element(1, " ", line_in)
+
+$ if linkflag .nes. "->" then goto inst_alias_write
+$!
+$ linktarget = f$element(2, " ", line_in)
+$ if kit_type .eqs. "D"
+$ then
+$ old_start = f$locate("[gnv.usr", pathname)
+$ if old_start .lt. f$length(pathname)
+$ then
+$ pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$ linktarget = "[gnv.beta" + linktarget - "[gnv.usr"
+$ endif
+$ endif
+$ nlink = "pcsi$destination:" + pathname
+$ ntarg = "pcsi$destination:" + linktarget
+$ new_add_alias_line = -
+ """if f$search(""""''nlink'"""") .eqs. """""""" then" + -
+ " set file/enter=''nlink' ''ntarg'"""
+$ if add_alias_lines .nes. ""
+$ then
+$ add_alias_lines = add_alias_lines + "," + new_add_alias_line
+$ else
+$ add_alias_lines = new_add_alias_line
+$ endif
+$!
+$ new_rem_alias_line = -
+ """if f$search(""""''nlink'"""") .nes. """""""" then" + -
+ " set file/remove ''nlink';"""
+$ if rem_alias_lines .nes. ""
+$ then
+$ rem_alias_lines = rem_alias_lines + "," + new_rem_alias_line
+$ else
+$ rem_alias_lines = new_rem_alias_line
+$ endif
+$!
+$ goto inst_alias_loop
+$!
+$inst_alias_write:
+$!
+$! execute install / remove
+$ write pdsc " execute install ("
+$! add aliases
+$ i = 0
+$ex_ins_loop:
+$ line = f$element(i, ",", add_alias_lines)
+$ i = i + 1
+$ if line .eqs. "" then goto ex_ins_loop
+$ if line .eqs. "," then goto ex_ins_loop_end
+$ if line_out .nes. "" then write pdsc line_out,","
+$ line_out = line
+$ goto ex_ins_loop
+$ex_ins_loop_end:
+$ write pdsc line_out
+$ line_out = ""
+$ write pdsc " )"
+$ write pdsc " remove ("
+$! remove aliases
+$ i = 0
+$ex_rem_loop:
+$ line = f$element(i, ",", rem_alias_lines)
+$ i = i + 1
+$ if line .eqs. "" then goto ex_rem_loop
+$ if line .eqs. "," then goto ex_rem_loop_end
+$ if line_out .nes. "" then write pdsc line_out,","
+$ line_out = line
+$ goto ex_rem_loop
+$ex_rem_loop_end:
+$ write pdsc line_out
+$ line_out = ""
+$ write pdsc " ) ;"
+$!
+$! execute upgrade
+$ write pdsc " execute upgrade ("
+$ i = 0
+$ex_upg_loop:
+$ line = f$element(i, ",", rem_alias_lines)
+$ i = i + 1
+$ if line .eqs. "" then goto ex_upg_loop
+$ if line .eqs. "," then goto ex_upg_loop_end
+$ if line_out .nes. "" then write pdsc line_out,","
+$ line_out = line
+$ goto ex_upg_loop
+$ex_upg_loop_end:
+$ write pdsc line_out
+$ line_out = ""
+$! remove aliases
+$ write pdsc " ) ;"
+$!
+$! execute postinstall
+$ write pdsc " execute postinstall ("
+$ if arch_code .nes. "V"
+$ then
+$ line_out = " ""set process/parse=extended"""
+$ endif
+$ i = 0
+$ex_pins_loop:
+$ line = f$element(i, ",", add_alias_lines)
+$ i = i + 1
+$ if line .eqs. "" then goto ex_pins_loop
+$ if line .eqs. "," then goto ex_pins_loop_end
+$ if line_out .nes. "" then write pdsc line_out,","
+$ line_out = line
+$ goto ex_pins_loop
+$ex_pins_loop_end:
+$ if line_out .eqs. "" then line_out = " ""continue"""
+$! write pdsc line_out
+$! line_out = ""
+$! add aliases and follow with renames.
+$!
+$goto inst_dir
+$!
+$inst_dir_loop:
+$ read/end=inst_alias_loop_end flst line_in
+$ line_in = f$edit(line_in,"compress,trim,uncomment")
+$ if line_in .eqs. "" then goto inst_dir_loop
+$inst_dir:
+$ pathname = f$element(0, " ", line_in)
+$ if kit_type .eqs. "D"
+$ then
+$ if pathname .eqs. "[gnv]usr.dir"
+$ then
+$ pathname = "[gnv]beta.dir"
+$ else
+$ old_start = f$locate("[gnv.usr", pathname)
+$ if old_start .lt. f$length(pathname)
+$ then
+$ pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$ endif
+$ endif
+$ endif
+$!
+$! Ignore the directory entries for now.
+$!-----------------------------------------
+$ filedir = f$parse(pathname,,,"DIRECTORY")
+$ if pathname .eqs. filedir then goto inst_dir_loop
+$!
+$! process .dir extensions for rename
+$! If this is not a directory then start processing files.
+$!-------------------------
+$ filetype = f$parse(pathname,,,"TYPE")
+$ filetype_u = f$edit(filetype, "upcase")
+$ filename = f$parse(pathname,,,"NAME")
+$ if filetype_u .nes. ".DIR" then goto inst_file
+$!
+$! process directory lines for rename.
+$!--------------------------------------
+$ if line_out .nes. ""
+$ then
+$ write pdsc line_out,","
+$ line_out = ""
+$ endif
+$ if arch_code .nes. "V"
+$ then
+$ if line_out .nes. "" then write pdsc line_out,","
+$ line_out = " ""rename pcsi$destination:''pathname' ''filename'.DIR"""
+$ else
+$ if line_out .nes. "" then write pdsc line_out
+$ line_out = ""
+$ endif
+$ goto inst_dir_loop
+$!
+$!
+$! process file lines for rename
+$!---------------------------------
+$inst_file_loop:
+$ read/end=inst_alias_loop_end flst line_in
+$ line_in = f$edit(line_in,"compress,trim,uncomment")
+$ if line_in .eqs. "" then goto inst_dir_loop
+$ pathname = f$element(0, " ", line_in)
+$ if kit_type .eqs. "D"
+$ then
+$ if pathname .eqs. "[gnv]usr.dir"
+$ then
+$ pathname = "[gnv]beta.dir"
+$ else
+$ old_start = f$locate("[gnv.usr", pathname)
+$ if old_start .lt. f$length(pathname)
+$ then
+$ pathname = "[gnv.beta" + pathname - "[gnv.usr"
+$ endif
+$ endif
+$ endif
+$!
+$! Filenames with $ in them are VMS special and do not need to be lowercased.
+$! --------------------------------------------------------------------------
+$ if f$locate("$", pathname) .lt. f$length(pathname) then goto inst_file_loop
+$!
+$ filetype = f$parse(pathname,,,"TYPE")
+$ filename = f$parse(pathname,,,"NAME") + filetype
+$inst_file:
+$ if arch_code .nes. "V"
+$ then
+$ if line_out .nes. "" then write pdsc line_out,","
+$ filetype = f$parse(pathname,,,"TYPE")
+$ filename = f$parse(pathname,,,"NAME") + filetype
+$ line_out = " ""rename pcsi$destination:''pathname' ''filename'"""
+$ else
+$ if line_out .nes. "" then write pdsc line_out
+$ line_out = ""
+$ endif
+$ goto inst_file_loop
+$!
+$inst_alias_loop_end:
+$!
+$write pdsc line_out
+$write pdsc " ) ;"
+$close flst
+$!
+$! Move Release Notes to destination
+$!-------------------------------------
+$write pdsc " information RELEASE_NOTES phase after ;"
+$!
+$! Source kit option
+$!---------------------
+$write pdsc " option SOURCE default 0;"
+$write pdsc " directory ""[gnv.common_src]"" PROTECTION PUBLIC ;"
+$write pdsc -
+ " file ""[gnv.common_src]''filename_base'_original_src.bck"""
+$write pdsc -
+ " source [common_src]''filename_base'_original_src.bck ;"
+$if f$search("gnv$gnu:[vms_src]''filename_base'_vms_src.bck") .nes. ""
+$then
+$ write pdsc " directory ""[gnv.vms_src]"" PROTECTION PUBLIC ;"
+$ write pdsc " file ""[gnv.vms_src]''filename_base'_vms_src.bck"""
+$ write pdsc " source [vms_src]''filename_base'_vms_src.bck ;"
+$endif
+$write pdsc " end option;"
+$!
+$!
+$! Read through the file list again.
+$!----------------------------------
+$open/read flst pcsi_gnv_curl_file_list.txt
+$!
+$!
+$! Create directory lines
+$!-------------------------
+$flst_dir_loop:
+$ read/end=flst_loop_end flst line_in
+$ line_in = f$edit(line_in,"compress,trim,uncomment")
+$ if line_in .eqs. "" then goto flst_dir_loop
+$!
+$ filename = f$element(0, " ", line_in)
+$ linkflag = f$element(1, " ", line_in)
+$ if linkflag .eqs. "->" then goto flst_dir_loop
+$!
+$! Ignore .dir extensions
+$!-------------------------
+$ filetype = f$edit(f$parse(filename,,,"TYPE"), "upcase")
+$ if filetype .eqs. ".DIR" then goto flst_dir_loop
+$!
+$ destname = filename
+$ if kit_type .eqs. "D"
+$ then
+$ old_start = f$locate("[gnv.usr", destname)
+$ if old_start .lt. f$length(destname)
+$ then
+$ destname = "[gnv.beta" + destname - "[gnv.usr"
+$ endif
+$ endif
+$!
+$! It should be just a directory then.
+$!-------------------------------------
+$ filedir = f$edit(f$parse(filename,,,"DIRECTORY"), "lowercase")
+$! If this is not a directory then start processing files.
+$!---------------------------------------------------------
+$ if filename .nes. filedir then goto flst_file
+$!
+$ write pdsc " directory ""''destname'"" PROTECTION PUBLIC ;"
+$ goto flst_dir_loop
+$!
+$!
+$! Add file lines for curl.
+$!---------------------------
+$flst_file_loop:
+$ read/end=flst_loop_end flst line_in
+$ line_in = f$edit(line_in,"compress,trim,uncomment")
+$ if line_in .eqs. "" then goto inst_file_loop
+$ filename = f$element(0, " ", line_in)
+$ destname = filename
+$ if kit_type .eqs. "D"
+$ then
+$ old_start = f$locate("[gnv.usr", destname)
+$ if old_start .lt. f$length(destname)
+$ then
+$ destname = "[gnv.beta" + destname - "[gnv.usr"
+$ endif
+$ endif
+$flst_file:
+$ srcfile = filename - "gnv."
+$ write pdsc " file ""''destname'"" "
+$ write pdsc " source ""''srcfile'"" ;"
+$ goto flst_file_loop
+$!
+$flst_loop_end:
+$ close flst
+$!
+$! Add Link alias procedure file (N/A for curl)
+$!------------------------------------------------
+$!
+$! Add [.SYS$STARTUP]curl_startup file
+$!---------------------------------------
+$ if kit_type .eqs. "D"
+$ then
+$ write pdsc " file ""[sys$startup]curl_daily_startup.com"""
+$ else
+$ write pdsc " file ""[sys$startup]curl_startup.com"""
+$ endif
+$ write pdsc " source [usr.lib]curl_startup.com ;"
+$!
+$! Add Release notes file.
+$!------------------------------
+$ write pdsc -
+ " file ""[SYSHLP]''filename_base'.release_notes"" release notes ;"
+$!
+$! Close the product file
+$!------------------------
+$ write pdsc "end product;"
+$!
+$close pdsc
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_gnv_curl_pcsi_text.com b/packages/vms/build_gnv_curl_pcsi_text.com
new file mode 100644
index 0000000..df98f63
--- /dev/null
+++ b/packages/vms/build_gnv_curl_pcsi_text.com
@@ -0,0 +1,198 @@
+$! File: Build_GNV_curl_pcsi_text.com
+$!
+$! $Id$
+$!
+$! Build the *.pcsi$text file from the four components:
+$! 1. Generated =product header section
+$! 2. [--]readme. file from the Curl distribution, modified to fit
+$! a pcsi$text file format.
+$! 3. [--]copying file from the Curl distribution, modified to fit
+$! a pcsi$text file format.
+$! 4. Generated Producer section.
+$!
+$! Set the name of the release notes from the GNV_PCSI_FILENAME_BASE
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2009 J. Malmberg
+$!
+$!===========================================================================
+$!
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$!
+$ product_line = "=product ''producer' ''base' ''product'"
+$ if updatepatch .eqs. ""
+$ then
+$ product_name = " ''majorver'.''minorver'"
+$ else
+$ product_name = " ''majorver'.''minorver'-''updatepatch'"
+$ endif
+$ product_line = product_line + " ''product_name' full"
+$!
+$!
+$! If this is VAX and the file is on NFS, the names may be mangled.
+$!-----------------------------------------------------------------
+$ readme_file = ""
+$ if f$search("[--]readme.") .nes. ""
+$ then
+$ readme_file = "[--]readme."
+$ else
+$ if f$search("[--]$README.") .nes. ""
+$ then
+$ readme_file = "[--]$README."
+$ else
+$ write sys$output "Can not find readme file."
+$ goto all_exit
+$ endif
+$ endif
+$ copying_file = ""
+$ if f$search("[--]copying.") .nes. ""
+$ then
+$ copying_file = "[--]copying."
+$ else
+$ if f$search("[--]$COPYING.") .nes. ""
+$ then
+$ copying_file = "[--]$COPYING."
+$ else
+$ write sys$output "Can not find copying file."
+$ goto all_exit
+$ endif
+$ endif
+$!
+$! Create the file as a VMS text file.
+$!----------------------------------------
+$ base_file = kit_name
+$ create 'base_file'.pcsi$text
+$!
+$!
+$! Start building file.
+$!----------------------
+$ open/append ptxt 'base_file'.pcsi$text
+$ write ptxt product_line
+$!
+$!
+$! First insert the Readme file.
+$!
+$ open/read rf 'readme_file'
+$!
+$ write ptxt "1 'PRODUCT"
+$ write ptxt "=prompt ''producter' ''product' for OpenVMS"
+$!
+$rf_loop:
+$ read/end=rf_loop_end rf line_in
+$ if line_in .nes. ""
+$ then
+$! PCSI files use the first character in for their purposes.
+$!--------------------------------------------------------------
+$ first_char = f$extract(0, 1, line_in)
+$ if first_char .nes. " " then line_in = " " + line_in
+$ endif
+$ write ptxt line_in
+$ goto rf_loop
+$rf_loop_end:
+$ close rf
+$!
+$!
+$! Now add in the copying file
+$!--------------------------------
+$ write ptxt ""
+$ write ptxt "1 'NOTICE"
+$ write ptxt ""
+$!
+$ open/read cf 'copying_file'
+$!
+$cf_loop:
+$ read/end=cf_loop_end cf line_in
+$ if line_in .nes. ""
+$ then
+$! PCSI files use the first character in for their purposes.
+$!--------------------------------------------------------------
+$ first_char = f$extract(0, 1, line_in)
+$ if first_char .nes. " " then line_in = " " + line_in
+$ endif
+$ write ptxt line_in
+$ goto cf_loop
+$cf_loop_end:
+$ close cf
+$!
+$! Now we need the rest of the boiler plate.
+$!--------------------------------------------
+$ write ptxt ""
+$ write ptxt "1 'PRODUCER"
+$ write ptxt "=prompt ''producer_full_name'"
+$ write ptxt -
+ "This software product is provided by ''producer_full_name' with no warranty."
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ node_swvers = f$getsyi("node_swvers")
+$ vernum = f$extract(1, f$length(node_swvers), node_swvers)
+$ majver = f$element(0, ".", vernum)
+$ minverdash = f$element(1, ".", vernum)
+$ minver = f$element(0, "-", minverdash)
+$ dashver = f$element(1, "-", minverdash)
+$ if dashver .eqs. "-" then dashver = ""
+$ vmstag = majver + minver + dashver
+$ code = f$extract(0, 1, arch_type)
+$!
+$ write ptxt "1 NEED_VMS''vmstag'"
+$ write ptxt -
+ "=prompt OpenVMS ''vernum' or later is not installed on your system."
+$ write ptxt "This product requires OpenVMS ''vernum' or later to function."
+$ write ptxt "1 NEED_ZLIB"
+$ write ptxt "=prompt ZLIB 1.2-8 or later is not installed on your system."
+$ write ptxt "This product requires ZLIB 1.2-8 or later to function."
+$ write ptxt "1 SOURCE"
+$ write ptxt "=prompt Source modules for ''product'"
+$ write ptxt "The Source modules for ''product' will be installed."
+$ write ptxt "1 RELEASE_NOTES"
+$ write ptxt "=prompt Release notes are available in the [SYSHLP] directory."
+$!
+$ close ptxt
+$!
+$!
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_gnv_curl_release_notes.com b/packages/vms/build_gnv_curl_release_notes.com
new file mode 100644
index 0000000..da0276f
--- /dev/null
+++ b/packages/vms/build_gnv_curl_release_notes.com
@@ -0,0 +1,102 @@
+$! File: Build_GNV_curl_release_notes.com
+$!
+$! $Id$
+$!
+$! Build the release note file from the four components:
+$! 1. The curl_release_note_start.txt
+$! 2. The hp_ssl_release_info.txt
+$! 3. [--]readme. file from the Curl distribution.
+$! 4. The Curl_gnv-build_steps.txt.
+$!
+$! Set the name of the release notes from the GNV_PCSI_FILENAME_BASE
+$! logical name.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 14-Jun-2009 J. Malmberg
+$!
+$!===========================================================================
+$!
+$ base_file = f$trnlnm("GNV_PCSI_FILENAME_BASE")
+$ if base_file .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$!
+$!
+$ curl_readme = f$search("sys$disk:[--]readme.")
+$ if curl_readme .eqs. ""
+$ then
+$ curl_readme = f$search("sys$disk:[--]$README.")
+$ endif
+$ if curl_readme .eqs. ""
+$ then
+$ write sys$output "Can not find Curl readme file."
+$ goto all_exit
+$ endif
+$!
+$ curl_copying = f$search("sys$disk:[--]copying.")
+$ if curl_copying .eqs. ""
+$ then
+$ curl_copying = f$search("sys$disk:[--]$COPYING.")
+$ endif
+$ if curl_copying .eqs. ""
+$ then
+$ write sys$output "Can not find Curl copying file."
+$ goto all_exit
+$ endif
+$!
+$ vms_readme = f$search("sys$disk:[]readme.")
+$ if vms_readme .eqs. ""
+$ then
+$ vms_readme = f$search("sys$disk:[]$README.")
+$ endif
+$ if vms_readme .eqs. ""
+$ then
+$ write sys$output "Can not find VMS specific Curl readme file."
+$ goto all_exit
+$ endif
+$!
+$ curl_release_notes = f$search("sys$disk:[--]release-notes.")
+$ if curl_release_notes .eqs. ""
+$ then
+$ curl_release_notes = f$search("sys$disk:[--]$RELEASE-NOTES.")
+$ endif
+$ if curl_release_notes .eqs. ""
+$ then
+$ write sys$output "Can not find Curl release-notes file."
+$ goto all_exit
+$ endif
+$!
+$ if f$search("sys$disk:[]hp_ssl_release_info.txt") .eqs. ""
+$ then
+$ write sys$output "GNV_LINK_CURL.COM has not been run!"
+$ goto all_exit
+$ endif
+$!
+$ type/noheader 'curl_readme', 'vms_readme', -
+ 'curl_release_notes', -
+ sys$disk:[]curl_release_note_start.txt, -
+ sys$disk:[]hp_ssl_release_info.txt, -
+ 'curl_copying', -
+ sys$disk:[]curl_gnv_build_steps.txt -
+ /out='base_file'.release_notes
+$!
+$ purge 'base_file'.release_notes
+$ rename 'base_file.release_notes ;1
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_libcurl_pc.com b/packages/vms/build_libcurl_pc.com
new file mode 100644
index 0000000..97e6ae6
--- /dev/null
+++ b/packages/vms/build_libcurl_pc.com
@@ -0,0 +1,205 @@
+$! File: build_libcurl_pc.com
+$!
+$! $Id:$
+$!
+$! Build the libcurl.pc file from the libcurl.pc.in file
+$!
+$! Copyright 2013, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 15-Jun-2013 J. Malmberg
+$!
+$!===========================================================================
+$!
+$! Skip this if the libcurl.pc already exists.
+$ if f$search("[--]libcurl.pc") .nes. "" then goto all_exit
+$!
+$! Need to know the kit type.
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "-" then updatepatch = ""
+$!
+$! kit type of "D" means a daily build
+$ kit_type = f$edit(f$extract(0, 1, majorver), "upcase")
+$!
+$ pc_file_in = "[--]libcurl^.pc.in"
+$!
+$ if f$search(pc_file_in) .eqs. ""
+$ then
+$ pc_file_in = "[--]libcurl.pc$5nin"
+$ if f$search(pc_file_in) .eqs. ""
+$ then
+$ pc_file_in = "[--]libcurl.pc_in"
+$ if f$search(pc_file_in) .eqs. ""
+$ then
+$ write sys$output "Can not find libcurl.pc.in."
+$ goto all_exit
+$ endif
+$ endif
+$ endif
+$!
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$ arch_name = "VAX"
+$ else
+$ arch_name = ""
+$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$ if (arch_name .eqs. "") then arch_name = "UNK"
+$ endif
+$!
+$!
+$ curl_version = "0.0.0"
+$ open/read vf [--.src]tool_version.h
+$version_loop:
+$ read vf/end=version_loop_end line_in
+$ if line_in .eqs. "" then goto version_loop
+$ key = f$element(0, " ", line_in)
+$ if key .nes. "#define" then goto version_loop
+$ name = f$element(1, " ", line_in)
+$ if name .eqs. "VERSION"
+$ then
+$ curl_version = f$element(2, " ", line_in) - """" - """"
+$ else
+$ goto version_loop
+$ endif
+$version_loop_end:
+$ close vf
+$!
+$!
+$ create [--]libcurl.pc
+$ open/append pco [--]libcurl.pc
+$ open/read pci 'pc_file_in'
+$pc_file_loop:
+$ read pci/end=pc_file_loop_end line_in
+$!
+$! blank lines
+$ if line_in .eqs. ""
+$ then
+$ write pco ""
+$ goto pc_file_loop
+$ endif
+$!
+$! comment lines
+$ key = f$extract(0, 1, line_in)
+$ if key .eqs. "#"
+$ then
+$ write pco line_in
+$ goto pc_file_loop
+$ endif
+$!
+$! Special handling for libs.
+$ if f$locate("Libs:", line_in) .eq. 0
+$ then
+$ write pco "#",line_in
+$ goto pc_file_loop
+$ endif
+$! No substitution line
+$ line_in_len = f$length(line_in)
+$ if f$locate("@", line_in) .ge. line_in_len
+$ then
+$ write pco line_in
+$ goto pc_file_loop
+$ endif
+$!
+$ if f$locate("@prefix@", line_in) .lt line_in_len
+$ then
+$ if kit_type .nes. "D"
+$ then
+$ write pco "prefix=/usr"
+$ else
+$ write pco "prefix=/beta"
+$ endif
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@exec_prefix@", line_in) .lt line_in_len
+$ then
+$ if kit_type .nes. "D"
+$ then
+$ write pco "exec_prefix=/usr"
+$ else
+$ write pco "exec_prefix=/beta"
+$ endif
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@libdir@", line_in) .lt line_in_len
+$ then
+$ write pco "libdir=$(exec_prefix}/lib"
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@includedir@", line_in) .lt line_in_len
+$ then
+$ write pco "includedir=$(prefix}/include"
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@SUPPORT_PROTOCOLS@", line_in) .lt line_in_len
+$ then
+$ proto1 = "DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS"
+$ proto2 = " LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP"
+$ proto = proto1 + proto2
+$ write pco "supported_protocols=""" + proto + """"
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@SUPPORT_FEATURES@", line_in) .lt line_in_len
+$ then
+$ if arch_name .eqs. "VAX"
+$ then
+$ write pco "supported_features=""SSL libz NTLM"""
+$ else
+$ write pco "supported_features=""SSL IPv6 libz NTLM"""
+$ endif
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@CURLVERSION@", line_in) .lt line_in_len
+$ then
+$ write pco "Version: ''curl_version'"
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@LIBCURL_LIBS@", line_in) .lt line_in_len
+$ then
+$ if arch_name .eqs. "VAX"
+$ then
+$ write pco "Libs.private: -lssl -lcrypto -lz"
+$ else
+$ write pco "Libs.private: -lssl -lcrypto -lgssapi -lz"
+$ endif
+$ goto pc_file_loop
+$ endif
+$ if f$locate("@CPPFLAG_CURL_STATICLIB@", line_in) .lt line_in_len
+$ then
+$ write pco "Cflags: -I${includedir} -DCURL_STATICLIB"
+$ goto pc_file_loop
+$ endif
+$!
+$pc_file_loop_end:
+$ close pco
+$ close pci
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/build_vms.com b/packages/vms/build_vms.com
index 68d9f00..e21e57c 100644
--- a/packages/vms/build_vms.com
+++ b/packages/vms/build_vms.com
@@ -18,16 +18,43 @@ $! CLEAN_ALL Delete product files for all host architectures. (No
$! build done.)
$!
$! 64 Compile with 64-bit pointers.
+$! Note, you must match the pointer size that the OpenSSL
+$! shared image expects.
+$! Currently curl is not building properly with 64 bit pointers
+$! on VMS because it is trying to cast pointers to 32 bit
+$! integers and some OpenVMS library routines called by curl
+$! do not yet support 64 bit pointers.
$! CCQUAL=x Add "x" to the C compiler qualifiers.
-$! DEBUG Compile and link with debug.
-$! IEEE Use IEEE floating point. (Alpha.)
-$! LARGE Enable large-file support. (Non-VAX, VMS >= V7.2.)
-$! LDAP Enable LDAP support.
+$! Default qualifiers are:
+$! /standard=relaxed
+$! /names=(as_is, shortened)
+$! /repository=[.'arch']
+$! /nested_include_directory=none
+$! /define=(_LARGEFILE=1,_USE_STD_STAT=1) (non-vax)
+$! /float=ieee/ieee_mode=denorm_results (non-vax)
+$! DEBUG Compile debug and nooptimize
+$! Alpha/IA64 always compiles /debug.
+$! Always link a debug image.
+$! NOIEEE Do not use IEEE floating point. (Alpha/I64)
+$! VAX must always use DFLOAT
+$! NOLARGE Disable large-file support if large file support available.
+$! (Non-VAX, VMS >= V7.2.)
+$! NOLDAP Disable LDAP support if LDAP is available.
+$! NOKERBEROS Disable Kerberos support if Kerberos is available.
$! LIST Create C compiler listings and linker maps.
+$! /list/show=(expan,includ)/machine
+$! FULLLIST Full detailed listing.
+$! /list/show=(all, nomessages)/machine
$! NOHPSSL Don't use HP SSL, even if available.
+$! Note, you must match the pointer size that the OpenSSL
+$! shared image expects. This procedure will select the
+$! correct HP OpenSSL image.
$! NOSSL Don't use any SSL, even if available.
$! OSSLOLB Use OpenSSL object libraries (.OLB), even if shared
$! images (.EXE) are available.
+$! NOZLIB Don't use GNV$ZLIB shared image even if available.
+$! REALCLEAN Delete product files for all host architectures. (No
+$! build done.) Alias for CLEAN_ALL
$!
$! DCL Symbols:
$!
@@ -73,7 +100,7 @@ $! Changed to avoid case confusion on ODS5 disks.
$! Added more default dev:[dir] save+restore.
$! Moved remaining "defines.com" code (back) into
$! here, eliminating the hard-coded OpenSSL nonsense.
-$! Changed to use F$GETSYI( "ARCH_NAME") (or
+$! Changed to use F$GETSYI("ARCH_NAME") (or
$! equivalent) to name architecture-specific product
$! file destination directory, and to create the
$! directory if needed (obviating inclusion of these
@@ -84,260 +111,576 @@ $! command across multiple lines to avoid DCL
$! line-too-long problems.
$! Changed "vo_c" messages to show the CC qualifiers
$! once, not with every compile command.
+$! 01-Jan-2013 J. Malmberg
+$! VMS build procedures need to be able to work with
+$! the default set to a search list, with created or
+$! modified files only in the first member of the search
+$! list.
+$! Whitespace change to be more compatible with current
+$! practices.
+$! One pass option parsing instead of loop.
+$! GNV ZLIB shared image support.
+$! KERBEROS support where available.
+$! LDAP default to on where available
+$! LARGEFILE default to on where available
+$! IEEE float default to on where available.
+$! Generate the curl_config.h file from system inspection.
+$! Linker finds ldap with out option file.
+$! 13-Mar-2013, Tom Grace
+$! Added missing slash in cc_full_list.
+$! Removed unwanted extra quotes inside symbol tool_main
+$! for non-VAX architectures that triggered link failure.
+$! Replaced curl_sys_inc with sys_inc.
+$! 19-Mar-2013, John Malmberg
+$! symbol tool_main needs to be quoted when parse style is
+$! set to exended in versions of VMS greater than 7.3-1.
+$! Remove curlbuild.h generation as it should be pre-built
+$! in the curl release or daily tarball.
+$! 12-Jul-2013, John Malmberg
+$! Adjust to find and use ZLIB from the Jean-Francois
+$! Pieronne shared image and newer GNV ZLIB kit that
+$! is upward compatible with Jean-Francois's kit.
+$! Remove tabs from file.
+$! Fixed DCL formatting as follows:
+$! * Labels have no space after leading $.
+$! * 1 space after $ for first level.
+$! * 3 spaces after $ for second level. Line start + 4.
+$! * 7 spaces after $ for third level. Line start + 8.
+$! * Each level after that indents 4 characters.
+$! * then/else/endif same indentation as if statement.
+$! 17-Nov-2014, Michael Steve
+$! Modified build to handle new location of the VTLS lib
+$! source within zip archive. Not a pretty fix.
+$!
+$!===========================================================================
$!
$!
$! Save the original default dev:[dir], and arrange for its restoration
$! at exit.
-$!
+$!------------------------------------------------------------------------
$ curl = ""
-$ orig_def = f$environment( "DEFAULT")
+$ orig_def = f$environment("DEFAULT")
$ on error then goto Common_Exit
$ on control_y then goto Common_Exit
$!
$ ctrl_y = 1556
-$ proc = f$environment( "PROCEDURE")
-$ proc_dev_dir = -
- f$parse( proc, , , "DEVICE")+ f$parse( proc, , , "DIRECTORY")
+$ proc = f$environment("PROCEDURE")
+$ proc_fid = f$file_attributes(proc, "FID")
+$ proc_dev = f$parse(proc, , , "DEVICE")
+$ proc_dir = f$parse(proc, , , "DIRECTORY")
+$ proc_name = f$parse(proc, , , "NAME")
+$ proc_type = f$parse(proc, , , "TYPE")
+$ proc_dev_dir = proc_dev + proc_dir
+$!
+$! Have to manually parse the device for a search list.
+$! Can not use the f$parse() as it will return the first name
+$! in the search list.
+$!
+$ orig_def_dev = f$element(0, ":", orig_def) + ":"
+$ if orig_def_dev .eqs. "::" then orig_def_dev = "sys$disk:"
+$ test_proc = orig_def_dev + proc_dir + proc_name + proc_type
+$!
+$! If we can find this file using the default directory
+$! then we know that we should use the original device from the
+$! default directory which could be a search list.
+$!
+$ test_proc_fid = f$file_attributes(test_proc, "FID")
+$!
+$ if (test_proc_fid .eq. proc_fid)
+$ then
+$ proc_dev_dir = orig_def_dev + proc_dir
+$ endif
+$!
$!
$! Verbose output message stuff. Define symbol to "write sys$output" or "!".
$! vo_c - verbose output for compile
$! vo_l - link
$! vo_o - object check
$!
-$ vo_c = "write sys$output"
-$ vo_l = "write sys$output"
-$ vo_o = "!"
+$ vo_c := "write sys$output"
+$ vo_l := "write sys$output"
+$ vo_o := "!"
$!
$! Determine the main distribution directory ("[--]") in an
$! ODS5-tolerant (case-insensitive) way. (We do assume that the only
-$! "]" is the one at the end.)
+$! "]" or ">" is the one at the end.)
+$!
+$! Some non-US VMS installations report ">" for the directory delimiter
+$! so do not assume that it is "]".
+$!
+$ orig_def_len = f$length(orig_def)
+$ delim = f$extract(orig_def_len - 1, 1, orig_def)
$!
$ set default 'proc_dev_dir'
$ set default [--]
-$ top_dev_dir = f$environment( "DEFAULT")- "]"
+$ base_dev_dir = f$environment("default")
+$ top_dev_dir = base_dev_dir - delim
+$!
+$!
$!
$! Define the architecture-specific product file destination directory
$! name(s).
$!
-$ if (f$getsyi( "HW_MODEL") .lt. 1024)
+$ parse_style = "TRADITIONAL"
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
$ then
$ arch_name = "VAX"
$ else
$ arch_name = ""
-$ arch_name = arch_name+ f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
$ if (arch_name .eqs. "") then arch_name = "UNK"
+$!
+$! Extended parsing option starts with VMS 7.3-1.
+$! There is no 7.4, so that simplifies the parse a bit.
+$!
+$ node_swvers = f$getsyi("node_swvers")
+$ version_patch = f$extract(1, f$length(node_swvers), node_swvers)
+$ maj_ver = f$element(0, ".", version_patch)
+$ min_ver_patch = f$element(1, ".", version_patch)
+$ min_ver = f$element(0, "-", min_ver_patch)
+$ patch = f$element(1, "-", min_ver_patch)
+$ if patch .eqs. "-" then patch = ""
+$ parse_x = 0
+$ if maj_ver .ges. "8"
+$ then
+$ parse_x = 1
+$ else
+$ if maj_ver .eqs. "7" .and. min_ver .ges. "3" .and. patch .nes. ""
+$ then
+$ parse_x = 1
+$ endif
+$ endif
+$ if parse_x
+$ then
+$ parse_style = f$getjpi("", "parse_style_perm")
+$ endif
$ endif
$!
-$ exedir = proc_dev_dir- "]"+ ".''arch_name']"
+$ exedir = proc_dev_dir - delim + ".''arch_name'" + delim
$ lisdir = exedir
$ objdir = exedir
$!
+$! When building on a search list, need to do a create to make sure that
+$! the output directory exists, since the clean procedure tries to delete
+$! it.
+$ create/dir 'exedir'/prot=o:rwed
+$!
$! Interpret command-line options.
$!
$ hpssl = 0
-$ ldap = 0
+$ ldap = 1
$ list = 0
+$ full_list = 0
$ nohpssl = 0
$ nossl = 0
$ openssl = 0
$ osslolb = 0
+$ nozlib = 0
+$ nokerberos = 0
+$ cc_names = "/names=(shortened, as_is)/repository='exedir'
+$ cc_defs = "HAVE_CONFIG_H=1"
+$ cc_list = "/list='objdir'/show=(expan, includ)/machine
+$ cc_full_list = "/list='objdir'/show=(all, nomessages)/machine
+$ link_qual = ""
+$ if arch_name .eqs. "VAX"
+$ then
+$ cc_debug = "/nodebug/optimize"
+$ !cc_defs = cc_defs + ""
+$ cc_float = ""
+$ cc_large = ""
+$ else
+$ cc_debug = "/debug/optimize"
+$ cc_defs = cc_defs + ",_USE_STD_STAT"
+$ cc_float = "/float=ieee/ieee_mode=denorm_results"
+$ cc_large = ",_LARGEFILE"
+$ endif
$ cc_qual1 = ""
$ cc_qual2 = ""
-$ cc_defs = "HAVE_CONFIG_H=1"
-$ if (f$type( CURL_CCDEFS) .nes. "")
+$ if (f$type(CURL_CCDEFS) .nes. "")
$ then
-$ CURL_CCDEFS = f$edit( CURL_CCDEFS, "TRIM")
-$ cc_defs = cc_defs+ ", "+ CURL_CCDEFS
+$ CURL_CCDEFS = f$edit(CURL_CCDEFS, "TRIM")
+$ cc_defs = cc_defs + ", " + CURL_CCDEFS
$ endif
-$ link_qual = ""
$ msg_qual = "/object = ''objdir'"
$ ssl_opt = ""
$!
-$ arg = 1
-$arg_loop:
-$ p = "p''arg'"
-$ arg_val = 'p'
-$ if (arg_val .eqs. "") then goto arg_loop_out
-$ arg_val = f$edit( arg_val, "upcase")
+$! Allow arguments to be grouped together with comma or separated by spaces
+$! Do no know if we will need more than 8.
+$ args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
+$ args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
$!
-$ if (arg_val .eqs. "CLEAN")
-$ then
-$ prods = "''exedir'*.*;*"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir+ arch_name+ ".DIR;1"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ goto Common_Exit
-$ endif
+$! Provide lower case version to simplify parsing.
+$ args_lower = f$edit(args, "LOWERCASE,COLLAPSE")
$!
-$ if (arg_val .eqs. "CLEAN_ALL")
-$ then
-$ prods = proc_dev_dir- "]"+ ".ALPHA]*.*;*"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir+ "ALPHA"+ ".DIR;1"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir- "]"+ ".IA64]*.*;*"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir+ "IA64"+ ".DIR;1"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir- "]"+ ".VAX]*.*;*"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ prods = proc_dev_dir+ "VAX"+ ".DIR;1"
-$ if (f$search( prods) .nes. "") then delete /log 'prods'
-$ goto Common_Exit
-$ endif
+$ args_len = f$length(args)
+$ args_lower_len = f$length(args_lower)
$!
-$ if (arg_val .eqs. "64")
-$ then
-$ cc_qual1 = cc_qual1+ " /POINTER = 64"
-$ goto arg_loop_end
-$ endif
+$ clean = 0
+$ if f$locate(",clean,", args_lower) .lt. args_lower_len
+$ then
+$ clean = 1
+$ endif
+$ clean_all = 0
+$ if f$locate(",clean_all,", args_lower) .lt. args_lower_len
+$ then
+$ clean = 1
+$ clean_all = 1
+$ endif
+$ if f$locate(",realclean,", args_lower) .lt. args_lower_len
+$ then
+$ clean = 1
+$ clean_all = 1
+$ endif
$!
-$ if (f$extract( 0, 6, arg_val) .eqs. "CCQUAL")
-$ then
-$ opts = f$edit( arg_val, "COLLAPSE")
-$ eq = f$locate( "=", opts)
-$ cc_qual2 = f$extract( (eq+ 1), 1000, opts)
-$ goto arg_loop_end
-$ endif
+$ if clean .ne. 0
+$ then
+$ prods = "''exedir'*.*;*"
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir + arch_name + ".DIR;1"
+$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ file = "[]config_vms.h"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[]config.h"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[]curl-config."
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[]libcurl.pc"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[.lib.cxx_repository]cxx$demangler_db."
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[.src.cxx_repository]cxx$demangler_db."
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[.lib]config_vms.h"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl_crtl_init"
+$ if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$ if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$ file = "[...]gnv$curlmsg"
+$ if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$ if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ file = "[...]curlmsg"
+$ if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$ if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ file = "[...]report_openssl_version"
+$ if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$ if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ file = "[...]hp_ssl_release_info.txt"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]gnv_libcurl_xfer.mar_exact"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]gnv_libcurl_xfer"
+$ if f$search("''file'.lis") .nes. "" then delete/log 'file'.lis;*
+$ if f$search("''file'.obj") .nes. "" then delete/log 'file'.obj;*
+$ if f$search("''file'.opt") .nes. "" then delete/log 'file'.opt;*
+$ file = "[...]curl-*_original_src.bck"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl_d-*_original_src.bck"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl-*_vms_src.bck"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl_d-*_vms_src.bck"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl-*.release_notes"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]curl_d-*.release_notes"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]*curl*.pcsi$desc"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]*curl_d*.pcsi$desc"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]*curl*.pcsi$text"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$ file = "[...]*curl_d*.pcsi$text"
+$ if f$search(file) .nes. "" then delete/log 'file';*
+$!
+$ if clean_all .eq. 0 then goto Common_Exit
+$ endif
$!
-$ if (arg_val .eqs. "DEBUG")
-$ then
-$ cc_qual1 = cc_qual1+ " /debug /nooptimize"
-$ link_qual = link_qual+ " /debug"
-$ goto arg_loop_end
-$ endif
$!
-$ if (arg_val .eqs. "IEEE")
-$ then
-$ cc_qual1 = cc_qual1+ " /FLOAT = IEEE_FLOAT"
-$ goto arg_loop_end
-$ endif
+$ if clean_all .ne. 0
+$ then
+$ file = "[...]gnv$libcurl"
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ if f$search("''file'.map") .nes. "" then delete/log 'file'.map;*
+$ if f$search("''file'.dsf") .nes. "" then delete/log 'file'.dsf;*
+$ file = "[.src]curl"
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ if f$search("''file'.map") .nes. "" then delete/log 'file'.map;*
+$ if f$search("''file'.dsf") .nes. "" then delete/log 'file'.dsf;*
+$ prods = proc_dev_dir - delim + ".ALPHA" + delim + "*.*;*"
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir + "ALPHA" + ".DIR;1"
+$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir - delim + ".IA64" + delim + "*.*;*"
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir + "IA64" + ".DIR;1"
+$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir - delim + ".VAX" + delim + "*.*;*"
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ prods = proc_dev_dir + "VAX"+ ".DIR;1"
+$ if (f$search(prods) .nes. "") then set prot=o:rwed 'prods'
+$ if (f$search(prods) .nes. "") then delete /log 'prods'
+$ file = "[...]macro32_exactcase"
+$ if f$search("''file'.exe") .nes. "" then delete/log 'file'.exe;*
+$ if f$search("''file'.jnl") .nes. "" then delete/log 'file'.jnl;*
+$ goto Common_Exit
+$ endif
$!
-$ if (arg_val .eqs. "LARGE")
-$ then
-$ if (arch_name .eqs. "VAX")
-$ then
-$ write sys$output """LARGE"" is ignored on VAX."
-$ else
-$ cc_defs = cc_defs+ ", _LARGEFILE=1"
-$ endif
-$ goto arg_loop_end
-$ endif
+$ build_64 = 0
+$ if f$locate(",64,", args_lower) .lt. args_lower_len
+$ then
+$ cc_qual1 = cc_qual1 + " /POINTER = 64"
+$ build_64 = 1
+$ endif
$!
-$ if (arg_val .eqs. "LDAP")
-$ then
-$ ldap = 1
-$ goto arg_loop_end
-$ endif
+$ args_loc = f$locate(",ccqual=", args_lower)
+$ if args_loc .lt. args_lower_len
+$ then
+$ arg = f$extract(args_loc + 1, args_lower_len, args_lower)
+$ arg_val = f$element(0, ",", arg)
+$ cc_qual2 = f$element(1, "=", arg_val);
+$ endif
$!
-$ if (f$extract( 0, 4, arg_val) .eqs. "LIST")
-$ then
-$ list = 1
-$ cc_qual1 = cc_qual1+ " /list = ''lisdir' /show = (all, nomessages)"
-$ link_qual = link_qual+ " /map = ''lisdir'"
-$ msg_qual = msg_qual+ " /list = ''lisdir'"
-$ goto arg_loop_end
-$ endif
+$! On Alpha/IA64 no size penalty for compiling /debug/optimize
+$! by default.
+$ if f$locate(",debug,", args_lower) .lt. args_lower_len
+$ then
+$ cc_debug = "/debug/nooptimize"
+$ endif
$!
-$ if (arg_val .eqs. "NOHPSSL")
-$ then
-$ nohpssl = 1
-$ goto arg_loop_end
-$ endif
+$! We normally want IEEE float if it is available. Programs that are
+$! calling libcurl will typically prefer IEEE behavior, unless on the
+$! VAX where we have no choice.
$!
-$ if (arg_val .eqs. "NOSSL")
-$ then
-$ nossl = 1
-$ goto arg_loop_end
-$ endif
+$ if f$locate(",noieee,", args_lower) .lt. args_lower_len
+$ then
+$ cc_float = ""
+$ endif
$!
-$ if (arg_val .eqs. "OSSLOLB")
-$ then
-$ osslolb = 1
-$ goto arg_loop_end
-$ endif
+$! Normally we want large file if it is available.
+$ if f$locate(",nolarge,", args_lower) .lt. args_lower_len
+$ then
+$ write sys$output "Handling of large files disabled."
+$ cc_large = ""
+$ endif
+$ if cc_large .nes. ""
+$ then
+$ cc_defs = cc_defs + cc_large
+$ endif
$!
-$ write sys$output "Unrecognized command-line option: ''arg_val'"
-$ goto Common_Exit
+$ if f$locate(",noldap,", args_lower) .lt. args_lower_len
+$ then
+$ ldap = 0
+$ endif
+$!
+$ if f$locate(",list,", args_lower) .lt. args_lower_len
+$ then
+$ list = 1
+$ endif
+$ if f$locate(",fulllist,", args_lower) .lt. args_lower_len
+$ then
+$ list = 1
+$ full_list = 1
+$ endif
+$!
+$ if f$locate(",nohpssl,", args_lower) .lt. args_lower_len
+$ then
+$ nohpssl = 1
+$ endif
+$!
+$ if f$locate(",nossl,", args_lower) .lt. args_lower_len
+$ then
+$ nossl = 1
+$ endif
+$!
+$ if f$locate(",osslolb,", args_lower) .lt. args_lower_len
+$ then
+$ osslolb = 1
+$ endif
+$!
+$ if f$locate(",nozlib,", args_lower) .lt. args_lower_len
+$ then
+$ nozlib = 1
+$ endif
+$!
+$ if f$locate(",nokerberos,", args_lower) .lt. args_lower_len
+$ then
+$ nokerberos = 1
+$ endif
$!
-$arg_loop_end:
-$ arg = arg+ 1
-$ goto arg_loop
-$arg_loop_out:
$!
$! CC /LIST, LINK /MAP, and MESSAGE /LIST are defaults in batch mode,
$! so be explicit when they're not desired.
$!
-$ if (list .eq. 0)
+$
+$ if list .eq. 0
$ then
-$ cc_qual1 = cc_qual1+ " /nolist"
-$ link_qual = link_qual+ " /nomap"
-$ msg_qual = msg_qual+ " /nolist"
+$ cc_qual1 = cc_qual1 + "/nolist"
+$ msg_qual = msg_qual + "/nolist"
+$ else
+$ msg_qual = msg_qual + "/list='objdir'"
+$ if (full_list .ne. 0)
+$ then
+$ cc_qual1 = cc_qual1 + cc_full_list
+$ else
+$ cc_qual1 = cc_qual1 + cc_list
+$ endif
$ endif
+$ cc_qual1 = cc_qual1 + cc_names + cc_float + cc_debug
$!
$! Create product directory, if needed.
$!
-$ if (f$search( proc_dev_dir+ arch_name+ ".DIR;1") .eqs. "")
+$ if (f$search(proc_dev_dir + arch_name + ".DIR;1") .eqs. "")
$ then
$ create /directory 'exedir'
$ endif
$!
$! Detect available (but not prohibited) SSL software.
$!
+$ libsslshr_line = ""
+$ libcryptoshr_line = ""
$ if (.not. nossl)
$ then
-$ if (f$trnlnm( "OPENSSL") .nes. "")
-$ then
-$ cc_defs = cc_defs+ ", USE_SSLEAY=1"
-$ if ((f$trnlnm( "SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
-$ then
-$! Use HP SSL.
-$ hpssl = 1
-$ ssl_opt = ", ''proc_dev_dir'hpssl_"+ -
- f$getsyi("ARCH_NAME")+ ".opt /options"
+$ if (f$trnlnm("OPENSSL") .nes. "")
+$ then
+$! cc_defs = cc_defs + ", USE_OPENSSL=1"
+$ if ((f$trnlnm("SSL$INCLUDE") .nes. "") .and. (.not. nohpssl))
+$ then
+$! Use HP SSL.
+$ hpssl = 1
+$!
+$! Older SSL only has lib*_shr32 images
+$!-----------------------------------------------
+$ libsslshr = "sys$share:ssl$libssl_shr"
+$ if (f$search("''libsslshr'.exe") .eqs. "") .or. (.not. build_64)
+$ then
+$ libsslshr = libsslshr + "32"
+$ endif
+$ libcryptoshr = "sys$share:ssl$libcrypto_shr"
+$ if (f$search("''libcryptoshr'.exe") .eqs. "") .or. (.not. build_64)
+$ then
+$ libcryptoshr = libcryptoshr + "32"
+$ endif
+$ libsslshr_line = "''libsslshr'.exe/share"
+$ libcryptoshr_line = "''libcryptoshr'.exe/share"
$ else
-$! Use OpenSSL. Assume object libraries, unless shared images
-$! are found (and not prohibited).
-$ openssl = 1
-$ ssl_opt = ", ssllib:libssl.olb /library"+ -
- ", ssllib:libcrypto.olb /library"
-$ if (osslolb .eq. 0)
-$ then
- if ((f$search( "ssllib:ssl_libcrypto.exe") .nes. "") .and. -
- (f$search( "ssllib:ssl_libssl.exe") .nes. ""))
-$ then
-$! OpenSSL shared images with "SSL_xxx.EXE names.
-$ openssl = 2
-$ ssl_opt = ", ''proc_dev_dir'openssl_ssl_"+ -
- f$getsyi("ARCH_NAME")+ ".opt /options"
-$ else
-$ if ((f$search( "ssllib:libcrypto.exe") .nes. "") .and. -
- (f$search( "ssllib:libssl.exe") .nes. ""))
+$! Use OpenSSL. Assume object libraries, unless shared images
+$! are found (and not prohibited).
+$! TODO: We do not know how to automatically choose based on the
+$! pointer size.
+$!
+$ openssl = 1
+$ libsslshr_line = "ssllib:libssl.olb/lib"
+$ libcryptoshr_line = "ssllib:libcrypto.olb/lib"
+$ ssl_opt = ", ssllib:libssl.olb /library" + -
+ ", ssllib:libcrypto.olb /library"
+$ if (osslolb .eq. 0)
+$ then
+ if ((f$search("ssllib:ssl_libcrypto.exe") .nes. "") .and. -
+ (f$search("ssllib:ssl_libssl.exe") .nes. ""))
$ then
-$! OpenSSL shared images with "xxx.EXE names.
-$ openssl = 3
-$ ssl_opt = ", ''proc_dev_dir'openssl_"+ -
- f$getsyi("ARCH_NAME")+ ".opt /options"
+$! OpenSSL shared images with "SSL_xxx.EXE names.
+$ openssl = 2
+$ libsslshr_line = "ssllib:ssl_libssl_shr.exe/share"
+$ libcryptoshr_line = "ssllib:ssl_libcrypto_shr.exe/share"
+$ else
+$ if ((f$search("ssllib:libcrypto.exe") .nes. "") .and. -
+ (f$search("ssllib:libssl.exe") .nes. ""))
+$ then
+$! OpenSSL shared images with "xxx.EXE names.
+$ openssl = 3
+$ libsslshr_line = "ssllib:libssl_shr.exe/share"
+$ libcryptoshr_line = "ssllib:libcrypto_shr.exe/share"
+$ endif
$ endif
-$ endif
-$ endif
+$ endif
$ endif
-$ endif
+$ endif
$ endif
$!
$! LDAP.
$!
+$ if f$search("SYS$SHARE:LDAP$SHR.EXE") .eqs. ""
+$ then
+$ ldap = 0
+$ endif
$ if (ldap .eq. 0)
$ then
-$ cc_defs = cc_defs+ ", CURL_DISABLE_LDAP=1"
+$! cc_defs = cc_defs + ", CURL_DISABLE_LDAP=1"
+$ else
+$ 'vo_c' "%CURL-I-BLDHPLDAP, building with HP LDAP support"
+$ endif
+$!
+$! KERBEROS
+$ gssrtlshr_line = ""
+$ try_shr = "sys$share:gss$rtl"
+$ if f$search("''try_shr'.exe") .eqs. ""
+$ then
+$ nokerberos = 1
+$ endif
+$ curl_sys_krbinc = ""
+$ if nokerberos .eq. 0
+$ then
+$ 'vo_c' "%CURL-I-BLDHPKERBEROS, building with HP KERBEROS support"
+$ curl_sys_krbinc = "sys$sysroot:[kerberos.include]"
+$ gssrtlshr_line = "''try_shr'/share"
+$ endif
+$!
+$!
+$! LIBZ
+$ libzshr_line = ""
+$ try_shr = "gnv$libzshr"
+$ if build_64
+$ then
+$! First look for 64 bit
+$ if f$search("''try_shr'64") .eqs. ""
+$ then
+$! Second look for the J.F. Pieronne 64 bit shared image
+$ try_shr = "LIBZ_SHR64"
+$ if f$search(try_shr) .eqs. "" then nozlib = 1
+$ endif
+$ else
+$! First look for 32 bit
+$ if f$search("''try_shr'32") .eqs. ""
+$ then
+$! Second look for old 32 bit image
+$ if f$search(try_shr) .eqs. ""
+$ then
+$! Third look for the J.F. Pieronne 32 bit shared image
+$ try_shr = "LIBZ_SHR32"
+$ if f$search(try_shr) .eqs. "" then nozlib = 1
+$ endif
+$ endif
+$ endif
+$ if f$search(try_shr) .eqs. ""
+$ then
+$ nozlib = 1
+$ endif
+$ curl_sys_zlibinc = ""
+$ if nozlib .eq. 0
+$ then
+$ libzshr_line = "''try_shr'/share"
+$ if f$locate("LIBZ", try_shr) .eq. 0
+$ then
+$ 'vo_c' "%CURL-I-BLDJFPLIBZ, building with JFP LIBZ support"
+$ curl_sys_zlibinc = "LIBZ:"
+$ else
+$ 'vo_c' "%CURL-I-BLDGNVLIBZ, building with GNV LIBZ support"
+$ curl_sys_zlibinc = "GNV$ZLIB_INCLUDE:"
+$ endif
$ endif
$!
$! Form CC qualifiers.
$!
$ cc_defs = "/define = (''cc_defs')"
-$ cc_qual2 = cc_qual2+ " /object = ''objdir'"+ -
- " /include = ([-.lib], [-.src],"+ -
- " [-.packages.vms], [-.packages.vms.''arch_name'])"
+$ cc_qual2 = cc_qual2 + " /object = ''objdir'"
+$ cc_qual2 = cc_qual2 + "/nested_include_directory=none"
$!
$ 'vo_c' "CC opts:", -
" ''cc_defs'", -
@@ -372,97 +715,209 @@ $ 'vo_c' " EXEDIR = ''exedir'"
$!
$ if (openssl .ne. 0)
$ then
-$ ssllib = f$trnlnm( "ssllib")
-$ if (ssllib .eqs. "")
-$ then
-$ ssllib = "(undefined)"
-$ endif
-$ 'vo_c' " SSLLIB = ''ssllib'"
-$!
-$ if (openssl .eq. 1)
-$ then
-$ ossl_lib1 = f$trnlnm( "ssllib")+ "LIBSSL.OLB"
-$ ossl_lib2 = f$trnlnm( "ssllib")+ "LIBCRYPTO.OLB"
+$ ssllib = f$trnlnm("ssllib")
+$ if (ssllib .eqs. "")
+$ then
+$ ssllib = "(undefined)"
+$ endif
+$ 'vo_c' " SSLLIB = ''ssllib'"
+$!
+$! TODO: Why are we translating the logical name?
+$! The logical aname used to find the shared image should just be used
+$! as translating it could result in the wrong location at run time.
+$ if (openssl .eq. 1)
+$ then
+$ ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.OLB"
+$ ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.OLB"
$ msg = "object libraries"
-$ else
+$ else
$ if (openssl .eq. 2)
$ then
-$ ossl_lib1 = f$trnlnm( "ssllib")+ "SSL_LIBSSL.EXE"
-$ ossl_lib2 = f$trnlnm( "ssllib")+ "SSL_LIBCRYPTO.EXE"
+$ ossl_lib1 = f$trnlnm("ssllib")+ "SSL_LIBSSL.EXE"
+$ ossl_lib2 = f$trnlnm("ssllib")+ "SSL_LIBCRYPTO.EXE"
$ else
-$ ossl_lib1 = f$trnlnm( "ssllib")+ "LIBSSL.EXE"
-$ ossl_lib2 = f$trnlnm( "ssllib")+ "LIBCRYPTO.EXE"
+$ ossl_lib1 = f$trnlnm("ssllib")+ "LIBSSL.EXE"
+$ ossl_lib2 = f$trnlnm("ssllib")+ "LIBCRYPTO.EXE"
$ endif
$ msg = "shared images"
-$ endif
-$ if ((f$search( ossl_lib1) .eqs. "") .or. -
- (f$search( ossl_lib2) .eqs. ""))
-$ then
+$ endif
+$ if ((f$search(ossl_lib1) .eqs. "") .or. -
+ (f$search(ossl_lib2) .eqs. ""))
+$ then
$ write sys$output "Can't find OpenSSL ''msg':"
$ write sys$output " ''ossl_lib1'"
$ write sys$output " ''ossl_lib2'"
$ goto Common_Exit
-$ endif
+$ endif
$ endif
$!
$! Define the "curl" (process) logical name for "#include <curl/xxx.h>".
$!
-$ curl = f$trnlnm( "curl", "LNM$PROCESS")
+$ curl = f$trnlnm("curl", "LNM$PROCESS")
$ if (curl .nes. "")
$ then
-$ write sys$output ""
-$ write sys$output -
+$ write sys$output ""
+$ write sys$output -
"Process logical name ""curl"" is already defined, but this procedure"
-$ write sys$output -
+$ write sys$output -
"would override that definition. Use a command like"
-$ write sys$output -
+$ write sys$output -
" deassign /process curl"
-$ write sys$output -
+$ write sys$output -
"to cancel that logical name definition, and then and re-run this procedure."
-$ write sys$output ""
-$ goto Common_Exit
+$ write sys$output ""
+$ goto Common_Exit
$ endif
-$ define curl 'top_dev_dir'.include.curl]
+$ curl_logical = top_dev_dir + ".include.curl" + delim
+$ curl_sys_inc2 = curl_logical
+$ curl_sys_inc1 = top_dev_dir + ".include" + delim
+$! define curl 'top_dev_dir'.include.curl'delim'
+$!
+$! Generate config file into the product directory.
+$!
+$! call MoveIfDiff [.lib]config-vms.h 'objdir'curl_config.h
$!
-$! Copy the VMS-specific config file into the product directory.
+$ conf_params = ""
+$ if nossl .ne. 0 then conf_params = conf_params + ",nossl"
+$ if nohpssl .ne. 0 then conf_params = conf_params + ",nohpssl,"
+$ if ldap .eq. 0 then conf_params = conf_params + ",noldap,"
+$ if nozlib .ne. 0 then conf_params = conf_params + ",nozlib,"
+$ if nokerberos .ne. 0 then conf_params = conf_params + ",nokerberos"
+$ conf_params = conf_params - ","
+$!
+$!
+$ new_conf = f$search("''objdir'curl_config.h")
+$ if new_conf .eqs. ""
+$ then
+$! set ver
+$ write sys$output "Generating curl custom config_vms.h"
+$ @'proc_dev_dir'generate_config_vms_h_curl.com ''conf_params'
+$!
+$ write sys$output "Generating curl_config.h"
+$ conf_in = f$search("[.lib]curl_config*.*in")
+$ if conf_in .eqs. ""
+$ then
+$ write sys$output "Can not find [.lib]curl_config*.*in file!"
+$ goto common_exit
+$ endif
+$ @'proc_dev_dir'config_h.com 'conf_in'
+$ copy config.h 'objdir'curl_config.h
+$ delete config.h;
+$! set nover
+$ endif
$!
-$ call MoveIfDiff 'proc_dev_dir'config-vms.h 'objdir'curl_config.h
$!
$ on control_y then goto Common_Exit
$!
$ set default 'proc_dev_dir'
+$ sys_inc = "''curl_sys_inc1', ''curl_sys_inc2', ''curl_logical'"
+$ if curl_sys_krbinc .nes. ""
+$ then
+$ sys_inc = sys_inc + ",''curl_sys_krbinc'"
+$ endif
+$ if curl_sys_zlibinc .nes. ""
+$ then
+$ sys_inc = sys_inc + ",''curl_sys_zlibinc'"
+$ endif
+$! Build LIB
+$ cc_include = "/include=([-.lib],[-.lib.vtls],[-.packages.vms]"
+$ cc_include = cc_include + ",[-.packages.vms.''arch_name'])"
$ call build "[--.lib]" "*.c" "''objdir'CURLLIB.OLB" "amigaos, nwlib, nwos"
$ if ($status .eq. ctrl_y) then goto Common_Exit
+$! Build VTLS
+$ cc_include = "/include=([--.lib.vtls],[--.lib],[--.src]"
+$ cc_include = cc_include + ",[--.packages.vms],[--.packages.vms.''arch_name'])"
+$ call build "[--.lib.vtls]" "*.c" "''objdir'CURLLIB.OLB" "amigaos, nwlib, nwos"
+$! Build SRC
+$ cc_include = "/include=([-.src],[-.lib],[-.lib.vtls]"
+$ cc_include = cc_include + ",[-.packages.vms],[-.packages.vms.''arch_name'])"
$ call build "[--.src]" "*.c" "''objdir'CURLSRC.OLB"
$ if ($status .eq. ctrl_y) then goto Common_Exit
+$! Build MSG
$ call build "[]" "*.msg" "''objdir'CURLSRC.OLB"
$ if ($status .eq. ctrl_y) then goto Common_Exit
$!
-$ ldap_opt = ""
-$ if (ldap .ne. 0) then ldap_opt = ", ''proc_dev_dir'ldap.opt /options"
$!
$ if (openssl .ne. 0)
$ then
-$ if (openssl .eq. 1)
-$ then
+$ if (openssl .eq. 1)
+$ then
$ 'vo_l' "%CURL-I-LINK_OSSL, linking with OpenSSL (object library)"
-$ else
+$ else
$ 'vo_l' "%CURL-I-LINK_HPSSL, linking with OpenSSL (shared image)"
-$ endif
+$ endif
$ else
-$ if (hpssl)
-$ then
+$ if (hpssl)
+$ then
$ 'vo_l' "%CURL-I-LINK_HPSSL, linking with HP SSL"
-$ else
+$ else
$ 'vo_l' "%CURL-I-LINK_NOSSL, linking with NO SSL support"
-$ endif
+$ endif
$ endif
$!
-$ link 'link_qual' /executable = 'exedir'CURL.EXE -
- 'objdir'curlsrc.olb /library /include = (main, curlmsg), -
- 'objdir'curllib.olb /library -
- 'ssl_opt' -
- 'ldap_opt'
+$!
+$! GNV helper files for building the test curl binary.
+$!-----------------------------------------------
+$ create 'exedir'gnv$curl.opt
+$ open/append opt 'exedir'gnv$curl.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$!
+$! Create the libcurl
+$!------------------------------------------------------
+$ create 'exedir'gnv_libcurl_linker.opt
+$ open/append opt 'exedir'gnv_libcurl_linker.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$!
+$! If we are not on VAX, then we want the debug symbol table in
+$! a separate file.
+$! VAX needs the tool_main unquoted in uppercase,
+$! Alpha and IA64 need tool_main quoted in exact case when parse style is
+$! extended.
+$ link_dsf1 = ""
+$ link_dsf2 = ""
+$ tool_main = "tool_main"
+$ if arch_name .nes. "VAX"
+$ then
+$ if parse_style .eqs. "EXTENDED"
+$ then
+$ tool_main = """tool_main"""
+$ endif
+$ link_dsf1 = "/dsf=" + exedir + "CURL.DSF"
+$ link_dsf2 = "/dsf=" + exedir + "CURL_DEBUG.DSF"
+$ endif
+$ if (list .eq. 0)
+$ then
+$ link_map1 = "/nomap"
+$ link_map2 = "/nomap"
+$ else
+$ link_map1 = "/map=" + exedir + "CURL.MAP"
+$ link_map2 = "/map=" + exedir + "CURL_DEBUG.MAP"
+$ endif
+$!
+$!
+$! Make a normal image.
+$ set ver
+$ link 'link_map1' 'link_dsf1' /executable = 'exedir'CURL.EXE -
+ 'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
+ 'objdir'curllib.olb /library, -
+ 'exedir'gnv$curl.opt/opt
+$!
+$! Also make a debug copy.
+$ link/debug 'link_map2' 'link_dsf2' /executable = 'exedir'CURL_DEBUG.EXE -
+ 'objdir'curlsrc.olb /library /include = ('tool_main', curlmsg), -
+ 'objdir'curllib.olb /library, -
+ 'exedir'gnv$curl.opt/opt
+$ set nover
$!
$ goto Common_Exit
$!
@@ -471,89 +926,93 @@ $! the directory passed in via P1 and put it in the object library named
$! via P3. Exclude items in P4.
$!
$build: subroutine
-$ build_def = f$environment( "default")
-$ on control_y then goto EndLoop ! SS$_CONTROLY
-$ sts = 1 ! SS$_NORMAL.
-$! set noon
-$ set default 'p1'
-$ search = p2
-$ reset = f$search("reset")
-$ if f$search( p3) .eqs. ""
-$ then
+$ build_def = f$environment("default")
+$ on control_y then goto EndLoop ! SS$_CONTROLY
+$ sts = 1 ! SS$_NORMAL.
+$! set noon
+$ set default 'p1'
+$ search = "sys$disk:" + p2
+$ reset = f$search("reset")
+$ if f$search( p3) .eqs. ""
+$ then
$ librarian /create /object 'p3'
-$ endif
-$ reject_list__ = ","+ f$edit( p4, "COLLAPSE, UPCASE")+ ","
-$ reject_list___len = f$length( reject_list__)
-$ reset = f$search( "reset", 1)
+$ endif
+$ reject_list__ = "," + f$edit(p4, "COLLAPSE, UPCASE") + ","
+$ reject_list___len = f$length(reject_list__)
+$ reset = f$search( "reset", 1)
$Loop:
-$ file = f$search( search, 1)
-$ if file .eqs. "" then goto EndLoop
-$! Skip a name if it's in the P4 exclusion list.
-$ if (p4 .nes. "")
-$ then
-$ name__ = ","+ -
- f$edit( f$parse( file, , , "NAME", "SYNTAX_ONLY"), "UPCASE")+ -
+$ file = f$search( search, 1)
+$ if file .eqs. "" then goto EndLoop
+$! Skip a name if it's in the P4 exclusion list.
+$ if (p4 .nes. "")
+$ then
+$ name__ = "," + -
+ f$edit(f$parse(file, , , "NAME", "SYNTAX_ONLY"), "UPCASE") + -
","
-$ if (f$locate( name__, reject_list__) .lt. reject_list___len)
-$ then
-$ goto Loop
-$ endif
+$ if (f$locate(name__, reject_list__) .lt. reject_list___len)
+$ then
+$ goto Loop
$ endif
-$ objfile = f$parse( "''objdir'.OBJ;", file)
-$ obj = f$search( objfile, 2)
-$ if (obj .nes. "")
+$ endif
+$ objfile = f$parse("''objdir'.OBJ;", file)
+$ obj = f$search(objfile, 2)
+$ if (obj .nes. "")
+$ then
+$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
$ then
-$ if (f$cvtime(f$file(file,"rdt")) .gts. f$cvtime(f$file(obj,"rdt")))
-$ then
-$ call compile 'file'
-$ sts = $status
-$ if .not. sts
-$ then
-$ goto EndLoop
-$ endif
-$ librarian /object 'p3' 'objfile'
-$ else
-$ 'vo_o' "%CURL-I-OBJUTD, ", objfile, " is up to date"
-$ endif
+$ call compile 'file'
+$ sts = $status
+$ if .not. sts
+$ then
+$ goto EndLoop
+$ endif
+$ librarian /object 'p3' 'objfile'
$ else
-$ 'vo_o' "%CURL-I-OBJDNE, ", file, " does not exist"
-$ call compile 'file'
-$ sts = $status
-$ if .not. sts
-$ then
-$ goto EndLoop
-$ endif
-$ librarian /object 'p3' 'objfile'
+$ 'vo_o' "%CURL-I-OBJUTD, ", objfile, " is up to date"
+$ endif
+$ else
+$ 'vo_o' "%CURL-I-OBJDNE, ", file, " does not exist"
+$ call compile 'file'
+$ sts = $status
+$ if .not. sts
+$ then
+$ goto EndLoop
$ endif
-$ goto Loop
+$ librarian /object 'p3' 'objfile'
+$ endif
+$ goto Loop
$EndLoop:
$!!! purge
-$ set default 'build_def'
-$ exit 'sts'
+$ set default 'build_def'
+$ exit 'sts'
$ endsubroutine ! Build
$!
$! Based on the file TYPE, do the right compile command.
$! Only C and MSG supported.
$!
$compile: subroutine
-$ on control_y then return ctrl_y ! SS$_CONTROLY
-$! set noon
-$ file = p1
-$ qual = p2+ p3+ p4+ p5+ p6+ p7+ p8
-$ typ = f$edit( f$parse( file, , , "TYPE"), "UPCASE") - "."
-$ if (typ .eqs. "C")
-$ then
+$ on control_y then return ctrl_y ! SS$_CONTROLY
+$! set noon
+$ file = p1
+$ qual = p2+ p3+ p4+ p5+ p6+ p7+ p8
+$ typ = f$edit(f$parse(file, , , "TYPE"), "UPCASE") - "."
+$ if (typ .eqs. "C")
+$ then
$ 'vo_c' "CC (opts) ", file
+$ define/user curl 'curl_logical'
+$ if curl_sys_krbinc .nes. "" then define/user gssapi 'curl_sys_krbinc'
+$ define/user decc$system_include 'sys_inc'
$ CC 'cc_defs' -
'cc_qual1' -
'cc_qual2' -
+ 'cc_include' -
'file'
-$ else
-$ cmd_msg = "MESSAGE "+ msg_qual
+$ else
+$ cmd_msg = "MESSAGE " + msg_qual
$ x = cmd_'typ'
-$ 'vo_c' x," ",file
+$ 'vo_c' x, " ", file
$ 'x' 'file'
-$ endif
+$ endif
$ ENDSUBROUTINE ! Compile
$!
$! Do a diff of the file specified in P1 with that in P2. If different
@@ -561,23 +1020,19 @@ $! copy P1 to P2. This also covers if P2 doesn't exist, but not if P2
$! is an invalid filespec.
$!
$MoveIfDiff: subroutine
-$ set NoOn
-$ define /user_mode sys$error nl:
-$ define /user_mode sys$output nl:
-$ differences 'p1' 'p2'
-$ status = $status
-$ if ( status .ne. %X006C8009) ! if status is not "no diff"
-$ then
+$ set NoOn
+$ define /user_mode sys$error nl:
+$ define /user_mode sys$output nl:
+$ differences 'p1' 'p2'
+$ status = $status
+$ if (status .ne. %X006C8009) ! if status is not "no diff"
+$ then
$ copy 'p1' 'p2'
$ purge /nolog 'p2'
-$ endif
-$ on control_y then return ctrl_y ! SS$_CONTROLY
+$ endif
+$ on control_y then return ctrl_y ! SS$_CONTROLY
$ ENDSUBROUTINE ! MoveIfDiff
$!
$Common_Exit:
$ set default 'orig_def'
-$ if ((curl .eqs. "") .and. (f$trnlnm( "curl", "LNM$PROCESS") .nes. ""))
-$ then
-$ deassign curl
-$ endif
$ exit
diff --git a/packages/vms/clean_gnv_curl.com b/packages/vms/clean_gnv_curl.com
new file mode 100644
index 0000000..24ecb11
--- /dev/null
+++ b/packages/vms/clean_gnv_curl.com
@@ -0,0 +1,250 @@
+$! File: clean_gnv_curl.COM
+$!
+$! $Id$
+$!
+$! The GNV environment leaves behind some during the configure and build
+$! procedure that need to be cleaned up.
+$!
+$! The default is to remove all the left over stuff from running the
+$! configure script and to remove all intermediate binary files.
+$!
+$! This should be run with no parameters after the gnv_curl_configure.sh
+$! script is run.
+$!
+$! Paramter P1: REALCLEAN
+$! This removes all build products and brings the environment back to
+$! the point where the gnv_curl_configure.sh procedure needs to be run again.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 07-Jul-2009 J. Malmberg
+$!============================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$!
+$!
+$! Move to where the base directory is.
+$ set def [--]
+$!
+$!
+$ file = "sys$login:sh*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "sys$login:make*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]confdefs.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.dsf"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.sym"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!
+$ file = "lcl_root:[.conf*...]*.*"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "lcl_root:[]conf*.dir
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!
+$ file = "lcl_root:[.lib]*.out"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "lcl_root:[.lib]*.o"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!
+$ file = "lcl_root:[.lib]*.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]*.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]cc_temp*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]*.dsf"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]*.o"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]ar*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]cc_temp*."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.lo"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.a"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.la"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.lai"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.include.curl]curlbuild.h_old"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl-*_original_src.bck"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl_d-*_original_src.bck"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl-*_vms_src.bck"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl_d-*_vms_src.bck"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl-*.release_notes"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]curl_d-*.release_notes"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]*-curl-*.pcsi$desc"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]*-curl_d-*.pcsi$desc"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]*-curl-*.pcsi$text"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]*-curl_d-*.pcsi$text"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$!======================================================================
+$!
+$ if p1 .nes. "REALCLEAN" then goto all_exit
+$!
+$ file = "lcl_root:[...]*.obj"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]Makefile."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]libtool."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.lis"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]POTFILES."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]libcurl.pc"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]curl-config."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.include.curl]curlbuild.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]curl."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.tests]configurehelp.pm"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]curl_config.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]libcurl.vers"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]ca-bundle.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]config.log"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]config.status"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]conftest.dangle"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]CXX$DEMANGLER_DB."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[]stamp-h1."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]stamp-h1."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]stamp-h2."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]stamp-h3."
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.lib]*.a"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]*.spec"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]gnv$*.*"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[...]gnv*.opt"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.EPM]curl.list"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]macro32_exactcase.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]report_openssl_version.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.packages.vms]hp_ssl_release_info.txt"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$ file = "lcl_root:[.src]curl.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$!
+$all_exit:
+$!
+$! Put the default back.
+$!-----------------------
+$ set def 'default_dir'
+$!
+$ exit
diff --git a/packages/vms/compare_curl_source.com b/packages/vms/compare_curl_source.com
new file mode 100644
index 0000000..eeaec31
--- /dev/null
+++ b/packages/vms/compare_curl_source.com
@@ -0,0 +1,371 @@
+$! Compare_curl_source.com
+$!
+$! $Id$
+$!
+$! This procedure compares the files in two directories and reports the
+$! differences. It is customized for the vmsports repository layout.
+$!
+$! It needs to be customized to the local site directories.
+$!
+$! This is used by me for these purposes:
+$! 1. Compare the original source of a project with an existing
+$! VMS port.
+$! 2. Compare the checked out repository of a project with the
+$! the local working copy to make sure they are in sync.
+$! 3. Keep a copy directory up to date. The third is needed by
+$! me because VMS Backup can create a saveset of files from a
+$! NFS mounted volume.
+$!
+$! First the files in the original source directory which is assumed to be
+$! under source codde control are compared with the copy directory.
+$!
+$! Then the files are are only in the copy directory are listed.
+$!
+$! The result will five diagnostics about of files:
+$! 1. Files that are not generation 1.
+$! 2. Files missing in the copy directory.
+$! 3. Files in the copy directory not in the source directory.
+$! 4. Files different from the source directory.
+$! 5. Files that VMS DIFF can not process.
+$!
+$! This needs to be run on an ODS-5 volume.
+$!
+$! If UPDATE is given as a second parameter, files missing or different in the
+$! copy directory will be updated.
+$!
+$! By default:
+$! The directory src_root:[project_name] will be translated to something like
+$! DISK:[dir.dir.reference.project_name] and this will be used
+$! to calculate DISK:[dir.dir.vms_source.project_name] for the VMS specific
+$! source directory.
+$!
+$! The copy directory is vms_root:[project_name]
+$! The UPDATE parameter is ignored.
+$!
+$! This setting is used to make sure that the working vms directory
+$! and the repository checkout directory have the same contents.
+$!
+$! If P1 is "SRCBCK" then this
+$! The source directory tree is: src_root:[project_name]
+$! The copy directory is src_root1:[project_name]
+$!
+$! src_root1:[project_name] is used by me to work around that VMS backup will
+$! not use NFS as a source directory so I need to make a copy.
+$!
+$! This is to make sure that the backup save set for the unmodified
+$! source is up to date.
+$!
+$! If your repository checkout is not on an NFS mounted volume, you do not
+$! need to use this option or have the logical name src_root1 defined.
+$!
+$! If P1 is "VMSBCK" then this changes the two directories:
+$! The source directory is vms_root:[project_name]
+$! The copy directory is vms_root1:[project_name]
+$!
+$! vms_root:[project_name] is where I do the VMS specific edits.
+$! vms_root1:[project_name] is used by me to work around that VMS backup will
+$! not use NFS as a source directory so I need to make a copy.
+$!
+$! This is to make sure that the backup save set for the unmodified
+$! source is up to date.
+$!
+$! Copyright 2011, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 18-Aug-2011 J. Malmberg
+$!==========================================================================
+$!
+$! Update missing/changed files.
+$ update_file = 0
+$ if (p2 .eqs. "UPDATE")
+$ then
+$ update_file = 1
+$ endif
+$!
+$ myproc = f$environment("PROCEDURE")
+$ myprocdir = f$parse(myproc,,,"DIRECTORY") - "[" - "]" - "<" - ">"
+$ myprocdir = f$edit(myprocdir, "LOWERCASE")
+$ mydefault = f$environment("DEFAULT")
+$ mydir = f$parse(mydefault,,,"DIRECTORY")
+$ mydir = f$edit(mydir, "LOWERCASE")
+$ odelim = f$extract(0, 1, mydir)
+$ mydir = mydir - "[" - "]" - "<" - ">"
+$ mydev = f$parse(mydefault,,,"DEVICE")
+$!
+$ ref = ""
+$ if P1 .eqs. ""
+$ then
+$ ref_base_dir = myprocdir
+$ wrk_base_dir = mydir
+$ update_file = 0
+$ resultd = f$parse("src_root:",,,,"NO_CONCEAL")
+$ resultd = f$edit(resultd, "LOWERCASE")
+$ resultd = resultd - "][" - "><" - ".;" - ".."
+$ resultd_len = f$length(resultd) - 1
+$ delim = f$extract(resultd_len, 1, resultd)
+$ ref_root_base = mydir + delim
+$ resultd = resultd - ref_root_base - "reference." + "vms_source."
+$ ref = resultd + ref_base_dir
+$ wrk = "VMS_ROOT:" + odelim + wrk_base_dir
+$ resultd_len = f$length(resultd) - 1
+$ resultd = f$extract(0, resultd_len, resultd) + delim
+$ ref_root_dir = f$parse(resultd,,,"DIRECTORY")
+$ ref_root_dir = f$edit(ref_root_dir, "LOWERCASE")
+$ ref_root_dir = ref_root_dir - "[" - "]"
+$ ref_base_dir = ref_root_dir + "." + ref_base_dir
+$ endif
+$!
+$ if p1 .eqs. "SRCBCK"
+$ then
+$ ref_base_dir = "curl"
+$ wrk_base_dir = "curl"
+$ ref = "src_root:[" + ref_base_dir
+$ wrk = "src_root1:[" + wrk_base_dir
+$ if update_file
+$ then
+$ if f$search("src_root1:[000000]curl.dir") .eqs. ""
+$ then
+$ create/dir/prot=o:rwed src_root1:[curl]
+$ endif
+$ endif
+$ endif
+$!
+$!
+$ if p1 .eqs. "VMSBCK"
+$ then
+$ ref_base_dir = "curl"
+$ wrk_base_dir = "curl"
+$ ref = "vms_root:[" + ref_base_dir
+$ wrk = "vms_root1:[" + wrk_base_dir
+$ if update_file
+$ then
+$ if f$search("vms_root1:[000000]curl.dir") .eqs. ""
+$ then
+$ create/dir/prot=o:rwed vms_root1:[curl]
+$ endif
+$ endif
+$ endif
+$!
+$!
+$ if ref .eqs. ""
+$ then
+$ write sys$output "Unknown compare type specified!"
+$ exit 44
+$ endif
+$!
+$!
+$! Future - check the device types involved for the
+$! the syntax to check.
+$ ODS2_SYNTAX = 0
+$ NFS_MANGLE = 0
+$ PWRK_MANGLE = 0
+$!
+$ vax = f$getsyi("HW_MODEL") .lt. 1024
+$ if vax
+$ then
+$ ODS2_SYNTAX = 1
+$ endif
+$!
+$ report_missing = 1
+$!
+$ if .not. ODS2_SYNTAX
+$ then
+$ set proc/parse=extended
+$ endif
+$!
+$loop:
+$ ref_spec = f$search("''ref'...]*.*;",1)
+$ if ref_spec .eqs. "" then goto loop_end
+$!
+$ ref_dev = f$parse(ref_spec,,,"DEVICE")
+$ ref_dir = f$parse(ref_spec,,,"DIRECTORY")
+$ ref_dir = f$edit(ref_dir, "LOWERCASE")
+$ ref_name = f$parse(ref_spec,,,"NAME")
+$ ref_type = f$parse(ref_spec,,,"TYPE")
+$!
+$!
+$ rel_path = ref_dir - "[" - ref_base_dir
+$! rel_path_len = f$length(rel_path) - 1
+$! delim = f$extract(rel_path_len, 1, rel_path)
+$! rel_path = rel_path - ".]" - ".>" - "]" - ">"
+$! rel_path = rel_path + delim
+$!
+$ if ODS2_SYNTAX
+$ then
+$! if rel_path .eqs. ".examples.scripts^.noah]"
+$! then
+$! rel_path = ".examples.scripts_noah]"
+$! endif
+$! if rel_path .eqs. ".examples.scripts^.v2]"
+$! then
+$! rel_path = ".examples.scripts_v2]"
+$! endif
+$ endif
+$!
+$ wrk_path = wrk + rel_path
+$!
+$ ref_name_type = ref_name + ref_type
+$!
+$ if ODS2_SYNTAX
+$ then
+$ endif
+$!
+$ wrk_spec = wrk_path + ref_name_type
+$!
+$!
+$ wrk_chk = f$search(wrk_spec, 0)
+$ if wrk_chk .eqs. ""
+$ then
+$ if report_missing
+$ then
+$ write sys$output "''wrk_spec' is missing"
+$ endif
+$ if update_file
+$ then
+$ copy/log 'ref_spec' 'wrk_spec'
+$ endif
+$ goto loop
+$ endif
+$!
+$ wrk_name = f$parse(wrk_spec,,,"NAME")
+$ wrk_type = f$parse(wrk_spec,,,"TYPE")
+$ wrk_fname = wrk_name + wrk_type"
+$ ref_fname = ref_name + ref_type
+$!
+$ if ref_fname .nes. wrk_fname
+$ then
+$ write sys$output "''wrk_spc' wrong name, should be ""''ref_fname'"""
+$ endif
+$!
+$ ref_type = f$edit(ref_type, "UPCASE")
+$ if ref_type .eqs. ".DIR" then goto loop
+$!
+$ if ODS2_SYNTAX
+$ then
+$ ref_fname = f$edit(ref_fname, "LOWERCASE")
+$ endif
+$!
+$! These files are in the wrong format for VMS diff, and we don't change them.
+$ ref_skip = 0
+$ if ref_type .eqs. ".PDF" then ref_skip = 1
+$ if ref_type .eqs. ".HTML" then ref_skip = 1
+$ if ref_type .eqs. ".HQX" then ref_skip = 1
+$ if ref_type .eqs. ".P12" then ref_skip = 1
+$ if ref_type .eqs. "."
+$ then
+$ if f$locate("test", ref_fname) .eq. 0 then ref_skip = 1
+$ if ref_fname .eqs. "configure." then ref_skip = 1
+$ endif
+$ if ref_fname .eqs. "MACINSTALL.TXT" then ref_skip = 1
+$ if ref_fname .eqs. "$macinstall.txt" then ref_skip = 1
+$ if ref_fname .eqs. "curl.mcp$5nxml$5nsit$5nhqx" then ref_skip = 1
+$ if ref_fname .eqs. "curl_GUSIConfig.cpp" then ref_skip = 1
+$ if ref_fname .eqs. "curl_$gusic$onfig.cpp" then ref_skip = 1
+$ if ref_fname .eqs. "macos_main.cpp" then ref_skip = 1
+$!
+$!
+$ if ref_skip .ne. 0
+$ then
+$ if report_missing
+$ then
+$ write sys$output "Skipping diff of ''ref_fname'"
+$ endif
+$ goto loop
+$ endif
+$!
+$!
+$ wrk_ver = f$parse(wrk_chk,,,"VERSION")
+$ if wrk_ver .nes. ";1"
+$ then
+$ write sys$output "Version for ''wrk_spec' is not 1"
+$ endif
+$ set noon
+$ diff/out=nl: 'wrk_spec' 'ref_spec'
+$ if $severity .nes. "1"
+$ then
+$ write sys$output "''wrk_spec' is different from ''ref_spec'"
+$ if update_file
+$ then
+$ delete 'wrk_spec';*
+$ copy/log 'ref_spec' 'wrk_spec'
+$ endif
+$ endif
+$ set on
+$
+$!
+$ goto loop
+$loop_end:
+$!
+$!
+$missing_loop:
+$! For missing loop, check the latest generation.
+$ ref_spec = f$search("''wrk'...]*.*;")
+$ if ref_spec .eqs. "" then goto missing_loop_end
+$!
+$ ref_dev = f$parse(ref_spec,,,"DEVICE")
+$ ref_dir = f$parse(ref_spec,,,"DIRECTORY")
+$ ref_dir = f$edit(ref_dir, "LOWERCASE")
+$ ref_name = f$parse(ref_spec,,,"NAME")
+$ ref_type = f$parse(ref_spec,,,"TYPE")
+$ ref_name_type = ref_name + ref_type
+$!
+$ rel_path = ref_dir - "[" - wrk_base_dir
+$!
+$!
+$ wrk_path = ref + rel_path
+$ wrk_spec = wrk_path + ref_name + ref_type
+$ wrk_name = f$parse(wrk_spec,,,"NAME")
+$ wrk_type = f$parse(wrk_spec,,,"TYPE")
+$!
+$ wrk_fname = wrk_name + wrk_type"
+$ ref_fname = ref_name + ref_type
+$!
+$ wrk_skip = 0
+$ ref_utype = f$edit(ref_type,"UPCASE")
+$ ref_ufname = f$edit(ref_fname,"UPCASE")
+$!
+$ if wrk_skip .eq. 0
+$ then
+$ wrk_chk = f$search(wrk_spec, 0)
+$ if wrk_chk .eqs. ""
+$ then
+$ if report_missing
+$ then
+$ write sys$output "''wrk_spec' is missing"
+$ endif
+$ goto missing_loop
+$ endif
+$ else
+$ goto missing_loop
+$ endif
+$!
+$ if ref_fname .nes. wrk_fname
+$ then
+$ write sys$output "''wrk_spc' wrong name, should be ""''ref_fname'"""
+$ endif
+$!
+$ if ref_utype .eqs. ".DIR" then goto missing_loop
+$!
+$ wrk_ver = f$parse(wrk_chk,,,"VERSION")
+$ if wrk_ver .nes. ";1"
+$ then
+$ write sys$output "Version for ''wrk_spec' is not 1"
+$ endif
+$!
+$ goto missing_loop
+$!
+$!
+$missing_loop_end:
+$!
+$exit
diff --git a/packages/vms/config-vms.h b/packages/vms/config-vms.h
deleted file mode 100644
index 461001c..0000000
--- a/packages/vms/config-vms.h
+++ /dev/null
@@ -1,371 +0,0 @@
-#ifndef HEADER_CONFIG_VMS_H
-#define HEADER_CONFIG_VMS_H
-
-/* */
-/* MSK, 02/05/04, Hand edited for trail build on Alpha V7.3, DEC C 6.5-003 */
-/* MSK, 03/09/04, Seems to work for all platforms I've built on so far. */
-/* Added HAVE_SYS_IOCTL_H define */
-/* TES, 10/06/04, Added MAX_INITIAL_POST_SIZE, HAVE_BASENAME */
-/* MSK, 02/02/05, Changed HAVE_TERMIOS_H to an undef since the change in */
-/* getpass.c no longer undef'd it during compile. */
-/* MSK, 02/08/05, turned two config-vms files into one by using USE_SSLEAY */
-/* MPZ, 12/28/05, changed HAVE_STRTOK_R define to use CRTL_VER */
-/* MSK, 01/27/07, needed to add HAVE_STRUCT_TIMEVAL define */
-
-/* Define cpu-machine-OS */
-#if defined(__alpha)
-# define OS "ALPHA-HP-VMS"
-#elif defined(__vax)
-# define OS "VAX-HP-VMS"
-#elif defined(__ia64)
-# define OS "IA64-HP-VMS"
-#else
-# define OS "UNKNOWN-HP-VMS"
-#endif
-
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long double', as computed by sizeof. */
-#define SIZEOF_LONG_DOUBLE 8
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
-
-/* Define if you have the alarm function. */
-#define HAVE_ALARM 1
-
-/* Define if you have the geteuid function. */
-#define HAVE_GETEUID 1
-
-/* Define if you have the basename function. */
-#define HAVE_BASENAME 1
-
-/* Define if you have the gethostbyaddr function. */
-#define HAVE_GETHOSTBYADDR 1
-
-/* Define if you have the gethostname function. */
-#define HAVE_GETHOSTNAME 1
-
-/* Define if you have the getpwuid function. */
-#define HAVE_GETPWUID 1
-
-/* Define if you have the getservbyname function. */
-#define HAVE_GETSERVBYNAME 1
-
-/* Define if you have the gettimeofday function. */
-#define HAVE_GETTIMEOFDAY 1
-
-/* Define if you have the inet_addr function. */
-#define HAVE_INET_ADDR 1
-
-/* Define if you have the ioctl function. */
-#define HAVE_IOCTL 1
-
-/* Define if you have a working ioctl FIONBIO function. */
-#define HAVE_IOCTL_FIONBIO 1
-
-/* Define if you have a working ioctl SIOCGIFADDR function. */
-#define HAVE_IOCTL_SIOCGIFADDR 1
-
-/* Define if you have the perror function. */
-#define HAVE_PERROR 1
-
-/* Define if you have the select function. */
-#define HAVE_SELECT 1
-
-/* Define if you have the setvbuf function. */
-#define HAVE_SETVBUF 1
-
-/* Define if you have the sigaction function. */
-#define HAVE_SIGACTION 1
-
-/* Define if you have the signal function. */
-#define HAVE_SIGNAL 1
-
-/* Define if you have the socket function. */
-#define HAVE_SOCKET 1
-
-/* Define if you have the strcasecmp function. */
-#define HAVE_STRCASECMP 1
-
-/* Define if you have the strcmpi function. */
-/* #define HAVE_STRCMPI 1 */
-
-/* Define if you have the strdup function. */
-#define HAVE_STRDUP 1
-
-/* Define if you have the strftime function. */
-#define HAVE_STRFTIME 1
-
-/* Define if you have the stricmp function. */
-/* #define HAVE_STRICMP 1 */
-
-/* Define if you have the strstr function. */
-#define HAVE_STRSTR 1
-
-/* Define if you have the ftruncate function. */
-#define HAVE_FTRUNCATE 1
-
-/* Define if you have the uname function. */
-#define HAVE_UNAME 1
-
-/* Define if you have the <err.h> header file. */
-#define HAVE_ERR_H 1
-
-/* Define if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define if you have the <getopt.h> header file. */
-#define HAVE_GETOPT_H 1
-
-/* Define if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
-/* Define if you need the malloc.h header header file even with stdlib.h */
-/* #define NEED_MALLOC_H 1 */
-
-/* Define if you have the <net/if.h> header file. */
-#define HAVE_NET_IF_H 1
-
-/* Define if you have the <netdb.h> header file. */
-#define HAVE_NETDB_H 1
-
-/* Define if you have the <netinet/if_ether.h> header file. */
-#define HAVE_NETINET_IF_ETHER_H 1
-
-/* Define if you have the <netinet/in.h> header file. */
-#define HAVE_NETINET_IN_H 1
-
-/* OpenSSL section starts here */
-
-/* Define if you have a working OpenSSL installation */
-#ifdef USE_SSLEAY
-
-/* if OpenSSL is in use */
-#define USE_OPENSSL 1
-
-/* Define if you have the crypto library (-lcrypto). */
-#define HAVE_LIBCRYPTO 1
-
-/* Define if you have the ssl library (-lssl). */
-#define HAVE_LIBSSL 1
-
-/* Define if you have the <openssl/crypto.h> header file. */
-#define HAVE_OPENSSL_CRYPTO_H 1
-
-/* Define if you have the <openssl/err.h> header file. */
-#define HAVE_OPENSSL_ERR_H 1
-
-/* Define if you have the <openssl/pem.h> header file. */
-#define HAVE_OPENSSL_PEM_H 1
-
-/* Define if you have the <openssl/rsa.h> header file. */
-#define HAVE_OPENSSL_RSA_H 1
-
-/* Define if you have the <openssl/ssl.h> header file. */
-#define HAVE_OPENSSL_SSL_H 1
-
-/* Define if you have the <openssl/x509.h> header file. */
-#define HAVE_OPENSSL_X509_H 1
-
-/*
- * This needs to be defined for OpenSSL 0.9.7 and other versions that have the
- * ENGINE stuff supported. If an include of "openssl/engine.h" fails, then
- * undefine the define below.
-*/
-#define HAVE_OPENSSL_ENGINE_H 1
-
-#endif /* USE_SSLEAY */
-/* OpenSSL section ends here */
-
-/* Define if you have the <pwd.h> header file. */
-#define HAVE_PWD_H 1
-
-/* Define if you have the <sgtty.h> header file. */
-#define HAVE_SGTTY_H 1
-
-/* Define if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <sys/socket.h> header file. */
-#define HAVE_SYS_SOCKET_H 1
-
-/* Define if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define if you have the <termios.h> header file. */
-#undef HAVE_TERMIOS_H
-
-/* Define if you have the <time.h> header file. */
-#define HAVE_TIME_H 1
-
-/* Define if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define if you have the resolv library (-lresolv). */
-#define HAVE_LIBRESOLV 1
-
-/* Define if you have the socket library (-lsocket). */
-#define HAVE_LIBSOCKET 1
-
-/* Define if getaddrinfo exists and works */
-#define HAVE_GETADDRINFO 1
-
-/* Define if you have the <timeval.h> header file. */
-#define HAVE_TIMEVAL_H 1
-
-/* Define if you have the timeval struct. */
-#define HAVE_STRUCT_TIMEVAL 1
-
-/* Name of this package! */
-#define PACKAGE "not-used"
-
-/* Version number of this archive. */
-#define VERSION "not-used"
-
-/* Define if you have the getpass function. */
-#undef HAVE_GETPASS
-
-/* Define if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define if you have the `strtok_r' function. */
-/* Condition lifted from <string.h> */
-#if __CRTL_VER >= 70301000
-# define HAVE_STRTOK_R 1
-#endif
-
-/* Define if you have the `strtoll' function. */
-#define HAVE_STRTOLL 1
-
-/* Define if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you need the memory.h header file even with stdlib.h */
-#define NEED_MEMORY_H 1
-
-/* Define if you have the `sigsetjmp' function. */
-#define HAVE_SIGSETJMP 1
-
-/* Define to 1 if you have the <setjmp.h> header file. */
-#define HAVE_SETJMP_H 1
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the <sys/ioctl.h> header file. */
-#define HAVE_SYS_IOCTL_H 1
-
-/* Define to 1 if you have the <stropts.h> header file. */
-#define HAVE_STROPTS_H 1
-
-/* Define if you have the getnameinfo function. */
-#define HAVE_GETNAMEINFO 1
-
-/* Define to the type qualifier of arg 1 for getnameinfo. */
-#define GETNAMEINFO_QUAL_ARG1 const
-
-/* Define to the type of arg 1 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
-
-/* Define to the type of arg 2 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG2 size_t
-
-/* Define to the type of args 4 and 6 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG46 size_t
-
-/* Define to the type of arg 7 for getnameinfo. */
-#define GETNAMEINFO_TYPE_ARG7 int
-
-/* Define if you have the recv function. */
-#define HAVE_RECV 1
-
-/* Define to the type of arg 1 for recv. */
-#define RECV_TYPE_ARG1 int
-
-/* Define to the type of arg 2 for recv. */
-#define RECV_TYPE_ARG2 void *
-
-/* Define to the type of arg 3 for recv. */
-#define RECV_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for recv. */
-#define RECV_TYPE_ARG4 int
-
-/* Define to the function return type for recv. */
-#define RECV_TYPE_RETV int
-
-/* Define if you have the recvfrom function. */
-#define HAVE_RECVFROM 1
-
-/* Define to the type of arg 1 for recvfrom. */
-#define RECVFROM_TYPE_ARG1 int
-
-/* Define to the type pointed by arg 2 for recvfrom. */
-#define RECVFROM_TYPE_ARG2 void
-
-/* Define if the type pointed by arg 2 for recvfrom is void. */
-#define RECVFROM_TYPE_ARG2_IS_VOID 1
-
-/* Define to the type of arg 3 for recvfrom. */
-#define RECVFROM_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for recvfrom. */
-#define RECVFROM_TYPE_ARG4 int
-
-/* Define to the type pointed by arg 5 for recvfrom. */
-#define RECVFROM_TYPE_ARG5 struct sockaddr
-
-/* Define to the type pointed by arg 6 for recvfrom. */
-#define RECVFROM_TYPE_ARG6 int
-
-/* Define to the function return type for recvfrom. */
-#define RECVFROM_TYPE_RETV int
-
-/* Define if you have the send function. */
-#define HAVE_SEND 1
-
-/* Define to the type of arg 1 for send. */
-#define SEND_TYPE_ARG1 int
-
-/* Define to the type qualifier of arg 2 for send. */
-#define SEND_QUAL_ARG2 const
-
-/* Define to the type of arg 2 for send. */
-#define SEND_TYPE_ARG2 void *
-
-/* Define to the type of arg 3 for send. */
-#define SEND_TYPE_ARG3 int
-
-/* Define to the type of arg 4 for send. */
-#define SEND_TYPE_ARG4 int
-
-/* Define to the function return type for send. */
-#define SEND_TYPE_RETV int
-
-/* Define to hide dollar sign from compilers in strict ansi mode. */
-#define decc_translate_vms(__s) decc$translate_vms(__s)
-
-#endif /* HEADER_CONFIG_VMS_H */
diff --git a/packages/vms/config_h.com b/packages/vms/config_h.com
new file mode 100644
index 0000000..2a5503f
--- /dev/null
+++ b/packages/vms/config_h.com
@@ -0,0 +1,2184 @@
+$! File: config_h.com
+$!
+$! $Id: config_h.com,v 1.1.1.1 2012/12/02 19:25:21 wb8tyw Exp $
+$!
+$! This procedure attempts to figure out how to build a config.h file
+$! for the current project.
+$!
+$! P1 specifies the config.h.in file or equivalent. If it is not specified
+$! then this procedure will search for several common names of the file.
+$!
+$! The CONFIGURE shell script will be examined for hints and a few symbols
+$! but most of the tests will not produce valid results on OpenVMS. Some
+$! will produce false positives and some will produce false negatives.
+$!
+$! It is easier to just read the config.h_in file and make up tests based
+$! on what is in it!
+$!
+$! This file will create an empty config_vms.h file if one does not exist.
+$! The config_vms.h is intended for manual edits to handle things that
+$! this procedure can not.
+$!
+$! The config_vms.h will be invoked by the resulting config.h file.
+$!
+$! This procedure knows about the DEC C RTL on the system it is on.
+$! Future versions may be handle the GNV, the OpenVMS porting library,
+$! and others.
+$!
+$! This procedure may not guess the options correctly for all architectures,
+$! and is a work in progress.
+$!
+$! Copyright 2011, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 15-Jan-2001 J. Malmberg Original
+$! 29-Apr-2001 J. Malmberg Also look for config.*in* in a [.include]
+$! subdirectory
+$! 30-Apr-2001 J. Malmberg Update for SAMBA checks
+$! 09-Apr-2005 J. Malmberg Update for RSYNC and large file.
+$! 29-Sep-2011 J. Malmberg Update for Bash 4.2
+$! 01-Mar-2012 J. Malmberg Warn about getcwd(0,0)
+$! 21-Dec-2012 J. Malmberg Update for gawk
+$! 29-Dec-2012 J. Malmberg Update for curl
+$!============================================================================
+$!
+$ss_normal = 1
+$ss_abort = 44
+$ss_control_y = 1556
+$status = ss_normal
+$on control_y then goto control_y
+$on warning then goto general_error
+$!on warning then set ver
+$!
+$! Some information for writing timestamps to created files
+$!----------------------------------------------------------
+$my_proc = f$environment("PROCEDURE")
+$my_proc_file = f$parse(my_proc,,,"NAME") + f$parse(my_proc,,,"TYPE")
+$tab[0,8] = 9
+$datetime = f$element(0,".",f$cvtime(,"ABSOLUTE","DATETIME"))
+$username = f$edit(f$getjpi("","USERNAME"),"TRIM")
+$!
+$pid = f$getjpi("","PID")
+$tfile1 = "SYS$SCRATCH:config_h_temp1_''pid'.TEMP"
+$dchfile = "SYS$SCRATCH:config_h_decc_''pid'.TEMP"
+$starhfile = "SYS$SCRATCH:config_h_starlet_''pid'.TEMP"
+$configure_script = "SYS$SCRATCH:configure_script_''pid'.TEMP"
+$!
+$! Get the system type
+$!----------------------
+$arch_type = f$getsyi("arch_type")
+$!
+$! Does config_vms.h exist?
+$!-------------------------
+$update_config_vms = 0
+$file = f$search("sys$disk:[]config_vms.h")
+$if file .nes. ""
+$then
+$ write sys$output "Found existing custom file ''file'."
+$else
+$ update_config_vms = 1
+$ write sys$output "Creating new sys$disk:[]config_vms.h for you."
+$ gosub write_config_vms
+$endif
+$!
+$!
+$! On some platforms, DCL search has problems with searching a file
+$! on a NFS mounted volume. So copy it to sys$scratch:
+$!
+$if f$search(configure_script) .nes. "" then delete 'configure_script';*
+$copy sys$disk:[]configure 'configure_script'
+$!
+$ssl_header_dir = "OPENSSL:"
+$if f$trnlnm("OPENSSL") .eqs. ""
+$then
+$ ssl_header_dir = "SSL$INCLUDE:"
+$endif
+$!
+$!
+$! Write out the header
+$!----------------------
+$gosub write_config_h_header
+$!
+$!
+$!
+$! config.h.in could have at least five different names depending
+$! on how it was transferred to OpenVMS
+$!------------------------------------------------------------------
+$if p1 .nes. ""
+$then
+$ cfile = p1
+$else
+$ cfile = f$search("sys$disk:[]config.h.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("sys$disk:[]config.h_in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("sys$disk:[]configh.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("sys$disk:[]config__2eh.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("sys$disk:[]config.h__2ein")
+$ endif
+$ endif
+$ endif
+$ endif
+$endif
+$if f$trnlnm("PRJ_INCLUDE") .nes. ""
+$then
+$ cfile = f$search("PRJ_INCLUDE:config.h.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("PRJ_INCLUDE:config.h_in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("PRJ_INCLUDE:config__2eh.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("PRJ_INCLUDE:config__2eh.in")
+$ if cfile .eqs. ""
+$ then
+$ cfile = f$search("PRJ_INCLUDE:config.h__2ein")
+$ endif
+$ endif
+$ endif
+$ endif
+$endif
+$if cfile .eqs. ""
+$then
+$ write sys$output "Can not find sys$disk:config.h.in"
+$ line_out = "Looked for config.h.in, config.h_in, configh.in, "
+$ line_out = line_out + "config__2eh.in, config.h__2ein"
+$ write/symbol sys$output line_out
+$ if f$trnlnm("PRJ_INCLUDE") .nes. ""
+$ then
+$ write sys$output "Also looked in PRJ_INCLUDE: for these files."
+$ endif
+$!
+$ write tf ""
+$ write tf -
+ " /* Could not find sys$disk:config.h.in */"
+$ write tf -
+ " /* Looked also for config.h_in, configh.in, config__2eh.in, */"
+$ write tf -
+ " /* config.h__2ein */"
+$ if f$trnlnm("PRJ_INCLUDE") .nes. ""
+$ then
+$ write tf -
+ " /* Also looked in PRJ_INCLUDE: for these files. */"
+$ endif
+$ write tf -
+ "/*--------------------------------------------------------------*/
+$ write tf ""
+$ goto write_tail
+$endif
+$!
+$!
+$! Locate the DECC libraries in use
+$!-----------------------------------
+$decc_rtldef = f$parse("decc$rtldef","sys$library:.tlb;0")
+$decc_starletdef = f$parse("sys$starlet_c","sys$library:.tlb;0")
+$decc_shr = f$parse("decc$shr","sys$share:.exe;0")
+$!
+$! Dump the DECC header names into a file
+$!----------------------------------------
+$if f$search(dchfile) .nes. "" then delete 'dchfile';*
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$define/user sys$output 'tfile1'
+$library/list 'decc_rtldef'
+$open/read/error=rtldef_loop1_end tf1 'tfile1'
+$open/write/error=rtldef_loop1_end tf2 'dchfile'
+$rtldef_loop1:
+$ read/end=rtldef_loop1_end tf1 line_in
+$ line_in = f$edit(line_in,"TRIM,COMPRESS")
+$ key1 = f$element(0," ",line_in)
+$ key2 = f$element(1," ",line_in)
+$ if key1 .eqs. " " .or. key1 .eqs. "" then goto rtldef_loop1
+$ if key2 .nes. " " .and. key2 .nes. "" then goto rtldef_loop1
+$ write tf2 "|",key1,"|"
+$ goto rtldef_loop1
+$rtldef_loop1_end:
+$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1
+$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$!
+$! Dump the STARLET header names into a file
+$!----------------------------------------
+$if f$search(starhfile) .nes. "" then delete 'starhfile';*
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$define/user sys$output 'tfile1'
+$library/list 'decc_starletdef'
+$open/read/error=stardef_loop1_end tf1 'tfile1'
+$open/write/error=stardef_loop1_end tf2 'starhfile'
+$stardef_loop1:
+$ read/end=stardef_loop1_end tf1 line_in
+$ line_in = f$edit(line_in,"TRIM,COMPRESS")
+$ key1 = f$element(0," ",line_in)
+$ key2 = f$element(1," ",line_in)
+$ if key1 .eqs. " " .or. key1 .eqs. "" then goto stardef_loop1
+$ if key2 .nes. " " .and. key2 .nes. "" then goto stardef_loop1
+$ write tf2 "|",key1,"|"
+$ goto stardef_loop1
+$stardef_loop1_end:
+$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1
+$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2
+$if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$!
+$!
+$! Now calculate what should be in the file from reading
+$! config.h.in and CONFIGURE.
+$!---------------------------------------------------------------
+$open/read inf 'cfile'
+$do_comment = 0
+$if_block = 0
+$cfgh_in_loop1:
+$!set nover
+$ read/end=cfgh_in_loop1_end inf line_in
+$ xline = f$edit(line_in,"TRIM,COMPRESS")
+$!
+$! Blank line handling
+$!---------------------
+$ if xline .eqs. ""
+$ then
+$ write tf ""
+$ goto cfgh_in_loop1
+$ endif
+$ xlen = f$length(xline)
+$ key = f$extract(0,2,xline)
+$!
+$! deal with comments by copying exactly
+$!-----------------------------------------
+$ if (do_comment .eq. 1) .or. (key .eqs. "/*")
+$ then
+$ do_comment = 1
+$ write tf line_in
+$ key = f$extract(xlen - 2, 2, xline)
+$ if key .eqs. "*/" then do_comment = 0
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Some quick parsing
+$!----------------------
+$ keyif = f$extract(0,3,xline)
+$ key1 = f$element(0," ",xline)
+$ key2 = f$element(1," ",xline)
+$ key2a = f$element(0,"_",key2)
+$ key2b = f$element(1,"_",key2)
+$ key2_len = f$length(key2)
+$ key2_h = f$extract(key2_len - 2, 2, key2)
+$ key2_t = f$extract(key2_len - 5, 5, key2)
+$ if key2_t .eqs. "_TYPE" then key2_h = "_T"
+$ key64 = 0
+$ if f$locate("64", xline) .lt. xlen then key64 = 1
+$!
+$!write sys$output "xline = ''xline'"
+$!
+$! Comment out this section of the ifblock
+$!-----------------------------------------
+$ if if_block .ge. 3
+$ then
+$ write tf "/* ", xline, " */"
+$ if keyif .eqs. "#en" then if_block = 0
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Handle the end of an ifblock
+$!-------------------------------
+$ if keyif .eqs. "#en"
+$ then
+$ write tf xline
+$ if_block = 0
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key1 .eqs. "#ifndef"
+$ then
+$! Manual check for _ALL_SOURCE on AIX error
+$!-----------------------------------------------
+$ if key2 .eqs. "_ALL_SOURCE"
+$ then
+$ write tf "/* ", xline, " */"
+$!
+$! Ignore the rest of the block
+$!--------------------------------------
+$ if_block = 3
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$!
+$! Default action for an #if/#else/#endif
+$!------------------------------------------
+$ if keyif .eqs. "#if" .or. keyif .eqs. "#el"
+$ then
+$ if_block = 1
+$ write tf xline
+$ goto cfgh_in_loop1
+$ endif
+$!
+$!
+$! Process "normal?" stuff
+$!---------------------------
+$ if key1 .eqs. "#undef"
+$ then
+$ key2c = f$element(2, "_", key2)
+$ if (key2c .eqs. "_") .or. (key2c .eqs. "H") then key2c = ""
+$ key2d = f$element(3, "_", key2)
+$ if (key2d .eqs. "_") .or. (key2d .eqs. "H") then key2d = ""
+$ key2e = f$element(4, "_", key2)
+$ if (key2e .eqs. "_") .or. (key2e .eqs. "H") then key2e = ""
+$ if key2d .eqs. "T"
+$ then
+$ if key2e .eqs. "TYPE"
+$ then
+$ key2_h = "_T"
+$ key2d = ""
+$ endif
+$ endif
+$!
+$ double_under = 0
+$!
+$! Process FCNTL directives
+$!-------------------------------------
+$ if (key2b .eqs. "FCNTL") .and. (key2c .eqs. "O") .and. -
+ (key2d .eqs. "NONBLOCK")
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process GETADDRINFO directives
+$!-------------------------------------
+$ if key2 .eqs. "GETADDRINFO_THREADSAFE"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process IOCTL directives
+$!-------------------------------------
+$ if (key2b .eqs. "IOCTL") .and. (key2c .nes. "")
+$ then
+$ if (key2c .eqs. "FIONBIO") .or. (key2c .eqs. "SIOCGIFADDR")
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$!
+$! Manual check for LL on
+$!-----------------------------------------------
+$ if key2 .eqs. "LL"
+$ then
+$ write tf "#ifndef __VAX
+$ write tf "#define HAVE_''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "bool_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' short"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "bits16_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' short"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "u_bits16_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' unsigned short"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "bits32_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "u_bits32_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' unsigned int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "intmax_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#ifdef __VAX"
+$ write tf "#define ''key2' long"
+$ write tf "#else"
+$ write tf "#define ''key2' long long"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "uintmax_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#ifdef __VAX"
+$ write tf "#define ''key2' unsigned long"
+$ write tf "#else"
+$ write tf "#define ''key2' unsigned long long"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "socklen_t"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "GETGROUPS_T"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' gid_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_SYS_SIGLIST"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_SYS_ERRLIST"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_STRUCT_DIRENT_D_INO"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_STRUCT_TIMEVAL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! ! The header files have this information, however
+$! ! The ioctl() call only works on sockets.
+$! if key2 .eqs. "FIONREAD_IN_SYS_IOCTL"
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ''key2' 1"
+$! write tf "#endif"
+$! goto cfgh_in_loop1
+$! endif
+$!
+$! ! The header files have this information, however
+$! ! The ioctl() call only works on sockets.
+$! if key2 .eqs. "GWINSZ_IN_SYS_IOCTL"
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ''key2' 1"
+$! write tf "#endif"
+$! goto cfgh_in_loop1
+$! endif
+$!
+$! ! The header files have this information, however
+$! ! The ioctl() call only works on sockets.
+$! if key2 .eqs. "STRUCT_WINSIZE_IN_SYS_IOCTL"
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ''key2' 0"
+$! write tf "#endif"
+$! goto cfgh_in_loop1
+$! endif
+$!
+$ if key2 .eqs. "HAVE_STRUCT_TM_TM_ZONE"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_TM_ZONE"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_TIMEVAL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "WEXITSTATUS_OFFSET"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 2"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_GETPW_DECLS"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_CONFSTR"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_PRINTF"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_SBRK"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRSIGNAL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2a .eqs. "HAVE_DECL_STRTOLD"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOIMAX"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOLL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOUL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOULL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_STRTOUMAX"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "GETPGRP_VOID"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "NAMED_PIPES_MISSING"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "OPENDIR_NOT_ROBUST"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "PGRP_PIPE"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "CAN_REDEFINE_GETENV"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_PRINTF_A_FORMAT"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "CTYPE_NON_ASCII"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_LANGINFO_CODESET"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 0"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! This wants execve() to do this automagically to pass.
+$! if key2 .eqs. "HAVE_HASH_BANG_EXEC"
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ''key2' 1"
+$! write tf "#endif"
+$! goto cfgh_in_loop1
+$! endif
+$!
+$ if key2 .eqs. "ICONV_CONST"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2'"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "VOID_SIGHANDLER"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_POSIX_SIGNALS"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "UNUSABLE_RT_SIGNALS"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2a .eqs. "HAVE_DECL_FPURGE"
+$ then
+$ write tf "#ifndef ''key2a'"
+$ write tf "#define ''key2a' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_DECL_SETREGID"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_POSIX_SIGSETJMP"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_LIBDL"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_ENGINE_LOAD_BUILTIN_ENGINES"
+$ then
+$ if f$search("''ssl_header_dir'engine.h") .nes. ""
+$ then
+$ search_key = key2 - "HAVE_"
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/output=nl: 'ssl_header_dir'engine.h 'search_key'
+$ if '$severity' .eq. 1
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ else
+$ write tf "/* #undef ''key2' */"
+$ endif
+$ else
+$ write tf "/* #undef ''key2' */"
+$ endif
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "HAVE_SSL_GET_SHUTDOWN"
+$ then
+$ if f$search("''ssl_header_dir'ssl.h") .nes. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ else
+$ write tf "/* #undef ''key2' */"
+$ endif
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2b .eqs. "RAND" .and. key2c .nes. "" .and. key2d .eqs. ""
+$ then
+$ if (key2c .eqs. "EGD") .or. -
+ (key2c .eqs. "STATUS") .or. -
+ (key2c .eqs. "SCREEN")
+$ then
+$ if f$search("''ssl_header_dir'rand.h") .nes. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ else
+$ write tf "/* #undef ''key2' */"
+$ endif
+$ endif
+$ endif
+$!
+$ if key2 .eqs. "STRCOLL_BROKEN"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2 .eqs. "DUP_BROKEN"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! This is for a test that getcwd(0,0) works.
+$! It does not on VMS.
+$!--------------------------
+$ if key2 .eqs. "GETCWD_BROKEN"
+$ then
+$ write sys$output ""
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being tested for!"
+$ write sys$output -
+ "-CONFIG_H-I-GETCWD, GETCWD(0,0) does not work on VMS."
+$ write sys$output -
+ "-CONFIG_H-I-GETCWD2, Work around hack probably required."
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$ if update_config_vms
+$ then
+$ open/append tfcv sys$disk:[]config_vms.h
+$ write tfcv ""
+$ write tfcv -
+ "/* Check config.h for use of ''key2' settings */"
+$ write tfcv ""
+$ close tfcv
+$ endif
+$
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if (key2a .eqs. "HAVE") .or. (key2a .eqs. "STAT") .or. -
+ (key2 .eqs. "ENABLE_IPV6") .or. (key2b .eqs. "LDAP")
+$ then
+$!
+$! Process extra underscores
+$!------------------------------------
+$ if f$locate("HAVE___", key2) .lt. key2_len
+$ then
+$ key2b = "__" + key2d
+$ key2d = ""
+$ double_under = 1
+$ else
+$ if f$locate("HAVE__", key2) .lt. key2_len
+$ then
+$ key2b = "_" + key2c
+$ key2c = ""
+$ double_under = 1
+$ endif
+$ endif
+$!
+$ if (key2_h .eqs. "_H") .or. (key2 .eqs. "ENABLE_IPV6") .or. -
+ (key2b .eqs. "LDAP")
+$ then
+$!
+$! Looking for a header file
+$!---------------------------------------
+$ headf = key2b
+$ if key2c .nes. "" then headf = headf + "_" + key2c
+$ if key2d .nes. "" then headf = headf + "_" + key2d
+$!
+$! (key2b .eqs. "READLINE")
+$!
+$! Some special parsing
+$!------------------------------------------
+$ if (key2b .eqs. "SYS") .or. (key2b .eqs. "ARPA") .or. -
+ (key2b .eqs. "NET") .or. (key2b .eqs. "NETINET")
+$ then
+$ if key2c .nes. ""
+$ then
+$ headf = key2c
+$ if key2d .nes. "" then headf = key2c + "_" + key2d
+$ endif
+$ endif
+$!
+$! And of course what's life with out some special cases
+$!--------------------------------------------------------------------
+$ if key2 .eqs. "ENABLE_IPV6"
+$ then
+$ headf = "in6"
+$ endif
+$!
+$ if key2b .eqs. "LDAP"
+$ then
+$ if (key2 .eqs. "HAVE_LDAP_SSL") .or. -
+ (key2 .eqs. "HAVE_LDAP_URL_PARSE")
+$ then
+$ headf = "ldap"
+$ endif
+$ endif
+$!
+$!
+$ if key2b .eqs. "FILE"
+$ then
+$ write sys$output ""
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$ write sys$output -
+ "-CONFIG_H-I-FILE_OLD, file.h will not be configured as is obsolete!"
+$ write sys$output -
+ "-CONFIG_H_I-FCNTL_NEW, "Expecting fcntl.h to be configured instead!"
+$ write sys$output -
+ "-CONFIG_H_I-FCNTL_CHK, "Unable to verify at this time!"
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$!
+$ if update_config_vms
+$ then
+$ open/append tfcv sys$disk:[]config_vms.h
+$ write tfcv ""
+$ write tfcv -
+ "/* Check config.h for use of fcntl.h instead of file.h */"
+$ write tfcv ""
+$ close tfcv
+$ endif
+$ endif
+$!
+$! Now look it up in the DEC C RTL
+$!---------------------------------------------
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/output=nl: 'dchfile' |'headf'|/exact
+$ if '$severity' .eq. 1
+$ then
+$ if key64 then write tf "#ifndef __VAX"
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''dchfile' - #define ''key2' 1"
+$ write tf "#endif"
+$ if key64 then write tf "#endif"
+$set nover
+$ goto cfgh_in_loop1
+$ endif
+$!
+$!
+$! Now look it up in the DEC C STARLET_C
+$!---------------------------------------------
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/output=nl: 'starhfile' |'headf'|/exact
+$ if '$severity' .eq. 1
+$ then
+$ if key64 then write tf "#ifndef __VAX"
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''starfile' - #define ''key2' 1"
+$ write tf "#endif"
+$ if key64 then write tf "#endif"
+$set nover
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Now look for OPENSSL headers
+$!---------------------------------------------------------
+$ if key2b .eqs. "OPENSSL"
+$ then
+$ headf = headf - "OPENSSL_"
+$ header = f$search("''ssl_header_dir'''headf'.h")
+$ if header .nes. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$set nover
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$! Now look for Kerberos
+$!------------------------------------------------------------
+$ if key2b .eqs. "GSSAPI"
+$ then
+$ header_dir = "sys$sysroot:[kerberos.include]"
+$ headf = headf - "GSSAPI_"
+$ header = f$search("''header_dir'''headf'.h")
+$ if header .nes. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$set nover
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$set nover
+$ else
+$!
+$! Looking for a routine or a symbol
+$!------------------------------------------------
+$ if key2c .eqs. "MACRO"
+$ then
+$ if (key2b .eqs. "FILE") .or. (key2b .eqs. "DATE") -
+ .or. (key2b .eqs. "LINE") .or. (key2b .eqs. "TIME")
+$ then
+$ write tf "#ifndef HAVE_''key2b'"
+$ write tf "#define HAVE_''key2b' 1"
+$ write tf "#endif"
+$ endif
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Special false tests
+$!-------------------------------------
+$ if double_under
+$ then
+$ if key2b .eqs. "_FCNTL" .or. key2b .eqs. "__FCNTL"
+$ then
+$ write tf "/* #undef HAVE_''key2b' */"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2b .eqs. "_STAT" .or. key2b .eqs. "__STAT"
+$ then
+$ write tf "/* #undef HAVE_''key2b' */"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if key2b .eqs. "_READ" .or. key2b .eqs. "__READ"
+$ then
+$ write tf "/* #undef HAVE_''key2b' */"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$ keysym = key2b
+$ if key2c .nes. "" then keysym = keysym + "_" + key2c
+$ if key2d .nes. "" then keysym = keysym + "_" + key2d
+$ if key2e .nes. "" then keysym = keysym + "_" + key2e
+$!
+$!
+$! Stat structure members
+$!-------------------------------------
+$ if key2b .eqs. "STRUCT"
+$ then
+$ if key2c .eqs. "STAT" .and (key2d .nes. "")
+$ then
+$ key2b = key2b + "_" + key2c + "_" + key2d
+$ key2c = key2e
+$ key2d = ""
+$ key2e = ""
+$ endif
+$ endif
+$ if (key2b .eqs. "ST") .or. (key2b .eqs. "STRUCT_STAT_ST")
+$ then
+$ keysym = "ST" + "_" + key2c
+$ keysym = f$edit(keysym,"LOWERCASE")
+$ endif
+$ if key2a .eqs. "STAT"
+$ then
+$ if (f$locate("STATVFS", key2b) .eq. 0) .and. key2c .eqs. ""
+$ then
+$ keysym = f$edit(key2b, "LOWERCASE")
+$ endif
+$!$ if (key2b .eqs. "STATVFS" .or. key2b .eqs. "STATFS2" -
+$! .or. key2b .eqs. "STATFS3") .and. key2c .nes. ""
+$!
+$ if (key2b .eqs. "STATVFS") .and. key2c .nes. ""
+$ then
+$! Should really verify that the structure
+$! named by key2b actually exists first.
+$!------------------------------------------------------------
+$!
+$! Statvfs structure members
+$!-------------------------------------------------
+$ keysym = "f_" + f$edit(key2c,"LOWERCASE")
+$ endif
+$ endif
+$!
+$! UTMPX structure members
+$!--------------------------------------
+$ if key2b .eqs. "UT" .and. key2c .eqs. "UT"
+$ then
+$ keysym = "ut_" + f$edit(key2d,"LOWERCASE")
+$ endif
+$!
+$ if f$locate("MMAP",key2) .lt. key2_len
+$ then
+$ write sys$output ""
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$ write sys$output -
+ "-CONFIG_H-I-MMAP, MMAP operations only work on STREAM and BINARY files!"
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$ if update_config_vms
+$ then
+$ open/append tfcv sys$disk:[]config_vms.h
+$ write tfcv ""
+$ write tfcv -
+ "/* Check config.h for use of ''key2' settings */"
+$ write tfcv ""
+$ close tfcv
+$ endif
+$ endif
+$!
+$!
+$ if keysym .eqs. "CRYPT"
+$ then
+$ write sys$output ""
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$ write sys$output -
+ "-CONFIG_H-I-CRYPT, CRYPT operations on the VMS SYSUAF may not work!"
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$ if update_config_vms
+$ then
+$ open/append tfcv sys$disk:[]config_vms.h
+$ write tfcv ""
+$ write tfcv -
+ "/* Check config.h for use of ''keysym' */"
+$ write tfcv ""
+$ close tfcv
+$ endif
+$ endif
+$!
+$!
+$ if keysym .eqs. "EXECL"
+$ then
+$ write sys$output ""
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being asked for!"
+$ write sys$output -
+ "-CONFIG_H-I-EXCEL, EXECL configured, Will probably not work."
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$ if update_config_vms
+$ then
+$ open/append tfcv sys$disk:[]config_vms.h
+$ write tfcv ""
+$ write tfcv -
+ "/* Check config.h for use of ''keysym' */"
+$ write tfcv ""
+$ close tfcv
+$ endif
+$ endif
+$!
+$!
+$! Process if cpp supports ANSI-C stringizing '#' operator
+$!-----------------------------------------------------------------------
+$ if keysym .eqs. "STRINGIZE"
+$ then
+$ write tf "#ifndef HAVE_STRINGIZE"
+$ write tf "#define HAVE_STRINGSIZE 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "VOLATILE"
+$ then
+$ write tf "#ifndef HAVE_VOLATILE"
+$ write tf "#define HAVE_VOLATILE 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "ALLOCA"
+$ then
+$ write tf "#ifndef HAVE_ALLOCA"
+$ write tf "#define HAVE_ALLOCA 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "ERRNO_DECL"
+$ then
+$ write tf "#ifndef HAVE_ERRNO_DECL"
+$ write tf "#define HAVE_ERRNO_DECL 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "LONGLONG"
+$ then
+$ write tf "#ifndef __VAX"
+$ write tf "#pragma message disable longlongtype"
+$ write tf "#ifndef HAVE_LONGLONG"
+$ write tf "#define HAVE_LONGLONG 1"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! May need to test compiler version
+$!-----------------------------------------------
+$ if keysym .eqs. "LONG_LONG"
+$ then
+$ write tf "#ifndef __VAX"
+$ write tf "#pragma message disable longlongtype"
+$ write tf "#ifndef HAVE_LONG_LONG"
+$ write tf "#define HAVE_LONG_LONG 1"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! May need to test compiler version
+$!-----------------------------------------------
+$ if keysym .eqs. "UNSIGNED_LONG_LONG"
+$ then
+$ write tf "#ifndef __VAX"
+$ write tf "#pragma message disable longlongtype"
+$ write tf "#ifndef HAVE_UNSIGNED_LONG_LONG"
+$ write tf "#define HAVE_UNSIGNED_LONG_LONG 1"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! May need to test compiler version
+$!-----------------------------------------------
+$ if keysym .eqs. "UNSIGNED_LONG_LONG_INT"
+$ then
+$ write tf "#ifndef __VAX"
+$ write tf "#pragma message disable longlongtype"
+$ write tf "#ifndef HAVE_UNSIGNED_LONG_LONG_INT"
+$ write tf "#define HAVE_UNSIGNED_LONG_LONG_INT 1"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! May need to test compiler version
+$!-----------------------------------------------
+$ if keysym .eqs. "LONG_DOUBLE"
+$ then
+$ write tf "#ifndef __VAX"
+$ write tf "#pragma message disable longlongtype"
+$ write tf "#ifndef HAVE_LONG_DOUBLE"
+$ write tf "#define HAVE_LONG_DOUBLE 1"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "FCNTL_LOCK"
+$ then
+$ write sys$output -
+ "%CONFIG_H-I-NONPORT, ''key2' being asked for!
+$ write sys$output -
+ "-CONFIG_H-I-REVIEW, Manual Code review required!"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$!
+$! These libraries are provided by the DEC C RTL
+$!-------------------------------------------------------------
+$ if keysym .eqs. "LIBINET" .or. keysym .eqs. "LIBSOCKET"
+$ then
+$ write tf "#ifndef HAVE_''keysym'"
+$ write tf "#define HAVE_''keysym' 1"
+$if p2 .nes. "" then write sys$output "''decc_shr' #define ''keysym' 1"
+$ write tf "#endif
+$ goto cfgh_in_loop1
+$ endif
+$!
+$ if keysym .eqs. "HERRNO" then keysym = "h_errno"
+$ if keysym .eqs. "UTIMBUF" then keysym = "utimbuf"
+$ if key2c .eqs. "STRUCT"
+$ then
+$ keysym = f$edit(key2d,"LOWERCASE")
+$ else
+$ if key2_h .eqs. "_T"
+$ then
+$ if key2_t .eqs. "_TYPE"
+$ then
+$ keysym = f$extract(0, key2_len - 5, key2) - "HAVE_"
+$ endif
+$ keysym = f$edit(keysym,"LOWERCASE")
+$ endif
+$ endif
+$!
+$! Check the DEC C RTL shared image first
+$!------------------------------------------------------
+$ if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/format=nonull/out='tfile1' 'decc_shr' 'keysym'
+$ if '$severity' .eq. 1
+$ then
+$!
+$! Not documented, but from observation
+$!------------------------------------------------------
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ if arch_type .eq. 3
+$ then
+$ keyterm = "''keysym'<SOH>"
+$ else
+$ if arch_type .eq. 2
+$ then
+$ keyterm = "''keysym'<BS>"
+$ else
+$ keyterm = "''keysym'<STX>"
+$ endif
+$ endif
+$ search/out=nl: 'tfile1' -
+ "$''keyterm'","$g''keyterm'","$__utc_''keyterm'",-
+ "$__utctz_''keyterm'","$__bsd44_''keyterm'","$bsd_''keyterm'",-
+ "$''keysym'decc$","$G''keysym'decc$","$GX''keyterm'"
+$ severity = '$severity'
+$!
+$!
+$! Of course the 64 bit stuff is different
+$!---------------------------------------------------------
+$ if severity .ne. 1 .and. key64
+$ then
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/out=nl: 'tfile1' "$_''keyterm'"
+$! search/out 'tfile1' "$_''keyterm'"
+$ severity = '$severity'
+$ endif
+$!
+$! Unix compatability routines
+$!---------------------------------------------
+$ if severity .ne. 1
+$ then
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/out=nl: 'tfile1' -
+ "$__unix_''keyterm'","$__vms_''keyterm'","$_posix_''keyterm'"
+$ severity = '$severity'
+$ endif
+$!
+$! Show the result of the search
+$!------------------------------------------------
+$ if 'severity' .eq. 1
+$ then
+$ if key64 then write tf "#ifndef __VAX"
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''decc_shr' #define ''key2' 1"
+$ write tf "#endif"
+$ if key64 then write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$ if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$!
+$! Check the DECC Header files next
+$!----------------------------------------------
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$ search/out=nl: 'decc_rtldef' -
+ "''keysym';", "''keysym'[", "struct ''keysym'"/exact
+$ severity = '$severity'
+$ if severity .eq. 1
+$ then
+$ if key64 then write tf "#ifndef __VAX"
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$if p2 .nes. "" then write sys$output "''decc_rtldef' #define ''key2' 1"
+$ write tf "#endif"
+$ if key64 then write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Check kerberos
+$!--------------------------------------------
+$ if f$search("SYS$SYSROOT:[kerberos]include.dir") .nes. ""
+$ then
+$ test_mit = "SYS$SYSROOT:[kerberos.include]gssapi_krb5.h"
+$ if (key2 .eqs. "HAVE_GSSAPI")
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! This is really do we have the newer MIT Kerberos
+$!----------------------------------------------------------------------
+$ if (key2 .eqs. "HAVE_GSSMIT")
+$ then
+$ if f$search(test_mit) .nes. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ else
+$ write tf "#ifdef ''key2'"
+$ write tf "#undef ''key2'"
+$ endif
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Older MIT looks like Heimdal
+$!------------------------------------------------
+$ if (key2 .eqs. "HAVE_HEIMDAL")
+$ then
+$ if f$search(test_mit) .eqs. ""
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' 1"
+$ else
+$ write tf "#ifdef ''key2'"
+$ write tf "#undef ''key2'"
+$ endif
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$ endif
+$ write tf "/* ", xline, " */"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$!
+$! Process SIZEOF directives found in SAMBA and others
+$!----------------------------------------------------------
+$ if key2a .eqs. "SIZEOF"
+$ then
+$ if key2b .eqs. "INO" .and. key2_h .eqs. "_T"
+$ then
+$ write tf "#ifndef SIZEOF_INO_T"
+$ write tf "#if !__USING_STD_STAT
+$ write tf "#define SIZEOF_INO_T 6"
+$ write tf "#else
+$ write tf "#define SIZEOF_INO_T 8"
+$ write tf "#endif
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "INTMAX" .and. key2_h .eqs. "_T"
+$ then
+$ write tf "#ifndef SIZEOF_INTMAX_T"
+$ write tf "#ifdef __VAX"
+$ write tf "#define SIZEOF_INTMAX_T 4"
+$ write tf "#else"
+$ write tf "#define SIZEOF_INTMAX_T 8"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "OFF" .and. key2_h .eqs. "_T"
+$ then
+$ write tf "#ifndef SIZEOF_OFF_T"
+$ write tf "#if __USE_OFF64_T"
+$ write tf "#define SIZEOF_OFF_T 8"
+$ write tf "#else"
+$ write tf "#define SIZEOF_OFF_T 4"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "CHAR" .and. key2_h .eqs. "_P"
+$ then
+$ write tf "#ifndef SIZEOF_CHAR_P"
+$ write tf "#if __INITIAL_POINTER_SIZE == 64"
+$ write tf "#define SIZEOF_CHAR_P 8"
+$ write tf "#else"
+$ write tf "#define SIZEOF_CHAR_P 4"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "VOIDP"
+$ then
+$ write tf "#ifndef SIZEOF_VOIDP"
+$ write tf "#if __INITIAL_POINTER_SIZE == 64"
+$ write tf "#define SIZEOF_VOIDP 8"
+$ write tf "#else"
+$ write tf "#define SIZEOF_VOIDP 4"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "INT"
+$ then
+$ write tf "#ifndef SIZEOF_INT"
+$ write tf "#define SIZEOF_INT 4"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "SIZE" .and. key2_h .eqs. "_T"
+$ then
+$ write tf "#ifndef SIZEOF_SIZE_T"
+$ write tf "#define SIZEOF_SIZE_T 4"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "TIME" .and. key2_h .eqs. "_T"
+$ then
+$ write tf "#ifndef SIZEOF_TIME_T"
+$ write tf "#define SIZEOF_TIME_T 4"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "DOUBLE"
+$ then
+$ write tf "#ifndef SIZEOF_DOUBLE"
+$ write tf "#define SIZEOF_DOUBLE 8"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "LONG"
+$ then
+$ if key2c .eqs. ""
+$ then
+$ write tf "#ifndef SIZEOF_LONG"
+$ write tf "#define SIZEOF_LONG 4"
+$ write tf "#endif"
+$ else
+$ write tf "#ifndef SIZEOF_LONG_LONG"
+$ write tf "#ifndef __VAX"
+$ write tf "#define SIZEOF_LONG_LONG 8"
+$ write tf "#endif"
+$ write tf "#endif"
+$ endif
+$ goto cfgh_in_loop1
+$ endif
+$ if key2b .eqs. "SHORT"
+$ then
+$ write tf "#ifndef SIZEOF_SHORT"
+$ write tf "#define SIZEOF_SHORT 2"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ write tf "/* ", xline, " */"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process NEED directives
+$!-------------------------------
+$ if key2a .eqs. "NEED"
+$ then
+$ if key2b .eqs. "STRINGS" .and. key2_h .eqs. "_H"
+$ then
+$ write tf "#ifndef NEED_STRINGS_H"
+$ write tf "#define NEED_STRINGS_H 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ write tf "/* ", xline, " */"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process GETHOSTNAME directives
+$!-------------------------------------
+$ if key2 .eqs. "GETHOSTNAME_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#ifdef _DECC_V4_SOURCE"
+$ write tf "#define ''key2' int"
+$ write tf "#else"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process GETNAMEINFO directives
+$!-------------------------------------
+$ if key2a .eqs. "GETNAMEINFO"
+$ then
+$ if key2 .eqs. "GETNAMEINFO_QUAL_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' const"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' struct sockaddr *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG46"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "GETNAMEINFO_TYPE_ARG7"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$! Process RECV directives
+$!-------------------------------------
+$ if key2a .eqs. "RECV"
+$ then
+$ if key2 .eqs. "RECV_TYPE_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECV_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' void *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECV_TYPE_ARG3"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECV_TYPE_ARG4"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECV_TYPE_RETV"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$!
+$! Process RECVFROM directives
+$!-------------------------------------
+$ if key2a .eqs. "RECVFROM"
+$ then
+$ if key2 .eqs. "RECVFROM_QUAL_ARG5"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2'"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' void *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG3"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG4"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG5"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' struct sockaddr"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_ARG6"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' unsigned int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "RECVFROM_TYPE_RETV"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$! Process SELECT directives
+$!-------------------------------------
+$ if key2a .eqs. "SELECT"
+$ then
+$ if key2 .eqs. "SELECT_QUAL_ARG5"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' const"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SELECT_TYPE_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SELECT_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' void *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SELECT_TYPE_ARG234"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' fd_set *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SELECT_TYPE_ARG5"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' struct timeval *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SELECT_TYPE_RETV"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$! Process SEND directives
+$!-------------------------------------
+$ if key2a .eqs. "SEND"
+$ then
+$ if key2 .eqs. "SEND_QUAL_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' const"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SEND_TYPE_ARG1"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SEND_TYPE_ARG2"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' void *"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SEND_TYPE_ARG3"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' size_t"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SEND_TYPE_ARG4"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ if key2 .eqs. "SEND_TYPE_RETV"
+$ then
+$ write tf "#ifndef ''key2'"
+$ write tf "#define ''key2' int"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$!
+$! Process STATFS directives
+$!-------------------------------
+$! if key2a .eqs. "STATFS"
+$! then
+$! write tf "/* ", xline, " */"
+$! goto cfgh_in_loop1
+$! endif
+$!
+$! Process inline directive
+$!------------------------------
+$ if key2 .eqs. "inline"
+$ then
+$ write tf "#ifndef inline"
+$ write tf "#define inline __inline"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process restrict directive
+$!--------------------------------
+$ if key2 .eqs. "restrict"
+$ then
+$ write tf "#ifndef restrict"
+$ write tf "#define restrict __restrict"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process RETSIGTYPE directive
+$!----------------------------------
+$ if key2 .eqs. "RETSIGTYPE"
+$ then
+$ write tf "#ifndef RETSIGTYPE"
+$ write tf "#define RETSIGTYPE void"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process STDC_HEADERS (SAMBA!)
+$!---------------------------
+$ if key2 .eqs. "STDC_HEADERS"
+$ then
+$ write tf "#ifndef STDC_HEADERS"
+$ write tf "#define STDC_HEADERS 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Process PROTOTYPES directive
+$!-------------------------------------
+$ if key2 .eqs. "PROTOTYPES"
+$ then
+$ write tf "#ifndef PROTOTYPES"
+$ write tf "#define PROTOTYPES 1"
+$ write tf "#endif"
+$ goto cfgh_in_loop1
+$ endif
+$!
+$! Special for SEEKDIR_RETURNS_VOID
+$!---------------------------------------
+$ if key2 .eqs. "SEEKDIR_RETURNS_VOID"
+$ then
+$ write tf "#ifndef SEEKDIR_RETURNS_VOID"
+$ write tf "#define SEEKDIR_RETURNS_VOID 1"
+$ write tf "#endif"
+$ endif
+$!
+$! Unknown - See if CONFIGURE can give a clue for this
+$!----------------------------------------------------------
+$ pflag = 0
+$ set_flag = 0
+$! gproj_name = proj_name - "_VMS" - "-VMS"
+$ if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$ define/user sys$output nl:
+$ define/user sys$error nl:
+$! if f$locate("FILE", key2) .lt. key2_len then pflag = 1
+$! if f$locate("DIR", key2) .eq. key2_len - 3 then pflag = 1
+$! if f$locate("PATH", key2) .eq. key2_len - 4 then pflag = 1
+$!
+$ search/out='tfile1' 'configure_script' "''key2'="/exact
+$ search_sev = '$severity'
+$ if 'search_sev' .eq. 1
+$ then
+$ open/read/err=unknown_cf_rd_error sf 'tfile1'
+$search_file_rd_loop:
+$ read/end=unknown_cf_rd_err sf line_in
+$ line_in = f$edit(line_in, "TRIM")
+$ skey1 = f$element(0,"=",line_in)
+$ if skey1 .eqs. key2
+$ then
+$ skey2 = f$element(1,"=",line_in)
+$ skey2a = f$extract(0,2,skey2)
+$!
+$!
+$! We can not handle assignment to shell symbols.
+$! For now skip them.
+$!------------------------------------------------------------
+$ if f$locate("$", skey2) .lt. f$length(skey2)
+$ then
+$ write tf "/* ", xline, " */"
+$ set_flag = 1
+$ goto found_in_configure
+$ endif
+$!
+$! Keep these two cases separate to make it easier to add
+$! more future intelligence to this routine
+$!----------------------------------------------------------------------
+$ if skey2a .eqs. """`"
+$ then
+$! if pflag .eq. 1
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ",key2," """,gproj_name,"_",key2,""""
+$! write tf "#endif"
+$! else
+$! Ignore this for now
+$!------------------------------------------
+$ write tf "/* ", xline, " */"
+$! endif
+$ set_flag = 1
+$ goto found_in_configure
+$ endif
+$ if skey2a .eqs. """$"
+$ then
+$! if pflag .eq. 1
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ",key2," """,gproj_name,"_",key2,""""
+$! write tf "#endif"
+$! else
+$! Ignore this for now
+$!-------------------------------------------
+$ write tf "/* ", xline, " */"
+$! endif
+$ set_flag = 1
+$ goto found_in_configure
+$ endif
+$!
+$! Remove multiple layers of quotes if present
+$!----------------------------------------------------------
+$ if f$extract(0, 1, skey2) .eqs. "'"
+$ then
+$ skey2 = skey2 - "'" - "'" - "'" - "'"
+$ endif
+$ if f$extract(0, 1, skey2) .eqs. """"
+$ then
+$ skey2 = skey2 - """" - """" - """" - """"
+$ endif
+$ write tf "#ifndef ''key2'"
+$ if skey2 .eqs. ""
+$ then
+$ write tf "#define ",key2
+$ else
+$! Only quote non-numbers
+$!----------------------------------------
+$ if f$string(skey2+0) .eqs. skey2
+$ then
+$ write tf "#define ",key2," ",skey2
+$ else
+$ write tf "#define ",key2," """,skey2,""""
+$ endif
+$ endif
+$ write tf "#endif"
+$ set_flag = 1
+$ else
+$ goto search_file_rd_loop
+$! if pflag .eq. 1
+$! then
+$! write tf "#ifndef ''key2'"
+$! write tf "#define ",key2," """,gproj_name,"_",key2,""""
+$! write tf "#endif"
+$! set_flag = 1
+$! endif
+$ endif
+$found_in_configure:
+$unknown_cf_rd_err:
+$ if f$trnlnm("sf","lnm$process",,"SUPERVISOR") .nes. ""
+$ then
+$ close sf
+$ endif
+$ if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$ if set_flag .eq. 1 then goto cfgh_in_loop1
+$ endif
+$ endif
+$!
+$!
+$!
+$! If it falls through everything else, comment it out
+$!-----------------------------------------------------
+$ write tf "/* ", xline, " */"
+$ goto cfgh_in_loop1
+$cfgh_in_loop1_end:
+$close inf
+$!
+$!
+$! Write out the tail
+$!--------------------
+$write_tail:
+$gosub write_config_h_tail
+$!
+$! Exit and clean up
+$!--------------------
+$general_error:
+$status = '$status'
+$all_exit:
+$set noon
+$if f$trnlnm("sf","lnm$process",,"SUPERVISOR") .nes. "" then close sf
+$if f$trnlnm("tf","lnm$process",,"SUPERVISOR") .nes. "" then close tf
+$if f$trnlnm("inf","lnm$process",,"SUPERVISOR") .nes. "" then close inf
+$if f$trnlnm("tf1","lnm$process",,"SUPERVISOR") .nes. "" then close tf1
+$if f$trnlnm("tf2","lnm$process",,"SUPERVISOR") .nes. "" then close tf2
+$if f$trnlnm("tfcv","lnm$process",,"SUPERVISOR") .nes. "" then close tfcv
+$if f$type(tfile1) .eqs. "STRING"
+$then
+$ if f$search(tfile1) .nes. "" then delete 'tfile1';*
+$endif
+$if f$type(dchfile) .eqs. "STRING"
+$then
+$ if f$search(dchfile) .nes. "" then delete 'dchfile';*
+$endif
+$if f$type(starhfile) .eqs. "STRING"
+$then
+$ if f$search(starhfile) .nes. "" then delete 'starhfile';*
+$endif
+$if f$type(configure_script) .eqs. "STRING"
+$then
+$ if f$search(configure_script) .nes. "" then delete 'configure_script';*
+$endif
+$exit 'status'
+$!
+$!
+$control_y:
+$ status = ss_control_y
+$ goto all_exit
+$!
+$!
+$!
+$! Gosub to write a new config_vms.h
+$!-----------------------------------
+$write_config_vms:
+$outfile = "sys$disk:[]config_vms.h"
+$create 'outfile'
+$open/append tf 'outfile'
+$write tf "/* File: config_vms.h"
+$write tf "**"
+$write tf "** This file contains the manual edits needed for porting"
+$!write tf "** the ''proj_name' package to OpenVMS.
+$write tf "**"
+$write tf "** Edit this file as needed. The procedure that automatically"
+$write tf "** generated this header stub will not overwrite or make any"
+$write tf "** changes to this file."
+$write tf "**"
+$write tf -
+ "** ", datetime, tab, username, tab, "Generated by ''my_proc_file'"
+$write tf "**"
+$write tf -
+ "**========================================================================*/"
+$write tf ""
+$close tf
+$return
+$!
+$! gosub to write out a documentation header for config.h
+$!----------------------------------------------------------------
+$write_config_h_header:
+$outfile = "sys$disk:[]config.h"
+$create 'outfile'
+$open/append tf 'outfile'
+$write tf "#ifndef CONFIG_H"
+$write tf "#define CONFIG_H"
+$write tf "/* File: config.h"
+$write tf "**"
+$write tf -
+ "** This file contains the options needed for porting "
+$write tf "** the project on a VMS system."
+$write tf "**"
+$write tf "** Try not to make any edits to this file, as it is"
+$write tf "** automagically generated."
+$write tf "**"
+$write tf "** Manual edits should be made to the config_vms.h file."
+$write tf "**"
+$write tf -
+ "** ", datetime, tab, username, tab, "Generated by ''my_proc_file'"
+$write tf "**"
+$write tf -
+ "**========================================================================*/"
+$write tf ""
+$write tf "#if (__CRTL_VER >= 70200000) && !defined (__VAX)"
+$write tf "#define _LARGEFILE 1"
+$write tf "#endif"
+$write tf ""
+$write tf "#ifndef __VAX"
+$write tf "#ifdef __CRTL_VER"
+$write tf "#if __CRTL_VER >= 80200000"
+$write tf "#define _USE_STD_STAT 1"
+$write tf "#endif"
+$write tf "#endif"
+$write tf "#endif"
+$write tf ""
+$!
+$write tf " /* Allow compiler builtins */"
+$write tf "/*-------------------------*/"
+$write tf "#ifdef __DECC_VER"
+$write tf "#include <non_existant_dir:builtins.h>"
+$write tf "#endif"
+$!
+$write tf ""
+$return
+$!
+$! gosub to write out the tail for config.h and close it
+$!---------------------------------------------------------
+$write_config_h_tail:
+$write tf ""
+$write tf " /* Include the hand customized settings */"
+$write tf "/*--------------------------------------*/"
+$write tf "#include ""config_vms.h"""
+$write tf ""
+$write tf "#endif /* CONFIG_H */"
+$close tf
+$return
+$!
diff --git a/packages/vms/curl_crtl_init.c b/packages/vms/curl_crtl_init.c
new file mode 100644
index 0000000..01a34e5
--- /dev/null
+++ b/packages/vms/curl_crtl_init.c
@@ -0,0 +1,311 @@
+/* File: curl_crtl_init.c
+ *
+ * This file makes sure that the DECC Unix settings are correct for
+ * the mode the the program is run in.
+ *
+ * The CRTL has not been initialized at the time that these routines
+ * are called, so many routines can not be called.
+ *
+ * This is a module that provides a LIB$INITIALIZE routine that
+ * will turn on some CRTL features that are not enabled by default.
+ *
+ * The CRTL features can also be turned on via logical names, but that
+ * impacts all programs and some aren't ready, willing, or able to handle
+ * those settings.
+ *
+ * On VMS versions that are too old to use the feature setting API, this
+ * module falls back to using logical names.
+ *
+ * Copyright 2013, John Malmberg
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* Unix headers */
+#include <stdio.h>
+#include <string.h>
+
+/* VMS specific headers */
+#include <descrip.h>
+#include <lnmdef.h>
+#include <stsdef.h>
+
+#pragma member_alignment save
+#pragma nomember_alignment longword
+#pragma message save
+#pragma message disable misalgndmem
+struct itmlst_3 {
+ unsigned short int buflen;
+ unsigned short int itmcode;
+ void *bufadr;
+ unsigned short int *retlen;
+};
+#pragma message restore
+#pragma member_alignment restore
+
+#ifdef __VAX
+#define ENABLE "ENABLE"
+#define DISABLE "DISABLE"
+#else
+
+#define ENABLE TRUE
+#define DISABLE 0
+int decc$feature_get_index (const char *name);
+int decc$feature_set_value (int index, int mode, int value);
+#endif
+
+int SYS$TRNLNM(
+ const unsigned long * attr,
+ const struct dsc$descriptor_s * table_dsc,
+ struct dsc$descriptor_s * name_dsc,
+ const unsigned char * acmode,
+ const struct itmlst_3 * item_list);
+int SYS$CRELNM(
+ const unsigned long * attr,
+ const struct dsc$descriptor_s * table_dsc,
+ const struct dsc$descriptor_s * name_dsc,
+ const unsigned char * acmode,
+ const struct itmlst_3 * item_list);
+
+
+/* Take all the fun out of simply looking up a logical name */
+static int sys_trnlnm
+ (const char * logname,
+ char * value,
+ int value_len)
+{
+ const $DESCRIPTOR(table_dsc, "LNM$FILE_DEV");
+ const unsigned long attr = LNM$M_CASE_BLIND;
+ struct dsc$descriptor_s name_dsc;
+ int status;
+ unsigned short result;
+ struct itmlst_3 itlst[2];
+
+ itlst[0].buflen = value_len;
+ itlst[0].itmcode = LNM$_STRING;
+ itlst[0].bufadr = value;
+ itlst[0].retlen = &result;
+
+ itlst[1].buflen = 0;
+ itlst[1].itmcode = 0;
+
+ name_dsc.dsc$w_length = strlen(logname);
+ name_dsc.dsc$a_pointer = (char *)logname;
+ name_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ name_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+ status = SYS$TRNLNM(&attr, &table_dsc, &name_dsc, 0, itlst);
+
+ if ($VMS_STATUS_SUCCESS(status)) {
+
+ /* Null terminate and return the string */
+ /*--------------------------------------*/
+ value[result] = '\0';
+ }
+
+ return status;
+}
+
+/* How to simply create a logical name */
+static int sys_crelnm
+ (const char * logname,
+ const char * value)
+{
+ int ret_val;
+ const char * proc_table = "LNM$PROCESS_TABLE";
+ struct dsc$descriptor_s proc_table_dsc;
+ struct dsc$descriptor_s logname_dsc;
+ struct itmlst_3 item_list[2];
+
+ proc_table_dsc.dsc$a_pointer = (char *) proc_table;
+ proc_table_dsc.dsc$w_length = strlen(proc_table);
+ proc_table_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ proc_table_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+ logname_dsc.dsc$a_pointer = (char *) logname;
+ logname_dsc.dsc$w_length = strlen(logname);
+ logname_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ logname_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+ item_list[0].buflen = strlen(value);
+ item_list[0].itmcode = LNM$_STRING;
+ item_list[0].bufadr = (char *)value;
+ item_list[0].retlen = NULL;
+
+ item_list[1].buflen = 0;
+ item_list[1].itmcode = 0;
+
+ ret_val = SYS$CRELNM(NULL, &proc_table_dsc, &logname_dsc, NULL, item_list);
+
+ return ret_val;
+}
+
+
+ /* Start of DECC RTL Feature handling */
+
+/*
+** Sets default value for a feature
+*/
+#ifdef __VAX
+static void set_feature_default(const char *name, const char *value)
+{
+ sys_crelnm(name, value);
+}
+#else
+static void set_feature_default(const char *name, int value)
+{
+ int index;
+
+ index = decc$feature_get_index(name);
+
+ if (index > 0)
+ decc$feature_set_value (index, 0, value);
+}
+#endif
+
+static void set_features(void)
+{
+ int status;
+ char unix_shell_name[255];
+ int use_unix_settings = 1;
+
+ status = sys_trnlnm("GNV$UNIX_SHELL",
+ unix_shell_name, sizeof unix_shell_name -1);
+ if (!$VMS_STATUS_SUCCESS(status)) {
+ unix_shell_name[0] = 0;
+ use_unix_settings = 0;
+ }
+
+ /* ACCESS should check ACLs or it is lying. */
+ set_feature_default("DECC$ACL_ACCESS_CHECK", ENABLE);
+
+ /* We always want the new parse style */
+ set_feature_default ("DECC$ARGV_PARSE_STYLE" , ENABLE);
+
+
+ /* Unless we are in POSIX compliant mode, we want the old POSIX root
+ * enabled.
+ */
+ set_feature_default("DECC$DISABLE_POSIX_ROOT", DISABLE);
+
+ /* EFS charset, means UTF-8 support */
+ /* VTF-7 support is controlled by a feature setting called UTF8 */
+ set_feature_default ("DECC$EFS_CHARSET", ENABLE);
+ set_feature_default ("DECC$EFS_CASE_PRESERVE", ENABLE);
+
+ /* Support timestamps when available */
+ set_feature_default ("DECC$EFS_FILE_TIMESTAMPS", ENABLE);
+
+ /* Cache environment variables - performance improvements */
+ set_feature_default ("DECC$ENABLE_GETENV_CACHE", ENABLE);
+
+ /* Start out with new file attribute inheritance */
+#ifdef __VAX
+ set_feature_default ("DECC$EXEC_FILEATTR_INHERITANCE", "2");
+#else
+ set_feature_default ("DECC$EXEC_FILEATTR_INHERITANCE", 2);
+#endif
+
+ /* Don't display trailing dot after files without type */
+ set_feature_default ("DECC$READDIR_DROPDOTNOTYPE", ENABLE);
+
+ /* For standard output channels buffer output until terminator */
+ /* Gets rid of output logs with single character lines in them. */
+ set_feature_default ("DECC$STDIO_CTX_EOL", ENABLE);
+
+ /* Fix mv aa.bb aa */
+ set_feature_default ("DECC$RENAME_NO_INHERIT", ENABLE);
+
+ if (use_unix_settings) {
+
+ /* POSIX requires that open files be able to be removed */
+ set_feature_default ("DECC$ALLOW_REMOVE_OPEN_FILES", ENABLE);
+
+ /* Default to outputting Unix filenames in VMS routines */
+ set_feature_default ("DECC$FILENAME_UNIX_ONLY", ENABLE);
+ /* FILENAME_UNIX_ONLY Implicitly sets */
+ /* decc$disable_to_vms_logname_translation */
+
+ set_feature_default ("DECC$FILE_PERMISSION_UNIX", ENABLE);
+
+ set_feature_default ("DECC$FILE_SHARING", ENABLE);
+
+ set_feature_default ("DECC$FILE_OWNER_UNIX", ENABLE);
+ set_feature_default ("DECC$POSIX_SEEK_STREAM_FILE", ENABLE);
+
+ } else {
+ set_feature_default("DECC$FILENAME_UNIX_REPORT", ENABLE);
+ }
+
+ /* When reporting Unix filenames, glob the same way */
+ set_feature_default ("DECC$GLOB_UNIX_STYLE", ENABLE);
+
+ /* The VMS version numbers on Unix filenames is incompatible with most */
+ /* ported packages. */
+ set_feature_default("DECC$FILENAME_UNIX_NO_VERSION", ENABLE);
+
+ /* The VMS version numbers on Unix filenames is incompatible with most */
+ /* ported packages. */
+ set_feature_default("DECC$UNIX_PATH_BEFORE_LOGNAME", ENABLE);
+
+ /* Set strtol to proper behavior */
+ set_feature_default("DECC$STRTOL_ERANGE", ENABLE);
+
+ /* Commented here to prevent future bugs: A program or user should */
+ /* never ever enable DECC$POSIX_STYLE_UID. */
+ /* It will probably break all code that accesses UIDs */
+ /* do_not_set_default ("DECC$POSIX_STYLE_UID", TRUE); */
+}
+
+
+/* Some boilerplate to force this to be a proper LIB$INITIALIZE section */
+
+#pragma nostandard
+#pragma extern_model save
+#ifdef __VAX
+#pragma extern_model strict_refdef "LIB$INITIALIZE" nowrt, long, nopic
+#else
+#pragma extern_model strict_refdef "LIB$INITIALIZE" nowrt, long
+# if __INITIAL_POINTER_SIZE
+# pragma __pointer_size __save
+# pragma __pointer_size 32
+# else
+# pragma __required_pointer_size __save
+# pragma __required_pointer_size 32
+# endif
+#endif
+/* Set our contribution to the LIB$INITIALIZE array */
+void (* const iniarray[])(void) = {set_features, } ;
+#ifndef __VAX
+# if __INITIAL_POINTER_SIZE
+# pragma __pointer_size __restore
+# else
+# pragma __required_pointer_size __restore
+# endif
+#endif
+
+
+/*
+** Force a reference to LIB$INITIALIZE to ensure it
+** exists in the image.
+*/
+int LIB$INITIALIZE(void);
+#ifdef __DECC
+#pragma extern_model strict_refdef
+#endif
+ int lib_init_ref = (int) LIB$INITIALIZE;
+#ifdef __DECC
+#pragma extern_model restore
+#pragma standard
+#endif
diff --git a/packages/vms/curl_gnv_build_steps.txt b/packages/vms/curl_gnv_build_steps.txt
new file mode 100644
index 0000000..6a87fef
--- /dev/null
+++ b/packages/vms/curl_gnv_build_steps.txt
@@ -0,0 +1,288 @@
+From File: curl_gnv_build_steps.txt
+
+ Copyright 2009, John Malmberg
+
+ Permission to use, copy, modify, and/or distribute this software for any
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Currently building Curl using GNV takes longer than building Curl via DCL.
+The GNV procedure actually uses the same configure and makefiles that
+Unix builds use.
+
+Building CURL on OpenVMS using GNV requires GNV V2.1-2 or the updated
+images that are available via anonymous FTP at encompasserve.org in the gnv
+directory. It also requires the GNV Bash 4.2.45 kit as an update from the
+same location or from the sourceforge.net GNV project.
+
+The HP C 7.x compiler was used for building the GNV version.
+
+The source kits are provided in backup savesets inside of the PCSI install kit.
+
+Backup save sets are currently the only distribution medium that I can be
+sure is installed on a target VMS system that will correctly unpack files
+with extended character sets in them. You may need to adjust the ownership
+of the restored files, since /Interchange/noconvert was not available at the
+time that this document was written.
+
+[gnv.common_src]curl_*_original_src.bck is the original source of the curl kit
+as provided by the curl project. [gnv.vms_src]curl-*_vms_src.bck, if present,
+has the OpenVMS specific files that are used for building that are not yet in
+the curl source kits for that release distributed http://curl.haxx.se
+
+These backup savesets should be restored to different directory trees on
+an ODS-5 volume(s) which are referenced by concealed rooted logical names.
+
+SRC_ROOT: is for the source files common to all platforms.
+VMS_ROOT: is for the source files that are specific to OpenVMS.
+ Note, you should create the VMS_ROOT: directory tree even if it is
+ initially empty. This is where you should put edits if you are
+ making changes.
+LCL_ROOT: is manually created to have the same base and sub-directories as
+ SRC_ROOT: and VMS_ROOT:
+
+The logical name REF_ROOT: may be defined to be a search list for
+VMS_ROOT:,SRC_ROOT:
+
+The logical name PRJ_ROOT: is defined to be a search list for
+LCL_ROOT:,VMS_ROOT:,SRC_ROOT:
+
+For the make install process to work, it must have write access to the
+directories referenced by the GNU: logical name.
+
+In future releases of GNV, and with GNV Bash 4.3.30 installed, this name
+should be GNV$GNU:
+
+As directly updating those directories would probably be disruptive to other
+users of the system and require elevated privilege, this can be handled by
+creating a separate directory tree to install into which can be referenced
+by the concealed rooted logical name new_gnu:. A concealed logical name of
+OLD_GNU: can be set up to reference the real GNV directory tree.
+
+Then a local copy of the GNU/GNV$GNU logical names can be set up as a search
+list such as NEW_GNU:,OLD_GNU:
+
+The directory NEW_GNU:[usr] should be created. The make install phase should
+create all the other directories.
+
+The make install process may abort if curl is already because it can not
+uninstall the older version of curl because it does not have permission.
+
+The file stage_curl_install.com is used set up a new_gnu: directory tree
+for testing. The PCSI kitting procedure uses these files as input.
+
+These files do not create the directories in the VMS_ROOT and LCL_ROOT
+directory trees. You can create them with commands similar to:
+
+ $ create/dir lcl_root:[curl]/prot=w:re
+ $ copy src_root:[curl...]*.dir -
+ lcl_root:[curl...]/prot=(o:rwed,w:re)
+ $ create/dir vms_root:[curl]/prot=w:re
+ $ copy src_root:[curl...]*.dir -
+ vms_root:[curl...]/prot=(o:rwed,w:re)
+
+One of the ways with to protect the source from being modified is to have
+the directories under src_root: owned by a user or resource where the build
+username only has read access to it.
+
+
+Note to builders:
+
+GNV currently has a bug where configure scripts take a long time to run.
+Some of the configure steps take a while to complete, and on a 600 Mhz
+DS10 with IDE disks, taking an hour to run the CURL configure is normal.
+
+The following messages can be ignored and may get fixed in a future version
+of GNV. The GNV$*.OPT files are used to find the libraries as many have
+different names on VMS than on Unix. The Bash environment variable
+GNV_CC_QUALIFIERS can override all other settings for the C Compiler.
+
+? cc: No support for switch -warnprotos
+? cc: Unrecognized file toomanyargs
+? cc: Warning: library "ssl" not found
+? cc: Warning: library "crypto" not found
+? cc: Warning: library "gssapi" not found
+? cc: Warning: library "z" not found
+u unimplemented switch - ignored
+
+
+With these search lists set up and the properly, curl can be built by
+setting your default to PRJ_ROOT:[curl.packages.vms] and then issuing
+either the command:
+
+ $ @pcsi_product_gnv_curl.com
+
+or
+
+ $ @build_gnv_curl.com.
+
+The GNV configure procedure takes considerably longer than the DCL build
+procecure takes. It is of use for testing the GNV build environment, and
+may not have been kept up to date.
+
+The pcsi_product_gnv_curl.com needs the following logical names which
+are described in the section below:
+
+ gnv_pcsi_producer
+ gnv_pcsi_producer_full_name
+ stage_root
+ vms_root1 (Optional if vms_root is on a NFS volume)
+ src_root1 (Optional if src_root is on a NFS volume)
+
+The pcsi_product_gnv_curl.com is described in more detail below. It does
+the following steps. The build steps are only done if they are needed to
+allow using either DCL or GNV based building procedures.
+
+ $ @build_vms list
+
+ $ @gnv_link_curl.com
+
+ $ @build_gnv_curl_release_notes.com
+
+ $ @backup_gnv_curl_src.com
+
+ $ @build_gnv_curl_pcsi_desc.com
+
+ $ @build_gnv_curl_pcsi_text.com
+
+ $ @stage_curl_install remove
+ $ @stage_curl_install
+
+ Then builds the kit.
+
+The build_gnv_curl.com command procedure does the following:
+
+ $ @setup_gnv_curl_build.com
+
+ $ bash gnv_curl_configure.sh
+
+ $ @clean_gnv_curl.com
+
+ $ bash make_gnv_curl_install.sh
+
+ $ @gnv_link_curl.com
+
+ $ @stage_curl_install.com
+
+ $ purge new_gnu:[*...]/log
+
+To clean up after a GNV based build to start over, the following commands are
+used:
+
+ $ bash
+ bash$ cd ../..
+ bash$ make clean
+ bash$ exit
+
+Then run the @clean_gnv_curl.com. Use the parameter "realclean" if you are
+going to run the setup_gnv_curl_build.com and configure script again.
+
+ $ @clean_gnv_curl.com realclean
+
+If new public symbols have been added, adjust the file gnv_libcurl_symbols.opt
+to have the new symbols. If the symbols are longer than 32 characters,
+then they will need to have the original be exact case CRC shortened and
+an alias in upper case with CRC shortened, in addition to having an exact
+case truncated alias and an uppercase truncated alias.
+
+The *.EXE files are not moved to the new_gnu: directory.
+
+After you are satisfied with the results of your build, you can move the
+files from new_gnu: to old_gnu: at your convenience.
+
+Building a PCSI kit for an archictecture takes the following steps after
+making sure that you have a working build environment.
+
+Note that it requires manually creating two logical names as described
+below. It is intentional that they be manually set. This is for
+branding the PCSI kit based on who is making the kit.
+
+ 1. Make sure that you have a staging directory that can be referenced
+ by the path STAGE_ROOT:[KIT]
+
+ 2. Edit the file curl_release_note_start.txt or other text files to
+ reflect any changes.
+
+ 3. Define the logical name GNV_PCSI_PRODUCER to indicate who is making
+ the distribution. For making updates to an existing open source
+ kit you may need to keep the producer the same.
+
+ 4. Define the logical name GNV_PCSI_PRODUCER_FULL_NAME to be your full
+ name or full name of your company.
+
+ 5. If you are producing an update kit, then update the file
+ vms_eco_level.h by changing the value for the VMS_ECO_LEVEL macro.
+ This file is currently only used in building the PCSI kit.
+
+ 6. Edit the file PCSI_GNV_CURL_FILE_LIST.TXT if there are new files added
+ to the kit. These files should all be ODS-2 legal filenames and
+ directories.
+
+ A limitation of the PCSI kitting procedure is that when selecting files,
+ it tends to ignore the directory structure and assumes that all files
+ with the same name are the same file, so every file placed in the kit
+ must have a unique name. Then a procedure needs to be added to the kit
+ to create an alias link on install and remove the link on remove.
+
+ Since at this time curl does not need this alias procedure, the steps
+ to automatically build it are not included here.
+
+ While newer versions of PCSI can support ODS-5 filenames, not all verions
+ of PCSI on systems that have ODS-5 filenames do. So as a post install
+ step, the PCSI kit built by these steps does a rename to the correct
+ case as a post install step.
+
+ 7. Edit the build_curl_pcsi_desc.com and build_curl_pcsi_text.com if you
+ have changed the version of ZLIB that curl is built against.
+
+ 8. Prepare to backup the files for building the kit.
+
+ Note that if src_root: or vms_root: are NFS mounted disks, the
+ step of backing up the source files will probably hang or fail.
+
+ You need to copy the source files to VMS mounted disks and create
+ logical names SRC_ROOT1 and VMS_ROOT1 to work around this to to
+ reference local disks. Make sure src_root1:[000000] and
+ vms_root1:[000000] exist and can be written to.
+
+ The command procedure compare_curl_source can be used to check
+ those directories and keep them up to date.
+
+ @compare_curl_source.com SRCBCK UPDATE
+
+ This compares the reference project source with the backup
+ staging directory for it and updates with any changes.
+
+ @compare_curl_source.com VMSBCK UPDATE
+
+ This compares the VMS specific source with the backup
+ staging directory for it and updates with any changes.
+
+ Leave off "UPDATE" to just check without doing any changes.
+
+ If you are not using NFS mounted disks and do not want to have a
+ separate directory for staging the sources for backup make sure
+ that src_root1: and vms_root1: do not exist.
+
+ 9. Build the PCSI kit with @pcsi_product_gnv_curl.com
+
+ The following message is normal:
+ %PCSI-I-CANNOTVAL, cannot validate
+ EAGLE$DQA0:[stage_root.][kit]VMSPORTS-AXPVMS-CURL-V0731-0-1.PCSI;1
+ -PCSI-I-NOTSIGNED, product kit is not signed and therefore has
+ no manifest file
+
+ This will result in an uncompressed kit for the target platform.
+ On Alpha and Integrity, the pcsi_product_gnv_curl.com can be used with
+ the "COMPRESSED" parameter to build both a compressed and uncompressed
+ kits.
+
+Good Luck.
diff --git a/packages/vms/curl_release_note_start.txt b/packages/vms/curl_release_note_start.txt
new file mode 100644
index 0000000..977dce1
--- /dev/null
+++ b/packages/vms/curl_release_note_start.txt
@@ -0,0 +1,77 @@
+From file: CURL_RELEASE_NOTE_START.TXT
+
+Note: These kits are produced by a hobbyist and are providing any support
+or any commitment to supply bug fixes or future releases. This code is
+as-is with no warrantees.
+
+The testing of this build of curl was minimal and involved building some of
+the sample and test programs, accessing a public HTTPS: website, doing a
+form post of some VMS test files, and FTP upload of some text files.
+
+Due to the way that PCSI identifies packages, if you install a package from
+one producer and then want to upgrade it from another producer, you will
+probably need to uninstall the previous package first.
+
+OpenVMS specific building and kitting instructions are after the standard
+curl readme file.
+
+This product may be available for your platform in a PCSI kit. The source kit
+contains files for building CURL using GNV or with a DCL procedure.
+
+The GNV based build creates a libcurl share imaged which is supplied in the
+PCSI kit.
+
+This version of CURL will return VMS compatible status codes when run from
+DCL and Unix compatible exit codes and messages when run with the SHELL
+environment variable set.
+
+This port of Curl uses the OpenSSL, Ldap, and Kerberos V5 that are bundled
+with OpenVMS or supplied as updates by HP. Ldap and Kerberos are not available
+on the VAX platform. See section below for a special note about HP OpenSSL
+on Alpha and IA64.
+
+The supplied CURL_STARTUP.COM procedure that is installed in
+[VMS$COMMON.SYS$STARTUP] can be put in your VMS startup procedure to install
+the GNV$LIBCURL shared image and create logical names GNV$LIBCURL to reference
+it. It will create the GNV$CURL_INCLUDE logical name for build procedures
+to access the header files.
+
+Normally to use curl from DCL, just create a foreign command as:
+ curl :== $gnv$gnu:[usr.bin]gnv$curl.exe
+
+If you need to work around having the older HP SSL kit installed, then
+for DCL create this command procedure:
+
+ $ create/dir gnv$gnu:[vms_bin]/prot=w:re
+ $ create gnv$gnu:[vms_bin]curl.com
+ $ curl := $gnv$gnu:[usr.bin]gnv$curl.exe
+ $ define/user ssl$libcrypto_shr32 gnv$curl_ssl_libcryptoshr32
+ $ curl "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" "''p7'" "''p8'"
+ ^Z
+
+Then you can use: curl :== @gnv$gnu:[vms_bin]curl.com to run curl.
+
+For the HP SSL work around to work for GNV do the following:
+ $ create/dir gnv$gnu:[usr.local.bin]/prot=w:re
+ $ create gnv$gnu:[usr.local.bin]curl.
+ #! /bin/sh
+ dcl @gnv\$gnu:[vms_bin]curl.com $*
+ ^Z
+
+Similar work arounds will be needed for any program linked with GNV$LIBCURL
+until the HP OpenSSL is upgraded to the current 1.4 version or later.
+
+If you are installing a "daily" build instead of a release build of Curl, some
+things have been changed so that it can be installed at the same time as
+a production build with out conflicts.
+
+ The CURL_DAILY_STARTUP.COM will be supplied instead of CURL_STARTUP.COM.
+ This file is actually not used with the daily package and is provided as
+ a preview of what the next CURL_STARTUP.COM will be for the next release.
+ Do not run it.
+
+ The files that are normally installed in [VMS$COMMON.GNV.usr], for the
+ daily build are installed in [VMS$COMMON.GNV.beta] directory.
+
+ To use the daily GNV$LIBCURL image, you will need to define the logical
+ name GNV$LIBCURL to the image.
diff --git a/packages/vms/curl_startup.com b/packages/vms/curl_startup.com
new file mode 100644
index 0000000..84760a0
--- /dev/null
+++ b/packages/vms/curl_startup.com
@@ -0,0 +1,100 @@
+$! File: curl_Startup.com
+$!
+$! $Id$
+$!
+$! Procedure to setup the CURL libraries for use by programs from the
+$! VMS SYSTARTUP*.COM procedure.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 15-Jun-2009 J. Malmberg
+$! 30-Jul-2013 J. Malmberg Update for Curl 7.32
+$!========================================================================
+$!
+$!
+$! GNV$GNU if needed.
+$ if f$trnlnm("GNV$GNU") .eqs. ""
+$ then
+$ x = f$trnlnm("GNU","LNM$SYSTEM_TABLE")
+$ if x .eqs. ""
+$ then
+$ write sys$output "GNV must be started up before this procedure.
+$ exit 44
+$ endif
+$ define/system/exec/trans=conc GNV$GNU 'x'
+$ endif
+$!
+$!
+$ myproc = f$environment("procedure")
+$!
+$! ZLIB needed.
+$ if f$trnlnm("GNV$LIBZSHR32") .eqs. ""
+$ then
+$ zlib_startup = f$parse("gnv$zlib_startup.com;0", myproc,,,)
+$ if f$search(zlib_startup) .nes. ""
+$ then
+$ @'zlib_startup
+$ else
+$ write sys$output "ZLIB package not found and is required."
+$ exit 44
+$ endif
+$ endif
+$!
+$!
+$ curl_ssl_libcrypto32 = ""
+$ curl_ssl_libssl32 = ""
+$ gnv_ssl_libcrypto32 = "gnv$gnu:[lib]ssl$libcrypto_shr32.exe"
+$ gnv_ssl_libssl32 = "gnv$gnu:[lib]ssl$libssl_shr32.exe"
+$ if f$search(gnv_ssl_libcrypto32) .nes. ""
+$ then
+$ curl_ssl_libcrypto32 = gnv_ssl_libcrypto32
+$ curl_ssl_libssl32 = gnv_ssl_libssl32
+$ else
+$ hp_ssl_libcrypto32 = "sys$share:ssl$libcrypto_shr32.exe"
+$ hp_ssl_libssl32 = "sys$share:ssl$libssl_shr32.exe"
+$ if f$search(hp_ssl_libcrypto32) .nes. ""
+$ then
+$ curl_ssl_libcrypto32 = hp_ssl_libcrypto32
+$ curl_ssl_libssl32 = hp_ssl_libssl32
+$ else
+$ write sys$output "HP SSL package not found and is required."
+$ endif
+$ endif
+$!
+$ define/system/exec gnv$curl_ssl_libcryptoshr32 'curl_ssl_libcrypto32'
+$ define/system/exec gnv$curl_ssl_libsslshr32 'curl_ssl_libssl32'
+$!
+$!
+$! CURL setup
+$ define/system/exec gnv$libcurl gnv$gnu:[usr.lib]GNV$LIBCURL.EXE
+$ define/system/exec gnv$curl_include gnv$gnu:[usr.include.curl]
+$ if .not. f$file_attributes("gnv$libcurl", "known")
+$ then
+$ install ADD gnv$libcurl/OPEN/SHARE/HEADER
+$ else
+$ install REPLACE gnv$libcurl/OPEN/SHARE/HEADER
+$ endif
+$!
+$!
+$ curl_exe = "gnv$gnu:[usr.bin]gnv$curl.exe"
+$ if .not. f$file_attributes(curl_exe, "known")
+$ then
+$ install ADD 'curl_exe'/OPEN/SHARE/HEADER
+$ else
+$ install REPLACE 'curl_exe'/OPEN/SHARE/HEADER
+$ endif
+$!
+$all_exit:
+$ exit
diff --git a/packages/vms/curlmsg.h b/packages/vms/curlmsg.h
index 32f335f..0473be6 100644
--- a/packages/vms/curlmsg.h
+++ b/packages/vms/curlmsg.h
@@ -1,5 +1,26 @@
#ifndef HEADER_CURLMSG_H
#define HEADER_CURLMSG_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
#pragma __member_alignment __save
#pragma __nomember_alignment
diff --git a/packages/vms/curlmsg_vms.h b/packages/vms/curlmsg_vms.h
index e99e88c..3976973 100644
--- a/packages/vms/curlmsg_vms.h
+++ b/packages/vms/curlmsg_vms.h
@@ -1,5 +1,26 @@
#ifndef HEADER_CURLMSG_VMS_H
#define HEADER_CURLMSG_VMS_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
/* */
/* CURLMSG_VMS.H */
diff --git a/packages/vms/generate_config_vms_h_curl.com b/packages/vms/generate_config_vms_h_curl.com
new file mode 100644
index 0000000..90a83d5
--- /dev/null
+++ b/packages/vms/generate_config_vms_h_curl.com
@@ -0,0 +1,484 @@
+$! File: GENERATE_CONFIG_H_CURL.COM
+$!
+$! $Id$
+$!
+$! Curl like most open source products uses a variant of a config.h file.
+$! Depending on the curl version, this could be config.h or curl_config.h.
+$!
+$! For GNV based builds, the configure script is run and that produces
+$! a [curl_]config.h file. Configure scripts on VMS generally do not
+$! know how to do everything, so there is also a [-.lib]config-vms.h file
+$! that has VMS specific code that compensates for bugs in some of the
+$! VMS shared images.
+$!
+$! This generates a [curl_]config.h file and also a config_vms.h file,
+$! which is used to supplement that file. Note that the config_vms.h file
+$! and the [.lib]config-vms.h file do two different tasks and that the
+$! filenames are slightly different.
+$!
+$!
+$! Copyright 2013, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 06-Jan-2013 J. Malmberg
+$!
+$!=========================================================================
+$!
+$! Allow arguments to be grouped together with comma or separated by spaces
+$! Do no know if we will need more than 8.
+$args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
+$args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
+$!
+$! Provide lower case version to simplify parsing.
+$args_lower = f$edit(args, "LOWERCASE")
+$!
+$args_len = f$length(args)
+$!
+$if (f$getsyi("HW_MODEL") .lt. 1024)
+$then
+$ arch_name = "VAX"
+$else
+$ arch_name = ""
+$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$ if (arch_name .eqs. "") then arch_name = "UNK"
+$endif
+$!
+$!
+$nossl = 0
+$nohpssl = 1
+$hpssl = 0
+$libidn = 0
+$libssh2 = 0
+$noldap = 0
+$nozlib = 0
+$nokerberos = 0
+$!
+$! First check to see if SSL is disabled.
+$!---------------------------------------
+$if f$locate(",nossl,", args_lower) .lt. args_len then nossl = 1
+$if .not. nossl
+$then
+$!
+$! ssl$* logicals means HP ssl is present
+$!----------------------------------------
+$ if f$trnlnm("ssl$root") .nes. ""
+$ then
+$ nohpssl = 0
+$ hpssl = 1
+$ endif
+$!
+$! HP defines OPENSSL as SSL$INCLUDE as a convenience for linking.
+$! As it is a violation of VMS standards for this to be provided,
+$! some sites may have removed it, but if present, assume that
+$! it indicates which OpenSSL to use.
+$!------------------------------------
+$ openssl_lnm = f$trnlnm("OPENSSL")
+$ if (openssl_lnm .nes. "SYS$INCLUDE")
+$ then
+$! Non HP SSL is installed, default to use it.
+$ nohpssl = 1
+$ hpssl = 0
+$ endif
+$!
+$! Now check to see if hpssl has been specifically disabled
+$!----------------------------------------------------------
+$ if f$locate(",nohpssl,", args_lower) .lt. args_len
+$ then
+$ nohpssl = 1
+$ hpssl = 0
+$ endif
+$!
+$! Finally check to see if hp ssl has been specifically included.
+$!----------------------------------------------------------------
+$ if f$locate(",nohpssl,", args_lower) .lt. args_len
+$ then
+$ nohpssl = 1
+$ hpssl = 0
+$ endif
+$endif
+$!
+$! Did someone port LIBIDN in the GNV compatible way?
+$!------------------------------------------------------
+$if f$trnlnm("GNV$LIBIDNSHR") .nes. ""
+$then
+$ write sys$output "NOTICE: A LIBIDN port has been detected."
+$ write sys$output " This port of curl for VMS has not been tested with it."
+$ if f$locate(",libidn,", args_lower) .lt. args_len
+$ then
+$ libidn = 1
+$ endif
+$ if .not. libidn
+$ then
+$ write sys$output " LIBIDN support is not enabled."
+$ write sys$output "Run with the ""libidn"" parameter to attempt to use."
+$ else
+$ write sys$output " Untested LIBIDN support requested."
+$ endif
+$endif
+$!
+$! Did someone port LIBSSH2 in the GNV compatible way?
+$!------------------------------------------------------
+$if f$trnlnm("GNV$LIBSSH2SHR") .nes. ""
+$then
+$ write sys$output "NOTICE: A LIBSSH2 port has been detected."
+$ write sys$output " This port of curl for VMS has not been tested with it."
+$ if f$locate(",libssh2,", args_lower) .lt. args_len
+$ then
+$ libssh2 = 1
+$ endif
+$ if .not. libssh2
+$ then
+$ write sys$output " LIBSSH2 support is not enabled."
+$ write sys$output "Run with the ""libssh2"" parameter to attempt to use."
+$ else
+$ write sys$output " Untested LIBSSH2 support requested."
+$ endif
+$endif
+$!
+$! LDAP suppressed?
+$if f$locate(",noldap,", args_lower) .lt. args_len
+$then
+$ noldap = 1
+$endif
+$if f$search("SYS$SHARE:LDAP$SHR.EXE") .eqs. ""
+$then
+$ noldap = 1
+$endif
+$!
+$if f$locate(",nokerberos,", args_lower) .lt. args_len then nokerberos = 1
+$if .not. nokerberos
+$then
+$! If kerberos is installed: sys$share:gss$rtl.exe exists.
+$ if f$search("sys$shsare:gss$rtl.exe") .eqs. ""
+$ then
+$ nokerberos = 1
+$ endif
+$endif
+$!
+$!
+$! Is GNV compatible LIBZ present?
+$!------------------------------------------------------
+$if f$trnlnm("GNV$LIBZSHR") .nes. ""
+$then
+$ if f$locate(",nozlib,", args_lower) .lt. args_len
+$ then
+$ nozlib = 1
+$ endif
+$! if .not. nozlib
+$! then
+$! write sys$output " GNV$LIBZSHR support is enabled."
+$! else
+$! write sys$output " GNV$LIBZSHR support is disabled by nozlib."
+$! endif
+$else
+$ nozlib = 1
+$endif
+$!
+$!
+$! Start the configuration file.
+$! Need to do a create and then an append to make the file have the
+$! typical file attributes of a VMS text file.
+$create sys$disk:[curl.lib]config_vms.h
+$open/append cvh sys$disk:[curl.lib]config_vms.h
+$!
+$! Write the defines to prevent multiple includes.
+$! These are probably not needed in this case,
+$! but are best practice to put on all header files.
+$write cvh "#ifndef __CONFIG_VMS_H__"
+$write cvh "#define __CONFIG_VMS_H__"
+$write cvh ""
+$write cvh "/* Define cpu-machine-OS */"
+$!
+$! Curl uses an OS macro to set the build environment.
+$!----------------------------------------------------
+$! Now the DCL builds usually say xxx-HP-VMS and configure scripts
+$! may put DEC or COMPAQ or HP for the middle part.
+$!
+$write cvh "#if defined(__alpha)"
+$write cvh "#define OS ""ALPHA-HP-VMS"""
+$write cvh "#elif defined(__vax)"
+$write cvh "#define OS ""VAX-HP-VMS"""
+$write cvh "#elif defined(__ia64)"
+$write cvh "#define OS ""IA64-HP-VMS""
+$write cvh "#else"
+$write cvh "#define OS ""UNKNOWN-HP-VMS""
+$write cvh "#endif"
+$write cvh ""
+$!
+$! We are now setting this on the GNV build, so also do this
+$! for compatibility.
+$write cvh "/* Location of default ca path */"
+$write cvh "#define curl_ca_path ""gnv$curl_ca_path"""
+$!
+$! NTLM_WB_ENABLED requires fork() but configure does not know this
+$! We have to disble this in th configure command line.
+$! config_h.com finds that configure defaults to it being enabled so
+$! reports it. So we need to turn it off here.
+$!
+$write cvh "#ifdef NTLM_WB_ENABLED"
+$write cvh "#undef NTLM_WB_ENABLED"
+$write cvh "#endif"
+$!
+$! The config_h.com finds a bunch of default disable commands in
+$! configure and will incorrectly disable these options. The config_h.com
+$! is a generic procedure and it would break more things to try to fix it
+$! to special case it for curl. So we will fix it here.
+$!
+$! We do them all here, even the ones that config_h.com currently gets correct.
+$!
+$write cvh "#ifdef CURL_DISABLE_COOKIES"
+$write cvh "#undef CURL_DISABLE_COOKIES"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_CRYPTO_AUTH"
+$write cvh "#undef CURL_DISABLE_CRYPTO_AUTH"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_DICT"
+$write cvh "#undef CURL_DISABLE_DICT"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_FILE"
+$write cvh "#undef CURL_DISABLE_FILE"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_FTP"
+$write cvh "#undef CURL_DISABLE_FTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_GOPHER"
+$write cvh "#undef CURL_DISABLE_GOPHER"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_HTTP"
+$write cvh "#undef CURL_DISABLE_HTTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_IMAP"
+$write cvh "#undef CURL_DISABLE_IMAP"
+$write cvh "#endif"
+$if .not. noldap
+$then
+$ write cvh "#ifdef CURL_DISABLE_LDAP"
+$ write cvh "#undef CURL_DISABLE_LDAP"
+$ write cvh "#endif"
+$ if .not. nossl
+$ then
+$ write cvh "#ifdef CURL_DISABLE_LDAPS"
+$ write cvh "#undef CURL_DISABLE_LDAPS"
+$ write cvh "#endif"
+$ endif
+$endif
+$write cvh "#ifdef CURL_DISABLE_LIBCURL_OPTION"
+$write cvh "#undef CURL_DISABLE_LIBCURL_OPTION"
+$write cvh "#endif"
+$write cvh "#ifndef __VAX"
+$write cvh "#ifdef CURL_DISABLE_NTLM"
+$write cvh "#undef CURL_DISABLE_NTLM"
+$write cvh "#endif"
+$write cvh "#else"
+$! NTLM needs long long or int64 support, missing from DECC C.
+$write cvh "#ifdef __DECC
+$write cvh "#ifndef CURL_DISABLE_NTLM"
+$write cvh "#define CURL_DISABLE_NTLM 1"
+$write cvh "#endif"
+$write cvh "#endif"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_POP3"
+$write cvh "#undef CURL_DISABLE_POP3"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_PROXY"
+$write cvh "#undef CURL_DISABLE_PROXY"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_RTSP"
+$write cvh "#undef CURL_DISABLE_RTSP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_SMTP"
+$write cvh "#undef CURL_DISABLE_SMTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_TELNET"
+$write cvh "#undef CURL_DISABLE_TELNET"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_TFTP"
+$write cvh "#undef CURL_DISABLE_TFTP"
+$write cvh "#endif"
+$write cvh "#ifdef CURL_DISABLE_POP3"
+$write cvh "#undef CURL_DISABLE_POP3"
+$write cvh "#endif"
+$if .not. nossl
+$then
+$ write cvh "#ifdef CURL_DISABLE_TLS_SRP"
+$ write cvh "#undef CURL_DISABLE_TLS_SRP"
+$ write cvh "#endif"
+$!
+$endif
+$write cvh "#ifdef CURL_DISABLE_VERBOSE_STRINGS"
+$write cvh "#undef CURL_DISABLE_VERBOSE_STRINGS"
+$write cvh "#endif"
+$!
+$! configure defaults to USE_*, a real configure on VMS chooses different.
+$write cvh "#ifdef USE_ARES"
+$write cvh "#undef USE_ARES"
+$write cvh "#endif"
+$write cvh "#ifdef USE_AXTLS"
+$write cvh "#undef USE_AXTLS"
+$write cvh "#endif"
+$write cvh "#ifdef USE_CYASSL"
+$write cvh "#undef USE_CYASSL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_DARWINSSL"
+$write cvh "#undef USE_DARWINSSL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_GNUTLS"
+$write cvh "#undef USE_GNUTLS"
+$write cvh "#endif"
+$write cvh "#ifdef USE_GNUTLS_NETTLE"
+$write cvh "#undef USE_GNUTLS_NETTLE"
+$write cvh "#endif"
+$write cvh "#ifdef USE_LIBRTMP"
+$write cvh "#undef USE_LIBRTMP"
+$write cvh "#endif"
+$write cvh "#ifdef USE_MANUAL"
+$write cvh "#undef USE_MANUAL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_NGHTTP2"
+$write cvh "#undef USE_NGHTTP2"
+$write cvh "#endif"
+$write cvh "#ifdef USE_NSS"
+$write cvh "#undef USE_NSS"
+$write cvh "#endif"
+$write cvh "#ifdef USE_OPENLDAP"
+$write cvh "#undef USE_OPENLDAP"
+$write cvh "#endif"
+$write cvh "#ifdef USE_POLARSSL"
+$write cvh "#undef USE_POLARSSL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_SCHANNEL"
+$write cvh "#undef USE_SCHANNEL"
+$write cvh "#endif"
+$write cvh "#ifdef USE_THREADS_POSIX"
+$write cvh "#undef USE_THREADS_POSIX"
+$write cvh "#endif"
+$write cvh "#ifdef USE_TLS_SRP"
+$write cvh "#undef USE_TLS_SRP"
+$write cvh "#endif"
+$write cvh "#ifdef USE_UNIX_SOCKETS"
+$write cvh "#undef USE_UNIX_SOCKETS"
+$write cvh "#endif"
+$write cvh "#ifdef USE_WINDOWS_SSPI"
+$write cvh "#undef USE_WINDOWS_SSPI"
+$write cvh "#endif"
+$!
+$write cvh "#ifndef HAVE_OLD_GSSMIT"
+$write cvh "#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE"
+$write cvh "#endif"
+$!
+$!
+$! Note:
+$! The CURL_EXTERN_SYMBOL is used for platforms that need the compiler
+$! to know about universal symbols. VMS does not need this support so
+$! we do not set it here.
+$!
+$!
+$! I can not figure out where the C compiler is finding the ALLOCA.H file
+$! in the text libraries, so CONFIG_H.COM can not find it either.
+$! Usually the header file name is the module name in the text library.
+$! It does not appear to hurt anything to not find header file, so we
+$! are not overriding it here.
+$!
+$!
+$! Check to see if OpenSSL is present.
+$!----------------------------------
+$ssl_include = f$trnlnm("OPENSSL")
+$if ssl_include .eqs. ""
+$then
+$ ssl_include = f$trnlnm("ssl$include")
+$endif
+$if ssl_include .eqs. "" then nossl = 1
+$!
+$if .not. nossl
+$then
+$!
+$ write cvh "#ifndef USE_OPENSSL"
+$ write cvh "#define USE_OPENSSL 1"
+$ write cvh "#endif"
+$ write cvh "#ifndef USE_SSLEAY"
+$ write cvh "#define USE_SSLEAY 1"
+$ write cvh "#endif"
+$ if arch_name .eqs. "VAX"
+$ then
+$ old_mes = f$enviroment("message")
+$ set message/notext/nofaci/noseve/noident
+$ search/output=nla0: ssl$include:*.h CONF_MFLAGS_IGNORE_MISSING_FILE
+$ status = $severity
+$ set message'old_mes'
+$ if status .nes. "1"
+$ then
+$ write cvh "#define VMS_OLD_SSL 1"
+$ endif
+$ endif
+$endif
+$!
+$!
+$! LibIDN not ported to VMS at this time.
+$! This is for international domain name support.
+$! Allow explicit experimentation.
+$if libidn
+$then
+$ write cvh "#define HAVE_IDNA_STRERROR 1"
+$ write cvh "#define HAVE_IDNA_FREE 1"
+$ write cvh "#define HAVE_IDNA_FREE_H 1"
+$ write cvh "#define HAVE_LIBIDN 1"
+$else
+$ write cvh "#ifdef HAVE_LIBIDN"
+$ write cvh "#undef HAVE_LIBIDN"
+$ write cvh "#endif"
+$endif
+$!
+$!
+$! LibSSH2 not ported to VMS at this time.
+$! Allow explicit experimentation.
+$if libssh2
+$then
+$ write cvh "#define HAVE_LIBSSH2_EXIT 1"
+$ write cvh "#define HAVE_LIBSSH2_H 1"
+$ write cvh "#define HAVE_LIBSSH2_INIT 1"
+$ write cvh "#define HAVE_LIBSSH2_SCP_SEND64 1"
+$ write cvh "#define HAVE_LIBSSH2_SESSION_HANDSHAKE 1"
+$ write cvh "#define HAVE_LIBSSH2_VERSION 1
+$ write cvh "#define HAVE_LIBSSH2 1
+$!
+$ write cvh "#ifndef USE_LIBSSH2"
+$ write cvh "#define USE_LIBSSH2 1"
+$ write cvh "#endif"
+$else
+$ write cvh "#ifdef USE_LIBSSH2"
+$ write cvh "#undef USE_LIBSSH2"
+$ write cvh "#endif"
+$endif
+$!
+$!
+$!
+$if .not. nozlib
+$then
+$ write cvh "#define HAVE_LIBZ 1"
+$ write cvh "#define HAVE_ZLIB_H 1"
+$endif
+$!
+$!
+$! Suppress a message in curl_gssapi.c compile.
+$write cvh "#pragma message disable notconstqual"
+$!
+$! Close out the file
+$!
+$write cvh ""
+$write cvh "#endif /* __CONFIG_VMS_H__ */"
+$close cvh
+$!
+$all_exit:
+$exit
diff --git a/packages/vms/generate_vax_transfer.com b/packages/vms/generate_vax_transfer.com
new file mode 100644
index 0000000..115db8a
--- /dev/null
+++ b/packages/vms/generate_vax_transfer.com
@@ -0,0 +1,274 @@
+$! File: generate_vax_transfer.com
+$!
+$! $Id$
+$!
+$! File to generate and compile the VAX transfer vectors from reading in the
+$! Alpha/Itanium gnv_libcurl_symbols.opt file.
+$!
+$! This procedure patches the VAX Macro32 assembler to be case sensitive
+$! and then compiles the generated
+$!
+$! The output of this procedure is:
+$! gnv_libcurl_xfer.mar_exact
+$! gnv_libcurl_xfer.obj
+$! gnv_libcurl_xfer.opt
+$! macro32_exactcase.exe
+$!
+$! Copyright 2013, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 20-Jul-2013 J. Malmberg
+$!============================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$!
+$ on warning then goto all_exit
+$!
+$! Want hard tabs in the generated file.
+$ tab[0,8] = 9
+$!
+$! This procedure is used on VAX only
+$ if (f$getsyi("HW_MODEL") .ge. 1024)
+$ then
+$ write sys$output "This procedure is only used on VAX."
+$ goto all_exit
+$ endif
+$!
+$!
+$! Get the libcurl version to generate the ident string.
+$! ident string is max of 31 characters.
+$!
+$ ident_string = "unknown"
+$ open/read cver [-.-.include.curl]curlver.h
+$cver_loop:
+$ read/end=cver_loop_end cver line_in
+$ line_in = f$edit(line_in, "COMPRESS,TRIM")
+$ if line_in .eqs. "" then goto cver_loop
+$ code = f$extract(0, 1, line_in)
+$ if code .nes. "#" then goto cver_loop
+$ directive = f$element(0, " ", line_in)
+$ if directive .nes. "#define" then goto cver_loop
+$ name = f$element(1, " ", line_in)
+$ if name .nes. "LIBCURL_VERSION" then goto cver_loop
+$ ident_string = f$element(2, " ", line_in) - "" - ""
+$cver_loop_end:
+$ close cver
+$!
+$ open/read aopt gnv_libcurl_symbols.opt
+$!
+$! Write out the header
+$ gosub do_header
+$!
+$ open/append vopt gnv_libcurl_xfer.mar_exact
+$ write vopt tab,".IDENT /", ident_string, "/"
+$!
+$ write vopt tab, ".PSECT LIBCURL_XFERVECTORS -"
+$ write vopt tab,tab,tab, "PIC,USR,CON,REL,GBL,SHR,EXE,RD,NOWRT,QUAD"
+$ write vopt ""
+$ write vopt tab, "SPARE", tab, "; never delete this spare"
+$ write vopt ";"
+$ write vopt ";", tab, "Exact case and upper case transfer vectors"
+$!
+$ alias_count = 0
+$vector_loop:
+$!
+$! Read in symbol_vector
+$!
+$ read/end=vector_loop_end aopt line_in
+$ line = f$edit(line_in, "UNCOMMENT,COMPRESS,TRIM")
+$ if line .eqs. "" then goto vector_loop
+$!
+$ line_u = f$edit(line, "UPCASE")
+$ key = f$element(0, "=", line_u)
+$ if (key .eqs. "SYMBOL_VECTOR")
+$ then
+$ symbol_string = f$element(1, "=", line) - "("
+$ symbol_type = f$element(2, "=", line_u) - ")"
+$ symbol_name = f$element(1, "/", symbol_string)
+$ if symbol_type .nes. "PROCEDURE"
+$ then
+$ write sys$output "%CURLBUILD-W-NOTPROC, " + -
+$ "This procedure can only handle procedure vectors"
+$ write sys$output -
+"Data vectors require manual construction for which this procedure or"
+$ write sys$output -
+"the shared library needs to be updated to resolve."
+$ write sys$output -
+"the preferred solution is to have a procedure return the address of the "
+$ write sys$output -
+"the variable instead of having a variable, as if the size of the variable "
+ write sys$output -
+"changes, the symbol vector is no longer backwards compatible."
+$ endif
+$ if (symbol_name .eqs. "/")
+$ then
+$ symbol_name = symbol_string
+$ write vopt tab, symbol_type, tab, symbol_name
+$ else
+$ alias_count = alias_count + 1
+$ symbol_alias = f$element(0, "/", symbol_string)
+$ write vopt -
+ tab, "''symbol_type_U", tab, symbol_name, tab, symbol_alias
+$ endif
+$ endif
+$ goto vector_loop
+$vector_loop_end:
+$!
+$! End of pass one, second pass needed if aliases exist
+$ close aopt
+$!
+$ if alias_count .eq. 0 then goto finish_file
+$!
+$! Start pass 2, write stub routine header
+$!
+$ open/read aopt gnv_libcurl_symbols.opt
+$!
+$alias_loop:
+$!
+$! Read in symbol_vector
+$!
+$ read/end=alias_loop_end aopt line_in
+$ line = f$edit(line_in, "UNCOMMENT,COMPRESS,TRIM")
+$ if line .eqs. "" then goto alias_loop
+$!
+$ line_u = f$edit(line, "UPCASE")
+$ key = f$element(0, "=", line_u)
+$ if (key .eqs. "SYMBOL_VECTOR")
+$ then
+$ symbol_string = f$element(1, "=", line) - "("
+$ symbol_type = f$element(2, "=", line_u) - ")"
+$ symbol_name = f$element(1, "/", symbol_string)
+$ if (symbol_name .eqs. "/")
+$ then
+$ symbol_name = symbol_string
+$ else
+$ alias_count = alias_count + 1
+$ symbol_alias = f$element(0, "/", symbol_string)
+$ write vopt tab, ".ENTRY", tab, symbol_alias, ", ^M<>"
+$ endif
+$ endif
+$ goto alias_loop
+$! read in symbol_vector
+$! if not alias, then loop
+$! write out subroutine name
+$!
+$alias_loop_end:
+$!
+$ write vopt tab, "MOVL #1, R0"
+$ write vopt tab, "RET"
+$!
+$finish_file:
+$!
+$ write vopt ""
+$ write vopt tab, ".END"
+$!
+$ close aopt
+$ close vopt
+$!
+$! Patch the Macro32 compiler
+$!----------------------------
+$ patched_macro = "sys$disk:[]macro32_exactcase.exe"
+$ if f$search(patched_macro) .eqs. ""
+$ then
+$ copy sys$system:macro32.exe 'patched_macro'
+$ patch @macro32_exactcase.patch
+$ endif
+$ define/user macro32 'patched_macro'
+$ macro/object=gnv_libcurl_xfer.obj gnv_libcurl_xfer.mar_exact
+$!
+$! Create the option file for linking the shared image.
+$ create gnv_libcurl_xfer.opt
+$ open/append lco gnv_libcurl_xfer.opt
+$ write lco "gsmatch=lequal,1,1"
+$ write lco "cluster=transfer_vector,,,''default_dir'gnv_libcurl_xfer"
+$ write lco "collect=libcurl_global, libcurl_xfervectors"
+$ close lco
+$!
+$!
+$ goto all_exit
+$!
+$! Process the header
+$do_header:
+$!
+$! Force the mode of the file to same as text editor generated.
+$ create gnv_libcurl_xfer.mar_exact
+$deck
+; File: gnv_libcurl_xfer.mar_exact
+;
+; VAX transfer vectors
+;
+; This needs to be compiled with a specialized patch on Macro32 to make it
+; preserve the case of symbols instead of converting it to uppercase.
+;
+; This patched Macro32 requires all directives to be in upper case.
+;
+; There are three sets of symbols for transfer vectors here.
+;
+; The first for upper case which matches the tradition method of generating
+; VAX transfer vectors.
+;
+; The second is the exact case for compatibilty with open source C programs
+; that expect exact case symbols in images. These are separated because a
+; previous kit had only upper case symbols.
+;
+; The third is the routine stub that is used to resolve part of the upper
+; case transfer vectors, with exact case entry symbols.
+;
+; When you add routines, you need to add them after the second set of transfer
+; vectors for both upper and exact case, and then additional entry points
+; in upper case added to stub routines.
+;
+;*************************************************************************
+
+ .TITLE libcurl_xfer - Transfer vector for libcurl
+ .DISABLE GLOBAL
+
+;
+; Macro to generate a transfer vector entry
+;
+ .MACRO PROCEDURE NAME
+ .EXTRN 'NAME
+ .ALIGN QUAD
+ .TRANSFER 'NAME
+ .MASK 'NAME
+ JMP 'NAME+2
+ .ENDM
+
+ .MACRO PROCEDUREU NAME NAMEU
+ .EXTRN 'NAME
+ .ALIGN QUAD
+ .TRANSFER 'NAMEU
+ .MASK 'NAME
+ JMP 'NAME+2
+
+ .ENDM
+;
+;
+; Macro to reserve a spare entry.
+;
+ .MACRO SPARE
+ .ALIGN QUAD
+ .ALIGN QUAD
+ .QUAD 0
+ .ENDM
+
+$EOD
+$!
+$!
+$ return
+$!
+$all_exit:
+$set def 'default_dir'
+$exit '$status'
diff --git a/packages/vms/gnv_conftest.c_first b/packages/vms/gnv_conftest.c_first
new file mode 100644
index 0000000..8645b0e
--- /dev/null
+++ b/packages/vms/gnv_conftest.c_first
@@ -0,0 +1,61 @@
+/* File: GNV$CONFTEST.C_FIRST
+ *
+ * $Id$
+ *
+ * Copyright 2009, John Malmberg
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/* This is needed for Configure tests to get the correct exit status */
+void __posix_exit(int __status);
+#define exit(__p1) __posix_exit(__p1)
+
+/* Fake pass the test to find a standard ldap routine that we know is */
+/* present on VMS, but with the wrong case for the symbol */
+char ldap_url_parse(void) {return 0;}
+
+/* These are to pass the test that does not use headers */
+/* Because configure does an #undef which keeps us from using #define */
+/* char CRYPTO_add_lock(void) {return 0;} */
+char SSL_connnect(void) {return 0;}
+char ENGINE_init(void) {return 0;}
+char RAND_status(void) {return 0;}
+/* char RAND_screen(void) {return 0;} In headers, but not present */
+char RAND_egd(void) {return 0;}
+char CRYPTO_cleanup_all_ex_data(void) {return 0;}
+char SSL_get_shutdown(void) {return 0;}
+char ENGINE_load_builtin_engines (void) {return 0;}
+
+/* And these are to pass the test that uses headers. */
+/* Because the HP OpenSSL transfer vectors are currently in Upper case only */
+#pragma message disable macroredef
+#define CRYPTO_add_lock CRYPTO_ADD_LOCK
+#define SSL_connect SSL_CONNECT
+#define ENGINE_init ENGINE_INIT
+#define RAND_status RAND_STATUS
+/* #define RAND_screen RAND_SCREEN */
+#define RAND_egd RAND_EGD
+#define CRYPTO_cleanup_all_ex_data CRYPTO_CLEANUP_ALL_EX_DATA
+#define SSL_get_shutdown SSL_GET_SHUTDOWN
+#define ENGINE_load_builtin_engines ENGINE_LOAD_BUILTIN_ENGINES
+
+/* Can not use the #define macro to fix the case on CRYPTO_lock because */
+/* there is a macro CRYPTO_LOCK that is a number */
+
+/* After all the work to get configure to pass the CRYPTO_LOCK tests,
+ * it turns out that VMS does not have the CRYPTO_LOCK symbol in the
+ * transfer vector, even though it is in the header file.
+ */
+
diff --git a/packages/vms/gnv_curl_configure.sh b/packages/vms/gnv_curl_configure.sh
new file mode 100644
index 0000000..2eeb209
--- /dev/null
+++ b/packages/vms/gnv_curl_configure.sh
@@ -0,0 +1,46 @@
+# File: gnv_curl_configure.sh
+#
+# $Id$
+#
+# Set up and run the configure script for Curl so that it can find the
+# proper options for VMS.
+#
+# Copyright 2009, John Malmberg
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# 06-Jun-2009 J. Malmberg
+# 28-Dec-2012 J. Malmberg Update for Bash 4.2.39
+#==========================================================================
+#
+# POSIX exit mode is needed for Unix shells.
+export GNV_CC_MAIN_POSIX_EXIT=1
+#
+# Where to look for the helper files.
+export GNV_OPT_DIR=.
+#
+# How to find the SSL library files.
+export LIB_OPENSSL=/SSL_LIB
+#
+# Override configure adding -std1 which is too strict for what curl
+# actually wants.
+export GNV_CC_QUALIFIERS=/STANDARD=RELAXED
+#
+# Set the directory to where the Configure script actually is.
+cd ../..
+#
+#
+./configure --prefix=/usr --exec-prefix=/usr --disable-dependency-tracking \
+ --disable-libtool-lock --with-gssapi --disable-ntlm-wb \
+ --with-ca-path=gnv\$curl_ca_path
+#
diff --git a/packages/vms/gnv_libcurl_symbols.opt b/packages/vms/gnv_libcurl_symbols.opt
new file mode 100644
index 0000000..8465592
--- /dev/null
+++ b/packages/vms/gnv_libcurl_symbols.opt
@@ -0,0 +1,181 @@
+! File GNV$LIBCURL_SYMBOLS.OPT
+!
+! $Id$
+!
+! This file must be manually maintained to allow upward compatibility
+! The SYMBOL_VECTORs are set up so that applications can be compiled
+! with either case sensitive symbol names or the default of uppercase.
+! This is because many of the Open Source applications that would call
+! the LIBCURL library need to be built with case sensitive names.
+!
+! Automatic generation is currently not practical because the order of
+! the entries are important for upward compatibility.
+!
+! The GSMATCH is manually set to the major version of 1, with the minor
+! version being the next two sections multiplied by a power of 10 to
+! become the minor version.
+! So LIBCURL 7.18.1 becomes 1,718010.
+! And a future LIBCURL of 7.18.2 would be 1,718020 if new routines were added.
+!
+! This leaves some spare digits for minor patches.
+!
+! Note that the GSMATCH does not need to have any real relationship to the
+! actual package version number.
+!
+! New SYMBOL_VECTORs must be added to the end of this list, and added
+! in pairs for both exact and with an uppercase alias.
+! If the public symbol is more than 31 characters long, then a special
+! shortened symbol will be exported, and three aliases should be created,
+! The aliases will be the special shortened uppercase alias, and both
+! upper and lowercase versions of a truncated name (preferred) or a
+! modified manually shortened name if a truncated name will not be
+! unique.
+!
+! Routines can not be removed, the functionality must be maintained.
+! If a new routine is supplied where the arguments are incompatible with
+! the older version, both versions are needed to be maintained.
+! The old version can be given a different name, but must be in the same
+! SYMBOL_VECTOR positions in this file.
+!
+! Changing the number of parameters for an existing routine does not require
+! maintaining multiple versions as long as the routine can be called with
+! the old number of parameters.
+!
+! Copyright 2009, John Malmberg
+!
+! Permission to use, copy, modify, and/or distribute this software for any
+! purpose with or without fee is hereby granted, provided that the above
+! copyright notice and this permission notice appear in all copies.
+!
+! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+!============================================================================
+GSMATCH=LEQUAL,1,719050
+CASE_SENSITIVE=YES
+SYMBOL_VECTOR=(curl_strequal=PROCEDURE)
+SYMBOL_VECTOR=(CURL_STREQUAL/curl_strequal=PROCEDURE)
+SYMBOL_VECTOR=(curl_strnequal=PROCEDURE)
+SYMBOL_VECTOR=(CURL_STRNEQUAL/curl_strnequal=PROCEDURE)
+SYMBOL_VECTOR=(curl_formadd=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FORMADD/curl_formadd=PROCEDURE)
+SYMBOL_VECTOR=(curl_formget=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FORMGET/curl_formget=PROCEDURE)
+SYMBOL_VECTOR=(curl_formfree=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FORMFREE/curl_formfree=PROCEDURE)
+SYMBOL_VECTOR=(curl_getenv=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GETENV/curl_getenv=PROCEDURE)
+SYMBOL_VECTOR=(curl_version=PROCEDURE)
+SYMBOL_VECTOR=(CURL_VERSION/curl_version=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_escape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_ESCAPE/curl_easy_escape=PROCEDURE)
+SYMBOL_VECTOR=(curl_escape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_ESCAPE/curl_escape=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_unescape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_UNESCAPE/curl_easy_unescape=PROCEDURE)
+SYMBOL_VECTOR=(curl_unescape=PROCEDURE)
+SYMBOL_VECTOR=(CURL_UNESCAPE/curl_unescape=PROCEDURE)
+SYMBOL_VECTOR=(curl_free=PROCEDURE)
+SYMBOL_VECTOR=(CURL_FREE/curl_free=PROCEDURE)
+SYMBOL_VECTOR=(curl_global_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GLOBAL_INIT/curl_global_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_global_init_mem=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GLOBAL_INIT_MEM/curl_global_init_mem=PROCEDURE)
+SYMBOL_VECTOR=(curl_global_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GLOBAL_CLEANUP/curl_global_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_slist_append=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SLIST_APPEND/curl_slist_append=PROCEDURE)
+SYMBOL_VECTOR=(curl_slist_free_all=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SLIST_FREE_ALL/curl_slist_free_all=PROCEDURE)
+SYMBOL_VECTOR=(curl_getdate=PROCEDURE)
+SYMBOL_VECTOR=(CURL_GETDATE/curl_getdate=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_INIT/curl_share_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_setopt=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_SETOPT/curl_share_setopt=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_CLEANUP/curl_share_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_version_info=PROCEDURE)
+SYMBOL_VECTOR=(CURL_VERSION_INFO/curl_version_info=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_strerror=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_STRERROR/curl_easy_strerror=PROCEDURE)
+SYMBOL_VECTOR=(curl_share_strerror=PROCEDURE)
+SYMBOL_VECTOR=(CURL_SHARE_STRERROR/curl_share_strerror=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_pause=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_PAUSE/curl_easy_pause=PROCEDURE)
+!
+! easy.h
+SYMBOL_VECTOR=(curl_easy_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_INIT/curl_easy_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_setopt=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_SETOPT/curl_easy_setopt=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_perform=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_PERFORM/curl_easy_perform=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_CLEANUP/curl_easy_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_getinfo=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_GETINFO/curl_easy_getinfo=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_duphandle=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_DUPHANDLE/curl_easy_duphandle=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_reset=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_RESET/curl_easy_reset=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_recv=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_RECV/curl_easy_recv=PROCEDURE)
+SYMBOL_VECTOR=(curl_easy_send=PROCEDURE)
+SYMBOL_VECTOR=(CURL_EASY_SEND/curl_easy_send=PROCEDURE)
+!
+! multi.h
+SYMBOL_VECTOR=(curl_multi_init=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_INIT/curl_multi_init=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_add_handle=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_ADD_HANDLE/curl_multi_add_handle=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_remove_handle=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_REMOVE_HANDLE/curl_multi_remove_handle=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_fdset=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_FDSET/curl_multi_fdset=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_perform=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_PERFORM/curl_multi_perform=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_CLEANUP/curl_multi_cleanup=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_info_read=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_INFO_READ/curl_multi_info_read=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_strerror=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_STRERROR/curl_multi_strerror=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_socket=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SOCKET/curl_multi_socket=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_socket_action=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SOCKET_ACTION/curl_multi_socket_action=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_socket_all=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SOCKET_ALL/curl_multi_socket_all=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_timeout=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_TIMEOUT/curl_multi_timeout=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_setopt=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_SETOPT/curl_multi_setopt=PROCEDURE)
+SYMBOL_VECTOR=(curl_multi_assign=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MULTI_ASSIGN/curl_multi_assign=PROCEDURE)
+!
+! mprintf.h
+SYMBOL_VECTOR=(curl_mprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MPRINTF/curl_mprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mfprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MFPRINTF/curl_mfprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_msprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MSPRINTF/curl_msprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_msnprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MSNPRINTF/curl_msnprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVPRINTF/curl_mvprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvfprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVFPRINTF/curl_mvfprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvsprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVSPRINTF/curl_mvsprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvsnprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVSNPRINTF/curl_mvsnprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_maprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MAPRINTF/curl_maprintf=PROCEDURE)
+SYMBOL_VECTOR=(curl_mvaprintf=PROCEDURE)
+SYMBOL_VECTOR=(CURL_MVAPRINTF/curl_mvaprintf=PROCEDURE)
diff --git a/packages/vms/gnv_link_curl.com b/packages/vms/gnv_link_curl.com
new file mode 100644
index 0000000..b7e6083
--- /dev/null
+++ b/packages/vms/gnv_link_curl.com
@@ -0,0 +1,852 @@
+$! File: gnv_link_curl.com
+$!
+$! $Id$
+$!
+$! File to build images using gnv$libcurl.exe
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 10-Jun-2009 J. Malmberg
+$!============================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$ define/job gnv_packages_vms 'default_dir'
+$!
+$ on warning then goto all_exit
+$!
+$! On VAX, we need to generate a Macro transfer vector.
+$ parse_style = "TRADITIONAL"
+$ if (f$getsyi("HW_MODEL") .lt. 1024)
+$ then
+$ @generate_vax_transfer.com
+$ arch_name = "VAX"
+$ else
+$ arch_name = ""
+$ arch_name = arch_name + f$edit(f$getsyi("ARCH_NAME"), "UPCASE")
+$ if (arch_name .eqs. "") then arch_name = "UNK"
+$!
+$! Extended parsing option starts with VMS 7.3-1.
+$! There is no 7.4, so that simplifies the parse a bit.
+$!
+$ node_swvers = f$getsyi("node_swvers")
+$ version_patch = f$extract(1, f$length(node_swvers), node_swvers)
+$ maj_ver = f$element(0, ".", version_patch)
+$ min_ver_patch = f$element(1, ".", version_patch)
+$ min_ver = f$element(0, "-", min_ver_patch)
+$ patch = f$element(1, "-", min_ver_patch)
+$ if patch .eqs. "-" then patch = ""
+$ parse_x = 0
+$ if maj_ver .ges. "8"
+$ then
+$ parse_x = 1
+$ else
+$ if maj_ver .eqs. "7" .and. min_ver .ges. "3" .and. patch .nes. ""
+$ then
+$ parse_x = 1
+$ endif
+$ endif
+$ if parse_x
+$ then
+$ parse_style = f$getjpi("", "parse_style_perm")
+$ endif
+$ endif
+$!
+$!
+$! Move to where the base directories.
+$ set def [--]
+$!
+$!
+$! Build the Message file.
+$!--------------------------
+$ if f$search("[.packages.vms]curlmsg.obj") .eqs. ""
+$ then
+$ message [.packages.vms]curlmsg.msg/object=[.packages.vms]
+$ endif
+$ if f$search("gnv$curlmsg.exe") .eqs. ""
+$ then
+$ link/share=gnv$curlmsg.exe [.packages.vms]curlmsg.obj
+$ endif
+$!
+$!
+$! Need to build the common init module.
+$!-------------------------------------------
+$ cflags = "/list/show=(expan,includ)"
+$ init_obj = "[.packages.vms]curl_crtl_init.obj"
+$ if f$search(init_obj) .eqs. ""
+$ then
+$ cc'cflags' 'default_dir'curl_crtl_init.c/obj='init_obj'
+$ endif
+$ purge 'init_obj'
+$ rename 'init_obj' ;1
+$!
+$!
+$! Need to build the module to test the HP OpenSSL version
+$!--------------------------------------------------------
+$ if arch_name .nes. "VAX"
+$ then
+$ rpt_obj = "[.packages.vms]report_openssl_version.obj
+$ if f$search(rpt_obj) .eqs. ""
+$ then
+$ cc'cflags' 'default_dir'report_openssl_version.c/obj='rpt_obj'
+$ endif
+$ purge 'rpt_obj'
+$ rename 'rpt_obj' ;1
+$!
+$ link/exe='default_dir'report_openssl_version.exe 'rpt_obj'
+$ report_openssl_version := $'default_dir'report_openssl_version.exe
+$ endif
+$!
+$!
+$ base_link_opt_file = "[.packages.vms.''arch_name']gnv_libcurl_linker.opt"
+$ share_link_opt_file = "[.packages.vms.''arch_name']gnv_ssl_libcurl_linker.opt"
+$ if f$search(base_link_opt_file) .eqs. ""
+$ then
+$ base_link_opt_file = "[.packages.vms]gnv_libcurl_linker.opt"
+$ share_link_opt_file = "[.packages.vms]gnv_ssl_libcurl_linker.opt"
+$ if f$search(base_link_opt_file) .eqs. ""
+$ then
+$ write sys$output "Can not find base library option file!"
+$ goto all_exit
+$ endif
+$ endif
+$!
+$! Create the a new option file with special fixup for HP SSL
+$! For a shared image, we always want ZLIB and 32 bit HPSSL
+$!
+$ if f$search("gnv$libzshr32") .eqs. ""
+$ then
+$ write sys$output "VMSPORTS/GNV LIBZ Shared image not found!"
+$ goto all_exit
+$ endif
+$!
+$!
+$! Need to check the version of the HP SSL shared image.
+$!
+$! VAX platform can not be checked this way, it appears symbol lookup
+$! was disabled. VAX has not been updated in a while.
+$ if arch_name .eqs. "VAX"
+$ then
+$ hp_ssl_libcrypto32 = "sys$common:[syslib]ssl$libcrypto_shr32.exe"
+$ hp_ssl_libssl32 = "sys$common:[syslib]ssl$libssl_shr32.exe"
+$ if f$search(hp_ssl_libcrypto32) .nes. ""
+$ then
+$ use_hp_ssl = 1
+$ curl_ssl_libcrypto32 = hp_ssl_libcrypto32
+$ curl_ssl_libssl32 = hp_ssl_libssl32
+$ curl_ssl_version = "OpenSSL/0.9.6g"
+$ else
+$ write sys$output "HP OpenSSL Shared images not found!"
+$ goto all_exit
+$ endif
+$ else
+$!
+$! Minimum HP version we can use reports:
+$! "OpenSSL 0.9.8w 23 Apr 2012"
+$!
+$ use_hp_ssl = 0
+$ hp_ssl_libcrypto32 = "sys$share:ssl$libcrypto_shr32.exe"
+$ hp_ssl_libssl32 = "sys$share:ssl$libssl_shr32.exe"
+$ if f$search(hp_ssl_libcrypto32) .nes. ""
+$ then
+$ curl_ssl_libcrypto32 = hp_ssl_libcrypto32
+$ curl_ssl_libssl32 = hp_ssl_libssl32
+$ report_openssl_version 'hp_ssl_libcrypto32' hp_ssl_version
+$ endif
+$!
+$ if f$type(hp_ssl_version) .eqs. "STRING"
+$ then
+$ curl_ssl_version = hp_ssl_version
+$ full_version = f$element(1, " ", hp_ssl_version)
+$ ver_maj = f$element(0, ".", full_version)
+$ ver_min = f$element(1, ".", full_version)
+$ ver_patch = f$element(2, ".", full_version)
+$! ! ver_patch is typically both a number and some letters
+$ ver_patch_len = f$length(ver_patch)
+$ ver_patchltr = ""
+$ver_patch_loop:
+$ ver_patchltr_c = f$extract(ver_patch_len - 1, 1, ver_patch)
+$ if ver_patchltr_c .les. "9" then goto ver_patch_loop_end
+$ ver_patchltr = ver_patchltr_c + ver_patchltr
+$ ver_patch_len = ver_patch_len - 1
+$ goto ver_patch_loop
+$ver_patch_loop_end:
+$ ver_patchnum = ver_patch - ver_patchltr
+$ if 'ver_maj' .ge. 0
+$ then
+$ if 'ver_min' .ge. 9
+$ then
+$ if 'ver_patchnum' .ge. 8
+$ then
+$ if ver_patchltr .ges. "w" then use_hp_ssl = 1
+$ endif
+$ endif
+$ endif
+$set nover
+$ if use_hp_ssl .eq. 0
+$ then
+$ write sys$output -
+ " HP OpenSSL version of ""''hp_ssl_version'"" is too old for shared libcurl!"
+$ endif
+$ else
+$ write sys$output "Unable to get version of HP OpenSSL"
+$ endif
+$!
+$ gnv_ssl_libcrypto32 = "gnv$gnu:[lib]ssl$libcrypto_shr32.exe"
+$ gnv_ssl_libssl32 = "gnv$gnu:[lib]ssl$libssl_shr32.exe"
+$ if f$search(gnv_ssl_libcrypto32) .nes. ""
+$ then
+$ report_openssl_version 'gnv_ssl_libcrypto32' gnv_ssl_version
+$ endif
+$!
+$ use_gnv_ssl = 0
+$ if f$type(gnv_ssl_version) .eqs. "STRING"
+$ then
+$ gnv_full_version = f$element(1, " ", gnv_ssl_version)
+$ gnv_ver_maj = f$element(0, ".", gnv_full_version)
+$ gnv_ver_min = f$element(1, ".", gnv_full_version)
+$ gnv_ver_patch = f$element(2, ".", gnv_full_version)
+$ gnv_ver_patch_len = f$length(gnv_ver_patch)
+$ gnv_ver_patchnum = f$extract(0, gnv_ver_patch_len - 1, gnv_ver_patch)
+$ gnv_ver_patchltr = f$extract(gnv_ver_patch_len - 1, 1, gnv_ver_patch)
+$ if 'gnv_ver_maj' .ge. 0
+$ then
+$ if 'gnv_ver_min' .ge. 9
+$ then
+$ if 'gnv_ver_patchnum' .ge. 8
+$ then
+$ if gnv_ver_patchltr .ges. "w" then use_gnv_ssl = 1
+$ endif
+$ endif
+$ endif
+$ if use_gnv_ssl .eq. 0
+$ then
+$ write sys$output -
+ "GNV OpenSSL version of ""''gnv_ssl_version'" is too old for shared libcurl!"
+$ endif
+$!
+$! Prefer to break the tie with the lowest supported version
+$! For simplicity, if the GNV image is present, it will be used.
+$! Version tuple is not a simple compare.
+$!
+$ if use_gnv_ssl .eq. 1 then
+$ curl_ssl_libcrypto32 = gnv_ssl_libcrypto32
+$ curl_ssl_libssl32 = gnv_ssl_libssl32
+$ curl_ssl_version = gnv_ssl_version
+$ use_hp_ssl = 0
+$ endif
+!$!
+$ else
+$ write sys$output "Unable to get version of GNV OpenSSL"
+$ endif
+$!
+$! Need to write a release note section about HP OpenSSL
+$!
+$create 'default_dir'hp_ssl_release_info.txt
+$deck
+This package is built on with the OpenSSL version listed below and requires
+the shared images from the HP OpenSSL product that is kitted with that
+version or a compatible later version.
+
+For Alpha and IA64 platforms, see the url below to register to get the
+download URL. The kit will be HP 1.4-467 or later.
+ http://h71000.www7.hp.com/openvms/products/ssl/ssl.html
+
+For VAX, use the same registration, but remove the kit name from any of the
+download URLs provided and put in CPQ-VAXVMS-SSL-V0101-B-1.PCSI-DCX_VAXEXE
+
+If your system can not be upgraded to a compatible version of OpenSSL, then
+you can extract the two shared images from the kit and place them in the
+[vms$common.gnv.lib]directory of the volume that you are installing GNV and
+or GNV compatible components like Curl.
+
+If GNV is installed, you must run the GNV startup procedure before these steps
+and before installing Curl.
+
+
+ 1. make sure that [vms$common.gnv.lib] exists by using the following
+ commands. We want the directory to be in lowercase except on VAX.
+
+ $SET PROCESS/PARSE=extend !If not VAX.
+ $CREATE/DIR device:[vms$common.gnv.lib]/prot=w:re
+
+ 2. Extract the ssl$crypto_shr32.exe and ssl$libssl_shr32.exe images.
+
+ $PRODUCT EXTRACT FILE -
+ /select=(ssl$libcrypto_shr32.exe,ssl$libssl_shr32.exe)-
+ /source=device:[dir] -
+ /options=noconfirm -
+ /destination=device:[vms$common.gnv.lib] SSL
+
+The [vms$common.sys$startup}curl_startup.com procedure will then configure
+libcurl to use these shared images instead of the system ones.
+
+When you upgrade SSL on VMS to the newer version of HP SSL, then these copies
+should be deleted.
+
+$eod
+$!
+$ open/append sslr 'default_dir'hp_ssl_release_info.txt
+$ write sslr "OpenSSL version used for building this kit: ",curl_ssl_version
+$ write sslr ""
+$ close sslr
+$!
+$!
+$! LIBZ
+$ libzshr_line = ""
+$ try_shr = "gnv$libzshr32"
+$ if f$search(try_shr) .nes. ""
+$ then
+$ libzshr_line = "''try_shr'/share"
+$ else
+$ write sys$output "''try_shr' image not found!"
+$ goto all_exit
+$ endif
+$!
+$!
+$ gssrtlshr_line = ""
+$ if arch_name .nes. "VAX"
+$ then
+$ try_shr = "sys$share:gss$rtl"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$ gssrtlshr_line = "''try_shr'/share"
+$ else
+$ write sys$output "''try_shr' image not found!"
+$ goto all_exit
+$ endif
+$ endif
+$!
+$!
+$!
+$ if f$search(share_link_opt_file) .eqs. ""
+$ then
+$ create 'share_link_opt_file'
+$ open/append slopt 'share_link_opt_file'
+$ if libzshr_line .nes. "" then write slopt libzshr_line
+$ if gssrtlshr_line .nes. "" then write slopt gssrtlshr_line
+$ write slopt "gnv$curl_ssl_libcryptoshr32/share"
+$ write slopt "gnv$curl_ssl_libsslshr32/share"
+$ close slopt
+$ endif
+$!
+$! DCL build puts curllib in architecture directory
+$! GNV build uses the makefile.
+$ libfile = "[.packages.vms.''arch_name']curllib.olb"
+$ if f$search(libfile) .nes. ""
+$ then
+$ olb_file = libfile
+$ else
+$ ! GNV based build
+$ libfile = "[.lib.^.libs]libcurl.a"
+$ if f$search(libfile) .nes. ""
+$ then
+$ olb_file = libfile
+$ else
+$ write sys$output -
+ "Can not build shared image, libcurl object library not found!"
+$ goto all_exit
+$ endif
+$ endif
+$!
+$gnv_libcurl_share = "''default_dir'gnv$libcurl.exe"
+$!
+$ if f$search(gnv_libcurl_share) .eqs. ""
+$ then
+$ if arch_name .nes. "VAX"
+$ then
+$ define/user gnv$curl_ssl_libcryptoshr32 'curl_ssl_libcrypto32'
+$ define/user gnv$curl_ssl_libsslshr32 'curl_ssl_libssl32'
+$ link/dsf='default_dir'gnv$libcurl.dsf/share='gnv_libcurl_share' -
+ /map='default_dir'gnv$libcurl.map -
+ gnv_packages_vms:gnv_libcurl_symbols.opt/opt,-
+ 'olb_file'/lib,-
+ 'share_link_opt_file'/opt
+$ else
+$! VAX will not allow the logical name hack for the
+$! SSL libcryto library, it is pulling it in twice if I try it.
+$ link/share='gnv_libcurl_share'/map='default_dir'gnv$libcurl.map -
+ gnv_packages_vms:gnv_libcurl_xfer.opt/opt,-
+ 'olb_file'/lib,-
+ 'base_link_opt_file'/opt
+$ endif
+$ endif
+$!
+$!
+$ if f$search("[.src]curl-tool_main.o") .nes. ""
+$ then
+$! From src/makefile.inc:
+$! # libcurl has sources that provide functions named curlx_* that aren't
+$! # part of the official API, but we re-use the code here to avoid
+$! # duplication.
+$!
+$!
+$ if f$search("[.src]curl.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.src]curl.exe/dsf=[.src]curl.dsf -
+ [.src]curl-tool_main.o, [.src]curl-tool_binmode.o, -
+ [.src]curl-tool_bname.o, [.src]curl-tool_cb_dbg.o, -
+ [.src]curl-tool_cb_hdr.o, [.src]curl-tool_cb_prg.o, -
+ [.src]curl-tool_cb_rea.o, [.src]curl-tool_cb_see.o, -
+ [.src]curl-tool_cb_wrt.o, [.src]curl-tool_cfgable.o, -
+ [.src]curl-tool_convert.o, [.src]curl-tool_dirhie.o, -
+ [.src]curl-tool_doswin.o, [.src]curl-tool_easysrc.o, -
+ [.src]curl-tool_formparse.o, [.src]curl-tool_getparam.o, -
+ [.src]curl-tool_getpass.o, [.src]curl-tool_help.o, -
+ [.src]curl-tool_helpers.o, [.src]curl-tool_homedir.o, -
+ [.src]curl-tool_hugehelp.o, [.src]curl-tool_libinfo.o, -
+ [.src]curl-tool_metalink.o, [.src]curl-tool_mfiles.o, -
+ [.src]curl-tool_msgs.o, [.src]curl-tool_operate.o, -
+ [.src]curl-tool_operhlp.o, [.src]curl-tool_panykey.o, -
+ [.src]curl-tool_paramhlp.o, [.src]curl-tool_parsecfg.o, -
+ [.src]curl-tool_setopt.o, [.src]curl-tool_sleep.o, -
+ [.src]curl-tool_urlglob.o, [.src]curl-tool_util.o, -
+ [.src]curl-tool_vms.o, [.src]curl-tool_writeenv.o, -
+ [.src]curl-tool_writeout.o, [.src]curl-tool_xattr.o, -
+ [.src]curl-strtoofft.o, [.src]curl-strdup.o, [.src]curl-rawstr.o, -
+ [.src]curl-nonblock.o, gnv_packages_vms:curlmsg.obj,-
+ sys$input:/opt
+gnv$libcurl/share
+gnv_packages_vms:curl_crtl_init.obj
+$ endif
+$ else
+$ curl_exe = "[.src]curl.exe"
+$ curl_dsf = "[.src]curl.dsf"
+$ curl_main = "[.packages.vms.''arch_name']tool_main.obj"
+$ curl_src = "[.packages.vms.''arch_name']curlsrc.olb"
+$ curl_lib = "[.packages.vms.''arch_name']curllib.olb"
+$ rawstr = "rawstr"
+$ nonblock = "nonblock"
+$ warnless = "warnless"
+$!
+$! Extended parse style requires special quoting
+$!
+$ if (arch_name .nes. "VAX") .and. (parse_style .eqs. "EXTENDED")
+$ then
+$ rawstr = """rawstr"""
+$ nonblock = """nonblock"""
+$ warnless = """warnless"""
+$ endif
+$ if f$search(curl_exe) .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe='curl_exe'/dsf='curl_dsf' -
+ 'curl_main','curl_src'/lib, -
+ 'curl_lib'/library/include=-
+ ('rawstr','nonblock','warnless'),-
+ gnv_packages_vms:curlmsg.obj,-
+ sys$input:/opt
+gnv$libcurl/share
+gnv_packages_vms:curl_crtl_init.obj
+$ endif
+$ endif
+$!
+$!
+$!
+$! in6addr_missing so skip building:
+$! [.server]sws.o
+$! [.server]sockfilt.o
+$! [.server]tftpd.o
+$!
+$!
+$ target = "10-at-a-time"
+$ if f$search("[.docs.examples]''target'.o") .eqs. ""
+$ then
+$ write sys$output "examples not built"
+$ goto all_exit
+$ endif
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "anyauthput"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "certinfo"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "cookie_interface"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "debug"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "fileupload"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$ target = "fopen"
+$ if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$ then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$ endif
+$!
+$!
+$target = "ftpget"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "ftpgetresp"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "ftpupload"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "getinfo"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "getinmemory"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "http-post"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "httpcustomheader"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "httpput"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "https"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-app"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-debugcallback"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-double"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-post"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "multi-single"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "persistant"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "post-callback"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "postit2"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "sendrecv"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "sepheaders"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "simple"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "simplepost"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$!
+$target = "simplessl"
+$if f$search("[.docs.examples]''target'.exe") .eqs. ""
+$then
+$ define/user gnv$libcurl 'gnv_libcurl_share'
+$ link'ldebug'/exe=[.docs.examples]'target'.exe-
+ /dsf=[.docs.examples]'target'.dsf -
+ [.docs.examples]'target'.o,-
+ gnv$'target'.opt/opt,-
+ sys$input:/opt
+gnv$libcurl/share
+$endif
+$!
+$! =============== End of docs/examples =========================
+$!
+$!
+$all_exit:
+$set def 'default_dir'
+$exit '$status'
+$!
diff --git a/packages/vms/hpssl_alpha.opt b/packages/vms/hpssl_alpha.opt
deleted file mode 100644
index 3ad9fbd..0000000
--- a/packages/vms/hpssl_alpha.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SYS$LIBRARY:SSL$LIBCRYPTO_SHR32.EXE/SHARE
-SYS$LIBRARY:SSL$LIBSSL_SHR32.EXE/SHARE
diff --git a/packages/vms/hpssl_ia64.opt b/packages/vms/hpssl_ia64.opt
deleted file mode 100644
index 9b22014..0000000
--- a/packages/vms/hpssl_ia64.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SYS$LIBRARY:SSL$LIBCRYPTO_SHR.EXE/SHARE
-SYS$LIBRARY:SSL$LIBSSL_SHR.EXE/SHARE
diff --git a/packages/vms/hpssl_vax.opt b/packages/vms/hpssl_vax.opt
deleted file mode 100644
index 3ad9fbd..0000000
--- a/packages/vms/hpssl_vax.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SYS$LIBRARY:SSL$LIBCRYPTO_SHR32.EXE/SHARE
-SYS$LIBRARY:SSL$LIBSSL_SHR32.EXE/SHARE
diff --git a/packages/vms/ldap.opt b/packages/vms/ldap.opt
deleted file mode 100644
index 23f1ee4..0000000
--- a/packages/vms/ldap.opt
+++ /dev/null
@@ -1 +0,0 @@
-SYS$SHARE:LDAP$SHR.EXE /SHARE
diff --git a/packages/vms/macro32_exactcase.patch b/packages/vms/macro32_exactcase.patch
new file mode 100644
index 0000000..eda5cac
--- /dev/null
+++ b/packages/vms/macro32_exactcase.patch
@@ -0,0 +1,11 @@
+macro32_exactcase.exe
+SE EC
+^X00000001
+RE /I
+^X00012B1D
+'BICB2 #^X00000020,R3'
+EXIT
+'BICB2 #^X00000000,R3'
+EXI
+U
+EXI
diff --git a/packages/vms/make_gnv_curl_install.sh b/packages/vms/make_gnv_curl_install.sh
new file mode 100644
index 0000000..5099fe4
--- /dev/null
+++ b/packages/vms/make_gnv_curl_install.sh
@@ -0,0 +1,45 @@
+# File: make_gnv_curl_install.sh
+#
+# $Id$
+#
+# Set up and run the make script for Curl.
+#
+# This makes the library, the curl binary and attempts an install.
+# A search list should be set up for GNU (GNV$GNU).
+#
+# Copyright 2009, John Malmberg
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# 06-Jun-2009 J. Malmberg
+#==========================================================================
+#
+#
+# Needed VMS build setups for GNV.
+export GNV_OPT_DIR=.
+export GNV_CC_QUALIFIERS=/DEBUG/OPTIMIZE/STANDARD=RELAXED\
+/float=ieee_float/ieee_mode=denorm_results
+export GNV_CXX_QUALIFIERS=/DEBUG/OPTIMIZE/float=ieee/ieee_mode=denorm_results
+export GNV_CC_NO_INC_PRIMARY=1
+#
+#
+# POSIX exit mode is needed for Unix shells.
+export GNV_CC_MAIN_POSIX_EXIT=1
+make
+cd ../..
+# adjust the libcurl.pc file, GNV currently ignores the Lib: line.
+# but is noisy about it, so we just remove it.
+sed -e 's/^Libs:/#Libs:/g' libcurl.pc > libcurl.pc_new
+rm libcurl.pc
+mv libcurl.pc_new libcurl.pc
+make install
diff --git a/packages/vms/make_pcsi_curl_kit_name.com b/packages/vms/make_pcsi_curl_kit_name.com
new file mode 100644
index 0000000..f644fe3
--- /dev/null
+++ b/packages/vms/make_pcsi_curl_kit_name.com
@@ -0,0 +1,190 @@
+$! File: MAKE_PCSI_CURL_KIT_NAME.COM
+$!
+$! $Id$
+$!
+$! Calculates the PCSI kit name for use in building an installation kit.
+$! PCSI is HP's PolyCenter Software Installation Utility.
+$!
+$! The results are stored in as logical names so that other procedures
+$! can use them.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 11-Jun-2009 J. Malmberg
+$!
+$!========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$! Move to the base directories
+$ set def [--]
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$! The producer is the name or common abbreviation for the entity that is
+$! making the kit. It must be set as a logical name before running this
+$! procedure.
+$!
+$! HP documents the producer as the legal owner of the software, but for
+$! open source work, it should document who is creating the package for
+$! distribution.
+$!
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$ write sys$output "The logical name GNV_PCSI_PRODUCER needs to be defined."
+$ write sys$output "This should be set to the common abbreviation or name of"
+$ write sys$output "the entity creating this kit. If you are an individual"
+$ write sys$output "then use your initials."
+$ goto all_exit
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$ write sys$output "The logical name GNV_PCSI_PRODUCER_FULL_NAME needs to"
+$ write sys$output "be defined. This should be set to the full name of"
+$ write sys$output "the entity creating this kit. If you are an individual"
+$ write sys$output "then use your name."
+$ write sys$output "EX: DEFINE GNV_PCSI_PRODUCER_FULL_NAME ""First M. Last"""
+$ goto all_exit
+$ endif
+$!
+$ write sys$output "*****"
+$ write sys$output "***** Producer = ''producer'"
+$ write sys$output "*****"
+$!
+$!
+$! Base is one of 'VMS', 'AXPVMS', 'I64VMS', 'VAXVMS' and indicates what
+$! binaries are in the kit. A kit with just 'VMS' can be installed on all
+$! architectures.
+$!
+$ base = "VMS"
+$ arch_type = f$getsyi("ARCH_NAME")
+$ code = f$extract(0, 1, arch_type)
+$ if (code .eqs. "I") then base = "I64VMS"
+$ if (code .eqs. "V") then base = "VAXVMS"
+$ if (code .eqs. "A") then base = "AXPVMS"
+$!
+$!
+$ product = "curl"
+$!
+$!
+$! We need to get the version from curlver_h. It will have a line like
+$! #define LIBCURL_VERSION "7.31.0"
+$! or
+$! #define LIBCURL_VERSION "7.32.0-20130731".
+$!
+$! The dash indicates that this is a daily pre-release.
+$!
+$!
+$ open/read/error=version_loop_end vhf [.include.curl]curlver.h
+$ version_loop:
+$ read vhf line_in
+$ if line_in .eqs. "" then goto version_loop
+$ if f$locate("#define LIBCURL_VERSION ", line_in) .ne. 0
+$ then
+$ goto version_loop
+$ endif
+$ raw_version = f$element(2," ", line_in) - """" - """"
+$ version_loop_end:
+$ close vhf
+$!
+$!
+$ eco_level = ""
+$ if f$search("''default_dir'vms_eco_level.h") .nes. ""
+$ then
+$ open/read ef 'default_dir'vms_eco_level.h
+$ecolevel_loop:
+$ read/end=ecolevel_loop_end ef line_in
+$ prefix = f$element(0, " ", line_in)
+$ if prefix .nes. "#define" then goto ecolevel_loop
+$ key = f$element(1, " ", line_in)
+$ value = f$element(2, " ", line_in) - """" - """"
+$ if key .eqs. "VMS_ECO_LEVEL"
+$ then
+$ eco_level = "''value'"
+$ if eco_level .eqs. "0"
+$ then
+$ eco_level = ""
+$ else
+$ eco_level = "E" + eco_level
+$ endif
+$ goto ecolevel_loop_end
+$ endif
+$ goto ecolevel_loop
+$ecolevel_loop_end:
+$ close ef
+$ endif
+$!
+$!
+$! This translates to V0732-0 or D0732-0
+$! We encode the snapshot date into the version as an ECO since a daily
+$! can never have an ECO.
+$!
+$! version_type = 'V' for a production release, and 'D' for a build from a
+$! daiy snapshot of the curl source.
+$ majorver = f$element(0, ".", raw_version)
+$ minorver = f$element(1, ".", raw_version)
+$ raw_update = f$element(2, ".", raw_version)
+$ update = f$element(0, "-", raw_update)
+$ if update .eqs. "0" then update = ""
+$ daily_tag = f$element(1, "-", raw_update)
+$ vtype = "V"
+$ patch = ""
+$ if daily_tag .nes. "-"
+$ then
+$ vtype = "D"
+$ daily_tag_len = f$length(daily_tag)
+$ daily_tag = f$extract(4, daily_tag_len - 4, daily_tag)
+$ patch = vtype + daily_tag
+$ product = product + "_d"
+$ else
+$ daily_tag = ""
+$ if eco_level .nes. "" then patch = eco_level
+$ endif
+$!
+$!
+$ version_fao = "!2ZB!2ZB"
+$ mmversion = f$fao(version_fao, 'majorver', 'minorver')
+$ version = vtype + "''mmversion'"
+$ if update .nes. "" .or. patch .nes. ""
+$ then
+$! The presence of a patch implies an update
+$ if update .eqs. "" .and. patch .nes. "" then update = "0"
+$ version = version + "-" + update + patch
+$ fversion = version
+$ else
+$ fversion = version
+$ version = version + "-"
+$ endif
+$!
+$! Kit type 1 is complete kit, the only type that this procedure will make.
+$ kittype = 1
+$!
+$! Write out a logical name for the resulting base kit name.
+$ name = "''producer'-''base'-''product'-''version'-''kittype'"
+$ define GNV_PCSI_KITNAME "''name'"
+$ fname = "''product'-''fversion'"
+$ define GNV_PCSI_FILENAME_BASE "''fname'"
+$ write sys$output "*****"
+$ write sys$output "***** GNV_PCSI_KITNAME = ''name'."
+$ write sys$output "***** GNV_PCSI_FILENAME_BASE = ''fname'."
+$ write sys$output "*****"
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit '$status'
diff --git a/packages/vms/openssl_alpha.opt b/packages/vms/openssl_alpha.opt
deleted file mode 100644
index b445119..0000000
--- a/packages/vms/openssl_alpha.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:LIBCRYPTO.EXE /SHARE
-SSLLIB:LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ia64.opt b/packages/vms/openssl_ia64.opt
deleted file mode 100644
index b445119..0000000
--- a/packages/vms/openssl_ia64.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:LIBCRYPTO.EXE /SHARE
-SSLLIB:LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ssl_alpha.opt b/packages/vms/openssl_ssl_alpha.opt
deleted file mode 100644
index c726c2f..0000000
--- a/packages/vms/openssl_ssl_alpha.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
-SSLLIB:SSL_LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ssl_ia64.opt b/packages/vms/openssl_ssl_ia64.opt
deleted file mode 100644
index c726c2f..0000000
--- a/packages/vms/openssl_ssl_ia64.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
-SSLLIB:SSL_LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_ssl_vax.opt b/packages/vms/openssl_ssl_vax.opt
deleted file mode 100644
index c726c2f..0000000
--- a/packages/vms/openssl_ssl_vax.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:SSL_LIBCRYPTO.EXE /SHARE
-SSLLIB:SSL_LIBSSL.EXE /SHARE
diff --git a/packages/vms/openssl_vax.opt b/packages/vms/openssl_vax.opt
deleted file mode 100644
index b445119..0000000
--- a/packages/vms/openssl_vax.opt
+++ /dev/null
@@ -1,2 +0,0 @@
-SSLLIB:LIBCRYPTO.EXE /SHARE
-SSLLIB:LIBSSL.EXE /SHARE
diff --git a/packages/vms/pcsi_gnv_curl_file_list.txt b/packages/vms/pcsi_gnv_curl_file_list.txt
new file mode 100644
index 0000000..ab5b633
--- /dev/null
+++ b/packages/vms/pcsi_gnv_curl_file_list.txt
@@ -0,0 +1,127 @@
+! File: PCSI_GNV_CURL_FILE_LIST.TXT
+!
+! $Id$
+!
+! File list for building a PCSI kit.
+! Very simple format so that the parsing logic can be simple.
+! links first, directory second, and files third.
+!
+! link -> file tells procedure to create/remove a link on install/uninstall
+! If more than one link, consider using an alias file.
+!
+! [xxx.yyy]foo.dir is a directory file for the rename phase.
+! [xxx.yyy.foo] is a directory file for the create phase.
+! Each subdirectory needs to be on its own pair of lines.
+!
+! [xxx.yyy]file.ext is a file for the rename and add phases.
+!
+! Copyright 2009, John Malmberg
+!
+! Permission to use, copy, modify, and/or distribute this software for any
+! purpose with or without fee is hereby granted, provided that the above
+! copyright notice and this permission notice appear in all copies.
+!
+! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+!
+! 15-Jun-2009 J. Malmberg
+!============================================================================
+[gnv.usr.bin]curl. -> [gnv.usr.bin]gnv$curl.exe
+[gnv.usr.bin]curl.exe -> [gnv.usr.bin]gnv$curl.exe
+[gnv]
+[000000]gnv.dir
+[gnv.usr]
+[gnv]usr.dir
+[gnv.usr]bin.dir
+[gnv.usr.bin]
+[gnv.usr]include.dir
+[gnv.usr.include]
+[gnv.usr.include]curl.dir
+[gnv.usr.include.curl]
+[gnv.usr]lib.dir
+[gnv.usr.lib]
+[gnv.usr.lib]pkgconfig.dir
+[gnv.usr.lib.pkgconfig]
+[gnv.usr]share.dir
+[gnv.usr.share]
+[gnv.usr.share]man.dir
+[gnv.usr.share.man]
+[gnv.usr.share.man]man1.dir
+[gnv.usr.share.man.man1]
+[gnv.usr.share.man]man3.dir
+[gnv.usr.share.man.man3]
+[gnv.usr.bin]curl-config.
+[gnv.usr.bin]gnv$curl.exe
+[gnv.usr.include.curl]curl.h
+[gnv.usr.include.curl]curlbuild.h
+[gnv.usr.include.curl]curlrules.h
+[gnv.usr.include.curl]curlver.h
+[gnv.usr.include.curl]easy.h
+[gnv.usr.include.curl]mprintf.h
+[gnv.usr.include.curl]multi.h
+[gnv.usr.include.curl]stdcheaders.h
+[gnv.usr.include.curl]typecheck-gcc.h
+[gnv.usr.lib]gnv$libcurl.exe
+[gnv.usr.lib]gnv$curlmsg.exe
+[gnv.usr.lib.pkgconfig]libcurl.pc
+[gnv.usr.share.man.man1]curl-config.1
+[gnv.usr.share.man.man1]curl.1
+[gnv.usr.share.man.man3]curl_easy_cleanup.3
+[gnv.usr.share.man.man3]curl_easy_duphandle.3
+[gnv.usr.share.man.man3]curl_easy_escape.3
+[gnv.usr.share.man.man3]curl_easy_getinfo.3
+[gnv.usr.share.man.man3]curl_easy_init.3
+[gnv.usr.share.man.man3]curl_easy_pause.3
+[gnv.usr.share.man.man3]curl_easy_perform.3
+[gnv.usr.share.man.man3]curl_easy_recv.3
+[gnv.usr.share.man.man3]curl_easy_reset.3
+[gnv.usr.share.man.man3]curl_easy_send.3
+[gnv.usr.share.man.man3]curl_easy_setopt.3
+[gnv.usr.share.man.man3]curl_easy_strerror.3
+[gnv.usr.share.man.man3]curl_easy_unescape.3
+[gnv.usr.share.man.man3]curl_escape.3
+[gnv.usr.share.man.man3]curl_formadd.3
+[gnv.usr.share.man.man3]curl_formfree.3
+[gnv.usr.share.man.man3]curl_formget.3
+[gnv.usr.share.man.man3]curl_free.3
+[gnv.usr.share.man.man3]curl_getdate.3
+[gnv.usr.share.man.man3]curl_getenv.3
+[gnv.usr.share.man.man3]curl_global_cleanup.3
+[gnv.usr.share.man.man3]curl_global_init.3
+[gnv.usr.share.man.man3]curl_global_init_mem.3
+[gnv.usr.share.man.man3]curl_mprintf.3
+[gnv.usr.share.man.man3]curl_multi_add_handle.3
+[gnv.usr.share.man.man3]curl_multi_assign.3
+[gnv.usr.share.man.man3]curl_multi_cleanup.3
+[gnv.usr.share.man.man3]curl_multi_fdset.3
+[gnv.usr.share.man.man3]curl_multi_info_read.3
+[gnv.usr.share.man.man3]curl_multi_init.3
+[gnv.usr.share.man.man3]curl_multi_perform.3
+[gnv.usr.share.man.man3]curl_multi_remove_handle.3
+[gnv.usr.share.man.man3]curl_multi_setopt.3
+[gnv.usr.share.man.man3]curl_multi_socket.3
+[gnv.usr.share.man.man3]curl_multi_socket_action.3
+[gnv.usr.share.man.man3]curl_multi_strerror.3
+[gnv.usr.share.man.man3]curl_multi_timeout.3
+[gnv.usr.share.man.man3]curl_multi_wait.3
+[gnv.usr.share.man.man3]curl_share_cleanup.3
+[gnv.usr.share.man.man3]curl_share_init.3
+[gnv.usr.share.man.man3]curl_share_setopt.3
+[gnv.usr.share.man.man3]curl_share_strerror.3
+[gnv.usr.share.man.man3]curl_slist_append.3
+[gnv.usr.share.man.man3]curl_slist_free_all.3
+[gnv.usr.share.man.man3]curl_strequal.3
+[gnv.usr.share.man.man3]curl_unescape.3
+[gnv.usr.share.man.man3]curl_version.3
+[gnv.usr.share.man.man3]curl_version_info.3
+[gnv.usr.share.man.man3]libcurl-easy.3
+[gnv.usr.share.man.man3]libcurl-errors.3
+[gnv.usr.share.man.man3]libcurl-multi.3
+[gnv.usr.share.man.man3]libcurl-share.3
+[gnv.usr.share.man.man3]libcurl-tutorial.3
+[gnv.usr.share.man.man3]libcurl.3
diff --git a/packages/vms/pcsi_product_gnv_curl.com b/packages/vms/pcsi_product_gnv_curl.com
new file mode 100644
index 0000000..747cbd6
--- /dev/null
+++ b/packages/vms/pcsi_product_gnv_curl.com
@@ -0,0 +1,199 @@
+$! File: PCSI_PRODUCT_GNV_CURL.COM
+$!
+$! $Id$
+$!
+$! This command file packages up the product CURL into a sequential
+$! format kit
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 16-Jun-2009 J.Malmberg
+$!
+$!=========================================================================
+$!
+$! Save default
+$ default_dir = f$environment("DEFAULT")
+$!
+$! Put things back on error.
+$ on warning then goto all_exit
+$!
+$!
+$ can_build = 1
+$ producer = f$trnlnm("GNV_PCSI_PRODUCER")
+$ if producer .eqs. ""
+$ then
+$ write sys$output "GNV_PCSI_PRODUCER logical name has not been set."
+$ can_build = 0
+$ endif
+$ producer_full_name = f$trnlnm("GNV_PCSI_PRODUCER_FULL_NAME")
+$ if producer_full_name .eqs. ""
+$ then
+$ write sys$output -
+ "GNV_PCSI_PRODUCER_FULL_NAME logical name has not been set."
+$ can_build = 0
+$ endif
+$ stage_root_name = f$trnlnm("STAGE_ROOT")
+$ if stage_root_name .eqs. ""
+$ then
+$ write sys$output "STAGE_ROOT logical name has not been set."
+$ can_build = 0
+$ endif
+$!
+$ if (can_build .eq. 0)
+$ then
+$ write sys$output "Not able to build a kit."
+$ goto all_exit
+$ endif
+$!
+$! Make sure that the kit name is up to date for this build
+$!----------------------------------------------------------
+$ @MAKE_PCSI_CURL_KIT_NAME.COM
+$!
+$!
+$! Make sure that the image is built
+$!----------------------------------
+$ arch_name = f$edit(f$getsyi("arch_name"),"UPCASE")
+$ if f$search("[--.src]curl.exe") .eqs. ""
+$ then
+$ build_it = 1
+$ libfile = "[.packages.vms.''arch_name']curllib.olb"
+$ if f$search(libfile) .nes. ""
+$ then
+$ build_it = 0
+$ else
+$ ! GNV based build
+$ libfile = "[.lib.^.libs]libcurl.a"
+$ if f$search(libfile) .nes. ""
+$ then
+$ build_it = 0;
+$ endif
+$ endif
+$ if build_it .eq. 1
+$ then
+$ @build_vms list
+$ endif
+$ @gnv_link_curl.com
+$ endif
+$!
+$! Make sure that the release note file name is up to date
+$!---------------------------------------------------------
+$ @BUILD_GNV_CURL_RELEASE_NOTES.COM
+$!
+$!
+$! Make sure that the source has been backed up.
+$!----------------------------------------------
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$ @backup_gnv_curl_src.com
+$!
+$! Regenerate the PCSI description file.
+$!--------------------------------------
+$ @BUILD_GNV_CURL_PCSI_DESC.COM
+$!
+$! Regenerate the PCSI Text file.
+$!---------------------------------
+$ @BUILD_GNV_CURL_PCSI_TEXT.COM
+$!
+$!
+$! Parse the kit name into components.
+$!---------------------------------------
+$ kit_name = f$trnlnm("GNV_PCSI_KITNAME")
+$ if kit_name .eqs. ""
+$ then
+$ write sys$output "@MAKE_PCSI_CURL_KIT_NAME.COM has not been run."
+$ goto all_exit
+$ endif
+$ producer = f$element(0, "-", kit_name)
+$ base = f$element(1, "-", kit_name)
+$ product_name = f$element(2, "-", kit_name)
+$ mmversion = f$element(3, "-", kit_name)
+$ majorver = f$extract(0, 3, mmversion)
+$ minorver = f$extract(3, 2, mmversion)
+$ updatepatch = f$element(4, "-", kit_name)
+$ if updatepatch .eqs. "" then updatepatch = ""
+$!
+$ version_fao = "!AS.!AS"
+$ mmversion = f$fao(version_fao, "''majorver'", "''minorver'")
+$ if updatepatch .nes. ""
+$ then
+$ version = "''mmversion'" + "-" + updatepatch
+$ else
+$ version = "''mmversion'"
+$ endif
+$!
+$ @stage_curl_install remove
+$ @stage_curl_install
+$!
+$! Move to the base directories
+$ set def [--]
+$ current_default = f$environment("DEFAULT")
+$ my_dir = f$parse(current_default,,,"DIRECTORY") - "[" - "<" - ">" - "]"
+$!
+$!
+$!
+$ source = "''default_dir'"
+$ src1 = "new_gnu:[usr.bin],"
+$ src2 = "new_gnu:[usr.include.curl],"
+$ src3 = "new_gnu:[usr.lib],"
+$ src4 = "new_gnu:[usr.lib.pkgconfig],"
+$ src5 = "new_gnu:[usr.share.man.man1],"
+$ src6 = "new_gnu:[usr.share.man.man3],"
+$ src7 = "new_gnu:[vms_src],"
+$ src8 = "new_gnu:[common_src],"
+$ src9 = "prj_root:[''my_dir'],prj_root:[''my_dir'.src]"
+$ gnu_src = src1 + src2 + src3 + src4 + src5 + src6 + src7 + src8 + src9
+$!
+$!
+$ base = ""
+$ if arch_name .eqs. "ALPHA" then base = "AXPVMS"
+$ if arch_name .eqs. "IA64" then base = "I64VMS"
+$ if arch_name .eqs. "VAX" then base = "VAXVMS"
+$!
+$ if base .eqs. "" then exit 44
+$!
+$ pcsi_option = "/option=noconfirm"
+$ if arch_code .eqs. "V"
+$ then
+$ pcsi_option = ""
+$ endif
+$!
+$!
+$product package 'product_name' -
+ /base='base' -
+ /producer='producer' -
+ /source='source' -
+ /destination=STAGE_ROOT:[KIT] -
+ /material=('gnu_src','source') -
+ /format=sequential 'pcsi_option'
+$!
+$!
+$! VAX can not do a compressed kit.
+$! ZIP -9 "-V" does a better job, so no reason to normally build a compressed
+$! kit.
+$!----------------------------------
+$if p1 .eqs. "COMPRESSED"
+$then
+$ if arch_code .nes. "V"
+$ then
+$ product copy /options=(novalidate, noconfirm) /format=compressed -
+ 'product_name' -
+ /source=stage_root:[kit]/dest=stage_root:[kit] -
+ /version='version'/base='base'
+$ endif
+$endif
+$!
+$all_exit:
+$ set def 'default_dir'
+$ exit
diff --git a/packages/vms/readme b/packages/vms/readme
index 22fde88..1b24580 100644
--- a/packages/vms/readme
+++ b/packages/vms/readme
@@ -11,6 +11,11 @@ History:
15-MAR-2004, MSK, Updated to reflect the new files in this directory.
14-FEB-2005, MSK, removed config-vms.h_with* file comments
10-FEB-2010, SMS. General update.
+14-Jul-2013, JEM, General Update, add GNV build information.
+
+
+The release notes installed by the PCSI kit consist of this file and the
+curl_gnv_build_steps.txt and other useful information.
Prerequisites:
@@ -20,37 +25,161 @@ OpenSSL or hp SSL, if you want SSL support
What is Here:
-This directory contains the following files:
+This directory contains the following files for a DCL based build.
+
+backup_gnv_curl_src.com This procedure backs up the source modules for
+ creating a PCSI kit.
+
+build_curl-config_script.com
+ Procedure to create the curl-config script.
+
+build_gnv_curl.com This procedure does a build of curl using the
+ GNV utilities and then uses DCL tools to build
+ the libcurl shared image. The setup_gnv_curl_build.com
+ procedure must be run first.
+
+build_gnv_curl_pcsi_desc.com
+ This procedure builds the pcsi$desc file for
+ creating a PCSI based package.
+
+build_gnv_curl_pcsi_text.com
+ This procedure builds the pcsi$text file for
+ creating a PCSI based package.
+
+build_gnv_curl_release_notes.com
+ This procedure creates the release notes for
+ a PCSI kit based on curl_release_note_start.txt,
+ this readme file, and the curl_gnv_build_steps.txt
+
+build_libcurl_pc.com Procedure to create a libcurl.pc file.
+
+build_vms.com DCL based build procedure.
+
+clean_gnv_curl.com This procedure cleans up the files generated by
+ a GNV based build.
+
+config_h.com DCL based procedure used by build_vms.com
+ to run generate the curl_config.h file.
+ This is a generic procedure that does most
+ of the work for generating config.h files.
+
+compare_curl_source.com Procedure to compare the working directory
+ with a repository directory or a backup staging
+ directory.
+
+curl_crtl_init.c A special pre-initialization routine to for
+ programs to behave more Unix like when run
+ under GNV.
+
+curl_gnv_build_steps.txt
+ Detailed instructions on how to built curl using
+ GNV and how to build the libcurl shared image and
+ PCSI kit.
+
+curl_release_note_start.txt
+ The first part of the curl release notes.
+
+curl_startup.com A procedure run at VMS startup to install the
+ libcurl shared image and to set up the needed
+ logical names.
-build_vms.com Build procedure.
-config-vms.h VMS-specific config.h.
curlmsg.h C header defining cURL status code macros.
+
curlmsg.msg Error message source for curlmsg.h and curlmsg.sdl.
+
curlmsg.sdl SDL source defining cURL status code constants.
+
curlmsg_vms.h Mapping of cURL status codes to VMS-form codes.
-hpssl_alpha.opt LINK options file for HP SSL on Alpha.
-hpssl_ia64.opt LINK options file for HP SSL on IA64.
-hpssl_vax.opt LINK options file for HP SSL on VAX.
-ldap.opt LINK options file for LDAP.
+
+generate_config_vms_h_curl.com
+ DCL procedure to generate the curl specific
+ definitions for curl_config.h that config_h.com
+ can not properly generate.
+
+generate_vax_transfer.com
+ DCL procedure to read an Alpha/IA64 symbol vector
+ linker option file and generate the VAX transfer
+ vector modules.
+
+gnv_conftest.c_first A helper file for the configure script.
+
+gnv_curl_configure.sh A script to run the configure script with the
+ options needed for VMS.
+
+gnv_libcurl_symbols.opt The symbol vectors needed for Alpha and IA64
+ libcurl shared image.
+
+gnv_link_curl.com Links the libcurl shared image and then links a curl
+ image to use the libcurl.
+
+macro32_exactcase.patch The patch file needed to modify VAX Macro32 to be
+ case sensitive and case preserving.
+
Makefile.am cURL kit file list for this directory.
+
Makefile.in cURL kit makefile source for this directory.
-openssl_alpha.opt LINK options file for OpenSSL on Alpha.
-openssl_ia64.opt LINK options file for OpenSSL on IA64.
-openssl_ssl_alpha.opt LINK options file for OpenSSL (SSL_ prefix) on Alpha.
-openssl_ssl_ia64.opt LINK options file for OpenSSL (SSL_ prefix) on IA64.
-openssl_ssl_vax.opt LINK options file for OpenSSL (SSL_ prefix) on VAX.
-openssl_vax.opt LINK options file for OpenSSL on VAX.
+
+make_gnv_curl_install.sh
+ Script to do a make install using GNV after running
+ the configure script.
+
+make_pcsi_curl_kit_name.com
+ This generates the name of the PCSI kit based on
+ the version of curl being built.
+
+pcsi_gnv_curl_file_list.txt
+ This is a text file describing what files should
+ be included in a PCSI kit.
+
+pcsi_product_gnv_curl.com
+ This generates the PCSI kit after the libcurl
+ shared image has been made.
+
readme. This file.
+report_openssl_version.c
+ Program to check that the openssl version is new
+ enough for building a shared libcurl image.
+
+setup_gnv_curl_build.com
+ This procedure sets up symbols and logical names
+ for a GNV build environment and also copies some
+ helper files.
+
+stage_curl_install.com This procedure sets up new_gnu: directory tree to
+ for testing the install and building the PCSI kit.
+ It takes a "remove" option to remove all the staged
+ files.
+
+vms_eco_level.h This sets the ECO level for the PCSI kit name.
+
How to Build:
-The (brute-force) builder is [.packages.vms]build_vms.com. Comments in
-this procedure describe various optional parameters which enable or
-disable optional program features, or which control the build in other
-ways. Product files (.EXE, .H, .LIS, .MAP, .OBJ, .OLB, ...) should be
-produced in an architecture-specific subdirectory under this directory
-([.ALPHA], [.IA64], [.VAX]).
+The GNV based build and the DCL based build procedures are not compatible
+and you must make sure that none of the build files are present before
+running a different type of build. Use the "REALCLEAN" option for
+BUILD_VMS.COM and the "REALCLEAN" option for clean_gnv_curl.com.
+
+The (brute-force) DCL based builder is [.packages.vms]build_vms.com.
+Comments in this procedure describe various optional parameters which
+enable or disable optional program features, or which control the build
+in other ways. Product files (.EXE, .H, .LIS, .MAP, .OBJ, .OLB, ...)
+should be produced in an architecture-specific subdirectory under this
+directory ([.ALPHA], [.IA64], [.VAX]).
+
+The file curl_gnv_build_steps.txt contains information on buildling using
+the GNV tool kit, building a shared libcurl, and producting a PCSI kit for
+distribution. The curl_gnv_build_steps.text is included in the release
+notes file of the PCSI kit.
+
+The building with 64 bit pointers does not currently work.
+
+The build procedure will detect if HP OpenSSL, LDAP, and Kerberos are
+installed and default to building with them.
+
+The build procedure will also detect if a compatible ZLIB shared image
+is installed from a PCSI kit and default to using it.
Example build commands:
@@ -58,13 +187,42 @@ produced in an architecture-specific subdirectory under this directory
@ [.packages.vms]build_vms.com LARGE LDAP
submit /noprint [.packages.vms]build_vms.com /param = (LARGE, LDAP)
+The build_vms.com procedure does not build the shared image file or the PCSI
+kit. If you have built a curl with ZLIB and HPSSL support as well as if
+LDAP and Kerberos installed, you can use the GNV_LINK_CURL.COM file.
+
+The GNV_LINK_CURL.COM contains information on how to link and run with a newer
+version of HP SSL than what may be install on an Alpha or IA64 based system.
+
+To build the PCSI kit, follow the the instructions in the file
+curl_gnv_build_steps.txt.
Other Notes:
+This release fixes known bugs #22, and #57 in the [curl.docs]known_bugs.
+file.
+
+The libcurl formdata.c module and Curl tools post form now have some
+understanding of VMS file types. Files will be posted in STREAM_LF format.
+
+The Curl tool now has some understanding of VMS file types and will upload the
+files in STREAM_LF fomat.
+
+When CURL is uploading a VARIABLE format VMS file, it is less efficient as in
+order to get the file size, it will first read the entire file once, and then
+read the file again for the actual upload.
+
+The Curl tool will now always download files into STREAM_LF format. Even if a
+file by that name with a different format already exists. This is needed to
+allow interrupted downloads to be continued.
+
+
+The libcurl file module still does not understand VMS file types and requires
+the input files to be in STREAM_LF to work propery.
+
The test suites are not supported as of 7.11.0.
The curlmsg.sdl and curlmsg.h files are generated from curlmsg.msg.
This is not done automatically, since the .MSG file is a hand edit
of the relevant stuff from the curl.h file. If you want to do this
yourself you'll need the SDL package from the freeware collection.
-
diff --git a/packages/vms/report_openssl_version.c b/packages/vms/report_openssl_version.c
new file mode 100644
index 0000000..ccb363b
--- /dev/null
+++ b/packages/vms/report_openssl_version.c
@@ -0,0 +1,100 @@
+/* File: report_openssl_version.c
+ *
+ * $Id$
+ *
+ * This file dynamically loads the openssl shared image to report the
+ * version string.
+ *
+ * It will optionally place that version string in a DCL symbol.
+ *
+ * Usage: report_openssl_version <shared_image> [<dcl_symbol>]
+ *
+ * Copyright 2013, John Malmberg
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+#include <dlfcn.h>
+#include <openssl/opensslv.h>
+#include <openssl/crypto.h>
+
+#include <string.h>
+#include <descrip.h>
+#include <libclidef.h>
+#include <stsdef.h>
+#include <errno.h>
+
+unsigned long LIB$SET_SYMBOL(
+ const struct dsc$descriptor_s * symbol,
+ const struct dsc$descriptor_s * value,
+ const unsigned long * table_type);
+
+int main(int argc, char ** argv) {
+
+
+void * libptr;
+const char * (*ssl_version)(int t);
+const char * version;
+
+ if (argc < 1) {
+ puts("report_openssl_version filename");
+ exit(1);
+ }
+
+ libptr = dlopen(argv[1], 0);
+
+ ssl_version = (const char * (*)(int))dlsym(libptr, "SSLeay_version");
+ if ((void *)ssl_version == NULL) {
+ ssl_version = (const char * (*)(int))dlsym(libptr, "ssleay_version");
+ if ((void *)ssl_version == NULL) {
+ ssl_version = (const char * (*)(int))dlsym(libptr, "SSLEAY_VERSION");
+ }
+ }
+
+ dlclose(libptr);
+
+ if ((void *)ssl_version == NULL) {
+ puts("Unable to lookup version of OpenSSL");
+ exit(1);
+ }
+
+ version = ssl_version(SSLEAY_VERSION);
+
+ puts(version);
+
+ /* Was a symbol argument given? */
+ if (argc > 1) {
+ int status;
+ struct dsc$descriptor_s symbol_dsc;
+ struct dsc$descriptor_s value_dsc;
+ const unsigned long table_type = LIB$K_CLI_LOCAL_SYM;
+
+ symbol_dsc.dsc$a_pointer = argv[2];
+ symbol_dsc.dsc$w_length = strlen(argv[2]);
+ symbol_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ symbol_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+ value_dsc.dsc$a_pointer = (char *)version; /* Cast ok */
+ value_dsc.dsc$w_length = strlen(version);
+ value_dsc.dsc$b_dtype = DSC$K_DTYPE_T;
+ value_dsc.dsc$b_class = DSC$K_CLASS_S;
+
+ status = LIB$SET_SYMBOL(&symbol_dsc, &value_dsc, &table_type);
+ if (!$VMS_STATUS_SUCCESS(status)) {
+ exit(status);
+ }
+ }
+
+ exit(0);
+}
diff --git a/packages/vms/setup_gnv_curl_build.com b/packages/vms/setup_gnv_curl_build.com
new file mode 100644
index 0000000..beec733
--- /dev/null
+++ b/packages/vms/setup_gnv_curl_build.com
@@ -0,0 +1,288 @@
+$! File: setup_gnv_curl_build.com
+$!
+$! $Id$
+$!
+$! Set up build environment for building Curl under GNV on VMS.
+$!
+$! GNV needs some files moved into the other directories to help with
+$! the configure script and the build.
+$!
+$! Copyright 2009, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$! 30-May-2009 J. Malmberg
+$!
+$!=======================================================================
+$!
+$! Save this so we can get back.
+$ default_dir = f$environment("default")
+$!
+$! Move to where the Configure script is.
+$ set def [--]
+$!
+$! Get the path to where the Configure script is.
+$ base_dir = f$environment("default")
+$!
+$! Allow arguments to be grouped together with comma or separated by spaces
+$! Do no know if we will need more than 8.
+$ args = "," + p1 + "," + p2 + "," + p3 + "," + p4 + ","
+$ args = args + p5 + "," + p6 + "," + p7 + "," + p8 + ","
+$!
+$! Provide lower case version to simplify parsing.
+$ args_lower = f$edit(args, "LOWERCASE,COLLAPSE")
+$!
+$ args_len = f$length(args)
+$ args_lower_len = f$length(args_lower)
+$!
+$ tests = 0
+$ if f$locate(",test", args_lower) .lt. args_lower_len
+$ then
+$ tests = 1
+$ endif
+$!
+$ examples = 0
+$ if f$locate(",exam", args_lower) .lt. args_lower_len
+$ then
+$ examples = 1
+$ endif
+$!
+$! We want detailed build logs.
+$ clist = "/list/show=(expan,includ)"
+$!
+$! We want full symbol names in exact case. Need a commmon
+$! repository for all directories.
+$ cnames = "/names=(shortened,as_is)/repository=''base_dir'"
+$!
+$! Set the compiler options for GNV CC wrapper to inherit.
+$ cc :== cc'clist''cnames'/nested_include_directory=none
+$ cxx :== cxx'clist''cnames'/nested_include_directory=none
+$ pointer_size = "32"
+$! Note 64 bit pointers requires all libraries to either have
+$! 64 bit pointers or have #pragma directives.
+$! Currently building curl on VMS with 64 bit pointers does not work.
+$!
+$! A logical name to make it easier to find some of the hacks.
+$ define/job gnv_hacks 'base_dir'
+$!
+$! A logical name to find the [.packages.vms] directory where we started.
+$ define/job gnv_packages_vms 'default_dir'
+$!
+$! Kerberos headers:
+$ if f$trnlnm("gssapi") .eqs. ""
+$ then
+$ if f$search("sys$sysroot:[kerberos]include.dir") .nes. ""
+$ then
+$ define/job gssapi sys$sysroot:[kerberos.include]
+$ endif
+$ endif
+$!
+$! OpenSSL headers
+$ if f$trnlnm("openssl") .eqs. ""
+$ then
+$ if f$trnlnm("ssl$include") .nes. ""
+$ then
+$ define/job openssl ssl$include:
+$ endif
+$ endif
+$!
+$! C compiler include path.
+$ define/job decc$system_include prj_root:[.include.curl],-
+ [-.packages.vms],-
+ ssl$include:,gnv$gnu:[usr.include],-
+ gnv$gnu:[usr.include.libz],gnv$gnu:[include],-
+ gnv$zlib_include:,-
+ sys$sysroot:[kerberos.include]
+$!
+$! Set up a include list for the compiler to find all the header files
+$! that they need.
+$!
+$ define/job decc$user_include src_root:[.include.curl]
+$ define ssl_lib sys$library:
+$!
+$! Calculate what is needed in the option files
+$ libzshr_line = ""
+$ try_shr = "gnv$libzshr''pointer_size'"
+$ if f$search(try_shr) .nes. "" then libzshr_line = "''try_shr'/share"
+$ if (libzshr_line .eqs. "")
+$ then
+$ try_shr = "sys$share:" + try_shr
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$ libzshr_line = "''try_shr'/share"
+$ endif
+$ endif
+$!
+$! Kerberos
+$ gssrtlshr_line = ""
+$ try_shr = "sys$share:gss$rtl"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$ gssrtlshr_line = "''try_shr'/share"
+$ endif
+$!
+$! HP OpenSSL
+$ libcryptoshr_line = ""
+$ try_shr = "sys$share:ssl$libcrypto_shr''pointer_size'"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$ libcryptoshr_line = "''try_shr'/share"
+$ endif
+$!
+$ libsslshr_line = ""
+$ try_shr = "sys$share:ssl$libssl_shr''pointer_size'"
+$ if f$search("''try_shr'.exe") .nes. ""
+$ then
+$ libsslshr_line = "''try_shr'/share"
+$ endif
+$!
+$!
+$! Copy over the gnv$conftest* files to base directory.
+$!-----------------------------------------------------
+$ copy 'default_dir'gnv_conftest.c_first 'base_dir'gnv$conftest.c_first
+$ create 'base_dir'gnv$conftest.opt
+$ open/append opt 'base_dir'gnv$conftest.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$ purge 'base_dir'gnv$conftest.*
+$ rename 'base_dir'gnv$conftest.* ;1
+$!
+$!
+$!
+$! GNV helper files for building the test curl binary.
+$!-----------------------------------------------
+$ create [.src]gnv$curl.opt
+$ open/append opt [.src]gnv$curl.opt
+$ write opt "gnv_packages_vms:curlmsg.obj"
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$ purge [.src]gnv$*.*
+$ rename [.src]gnv$*.* ;1
+$!
+$!
+$! Create the libcurl
+$!------------------------------------------------------
+$ create 'default_dir'gnv_libcurl_linker.opt
+$ open/append opt 'default_dir'gnv_libcurl_linker.opt
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$!
+$! Create the template linker file
+$!---------------------------------
+$ create 'default_dir'gnv_template_linker.opt
+$ open/append opt 'default_dir'gnv_template_linker.opt
+$ write opt "gnv_vms_common:vms_curl_init_unix.obj"
+$ if libzshr_line .nes. "" then write opt libzshr_line
+$ if gssrtlshr_line .nes. "" then write opt gssrtlshr_line
+$ if libcryptoshr_line .nes. "" then write opt libcryptoshr_line
+$ if libsslshr_line .nes. "" then write opt libsslshr_line
+$ close opt
+$!
+$! Copy over the gnv$*.opt files for [.docs.examples]
+$!----------------------------------------------------
+$ if examples .ne. 0
+$ then
+$ example_apps = "10-at-a-time,anyauthput,certinfo,cookie_interface,debug"
+$ example_apps = example_apps + ",fileupload,fopen,ftpget,ftpgetresp"
+$ example_apps = example_apps + ",ftpupload,getinfo,getinmemory"
+$ example_apps = example_apps + ",http-post,httpcustomheader,httpput"
+$ example_apps = example_apps + ",https,multi-app,multi-debugcallback"
+$ example_apps = example_apps + ",multi-double,multi-post,multi-single"
+$ example_apps = example_apps + ",persistant,post-callback,postit2"
+$ example_apps = example_apps + ",sendrecv,sepheaders,simple,simplepost"
+$ example_apps = example_apps + ",simplessl"
+$!
+$ i = 0
+$example_loop:
+$ ap_name = f$element(i, ",", example_apps)
+$ if ap_name .eqs. "," then goto example_loop_end
+$ if ap_name .eqs. "" then goto example_loop_end
+$ copy 'default_dir'gnv_template_linker.opt -
+ [.docs.examples]gnv$'ap_name'.opt
+$ i = i + 1
+$ goto example_loop
+$example_loop_end:
+$!
+$! clean up the copy.
+$ purge [.docs.examples]gnv$*.opt
+$ rename [.docs.examples]gnv$*.opt ;1
+$ endif
+$!
+$!
+$ if tests .ne. 0
+$ then
+$ libtest_apps = "lib500,lib501,lib502,lib503,lib504,lib505,lib506,lib507"
+$ libtest_apps = libtest_apps + ",lib508,lib510,lib511,lib512,lib513,lib514"
+$ libtest_apps = libtest_apps + ",lib515,lib516,lib517,lib518,lib519,lib520"
+$ libtest_apps = libtest_apps + ",lib521,lib523,lib524,lib525,lib526,lib527"
+$ libtest_apps = libtest_apps + ",lib529,lib530,lib532,lib533,lib536,lib537"
+$ libtest_apps = libtest_apps + ",lib539,lib540,lib541,lib542,lib543,lib544"
+$ libtest_apps = libtest_apps + ",lib545,lib547,lib548,lib549,lib552,lib553"
+$ libtest_apps = libtest_apps + ",lib554,lib555,lib556,lib557,lib558,lib559"
+$ libtest_apps = libtest_apps + ",lib560,lib562,lib564"
+$ i = 0
+$libtest_loop:
+$ ap_name = f$element(i, ",", libtest_apps)
+$ if ap_name .eqs. "," then goto libtest_loop_end
+$ if ap_name .eqs. "" then goto libtest_loop_end
+$ copy 'default_dir'gnv_template_linker.opt -
+ [.tests.libtest]gnv$'ap_name'.opt
+$ i = i + 1
+$ goto libtest_loop
+$libtest_loop_end:
+$!
+$! clean up the copy.
+$ purge [.tests.libtest]gnv$*.opt
+$ rename [.tests.libtest]gnv$*.opt ;1
+$ endif
+$!
+$!
+$! Build the Message file.
+$!--------------------------
+$ if f$search("[.packages.vms]curlmsg.obj") .eqs. ""
+$ then
+$ message [.packages.vms]curlmsg.msg/object=[.packages.vms]
+$ endif
+$ if f$search("gnv$curlmsg.exe") .eqs. ""
+$ then
+$ link/share=gnv$curlmsg.exe [.packages.vms]curlmsg.obj
+$ endif
+$!
+$!
+$!
+$! Need to build the common init module.
+$!-------------------------------------------
+$ init_obj = "[.packages.vms]curl_crtl_init.obj"
+$ if f$search(init_obj) .eqs. ""
+$ then
+$ cc'cflags' 'default_dir'curl_crtl_init.c/obj='init_obj'
+$ purge 'init_obj'
+$ rename 'init_obj' ;1
+$ endif
+$!
+$all_exit:
+$!
+$ set def 'default_dir'
+$!
+$! Verify can break things in bash, especially in Configure scripts.
+$ set nover
+$ exit
diff --git a/packages/vms/stage_curl_install.com b/packages/vms/stage_curl_install.com
new file mode 100644
index 0000000..0dccdd6
--- /dev/null
+++ b/packages/vms/stage_curl_install.com
@@ -0,0 +1,177 @@
+$! File: stage_curl_install.com
+$!
+$! $Id$
+$!
+$! This updates or removes the GNV$CURL.EXE and related files for the
+$! new_gnu:[*...] directory tree for running the self tests.
+$!
+$! The files installed/removed are:
+$! [usr.bin]gnv$curl.exe
+$! [usr.bin]curl-config.
+$! [usr.lib]gnv$libcurl.exe
+$! [usr.bin]curl. hard link for [usr.bin]gnv$curl.exe
+$! [usr.include.curl]curl.h
+$! [usr.include.curl]curlbuild.h
+$! [usr.include.curl]curlrules.h
+$! [usr.include.curl]curlver.h
+$! [usr.include.curl]easy.h
+$! [usr.include.curl]mprintf.h
+$! [usr.include.curl]multi.h
+$! [usr.include.curl]stdcheaders.h
+$! [usr.include.curl]typecheck-gcc.h
+$! [usr.lib.pkgconfig]libcurl.pc
+$! [usr.share.man.man1]curl-config.1
+$! [usr.share.man.man1]curl.1
+$! [usr.share.man.man3]curl*.3
+$! [usr.share.man.man3]libcurl*.3
+$! Future: A symbolic link to the release notes?
+$!
+$! Copyright 2012, John Malmberg
+$!
+$! Permission to use, copy, modify, and/or distribute this software for any
+$! purpose with or without fee is hereby granted, provided that the above
+$! copyright notice and this permission notice appear in all copies.
+$!
+$! THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+$! WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+$! MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+$! ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+$! WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+$! ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+$! OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+$!
+$!
+$! 20-Aug-2012 J. Malmberg
+$!
+$!===========================================================================
+$!
+$ arch_type = f$getsyi("ARCH_NAME")
+$ arch_code = f$extract(0, 1, arch_type)
+$!
+$ if arch_code .nes. "V"
+$ then
+$ set proc/parse=extended
+$ endif
+$!
+$!
+$! If the first parameter begins with "r" or "R" then this is to
+$! remove the files instead of installing them.
+$ remove_filesq = f$edit(p1, "upcase,trim")
+$ remove_filesq = f$extract(0, 1, remove_filesq)
+$ remove_files = 0
+$ if remove_filesq .eqs. "R" then remove_files = 1
+$!
+$!
+$! If we are staging files, make sure that the libcurl.pc and curl-config
+$! files are present.
+$ if remove_files .eq. 0
+$ then
+$ if f$search("[--]libcurl.pc") .eqs. ""
+$ then
+$ @build_libcurl_pc.com
+$ endif
+$ if f$search("[--]curl-config") .eqs. ""
+$ then
+$ @build_curl-config_script.com
+$ endif
+$ endif
+$!
+$!
+$! Dest dirs
+$!------------------
+$ dest_dirs1 = "[usr],[usr.bin],[usr.include],[usr.include.curl]"
+$ dest_dirs2 = ",[usr.bin],[usr.lib.pkgconfig],[usr.share]"
+$ dest_dirs3 = ",[usr.share.man],[usr.share.man.man1],[usr.share.man.man3]"
+$ dest_dirs = dest_dirs1 + dest_dirs2 + dest_dirs3
+$!
+$!
+$! Alias links needed.
+$!-------------------------
+$ source_curl = "gnv$curl.exe"
+$ dest_curl = "[bin]gnv$curl.exe"
+$ curl_links = "[bin]curl."
+$ new_gnu = "new_gnu:"
+$!
+$!
+$! Create the directories if they do not exist
+$!---------------------------------------------
+$ i = 0
+$curl_dir_loop:
+$ this_dir = f$element(i, ",", dest_dirs)
+$ i = i + 1
+$ if this_dir .eqs. "" then goto curl_dir_loop
+$ if this_dir .eqs. "," then goto curl_dir_loop_end
+$! Just create the directories, do not delete them.
+$! --------------------------------------------------
+$ if remove_files .eq. 0
+$ then
+$ create/dir 'new_gnu''this_dir'/prot=(o:rwed)
+$ endif
+$ goto curl_dir_loop
+$curl_dir_loop_end:
+$!
+$!
+$! Need to add in the executable file
+$!-----------------------------------
+$ if remove_files .eq. 0
+$ then
+$ copy [--.src]curl.exe 'new_gnu'[usr.bin]gnv$curl.exe/prot=w:re
+$ copy [--]curl-config. 'new_gnu'[usr.bin]curl-config./prot=w:re
+$ copy sys$disk:[]gnv$libcurl.exe 'new_gnu'[usr.lib]gnv$libcurl.exe/prot=w:re
+$ endif
+$!
+$ if remove_files .eq. 0
+$ then
+$ set file/enter='new_gnu'[bin]curl. 'new_gnu'[usr.bin]gnv$curl.exe
+$ else
+$ file = "''new_gnu'[bin]curl."
+$ if f$search(file) .nes. "" then set file/remove 'file';*
+$ endif
+$!
+$!
+$ if remove_files .eq. 0
+$ then
+$ copy [--.include.curl]curl.h 'new_gnu'[usr.include.curl]curl.h
+$ copy [--.include.curl]curlbuild.h -
+ 'new_gnu'[usr.include.curl]curlbuild.h
+$ copy [--.include.curl]curlrules.h -
+ 'new_gnu'[usr.include.curl]curlrules.h
+$ copy [--.include.curl]curlver.h -
+ 'new_gnu'[usr.include.curl]curlver.h
+$ copy [--.include.curl]easy.h -
+ 'new_gnu'[usr.include.curl]easy.h
+$ copy [--.include.curl]mprintf.h -
+ 'new_gnu'[usr.include.curl]mprintf.h
+$ copy [--.include.curl]multi.h -
+ 'new_gnu'[usr.include.curl]multi.h
+$ copy [--.include.curl]stdcheaders.h -
+ 'new_gnu'[usr.include.curl]stdcheaders.h
+$ copy [--.include.curl]typecheck-gcc.h -
+ 'new_gnu'[usr.include.curl]typecheck-gcc.h
+$ copy [--]libcurl.pc 'new_gnu'[usr.lib.pkgconfig]libcurl.pc
+$!
+$ copy [--.docs]curl-config.1 'new_gnu'[usr.share.man.man1]curl-config.1
+$ copy [--.docs]curl.1 'new_gnu'[usr.share.man.man1]curl.1
+$!
+$ copy [--.docs.libcurl]*.3 -
+ 'new_gnu'[usr.share.man.man3]*.3
+$!
+$ else
+$ file = "''new_gnu'[usr.bin]curl-config."
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.bin]gnv$curl.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.lib]gnv$libcurl.exe"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.include.curl]*.h"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.share.man.man1]curl-config.1"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.share.man.man1]curl.1"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.share.man.man3]curl*.3"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ file = "''new_gnu'[usr.share.man.man3]libcurl*.3"
+$ if f$search(file) .nes. "" then delete 'file';*
+$ endif
+$!
diff --git a/packages/vms/vms_eco_level.h b/packages/vms/vms_eco_level.h
new file mode 100644
index 0000000..4353407
--- /dev/null
+++ b/packages/vms/vms_eco_level.h
@@ -0,0 +1,30 @@
+/* File: vms_eco_level.h
+ *
+ * $Id$
+ *
+ * Copyright 2012, John Malmberg
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ */
+
+/* This file should be incremented for each ECO that is kit */
+/* for a specific cURL x.y-z release. */
+/* When any part of x.y-z is incremented, the ECO should be set back to 0 */
+
+#ifndef _VMS_ECO_LEVEL_H
+#define _VMS_ECO_LEVEL_H
+
+#define VMS_ECO_LEVEL "0"
+
+#endif