Commit b46d58ad authored by Johann's avatar Johann
Browse files

Link pthread when it is available

Linking when we don't use it but it is available is probably harmless.

Gtest requires pthreads. Don't automatically enable unit tests if we
don't have it.

Change-Id: I5e6c3b609f840c7b6dbb36fc65809f0ef84685f8
parent 23963021
...@@ -655,7 +655,7 @@ process_toolchain() { ...@@ -655,7 +655,7 @@ process_toolchain() {
enabled postproc || die "postproc_visualizer requires postproc to be enabled" enabled postproc || die "postproc_visualizer requires postproc to be enabled"
fi fi
# Enable unit tests if we have a working C++ compiler # Enable unit tests by default if we have a working C++ compiler.
case "$toolchain" in case "$toolchain" in
*-vs*) *-vs*)
soft_enable unit_tests soft_enable unit_tests
...@@ -668,7 +668,7 @@ process_toolchain() { ...@@ -668,7 +668,7 @@ process_toolchain() {
# x86 targets. # x86 targets.
;; ;;
*) *)
check_cxx "$@" <<EOF && soft_enable unit_tests enabled pthread_h && check_cxx "$@" <<EOF && soft_enable unit_tests
int z; int z;
EOF EOF
;; ;;
......
...@@ -17,7 +17,6 @@ else ...@@ -17,7 +17,6 @@ else
ASM:=.asm ASM:=.asm
endif endif
# #
# Calculate platform- and compiler-specific offsets for hand coded assembly # Calculate platform- and compiler-specific offsets for hand coded assembly
# #
...@@ -327,7 +326,11 @@ vpx.pc: config.mk libs.mk ...@@ -327,7 +326,11 @@ vpx.pc: config.mk libs.mk
$(qexec)echo 'Requires:' >> $@ $(qexec)echo 'Requires:' >> $@
$(qexec)echo 'Conflicts:' >> $@ $(qexec)echo 'Conflicts:' >> $@
$(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@ $(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@
ifeq ($(HAVE_PTHREAD_H),yes)
$(qexec)echo 'Libs.private: -lm -lpthread' >> $@ $(qexec)echo 'Libs.private: -lm -lpthread' >> $@
else
$(qexec)echo 'Libs.private: -lm' >> $@
endif
$(qexec)echo 'Cflags: -I$${includedir}' >> $@ $(qexec)echo 'Cflags: -I$${includedir}' >> $@
INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc
INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment