]> git.ipfire.org Git - thirdparty/git.git/commit - configure.ac
configure.ac: fix pthreads detection on Mac OS X
authorMax Horn <max@quendi.de>
Tue, 27 Nov 2012 23:28:51 +0000 (00:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Nov 2012 06:33:50 +0000 (22:33 -0800)
commite0a52279304a67d6e13c5a5b4165dd09f6ba61aa
tree7e75493099786de10f80f77924ae3fd3559aa7b1
parent86ef7b37f921dccff6d940fb17005e0906a2bf3e
configure.ac: fix pthreads detection on Mac OS X

The configure script checks whether certain flags are required to use
pthreads. But it did not consider that *none* might be needed (as is the
case on Mac OS X). This lead to configure adding "-mt" to the list of
flags (which does nothing on OS X except producing a warning). This in
turn triggered a compiler warning on every single file.

To solve this, we now first check if pthreads work without extra flags.
This means the check is now order dependant, hence a comment is added
explaining this, and the reasons for it.

Note that it might be possible to write an order independent test, but
it does not seem worth the extra effort required for implementing and
testing such a solution, when this simple solution exists and works.

Signed-off-by: Max Horn <max@quendi.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
configure.ac