Fix to escape backslashes in prefix
authorDr. Stephen Henson <steve@openssl.org>
Sun, 26 Apr 2009 15:51:44 +0000 (15:51 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 26 Apr 2009 15:51:44 +0000 (15:51 +0000)
Configure

index c6dbfae4829d97404f9537acae050d0f71b48a03..0547abdfb9b9e0b2e4192471abbd11034e0de8bc 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1643,9 +1643,20 @@ print OUT "#define OPENSSL_CPUID_OBJ\n\n" if ($cpuid_obj);
 while (<IN>)
        {
        if      (/^#define\s+OPENSSLDIR/)
-               { print OUT "#define OPENSSLDIR \"$openssldir\"\n"; }
+               {
+               my $foo = $openssldir;
+               $foo =~ s/\\/\\\\/g;
+               print OUT "#define OPENSSLDIR \"$foo\"\n";
+               }
        elsif   (/^#define\s+ENGINESDIR/)
-               { print OUT "#define ENGINESDIR \"$prefix/lib/engines\"\n"; }
+               {
+               # $foo is to become "$prefix/lib$multilib/engines";
+               # as Makefile.org and engines/Makefile are adapted for
+               # $multilib suffix.
+               my $foo = "$prefix/lib/engines";
+               $foo =~ s/\\/\\\\/g;
+               print OUT "#define ENGINESDIR \"$foo\"\n";
+               }
        elsif   (/^#((define)|(undef))\s+OPENSSL_EXPORT_VAR_AS_FUNCTION/)
                { printf OUT "#undef OPENSSL_EXPORT_VAR_AS_FUNCTION\n"
                        if $export_var_as_fn;