Versioning engines default location: the Windows case
authorRichard Levitte <levitte@openssl.org>
Wed, 6 Jul 2016 16:37:52 +0000 (18:37 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 7 Jul 2016 13:07:32 +0000 (15:07 +0200)
OpenSSL engines are tied to the OpenSSL shared library versions,
starting with OpenSSL 1.1.  We therefore need to install them in
directories which have the shared library version in it's name, to
easily allow multiple OpenSSL versions to be installed at the same
time.

For windows, the default installation directory is changed from
$PREFIX/lib/engines to $PREFIX/lib/engines-${major}_${minor}

($PREFIX is the directory given for the configuration option --prefix,
and ${major} and ${minor} are the major and minor shared library
version numbers)

Reviewed-by: Rich Salz <rsalz@openssl.org>
Configurations/windows-makefile.tmpl

index 70fec0a8c7e9d03a65ac0cf1cc442b0c208f2754..9b7bcabc6e711f234d7dd4ab878aa014e9a24241 100644 (file)
@@ -11,6 +11,8 @@
  our $shlibextimport = $target{shared_import_extension} || ".lib";
  our $dsoext = $target{dso_extension} || ".dll";
 
  our $shlibextimport = $target{shared_import_extension} || ".lib";
  our $dsoext = $target{dso_extension} || ".dll";
 
+ our $sover = $config{shlib_major}."_".$config{shlib_minor};
+
  my $win_installenv =
      $target{build_scheme}->[2] eq "VC-W32" ?
      "ProgramFiles(x86)" : "ProgramW6432";
  my $win_installenv =
      $target{build_scheme}->[2] eq "VC-W32" ?
      "ProgramFiles(x86)" : "ProgramW6432";
@@ -118,7 +120,7 @@ OPENSSLDIR_dir={- $openssldir_dir -}
 LIBDIR={- our $libdir = $config{libdir} || "lib";
           $libdir -}
 ENGINESDIR_dev={- use File::Spec::Functions qw(:DEFAULT splitpath);
 LIBDIR={- our $libdir = $config{libdir} || "lib";
           $libdir -}
 ENGINESDIR_dev={- use File::Spec::Functions qw(:DEFAULT splitpath);
-                  my $enginesdir = catdir($prefix,$libdir,"engines");
+                  my $enginesdir = catdir($prefix,$libdir,"engines-$sover");
                   our ($enginesdir_dev, $enginesdir_dir, $enginesdir_file) =
                       splitpath($enginesdir, 1);
                   $enginesdir_dev -}
                   our ($enginesdir_dev, $enginesdir_dir, $enginesdir_file) =
                       splitpath($enginesdir, 1);
                   $enginesdir_dev -}