summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alk@tut.by>2014-01-04 18:28:36 -0800
committerAliaksey Kandratsenka <alk@tut.by>2014-01-04 18:28:36 -0800
commit4c274b9e20132230e62117ff583ebadd83081d90 (patch)
treef1a7c7c269a465761f60819814fdb49110baaf6e /Makefile.am
parent1458ee2239e0791567e69112931dc17eb0456cf8 (diff)
downloadgperftools-4c274b9e20132230e62117ff583ebadd83081d90.tar.gz
issue-592: handle recent mingw with C++11 threads
Somehow it's c++ headers (like string) define pthread symbols without even us asking for. That breaks old assumption that pthread symbols are not available on windows. In order to fix that we detect this condition in configure.ac and avoid defining windows versions of pthread symbols.
Diffstat (limited to 'Makefile.am')
-rwxr-xr-xMakefile.am4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index b0a9dfb..caa19a7 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -264,7 +264,11 @@ libsysinfo_la_LIBADD += -lshlwapi
# patch_functions.cc #includes tcmalloc.cc, so no need to link it in.
TCMALLOC_CC =
# windows has its own system for threads and system memory allocation.
+if HAVE_PTHREAD_DESPITE_ASKING_FOR
+MAYBE_THREADS_CC = src/maybe_threads.cc
+else
MAYBE_THREADS_CC =
+endif
SYSTEM_ALLOC_CC =
else !MINGW
# spinlock is the only code that uses atomicops.