On Thursday, July 14, 2005 at 16:14, Bruno Haible wrote: > dnl Survey of platforms: > dnl > dnl Platform Available Compiler Supports test-lock > dnl flavours option weak result > dnl --------------- --------- --------- -------- --------- > dnl Linux 2.4/glibc posix -lpthread Y OK [..]
http://autoconf-archive.cryp.to/acx_pthread.html uses a set of tests for pthread support. Some notes from it: -lpthreads AIX (must check this before -lpthread) (no flags) in case threads are in libc; should be tried before -Kthread and other compiler flags to prevent continual compiler warnings -Kthread Sequent (threads in libc, but -Kthread needed for pthread.h) -kthread FreeBSD kernel threads (preferred to -pthread since SMP-able) -llthread LinuxThreads port on FreeBSD (also preferred to -pthread) -pthread Linux/gcc (kernel threads), BSD/gcc (userland threads), etc. -pthreads Solaris/gcc -mthreads Mingw32/gcc, Lynx/gcc -mt Sun Workshop C (may only link SunOS threads [-lthread], but it doesn't hurt to check since this sometimes defines pthreads too; also defines -D_REENTRANT) --thread-safe KAI C++ GNU pth uses pth-config (or previously pthread-config) to determine compiler and linker flags. Does gcc prefer -pthread or -lpthread? Regards, Oskar Liljeblad ([EMAIL PROTECTED]) _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib