--- Makefile.am.orig 2020-08-23 13:47:57 UTC +++ Makefile.am @@ -357,8 +357,7 @@ test_unit_test_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(srcdir)/src/zimg \ -I$(srcdir)/test \ - -I$(srcdir)/test/extra \ - -I$(srcdir)/test/extra/googletest/googletest/include + -I$(srcdir)/test/extra test_unit_test_SOURCES = \ test/main.cpp \ @@ -367,9 +366,6 @@ test_unit_test_SOURCES = \ test/colorspace/gamma_test.cpp \ test/depth/depth_convert_test.cpp \ test/depth/dither_test.cpp \ - test/extra/sha1/config.h \ - test/extra/sha1/sha1.c \ - test/extra/sha1/sha1.h \ test/graph/audit_buffer.cpp \ test/graph/audit_buffer.h \ test/graph/filter_validator.cpp \ @@ -426,7 +422,7 @@ test/extra/googletest/build/lib/libgtest.a: .FAKE .FAKE: test_unit_test_LDADD = \ - test/extra/googletest/build/lib/libgtest.a \ + -lgtest -lmd -lpthread \ test/libmusl_m.la \ libzimg_internal.la endif # UNIT_TEST --- configure.ac.orig 2020-08-23 13:47:57 UTC +++ configure.ac @@ -45,11 +45,6 @@ AS_IF([test "x$enable_unit_test" = "xyes"], [i?86], [CFLAGS="$CFLAGS -mfpmath=sse -msse2" CXXFLAGS="$CXXFLAGS -mfpmath=sse -msse2"], [x86_64], [], [AC_MSG_WARN([Could not determine how to enable IEEE-754 compliance on host. Tests may fail.])]) - - AC_CHECK_PROG([CMAKE], [cmake], [cmake]) - AS_MKDIR_P([test/extra/googletest/build]) - AS_IF([(cd "test/extra/googletest/build" && $CMAKE -Dgtest_disable_pthreads=ON "$ac_abs_confdir/test/extra/googletest")], - [], [AC_MSG_ERROR([CMake error])]) ]) --- test/graph/filter_validator.cpp.orig 2016-01-22 18:12:28 UTC +++ test/graph/filter_validator.cpp @@ -14,7 +14,14 @@ #include "gtest/gtest.h" extern "C" { +#ifdef _WIN32 #include "sha1/sha1.h" +#else // assume openssl or libmd + #include + #define SHA1Init SHA1_Init + #define SHA1Update SHA1_Update + #define SHA1Final SHA1_Final +#endif } #include "audit_buffer.h"