configure.ac: Enhance compiler checks for pthreads
authorChris Dickens <christopher.a.dickens@gmail.com>
Thu, 9 Apr 2020 19:05:16 +0000 (12:05 -0700)
committerChris Dickens <christopher.a.dickens@gmail.com>
Thu, 9 Apr 2020 19:05:16 +0000 (12:05 -0700)
commit33b3ba3fc71ada906bfeb05eee937661c32b2877
treecfed2960c7840c9e36e9ea0d814f8d4c4ea00735
parent6f0330c78467bb9b5154ffb1859f6b9850235b7a
configure.ac: Enhance compiler checks for pthreads

There apparently exist some compiler ports (e.g Haiku's GCC) that do not
support the ubiquitous '-pthread' compiler option. Add a check for this
and only use the option if supported.

Also tweak the check for the pthread library to check for the
pthread_create() function. Even though libusb does not use this function,
it seems to be sufficiently distinct such that the standard C library
would not provide this directly if the pthread implementation resided in
a separate library. Also explicitly check whether no additional library
linkage is required.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
configure.ac
libusb/version_nano.h