Add support for RC / WINDRES env variables
authorRichard Levitte <levitte@openssl.org>
Mon, 16 May 2016 15:10:16 +0000 (17:10 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 17 May 2016 15:18:25 +0000 (17:18 +0200)
RT#2558

Reviewed-by: Matt Caswell <matt@openssl.org>
Configure
Makefile.org
Makefile.shared

index c98107a487188f067aa8113e7a4edfebd45351f2..3a772760c8c40674c85e11a50832b00e5d6cf241 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1254,6 +1254,7 @@ my $shared_extension = $fields[$idx_shared_extension];
 my $ranlib = $ENV{'RANLIB'} || $fields[$idx_ranlib];
 my $ar = $ENV{'AR'} || "ar";
 my $arflags = $fields[$idx_arflags];
+my $windres = $ENV{'RC'} || $ENV{'WINDRES'} || "windres";
 my $multilib = $fields[$idx_multilib];
 
 # if $prefix/lib$multilib is not an existing directory, then
@@ -1717,12 +1718,14 @@ while (<IN>)
                s/^AR=\s*/AR= \$\(CROSS_COMPILE\)/;
                s/^NM=\s*/NM= \$\(CROSS_COMPILE\)/;
                s/^RANLIB=\s*/RANLIB= \$\(CROSS_COMPILE\)/;
+               s/^RC=\s*/RC= \$\(CROSS_COMPILE\)/;
                s/^MAKEDEPPROG=.*$/MAKEDEPPROG= \$\(CROSS_COMPILE\)$cc/ if $cc eq "gcc";
                }
        else    {
                s/^CC=.*$/CC= $cc/;
                s/^AR=\s*ar/AR= $ar/;
                s/^RANLIB=.*/RANLIB= $ranlib/;
+               s/^RC=.*/RC= $windres/;
                s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc";
                s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang";
                }
index 76fdbdf6ac5c2a015a387e6671e4bc532ab188b9..bda6c0940e7a312df6632053b1f6519c66115106 100644 (file)
@@ -66,6 +66,7 @@ EXE_EXT=
 ARFLAGS=
 AR=ar $(ARFLAGS) r
 RANLIB= ranlib
+RC= windres
 NM= nm
 PERL= perl
 TAR= tar
@@ -208,6 +209,7 @@ BUILDENV=   LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
                CC='$(CC)' CFLAG='$(CFLAG)'                     \
                AS='$(CC)' ASFLAG='$(CFLAG) -c'                 \
                AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)'        \
+               RC='$(RC)'                                      \
                CROSS_COMPILE='$(CROSS_COMPILE)'        \
                PERL='$(PERL)' ENGDIRS='$(ENGDIRS)'             \
                SDIRS='$(SDIRS)' LIBRPATH='$(INSTALLTOP)/$(LIBDIR)'     \
index a2aa9804c1d98d61b8de4dddb4ad01386cc87b6e..e8d222ac6a0067c03b73f72953242c34c8089eed 100644 (file)
@@ -293,7 +293,7 @@ link_a.cygwin:
        fi; \
        dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
        $(PERL) util/mkrc.pl $$dll_name | \
-               $(CROSS_COMPILE)windres -o rc.o; \
+               $(RC) -o rc.o; \
        extras="$$extras rc.o"; \
        ALLSYMSFLAGS='-Wl,--whole-archive'; \
        NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \