Add conditional unit testing interface.
[oweals/openssl.git] / util / mk1mf.pl
index cbf845ae794196c0e225306259fe143d35901a5f..24302e12ea05c6a54785c80f58f98823332ad521 100755 (executable)
@@ -404,6 +404,14 @@ for (;;)
        }
 close(IN);
 
+if ($orig_platform eq 'copy')
+       {
+       # Remove opensslconf.h so it doesn't get updated if we configure a
+       # different branch.
+       $exheader =~ s/[^ ]+\/opensslconf.h//;
+       $header =~ s/[^ ]+\/opensslconf.h//;
+       }
+
 if ($shlib)
        {
        $extra_install= <<"EOF";
@@ -581,6 +589,7 @@ $banner
 # This needs to be invoked once, when the makefile is first constructed, or
 # after cleaning.
 init: \$(TMP_D) \$(LIB_D) \$(INC_D) \$(INCO_D) \$(BIN_D) \$(TEST_D) headers
+       \$(PERL) \$(SRC_D)/util/copy-if-different.pl "\$(SRC_D)/crypto/opensslconf.h" "\$(INCO_D)/opensslconf.h"
 
 headers: \$(HEADER) \$(EXHEADER)
 
@@ -1225,7 +1234,7 @@ sub read_options
                "no-zlib" => 0,
                "no-zlib-dynamic" => 0,
                "no-ssl-trace" => 0,
-               "no-dane" => 0,
+               "no-unit-test" => 0,
                "no-libunbound" => 0,
                "no-multiblock" => 0,
                "fips" => \$fips