summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2011-02-16 23:06:36 +0200
committerPeter Eisentraut <peter_e@gmx.net>2011-02-16 23:15:54 +0200
commitf0053845326e9eba290c78162ef355558cd2fc46 (patch)
treed532669fc9a5fa6258f1f895effb332d843b9533 /config
parent66d6b4cb54eb3b192c8f9087592e53c53c20cf06 (diff)
downloadpostgresql-f0053845326e9eba290c78162ef355558cd2fc46.tar.gz
Better support for thread-support flag detection with clang
When testing the stderr produced by various thread-support flags, also run a compilation in addition to a link, because clang warns on certain flags when compiling but not when linking.
Diffstat (limited to 'config')
-rw-r--r--config/acx_pthread.m43
1 files changed, 2 insertions, 1 deletions
diff --git a/config/acx_pthread.m4 b/config/acx_pthread.m4
index ceb161a556..6ff241eba1 100644
--- a/config/acx_pthread.m4
+++ b/config/acx_pthread.m4
@@ -142,7 +142,8 @@ main (int argc, char **argv)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
- if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
+ # Check both linking and compiling, because they might tolerate different options.
+ if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
# we continue with more flags because Linux needs -lpthread
# for libpq builds on PostgreSQL. The test above only
# tests for building binaries, not shared libraries.