Skip to content
  • Max Horn's avatar
    configure.ac: fix pthreads detection on Mac OS X · e0a52279
    Max Horn authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarMax Horn <max@quendi.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    e0a52279