-
unknown authored
Change "configure.in". The branches for Tru64 (ex: OSF/1) and Linux are separated, and for Linux 'getconf GNU_LIBPTHREAD_VERSION' is used to tell between Linuxthreads and NPTL. configure.in: Step 3 of the switch to support configuration with NPTL: Change "configure.in". 1) Separate the branches checking for thread libraries on OSF/1 (now: Tru64) and on Linux, as these are different things. In the Tru64 branch, remove the obsolete part for OSF/1 3.2, because that is gone since long (about a decade?); we are at 5 now. Adapt the comment. 2) For Linux, the thread libraries are "Linuxthreads" (older) and "NPTL" (newer). Until now, we cared only about "Linuxthreads", and we did so by checking a comment in the header file '/usr/include/pthread.h'. With NPTL as an alternative or only thread package, this is not secure any more, there are distributions where the header file still contains that comment but the lib is NPTL. For all current distributions, the way to check is the 'getconf' command. On old distributions, 'getconf' exists but does not understand the 'GNU_LIBPTHREAD_VERSION' parameter. It is unlikely that such an old system should have NPTL, so the header file check is sufficient if the getconf inquiry fails. For both Linuxthreads and NPTL, '-lpthread' is the linker option to use. 3) To detect problems as early as possible, on Linux a link test using '-lpthread' is done. The code is copied from a later check where the thread functions are searched in '-lc', '-lpthread', and '-lpthreads', but this later search would not be executed after the lib was already determined. So if the test is not done here, it will be detected only during the real build. This is too late.
8a9c9881