This fixes the installation target for dynamic engines, which was trying to
authorGeoff Thorpe <geoff@openssl.org>
Tue, 1 Jun 2004 03:18:58 +0000 (03:18 +0000)
committerGeoff Thorpe <geoff@openssl.org>
Tue, 1 Jun 2004 03:18:58 +0000 (03:18 +0000)
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
Makefile.org
crypto/engine/eng_list.c
crypto/opensslconf.h.in
engines/Makefile.ssl

index 074e44a..4c5c2e2 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1438,6 +1438,8 @@ while (<IN>)
        {
        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;
index d9c07cd..b64bf33 100644 (file)
@@ -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
index 67d67df..f337e0f 100644 (file)
@@ -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) ||
index 685e83b..cee83ac 100644 (file)
@@ -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
index 8c383f9..8ae81f3 100644 (file)
@@ -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