From 9081980565988d351582998148782a8c91a55e93 Mon Sep 17 00:00:00 2001 From: Geoff Thorpe Date: Tue, 1 Jun 2004 03:18:58 +0000 Subject: [PATCH] This fixes the installation target for dynamic engines, which was trying to install to a different location than it had created. (BTW, VMS will need a matching fix in eng_list.c.) Note, these aren't ssl-specific, so I'm putting "engines/" into the libs directory rather than at the "--prefix" level or inside "ssl/". --- Configure | 2 ++ Makefile.org | 2 +- crypto/engine/eng_list.c | 2 +- crypto/opensslconf.h.in | 1 + engines/Makefile.ssl | 6 +++--- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Configure b/Configure index 074e44adf6..4c5c2e2cd5 100755 --- a/Configure +++ b/Configure @@ -1438,6 +1438,8 @@ while () { if (/^#define\s+OPENSSLDIR/) { print OUT "#define OPENSSLDIR \"$openssldir\"\n"; } + elsif (/^#define\s+ENGINESDIR/) + { print OUT "#define ENGINESDIR \"$prefix/lib/engines\"\n"; } elsif (/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/) { printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n" if $export_var_as_fn; diff --git a/Makefile.org b/Makefile.org index d9c07cdc59..b64bf33da1 100644 --- a/Makefile.org +++ b/Makefile.org @@ -496,9 +496,9 @@ dist_pem_h: install: all install_docs @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ $(INSTALL_PREFIX)$(INSTALLTOP)/lib \ + $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines \ $(INSTALL_PREFIX)$(INSTALLTOP)/lib/pkgconfig \ $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl \ - $(INSTALL_PREFIX)$(INSTALLTOP)/engines \ $(INSTALL_PREFIX)$(OPENSSLDIR)/misc \ $(INSTALL_PREFIX)$(OPENSSLDIR)/certs \ $(INSTALL_PREFIX)$(OPENSSLDIR)/private diff --git a/crypto/engine/eng_list.c b/crypto/engine/eng_list.c index 67d67df3ce..f337e0f3bc 100644 --- a/crypto/engine/eng_list.c +++ b/crypto/engine/eng_list.c @@ -397,7 +397,7 @@ ENGINE *ENGINE_by_id(const char *id) #ifdef OPENSSL_SYS_VMS if((load_dir = getenv("OPENSSL_ENGINES")) == 0) load_dir = "SSLROOT:[ENGINES]"; #else - if((load_dir = getenv("OPENSSL_ENGINES")) == 0) load_dir = OPENSSLDIR "/engines"; + if((load_dir = getenv("OPENSSL_ENGINES")) == 0) load_dir = ENGINESDIR; #endif iterator = ENGINE_by_id("dynamic"); if(!iterator || !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) || diff --git a/crypto/opensslconf.h.in b/crypto/opensslconf.h.in index 685e83b7a3..cee83acf98 100644 --- a/crypto/opensslconf.h.in +++ b/crypto/opensslconf.h.in @@ -5,6 +5,7 @@ #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) +#define ENGINESDIR "/usr/local/lib/engines" #define OPENSSLDIR "/usr/local/ssl" #endif #endif diff --git a/engines/Makefile.ssl b/engines/Makefile.ssl index 8c383f9599..8ae81f33ce 100644 --- a/engines/Makefile.ssl +++ b/engines/Makefile.ssl @@ -99,9 +99,9 @@ install: set -e; \ for l in $(LIBNAMES); do \ ( echo installing $$l; \ - cp lib$$l.so $(INSTALL_PREFIX)$(OPENSSLDIR)/engines/lib$$l.so.new; \ - chmod 555 $(INSTALL_PREFIX)$(OPENSSLDIR)/engines/lib$$l.so.new; \ - mv -f $(INSTALL_PREFIX)$(OPENSSLDIR)/engines/lib$$l.so.new $(INSTALL_PREFIX)$(OPENSSLDIR)/engines/lib$$l.so ); \ + cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ + chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ + mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so ); \ done; \ fi -- 2.40.0