git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Horn <max@quendi.de>
To: git@vger.kernel.org
Cc: Max Horn <max@quendi.de>
Subject: [PATCH] Change configure to check if pthreads are usable without any extra flags
Date: Fri,  6 Jul 2012 01:03:06 +0200	[thread overview]
Message-ID: <1341529386-11589-1-git-send-email-max@quendi.de> (raw)

The configure script checks whether certain flags / libraries are
required to use pthreads. But so far it did not consider the possibility
that no extra compiler flags are needed (as is the case on Mac OS X). As
a result, configure would always add "-mt" to the list of flags. This in
turn triggered a warning in clang about an unknown argument.
To solve this, we now first check if pthreads work without extra flags.

Signed-off-by: Max Horn <max@quendi.de>
---
 configure.ac | 2 +-
 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/configure.ac b/configure.ac
index 4e9012f..d767ef3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1002,7 +1002,7 @@ if test -n "$USER_NOPTHREAD"; then
 # -D_REENTRANT' or some such.
 elif test -z "$PTHREAD_CFLAGS"; then
   threads_found=no
-  for opt in -mt -pthread -lpthread; do
+  for opt in "" -mt -pthread -lpthread; do
      old_CFLAGS="$CFLAGS"
      CFLAGS="$opt $CFLAGS"
      AC_MSG_CHECKING([Checking for POSIX Threads with '$opt'])
-- 
1.7.11.1.145.g4722b29.dirty

             reply	other threads:[~2012-07-05 23:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-05 23:03 Max Horn [this message]
2012-07-09 14:50 ` [PATCH] Change configure to check if pthreads are usable without any extra flags Junio C Hamano
2012-07-09 15:39   ` Max Horn
2012-07-09 17:44     ` Junio C Hamano
2012-07-09 18:31       ` Max Horn
2012-07-09 19:23         ` Junio C Hamano
2012-07-09 21:44           ` Max Horn
2012-07-09 22:38             ` Junio C Hamano
2012-07-10  9:52               ` Max Horn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1341529386-11589-1-git-send-email-max@quendi.de \
    --to=max@quendi.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).