Makefile: Workaround gtest-config not being installed.
Upstream googletest is dropping autotools support and the cmake
installer does not provide gtest-config.
Bug: crbug.com/940320
Test: minijail unit tests pass on CrOS
Change-Id: I8e38e1b2d1601eaaf9c8ce00879412dd5089e44e
diff --git a/Makefile b/Makefile
index b2c5569..4bfa820 100644
--- a/Makefile
+++ b/Makefile
@@ -46,8 +46,10 @@
GTEST_CXXFLAGS := -std=gnu++14
GTEST_LIBS := gtest.a
else
-GTEST_CXXFLAGS := $(shell gtest-config --cxxflags)
-GTEST_LIBS := $(shell gtest-config --libs)
+GTEST_CXXFLAGS := $(shell gtest-config --cxxflags 2>/dev/null || \
+ echo "-pthread")
+GTEST_LIBS := $(shell gtest-config --libs 2>/dev/null || \
+ echo "-lgtest -pthread -lpthread")
endif
CORE_OBJECT_FILES := libminijail.o syscall_filter.o signal_handler.o \