summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/vms/clean_gnv_curl.com220
-rw-r--r--packages/vms/curl_gnv_build_steps.txt210
-rw-r--r--packages/vms/gnv_curl_configure.sh46
-rw-r--r--packages/vms/make_gnv_curl_install.sh45
-rw-r--r--packages/vms/setup_gnv_curl_build.com300
5 files changed, 821 insertions, 0 deletions
diff --git a/packages/vms/clean_gnv_curl.com b/packages/vms/clean_gnv_curl.com
new file mode 100644
index 000000000..25af784cc
--- /dev/null
+++ b/packages/vms/clean_gnv_curl.com
@@ -0,0 +1,220 @@
+$! 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-*.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-*.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';*
+$!
+$all_exit:
+$!
+$! Put the default back.
+$!-----------------------
+$ set def 'default_dir'
+$!
+$ exit
diff --git a/packages/vms/curl_gnv_build_steps.txt b/packages/vms/curl_gnv_build_steps.txt
new file mode 100644
index 000000000..6be139b10
--- /dev/null
+++ b/packages/vms/curl_gnv_build_steps.txt
@@ -0,0 +1,210 @@
+From File: curl_gnv_build_steps.txt
+
+$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.
+
+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.
+
+The HP C 7.x compiler was used for building the GNV version.
+
+The source kits are provided in backup savesets inside of the PCSI install kit.
+
+Backup save sets are currently the only distribution medium that I can be
+sure is installed on a target VMS system that will correctly unpack files
+with extended character sets in them. You may need to adjust the ownership
+of the restored files, since /Interchange/noconvert was not available at the
+time that this document was written.
+
+[gnv.common_src]curl_*_original_src.bck is the original source of the curl kit
+as provided by the curl project. [gnv.vms_src]curl-*_vms_src.bck, if present,
+has the OpenVMS specific files that are used for building that are not yet in
+the curl source kits for that release distributed http://curl.haxx.se
+
+These backup savesets should be restored to different directory trees on
+an ODS-5 volume(s) which are referenced by concealed rooted logical names.
+
+SRC_ROOT: is for the source files common to all platforms.
+VMS_ROOT: is for the source files that are specific to OpenVMS.
+ Note, you should create the VMS_ROOT: directory tree even if it is
+ initially empty. This is where you should put edits if you are
+ making changes.
+LCL_ROOT: is manually created to have the same base and sub-directories as
+ SRC_ROOT: and VMS_ROOT:
+
+The logical name REF_ROOT: is defined to be a logical name that is a search
+list for VMS_ROOT:,SRC_ROOT:
+
+The logical name PRJ_ROOT: is defined to be a logical name that is a search
+list for LCL_ROOT:,REF_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.2.45 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 will
+create all the other directories.
+
+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 bug appears to be in the SED for GNV 2.1.3 and GNV 3.0.1 where it
+is taking far longer than it should to do I/O. In addition, there are
+reports that the SED in GNV 3.0.1 is broken so the SED from GNV 2.1.3
+should be used instead.
+
+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] where the * is
+replaced by the actual version of curl, and then issuing the command:
+
+ $ @build_gnv_curl.com.
+
+This 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
+
+ $ purge new_gnu:[*...]/log
+
+
+To clean up after a build to start over, the following commands are used:
+
+ $ bash
+ bash$ export GNV_DISABLE_DCL_FALLBACK=1
+ 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.
+
+ 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 define the logical name
+ GNV_PCSI_PATCHLEVEL to the letter E followed by a number. Do not
+ use a patch level for kits built from the daily CVS snapshot.
+
+ 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. 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]JEM-AXPVMS-CURL-D0719-6-1.PCSI;1
+ -PCSI-I-NOTSIGNED, product kit is not signed and therefore has
+ no manifest file
+
+ This will result in both compressed and uncompressed kits for the target
+ platform.
+
+Good Luck.
diff --git a/packages/vms/gnv_curl_configure.sh b/packages/vms/gnv_curl_configure.sh
new file mode 100644
index 000000000..f71421080
--- /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/make_gnv_curl_install.sh b/packages/vms/make_gnv_curl_install.sh
new file mode 100644
index 000000000..d2150e625
--- /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/setup_gnv_curl_build.com b/packages/vms/setup_gnv_curl_build.com
new file mode 100644
index 000000000..d6a80ac2f
--- /dev/null
+++ b/packages/vms/setup_gnv_curl_build.com
@@ -0,0 +1,300 @@
+$! 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 GNV common init module.
+$!-------------------------------------------
+$ if f$search("[vms_common]vms_crtl_init_unix.obj") .nes. ""
+$ then
+$! Common copy, which should be more up to date than the one in the kit.
+$!------------------------------------------------------------------------
+$ define/job gnv_vms_common [vms_common]
+$ write sys$output "Using common vms_crtl_init_unix.obj"
+$ else
+$! For some reason the common files are missing so use the local copies
+$!------------------------------------------------------------------------
+$ define/job gnv_vms_common 'default_dir'
+$ init_obj = "gnv_vms_common:vms_crtl_init_unix.obj"
+$ if f$search(init_obj) .eqs. ""
+$ then
+$ cc'cflags' 'default_dir'vms_crtl_init.c-
+ /define=GNV_UNIX_TOOL=1/obj='init_obj'
+$ purge 'init_obj'
+$ rename 'init_obj' ;1
+$ endif
+$ endif
+$!
+$all_exit:
+$!
+$ set def 'default_dir'
+$!
+$! Verify can break things in bash, especially in Configure scripts.
+$ set nover
+$ exit