OpenVMS Source-Code Demos

BUILD_MOD_AUTH_OPENVMS

$!=====================================================================================================================
$! title  : build_mod_auth_openvms.com
$! created: 2015-02-28
$! edits  : 2015-03-01 to 2015-03-03
$! author : Neil Rieck
$!=====================================================================================================================
$! notes:
$! 1) Apache source code kits for OpenVMS are available by anonymous FTP from HP:
$!                                      ftp.hp.com/pub/openvms/apache/
$! 2) For some reason only HP knows,	kit version 202 is newer and larger
$!					kit version 211 is older and smaller (this script uses 211)
$! 3) I unpacked APACHE-SRC-KIT-V211.BCK into sub folder: [.HTTPD-211]
$!    Then I unpacked these files into a sub-sub-folder like so:
$!	$back *.bck/save  [.src...]
$!	yielding:	[.src.build...]
$! 4) --- optional ---
$!    I unpacked APACHE-SRC-KIT-V202.BCK into sub folder: [.HTTPD-202]
$!    Then I unpacked these files into a sub-sub-folder like so:
$!	$back *.bck/save  [.src...]
$!	yielding:	[.src.build...]
$!			[.src.build1.php...]
$!			[.src.csws-v202-1....]
$! 5) Next I located mod_auth_openvms.c ($dir [.HTTPD-211.src...]mod_auth_openvms.c) then copied it into my home folder
$! 6) Recent HP docs (2014-10-xx)
$!	see: http://h41379.www4.hpe.com/openvms/products/ips/apache/csws_install_22.pdf
$!    say to include folders "apache$common:[src.include]" and "apache$common:[src.os.openvms]" when compiling.
$!    On all my systems this is stale crud from Apache-1.3 so don't do it. Instead, look at my method below.
$!=====================================================================================================================
$ say :== write sys$output
$ ask :== inquire/nopunc
$ ask choice "compile new source? (y/N) "
$ choice = f$edit(choice,"UPCASE")
$ if (choice .nes. "Y") then goto skip_compile
$! ---------------------------------
$! note: a slower but more careful VMS compile might look like this:
$!	/include=(
$!		[.HTTPD-211.SRC.BUILD.apache.ALPHA-CSWS-V0201-1-ECO-2...VMS...]	,	-
$!		[.HTTPD-211.SRC.BUILD.apache.ALPHA-CSWS-V0201-1-ECO-2...]	)	-
$! ---------------------------------
$! compiler switches to investigate for use with Apache:
$!	/standard=common	! Apache uses older standards for maximum portability
$!	/define=eapi		! not needed with Apache-2 since SSL is baked-in
$! ---------------------------------
$ say "-i-compiling (fast): mod_auth_openvms.c"
$ cc	/lis					-
	/pointer=32				-
	/prefix=all				-
	/share					-
	/include=(				-
		[.HTTPD-211.SRC.BUILD.apache.ALPHA-CSWS-V0201-1-ECO-2.HTTPD.include]		,	-
		[.HTTPD-211.SRC.BUILD.apache.ALPHA-CSWS-V0201-1-ECO-2.HTTPD.os.VMS]		,	-
		[.HTTPD-211.SRC.BUILD.apache.ALPHA-CSWS-V0201-1-ECO-2.APR.include]		,	-
		[.HTTPD-211.SRC.BUILD.apache.ALPHA-CSWS-V0201-1-ECO-2.APR.include.arch.VMS]	,	-
		[.HTTPD-211.SRC.BUILD.apache.ALPHA-CSWS-V0201-1-ECO-2.APL.PortLIB]		,	-
		[.HTTPD-211.SRC.BUILD.apache.ALPHA-CSWS-V0201-1-ECO-2.APU.include]		)	-
	mod_auth_openvms.c
$ skip_compile:
$ say "-i-linking: mod_auth_openvms"
$ link/share/map	mod_auth_openvms,sys$input:/option
	IDENTIFICATION="CSWS V2.2"				! VMS Apache version
	BUILD_IDENT="HTTPD V2.0.63"				! Apache HTTP version
	GSMATCH=LEQUAL,2,0					! must be Apache 2.0 or higher
	SYMBOL_VECTOR=(AUTH_OPENVMS_MODULE=DATA)		! see: "extern module" in pgm.c
	! these logical names point to Apache shares
	APACHE$HTTPD_SHR	/share
	APACHE$APR_SHR		/share
	APACHE$APR_SHRP		/share
$!
$ say "-i-adios"