Commit 1afc51e4 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Assume pthread is available on linux & build with -pthread

parent 4b561b9b
......@@ -268,20 +268,11 @@ libgtestmain_la_SOURCES = \
googletest/src/gtest_main.cc
libgtest_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(top_srcdir)/googletest \
-I$(top_srcdir)/googletest/include
if HAVE_PTHREAD
libgtest_la_CPPFLAGS += -DGTEST_HAS_PTHREAD=1
libgtest_la_CXXFLAGS = $(PTHREAD_CFLAGS)
libgtest_la_LIDADD = $(PTHREAD_LIBS)
else
libgtest_la_CPPFLAGS += -DGTEST_HAS_PTHREAD=0
endif
libgtestmain_la_CPPFLAGS = $(libgtest_la_CPPFLAGS)
libgtestmain_la_CXXFLAGS = $(libgtest_la_CXXFLAGS)
libgtestmain_la_LIBADD = $(libgtest_la_LIBADD)
libgtestmain_la_CPPFLAGS = $(AM_CPPFLAGS) $(libgtest_la_CPPFLAGS)
unittest_SOURCES = \
test/common/MediaLibraryTester.cpp \
......@@ -326,7 +317,6 @@ unittest_LDADD = \
libmedialibrary.la \
libgtest.la \
libgtestmain.la \
$(PTHREAD_LIBS) \
$(SQLITE_LIBS) \
$(NULL)
......@@ -349,7 +339,6 @@ samples_LDADD = \
libmedialibrary.la \
libgtest.la \
libgtestmain.la \
$(PTHREAD_LIBS) \
$(SQLITE_LIBS) \
$(NULL)
......
......@@ -45,6 +45,7 @@ case "${host_os}" in
;;
linux*)
SYS=linux
CXXFLAGS="${CXXFLAGS} -pthread"
;;
bsdi*)
SYS=bsdi
......@@ -305,7 +306,6 @@ AM_CONDITIONAL([HAVE_LIBJPEG], [test "${have_libjpeg}" = "yes"])
AC_ARG_ENABLE(tests,AC_HELP_STRING([--disable-tests], [Disable build of automated tests suites]))
AM_CONDITIONAL([HAVE_TESTS], [test "${enable_tests}" = "yes"])
AS_IF([test "${enable_tests}" = "yes"], [
AX_PTHREAD([have_pthread=yes],[have_pthread=no])
PKG_CHECK_MODULES(RAPIDJSON, RapidJSON, [], [
# We need the .pc for cross compilation, but we don't consider it a failure
# when building natively, mostly because debian doesn't package the .pc
......@@ -316,7 +316,6 @@ AS_IF([test "${enable_tests}" = "yes"], [
fi
])
])
AM_CONDITIONAL([HAVE_PTHREAD], [test "${have_pthread}" = "yes"])
AH_BOTTOM([#include "Fixup.h"])
......
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