OpenVMS Source Code Demos

BUILD_MOD_AUTH_VMS_EXT

$!=====================================================================================================================
$! title  : build_mod_auth_vms_ext.com
$! created: 2015-03-03 (derived from: build_mod_auth_openvms.com)
$! 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-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....]
$! 4) --- optional ---
$!    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...]
$!=====================================================================================================================
$ say :== write sys$output
$ ask :== inquire/nopunc
$ if p1 .eqs. ""
$ then
$	say "----------"
$	dir/col=1 MOD_AUTH_VMS_EXT*.C;/nohead/notrail
$	say "----------"
$	ask version "desired version? (eg. 100, hit <enter> for no version, Q=quit) "
$	if version .eqs. "Q" then exit
$ else
$	version = p1
$ endif
$ if (version .nes."") then version = "_"+ version
$ 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_vms_ext",version,".c"
$ cc	/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_vms_ext'version'.c
$ skip_compile:
$ say "-i-linking: mod_auth_vms_ext",version
$ link/share=mod_auth_vms_ext.exe mod_auth_vms_ext'version',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_VMS_EXT_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 "----------"
$ dir/col=1 MOD_AUTH_VMS_EXT*.exe;/date/nohead/notrail/width=file=50
$ say "----------"
$ ask choice2 "Publish binary on current Apache? (y/N) "
$ choice2 = f$edit(choice2,"UPCASE")
$ if (choice2 .eqs. "Y")
$ then
$	copy/log  mod_auth_vms_ext.exe  apache$common:[modules]
$ else
$	say "-i-not copied"
$ endif
$ say "-i-adios"