Add support for shared_rcflag, useful for windres (Cygwin and Mingw)
[openssl.git] / Configure
index f617df5fbe30d6828a4712e785be386ec52f37df..d3800cbf77f469e97b83593c029c4beeea1e53ae 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -870,10 +870,10 @@ push @{$config{defines}},
     map { (my $x = $_) =~ s/^OPENSSL_NO_/OPENSSL_EXPERIMENTAL_/; $x }
         @{$config{openssl_experimental_defines}};
 
-if ($target =~ /^mingw/ && `$target{cc} --target-help 2>&1` !~ m/-mno-cygwin/m)
+if ($target =~ /^mingw/ && `$target{cc} --target-help 2>&1` =~ m/-mno-cygwin/m)
        {
-       $config{cflags} =~ s/-mno-cygwin\s*//;
-       $target{shared_ldflag} =~ s/-mno-cygwin\s*//;
+       $config{cflags} .= " -mno-cygwin";
+       $target{shared_ldflag} .= " -mno-cygwin";
        }
 
 if ($target =~ /linux.*-mips/ && !$no_asm && $user_cflags !~ /-m(ips|arch=)/) {
@@ -2180,6 +2180,7 @@ sub print_table_entry
        "shared_target",
        "shared_cflag",
        "shared_ldflag",
+       "shared_rcflag",
        "shared_extension",
        "obj_extension",
        "exe_extension",