aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.shared2
-rwxr-xr-xutil/mkrc.pl9
2 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.shared b/Makefile.shared
index 29e180845a..26ea561a72 100644
--- a/Makefile.shared
+++ b/Makefile.shared
@@ -308,7 +308,7 @@ link_a.cygwin:
base=; [ $(LIBNAME) = "crypto" ] && base=-Wl,--image-base,0x63000000; \
fi; \
dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
- $(PERL) util/mkrc.pl $$dll_name | \
+ $(PERL) $(SRCDIR)/util/mkrc.pl $$dll_name | \
$(CROSS_COMPILE)windres $(SHARED_RCFLAGS) -o rc.o; \
extras="$$extras rc.o"; \
ALLSYMSFLAGS='-Wl,--whole-archive'; \
diff --git a/util/mkrc.pl b/util/mkrc.pl
index e20a50283c..8b74ff8adc 100755
--- a/util/mkrc.pl
+++ b/util/mkrc.pl
@@ -1,6 +1,13 @@
#!/bin/env perl
#
-open FD,"include/openssl/opensslv.h";
+
+use lib ".";
+use configdata;
+use File::Spec::Functions;
+
+my $versionfile = catfile($config{sourcedir},"include/openssl/opensslv.h");
+
+open FD, $versionfile or die "Couldn't open include/openssl/opensslv.h: $!\n";
while(<FD>) {
if (/OPENSSL_VERSION_NUMBER\s+(0x[0-9a-f]+)/i) {
$ver = hex($1);