summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2008-07-10 20:08:47 +0000
committerGeoff Thorpe <geoff@openssl.org>2008-07-10 20:08:47 +0000
commitf9afd9f861bc7b5fc1ae32ceff15572ef73cbbec (patch)
tree43b0de6f2258f7632b4a89f3a1a4ffb7917de2ea /Configure
parentd4cdbab99b8ead6ae2462d6b452f8b2462ca8733 (diff)
If --prefix="C:\foo\bar" is supplied to Configure for a windows target,
then the backslashes need escaping to avoid being treated as switches in the auto-generated strings in opensslconf.h. Perl users are welcome to suggest a less hokey way of doing this ...
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure12
1 files changed, 10 insertions, 2 deletions
diff --git a/Configure b/Configure
index 09c356da9d..67878ec5f6 100755
--- a/Configure
+++ b/Configure
@@ -1557,9 +1557,17 @@ print OUT "#define OPENSSL_CPUID_OBJ\n\n" if ($cpuid_obj ne "mem_clr.o");
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"; }
+ {
+ 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;