aboutsummaryrefslogtreecommitdiff
path: root/config/acx_pthread.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/acx_pthread.m4')
-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 ceb161a556a..6ff241eba19 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.