FPII-2570: Import clean 7.51.0

Change-Id: I51e115332e3437ce72df75b4a5efbac83a1d37e5
diff --git a/packages/AIX/Makefile.in b/packages/AIX/Makefile.in
deleted file mode 100644
index 09d1385..0000000
--- a/packages/AIX/Makefile.in
+++ /dev/null
@@ -1,563 +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/AIX
-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 =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-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@
-SUBDIRS = RPM
-EXTRA_DIST = Makefile.am
-all: all-recursive
-
-.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) --gnu  packages/AIX/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  packages/AIX/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:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-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
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-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-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags 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 installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	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/AIX/RPM/.gitignore b/packages/AIX/RPM/.gitignore
new file mode 100644
index 0000000..cf17733
--- /dev/null
+++ b/packages/AIX/RPM/.gitignore
@@ -0,0 +1 @@
+curl.spec
diff --git a/packages/AIX/RPM/Makefile.in b/packages/AIX/RPM/Makefile.in
deleted file mode 100644
index 7c4a555..0000000
--- a/packages/AIX/RPM/Makefile.in
+++ /dev/null
@@ -1,408 +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/AIX/RPM
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/curl.spec.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 = curl.spec
-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 = README curl.spec.in
-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) --gnu  packages/AIX/RPM/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  packages/AIX/RPM/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
-curl.spec: $(top_builddir)/config.status $(srcdir)/curl.spec.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-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/AIX/RPM/curl.spec.in b/packages/AIX/RPM/curl.spec.in
index a37e0d7..c64a0b7 100644
--- a/packages/AIX/RPM/curl.spec.in
+++ b/packages/AIX/RPM/curl.spec.in
@@ -16,7 +16,7 @@
 Vendor: Daniel Stenberg <Daniel.Stenberg@haxx.se>
 Group: Applications/Internet
 Source: %{name}-%{version}.tar.bz2
-URL: http://curl.haxx.se/
+URL: https://curl.haxx.se/
 Provides: curl
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 Prefix: %{_prefix}
@@ -105,6 +105,7 @@
 %defattr(-,root,root)
 %attr(0755,root,root) %{_bindir}/curl
 %attr(0644,root,root) %{_mandir}/man1/curl.1*
+%attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
 %{_libdir}/libcurl.a
 %if %{SSL} == 1
 %{_datadir}/curl/curl-ca-bundle.crt
@@ -124,6 +125,7 @@
 %defattr(-,root,root)
 %attr(0755,root,root) %{_bindir}/curl-config
 %attr(0644,root,root) %{_mandir}/man1/curl-config.1*
+%attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
 %attr(0644,root,root) %{_mandir}/man3/*
 %attr(0644,root,root) %{_includedir}/curl/*
 %{_libdir}/libcurl.la
diff --git a/packages/Android/Android.mk b/packages/Android/Android.mk
new file mode 100644
index 0000000..301ab9e
--- /dev/null
+++ b/packages/Android/Android.mk
@@ -0,0 +1,112 @@
+# Google Android makefile for curl and libcurl
+#
+# This file can be used when building curl using the full Android source
+# release or the NDK. Most users do not want or need to do this; please
+# instead read the Android section in docs/INSTALL for alternate
+# methods.
+#
+# Place the curl source (including this makefile) into external/curl/ in the
+# Android source tree.  Then build them with 'make curl' or just 'make libcurl'
+# from the Android root. Tested with Android versions 1.5, 2.1-2.3
+#
+# Note: you must first create a curl_config.h file by running configure in the
+# Android environment. The only way I've found to do this is tricky. Perform a
+# normal Android build with libcurl in the source tree, providing the target
+# "showcommands" to make. The build will eventually fail (because curl_config.h
+# doesn't exist yet), but the compiler commands used to build curl will be
+# shown. Now, from the external/curl/ directory, run curl's normal configure
+# command with flags that match what Android itself uses. This will mean
+# putting the compiler directory into the PATH, putting the -I, -isystem and
+# -D options into CPPFLAGS, putting the -W, -m, -f, -O and -nostdlib options
+# into CFLAGS, and putting the -Wl, -L and -l options into LIBS, along with the
+# path to the files libgcc.a, crtbegin_dynamic.o, and ccrtend_android.o.
+# Remember that the paths must be absolute since you will not be running
+# configure from the same directory as the Android make.  The normal
+# cross-compiler options must also be set. Note that the -c, -o, -MD and
+# similar flags must not be set.
+#
+# To see all the LIBS options, you'll need to do the "showcommands" trick on an
+# executable that's already buildable and watch what flags Android uses to link
+# it (dhcpcd is a good choice to watch). You'll also want to add -L options to
+# LIBS that point to the out/.../obj/lib/ and out/.../obj/system/lib/
+# directories so that additional libraries can be found and used by curl.
+#
+# The end result will be a configure command that looks something like this
+# (the environment variable A is set to the Android root path which makes the
+# command shorter):
+#
+#  A=`realpath ../..` && \
+#  PATH="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/bin:$PATH" \
+#  ./configure --host=arm-linux CC=arm-eabi-gcc \
+#  CPPFLAGS="-I $A/system/core/include ..." \
+#  CFLAGS="-nostdlib -fno-exceptions -Wno-multichar ..." \
+#  LIBS="$A/prebuilt/linux-x86/toolchain/arm-eabi-X/lib/gcc/arm-eabi/X\
+#  /interwork/libgcc.a ..."
+#
+# Finally, copy the file COPYING to NOTICE so that the curl license gets put
+# into the right place (but see the note about this below).
+#
+# Dan Fandrich
+# November 2011
+
+LOCAL_PATH:= $(call my-dir)/../..
+
+common_CFLAGS := -Wpointer-arith -Wwrite-strings -Wunused -Winline -Wnested-externs -Wmissing-declarations -Wmissing-prototypes -Wno-long-long -Wfloat-equal -Wno-multichar -Wsign-compare -Wno-format-nonliteral -Wendif-labels -Wstrict-prototypes -Wdeclaration-after-statement -Wno-system-headers -DHAVE_CONFIG_H
+
+#########################
+# Build the libcurl library
+
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/lib/Makefile.inc
+CURL_HEADERS := \
+	curlbuild.h \
+	curl.h \
+	curlrules.h \
+	curlver.h \
+	easy.h \
+	mprintf.h \
+	multi.h \
+	stdcheaders.h \
+	typecheck-gcc.h
+
+LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES))
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/include/
+LOCAL_CFLAGS += $(common_CFLAGS)
+
+LOCAL_COPY_HEADERS_TO := libcurl/curl
+LOCAL_COPY_HEADERS := $(addprefix include/curl/,$(CURL_HEADERS))
+
+LOCAL_MODULE:= libcurl
+LOCAL_MODULE_TAGS := optional
+
+# Copy the licence to a place where Android will find it.
+# Actually, this doesn't quite work because the build system searches
+# for NOTICE files before it gets to this point, so it will only be seen
+# on subsequent builds.
+ALL_PREBUILT += $(LOCAL_PATH)/NOTICE
+$(LOCAL_PATH)/NOTICE: $(LOCAL_PATH)/COPYING | $(ACP)
+	$(copy-file-to-target)
+
+include $(BUILD_STATIC_LIBRARY)
+
+
+#########################
+# Build the curl binary
+
+include $(CLEAR_VARS)
+include $(LOCAL_PATH)/src/Makefile.inc
+LOCAL_SRC_FILES := $(addprefix src/,$(CURL_CFILES))
+
+LOCAL_MODULE := curl
+LOCAL_MODULE_TAGS := optional
+LOCAL_STATIC_LIBRARIES := libcurl
+LOCAL_SYSTEM_SHARED_LIBRARIES := libc
+
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)/lib
+
+# This may also need to include $(CURLX_CFILES) in order to correctly link
+# if libcurl is changed to be built as a dynamic library
+LOCAL_CFLAGS += $(common_CFLAGS)
+
+include $(BUILD_EXECUTABLE)
+
diff --git a/packages/DOS/common.dj b/packages/DOS/common.dj
index a32f10c..85b611c 100644
--- a/packages/DOS/common.dj
+++ b/packages/DOS/common.dj
@@ -13,7 +13,7 @@
 OBJ_DIR = djgpp
 
 #
-# Find out if using a UNIX-like shell or a DOS command interpreter
+# Find out if using a Unix-like shell or a DOS command interpreter
 #
 ifneq ($(findstring COMMAND.COM,$(SHELL)),COMMAND.COM)
   ifneq ($(findstring CMD.EXE,$(SHELL)),CMD.EXE)
@@ -92,7 +92,7 @@
 CC   = gcc
 YACC = bison -y
 
-CFLAGS = -g -gcoff -O2 -I. -I$(TOPDIR)/include -I$(TOPDIR)/lib \
+CFLAGS = -g -O2 -I. -I$(TOPDIR)/include -I$(TOPDIR)/lib \
          -I$(WATT32_ROOT)/inc -Wall -DHAVE_CONFIG_H
 
 ifeq ($(USE_SSL),1)
diff --git a/packages/EPM/.gitignore b/packages/EPM/.gitignore
new file mode 100644
index 0000000..505a4fd
--- /dev/null
+++ b/packages/EPM/.gitignore
@@ -0,0 +1 @@
+curl.list
diff --git a/packages/EPM/Makefile.in b/packages/EPM/Makefile.in
deleted file mode 100644
index 122015e..0000000
--- a/packages/EPM/Makefile.in
+++ /dev/null
@@ -1,409 +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/EPM
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/curl.list.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 = curl.list
-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@
-AUTOMAKE_OPTIONS = foreign
-EXTRA_DIST = README curl.list.in
-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/EPM/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --foreign  packages/EPM/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
-curl.list: $(top_builddir)/config.status $(srcdir)/curl.list.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-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/EPM/README b/packages/EPM/README
index 3529dbf..0b031e8 100644
--- a/packages/EPM/README
+++ b/packages/EPM/README
@@ -1,4 +1,4 @@
-EPM is a free UNIX software/file packaging program that generates distribution
+EPM is a free Unix software/file packaging program that generates distribution
 archives from a list of files. EPM Can:
 
  * Generate portable script-based distribution packages complete with
diff --git a/packages/EPM/curl.list.in b/packages/EPM/curl.list.in
index 39060dd..00f05fb 100644
--- a/packages/EPM/curl.list.in
+++ b/packages/EPM/curl.list.in
@@ -23,6 +23,7 @@
 
 f 0644 cowo pppusers ${mandir}/man1/curl.1 ./docs/curl.1
 f 0644 cowo pppusers ${mandir}/man1/curl-config.1 ./docs/curl-config.1
+f 0644 cowo pppusers ${mandir}/man1/mk-ca-bundle.1 ./docs/mk-ca-bundle.1
 f 0644 cowo pppusers ${mandir}/man3/curl_easy_cleanup.3 ./docs/curl_easy_cleanup.3
 f 0644 cowo pppusers ${mandir}/man3/curl_easy_getinfo.3 ./docs/curl_easy_getinfo.3
 f 0644 cowo pppusers ${mandir}/man3/curl_easy_init.3 ./docs/curl_easy_init.3
diff --git a/packages/Linux/Makefile.in b/packages/Linux/Makefile.in
deleted file mode 100644
index cc2a027..0000000
--- a/packages/Linux/Makefile.in
+++ /dev/null
@@ -1,562 +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/Linux
-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 =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-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@
-SUBDIRS = RPM
-all: all-recursive
-
-.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) --gnu  packages/Linux/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  packages/Linux/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:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-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
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-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-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags 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 installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	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/Linux/RPM/.gitignore b/packages/Linux/RPM/.gitignore
new file mode 100644
index 0000000..0b359fe
--- /dev/null
+++ b/packages/Linux/RPM/.gitignore
@@ -0,0 +1,2 @@
+curl-ssl.spec
+curl.spec
diff --git a/packages/Linux/RPM/Makefile.in b/packages/Linux/RPM/Makefile.in
deleted file mode 100644
index 46b6955..0000000
--- a/packages/Linux/RPM/Makefile.in
+++ /dev/null
@@ -1,410 +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/Linux/RPM
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/curl-ssl.spec.in $(srcdir)/curl.spec.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 = curl.spec curl-ssl.spec
-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 = README curl-ssl.spec.in curl.spec.in make_curl_rpm
-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) --gnu  packages/Linux/RPM/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  packages/Linux/RPM/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
-curl.spec: $(top_builddir)/config.status $(srcdir)/curl.spec.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-curl-ssl.spec: $(top_builddir)/config.status $(srcdir)/curl-ssl.spec.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-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/Linux/RPM/curl-ssl.spec.in b/packages/Linux/RPM/curl-ssl.spec.in
index 7f290ba..5b45bb1 100644
--- a/packages/Linux/RPM/curl-ssl.spec.in
+++ b/packages/Linux/RPM/curl-ssl.spec.in
@@ -14,7 +14,7 @@
 Packager: Troy Engel <tengel@sonic.net>
 Group: Utilities/Console
 Source: %{tarball}-%{version}.tar.gz
-URL: http://curl.haxx.se/
+URL: https://curl.haxx.se/
 Provides: curl
 Obsoletes: curl
 BuildRoot: %{_tmppath}/%{tarball}-%{version}-root
@@ -66,6 +66,7 @@
 %defattr(-,root,root)
 %attr(0755,root,root) %{_bindir}/curl
 %attr(0644,root,root) %{_mandir}/man1/curl.1*
+%attr(0644,root,root) %{_mandir}/man1/mk-ca-bundle.1
 %{_libdir}/libcurl.so*
 %{_datadir}/curl/curl-ca-bundle.crt
 %doc CHANGES COPYING README testcurl.sh docs/BUGS docs/SSLCERTS
diff --git a/packages/Linux/RPM/curl.spec.in b/packages/Linux/RPM/curl.spec.in
index 2382f57..59577b0 100644
--- a/packages/Linux/RPM/curl.spec.in
+++ b/packages/Linux/RPM/curl.spec.in
@@ -14,7 +14,7 @@
 Packager: Loic Dachary <loic@senga.org>
 Group: Utilities/Console
 Source: %{name}-%{version}.tar.gz
-URL: http://curl.haxx.se/
+URL: https://curl.haxx.se/
 BuildRoot: /tmp/%{name}-%{version}-root
 
 %description
diff --git a/packages/Makefile.am b/packages/Makefile.am
index e211c0a..bef04f3 100644
--- a/packages/Makefile.am
+++ b/packages/Makefile.am
@@ -4,6 +4,7 @@
 	DOS/README 			\
 	DOS/common.dj 			\
 	NetWare/get_ver.awk 		\
+	NetWare/get_exp.awk 		\
 	OS400/README.OS400 		\
 	OS400/ccsidcurl.c 		\
 	OS400/ccsidcurl.h 		\
@@ -28,5 +29,5 @@
 	Symbian/readme.txt 		\
 	TPF/curl.mak 			\
 	TPF/maketpf.env_curl 		\
-	TPF/maketpf.env_curllib
-
+	TPF/maketpf.env_curllib         \
+	Android/Android.mk
diff --git a/packages/Makefile.in b/packages/Makefile.in
deleted file mode 100644
index da71578..0000000
--- a/packages/Makefile.in
+++ /dev/null
@@ -1,593 +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
-DIST_COMMON = README $(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 =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-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@
-SUBDIRS = Win32 Linux Solaris EPM AIX vms
-EXTRA_DIST = README 			\
-	DOS/README 			\
-	DOS/common.dj 			\
-	NetWare/get_ver.awk 		\
-	OS400/README.OS400 		\
-	OS400/ccsidcurl.c 		\
-	OS400/ccsidcurl.h 		\
-	OS400/curl.inc.in 		\
-	OS400/initscript.sh 		\
-	OS400/make-include.sh 		\
-	OS400/make-lib.sh 		\
-	OS400/make-src.sh 		\
-	OS400/make-tests.sh 		\
-	OS400/makefile.sh 		\
-	OS400/os400sys.c 		\
-	OS400/os400sys.h 		\
-	Symbian/bwins/libcurlu.def 	\
-	Symbian/eabi/libcurlu.def 	\
-	Symbian/group/bld.inf 		\
-	Symbian/group/curl.iby 		\
-	Symbian/group/curl.mmp 		\
-	Symbian/group/curl.pkg 		\
-	Symbian/group/libcurl.iby 	\
-	Symbian/group/libcurl.mmp 	\
-	Symbian/group/libcurl.pkg 	\
-	Symbian/readme.txt 		\
-	TPF/curl.mak 			\
-	TPF/maketpf.env_curl 		\
-	TPF/maketpf.env_curllib
-
-all: all-recursive
-
-.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) --gnu  packages/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  packages/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:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/DOS $(distdir)/NetWare $(distdir)/OS400 $(distdir)/Symbian $(distdir)/Symbian/bwins $(distdir)/Symbian/eabi $(distdir)/Symbian/group $(distdir)/TPF
-	@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
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-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-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags 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 installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	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/NetWare/get_exp.awk b/packages/NetWare/get_exp.awk
new file mode 100644
index 0000000..566e891
--- /dev/null
+++ b/packages/NetWare/get_exp.awk
@@ -0,0 +1,72 @@
+# ***************************************************************************
+# *                                  _   _ ____  _
+# *  Project                     ___| | | |  _ \| |
+# *                             / __| | | | |_) | |
+# *                            | (__| |_| |  _ <| |___
+# *                             \___|\___/|_| \_\_____|
+# *
+# * Copyright (C) 1998 - 2012, 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 https://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.
+# *
+# ***************************************************************************
+# awk script which fetches curl function symbols from public header input
+# files and write them to STDOUT. Here you can get an awk version for Win32:
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
+#
+BEGIN {
+  add_symbol("curl_strequal")
+  add_symbol("curl_strnequal")
+}
+
+function add_symbol(sym_name) {
+  sub(" ", "", sym_name)
+  exports[++idx] = sym_name
+}
+
+
+/^CURL_EXTERN .* [*]?curl_.*[(]/ {
+  sub("[(].*", "")
+  sub("^.* ", "")
+  sub("^[*]", "")
+  add_symbol($0)
+}
+
+END {
+  printf("Added %d symbols to export list.\n", idx) > "/dev/stderr"
+  # sort symbols with shell sort
+  increment = int(idx / 2)
+  while (increment > 0) {
+    for (i = increment+1; i <= idx; i++) {
+      j = i
+      temp = exports[i]
+      while ((j >= increment+1) && (exports[j-increment] > temp)) {
+        exports[j] = exports[j-increment]
+        j -= increment
+      }
+      exports[j] = temp
+    }
+    if (increment == 2)
+      increment = 1
+    else
+      increment = int(increment*5/11)
+  }
+  # print the array
+  if (EXPPREFIX) {
+    printf(" (%s)\n", EXPPREFIX)
+  }
+  while (x < idx - 1) {
+    printf(" %s,\n", exports[++x])
+  }
+  printf(" %s\n", exports[++x])
+}
+
diff --git a/packages/NetWare/get_ver.awk b/packages/NetWare/get_ver.awk
index 2f3b308..03ee5ec 100644
--- a/packages/NetWare/get_ver.awk
+++ b/packages/NetWare/get_ver.awk
@@ -5,11 +5,11 @@
 # *                            | (__| |_| |  _ <| |___
 # *                             \___|\___/|_| \_\_____|
 # *
-# * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+# * Copyright (C) 1998 - 2012, 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.
+# * are also available at https://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
@@ -19,57 +19,26 @@
 # * KIND, either express or implied.
 # *
 # ***************************************************************************
-# awk script which fetches curl / ares version number and string from input
+# awk script which fetches curl version number and copyright string from input
 # file and writes them to STDOUT. Here you can get an awk version for Win32:
-# http://www.gknw.net/development/prgtools/awk-20070501.zip
+# http://www.gknw.net/development/prgtools/awk-20100523.zip
 #
 BEGIN {
-  if (match (ARGV[1], /curlver.h/)) {
-    while ((getline < ARGV[1]) > 0) {
-      if (match ($0, /^#define LIBCURL_COPYRIGHT "[^"]+"$/)) {
-        libcurl_copyright_str = substr($0, 28, length($0)-28);
-      }
-      else if (match ($0, /^#define LIBCURL_VERSION "[^"]+"$/)) {
-        libcurl_ver_str = substr($3, 2, length($3)-2);
-      }
-      else if (match ($0, /^#define LIBCURL_VERSION_MAJOR [0-9]+$/)) {
-        libcurl_ver_major = substr($3, 1, length($3));
-      }
-      else if (match ($0, /^#define LIBCURL_VERSION_MINOR [0-9]+$/)) {
-        libcurl_ver_minor = substr($3, 1, length($3));
-      }
-      else if (match ($0, /^#define LIBCURL_VERSION_PATCH [0-9]+$/)) {
-        libcurl_ver_patch = substr($3, 1, length($3));
-      }
-    }
-    libcurl_ver = libcurl_ver_major "," libcurl_ver_minor "," libcurl_ver_patch;
-    print "LIBCURL_VERSION = " libcurl_ver "";
-    print "LIBCURL_VERSION_STR = " libcurl_ver_str "";
-    print "LIBCURL_COPYRIGHT_STR = " libcurl_copyright_str "";
+  while ((getline < ARGV[1]) > 0) {
+    sub("\r", "") # make MSYS gawk work with CRLF header input.
+    if (match ($0, /^#define LIBCURL_COPYRIGHT "([^"]+)"$/))
+      copyright_string = substr($0, 28, length($0)-28)
+    else if (match ($0, /^#define LIBCURL_VERSION "[^"]+"$/))
+      version_string = substr($3, 2, length($3)-2)
+    else if (match ($0, /^#define LIBCURL_VERSION_MAJOR [0-9]+$/))
+      version_major = $3
+    else if (match ($0, /^#define LIBCURL_VERSION_MINOR [0-9]+$/))
+      version_minor = $3
+    else if (match ($0, /^#define LIBCURL_VERSION_PATCH [0-9]+$/))
+      version_patch = $3
   }
-  if (match (ARGV[1], /ares_version.h/)) {
-    while ((getline < ARGV[1]) > 0) {
-      if (match ($0, /^#define ARES_COPYRIGHT "[^"]+"$/)) {
-        libcares_copyright_str = substr($0, 25, length($0)-25);
-      }
-      else if (match ($0, /^#define ARES_VERSION_STR "[^"]+"$/)) {
-        libcares_ver_str = substr($3, 2, length($3)-2);
-      }
-      else if (match ($0, /^#define ARES_VERSION_MAJOR [0-9]+$/)) {
-        libcares_ver_major = substr($3, 1, length($3));
-      }
-      else if (match ($0, /^#define ARES_VERSION_MINOR [0-9]+$/)) {
-        libcares_ver_minor = substr($3, 1, length($3));
-      }
-      else if (match ($0, /^#define ARES_VERSION_PATCH [0-9]+$/)) {
-        libcares_ver_patch = substr($3, 1, length($3));
-      }
-    }
-    libcares_ver = libcares_ver_major "," libcares_ver_minor "," libcares_ver_patch;
-    print "LIBCARES_VERSION = " libcares_ver "";
-    print "LIBCARES_VERSION_STR = " libcares_ver_str "";
-    print "LIBCARES_COPYRIGHT_STR = " libcares_copyright_str "";
-  }
+  print "LIBCURL_VERSION = " version_major "," version_minor "," version_patch
+  print "LIBCURL_VERSION_STR = " version_string
+  print "LIBCURL_COPYRIGHT_STR = " copyright_string
 }
 
-
diff --git a/packages/OS400/README.OS400 b/packages/OS400/README.OS400
index 746bba8..24cf39e 100644
--- a/packages/OS400/README.OS400
+++ b/packages/OS400/README.OS400
@@ -39,22 +39,21 @@
 order to force libcurl enums of being type int (the pragma disposition in use
 before inclusion is restored before resuming the including unit compilation).
 
-  Three SSL implementations were present in libcurl. Nevertheless, none of them
-is available on OS/400. To support SSL on OS/400, a fourth implementation has
-been added (qssl.[ch]). There is no way to have different certificate stores
-for CAs and for personal/application certificates/key. More, the SSL context
-may be defined as an application identifier in the main certificate store,
-or as a keyring file. As a consequence, the meaning of some fields have been
-slightly altered:
-_ The "certificate identifier" is taken from CURLOPT_SSLCERT if defined, else
-from CURLOPT_CAINFO.
-_ The certificate identifier is then used as an application identifier in the
-main certificate store. If successful, this context is used.
-_ If the previous step failed, the certificate identifier is used as the file
-name of a keyring. CURLOPT_KEYPASSWD is used here as the keyring password.
-_ The default ca-bundle (CURLOPT_CAINFO) is set to the main certificate store's
-keyring file name: this allows to use the system global CAs by default. (In that
-case, the keyring password is safely recovered from the system... IBM dixit!)
+  Secure socket layer is provided by the IBM GSKit API: unlike other SSL
+implementations, GSKit is based on "certificate stores" or keyrings
+rather than individual certificate/key files. Certificate stores, as well as
+"certificate labels" are managed by external IBM-defined applications.
+  There are two ways to specify an SSL context:
+- By an application identifier.
+- By a keyring file pathname and (optionally) certificate label.
+  To identify an SSL context by application identifier, use option
+SETOPT_SSLCERT to specify the application identifier.
+  To address an SSL context by keyring and certificate label, use CURLOPT_CAINFO
+to set-up the keyring pathname, CURLOPT_SSLCERT to define the certificate label
+(omitting it will cause the default certificate in keyring to be used) and
+CURLOPT_KEYPASSWD to give the keyring password. If SSL is used without
+defining any of these options, the default (i.e.: system) keyring is used for
+server certificate validation.
 
   Non-standard EBCDIC wrapper prototypes are defined in an additional header
 file: ccsidcurl.h. These should be self-explanatory to an OS/400-aware
@@ -70,46 +69,59 @@
         CURLOPT_COOKIEFILE
         CURLOPT_COOKIEJAR
         CURLOPT_COOKIELIST
+        CURLOPT_COPYPOSTFIELDS
+        CURLOPT_CRLFILE
         CURLOPT_CUSTOMREQUEST
+        CURLOPT_DEFAULT_PROTOCOL
+        CURLOPT_DNS_SERVERS
         CURLOPT_EGDSOCKET
         CURLOPT_ENCODING
-        CURLOPT_FTPPORT
         CURLOPT_FTP_ACCOUNT
         CURLOPT_FTP_ALTERNATIVE_TO_USER
+        CURLOPT_FTPPORT
         CURLOPT_INTERFACE
+        CURLOPT_ISSUERCERT
         CURLOPT_KEYPASSWD
         CURLOPT_KRBLEVEL
+        CURLOPT_LOGIN_OPTIONS
+        CURLOPT_MAIL_FROM
+        CURLOPT_MAIL_AUTH
         CURLOPT_NETRC_FILE
-        CURLOPT_COPYPOSTFIELDS
+        CURLOPT_NOPROXY
+        CURLOPT_PASSWORD
+        CURLOPT_PINNEDPUBLICKEY
         CURLOPT_PROXY
+        CURLOPT_PROXYPASSWORD
+        CURLOPT_PROXYUSERNAME
         CURLOPT_PROXYUSERPWD
+        CURLOPT_PROXY_SERVICE_NAME
         CURLOPT_RANDOM_FILE
         CURLOPT_RANGE
         CURLOPT_REFERER
+        CURLOPT_RTSP_SESSION_UID
+        CURLOPT_RTSP_STREAM_URI
+        CURLOPT_RTSP_TRANSPORT
+        CURLOPT_SERVICE_NAME
+        CURLOPT_SOCKS5_GSSAPI_SERVICE
+        CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
+        CURLOPT_SSH_KNOWNHOSTS
         CURLOPT_SSH_PRIVATE_KEYFILE
         CURLOPT_SSH_PUBLIC_KEYFILE
         CURLOPT_SSLCERT
         CURLOPT_SSLCERTTYPE
+        CURLOPT_SSL_CIPHER_LIST
         CURLOPT_SSLENGINE
         CURLOPT_SSLKEY
         CURLOPT_SSLKEYTYPE
-        CURLOPT_SSL_CIPHER_LIST
+        CURLOPT_TLSAUTH_PASSWORD
+        CURLOPT_TLSAUTH_TYPE
+        CURLOPT_TLSAUTH_USERNAME
+        CURLOPT_UNIX_SOCKET_PATH
         CURLOPT_URL
         CURLOPT_USERAGENT
-        CURLOPT_USERPWD
-        CURLOPT_SSH_HOST_PUBLIC_KEY_MD5
-        CURLOPT_CRLFILE
-        CURLOPT_ISSUERCERT
         CURLOPT_USERNAME
-        CURLOPT_PASSWORD
-        CURLOPT_PROXYUSERNAME
-        CURLOPT_PROXYPASSWORD
-        CURLOPT_NOPROXY
-        CURLOPT_RTSP_SESSION_UID
-        CURLOPT_RTSP_STREAM_URI
-        CURLOPT_RTSP_TRANSPORT
-        CURLOPT_SOCKS5_GSSAPI_SERVICE
-        CURLOPT_MAIL_FROM
+        CURLOPT_USERPWD
+        CURLOPT_XOAUTH2_BEARER
   Else it is the same as for curl_easy_setopt().
   Note that CURLOPT_ERRORBUFFER is not in the list above, since it gives the
 address of an (empty) character buffer, not the address of a string.
@@ -137,15 +149,35 @@
   Please note that CURLFORM_PTRCONTENTS and CURLFORM_BUFFERPTR are considered
 unconvertible strings and thus are NOT followed by a CCSID.
 
-_ curl_easy_getinfo_ccsid
+_ curl_easy_getinfo_ccsid()
   The following options are followed by a 'char * *' and a CCSID. Unlike
 curl_easy_getinfo(), the value returned in the pointer should be freed after
 use:
         CURLINFO_EFFECTIVE_URL
         CURLINFO_CONTENT_TYPE
         CURLINFO_FTP_ENTRY_PATH
+        CURLINFO_REDIRECT_URL
+        CURLINFO_PRIMARY_IP
+        CURLINFO_RTSP_SESSION_ID
+        CURLINFO_LOCAL_IP
+  Likewise, the following options are followed by a struct curl_slist * * and a
+CCSID.
+        CURLINFO_SSL_ENGINES
+        CURLINFO_COOKIELIST
+Lists returned should be released with curl_slist_free_all() after use.
+  Option CURLINFO_CERTINFO is followed by a struct curl_certinfo * * and a
+CCSID. Returned structures sould be free'ed using curl_certinfo_free_all() after
+use.
   Other options are processed like in curl_easy_getinfo().
 
+_ curl_pushheader_bynum_cssid() and curl_pushheader_byname_ccsid()
+  Although the prototypes are self-explanatory, the returned string pointer
+should be freed after use, as opposite to the non-ccsid versions of these
+procedures.
+  Please note that HTTP2 is not (yet) implemented on OS/400, thus these
+functions will always return NULL.
+
+
   Standard compilation environment does support neither autotools nor make;
 in fact, very few common utilities are available. As a consequence, the
 config-os400.h has been coded manually and the compilation scripts are
@@ -156,14 +188,29 @@
 
 
 Protocols currently implemented on OS/400:
-_ HTTP
-_ HTTPS
+_ DICT
+_ FILE
 _ FTP
 _ FTPS
-_ FTP with secure transmission.
+_ FTP with secure transmission
+_ GOPHER
+_ HTTP
+_ HTTPS
+_ IMAP
+_ IMAPS
+_ IMAP with secure transmission
 _ LDAP
-_ DICT
+_ POP3
+_ POP3S
+_ POP3 with secure transmission
+_ RTSP
+_ SCP if libssh2 is enabled
+_ SFTP if libssh2 is enabled
+_ SMTP
+_ SMTPS
+_ SMTP with secure transmission
 _ TELNET
+_ TFTP
 
 
 
@@ -174,13 +221,17 @@
 familiar with.
 
 _ As a prerequisite, QADRT development environment must be installed.
+_ If data compression has to be supported, ZLIB development environment must
+  be installed.
+_ Likewise, if SCP and SFTP protocols have to be compiled in, LIBSSH2
+  developent environment must be installed.
 _ Install the curl source directory in IFS.
 _ Enter shell (QSH)
 _ Change current directory to the curl installation directory
 _ Change current directory to ./packages/OS400
 _ Edit file iniscript.sh. You may want to change tunable configuration
   parameters, like debug info generation, optimisation level, listing option,
-  target library, etc.
+  target library, ZLIB/LIBSSH2 availability and location, etc.
 _ Copy any file in the current directory to makelog (i.e.:
   cp initscript.sh makelog): this is intended to create the makelog file with
   an ASCII CCSID!
@@ -209,6 +260,8 @@
   program using libcurl.
 _ LIBxxx modules and programs. Although the test environment is not supported
   on OS/400, the libcurl test programs are compiled for manual tests.
+_ IFS directory /curl/include/curl containg the C header files for IFS source
+  C/C++ compilation and curl.inc.rpgle for IFS source ILE/RPG compilation.
 
 
 
@@ -222,21 +275,22 @@
   LC_CTYPE, or by setting environment variable QADRT_ENV_LOCALE to the locale
   object path before executing the program.
 _ Do not use original source include files unless you know what you are doing.
-  Use the installed members instead (in /QSYS.LIB/CURL.LIB/H.FILE).
+  Use the installed members instead (in /QSYS.LIB/CURL.LIB/H.FILE and
+  /curl/include/curl).
 
 
 
 ILE/RPG support:
 
   Since 95% of the OS/400 programmers use ILE/RPG exclusively, a definition
-  /COPY member is provided for this language. To include all libcurl
+  /INCLUDE member is provided for this language. To include all libcurl
   definitions in an ILE/RPG module, line
 
      h bnddir('CURL/CURL')
 
 must figure in the program header, and line
 
-     d/copy curl/h,curl.inc
+     d/include curl/h,curl.inc
 
 in the global data section of the module's source code.
 
diff --git a/packages/OS400/ccsidcurl.c b/packages/OS400/ccsidcurl.c
index ad67e1c..3b08bef 100644
--- a/packages/OS400/ccsidcurl.c
+++ b/packages/OS400/ccsidcurl.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, 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.
+ * are also available at https://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
@@ -33,6 +33,7 @@
 
 #include "curl.h"
 #include "mprintf.h"
+#include "slist.h"
 #include "urldata.h"
 #include "url.h"
 #include "getinfo.h"
@@ -67,7 +68,7 @@
 
   ccsid &= 0xFFFF;
 
-  if (ccsid == NOCONV_CCSID)
+  if(ccsid == NOCONV_CCSID)
     ccsid = ASCII_CCSID;
 
   memset(buf, 0, ICONV_ID_SIZE);
@@ -76,7 +77,8 @@
 
 
 static iconv_t
-iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin, unsigned int cstr)
+iconv_open_CCSID(unsigned int ccsidout, unsigned int ccsidin,
+                                                        unsigned int cstr)
 
 {
   char fromcode[ICONV_ID_SIZE];
@@ -93,7 +95,7 @@
   makeOS400IconvCode(tocode, ccsidout);
   memset(tocode + 13, 0, sizeof tocode - 13);   /* Dest. code id format. */
 
-  if (cstr)
+  if(cstr)
     fromcode[18] = '1';                         /* Set null-terminator flag. */
 
   return iconv_open(tocode, fromcode);
@@ -117,23 +119,23 @@
   ***  Return the converted destination byte count, or -1 if error.
   **/
 
-  if (sccsid == 65535)
+  if(sccsid == 65535)
     sccsid = ASCII_CCSID;
 
-  if (dccsid == 65535)
+  if(dccsid == 65535)
     dccsid = ASCII_CCSID;
 
-  if (sccsid == dccsid) {
+  if(sccsid == dccsid) {
     lslen = slen >= 0? slen: strlen(s) + 1;
     i = lslen < dlen? lslen: dlen;
 
-    if (s != d && i > 0)
+    if(s != d && i > 0)
       memcpy(d, s, i);
 
     return i;
     }
 
-  if (slen < 0) {
+  if(slen < 0) {
     lslen = 0;
     cd = iconv_open_CCSID(dccsid, sccsid, 1);
     }
@@ -142,12 +144,12 @@
     cd = iconv_open_CCSID(dccsid, sccsid, 0);
     }
 
-  if (ICONV_OPEN_ERROR(cd))
+  if(ICONV_OPEN_ERROR(cd))
     return -1;
 
   i = dlen;
 
-  if ((int) iconv(cd, (char * *) &s, &lslen, &d, &dlen) < 0)
+  if((int) iconv(cd, (char * *) &s, &lslen, &d, &dlen) < 0)
     i = -1;
   else
     i -= dlen;
@@ -165,7 +167,6 @@
   char * cp;
   size_t dlen;
   int l;
-  int l2;
   static const char nullbyte = 0;
 
   /* Like convert, but the destination is allocated and returned. */
@@ -174,24 +175,24 @@
   dlen *= MAX_CONV_EXPANSION;           /* Allow some expansion. */
   d = malloc(dlen);
 
-  if (!d)
+  if(!d)
     return (char *) NULL;
 
   l = convert(d, dlen, dccsid, s, slen, sccsid);
 
-  if (l < 0) {
+  if(l < 0) {
     free(d);
     return (char *) NULL;
     }
 
-  if (slen < 0) {
+  if(slen < 0) {
     /* Need to null-terminate even when source length is given.
        Since destination code size is unknown, use a conversion to generate
        terminator. */
 
-    l2 = convert(d + l, dlen - l, dccsid, &nullbyte, -1, ASCII_CCSID);
+    int l2 = convert(d + l, dlen - l, dccsid, &nullbyte, -1, ASCII_CCSID);
 
-    if (l2 < 0) {
+    if(l2 < 0) {
       free(d);
       return (char *) NULL;
       }
@@ -199,10 +200,10 @@
     l += l2;
     }
 
-  if ((size_t) l < dlen) {
+  if((size_t) l < dlen) {
     cp = realloc(d, l);         /* Shorten to minimum needed. */
 
-    if (cp)
+    if(cp)
       d = cp;
     }
 
@@ -210,6 +211,25 @@
 }
 
 
+static struct curl_slist *
+slist_convert(int dccsid, struct curl_slist * from, int sccsid)
+
+{
+  struct curl_slist * to = (struct curl_slist *) NULL;
+
+  for(; from; from = from->next) {
+    char * cp = dynconvert(dccsid, from->data, -1, sccsid);
+
+    if(!cp) {
+      curl_slist_free_all(to);
+      return (struct curl_slist *) NULL;
+    }
+    to = Curl_slist_append_nodup(to, cp);
+  }
+  return to;
+}
+
+
 char *
 curl_version_ccsid(unsigned int ccsid)
 
@@ -220,16 +240,16 @@
 
   aversion = curl_version();
 
-  if (!aversion)
+  if(!aversion)
     return aversion;
 
   i = strlen(aversion) + 1;
   i *= MAX_CONV_EXPANSION;
 
-  if (!(eversion = Curl_thread_buffer(LK_CURL_VERSION, i)))
+  if(!(eversion = Curl_thread_buffer(LK_CURL_VERSION, i)))
     return (char *) NULL;
 
-  if (convert(eversion, i, ccsid, aversion, -1, ASCII_CCSID) < 0)
+  if(convert(eversion, i, ccsid, aversion, -1, ASCII_CCSID) < 0)
     return (char *) NULL;
 
   return eversion;
@@ -244,20 +264,20 @@
   char * s;
   char * d;
 
-  if (!string) {
+  if(!string) {
     errno = EINVAL;
     return (char *) NULL;
     }
 
-  s = dynconvert(ASCII_CCSID, s, length? length: -1, sccsid);
+  s = dynconvert(ASCII_CCSID, string, length? length: -1, sccsid);
 
-  if (!s)
+  if(!s)
     return (char *) NULL;
 
   d = curl_easy_escape(handle, s, 0);
   free(s);
 
-  if (!d)
+  if(!d)
     return (char *) NULL;
 
   s = dynconvert(dccsid, d, -1, ASCII_CCSID);
@@ -275,26 +295,26 @@
   char * s;
   char * d;
 
-  if (!string) {
+  if(!string) {
     errno = EINVAL;
     return (char *) NULL;
     }
 
-  s = dynconvert(ASCII_CCSID, s, length? length: -1, sccsid);
+  s = dynconvert(ASCII_CCSID, string, length? length: -1, sccsid);
 
-  if (!s)
+  if(!s)
     return (char *) NULL;
 
   d = curl_easy_unescape(handle, s, 0, outlength);
   free(s);
 
-  if (!d)
+  if(!d)
     return (char *) NULL;
 
   s = dynconvert(dccsid, d, -1, ASCII_CCSID);
   free(d);
 
-  if (s && outlength)
+  if(s && outlength)
     *outlength = strlen(s);
 
   return s;
@@ -310,12 +330,12 @@
 
   s = (char *) NULL;
 
-  if (!data)
+  if(!data)
     return curl_slist_append(list, data);
 
   s = dynconvert(ASCII_CCSID, data, -1, ccsid);
 
-  if (!s)
+  if(!s)
     return (struct curl_slist *) NULL;
 
   list = curl_slist_append(list, s);
@@ -331,12 +351,12 @@
   char * s;
   time_t t;
 
-  if (!p)
+  if(!p)
     return curl_getdate(p, unused);
 
   s = dynconvert(ASCII_CCSID, p, -1, ccsid);
 
-  if (!s)
+  if(!s)
     return (time_t) -1;
 
   t = curl_getdate(s, unused);
@@ -350,17 +370,15 @@
                             char * * bufp, int * left, unsigned int ccsid)
 
 {
-  int l;
-
   /* Helper for curl_version_info_ccsid(): convert a string if defined.
      Result is stored in the `*left'-byte buffer at `*bufp'.
      `*bufp' and `*left' are updated accordingly.
      Return 0 if ok, else -1. */
 
-  if (*stringp) {
-    l = convert(*bufp, *left, ccsid, *stringp, -1, ASCII_CCSID);
+  if(*stringp) {
+    int l = convert(*bufp, *left, ccsid, *stringp, -1, ASCII_CCSID);
 
-    if (l <= 0)
+    if(l <= 0)
       return -1;
 
     *stringp = *bufp;
@@ -380,7 +398,6 @@
   char * cp;
   int n;
   int nproto;
-  int i;
   curl_version_info_data * id;
 
   /* The assertion below is possible, because although the second operand
@@ -388,17 +405,17 @@
      compiler seems to compare string values after substitution. */
 
 #if CURLVERSION_NOW != CURLVERSION_FOURTH
-#error curl_version_info_data structure has changed: upgrade this procedure too.
+#error curl_version_info_data structure has changed: upgrade this procedure.
 #endif
 
   /* If caller has been compiled with a new version, error. */
 
-  if (stamp > CURLVERSION_NOW)
+  if(stamp > CURLVERSION_NOW)
     return (curl_version_info_data *) NULL;
 
   p = curl_version_info(stamp);
 
-  if (!p)
+  if(!p)
     return p;
 
   /* Measure thread space needed. */
@@ -406,84 +423,85 @@
   n = 0;
   nproto = 0;
 
-  if (p->protocols) {
-    while (p->protocols[nproto])
+  if(p->protocols) {
+    while(p->protocols[nproto])
       n += strlen(p->protocols[nproto++]);
 
     n += nproto++;
     }
 
-  if (p->version)
+  if(p->version)
     n += strlen(p->version) + 1;
 
-  if (p->host)
+  if(p->host)
     n += strlen(p->host) + 1;
 
-  if (p->ssl_version)
+  if(p->ssl_version)
     n += strlen(p->ssl_version) + 1;
 
-  if (p->libz_version)
+  if(p->libz_version)
     n += strlen(p->libz_version) + 1;
 
-  if (p->ares)
+  if(p->ares)
     n += strlen(p->ares) + 1;
 
-  if (p->libidn)
+  if(p->libidn)
     n += strlen(p->libidn) + 1;
 
-  if (p->libssh_version)
+  if(p->libssh_version)
     n += strlen(p->libssh_version) + 1;
 
   /* Allocate thread space. */
 
   n *= MAX_CONV_EXPANSION;
 
-  if (nproto)
+  if(nproto)
     n += nproto * sizeof(const char *);
 
   cp = Curl_thread_buffer(LK_VERSION_INFO_DATA, n);
   id = (curl_version_info_data *) Curl_thread_buffer(LK_VERSION_INFO,
                                                      sizeof *id);
 
-  if (!id || !cp)
+  if(!id || !cp)
     return (curl_version_info_data *) NULL;
 
   /* Copy data and convert strings. */
 
   memcpy((char *) id, (char *) p, sizeof *p);
 
-  if (id->protocols) {
+  if(id->protocols) {
+    int i = nproto * sizeof id->protocols[0];
+
     id->protocols = (const char * const *) cp;
-    i = nproto * sizeof id->protocols[0];
     memcpy(cp, (char *) p->protocols, i);
     cp += i;
     n -= i;
 
-    for (i = 0; id->protocols[i]; i++)
-      if (convert_version_info_string(((const char * *) id->protocols) + i,
+    for(i = 0; id->protocols[i]; i++)
+      if(convert_version_info_string(((const char * *) id->protocols) + i,
                                       &cp, &n, ccsid))
         return (curl_version_info_data *) NULL;
     }
 
-  if (convert_version_info_string(&id->version, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->version, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->host, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->host, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->ssl_version, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->ssl_version, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->libz_version, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->libz_version, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->ares, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->ares, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->libidn, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->libidn, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
-  if (convert_version_info_string(&id->libssh_version, &cp, &n, ccsid))
+  if(convert_version_info_string(&id->libssh_version, &cp, &n, ccsid))
     return (curl_version_info_data *) NULL;
 
   return id;
@@ -500,15 +518,15 @@
 
   s = curl_easy_strerror(error);
 
-  if (!s)
+  if(!s)
     return s;
 
   i = MAX_CONV_EXPANSION * (strlen(s) + 1);
 
-  if (!(buf = Curl_thread_buffer(LK_EASY_STRERROR, i)))
+  if(!(buf = Curl_thread_buffer(LK_EASY_STRERROR, i)))
     return (const char *) NULL;
 
-  if (convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
+  if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
     return (const char *) NULL;
 
   return (const char *) buf;
@@ -525,15 +543,15 @@
 
   s = curl_share_strerror(error);
 
-  if (!s)
+  if(!s)
     return s;
 
   i = MAX_CONV_EXPANSION * (strlen(s) + 1);
 
-  if (!(buf = Curl_thread_buffer(LK_SHARE_STRERROR, i)))
+  if(!(buf = Curl_thread_buffer(LK_SHARE_STRERROR, i)))
     return (const char *) NULL;
 
-  if (convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
+  if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
     return (const char *) NULL;
 
   return (const char *) buf;
@@ -550,21 +568,39 @@
 
   s = curl_multi_strerror(error);
 
-  if (!s)
+  if(!s)
     return s;
 
   i = MAX_CONV_EXPANSION * (strlen(s) + 1);
 
-  if (!(buf = Curl_thread_buffer(LK_MULTI_STRERROR, i)))
+  if(!(buf = Curl_thread_buffer(LK_MULTI_STRERROR, i)))
     return (const char *) NULL;
 
-  if (convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
+  if(convert(buf, i, ccsid, s, -1, ASCII_CCSID) < 0)
     return (const char *) NULL;
 
   return (const char *) buf;
 }
 
 
+void
+curl_certinfo_free_all(struct curl_certinfo *info)
+
+{
+  /* Free all memory used by certificate info. */
+  if(info) {
+    if(info->certinfo) {
+      int i;
+
+      for(i = 0; i < info->num_of_certs; i++)
+        curl_slist_free_all(info->certinfo[i]);
+      free((char *) info->certinfo);
+    }
+    free((char *) info);
+  }
+}
+
+
 CURLcode
 curl_easy_getinfo_ccsid(CURL * curl, CURLINFO info, ...)
 
@@ -574,37 +610,89 @@
   CURLcode ret;
   unsigned int ccsid;
   char * * cpp;
-  char * s;
-  char * d;
-  struct SessionHandle * data;
+  struct Curl_easy * data;
+  struct curl_slist * * slp;
+  struct curl_certinfo * cipf;
+  struct curl_certinfo * cipt;
 
   /* WARNING: unlike curl_easy_get_info(), the strings returned by this
      procedure have to be free'ed. */
 
-  data = (struct SessionHandle *) curl;
+  data = (struct Curl_easy *) curl;
   va_start(arg, info);
   paramp = va_arg(arg, void *);
   ret = Curl_getinfo(data, info, paramp);
 
-  if (ret != CURLE_OK || ((int) info & CURLINFO_TYPEMASK) != CURLINFO_STRING) {
-    va_end(arg);
-    return ret;
+  if(ret == CURLE_OK)
+    switch ((int) info & CURLINFO_TYPEMASK) {
+
+    case CURLINFO_STRING:
+      ccsid = va_arg(arg, unsigned int);
+      cpp = (char * *) paramp;
+
+      if(*cpp) {
+        *cpp = dynconvert(ccsid, *cpp, -1, ASCII_CCSID);
+
+        if(!*cpp)
+          ret = CURLE_OUT_OF_MEMORY;
+      }
+
+      break;
+
+    case CURLINFO_SLIST:
+      ccsid = va_arg(arg, unsigned int);
+      switch (info) {
+      case CURLINFO_CERTINFO:
+        cipf = *(struct curl_certinfo * *) paramp;
+        if(cipf) {
+          if(!(cipt = (struct curl_certinfo *) malloc(sizeof *cipt)))
+            ret = CURLE_OUT_OF_MEMORY;
+          else {
+            cipt->certinfo = (struct curl_slist * *)
+                             calloc(cipf->num_of_certs +
+                                    1, sizeof(struct curl_slist *));
+            if(!cipt->certinfo)
+              ret = CURLE_OUT_OF_MEMORY;
+            else {
+              int i;
+
+              cipt->num_of_certs = cipf->num_of_certs;
+              for(i = 0; i < cipf->num_of_certs; i++)
+                if(cipf->certinfo[i])
+                  if(!(cipt->certinfo[i] = slist_convert(ccsid,
+                                                          cipf->certinfo[i],
+                                                          ASCII_CCSID))) {
+                    ret = CURLE_OUT_OF_MEMORY;
+                    break;
+                  }
+              }
+            }
+
+          if(ret != CURLE_OK) {
+            curl_certinfo_free_all(cipt);
+            cipt = (struct curl_certinfo *) NULL;
+          }
+
+          *(struct curl_certinfo * *) paramp = cipt;
+        }
+
+        break;
+
+      case CURLINFO_TLS_SESSION:
+      case CURLINFO_TLS_SSL_PTR:
+      case CURLINFO_SOCKET:
+        break;
+
+      default:
+        slp = (struct curl_slist * *) paramp;
+        if(*slp)
+          if(!(*slp = slist_convert(ccsid, *slp, ASCII_CCSID)))
+            ret = CURLE_OUT_OF_MEMORY;
+        break;
+      }
     }
 
-  ccsid = va_arg(arg, unsigned int);
   va_end(arg);
-  cpp = (char * *) paramp;
-  s = *cpp;
-
-  if (!s)
-    return ret;
-
-  d = dynconvert(ccsid, s, -1, ASCII_CCSID);
-  *cpp = d;
-
-  if (!d)
-    return CURLE_OUT_OF_MEMORY;
-
   return ret;
 }
 
@@ -615,15 +703,15 @@
 {
   switch (option) {
 
-    case CURLFORM_FILENAME:
-    case CURLFORM_CONTENTTYPE:
-    case CURLFORM_BUFFER:
-    case CURLFORM_FILE:
-    case CURLFORM_FILECONTENT:
-    case CURLFORM_COPYCONTENTS:
-    case CURLFORM_COPYNAME:
-      return 1;
-    }
+  case CURLFORM_FILENAME:
+  case CURLFORM_CONTENTTYPE:
+  case CURLFORM_BUFFER:
+  case CURLFORM_FILE:
+  case CURLFORM_FILECONTENT:
+  case CURLFORM_COPYCONTENTS:
+  case CURLFORM_COPYNAME:
+    return 1;
+  }
 
   return 0;
 }
@@ -633,10 +721,10 @@
 Curl_formadd_release_local(struct curl_forms * forms, int nargs, int skip)
 
 {
-  while (nargs--)
-    if (nargs != skip)
-      if (Curl_is_formadd_string(forms[nargs].option))
-        if (forms[nargs].value)
+  while(nargs--)
+    if(nargs != skip)
+      if(Curl_is_formadd_string(forms[nargs].option))
+        if(forms[nargs].value)
           free((char *) forms[nargs].value);
 
   free((char *) forms);
@@ -652,36 +740,36 @@
   char * cp;
   char * cp2;
 
-  if (formx < 0 || !forms[formx].value)
+  if(formx < 0 || !forms[formx].value)
     return 0;
 
-  if (lengthx >= 0)
+  if(lengthx >= 0)
     l = (int) forms[lengthx].value;
   else
     l = strlen(forms[formx].value) + 1;
 
   cp = malloc(MAX_CONV_EXPANSION * l);
 
-  if (!cp)
+  if(!cp)
     return -1;
 
   l = convert(cp, MAX_CONV_EXPANSION * l, ASCII_CCSID,
               forms[formx].value, l, ccsid);
 
-  if (l < 0) {
+  if(l < 0) {
     free(cp);
     return -1;
     }
 
-  cp2 = realloc(cp, l);                 /* Shorten buffer to the string size. */
+  cp2 = realloc(cp, l);         /* Shorten buffer to the string size. */
 
-  if (cp2)
+  if(cp2)
     cp = cp2;
 
   forms[formx].value = cp;
 
-  if (lengthx >= 0)
-    forms[lengthx].value = (char *) l;  /* Update to length after conversion. */
+  if(lengthx >= 0)
+    forms[lengthx].value = (char *) l;  /* Update length after conversion. */
 
   return l;
 }
@@ -729,7 +817,7 @@
   lformlen = ALLOC_GRANULE;
   lforms = malloc(lformlen * sizeof *lforms);
 
-  if (!lforms)
+  if(!lforms)
     return CURL_FORMADD_MEMORY;
 
   /* Process the arguments, copying them into local array, latching conversion
@@ -744,14 +832,14 @@
   forms = (struct curl_forms *) NULL;
   va_start(arg, last_post);
 
-  for (;;) {
+  for(;;) {
     /* Make sure there is still room for an item in local array. */
 
-    if (nargs >= lformlen) {
+    if(nargs >= lformlen) {
       lformlen += ALLOC_GRANULE;
       tforms = realloc(lforms, lformlen * sizeof *lforms);
 
-      if (!tforms) {
+      if(!tforms) {
         result = CURL_FORMADD_MEMORY;
         break;
         }
@@ -761,7 +849,7 @@
 
     /* Get next option. */
 
-    if (forms) {
+    if(forms) {
       /* Get option from array. */
 
       option = forms->option;
@@ -773,7 +861,7 @@
 
       option = va_arg(arg, CURLformoption);
 
-      if (option == CURLFORM_END)
+      if(option == CURLFORM_END)
         break;
       }
 
@@ -786,7 +874,7 @@
       continue;
 
     case CURLFORM_ARRAY:
-      if (!forms) {
+      if(!forms) {
         forms = va_arg(arg, struct curl_forms *);
         continue;
         }
@@ -798,12 +886,12 @@
       option = CURLFORM_PTRNAME;                /* Static for now. */
 
     case CURLFORM_PTRNAME:
-      if (namex >= 0)
+      if(namex >= 0)
         result = CURL_FORMADD_OPTION_TWICE;
 
       namex = nargs;
 
-      if (!forms) {
+      if(!forms) {
         value = va_arg(arg, char *);
         nameccsid = (unsigned int) va_arg(arg, long);
         }
@@ -815,12 +903,12 @@
       break;
 
     case CURLFORM_COPYCONTENTS:
-      if (contentx >= 0)
+      if(contentx >= 0)
         result = CURL_FORMADD_OPTION_TWICE;
 
       contentx = nargs;
 
-      if (!forms) {
+      if(!forms) {
         value = va_arg(arg, char *);
         contentccsid = (unsigned int) va_arg(arg, long);
         }
@@ -833,7 +921,7 @@
 
     case CURLFORM_PTRCONTENTS:
     case CURLFORM_BUFFERPTR:
-      if (!forms)
+      if(!forms)
         value = va_arg(arg, char *);            /* No conversion. */
 
       break;
@@ -841,33 +929,41 @@
     case CURLFORM_CONTENTSLENGTH:
       lengthx = nargs;
 
-      if (!forms)
+      if(!forms)
         value = (char *) va_arg(arg, long);
 
       break;
 
+    case CURLFORM_CONTENTLEN:
+      lengthx = nargs;
+
+      if(!forms)
+        value = (char *) va_arg(arg, curl_off_t);
+
+      break;
+
     case CURLFORM_NAMELENGTH:
       namelengthx = nargs;
 
-      if (!forms)
+      if(!forms)
         value = (char *) va_arg(arg, long);
 
       break;
 
     case CURLFORM_BUFFERLENGTH:
-      if (!forms)
+      if(!forms)
         value = (char *) va_arg(arg, long);
 
       break;
 
     case CURLFORM_CONTENTHEADER:
-      if (!forms)
+      if(!forms)
         value = (char *) va_arg(arg, struct curl_slist *);
 
       break;
 
     case CURLFORM_STREAM:
-      if (!forms)
+      if(!forms)
         value = (char *) va_arg(arg, void *);
 
       break;
@@ -875,7 +971,7 @@
     case CURLFORM_CONTENTTYPE:
       /* If a previous content has been encountered, convert it now. */
 
-      if (Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0) {
+      if(Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0) {
         result = CURL_FORMADD_MEMORY;
         break;
         }
@@ -887,12 +983,12 @@
     default:
       /* Must be a convertible string. */
 
-      if (!Curl_is_formadd_string(option)) {
+      if(!Curl_is_formadd_string(option)) {
         result = CURL_FORMADD_UNKNOWN_OPTION;
         break;
         }
 
-      if (!forms) {
+      if(!forms) {
         value = va_arg(arg, char *);
         ccsid = (unsigned int) va_arg(arg, long);
         }
@@ -905,7 +1001,7 @@
 
       lforms[nargs].value = value;
 
-      if (Curl_formadd_convert(lforms, nargs, -1, ccsid) < 0) {
+      if(Curl_formadd_convert(lforms, nargs, -1, ccsid) < 0) {
         result = CURL_FORMADD_MEMORY;
         break;
         }
@@ -913,7 +1009,7 @@
       value = lforms[nargs].value;
       }
 
-    if (result != CURL_FORMADD_OK)
+    if(result != CURL_FORMADD_OK)
       break;
 
     lforms[nargs].value = value;
@@ -924,15 +1020,15 @@
 
   /* Convert the name and the last content, now that we know their lengths. */
 
-  if (result == CURL_FORMADD_OK && namex >= 0) {
-    if (Curl_formadd_convert(lforms, namex, namelengthx, nameccsid) < 0)
+  if(result == CURL_FORMADD_OK && namex >= 0) {
+    if(Curl_formadd_convert(lforms, namex, namelengthx, nameccsid) < 0)
       result = CURL_FORMADD_MEMORY;
     else
       lforms[namex].option = CURLFORM_COPYNAME;         /* Force copy. */
     }
 
-  if (result == CURL_FORMADD_OK) {
-    if (Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0)
+  if(result == CURL_FORMADD_OK) {
+    if(Curl_formadd_convert(lforms, contentx, lengthx, contentccsid) < 0)
       result = CURL_FORMADD_MEMORY;
     else
       contentx = -1;
@@ -940,7 +1036,7 @@
 
   /* Do the formadd with our converted parameters. */
 
-  if (result == CURL_FORMADD_OK) {
+  if(result == CURL_FORMADD_OK) {
     lforms[nargs].option = CURLFORM_END;
     result = curl_formadd(httppost, last_post,
                           CURLFORM_ARRAY, lforms, CURLFORM_END);
@@ -971,17 +1067,17 @@
 
   p = (cfcdata *) arg;
 
-  if ((long) len <= 0)
+  if((long) len <= 0)
     return (*p->append)(p->arg, buf, len);
 
   b = malloc(MAX_CONV_EXPANSION * len);
 
-  if (!b)
+  if(!b)
     return (size_t) -1;
 
   l = convert(b, MAX_CONV_EXPANSION * len, p->ccsid, buf, len, ASCII_CCSID);
 
-  if (l < 0) {
+  if(l < 0) {
     free(b);
     return (size_t) -1;
     }
@@ -1012,11 +1108,10 @@
 {
   CURLcode result;
   va_list arg;
-  struct SessionHandle * data;
+  struct Curl_easy * data;
   char * s;
   char * cp;
   unsigned int ccsid;
-  size_t len;
   curl_off_t pfsize;
   static char testwarn = 1;
 
@@ -1026,15 +1121,16 @@
      the same message; but since threadsafeness is not handled here,
      this may occur (and we don't care!). */
 
-  if (testwarn) {
+  if(testwarn) {
     testwarn = 0;
 
-    if ((int) STRING_LAST != (int) STRING_MAIL_FROM + 1)
+    if((int) STRING_LASTZEROTERMINATED != (int) STRING_UNIX_SOCKET_PATH + 1 ||
+       (int) STRING_LAST != (int) STRING_COPYPOSTFIELDS + 1)
       curl_mfprintf(stderr,
        "*** WARNING: curl_easy_setopt_ccsid() should be reworked ***\n");
     }
 
-  data = (struct SessionHandle *) curl;
+  data = (struct Curl_easy *) curl;
   va_start(arg, tag);
 
   switch (tag) {
@@ -1045,64 +1141,72 @@
   case CURLOPT_COOKIEFILE:
   case CURLOPT_COOKIEJAR:
   case CURLOPT_COOKIELIST:
+  case CURLOPT_CRLFILE:
   case CURLOPT_CUSTOMREQUEST:
+  case CURLOPT_DEFAULT_PROTOCOL:
+  case CURLOPT_DNS_SERVERS:
   case CURLOPT_EGDSOCKET:
   case CURLOPT_ENCODING:
-  case CURLOPT_FTPPORT:
   case CURLOPT_FTP_ACCOUNT:
   case CURLOPT_FTP_ALTERNATIVE_TO_USER:
+  case CURLOPT_FTPPORT:
   case CURLOPT_INTERFACE:
+  case CURLOPT_ISSUERCERT:
   case CURLOPT_KEYPASSWD:
   case CURLOPT_KRBLEVEL:
+  case CURLOPT_LOGIN_OPTIONS:
+  case CURLOPT_MAIL_FROM:
+  case CURLOPT_MAIL_AUTH:
   case CURLOPT_NETRC_FILE:
+  case CURLOPT_NOPROXY:
+  case CURLOPT_PASSWORD:
+  case CURLOPT_PINNEDPUBLICKEY:
   case CURLOPT_PROXY:
+  case CURLOPT_PROXYPASSWORD:
+  case CURLOPT_PROXYUSERNAME:
   case CURLOPT_PROXYUSERPWD:
+  case CURLOPT_PROXY_SERVICE_NAME:
   case CURLOPT_RANDOM_FILE:
   case CURLOPT_RANGE:
   case CURLOPT_REFERER:
+  case CURLOPT_RTSP_SESSION_ID:
+  case CURLOPT_RTSP_STREAM_URI:
+  case CURLOPT_RTSP_TRANSPORT:
+  case CURLOPT_SERVICE_NAME:
+  case CURLOPT_SOCKS5_GSSAPI_SERVICE:
+  case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:
+  case CURLOPT_SSH_KNOWNHOSTS:
   case CURLOPT_SSH_PRIVATE_KEYFILE:
   case CURLOPT_SSH_PUBLIC_KEYFILE:
   case CURLOPT_SSLCERT:
   case CURLOPT_SSLCERTTYPE:
+  case CURLOPT_SSL_CIPHER_LIST:
   case CURLOPT_SSLENGINE:
   case CURLOPT_SSLKEY:
   case CURLOPT_SSLKEYTYPE:
-  case CURLOPT_SSL_CIPHER_LIST:
+  case CURLOPT_TLSAUTH_PASSWORD:
+  case CURLOPT_TLSAUTH_TYPE:
+  case CURLOPT_TLSAUTH_USERNAME:
+  case CURLOPT_UNIX_SOCKET_PATH:
   case CURLOPT_URL:
   case CURLOPT_USERAGENT:
-  case CURLOPT_USERPWD:
-  case CURLOPT_SSH_HOST_PUBLIC_KEY_MD5:
-  case CURLOPT_CRLFILE:
-  case CURLOPT_ISSUERCERT:
   case CURLOPT_USERNAME:
-  case CURLOPT_PASSWORD:
-  case CURLOPT_PROXYUSERNAME:
-  case CURLOPT_PROXYPASSWORD:
-  case CURLOPT_NOPROXY:
-  case CURLOPT_RTSP_SESSION_ID:
-  case CURLOPT_RTSP_STREAM_URI:
-  case CURLOPT_RTSP_TRANSPORT:
-  /* SSH2 not (yet) implemented on OS400. */
-  /* case CURLOPT_SSH_KNOWNHOSTS: */
-  case CURLOPT_SOCKS5_GSSAPI_SERVICE:
-  case CURLOPT_MAIL_FROM:
+  case CURLOPT_USERPWD:
+  case CURLOPT_XOAUTH2_BEARER:
     s = va_arg(arg, char *);
     ccsid = va_arg(arg, unsigned int);
 
-    if (s) {
+    if(s) {
       s = dynconvert(ASCII_CCSID, s, -1, ccsid);
 
-      if (!s) {
+      if(!s) {
         result = CURLE_OUT_OF_MEMORY;
         break;
         }
       }
 
     result = curl_easy_setopt(curl, tag, s);
-
-    if (s)
-      free(s);
-
+    free(s);
     break;
 
   case CURLOPT_COPYPOSTFIELDS:
@@ -1114,24 +1218,25 @@
 
     pfsize = data->set.postfieldsize;
 
-    if (!s || !pfsize || ccsid == NOCONV_CCSID || ccsid == ASCII_CCSID) {
+    if(!s || !pfsize || ccsid == NOCONV_CCSID || ccsid == ASCII_CCSID) {
       result = curl_easy_setopt(curl, CURLOPT_COPYPOSTFIELDS, s);
       break;
       }
 
-    if (pfsize == -1) {
+    if(pfsize == -1) {
       /* Data is null-terminated. */
       s = dynconvert(ASCII_CCSID, s, -1, ccsid);
 
-      if (!s) {
+      if(!s) {
         result = CURLE_OUT_OF_MEMORY;
         break;
         }
       }
     else {
       /* Data length specified. */
+      size_t len;
 
-      if (pfsize < 0 || pfsize > SIZE_MAX) {
+      if(pfsize < 0 || pfsize > SIZE_MAX) {
         result = CURLE_OUT_OF_MEMORY;
         break;
         }
@@ -1139,19 +1244,19 @@
       len = pfsize;
       pfsize = len * MAX_CONV_EXPANSION;
 
-      if (pfsize > SIZE_MAX)
+      if(pfsize > SIZE_MAX)
         pfsize = SIZE_MAX;
 
       cp = malloc(pfsize);
 
-      if (!cp) {
+      if(!cp) {
         result = CURLE_OUT_OF_MEMORY;
         break;
         }
 
       pfsize = convert(cp, pfsize, ASCII_CCSID, s, len, ccsid);
 
-      if (pfsize < 0) {
+      if(pfsize < 0) {
         free(cp);
         result = CURLE_OUT_OF_MEMORY;
         break;
@@ -1184,3 +1289,42 @@
 
   return (char *) value;
 }
+
+
+char *
+curl_pushheader_bynum_cssid(struct curl_pushheaders *h,
+                            size_t num, unsigned int ccsid)
+
+{
+  char *d = (char *) NULL;
+  char *s = curl_pushheader_bynum(h, num);
+
+  if(s)
+    d = dynconvert(ccsid, s, -1, ASCII_CCSID);
+
+  return d;
+}
+
+
+char *
+curl_pushheader_byname_ccsid(struct curl_pushheaders *h, const char *header,
+                             unsigned int ccsidin, unsigned int ccsidout)
+
+{
+  char *d = (char *) NULL;
+  char *s;
+
+  if(header) {
+    header = dynconvert(ASCII_CCSID, header, -1, ccsidin);
+
+    if(header) {
+      s = curl_pushheader_byname(h, header);
+      free((char *) header);
+
+      if(s)
+        d = dynconvert(ccsidout, s, -1, ASCII_CCSID);
+    }
+  }
+
+  return d;
+}
diff --git a/packages/OS400/ccsidcurl.h b/packages/OS400/ccsidcurl.h
index 96340c9..5bd24cf 100644
--- a/packages/OS400/ccsidcurl.h
+++ b/packages/OS400/ccsidcurl.h
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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.
+ * are also available at https://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
@@ -38,13 +38,13 @@
                                             int length, int * outlength,
                                             unsigned int sccsid,
                                             unsigned int dccsid);
-CURL_EXTERN struct curl_slist * curl_slist_append_ccsid(struct curl_slist * lst,
+CURL_EXTERN struct curl_slist * curl_slist_append_ccsid(struct curl_slist * l,
                                                         const char * data,
                                                         unsigned int ccsid);
 CURL_EXTERN time_t curl_getdate_ccsid(const char * p, const time_t * unused,
                                       unsigned int ccsid);
 CURL_EXTERN curl_version_info_data * curl_version_info_ccsid(CURLversion stamp,
-                                                             unsigned int csid);
+                                                             unsigned int cid);
 CURL_EXTERN const char * curl_easy_strerror_ccsid(CURLcode error,
                                                   unsigned int ccsid);
 CURL_EXTERN const char * curl_share_strerror_ccsid(CURLSHcode error,
@@ -60,5 +60,12 @@
                                    curl_formget_callback append,
                                    unsigned int ccsid);
 CURL_EXTERN CURLcode curl_easy_setopt_ccsid(CURL * curl, CURLoption tag, ...);
+CURL_EXTERN void curl_certinfo_free_all(struct curl_certinfo *info);
+CURL_EXTERN char *curl_pushheader_bynum_cssid(struct curl_pushheaders *h,
+                                              size_t num, unsigned int ccsid);
+CURL_EXTERN char *curl_pushheader_byname_ccsid(struct curl_pushheaders *h,
+                                               const char *header,
+                                               unsigned int ccsidin,
+                                               unsigned int ccsidout);
 
 #endif
diff --git a/packages/OS400/curl.inc.in b/packages/OS400/curl.inc.in
index b5e46bb..4176905 100644
--- a/packages/OS400/curl.inc.in
+++ b/packages/OS400/curl.inc.in
@@ -5,11 +5,11 @@
       *                            | (__| |_| |  _ <| |___
       *                             \___|\___/|_| \_\_____|
       *
-      * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+      * Copyright (C) 1998 - 2016, 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.
+      * are also available at https://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
@@ -66,6 +66,8 @@
      d CURLINFO_DOUBLE...
      d                 c                   X'00300000'
      d CURLINFO_SLIST  c                   X'00400000'
+     d CURLINFO_SOCKET...
+     d                 c                   X'00500000'
      d CURLINFO_MASK   c                   X'000FFFFF'
      d CURLINFO_TYPEMASK...
      d                 c                   X'00F00000'
@@ -80,6 +82,8 @@
      d                 c                   X'00000000'
      d CURL_GLOBAL_DEFAULT...
      d                 c                   X'00000003'
+     d CURL_GLOBAL_ACK_EINTR...
+     d                 c                   X'00000004'
       *
      d CURL_VERSION_IPV6...
      d                 c                   X'00000001'
@@ -92,7 +96,7 @@
      d CURL_VERSION_NTLM...
      d                 c                   X'00000010'
      d CURL_VERSION_GSSNEGOTIATE...
-     d                 c                   X'00000020'
+     d                 c                   X'00000020'                          Deprecated
      d CURL_VERSION_DEBUG...
      d                 c                   X'00000040'
      d CURL_VERSION_ASYNCHDNS...
@@ -109,21 +113,37 @@
      d                 c                   X'00001000'
      d CURL_VERSION_CURLDEBUG...
      d                 c                   X'00002000'
+     d CURL_VERSION_TLSAUTH_SRP...
+     d                 c                   X'00004000'
+     d CURL_VERSION_NTLM_WB...
+     d                 c                   X'00008000'
+     d CURL_VERSION_HTTP2...
+     d                 c                   X'00010000'
+     d CURL_VERSION_GSSAPI...
+     d                 c                   X'00020000'
+     d CURL_VERSION_KERBEROS5...
+     d                 c                   X'00040000'
+     d CURL_VERSION_UNIX_SOCKETS...
+     d                 c                   X'00080000'
+     d CURL_VERSION_PSL...
+     d                 c                   X'00100000'
       *
-     d HTTPPOST_FILENAME...
+     d CURL_HTTPPOST_FILENAME...
      d                 c                   X'00000001'
-     d HTTPPOST_READFILE...
+     d CURL_HTTPPOST_READFILE...
      d                 c                   X'00000002'
-     d HTTPPOST_PTRNAME...
+     d CURL_HTTPPOST_PTRNAME...
      d                 c                   X'00000004'
-     d HTTPPOST_PTRCONTENTS...
+     d CURL_HTTPPOST_PTRCONTENTS...
      d                 c                   X'00000008'
-     d HTTPPOST_BUFFER...
+     d CURL_HTTPPOST_BUFFER...
      d                 c                   X'00000010'
-     d HTTPPOST_PTRBUFFER...
+     d CURL_HTTPPOST_PTRBUFFER...
      d                 c                   X'00000020'
-     d HTTPPOST_CALLBACK...
+     d CURL_HTTPPOST_CALLBACK...
      d                 c                   X'00000040'
+     d CURL_HTTPPOST_LARGE...
+     d                 c                   X'00000080'
       *
      d CURL_SEEKFUNC_OK...
      d                 c                   0
@@ -144,11 +164,15 @@
      d CURLAUTH_BASIC  c                   X'00000001'
      d CURLAUTH_DIGEST...
      d                 c                   X'00000002'
-     d CURLAUTH_GSSNEGOTIATE...
+     d CURLAUTH_NEGOTIATE...
      d                 c                   X'00000004'
      d CURLAUTH_NTLM   c                   X'00000008'
      d CURLAUTH_DIGEST_IE...
      d                 c                   X'00000010'
+     d CURLAUTH_NTLM_WB...
+     d                 c                   X'00000020'
+     d CURLAUTH_ONLY...
+     d                 c                   X'80000000'
      d CURLAUTH_ANY    c                   X'7FFFFFEF'
      d CURLAUTH_ANYSAFE...
      d                 c                   X'7FFFFFEE'
@@ -165,9 +189,18 @@
      d                 c                   X'00000004'
      d CURLSSH_AUTH_KEYBOARD...
      d                 c                   X'00000008'
+     d CURLSSH_AUTH_AGENT...
+     d                 c                   X'00000010'
      d CURLSSH_AUTH_DEFAULT...
      d                 c                   X'7FFFFFFF'                          CURLSSH_AUTH_ANY
       *
+     d CURLGSSAPI_DELEGATION_NONE...
+     d                 c                   0
+     d CURLGSSAPI_DELEGATION_POLICY_FLAG...
+     d                 c                   X'00000001'
+     d CURLGSSAPI_DELEGATION_FLAG...
+     d                 c                   X'00000002'
+      *
      d CURL_ERROR_SIZE...
      d                 c                   256
       *
@@ -175,6 +208,8 @@
      d                 c                   0
      d CURLOPTTYPE_OBJECTPOINT...
      d                 c                   10000
+     d CURLOPTTYPE_STRINGPOINT...
+     d                 c                   10000
      d CURLOPTTYPE_FUNCTIONPOINT...
      d                 c                   20000
      d CURLOPTTYPE_OFF_T...
@@ -193,6 +228,14 @@
      d                 c                   1
      d CURL_HTTP_VERSION_1_1...
      d                 c                   2
+     d CURL_HTTP_VERSION_2_0...
+     d                 c                   3
+     d CURL_HTTP_VERSION_2...
+     d                 c                   3
+     d CURL_HTTP_VERSION_2TLS...
+     d                 c                   4
+     d CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE...
+     d                 c                   5
       *
      d CURL_NETRC_IGNORED...
      d                 c                   0
@@ -209,6 +252,17 @@
      d                 c                   2
      d CURL_SSLVERSION_SSLv3...
      d                 c                   3
+     d CURL_SSLVERSION_TLSv1_0...
+     d                 c                   4
+     d CURL_SSLVERSION_TLSv1_1...
+     d                 c                   5
+     d CURL_SSLVERSION_TLSv1_2...
+     d                 c                   6
+      *
+     d CURL_TLSAUTH_NONE...
+     d                 c                   0
+     d CURL_TLSAUTH_SRP...
+     d                 c                   1
       *
      d CURL_REDIR_GET_ALL...
      d                 c                   0
@@ -216,8 +270,10 @@
      d                 c                   1
      d CURL_REDIR_POST_302...
      d                 c                   2
+     d CURL_REDIR_POST_303...
+     d                 c                   4
      d CURL_REDIR_POST_ALL...
-     d                 c                   3
+     d                 c                   7
       *
      d CURL_POLL_NONE  c                   0
      d CURL_POLL_IN    c                   1
@@ -234,6 +290,9 @@
      d CURL_CSELECT_ERR...
      d                 c                   X'00000004'
       *
+     d CURL_PUSH_OK    c                   0
+     d CURL_PUSH_DENY  c                   1
+      *
      d CURLPAUSE_RECV  c                   X'00000001'
      d CURLPAUSE_RECV_CONT...
      d                 c                   X'00000000'
@@ -279,6 +338,13 @@
      d CURL_FNMATCHFUNC_FAIL...
      d                 c                   2
       *
+     d CURL_WAIT_POLLIN...
+     d                 c                   X'0001'
+     d CURL_WAIT_POLLPRI...
+     d                 c                   X'0002'
+     d CURL_WAIT_POLLOUT...
+     d                 c                   X'0004'
+      *
       **************************************************************************
       *                                Types
       **************************************************************************
@@ -295,7 +361,7 @@
      d                 c                   2
      d  CURLE_URL_MALFORMAT...
      d                 c                   3
-     d  CURLE_OBSOLETE4...
+     d  CURLE_NOT_BUILT_IN...
      d                 c                   4
      d  CURLE_COULDNT_RESOLVE_PROXY...
      d                 c                   5
@@ -303,15 +369,17 @@
      d                 c                   6
      d  CURLE_COULDNT_CONNECT...
      d                 c                   7
+     d  CURLE_WEIRD_SERVER_REPLY...
+     d                 c                   8
      d  CURLE_FTP_WEIRD_SERVER_REPLY...
      d                 c                   8
      d  CURLE_REMOTE_ACCESS_DENIED...
      d                 c                   9
-     d  CURLE_OBSOLETE10...
+     d  CURLE_FTP_ACCEPT_FAILED...
      d                 c                   10
      d  CURLE_FTP_WEIRD_PASS_REPLY...
      d                 c                   11
-     d  CURLE_OBSOLETE12...
+     d  CURLE_FTP_ACCEPT_TIMEOUT...
      d                 c                   12
      d  CURLE_FTP_WEIRD_PASV_REPLY...
      d                 c                   13
@@ -319,8 +387,7 @@
      d                 c                   14
      d  CURLE_FTP_CANT_GET_HOST...
      d                 c                   15
-     d  CURLE_OBSOLETE16...
-     d                 c                   16
+     d  CURLE_HTTP2    c                   16
      d  CURLE_FTP_COULDNT_SET_TYPE...
      d                 c                   17
      d  CURLE_PARTIAL_FILE...
@@ -383,7 +450,7 @@
      d                 c                   46
      d  CURLE_TOO_MANY_REDIRECTS...
      d                 c                   47
-     d  CURLE_UNKNOWN_TELNET_OPTION...
+     d  CURLE_UNKNOWN_OPTION...
      d                 c                   48
      d  CURLE_TELNET_OPTION_SYNTAX...
      d                 c                   49
@@ -465,6 +532,75 @@
      d                 c                   87
      d  CURLE_CHUNK_FAILED...
      d                 c                   88
+     d  CURLE_NO_CONNECTION_AVAILABLE...
+     d                 c                   89
+     d  CURLE_SSL_PINNEDPUBKEYNOTMATCH...
+     d                 c                   90
+     d  CURLE_SSL_INVALIDCERTSTATUS...
+     d                 c                   91
+     d  CURLE_HTTP2_STREAM...
+     d                 c                   92
+      *
+      /if not defined(CURL_NO_OLDIES)
+     d  CURLE_URL_MALFORMAT_USER...
+     d                 c                   4
+     d  CURLE_FTP_ACCESS_DENIED...
+     d                 c                   9
+     d  CURLE_FTP_USER_PASSWORD_INCORRECT...
+     d                 c                   10
+     d  CURLE_FTP_WEIRD_USER_REPLY...
+     d                 c                   12
+     d  CURLE_FTP_CANT_RECONNECT...
+     d                 c                   16
+     d  CURLE_FTP_COULDNT_SET_BINARY...
+     d                 c                   17
+     d  CURLE_FTP_PARTIAL_FILE...
+     d                 c                   18
+     d  CURLE_FTP_WRITE_ERROR...
+     d                 c                   20
+     d  CURLE_FTP_QUOTE_ERROR...
+     d                 c                   21
+     d  CURLE_HTTP_NOT_FOUND...
+     d                 c                   22
+     d  CURLE_MALFORMAT_USER...
+     d                 c                   24
+     d  CURLE_FTP_COULDNT_STOR_FILE...
+     d                 c                   25
+     d  CURLE_OPERATION_TIMEOUTED...
+     d                 c                   28
+     d  CURLE_FTP_COULDNT_SET_ASCII...
+     d                 c                   29
+     d  CURLE_FTP_COULDNT_GET_SIZE...
+     d                 c                   32
+     d  CURLE_HTTP_RANGE_ERROR...
+     d                 c                   33
+     d  CURLE_FTP_BAD_DOWNLOAD_RESUME...
+     d                 c                   36
+     d  CURLE_LIBRARY_NOT_FOUND...
+     d                 c                   40
+     d  CURLE_BAD_CALLING_ORDER...
+     d                 c                   44
+     d  CURLE_HTTP_PORT_FAILED...
+     d                 c                   45
+     d  CURLE_BAD_PASSWORD_ENTERED...
+     d                 c                   46
+     d  CURLE_UNKNOWN_TELNET_OPTION...
+     d                 c                   48
+     d  CURLE_OBSOLETE...
+     d                 c                   50
+     d  CURLE_SSL_PEER_CERTIFICATE...
+     d                 c                   51
+     d  CURLE_SHARE_IN_USE...
+     d                 c                   57
+     d  CURLE_FTP_SSL_FAILED...
+     d                 c                   64
+     d  CURLE_TFTP_DISKFULL...
+     d                 c                   70
+     d  CURLE_TFTP_EXISTS...
+     d                 c                   73
+     d  CURLE_ALREADY_COMPLETE...
+     d                 c                   99999
+      /endif
       *
      d curlioerr       s             10i 0 based(######ptr######)               Enum
      d  CURLIOE_OK     c                   0
@@ -560,6 +696,24 @@
      d  CURLUSESSL_ALL...
      d                 c                   3
       *
+     d CURLSSLOPT_ALLOW_BEAST...
+     d                 c                   X'0001'
+     d CURLSSLOPT_NO_REVOKE...
+     d                 c                   X'0002'
+      *
+      /if not defined(CURL_NO_OLDIES)
+     d curl_ftpssl     s                   like(curl_usessl)
+     d                                     based(######ptr######)
+     d  CURLFTPSSL_NONE...
+     d                 c                   0
+     d  CURLFTPSSL_TRY...
+     d                 c                   1
+     d  CURLFTPSSL_CONTROL...
+     d                 c                   2
+     d  CURLFTPSSL_ALL...
+     d                 c                   3
+      /endif
+      *
      d curl_ftpccc     s             10i 0 based(######ptr######)               Enum
      d  CURLFTPSSL_CCC_NONE...
      d                 c                   0
@@ -595,6 +749,11 @@
      d  CURLFTPMETHOD_SINGLECWD...
      d                 c                   3
       *
+     d  CURLHEADER_UNIFIED...
+     d                 c                   X'00000000'
+     d  CURLHEADER_SEPARATE...
+     d                 c                   X'00000001'
+      *
      d  CURLPROTO_HTTP...
      d                 c                   X'00000001'
      d  CURLPROTO_HTTPS...
@@ -647,9 +806,12 @@
      d                 c                   X'01000000'
      d  CURLPROTO_GOPHER...
      d                 c                   X'02000000'
+     d  CURLPROTO_SMB...
+     d                 c                   X'04000000'
+     d  CURLPROTO_SMBS...
+     d                 c                   X'08000000'
       *
      d CURLoption      s             10i 0 based(######ptr######)               Enum
-     d  CURLOPT_FILE   c                   10001
      d  CURLOPT_WRITEDATA...
      d                 c                   10001
      d  CURLOPT_URL    c                   10002
@@ -660,8 +822,6 @@
      d  CURLOPT_PROXYUSERPWD...
      d                 c                   10006
      d  CURLOPT_RANGE  c                   10007
-     d  CURLOPT_INFILE...
-     d                 c                   10009
      d  CURLOPT_READDATA...
      d                 c                   10009
      d  CURLOPT_ERRORBUFFER...
@@ -698,14 +858,10 @@
      d                 c                   10024
      d  CURLOPT_SSLCERT...
      d                 c                   10025
-     d  CURLOPT_SSLCERTPASSWD...
-     d                 c                   10026
      d  CURLOPT_KEYPASSWD...
      d                 c                   10026
      d  CURLOPT_CRLF   c                   00027
      d  CURLOPT_QUOTE  c                   10028
-     d  CURLOPT_WRITEHEADER...
-     d                 c                   10029
      d  CURLOPT_HEADERDATA...
      d                 c                   10029
      d  CURLOPT_COOKIEFILE...
@@ -722,8 +878,6 @@
      d                 c                   10037
      d  CURLOPT_POSTQUOTE...
      d                 c                   10039
-     d  CURLOPT_WRITEINFO...
-     d                 c                   10040
      d  CURLOPT_VERBOSE...
      d                 c                   00041
      d  CURLOPT_HEADER...
@@ -751,6 +905,8 @@
      d                 c                   20056
      d  CURLOPT_PROGRESSDATA...
      d                 c                   10057
+     d  CURLOPT_XFERINFODATA...
+     d                 c                   10057                                PROGRESSDATA alias
      d  CURLOPT_AUTOREFERER...
      d                 c                   00058
      d  CURLOPT_PROXYPORT...
@@ -775,8 +931,6 @@
      d                 c                   10070
      d  CURLOPT_MAXCONNECTS...
      d                 c                   00071
-     d  CURLOPT_CLOSEPOLICY...
-     d                 c                   00072
      d  CURLOPT_FRESH_CONNECT...
      d                 c                   00074
      d  CURLOPT_FORBID_REUSE...
@@ -832,7 +986,7 @@
      d  CURLOPT_SHARE  c                   10100
      d  CURLOPT_PROXYTYPE...
      d                 c                   00101
-     d  CURLOPT_ENCODING...
+     d  CURLOPT_ACCEPT_ENCODING...
      d                 c                   10102
      d  CURLOPT_PRIVATE...
      d                 c                   10103
@@ -1016,11 +1170,122 @@
      d                 c                   10201
      d  CURLOPT_FNMATCH_DATA...
      d                 c                   10202
+     d  CURLOPT_RESOLVE...
+     d                 c                   10203
+     d  CURLOPT_TLSAUTH_USERNAME...
+     d                 c                   10204
+     d  CURLOPT_TLSAUTH_PASSWORD...
+     d                 c                   10205
+     d  CURLOPT_TLSAUTH_TYPE...
+     d                 c                   10206
+     d  CURLOPT_TRANSFER_ENCODING...
+     d                 c                   00207
+     d  CURLOPT_CLOSESOCKETFUNCTION...
+     d                 c                   20208
+     d  CURLOPT_CLOSESOCKETDATA...
+     d                 c                   10209
+     d  CURLOPT_GSSAPI_DELEGATION...
+     d                 c                   00210
+     d  CURLOPT_DNS_SERVERS...
+     d                 c                   10211
+     d  CURLOPT_ACCEPTTIMEOUT_MS...
+     d                 c                   00212
+     d  CURLOPT_TCP_KEEPALIVE...
+     d                 c                   00213
+     d  CURLOPT_TCP_KEEPIDLE...
+     d                 c                   00214
+     d  CURLOPT_TCP_KEEPINTVL...
+     d                 c                   00215
+     d  CURLOPT_SSL_OPTIONS...
+     d                 c                   00216
+     d  CURLOPT_MAIL_AUTH...
+     d                 c                   10217
+     d  CURLOPT_SASL_IR...
+     d                 c                   00218
+     d  CURLOPT_XFERINFOFUNCTION...
+     d                 c                   20219
+     d  CURLOPT_XOAUTH2_BEARER...
+     d                 c                   10220
+     d  CURLOPT_DNS_INTERFACE...
+     d                 c                   10221
+     d  CURLOPT_DNS_LOCAL_IP4...
+     d                 c                   10222
+     d  CURLOPT_DNS_LOCAL_IP6...
+     d                 c                   10223
+     d  CURLOPT_LOGIN_OPTIONS...
+     d                 c                   10224
+     d  CURLOPT_SSL_ENABLE_NPN...
+     d                 c                   00225
+     d  CURLOPT_SSL_ENABLE_ALPN...
+     d                 c                   00226
+     d  CURLOPT_EXPECT_100_TIMEOUT_MS...
+     d                 c                   00227
+     d  CURLOPT_PROXYHEADER...
+     d                 c                   10228
+     d  CURLOPT_HEADEROPT...
+     d                 c                   00229
+     d  CURLOPT_PINNEDPUBLICKEY...
+     d                 c                   10230
+     d  CURLOPT_UNIX_SOCKET_PATH...
+     d                 c                   10231
+     d  CURLOPT_SSL_VERIFYSTATUS...
+     d                 c                   00232
+     d  CURLOPT_SSL_FALSESTART...
+     d                 c                   00233
+     d  CURLOPT_PATH_AS_IS...
+     d                 c                   00234
+     d  CURLOPT_PROXY_SERVICE_NAME...
+     d                 c                   10235
+     d  CURLOPT_SERVICE_NAME...
+     d                 c                   10236
+     d  CURLOPT_PIPEWAIT...
+     d                 c                   00237
+     d  CURLOPT_DEFAULT_PROTOCOL...
+     d                 c                   10238
+     d  CURLOPT_STREAM_WEIGHT...
+     d                 c                   00239
+     d  CURLOPT_STREAM_DEPENDS...
+     d                 c                   10240
+     d  CURLOPT_STREAM_DEPENDS_E...
+     d                 c                   10241
+     d  CURLOPT_TFTP_NO_OPTIONS...
+     d                 c                   00242
+     d  CURLOPT_CONNECT_TO...
+     d                 c                   10243
+     d  CURLOPT_TCP_FASTOPEN...
+     d                 c                   00244
+     d  CURLOPT_KEEP_SENDING_ON_ERROR...
+     d                 c                   00245
       *
+      /if not defined(CURL_NO_OLDIES)
+     d  CURLOPT_FILE   c                   10001
+     d  CURLOPT_INFILE...
+     d                 c                   10009
+     d  CURLOPT_SSLKEYPASSWD...
+     d                 c                   10026
+     d  CURLOPT_SSLCERTPASSWD...
+     d                 c                   10026
+     d  CURLOPT_WRITEHEADER...
+     d                 c                   10029
+     d  CURLOPT_WRITEINFO...
+     d                 c                   10040
+     d  CURLOPT_FTPLISTONLY...
+     d                 c                   00048
+     d  CURLOPT_FTPAPPEND...
+     d                 c                   00050
+     d  CURLOPT_CLOSEPOLICY...
+     d                 c                   00072
+     d  CURLOPT_KRB4LEVEL...
+     d                 c                   10063
+     d  CURLOPT_ENCODING...
+     d                 c                   10102
      d  CURLOPT_SERVER_RESPONSE_TIMEOUT...
      d                 c                   00112
+     d  CURLOPT_FTP_SSL...
+     d                 c                   00119
      d  CURLOPT_POST301...
-     d                 c                   00161                                Obsolescent
+     d                 c                   00161
+      /endif
       *
      d CURLFORMcode    s             10i 0 based(######ptr######)               Enum
      d  CURL_FORMADD_OK...
@@ -1081,6 +1346,8 @@
      d                 c                   18
      d  CURLFORM_STREAM...
      d                 c                   19
+     d  CURLFORM_CONTENTLEN...
+     d                 c                   20
       *
      d CURLINFO        s             10i 0 based(######ptr######)               Enum
      d  CURLINFO_EFFECTIVE_URL...                                               CURLINFO_STRING + 1
@@ -1167,10 +1434,52 @@
      d                 c                   X'00100029'
      d  CURLINFO_LOCAL_PORT...                                                  CURLINFO_LONG + 42
      d                 c                   X'0020002A'
+     d  CURLINFO_TLS_SESSION...                                                 CURLINFO_SLIST + 43
+     d                 c                   X'0040002B'
+     d  CURLINFO_ACTIVESOCKET...                                                CURLINFO_SOCKET + 44
+     d                 c                   X'0050002C'
+     d  CURLINFO_TLS_SSL_PTR...                                                 CURLINFO_SLIST + 45
+     d                 c                   X'0040002D'
+     d  CURLINFO_HTTP_VERSION...                                                CURLINFO_LONG + 46
+     d                 c                   X'0020002E'
       *
      d  CURLINFO_HTTP_CODE...                                                   Old ...RESPONSE_CODE
      d                 c                   X'00200002'
       *
+     d curl_sslbackend...
+     d                 s             10i 0 based(######ptr######)               Enum
+     d  CURLSSLBACKEND_NONE...
+     d                 c                   0
+     d  CURLSSLBACKEND_OPENSSL...
+     d                 c                   1
+     d  CURLSSLBACKEND_GNUTLS...
+     d                 c                   2
+     d  CURLSSLBACKEND_NSS...
+     d                 c                   3
+     d  CURLSSLBACKEND_OBSOLETE4...
+     d                 c                   4
+     d  CURLSSLBACKEND_GSKIT...
+     d                 c                   5
+     d  CURLSSLBACKEND_POLARSSL...
+     d                 c                   6
+     d  CURLSSLBACKEND_CYASSL...
+     d                 c                   7
+     d  CURLSSLBACKEND_SCHANNEL...
+     d                 c                   8
+     d  CURLSSLBACKEND_DARWINSSL...
+     d                 c                   9
+     d  CURLSSLBACKEND_AXTLS...
+     d                 c                   10
+     d  CURLSSLBACKEND_MBEDTLS...
+     d                 c                   11
+      * Aliases for clones.
+     d  CURLSSLBACKEND_LIBRESSL...
+     d                 c                   1
+     d  CURLSSLBACKEND_BORINGSSL...
+     d                 c                   1
+     d  CURLSSLBACKEND_WOLFSSL...
+     d                 c                   6
+      *
      d curl_closepolicy...
      d                 s             10i 0 based(######ptr######)               Enum
      d  CURLCLOSEPOLICY_OLDEST...
@@ -1230,6 +1539,8 @@
      d                 c                   3
      d  CURLSHE_NOMEM...
      d                 c                   4
+     d  CURLSHE_NOT_BUILT_IN...
+     d                 c                   5
       *
      d CURLSHoption...
      d                 s             10i 0 based(######ptr######)               Enum
@@ -1259,6 +1570,15 @@
      d curlsocktype    s             10i 0 based(######ptr######)               Enum
      d  CURLSOCKTYPE_IPCXN...
      d                 c                   0
+     d  CURLSOCKTYPE_ACCEPT...
+     d                 c                   1
+      *
+     d  CURL_SOCKOPT_OK...
+     d                 c                   0
+     d  CURL_SOCKOPT_ERROR...
+     d                 c                   1
+     d  CURL_SOCKOPT_ALREADY_CONNECTED...
+     d                 c                   2
       *
      d CURLMcode       s             10i 0 based(######ptr######)               Enum
      d  CURLM_CALL_MULTI_PERFORM...
@@ -1278,7 +1598,9 @@
      d                 c                   5
      d  CURLM_UNKNOWN_OPTION...
      d                 c                   6
-     d  CURLM_LAST     c                   7
+     d  CURLM_ADDED_ALREADY...
+     d                 c                   7
+     d  CURLM_LAST     c                   8
       *
      d CURLMSG         s             10i 0 based(######ptr######)               Enum
      d  CURLMSG_NONE   c                   0
@@ -1297,6 +1619,32 @@
      d                 c                   10005
      d  CURLMOPT_MAXCONNECTS...
      d                 c                   00006
+     d  CURLMOPT_MAX_HOST_CONNECTIONS...
+     d                 c                   00007
+     d  CURLMOPT_MAX_PIPELINE_LENGTH...
+     d                 c                   00008
+     d  CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE...
+     d                 c                   30009
+     d  CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE...
+     d                 c                   30010
+     d  CURLMOPT_PIPELINING_SITE_BL...
+     d                 c                   10011
+     d  CURLMOPT_PIPELINING_SERVER_BL...
+     d                 c                   10012
+     d  CURLMOPT_MAX_TOTAL_CONNECTIONS...
+     d                 c                   00013
+     d  CURLMOPT_PUSHFUNCTION...
+     d                 c                   20014
+     d  CURLMOPT_PUSHDATA...
+     d                 c                   10015
+      *
+      * Bitmask bits for CURLMOPT_PIPELING.
+      *
+     d CURLPIPE_NOTHING...
+     d                 c                   x'00000000'
+     d CURLPIPE_HTTP1  c                   x'00000001'
+     d CURLPIPE_MULTIPLEX...
+     d                 c                   x'00000002'
       *
       *  Public API enums for RTSP requests.
       *
@@ -1338,6 +1686,13 @@
      d   whatever                      *   overlay(data)                        void *
      d   result                            overlay(data) like(CURLcode)
       *
+     d curl_waitfd...
+     d                 ds                  based(######ptr######)
+     d                                     qualified
+     d  fd                                 like(curl_socket_t)
+     d  events                        5i 0
+     d  revents                       5i 0
+      *
      d curl_http_post...
      d                 ds                  based(######ptr######)
      d                                     qualified
@@ -1366,12 +1721,7 @@
      d  addrlen                      10u 0
      d  addr                         16                                         struct sockaddr
       *
-     d curl_khkey      ds                  based(######ptr######)
-     d                                     qualified
-     d  key                            *                                        const char *
-     d  len                          10u 0
-     d  keytype                      10i 0
-      *
+     d curl_khtype     s             10i 0 based(######ptr######)               enum
      d CURLKHTYPE_UNKNOWN...
      d                 c                   0
      d CURLKHTYPE_RSA1...
@@ -1381,6 +1731,12 @@
      d CURLKHTYPE_DSS...
      d                 c                   3
       *
+     d curl_khkey      ds                  based(######ptr######)
+     d                                     qualified
+     d  key                            *                                        const char *
+     d  len                          10u 0
+     d  keytype                            like(curl_khtype)
+      *
      d curl_forms      ds                  based(######ptr######)
      d                                     qualified
      d  option                             like(CURLformoption)
@@ -1388,6 +1744,7 @@
      d   value_ptr                     *   overlay(value)
      d   value_procptr...
      d                                 *   overlay(value) procptr
+     d   value_num                         overlay(value: 8) like(curl_off_t)
       *
      d curl_slist      ds                  based(######ptr######)
      d                                     qualified
@@ -1428,6 +1785,12 @@
      d  group                          *                                        char *
      d  target                         *                                        char *
       *
+     d curl_tlssessioninfo...
+     d                 ds                  based(######ptr######)
+     d                                     qualified
+     d  backend                            like(curl_sslbackend)
+     d  internals                      *                                        void *
+      *
      d curl_fileinfo   ds                  based(######ptr######)
      d                                     qualified
      d  filename                       *                                        char *
@@ -1471,6 +1834,9 @@
      d curl_progress_callback...
      d                 s               *   based(######ptr######) procptr
       *
+     d curl_xferinfo_callback...
+     d                 s               *   based(######ptr######) procptr
+      *
      d curl_read_callback...
      d                 s               *   based(######ptr######) procptr
       *
@@ -1498,6 +1864,12 @@
      d curl_socket_callback...
      d                 s               *   based(######ptr######) procptr
       *
+     d curl_multi_timer_callback...
+     d                 s               *   based(######ptr######) procptr
+      *
+     d curl_push_callback...
+     d                 s               *   based(######ptr######) procptr
+      *
      d curl_opensocket_callback...
      d                 s               *   based(######ptr######) procptr
       *
@@ -1513,6 +1885,9 @@
      d curl_fnmatch_callback...
      d                 s               *   based(######ptr######) procptr
       *
+     d curl_closesocket_callback...
+     d                 s               *   based(######ptr######) procptr
+      *
       **************************************************************************
       *                              Prototypes
       **************************************************************************
@@ -1780,6 +2155,15 @@
      d  exc_fd_set                65535    options(*varsize)                    fd_set
      d  max_fd                       10i 0
       *
+     d curl_multi_wait...
+     d                 pr                  extproc('curl_multi_wait')
+     d                                     like(CURLMcode)
+     d  multi_handle                   *   value                                CURLM *
+     d  extra_fds                      *   value                                curl_waitfd *
+     d  extra_nfds                   10u 0 value
+     d  timeout_ms                   10i 0 value
+     d  ret                          10i 0 options(*omit)
+      *
      d curl_multi_perform...
      d                 pr                  extproc('curl_multi_perform')
      d                                     like(CURLMcode)
@@ -1801,6 +2185,16 @@
      d                 pr              *   extproc('curl_multi_strerror')       char *
      d  code                               value like(CURLMcode)
       *
+     d curl_pushheader_bynum...
+     d                 pr              *   extproc('curl_pushheader_bynum')     char *
+     d  h                              *   value                                curl_pushheaders *
+     d  num                          10u 0 value
+      *
+     d curl_pushheader_byname...
+     d                 pr              *   extproc('curl_pushheader_byname')    char *
+     d  h                              *   value                                curl_pushheaders *
+     d  header                         *   value options(*string)               const char *
+      *
      d curl_multi_socket...
      d                 pr                  extproc('curl_multi_socket')
      d                                     like(CURLMcode)
@@ -1925,14 +2319,19 @@
      d  code                               value like(CURLMcode)
      d  ccsid                        10u 0 value
       *
+      * May be used for strings and structures.
      d curl_easy_getinfo_ccsid...
      d                 pr                  extproc('curl_easy_getinfo_ccsid')
      d                                     like(CURLcode)
      d  curl                           *   value                                CURL *
      d  info                               value like(CURLINFO)
-     d  stringarg                      *   options(*nopass)                     char *
+     d  ptrarg                         *   options(*nopass)                     char *
      d  ccsid                        10u 0 value options(*nopass)
       *
+     d curl_certinfo_free_all...
+     d                 pr                  extproc('curl_certinfo_free_all')
+     d  info                           *   value
+      *
      d curl_formadd_ccsid...
      d                 pr                  extproc('curl_formadd_ccsid')
      d                                     like(CURLFORMcode)
@@ -1963,4 +2362,19 @@
      d  objectarg                      *   value options(*string: *nopass)
      d  ccsid                        10u 0 value options(*nopass)
       *
+     d curl_pushheader_bynum_ccsid...
+     d                 pr              *   extproc(                             char *
+     d                                       'curl_pushheader_bynum_ccsid')
+     d  h                              *   value                                curl_pushheaders *
+     d  num                          10u 0 value
+     d  ccsid                        10u 0 value
+      *
+     d curl_pushheader_byname_ccsid...
+     d                 pr              *   extproc(                             char *
+     d                                       'curl_pushheader_byname_ccsid')
+     d  h                              *   value                                curl_pushheaders *
+     d  header                         *   value options(*string)               const char *
+     d  ccsidin                      10u 0 value
+     d  ccsidout                     10u 0 value
+      *
       /endif
diff --git a/packages/OS400/initscript.sh b/packages/OS400/initscript.sh
index 9bf93a8..a13d651 100644
--- a/packages/OS400/initscript.sh
+++ b/packages/OS400/initscript.sh
@@ -1,6 +1,16 @@
 #!/bin/sh
 
 
+setenv()
+
+{
+        #       Define and export.
+
+        eval ${1}="${2}"
+        export ${1}
+}
+
+
 case "${SCRIPTDIR}" in
 /*)     ;;
 *)      SCRIPTDIR="`pwd`/${SCRIPTDIR}"
@@ -32,18 +42,30 @@
 #
 ################################################################################
 
-TARGETLIB='CURL'                # Target OS/400 program library
-STATBNDDIR='CURL_A'             # Static binding directory.
-DYNBNDDIR='CURL'                # Dynamic binding directory.
-SRVPGM="CURL.${SONAME}"         # Service program.
-TGTCCSID='500'                  # Target CCSID of objects
-DEBUG='*ALL'                    # Debug level
-OPTIMIZE='10'                   # Optimisation level
-OUTPUT='*NONE'                  # Compilation output option.
-TGTRLS='V5R3M0'                 # Target OS release
+setenv TARGETLIB        'CURL'                  # Target OS/400 program library.
+setenv STATBNDDIR       'CURL_A'                # Static binding directory.
+setenv DYNBNDDIR        'CURL'                  # Dynamic binding directory.
+setenv SRVPGM           "CURL.${SONAME}"        # Service program.
+setenv TGTCCSID         '500'                   # Target CCSID of objects.
+setenv DEBUG            '*ALL'                  # Debug level.
+setenv OPTIMIZE         '10'                    # Optimisation level
+setenv OUTPUT           '*NONE'                 # Compilation output option.
+setenv TGTRLS           'V6R1M0'                # Target OS release.
+setenv IFSDIR           '/curl'                 # Installation IFS directory.
 
-export TARGETLIB STATBNDDIR DYNBNDDIR SRVPGM TGTCCSID DEBUG OPTIMIZE OUTPUT
-export TGTRLS
+#       Define ZLIB availability and locations.
+
+setenv WITH_ZLIB        0                       # Define to 1 to enable.
+setenv ZLIB_INCLUDE     '/zlib/include'         # ZLIB include IFS directory.
+setenv ZLIB_LIB         'ZLIB'                  # ZLIB library.
+setenv ZLIB_BNDDIR      'ZLIB_A'                # ZLIB binding directory.
+
+#       Define LIBSSH2 availability and locations.
+
+setenv WITH_LIBSSH2     0                       # Define to 1 to enable.
+setenv LIBSSH2_INCLUDE  '/libssh2/include'      # LIBSSH2 include IFS directory.
+setenv LIBSSH2_LIB      'LIBSSH2'               # LIBSSH2 library.
+setenv LIBSSH2_BNDDIR   'LIBSSH2_A'             # LIBSSH2 binding directory.
 
 
 ################################################################################
@@ -104,6 +126,41 @@
 }
 
 
+#       canonicalize_path path
+#
+#       Return canonicalized path as:
+#       - Absolute
+#       - No . or .. component.
+
+canonicalize_path()
+
+{
+        if expr "${1}" : '^/' > /dev/null
+        then    P="${1}"
+        else    P="`pwd`/${1}"
+        fi
+
+        R=
+        IFSSAVE="${IFS}"
+        IFS="/"
+
+        for C in ${P}
+        do      IFS="${IFSSAVE}"
+                case "${C}" in
+                .)      ;;
+                ..)     R=`expr "${R}" : '^\(.*/\)..*'`
+                        ;;
+                ?*)     R="${R}${C}/"
+                        ;;
+                *)      ;;
+                esac
+        done
+
+        IFS="${IFSSAVE}"
+        echo "/`expr "${R}" : '^\(.*\)/'`"
+}
+
+
 #       make_module module_name source_name [additional_definitions]
 #
 #       Compile source name into ASCII module if needed.
@@ -116,6 +173,7 @@
         MODULES="${MODULES} ${1}"
         MODIFSNAME="${LIBIFSNAME}/${1}.MODULE"
         action_needed "${MODIFSNAME}" "${2}" || return 0;
+        SRCDIR=`dirname \`canonicalize_path "${2}"\``
 
         #       #pragma convert has to be in the source file itself, i.e.
         #               putting it in an include file makes it only active
@@ -130,17 +188,37 @@
         CMD="CRTCMOD MODULE(${TARGETLIB}/${1}) SRCSTMF('__tmpsrcf.c')"
 #       CMD="${CMD} SYSIFCOPT(*IFS64IO) OPTION(*INCDIRFIRST *SHOWINC *SHOWSYS)"
         CMD="${CMD} SYSIFCOPT(*IFS64IO) OPTION(*INCDIRFIRST)"
-        CMD="${CMD} LOCALETYPE(*LOCALE)"
+        CMD="${CMD} LOCALETYPE(*LOCALE) FLAG(10)"
         CMD="${CMD} INCDIR('/qibm/proddata/qadrt/include'"
-        CMD="${CMD} '${TOPDIR}/include/curl' '${TOPDIR}/include'"
-        CMD="${CMD} '${TOPDIR}/packages/OS400' ${INCLUDES})"
+        CMD="${CMD} '${TOPDIR}/include/curl' '${TOPDIR}/include' '${SRCDIR}'"
+        CMD="${CMD} '${TOPDIR}/packages/OS400'"
+
+        if [ "${WITH_ZLIB}" != "0" ]
+        then    CMD="${CMD} '${ZLIB_INCLUDE}'"
+        fi
+
+        if [ "${WITH_LIBSSH2}" != "0" ]
+        then    CMD="${CMD} '${LIBSSH2_INCLUDE}'"
+        fi
+
+        CMD="${CMD} ${INCLUDES})"
         CMD="${CMD} TGTCCSID(${TGTCCSID}) TGTRLS(${TGTRLS})"
         CMD="${CMD} OUTPUT(${OUTPUT})"
         CMD="${CMD} OPTIMIZE(${OPTIMIZE})"
         CMD="${CMD} DBGVIEW(${DEBUG})"
 
-        if [ "${3}" ]
-        then    CMD="${CMD} DEFINE(${3})"
+        DEFINES="${3} BUILDING_LIBCURL"
+
+        if [ "${WITH_ZLIB}" != "0" ]
+        then    DEFINES="${DEFINES} HAVE_LIBZ HAVE_ZLIB_H"
+        fi
+
+        if [ "${WITH_LIBSSH2}" != "0" ]
+        then    DEFINES="${DEFINES} USE_LIBSSH2 HAVE_LIBSSH2_H"
+        fi
+
+        if [ "${DEFINES}" ]
+        then    CMD="${CMD} DEFINE(${DEFINES})"
         fi
 
         system "${CMD}"
@@ -154,10 +232,17 @@
 db2_name()
 
 {
-        basename "${1}"                                                 |
-        tr '[a-z-]' '[A-Z_]'                                            |
-        sed -e 's/\..*//'                                               \
-            -e 's/^\(..........\).*/\1/'
+        if [ "${2}" = 'nomangle' ]
+        then    basename "${1}"                                         |
+                tr 'a-z-' 'A-Z_'                                        |
+                sed -e 's/\..*//'                                       \
+                    -e 's/^\(.\).*\(.........\)$/\1\2/'
+        else    basename "${1}"                                         |
+                tr 'a-z-' 'A-Z_'                                        |
+                sed -e 's/\..*//'                                       \
+                    -e 's/^CURL_*/C/'                                   \
+                    -e 's/^\(.\).*\(.........\)$/\1\2/'
+        fi
 }
 
 
diff --git a/packages/OS400/make-include.sh b/packages/OS400/make-include.sh
index 834ee2f..ad72cf4 100644
--- a/packages/OS400/make-include.sh
+++ b/packages/OS400/make-include.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#       Installation of the include files in the OS/400 library.
+#       Installation of the header files in the OS/400 library.
 #
 
 SCRIPTDIR=`dirname "${0}"`
@@ -8,16 +8,16 @@
 cd "${TOPDIR}/include"
 
 
-#	Produce the curlbuild.h include file if not yet in distribution (CVS).
+#       Produce the curlbuild.h header file if not yet in distribution (CVS).
 
 if action_needed curl/curlbuild.h
-then	if action_needed curl/curlbuild.h curl/curlbuild.h.dist
-	then	cp -p curl/curlbuild.h.dist curl/curlbuild.h
-	fi
+then    if action_needed curl/curlbuild.h curl/curlbuild.h.dist
+        then    cp -p curl/curlbuild.h.dist curl/curlbuild.h
+        fi
 fi
 
 
-#       Create the OS/400 source program file for the include files.
+#       Create the OS/400 source program file for the header files.
 
 SRCPF="${LIBIFSNAME}/H.FILE"
 
@@ -28,16 +28,25 @@
 fi
 
 
+#       Create the IFS directory for the header files.
+
+IFSINCLUDE="${IFSDIR}/include/curl"
+
+if action_needed "${IFSINCLUDE}"
+then    mkdir -p "${IFSINCLUDE}"
+fi
+
+
 #       Enumeration values are used as va_arg tagfields, so they MUST be
 #               integers.
 
 copy_hfile()
 
 {
-	destfile="${1}"
-	srcfile="${2}"
-	shift
-	shift
+        destfile="${1}"
+        srcfile="${2}"
+        shift
+        shift
         sed -e '1i\
 #pragma enum(int)\
 ' "${@}" -e '$a\
@@ -48,23 +57,34 @@
 #       Copy the header files.
 
 for HFILE in curl/*.h ${SCRIPTDIR}/ccsidcurl.h
-do      DEST="${SRCPF}/`db2_name \"${HFILE}\"`.MBR"
+do      case "`basename \"${HFILE}\" .h`" in
+        stdcheaders|typecheck-gcc)
+                continue;;
+        esac
+
+        DEST="${SRCPF}/`db2_name \"${HFILE}\" nomangle`.MBR"
+
         if action_needed "${DEST}" "${HFILE}"
         then    copy_hfile "${DEST}" "${HFILE}"
+                IFSDEST="${IFSINCLUDE}/`basename \"${HFILE}\"`"
+                rm -f "${IFSDEST}"
+                ln -s "${DEST}" "${IFSDEST}"
         fi
 done
 
 
-#       Copy the ILE/RPG include file, setting-up version number.
+#       Copy the ILE/RPG header file, setting-up version number.
 
-        versioned_copy "${SCRIPTDIR}/curl.inc.in" "${SRCPF}/CURL.INC.MBR"
+versioned_copy "${SCRIPTDIR}/curl.inc.in" "${SRCPF}/CURL.INC.MBR"
+rm -f "${IFSINCLUDE}/curl.inc.rpgle"
+ln -s "${SRCPF}/CURL.INC.MBR" "${IFSINCLUDE}/curl.inc.rpgle"
 
 
-#	Duplicate file H as CURL to support more include path forms.
+#       Duplicate file H as CURL to support more include path forms.
 
 if action_needed "${LIBIFSNAME}/CURL.FILE"
-then	:
-else	system "DLTF FILE(${TARGETLIB}/CURL)"
+then    :
+else    system "DLTF FILE(${TARGETLIB}/CURL)"
 fi
 
 CMD="CRTDUPOBJ OBJ(H) FROMLIB(${TARGETLIB}) OBJTYPE(*FILE) TOLIB(*FROMLIB)"
diff --git a/packages/OS400/make-lib.sh b/packages/OS400/make-lib.sh
index b7f951b..410bef0 100644
--- a/packages/OS400/make-lib.sh
+++ b/packages/OS400/make-lib.sh
@@ -7,12 +7,20 @@
 . "${SCRIPTDIR}/initscript.sh"
 cd "${TOPDIR}/lib"
 
+#       Need to have IFS access to the mih/cipher header file.
+
+if action_needed cipher.mih '/QSYS.LIB/QSYSINC.LIB/MIH.FILE/CIPHER.MBR'
+then    rm -f cipher.mih
+        ln -s '/QSYS.LIB/QSYSINC.LIB/MIH.FILE/CIPHER.MBR' cipher.mih
+fi
+
 
 #      Create and compile the identification source file.
 
 echo '#pragma comment(user, "libcurl version '"${LIBCURL_VERSION}"'")' > os400.c
-echo '#pragma comment(date)' >> os400.c
-echo '#pragma comment(copyright, "Copyright (C) 1998-2010 Daniel Stenberg et al. OS/400 version by P. Monnerat")' >> os400.c
+echo '#pragma comment(user, __DATE__)' >> os400.c
+echo '#pragma comment(user, __TIME__)' >> os400.c
+echo '#pragma comment(copyright, "Copyright (C) 1998-2016 Daniel Stenberg et al. OS/400 version by P. Monnerat")' >> os400.c
 make_module     OS400           os400.c
 LINK=                           # No need to rebuild service program yet.
 MODULES=
@@ -20,21 +28,18 @@
 
 #       Get source list.
 
-CSOURCES()
-
-{
-        shift                   # Drop the equal sign.
-        CSOURCES="$*"           # Get the file names.
-}
-
-HHEADERS()
-
-{
-        shift                   # Drop the equal sign.
-        HHEADERS="$*"           # Get the file names.
-}
-
-. Makefile.inc
+sed -e ':begin'                                                         \
+    -e '/\\$/{'                                                         \
+    -e 's/\\$/ /'                                                       \
+    -e 'N'                                                              \
+    -e 'bbegin'                                                         \
+    -e '}'                                                              \
+    -e 's/\n//g'                                                        \
+    -e 's/[[:space:]]*$//'                                              \
+    -e 's/^\([A-Za-z][A-Za-z0-9_]*\)[[:space:]]*=[[:space:]]*\(.*\)/\1="\2"/' \
+    -e 's/\$(\([A-Za-z][A-Za-z0-9_]*\))/${\1}/g'                        \
+        < Makefile.inc > tmpscript.sh
+. ./tmpscript.sh
 
 
 #       Compile the sources into modules.
@@ -45,9 +50,7 @@
 make_module     CCSIDCURL       "${SCRIPTDIR}/ccsidcurl.c"
 
 for SRC in ${CSOURCES}
-do      MODULE=`basename "${SRC}" .c |
-                tr '[a-z]' '[A-Z]'   |
-                sed -e 's/^\(..........\).*/\1/'`
+do      MODULE=`db2_name "${SRC}"`
         make_module "${MODULE}" "${SRC}"
 done
 
@@ -84,12 +87,12 @@
 
 #       Gather the list of symbols to export.
 
-EXPORTS=`grep '^CURL_EXTERN[ 	]'                                      \
+EXPORTS=`grep '^CURL_EXTERN[[:space:]]'                                 \
               "${TOPDIR}"/include/curl/*.h                              \
               "${SCRIPTDIR}/ccsidcurl.h"                                |
-         sed -e 's/^.*CURL_EXTERN[ 	]\(.*\)(.*$/\1/'                \
-             -e 's/[ 	]*$//'                                          \
-             -e 's/^.*[ 	][ 	]*//'                           \
+         sed -e 's/^.*CURL_EXTERN[[:space:]]\(.*\)(.*$/\1/'             \
+             -e 's/[[:space:]]*$//'                                     \
+             -e 's/^.*[[:space:]][[:space:]]*//'                        \
              -e 's/^\*//'                                               \
              -e 's/(\(.*\))/\1/'`
 
@@ -122,7 +125,16 @@
 then    CMD="CRTSRVPGM SRVPGM(${TARGETLIB}/${SRVPGM})"
         CMD="${CMD} SRCFILE(${TARGETLIB}/TOOLS) SRCMBR(BNDSRC)"
         CMD="${CMD} MODULE(${TARGETLIB}/OS400)"
-        CMD="${CMD} BNDDIR(${TARGETLIB}/${STATBNDDIR})"
+        CMD="${CMD} BNDDIR(${TARGETLIB}/${STATBNDDIR}"
+        if [ "${WITH_ZLIB}" != 0 ]
+        then    CMD="${CMD} ${ZLIB_LIB}/${ZLIB_BNDDIR}"
+                liblist -a "${ZLIB_LIB}"
+        fi
+        if [ "${WITH_LIBSSH2}" != 0 ]
+        then    CMD="${CMD} ${LIBSSH2_LIB}/${LIBSSH2_BNDDIR}"
+                liblist -a "${LIBSSH2_LIB}"
+        fi
+        CMD="${CMD})"
         CMD="${CMD} BNDSRVPGM(QADRTTS QGLDCLNT QGLDBRDR)"
         CMD="${CMD} TEXT('curl API library')"
         CMD="${CMD} TGTRLS(${TGTRLS})"
@@ -161,7 +173,7 @@
         #               formdata.c. However, there are some unsatisfied
         #               external references leading in the following
         #               modules to be (recursively) needed.
-        MODULES="${MODULES} EASY STRDUP SSLGEN QSSL HOSTIP HOSTIP4 HOSTIP6"
+        MODULES="${MODULES} EASY STRDUP SSLGEN GSKIT HOSTIP HOSTIP4 HOSTIP6"
         MODULES="${MODULES} URL HASH TRANSFER GETINFO COOKIE SENDF SELECT"
         MODULES="${MODULES} INET_NTOP SHARE HOSTTHRE MULTI LLIST FTP HTTP"
         MODULES="${MODULES} HTTP_DIGES HTTP_CHUNK HTTP_NEGOT TIMEVAL HOSTSYN"
diff --git a/packages/OS400/make-tests.sh b/packages/OS400/make-tests.sh
index cee3ed9..9240b7f 100644
--- a/packages/OS400/make-tests.sh
+++ b/packages/OS400/make-tests.sh
@@ -28,11 +28,11 @@
         -e 's/\\\\\\n/ /'                                               \
         -e 'b begin'                                                    \
         -e '}'                                                          \
-        -e '/^[A-Za-z_][A-Za-z0-9_]*[ 	]*[=]/b keep'                   \
+        -e '/^[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[=]/b keep'             \
         -e 'd'                                                          \
         -e ': keep'                                                     \
-        -e 's/[ 	]*=[ 	]*/=/'                                  \
-        -e 's/=\\(.*[^ 	]\\)[ 	]*$/=\\"\\1\\"/'                        \
+        -e 's/[[:space:]]*=[[:space:]]*/=/'                             \
+        -e 's/=\\(.*[^[:space:]]\\)[[:space:]]*$/=\\"\\1\\"/'           \
         -e 's/\\$(\\([^)]*\\))/${\\1}/g'                                \
         < Makefile.inc`"
 
diff --git a/packages/OS400/makefile.sh b/packages/OS400/makefile.sh
index 1e67290..141d877 100644
--- a/packages/OS400/makefile.sh
+++ b/packages/OS400/makefile.sh
@@ -21,7 +21,7 @@
 #       Create the DOCS source file if it does not exist.
 
 if action_needed "${LIBIFSNAME}/DOCS.FILE"
-then    CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(112)"
+then    CMD="CRTSRCPF FILE(${TARGETLIB}/DOCS) RCDLEN(240)"
         CMD="${CMD} CCSID(${TGTCCSID}) TEXT('Documentation texts')"
         system "${CMD}"
 fi
@@ -47,6 +47,7 @@
 
 #       Build in each directory.
 
-for SUBDIR in include lib src tests
+# for SUBDIR in include lib src tests
+for SUBDIR in include lib src
 do      "${SCRIPTDIR}/make-${SUBDIR}.sh"
 done
diff --git a/packages/OS400/os400sys.c b/packages/OS400/os400sys.c
index 071fa48..89837bd 100644
--- a/packages/OS400/os400sys.c
+++ b/packages/OS400/os400sys.c
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, 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.
+ * are also available at https://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
@@ -24,7 +24,7 @@
 /* OS/400 additional support. */
 
 #include "curlbuild.h"
-#include "config-os400.h"       /* Not setup.h: we only need some defines. */
+#include "config-os400.h"  /* Not curl_setup.h: we only need some defines. */
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -38,8 +38,13 @@
 #include <qadrt.h>
 #include <errno.h>
 
-#ifdef USE_QSOSSL
-#include <qsossl.h>
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#endif
+
+#ifdef USE_GSKIT
+#include <gskssl.h>
+#include <qsoasync.h>
 #endif
 
 #ifdef HAVE_GSSAPI
@@ -89,16 +94,12 @@
 thdbufdestroy(void * private)
 
 {
-  localkey_t i;
-  buffer_t * p;
+  if(private) {
+    buffer_t * p = (buffer_t *) private;
+    localkey_t i;
 
-  if (private) {
-    p = (buffer_t *) private;
-
-    for (i = (localkey_t) 0; i < LK_LAST; i++) {
-      if (p->buf)
-        free(p->buf);
-
+    for(i = (localkey_t) 0; i < LK_LAST; i++) {
+      free(p->buf);
       p++;
       }
 
@@ -111,13 +112,13 @@
 terminate(void)
 
 {
-  if (Curl_thread_buffer == buffer_threaded) {
+  if(Curl_thread_buffer == buffer_threaded) {
     locbufs = pthread_getspecific(thdkey);
     pthread_setspecific(thdkey, (void *) NULL);
     pthread_key_delete(thdkey);
     }
 
-  if (Curl_thread_buffer != buffer_undef) {
+  if(Curl_thread_buffer != buffer_undef) {
     thdbufdestroy((void *) locbufs);
     locbufs = (buffer_t *) NULL;
     }
@@ -135,31 +136,31 @@
   /* If `size' >= 0, make sure buffer at `buf' is at least `size'-byte long.
      Return the buffer address. */
 
-  if (size < 0)
+  if(size < 0)
     return buf->buf;
 
-  if (!buf->buf) {
-    if ((buf->buf = malloc(size)))
+  if(!buf->buf) {
+    if((buf->buf = malloc(size)))
       buf->size = size;
 
     return buf->buf;
     }
 
-  if ((unsigned long) size <= buf->size) {
+  if((unsigned long) size <= buf->size) {
     /* Shorten the buffer only if it frees a significant byte count. This
        avoids some realloc() overhead. */
 
-    if (buf->size - size < MIN_BYTE_GAIN)
+    if(buf->size - size < MIN_BYTE_GAIN)
       return buf->buf;
     }
 
   /* Resize the buffer. */
 
-  if ((cp = realloc(buf->buf, size))) {
+  if((cp = realloc(buf->buf, size))) {
     buf->buf = cp;
     buf->size = size;
     }
-  else if (size <= buf->size)
+  else if(size <= buf->size)
     cp = buf->buf;
 
   return cp;
@@ -186,16 +187,16 @@
 
   bufs = (buffer_t *) pthread_getspecific(thdkey);
 
-  if (!bufs) {
-    if (size < 0)
+  if(!bufs) {
+    if(size < 0)
       return (char *) NULL;             /* No buffer yet. */
 
     /* Allocate buffer descriptors for the current thread. */
 
-    if (!(bufs = calloc((size_t) LK_LAST, sizeof *bufs)))
+    if(!(bufs = calloc((size_t) LK_LAST, sizeof *bufs)))
       return (char *) NULL;
 
-    if (pthread_setspecific(thdkey, (void *) bufs)) {
+    if(pthread_setspecific(thdkey, (void *) bufs)) {
       free(bufs);
       return (char *) NULL;
       }
@@ -217,11 +218,10 @@
 
   /* Determine if we can use pthread-specific data. */
 
-  if (Curl_thread_buffer == buffer_undef) {     /* If unchanged during lock. */
-    if (!pthread_key_create(&thdkey, thdbufdestroy))
+  if(Curl_thread_buffer == buffer_undef) {      /* If unchanged during lock. */
+    if(!pthread_key_create(&thdkey, thdbufdestroy))
       Curl_thread_buffer = buffer_threaded;
-    else if (!(locbufs = calloc((size_t) LK_LAST,
-                                             sizeof *locbufs))) {
+    else if(!(locbufs = calloc((size_t) LK_LAST, sizeof *locbufs))) {
       pthread_mutex_unlock(&mutex);
       return (char *) NULL;
       }
@@ -236,6 +236,28 @@
 }
 
 
+static char *
+set_thread_string(localkey_t key, const char * s)
+
+{
+  int i;
+  char * cp;
+
+  if(!s)
+    return (char *) NULL;
+
+  i = strlen(s) + 1;
+  cp = Curl_thread_buffer(key, MAX_CONV_EXPANSION * i + 1);
+
+  if(cp) {
+    i = QadrtConvertE2A(cp, s, MAX_CONV_EXPANSION * i, i);
+    cp[i] = '\0';
+  }
+
+  return cp;
+}
+
+
 int
 Curl_getnameinfo_a(const struct sockaddr * sa, curl_socklen_t salen,
               char * nodename, curl_socklen_t nodenamelen,
@@ -251,41 +273,35 @@
   enodename = (char *) NULL;
   eservname = (char *) NULL;
 
-  if (nodename && nodenamelen)
-    if (!(enodename = malloc(nodenamelen)))
+  if(nodename && nodenamelen)
+    if(!(enodename = malloc(nodenamelen)))
       return EAI_MEMORY;
 
-  if (servname && servnamelen)
-    if (!(eservname = malloc(servnamelen))) {
-      if (enodename)
-        free(enodename);
-
+  if(servname && servnamelen)
+    if(!(eservname = malloc(servnamelen))) {
+      free(enodename);
       return EAI_MEMORY;
       }
 
   status = getnameinfo(sa, salen, enodename, nodenamelen,
                        eservname, servnamelen, flags);
 
-  if (!status) {
-    if (enodename) {
+  if(!status) {
+    if(enodename) {
       i = QadrtConvertE2A(nodename, enodename,
         nodenamelen - 1, strlen(enodename));
       nodename[i] = '\0';
       }
 
-    if (eservname) {
+    if(eservname) {
       i = QadrtConvertE2A(servname, eservname,
         servnamelen - 1, strlen(eservname));
       servname[i] = '\0';
       }
     }
 
-  if (enodename)
-    free(enodename);
-
-  if (eservname)
-    free(eservname);
-
+  free(enodename);
+  free(eservname);
   return status;
 }
 
@@ -304,23 +320,21 @@
   enodename = (char *) NULL;
   eservname = (char *) NULL;
 
-  if (nodename) {
+  if(nodename) {
     i = strlen(nodename);
 
-    if (!(enodename = malloc(i + 1)))
+    if(!(enodename = malloc(i + 1)))
       return EAI_MEMORY;
 
     i = QadrtConvertA2E(enodename, nodename, i, i);
     enodename[i] = '\0';
     }
 
-  if (servname) {
+  if(servname) {
     i = strlen(servname);
 
-    if (!(eservname = malloc(i + 1))) {
-      if (enodename)
-        free(enodename);
-
+    if(!(eservname = malloc(i + 1))) {
+      free(enodename);
       return EAI_MEMORY;
       }
 
@@ -329,126 +343,400 @@
     }
 
   status = getaddrinfo(enodename, eservname, hints, res);
-
-  if (enodename)
-    free(enodename);
-
-  if (eservname)
-    free(eservname);
-
+  free(enodename);
+  free(eservname);
   return status;
 }
 
 
-#ifdef USE_QSOSSL
+#ifdef USE_GSKIT
 
-/* ASCII wrappers for the SSL procedures. */
+/* ASCII wrappers for the GSKit procedures. */
+
+/*
+ * EBCDIC --> ASCII string mapping table.
+ * Some strings returned by GSKit are dynamically allocated and automatically
+ * released when closing the handle.
+ * To provide the same functionality, we use a "private" handle that
+ * holds the GSKit handle and a list of string mappings. This will allow
+ * avoid conversion of already converted strings and releasing them upon
+ * close time.
+ */
+
+struct gskstrlist {
+  struct gskstrlist * next;
+  const char * ebcdicstr;
+  const char * asciistr;
+};
+
+struct Curl_gsk_descriptor {
+  gsk_handle h;
+  struct gskstrlist * strlist;
+};
+
 
 int
-Curl_SSL_Init_Application_a(SSLInitApp * init_app)
+Curl_gsk_environment_open(gsk_handle * my_env_handle)
 
 {
+  struct Curl_gsk_descriptor * p;
+  gsk_handle h;
   int rc;
-  unsigned int i;
-  SSLInitApp ia;
 
-  if (!init_app || !init_app->applicationID || !init_app->applicationIDLen)
-    return SSL_Init_Application(init_app);
-
-  memcpy((char *) &ia, (char *) init_app, sizeof ia);
-  i = ia.applicationIDLen;
-
-  if (!(ia.applicationID = malloc(i + 1))) {
-    errno = ENOMEM;
-    return SSL_ERROR_IO;
-    }
-
-  QadrtConvertA2E(ia.applicationID, init_app->applicationID, i, i);
-  ia.applicationID[i] = '\0';
-  rc = SSL_Init_Application(&ia);
-  free(ia.applicationID);
-  init_app->localCertificateLen = ia.localCertificateLen;
-  init_app->sessionType = ia.sessionType;
+  if(!my_env_handle)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  if(!(p = (struct Curl_gsk_descriptor *) malloc(sizeof *p)))
+    return GSK_INSUFFICIENT_STORAGE;
+  p->strlist = (struct gskstrlist *) NULL;
+  if((rc = gsk_environment_open(&p->h)) != GSK_OK)
+    free(p);
+  else
+    *my_env_handle = (gsk_handle) p;
   return rc;
 }
 
 
 int
-Curl_SSL_Init_a(SSLInit * init)
+Curl_gsk_secure_soc_open(gsk_handle my_env_handle,
+                         gsk_handle * my_session_handle)
 
 {
+  struct Curl_gsk_descriptor * p;
+  gsk_handle h;
   int rc;
-  unsigned int i;
-  SSLInit ia;
 
-  if (!init || (!init->keyringFileName && !init->keyringPassword))
-    return SSL_Init(init);
-
-  memcpy((char *) &ia, (char *) init, sizeof ia);
-
-  if (ia.keyringFileName) {
-    i = strlen(ia.keyringFileName);
-
-    if (!(ia.keyringFileName = malloc(i + 1))) {
-      errno = ENOMEM;
-      return SSL_ERROR_IO;
-      }
-
-    QadrtConvertA2E(ia.keyringFileName, init->keyringFileName, i, i);
-    ia.keyringFileName[i] = '\0';
-    }
-
-  if (ia.keyringPassword) {
-    i = strlen(ia.keyringPassword);
-
-    if (!(ia.keyringPassword = malloc(i + 1))) {
-      if (ia.keyringFileName)
-        free(ia.keyringFileName);
-
-      errno = ENOMEM;
-      return SSL_ERROR_IO;
-      }
-
-    QadrtConvertA2E(ia.keyringPassword, init->keyringPassword, i, i);
-    ia.keyringPassword[i] = '\0';
-    }
-
-  rc = SSL_Init(&ia);
-
-  if (ia.keyringFileName)
-    free(ia.keyringFileName);
-
-  if (ia.keyringPassword)
-    free(ia.keyringPassword);
-
+  if(!my_env_handle)
+    return GSK_INVALID_HANDLE;
+  if(!my_session_handle)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  h = ((struct Curl_gsk_descriptor *) my_env_handle)->h;
+  if(!(p = (struct Curl_gsk_descriptor *) malloc(sizeof *p)))
+    return GSK_INSUFFICIENT_STORAGE;
+  p->strlist = (struct gskstrlist *) NULL;
+  if((rc = gsk_secure_soc_open(h, &p->h)) != GSK_OK)
+    free(p);
+  else
+    *my_session_handle = (gsk_handle) p;
   return rc;
 }
 
 
-char *
-Curl_SSL_Strerror_a(int sslreturnvalue, SSLErrorMsg * serrmsgp)
+static void
+gsk_free_handle(struct Curl_gsk_descriptor * p)
 
 {
-  int i;
-  char * cp;
-  char * cp2;
+  struct gskstrlist * q;
 
-  cp = SSL_Strerror(sslreturnvalue, serrmsgp);
-
-  if (!cp)
-    return cp;
-
-  i = strlen(cp);
-
-  if (!(cp2 = Curl_thread_buffer(LK_SSL_ERROR, MAX_CONV_EXPANSION * i + 1)))
-    return cp2;
-
-  i = QadrtConvertE2A(cp2, cp, MAX_CONV_EXPANSION * i, i);
-  cp2[i] = '\0';
-  return cp2;
+  while((q = p->strlist)) {
+    p->strlist = q;
+    free((void *) q->asciistr);
+    free(q);
+  }
+  free(p);
 }
 
-#endif /* USE_QSOSSL */
+
+int
+Curl_gsk_environment_close(gsk_handle * my_env_handle)
+
+{
+  struct Curl_gsk_descriptor * p;
+  int rc;
+
+  if(!my_env_handle)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  if(!*my_env_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) *my_env_handle;
+  if((rc = gsk_environment_close(&p->h)) == GSK_OK) {
+    gsk_free_handle(p);
+    *my_env_handle = (gsk_handle) NULL;
+  }
+  return rc;
+}
+
+
+int
+Curl_gsk_secure_soc_close(gsk_handle * my_session_handle)
+
+{
+  struct Curl_gsk_descriptor * p;
+  int rc;
+
+  if(!my_session_handle)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  if(!*my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) *my_session_handle;
+  if((rc = gsk_secure_soc_close(&p->h)) == GSK_OK) {
+    gsk_free_handle(p);
+    *my_session_handle = (gsk_handle) NULL;
+  }
+  return rc;
+}
+
+
+int
+Curl_gsk_environment_init(gsk_handle my_env_handle)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_env_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_env_handle;
+  return gsk_environment_init(p->h);
+}
+
+
+int
+Curl_gsk_secure_soc_init(gsk_handle my_session_handle)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_session_handle;
+  return gsk_secure_soc_init(p->h);
+}
+
+
+int
+Curl_gsk_attribute_set_buffer_a(gsk_handle my_gsk_handle, GSK_BUF_ID bufID,
+                                const char * buffer, int bufSize)
+
+{
+  struct Curl_gsk_descriptor * p;
+  char * ebcdicbuf;
+  int rc;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  if(!buffer)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  if(bufSize < 0)
+    return GSK_ATTRIBUTE_INVALID_LENGTH;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  if(!bufSize)
+    bufSize = strlen(buffer);
+  if(!(ebcdicbuf = malloc(bufSize + 1)))
+      return GSK_INSUFFICIENT_STORAGE;
+  QadrtConvertA2E(ebcdicbuf, buffer, bufSize, bufSize);
+  ebcdicbuf[bufSize] = '\0';
+  rc = gsk_attribute_set_buffer(p->h, bufID, ebcdicbuf, bufSize);
+  free(ebcdicbuf);
+  return rc;
+}
+
+
+int
+Curl_gsk_attribute_set_enum(gsk_handle my_gsk_handle, GSK_ENUM_ID enumID,
+                            GSK_ENUM_VALUE enumValue)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  return gsk_attribute_set_enum(p->h, enumID, enumValue);
+}
+
+
+int
+Curl_gsk_attribute_set_numeric_value(gsk_handle my_gsk_handle,
+                                     GSK_NUM_ID numID, int numValue)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  return gsk_attribute_set_numeric_value(p->h, numID, numValue);
+}
+
+
+int
+Curl_gsk_attribute_set_callback(gsk_handle my_gsk_handle,
+                                GSK_CALLBACK_ID callBackID,
+                                void * callBackAreaPtr)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  return gsk_attribute_set_callback(p->h, callBackID, callBackAreaPtr);
+}
+
+
+static int
+cachestring(struct Curl_gsk_descriptor * p,
+            const char * ebcdicbuf, int bufsize, const char * * buffer)
+
+{
+  int rc;
+  char * asciibuf;
+  struct gskstrlist * sp;
+
+  for(sp = p->strlist; sp; sp = sp->next)
+    if(sp->ebcdicstr == ebcdicbuf)
+      break;
+  if(!sp) {
+    if(!(sp = (struct gskstrlist *) malloc(sizeof *sp)))
+      return GSK_INSUFFICIENT_STORAGE;
+    if(!(asciibuf = malloc(bufsize + 1))) {
+      free(sp);
+      return GSK_INSUFFICIENT_STORAGE;
+    }
+    QadrtConvertE2A(asciibuf, ebcdicbuf, bufsize, bufsize);
+    asciibuf[bufsize] = '\0';
+    sp->ebcdicstr = ebcdicbuf;
+    sp->asciistr = asciibuf;
+    sp->next = p->strlist;
+    p->strlist = sp;
+  }
+  *buffer = sp->asciistr;
+  return GSK_OK;
+}
+
+
+int
+Curl_gsk_attribute_get_buffer_a(gsk_handle my_gsk_handle, GSK_BUF_ID bufID,
+                                const char * * buffer, int * bufSize)
+
+{
+  struct Curl_gsk_descriptor * p;
+  int rc;
+  const char * mybuf;
+  int mylen;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  if(!buffer || !bufSize)
+    return GSK_OS400_ERROR_INVALID_POINTER;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  if((rc = gsk_attribute_get_buffer(p->h, bufID, &mybuf, &mylen)) != GSK_OK)
+    return rc;
+  if((rc = cachestring(p, mybuf, mylen, buffer)) == GSK_OK)
+    *bufSize = mylen;
+  return rc;
+}
+
+
+int
+Curl_gsk_attribute_get_enum(gsk_handle my_gsk_handle, GSK_ENUM_ID enumID,
+                            GSK_ENUM_VALUE * enumValue)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  return gsk_attribute_get_enum(p->h, enumID, enumValue);
+}
+
+
+int
+Curl_gsk_attribute_get_numeric_value(gsk_handle my_gsk_handle,
+                                     GSK_NUM_ID numID, int * numValue)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  return gsk_attribute_get_numeric_value(p->h, numID, numValue);
+}
+
+
+int
+Curl_gsk_attribute_get_cert_info(gsk_handle my_gsk_handle,
+                                 GSK_CERT_ID certID,
+                                 const gsk_cert_data_elem * * certDataElem,
+                                 int * certDataElementCount)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_gsk_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_gsk_handle;
+  /* No need to convert code: text results are already in ASCII. */
+  return gsk_attribute_get_cert_info(p->h, certID,
+                                     certDataElem, certDataElementCount);
+}
+
+
+int
+Curl_gsk_secure_soc_misc(gsk_handle my_session_handle, GSK_MISC_ID miscID)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_session_handle;
+  return gsk_secure_soc_misc(p->h, miscID);
+}
+
+
+int
+Curl_gsk_secure_soc_read(gsk_handle my_session_handle, char * readBuffer,
+                         int readBufSize, int * amtRead)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_session_handle;
+  return gsk_secure_soc_read(p->h, readBuffer, readBufSize, amtRead);
+}
+
+
+int
+Curl_gsk_secure_soc_write(gsk_handle my_session_handle, char * writeBuffer,
+                          int writeBufSize, int * amtWritten)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_session_handle;
+  return gsk_secure_soc_write(p->h, writeBuffer, writeBufSize, amtWritten);
+}
+
+
+const char *
+Curl_gsk_strerror_a(int gsk_return_value)
+
+{
+  return set_thread_string(LK_GSK_ERROR, gsk_strerror(gsk_return_value));
+}
+
+int
+Curl_gsk_secure_soc_startInit(gsk_handle my_session_handle,
+                              int IOCompletionPort,
+                              Qso_OverlappedIO_t * communicationsArea)
+
+{
+  struct Curl_gsk_descriptor * p;
+
+  if(!my_session_handle)
+    return GSK_INVALID_HANDLE;
+  p = (struct Curl_gsk_descriptor *) my_session_handle;
+  return gsk_secure_soc_startInit(p->h, IOCompletionPort, communicationsArea);
+}
+
+#endif /* USE_GSKIT */
+
 
 
 #ifdef HAVE_GSSAPI
@@ -467,11 +755,11 @@
 
   i = buf->length;
 
-  if (i) {
-    if (!(t = malloc(i))) {
+  if(i) {
+    if(!(t = malloc(i))) {
       gss_release_buffer(minor_status, buf);
 
-      if (minor_status)
+      if(minor_status)
         *minor_status = ENOMEM;
 
       return -1;
@@ -495,14 +783,14 @@
   unsigned int i;
   gss_buffer_desc in;
 
-  if (!in_name || !in_name->value || !in_name->length)
+  if(!in_name || !in_name->value || !in_name->length)
     return gss_import_name(minor_status, in_name, in_name_type, out_name);
 
   memcpy((char *) &in, (char *) in_name, sizeof in);
   i = in.length;
 
-  if (!(in.value = malloc(i + 1))) {
-    if (minor_status)
+  if(!(in.value = malloc(i + 1))) {
+    if(minor_status)
       *minor_status = ENOMEM;
 
     return GSS_S_FAILURE;
@@ -527,15 +815,15 @@
   rc = gss_display_status(minor_status, status_value, status_type,
                               mech_type, message_context, status_string);
 
-  if (rc != GSS_S_COMPLETE || !status_string ||
-      !status_string->length || !status_string->value)
+  if(rc != GSS_S_COMPLETE || !status_string ||
+     !status_string->length || !status_string->value)
     return rc;
 
   /* No way to allocate a buffer here, because it will be released by
      gss_release_buffer(). The solution is to overwrite the EBCDIC buffer
      with ASCII to return it. */
 
-  if (Curl_gss_convert_in_place(minor_status, status_string))
+  if(Curl_gss_convert_in_place(minor_status, status_string))
     return GSS_S_FAILURE;
 
   return rc;
@@ -543,7 +831,8 @@
 
 
 OM_uint32
-Curl_gss_init_sec_context_a(OM_uint32 * minor_status, gss_cred_id_t cred_handle,
+Curl_gss_init_sec_context_a(OM_uint32 * minor_status,
+                            gss_cred_id_t cred_handle,
                             gss_ctx_id_t * context_handle,
                             gss_name_t target_name, gss_OID mech_type,
                             gss_flags_t req_flags, OM_uint32 time_req,
@@ -561,12 +850,12 @@
 
   in.value = NULL;
 
-  if ((inp = input_token))
-    if (inp->length && inp->value) {
+  if((inp = input_token))
+    if(inp->length && inp->value) {
       i = inp->length;
 
-      if (!(in.value = malloc(i + 1))) {
-        if (minor_status)
+      if(!(in.value = malloc(i + 1))) {
+        if(minor_status)
           *minor_status = ENOMEM;
 
         return GSS_S_FAILURE;
@@ -582,11 +871,9 @@
                              target_name, mech_type, req_flags, time_req,
                              input_chan_bindings, inp, actual_mech_type,
                              output_token, ret_flags, time_rec);
+  free(in.value);
 
-  if (in.value)
-    free(in.value);
-
-  if (rc != GSS_S_COMPLETE || !output_token ||
+  if(rc != GSS_S_COMPLETE || !output_token ||
       !output_token->length || !output_token->value)
     return rc;
 
@@ -594,7 +881,7 @@
      gss_release_buffer(). The solution is to overwrite the EBCDIC buffer
      with ASCII to return it. */
 
-  if (Curl_gss_convert_in_place(minor_status, output_token))
+  if(Curl_gss_convert_in_place(minor_status, output_token))
     return GSS_S_FAILURE;
 
   return rc;
@@ -611,7 +898,7 @@
 
   rc = gss_delete_sec_context(minor_status, context_handle, output_token);
 
-  if (rc != GSS_S_COMPLETE || !output_token ||
+  if(rc != GSS_S_COMPLETE || !output_token ||
       !output_token->length || !output_token->value)
     return rc;
 
@@ -619,7 +906,7 @@
      gss_release_buffer(). The solution is to overwrite the EBCDIC buffer
      with ASCII to return it. */
 
-  if (Curl_gss_convert_in_place(minor_status, output_token))
+  if(Curl_gss_convert_in_place(minor_status, output_token))
     return GSS_S_FAILURE;
 
   return rc;
@@ -640,12 +927,12 @@
   char * ehost;
   void * result;
 
-  if (!host)
+  if(!host)
     return (void *) ldap_init(host, port);
 
   i = strlen(host);
 
-  if (!(ehost = malloc(i + 1)))
+  if(!(ehost = malloc(i + 1)))
     return (void *) NULL;
 
   QadrtConvertA2E(ehost, host, i, i);
@@ -667,23 +954,21 @@
   edn = (char *) NULL;
   epasswd = (char *) NULL;
 
-  if (dn) {
+  if(dn) {
     i = strlen(dn);
 
-    if (!(edn = malloc(i + 1)))
+    if(!(edn = malloc(i + 1)))
       return LDAP_NO_MEMORY;
 
     QadrtConvertA2E(edn, dn, i, i);
     edn[i] = '\0';
     }
 
-  if (passwd) {
+  if(passwd) {
     i = strlen(passwd);
 
-    if (!(epasswd = malloc(i + 1))) {
-      if (edn)
-        free(edn);
-
+    if(!(epasswd = malloc(i + 1))) {
+      free(edn);
       return LDAP_NO_MEMORY;
       }
 
@@ -692,13 +977,8 @@
     }
 
   i = ldap_simple_bind_s(ld, edn, epasswd);
-
-  if (epasswd)
-    free(epasswd);
-
-  if (edn)
-    free(edn);
-
+  free(epasswd);
+  free(edn);
   return i;
 }
 
@@ -720,10 +1000,10 @@
   eattrs = (char * *) NULL;
   status = LDAP_SUCCESS;
 
-  if (base) {
+  if(base) {
     i = strlen(base);
 
-    if (!(ebase = malloc(i + 1)))
+    if(!(ebase = malloc(i + 1)))
       status = LDAP_NO_MEMORY;
     else {
       QadrtConvertA2E(ebase, base, i, i);
@@ -731,10 +1011,10 @@
       }
     }
 
-  if (filter && status == LDAP_SUCCESS) {
+  if(filter && status == LDAP_SUCCESS) {
     i = strlen(filter);
 
-    if (!(efilter = malloc(i + 1)))
+    if(!(efilter = malloc(i + 1)))
       status = LDAP_NO_MEMORY;
     else {
       QadrtConvertA2E(efilter, filter, i, i);
@@ -742,17 +1022,17 @@
       }
     }
 
-  if (attrs && status == LDAP_SUCCESS) {
-    for (i = 0; attrs[i++];)
+  if(attrs && status == LDAP_SUCCESS) {
+    for(i = 0; attrs[i++];)
       ;
 
-    if (!(eattrs = calloc(i, sizeof *eattrs)))
+    if(!(eattrs = calloc(i, sizeof *eattrs)))
       status = LDAP_NO_MEMORY;
     else {
-      for (j = 0; attrs[j]; j++) {
+      for(j = 0; attrs[j]; j++) {
         i = strlen(attrs[j]);
 
-        if (!(eattrs[j] = malloc(i + 1))) {
+        if(!(eattrs[j] = malloc(i + 1))) {
           status = LDAP_NO_MEMORY;
           break;
           }
@@ -763,24 +1043,20 @@
       }
     }
 
-  if (status == LDAP_SUCCESS)
+  if(status == LDAP_SUCCESS)
     status = ldap_search_s(ld, ebase? ebase: "", scope,
                            efilter? efilter: "(objectclass=*)",
                            eattrs, attrsonly, res);
 
-  if (eattrs) {
-    for (j = 0; eattrs[j]; j++)
+  if(eattrs) {
+    for(j = 0; eattrs[j]; j++)
       free(eattrs[j]);
 
     free(eattrs);
     }
 
-  if (efilter)
-    free(efilter);
-
-  if (ebase)
-    free(ebase);
-
+  free(efilter);
+  free(ebase);
   return status;
 }
 
@@ -789,16 +1065,15 @@
 Curl_ldap_get_values_len_a(void * ld, LDAPMessage * entry, const char * attr)
 
 {
-  int i;
   char * cp;
   struct berval * * result;
 
   cp = (char *) NULL;
 
-  if (attr) {
-    i = strlen(attr);
+  if(attr) {
+    int i = strlen(attr);
 
-    if (!(cp = malloc(i + 1))) {
+    if(!(cp = malloc(i + 1))) {
       ldap_set_lderrno(ld, LDAP_NO_MEMORY, NULL,
                        ldap_err2string(LDAP_NO_MEMORY));
       return (struct berval * *) NULL;
@@ -809,12 +1084,10 @@
     }
 
   result = ldap_get_values_len(ld, entry, cp);
+  free(cp);
 
-  if (cp)
-    free(cp);
-
-  /* Result data are binary in nature, so they haven't been converted to EBCDIC.
-     Therefore do not convert. */
+  /* Result data are binary in nature, so they haven't been
+     converted to EBCDIC. Therefore do not convert. */
 
   return result;
 }
@@ -824,23 +1097,7 @@
 Curl_ldap_err2string_a(int error)
 
 {
-  int i;
-  char * cp;
-  char * cp2;
-
-  cp = ldap_err2string(error);
-
-  if (!cp)
-    return cp;
-
-  i = strlen(cp);
-
-  if (!(cp2 = Curl_thread_buffer(LK_LDAP_ERROR, MAX_CONV_EXPANSION * i + 1)))
-    return cp2;
-
-  i = QadrtConvertE2A(cp2, cp, MAX_CONV_EXPANSION * i, i);
-  cp2[i] = '\0';
-  return cp2;
+  return set_thread_string(LK_LDAP_ERROR, ldap_err2string(error));
 }
 
 
@@ -854,15 +1111,16 @@
 
   cp = ldap_get_dn(ld, entry);
 
-  if (!cp)
+  if(!cp)
     return cp;
 
   i = strlen(cp);
 
-  if (!(cp2 = malloc(i + 1)))
+  if(!(cp2 = malloc(i + 1)))
     return cp2;
 
   QadrtConvertE2A(cp2, cp, i, i);
+  cp2[i] = '\0';
 
   /* No way to allocate a buffer here, because it will be released by
      ldap_memfree() and ldap_memalloc() does not exist. The solution is to
@@ -885,15 +1143,16 @@
 
   cp = ldap_first_attribute(ld, entry, berptr);
 
-  if (!cp)
+  if(!cp)
     return cp;
 
   i = strlen(cp);
 
-  if (!(cp2 = malloc(i + 1)))
+  if(!(cp2 = malloc(i + 1)))
     return cp2;
 
   QadrtConvertE2A(cp2, cp, i, i);
+  cp2[i] = '\0';
 
   /* No way to allocate a buffer here, because it will be released by
      ldap_memfree() and ldap_memalloc() does not exist. The solution is to
@@ -916,15 +1175,16 @@
 
   cp = ldap_next_attribute(ld, entry, berptr);
 
-  if (!cp)
+  if(!cp)
     return cp;
 
   i = strlen(cp);
 
-  if (!(cp2 = malloc(i + 1)))
+  if(!(cp2 = malloc(i + 1)))
     return cp2;
 
   QadrtConvertE2A(cp2, cp, i, i);
+  cp2[i] = '\0';
 
   /* No way to allocate a buffer here, because it will be released by
      ldap_memfree() and ldap_memalloc() does not exist. The solution is to
@@ -950,8 +1210,8 @@
 
   /* Convert a socket address into job CCSID, if needed. */
 
-  if (!srcaddr || srclen < offsetof(struct sockaddr, sa_family) +
-      sizeof srcaddr->sa_family || srclen > sizeof *dstaddr) {
+  if(!srcaddr || srclen < offsetof(struct sockaddr, sa_family) +
+     sizeof srcaddr->sa_family || srclen > sizeof *dstaddr) {
     errno = EINVAL;
     return -1;
     }
@@ -984,7 +1244,7 @@
 
   i = convert_sockaddr(&laddr, destaddr, addrlen);
 
-  if (i < 0)
+  if(i < 0)
     return -1;
 
   return connect(sd, (struct sockaddr *) &laddr, i);
@@ -1000,7 +1260,7 @@
 
   i = convert_sockaddr(&laddr, localaddr, addrlen);
 
-  if (i < 0)
+  if(i < 0)
     return -1;
 
   return bind(sd, (struct sockaddr *) &laddr, i);
@@ -1017,7 +1277,7 @@
 
   i = convert_sockaddr(&laddr, dstaddr, addrlen);
 
-  if (i < 0)
+  if(i < 0)
     return -1;
 
   return sendto(sd, buffer, buflen, flags, (struct sockaddr *) &laddr, i);
@@ -1036,7 +1296,7 @@
   struct sockaddr_un * dstu;
   struct sockaddr_storage laddr;
 
-  if (!fromaddr || !addrlen || *addrlen <= 0)
+  if(!fromaddr || !addrlen || *addrlen <= 0)
     return recvfrom(sd, buffer, buflen, flags, fromaddr, addrlen);
 
   laddrlen = sizeof laddr;
@@ -1044,7 +1304,7 @@
   rcvlen = recvfrom(sd, buffer, buflen, flags,
                     (struct sockaddr *) &laddr, &laddrlen);
 
-  if (rcvlen < 0)
+  if(rcvlen < 0)
     return rcvlen;
 
   switch (laddr.ss_family) {
@@ -1057,7 +1317,7 @@
     i = QadrtConvertE2A(dstu->sun_path, srcu->sun_path, i, laddrlen);
     laddrlen = i + offsetof(struct sockaddr_un, sun_path);
 
-    if (laddrlen < *addrlen)
+    if(laddrlen < *addrlen)
       dstu->sun_path[i] = '\0';
 
     break;
@@ -1066,10 +1326,10 @@
     break;
 
   default:
-    if (laddrlen > *addrlen)
+    if(laddrlen > *addrlen)
       laddrlen = *addrlen;
 
-    if (laddrlen)
+    if(laddrlen)
       memcpy((char *) fromaddr, (char *) &laddr, laddrlen);
 
     break;
@@ -1078,3 +1338,79 @@
   *addrlen = laddrlen;
   return rcvlen;
 }
+
+
+#ifdef HAVE_LIBZ
+const char *
+Curl_os400_zlibVersion(void)
+
+{
+  return set_thread_string(LK_ZLIB_VERSION, zlibVersion());
+}
+
+
+int
+Curl_os400_inflateInit_(z_streamp strm, const char * version, int stream_size)
+
+{
+  z_const char * msgb4 = strm->msg;
+  int ret;
+
+  ret = inflateInit(strm);
+
+  if(strm->msg != msgb4)
+    strm->msg = set_thread_string(LK_ZLIB_MSG, strm->msg);
+
+  return ret;
+}
+
+
+int
+Curl_os400_inflateInit2_(z_streamp strm, int windowBits,
+                                        const char * version, int stream_size)
+
+{
+  z_const char * msgb4 = strm->msg;
+  int ret;
+
+  ret = inflateInit2(strm, windowBits);
+
+  if(strm->msg != msgb4)
+    strm->msg = set_thread_string(LK_ZLIB_MSG, strm->msg);
+
+  return ret;
+}
+
+
+int
+Curl_os400_inflate(z_streamp strm, int flush)
+
+{
+  z_const char * msgb4 = strm->msg;
+  int ret;
+
+  ret = inflate(strm, flush);
+
+  if(strm->msg != msgb4)
+    strm->msg = set_thread_string(LK_ZLIB_MSG, strm->msg);
+
+  return ret;
+}
+
+
+int
+Curl_os400_inflateEnd(z_streamp strm)
+
+{
+  z_const char * msgb4 = strm->msg;
+  int ret;
+
+  ret = inflateEnd(strm);
+
+  if(strm->msg != msgb4)
+    strm->msg = set_thread_string(LK_ZLIB_MSG, strm->msg);
+
+  return ret;
+}
+
+#endif
diff --git a/packages/OS400/os400sys.h b/packages/OS400/os400sys.h
index e708365..c98e198 100644
--- a/packages/OS400/os400sys.h
+++ b/packages/OS400/os400sys.h
@@ -5,11 +5,11 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, 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.
+ * are also available at https://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
@@ -31,6 +31,7 @@
 
 typedef enum {
         LK_SSL_ERROR,
+        LK_GSK_ERROR,
         LK_LDAP_ERROR,
         LK_CURL_VERSION,
         LK_VERSION_INFO,
@@ -38,6 +39,8 @@
         LK_EASY_STRERROR,
         LK_SHARE_STRERROR,
         LK_MULTI_STRERROR,
+        LK_ZLIB_VERSION,
+        LK_ZLIB_MSG,
         LK_LAST
 }               localkey_t;
 
diff --git a/packages/Solaris/Makefile.in b/packages/Solaris/Makefile.in
deleted file mode 100644
index 951ac0c..0000000
--- a/packages/Solaris/Makefile.in
+++ /dev/null
@@ -1,438 +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/Solaris
-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 = "@PACKAGE@-@VERSION@ - @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@
-PKGADD_ARCH = "@host_cpu@"
-PKGADD_DESC = "@PACKAGE@-@VERSION@ - @PKGADD_NAME@"
-PKGADD_CLASSES = none
-PKGADD_BASEDIR = /
-PKGADD_FILE = ${PKGADD_PKG}-@PACKAGE@-@VERSION@-@host@.pkg
-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) --gnu  packages/Solaris/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  packages/Solaris/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
-
-
-package:
-	if [ ! -f release ]; then echo 0 > release; fi
-	if [ `find root -newer release -print|wc -l` -gt 0 ]; then expr `cat release` + 1 > release; fi
-	echo PKG=${PKGADD_PKG} > pkginfo
-	echo NAME=${PKGADD_NAME} >> pkginfo
-	echo VENDOR=${PKGADD_VENDOR} >> pkginfo
-	echo ARCH=${PKGADD_ARCH} >> pkginfo
-	echo DESC=${PKGADD_DESC} >> pkginfo
-	echo CLASSES=${PKGADD_CLASSES} >> pkginfo
-	echo BASEDIR=${PKGADD_BASEDIR} >> pkginfo
-	echo CATEGORY=application >> pkginfo
-	echo VERSION=`cat ./release` >> pkginfo
-	echo > prototype
-	for subdir in opt var etc usr; \
-	do if [ -d root/$$subdir ]; then \
-		pkgproto root/$$subdir=$$subdir >> prototype;\
-	fi; done
-	for file in pkginfo preinstall postinstall copyright; \
-	do if [ -f $$file ]; then \
-		echo "i $$file=$$file" >> prototype; \
-	fi; done
-	rm -rf ./tmp
-	mkdir ./tmp
-	pkgmk -o -d ./tmp
-	pkgtrans -so ./tmp ${top_srcdir}/../${PKGADD_FILE} ${PKGADD_PKG}
-# 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/Symbian/bwins/libcurlu.def b/packages/Symbian/bwins/libcurlu.def
index 4d693a9..035df13 100644
--- a/packages/Symbian/bwins/libcurlu.def
+++ b/packages/Symbian/bwins/libcurlu.def
@@ -57,4 +57,5 @@
 	curl_version_info @ 56 NONAME
 	curl_easy_recv @ 57 NONAME
 	curl_easy_send @ 58 NONAME
+	curl_multi_wait @ 59 NONAME
 
diff --git a/packages/Symbian/eabi/libcurlu.def b/packages/Symbian/eabi/libcurlu.def
index 4d693a9..035df13 100644
--- a/packages/Symbian/eabi/libcurlu.def
+++ b/packages/Symbian/eabi/libcurlu.def
@@ -57,4 +57,5 @@
 	curl_version_info @ 56 NONAME
 	curl_easy_recv @ 57 NONAME
 	curl_easy_send @ 58 NONAME
+	curl_multi_wait @ 59 NONAME
 
diff --git a/packages/Symbian/group/curl.mmp b/packages/Symbian/group/curl.mmp
index 706cba6..b3d4d1c 100644
--- a/packages/Symbian/group/curl.mmp
+++ b/packages/Symbian/group/curl.mmp
@@ -8,12 +8,48 @@
 
 SOURCEPATH  ../../../src
 SOURCE \
-    main.c hugehelp.c urlglob.c writeout.c writeenv.c \
-    getpass.c homedir.c curlutil.c os-specific.c xattr.c
+    tool_binmode.c \
+    tool_bname.c \
+    tool_cb_dbg.c \
+    tool_cb_hdr.c \
+    tool_cb_prg.c \
+    tool_cb_rea.c \
+    tool_cb_see.c \
+    tool_cb_wrt.c \
+    tool_cfgable.c \
+    tool_convert.c \
+    tool_dirhie.c \
+    tool_doswin.c \
+    tool_easysrc.c \
+    tool_formparse.c \
+    tool_getparam.c \
+    tool_getpass.c \
+    tool_help.c \
+    tool_helpers.c \
+    tool_homedir.c \
+    tool_hugehelp.c \
+    tool_libinfo.c \
+    tool_main.c \
+    tool_metalink.c \
+    tool_mfiles.c \
+    tool_msgs.c \
+    tool_operate.c \
+    tool_operhlp.c \
+    tool_panykey.c \
+    tool_paramhlp.c \
+    tool_parsecfg.c \
+    tool_setopt.c \
+    tool_sleep.c \
+    tool_urlglob.c \
+    tool_util.c \
+    tool_vms.c \
+    tool_writeenv.c \
+    tool_writeout.c \
+    tool_xattr.c
 
 SOURCEPATH  ../../../lib
 SOURCE \
-    rawstr.c nonblock.c
+    strcase.c nonblock.c
 
 USERINCLUDE ../../../src ../../../lib ../../../include/curl
 
diff --git a/packages/Symbian/group/curl.pkg b/packages/Symbian/group/curl.pkg
index dfc994f..17c64f1 100644
--- a/packages/Symbian/group/curl.pkg
+++ b/packages/Symbian/group/curl.pkg
@@ -1,4 +1,4 @@
-; curl package defintion file
+; curl package definition file
 ; Use with makesis to create a Symbian .sis package
 
 ;Language - standard language definitions
diff --git a/packages/Symbian/group/libcurl.mmp b/packages/Symbian/group/libcurl.mmp
index c060024..c52fe42 100644
--- a/packages/Symbian/group/libcurl.mmp
+++ b/packages/Symbian/group/libcurl.mmp
@@ -16,26 +16,34 @@
 MACRO       HAVE_LIBZ
 #endif
 #ifdef ENABLE_SSL
-MACRO       USE_SSLEAY
+MACRO       USE_OPENSSL
 #endif
 
 SOURCEPATH  ../../../lib
 SOURCE \
-  file.c timeval.c base64.c hostip.c progress.c formdata.c	\
-  cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c	\
-  ldap.c ssluse.c version.c getenv.c escape.c mprintf.c telnet.c	\
-  netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c	\
-  curl_fnmatch.c fileinfo.c ftplistparser.c wildcard.c krb5.c		\
-  memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c multi.c	\
-  content_encoding.c share.c http_digest.c md4.c md5.c curl_rand.c	\
-  http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c	\
-  hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c	\
-  inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c	\
-  strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c		\
-  socks_gssapi.c socks_sspi.c curl_sspi.c slist.c nonblock.c		\
-  curl_memrchr.c imap.c pop3.c smtp.c pingpong.c rtsp.c curl_threads.c	\
-  warnless.c hmac.c polarssl.c curl_rtmp.c openldap.c curl_gethostname.c\
-  gopher.c
+  file.c timeval.c base64.c hostip.c progress.c formdata.c             \
+  cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c      \
+  ldap.c vtls/openssl.c version.c getenv.c escape.c mprintf.c telnet.c \
+  netrc.c getinfo.c transfer.c strequal.c easy.c security.c krb4.c     \
+  curl_fnmatch.c fileinfo.c ftplistparser.c wildcard.c krb5.c          \
+  memdebug.c http_chunks.c strtok.c connect.c llist.c hash.c multi.c   \
+  content_encoding.c share.c http_digest.c md4.c md5.c curl_rand.c     \
+  http_negotiate.c inet_pton.c strtoofft.c strerror.c amigaos.c        \
+  hostasyn.c hostip4.c hostip6.c hostsyn.c inet_ntop.c parsedate.c     \
+  select.c vtls/gtls.c vtls/vtls.c tftp.c splay.c strdup.c socks.c     \
+  ssh.c vtls/nss.c strcase.c curl_addrinfo.c socks_gssapi.c             \
+  socks_sspi.c curl_sspi.c slist.c nonblock.c curl_memrchr.c imap.c    \
+  pop3.c smtp.c pingpong.c rtsp.c curl_threads.c warnless.c hmac.c     \
+  vtls/polarssl.c curl_rtmp.c openldap.c curl_gethostname.c gopher.c   \
+  vtls/axtls.c idn_win32.c vtls/cyassl.c http_proxy.c non-ascii.c      \
+  asyn-ares.c asyn-thread.c curl_gssapi.c http_ntlm.c curl_ntlm_wb.c   \
+  curl_ntlm_core.c curl_sasl.c vtls/schannel.c curl_multibyte.c        \
+  vtls/darwinssl.c conncache.c curl_sasl_sspi.c smb.c curl_endian.c    \
+  curl_des.c system_win32.c                                            \
+  vauth/vauth.c vauth/cleartext.c vauth/cram.c vauth/digest.c          \
+  vauth/digest_sspi.c vauth/krb5_gssapi.c vauth/krb5_sspi.c            \
+  vauth/ntlm.c vauth/ntlm_sspi.c vauth/oauth2.c vauth/spnego_gssapi.c  \
+  vauth/spnego_sspi.c
 
 USERINCLUDE   ../../../lib ../../../include/curl
 #ifdef ENABLE_SSL
diff --git a/packages/Symbian/group/libcurl.pkg b/packages/Symbian/group/libcurl.pkg
index 1460a59..6b04797 100644
--- a/packages/Symbian/group/libcurl.pkg
+++ b/packages/Symbian/group/libcurl.pkg
@@ -1,4 +1,4 @@
-; libcurl package defintion file
+; libcurl package definition file
 ; Use with makesis to create a Symbian .sis package
 
 ;Language - standard language definitions
diff --git a/packages/TPF/curl.mak b/packages/TPF/curl.mak
index 6e93404..5ef2ae1 100644
--- a/packages/TPF/curl.mak
+++ b/packages/TPF/curl.mak
@@ -43,7 +43,6 @@
 # use SSL
 # (overrides Curl's lib/config-tpf.h file)
 CFLAGS_CURL += -DUSE_OPENSSL
-CFLAGS_CURL += -DUSE_SSLEAY
 
 # disable all protocols except FTP and HTTP
 # (overrides Curl's lib/config-tpf.h file)
diff --git a/packages/Win32/Makefile.in b/packages/Win32/Makefile.in
deleted file mode 100644
index a4e1930..0000000
--- a/packages/Win32/Makefile.in
+++ /dev/null
@@ -1,563 +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/Win32
-DIST_COMMON = README $(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 =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
-	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
-ETAGS = etags
-CTAGS = ctags
-DIST_SUBDIRS = $(SUBDIRS)
-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@
-SUBDIRS = cygwin
-EXTRA_DIST = README
-all: all-recursive
-
-.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) --gnu  packages/Win32/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  packages/Win32/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:
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	target=`echo $@ | sed s/-recursive//`; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    dot_seen=yes; \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done; \
-	if test "$$dot_seen" = "no"; then \
-	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
-	fi; test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
-	for f in x $$MAKEFLAGS; do \
-	  case $$f in \
-	    *=* | --[!k]*);; \
-	    *k*) failcom='fail=yes';; \
-	  esac; \
-	done; \
-	dot_seen=no; \
-	case "$@" in \
-	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
-	  *) list='$(SUBDIRS)' ;; \
-	esac; \
-	rev=''; for subdir in $$list; do \
-	  if test "$$subdir" = "."; then :; else \
-	    rev="$$subdir $$rev"; \
-	  fi; \
-	done; \
-	rev="$$rev ."; \
-	target=`echo $@ | sed s/-recursive//`; \
-	for subdir in $$rev; do \
-	  echo "Making $$target in $$subdir"; \
-	  if test "$$subdir" = "."; then \
-	    local_target="$$target-am"; \
-	  else \
-	    local_target="$$target"; \
-	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
-	  || eval $$failcom; \
-	done && test -z "$$fail"
-tags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
-	done
-ctags-recursive:
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-	done
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
-	  include_option=--etags-include; \
-	  empty_fix=.; \
-	else \
-	  include_option=--include; \
-	  empty_fix=; \
-	fi; \
-	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
-	  fi; \
-	done; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
-	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
-	fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
-	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
-
-GTAGS:
-	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
-	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-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
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
-	  if test "$$subdir" = .; then :; else \
-	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
-	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
-	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
-	        distdir) \
-	      || exit 1; \
-	  fi; \
-	done
-check-am: all-am
-check: check-recursive
-all-am: Makefile
-installdirs: installdirs-recursive
-installdirs-am:
-install: install-recursive
-install-exec: install-exec-recursive
-install-data: install-data-recursive
-uninstall: uninstall-recursive
-
-install-am: all-am
-	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-recursive
-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-recursive
-
-clean-am: clean-generic clean-libtool mostlyclean-am
-
-distclean: distclean-recursive
-	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
-
-dvi: dvi-recursive
-
-dvi-am:
-
-html: html-recursive
-
-info: info-recursive
-
-info-am:
-
-install-data-am:
-
-install-exec-am:
-
-install-info: install-info-recursive
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-recursive
-	-rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-recursive
-
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-
-pdf: pdf-recursive
-
-pdf-am:
-
-ps: ps-recursive
-
-ps-am:
-
-uninstall-am: uninstall-info-am
-
-uninstall-info: uninstall-info-recursive
-
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags 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 installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	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/Win32/README b/packages/Win32/README
index 266e4ea..eb5d0a6 100644
--- a/packages/Win32/README
+++ b/packages/Win32/README
@@ -3,7 +3,7 @@
 DESCRIPTION
 
 (If you're only looking for precompiled win32 binaries, go visit
-http://curl.haxx.se/download.html)
+https://curl.haxx.se/download.html)
 
 Packaging of the curl binaries for Win32 should at this point in time be based
 on the InfoZip (zip/unzip) archiver family as the de-facto standard for
diff --git a/packages/Win32/cygwin/Makefile.in b/packages/Win32/cygwin/Makefile.in
deleted file mode 100644
index ebcb34d..0000000
--- a/packages/Win32/cygwin/Makefile.in
+++ /dev/null
@@ -1,466 +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/Win32/cygwin
-DIST_COMMON = README $(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 = README
-
-#
-# Build a Cygwin binary tar ball
-#
-# Read the README file for details on using this Makefile
-#
-# NOTE: As I'm not particularly familiar with Makefiles, this was the
-#  best I could come up with. It should probably be enhanced someday
-#  to actually use the correct target and pre-requisite names, etc...
-#  If anyone else wants to volunteer, feel free ;-)
-#
-
-# Cygwin build number (default to "1")
-CYGBUILD = 1
-
-# Cygwin tarball build dir (fully-qualified name, gets deleted when done)
-cygwintmp = $(CURDIR)/tmp_binbuild
-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) --gnu  packages/Win32/cygwin/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  packages/Win32/cygwin/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
-
-
-cygwinbin:
-	rm -rf $(cygwintmp)
-	rm -rf $(cygwintmp)-dev
-	$(MAKE) -C $(top_builddir) DESTDIR=$(cygwintmp) install-strip
-# $(STRIP) $(cygwintmp)/usr/bin/cygcurl-?.dll
-	$(mkinstalldirs) \
-	  $(cygwintmp)$(datadir)/doc/Cygwin \
-	  $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION) \
-	  $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/libcurl \
-	  $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples \
-	  $(cygwintmp)-dev$(mandir)
-#
-# copy some files into the binary install dir
-	cp $(srcdir)/README \
-	  $(cygwintmp)$(datadir)/doc/Cygwin/$(PACKAGE)-$(VERSION)-$(CYGBUILD).README
-	cd $(top_srcdir) ; cp CHANGES COPYING README RELEASE-NOTES docs/* \
-	  $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION) ; pwd
-	cd $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION) ; rm *.1 Makefile*
-#
-# copy some files into the -dev install dir, remove some from binary
-	cp $(top_srcdir)/docs/libcurl/*.html \
-	  $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/libcurl
-	cp $(top_srcdir)/docs/examples/* \
-	  $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples
-	rm $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples/Makefile*
-	cp $(top_srcdir)/docs/examples/Makefile.example \
-	  $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)/examples
-	mv $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION)/BINDINGS \
-	   $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)
-	mv $(cygwintmp)$(datadir)/doc/$(PACKAGE)-$(VERSION)/INTERNALS \
-	   $(cygwintmp)-dev$(datadir)/doc/$(PACKAGE)-$(VERSION)
-	mv $(cygwintmp)/usr/include $(cygwintmp)-dev/usr
-	mv $(cygwintmp)/usr/lib $(cygwintmp)-dev/usr
-	mv $(cygwintmp)$(mandir)/man3 $(cygwintmp)-dev$(mandir)
-#
-# create both tar files, and delete tmp folders
-	cd $(cygwintmp) ; tar cjf \
-	  $(PACKAGE)-$(VERSION)-$(CYGBUILD).tar.bz2 usr
-	mv $(cygwintmp)/*.tar.bz2 . && rm -rf $(cygwintmp)
-#
-	cd $(cygwintmp)-dev ; tar cjf \
-	  $(PACKAGE)-devel-$(VERSION)-$(CYGBUILD).tar.bz2 usr
-	mv $(cygwintmp)-dev/*.tar.bz2 . && rm -rf $(cygwintmp)-dev
-# 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/Win32/cygwin/README b/packages/Win32/cygwin/README
index 7457f73..a0811de 100644
--- a/packages/Win32/cygwin/README
+++ b/packages/Win32/cygwin/README
@@ -16,8 +16,8 @@
 
 
 Canonical Homepage and Downloads:
-  http://curl.haxx.se/
-  http://curl.haxx.se/download.html
+  https://curl.haxx.se/
+  https://curl.haxx.se/download.html
 
 
 Cygwin specific source files (a .README template and a Makefile
diff --git a/packages/vms/Makefile.am b/packages/vms/Makefile.am
index 848b627..38f6585 100644
--- a/packages/vms/Makefile.am
+++ b/packages/vms/Makefile.am
@@ -1,16 +1,36 @@
-EXTRA_DIST = build_vms.com \
+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 65ea195..0000000
--- a/packages/vms/Makefile.in
+++ /dev/null
@@ -1,421 +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 \
- 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) --gnu  packages/vms/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  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..3b4cd80
--- /dev/null
+++ b/packages/vms/build_gnv_curl_pcsi_desc.com
@@ -0,0 +1,492 @@
+$! 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"
+$ vsiprd = "VSI"
+$!
+$ 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)
+$ line_out = -
+ "   if ((not <software ''vsiprd' ''base' VMS version minimum" + -
+ " ''node_swvers'>) and" + -
+ " (not <software ''vmsprd' ''base' VMS version minimum ''node_swvers'>));"
+$ write pdsc line_out
+$ 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 276e767..e21e57c 100644
--- a/packages/vms/build_vms.com
+++ b/packages/vms/build_vms.com
@@ -18,16 +18,43 @@
 $!              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 @@
 $!                   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 @@
 $!                   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 (arg_val .eqs. "DEBUG")
-$    then
-$       cc_qual1 = cc_qual1+ " /debug /nooptimize"
-$       link_qual = link_qual+ " /debug"
-$       goto arg_loop_end
-$    endif
+$   if clean_all .eq. 0 then goto Common_Exit
+$ endif
 $!
-$    if (arg_val .eqs. "IEEE")
-$    then
-$       cc_qual1 = cc_qual1+ " /FLOAT = IEEE_FLOAT"
-$       goto arg_loop_end
-$    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
+$ 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. "LDAP")
-$    then
-$       ldap = 1
-$       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 (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
+$ 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 (arg_val .eqs. "NOHPSSL")
-$    then
-$       nohpssl = 1
-$       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. "NOSSL")
-$    then
-$       nossl = 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. "OSSLOLB")
-$    then
-$       osslolb = 1
-$       goto arg_loop_end
-$    endif
+$ if f$locate(",noieee,", args_lower) .lt. args_lower_len
+$ then
+$   cc_float = ""
+$ endif
 $!
-$    write sys$output "Unrecognized command-line option: ''arg_val'"
-$    goto Common_Exit
+$! 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
 $!
-$arg_loop_end:
-$ arg = arg+ 1
-$ goto arg_loop
-$arg_loop_out:
+$ 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
+$!
 $!
 $! 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 @@
 $!
 $ if (openssl .ne. 0)
 $ then
-$    ssllib = f$trnlnm( "ssllib")
-$    if (ssllib .eqs. "")
-$    then
-$        ssllib = "(undefined)"
-$    endif
-$    'vo_c' "   SSLLIB = ''ssllib'"
+$   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"
+$! 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'
 $!
-$! Copy the VMS-specific config file into the product directory.
+$! Generate config file into the product directory.
 $!
-$ call MoveIfDiff 'top_dev_dir'.lib]config-vms.h 'objdir'curl_config.h
+$! call MoveIfDiff [.lib]config-vms.h 'objdir'curl_config.h
+$!
+$ 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
+$!
 $!
 $ 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 @@
 $! 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
-$       endif
-$       objfile = f$parse( "''objdir'.OBJ;", file)
-$       obj = f$search( objfile, 2)
-$       if (obj .nes. "")
+$       if (f$locate(name__, reject_list__) .lt. reject_list___len)
 $       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
-$       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'
+$          goto Loop
 $       endif
-$    goto Loop
+$   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
+$           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
+$   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'
+$   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 @@
 $! 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_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..83534c0
--- /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 https://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..424a382 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 https://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
@@ -36,7 +57,8 @@
 #define CURL_COULDNT_RESOLVE_PROXY 251756594
 #define CURL_COULDNT_RESOLVE_HOST 251756602
 #define CURL_COULDNT_CONNECT 251756610
-#define CURL_FTP_WEIRD_SERVER_REPLY 251756618
+#define CURL_WEIRD_SERVER_REPLY 251756618
+#define CURL_FTP_WEIRD_SERVER_REPLY CURL_WEIRD_SERVER_REPLY
 #define CURL_FTP_ACCESS_DENIED 251756626
 #define CURL_OBSOLETE10 251756634
 #define CURL_FTP_WEIRD_PASS_REPLY 251756642
diff --git a/packages/vms/curlmsg.msg b/packages/vms/curlmsg.msg
index 7fd4483..492657c 100644
--- a/packages/vms/curlmsg.msg
+++ b/packages/vms/curlmsg.msg
@@ -30,7 +30,7 @@
 COULDNT_RESOLVE_PROXY	<could not resolve proxy>
 COULDNT_RESOLVE_HOST	<could not resolve host>
 COULDNT_CONNECT		<could not connect>
-FTP_WEIRD_SERVER_REPLY	<FTP weird server reply>
+WEIRD_SERVER_REPLY	<weird server reply>
 FTP_ACCESS_DENIED	<FTP access denied>
 OBSOLETE10		<obsolete error code>
 FTP_WEIRD_PASS_REPLY	<FTP weird PASS reply>
diff --git a/packages/vms/curlmsg.sdl b/packages/vms/curlmsg.sdl
index e192c07..db5baad 100644
--- a/packages/vms/curlmsg.sdl
+++ b/packages/vms/curlmsg.sdl
@@ -34,6 +34,7 @@
        ,"COULDNT_RESOLVE_PROXY" EQUALS %X0F018032 PREFIX "CURL" TAG ""
        ,"COULDNT_RESOLVE_HOST" EQUALS %X0F01803A PREFIX "CURL" TAG ""
        ,"COULDNT_CONNECT" EQUALS %X0F018042  PREFIX "CURL" TAG ""
+       ,"WEIRD_SERVER_REPLY" EQUALS %X0F01804A PREFIX "CURL" TAG ""
        ,"FTP_WEIRD_SERVER_REPLY" EQUALS %X0F01804A PREFIX "CURL" TAG ""
        ,"FTP_ACCESS_DENIED" EQUALS %X0F018052 PREFIX "CURL" TAG ""
        ,"OBSOLETE10"   EQUALS %X0F01805A     PREFIX "CURL" TAG ""
diff --git a/packages/vms/curlmsg_vms.h b/packages/vms/curlmsg_vms.h
index e99e88c..b7ff7a0 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 https://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                                                            */
@@ -38,7 +59,7 @@
 	CURL_COULDNT_RESOLVE_PROXY,
 	CURL_COULDNT_RESOLVE_HOST,
 	CURL_COULDNT_CONNECT,
-	CURL_FTP_WEIRD_SERVER_REPLY,
+	CURL_WEIRD_SERVER_REPLY,
 	CURL_FTP_ACCESS_DENIED,
 	CURL_OBSOLETE10,
 	CURL_FTP_WEIRD_PASS_REPLY,
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..add4be9
--- /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-strcase.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"
+$   strcase = "strcase"
+$   nonblock = "nonblock"
+$   warnless = "warnless"
+$!
+$!  Extended parse style requires special quoting
+$!
+$   if (arch_name .nes. "VAX") .and. (parse_style .eqs. "EXTENDED")
+$   then
+$       strcase = """strcase"""
+$       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=-
+           ('strcase','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 @@
 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 @@
 
 What is Here:
 
-This directory contains the following files:
+This directory contains the following files for a DCL based build.
 
-build_vms.com           Build procedure.
-config-vms.h            VMS-specific config.h.
+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.
+
 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 @@
       @ [.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