Subject: | [PATCH] Allow non-hp OpenSSL to be used on OpenVMS |
Hello,
this is with Perl 5.12.2, Crypt::SSLeay 0.58 on OpenVMS 8.3-1H1 Itanium.
The current setup of Crypt::SSLeay only supports building against the hp
supplied version of OpenSSL (which is based on 0.9.7e), since it
hardcodes the libraries in sys$share to be used for the link.
If one installs a current version of OpenSSL (e.g. 1.0.0b) in a separate
place, one can already specify this to Makefile.PL by using the --lib
switch (e.g. --lib=/sslroot), unfortunatly the script still will force
the link against the old hp libraries since it hardcodes sys$share and
the hp names of the libraries.
The proposed patch changes Makefile.PL so that if --lib is given (i.e.
do not use the hp libs) it will link againt libraries in ssllib, which
is the place the OpenSSL installation procedure puts them.
The code change is restricted to a VMS specific section of the script
and if no special flags are passed produces exactly the same result as
before.
I'd be grateful if you would consider this for inclusion in the next
revision.
Greetings,
Martin
*** Makefile.PL.orig 2010-12-02 14:42:40.710376502 -0600
--- Makefile.PL 2010-12-02 14:44:05.495310543 -0600
***************
*** 452,458 ****
sub vms_lib_flags {
my $pkg_config = shift;
! return qw(-L/SYS$SHARE -lSSL$LIBSSL_SHR32 -lSSL$LIBCRYPTO_SHR32);
}
sub win32_lib_flags {
--- 452,463 ----
sub vms_lib_flags {
my $pkg_config = shift;
! if (defined $OPT_LIBPATH){
! return qw(SSLLIB:LIBSSL.OLB SSLLIB:LIBCRYPTO.OLB);
! }
! else{
! return qw(-L/SYS$SHARE -lSSL$LIBSSL_SHR32 -lSSL$LIBCRYPTO_SHR32);
! }
}
sub win32_lib_flags {