r15928: When we search for clock_gettime, we might find it in librt, but librt
might pull in libpthread. This is quite bad, firstly because it can
cause oplock signals on Linux to go wonky, and secondly because merely
linking with pthreads can cause performance degradations due to implicit
locking requirements.
The solution is to only search for clock_gettime if --with-profiling-data
was specified. If we do end up searching for it, then we test whether
linking with librt pulled in libpthread, and we only allow the definition
for clock_gettime to succeed if libpthread was NOT linked in.
Problem reported by Thomas Bork and diagnosed by Volker Lendecke.
(This used to be commit
5712644fcc00939b9101b2e3143674d2cbdf1e12)