Lines Matching +full:multi +full:- +full:functional

1 ##### http://autoconf-archive.cryp.to/acx_pthread.html
5 # ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
17 # multi-threaded programs (defaults to the value of CC otherwise).
32 # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
36 # ACTION-IF-FOUND is a list of shell commands to run if a threads
37 # library is found, and ACTION-IF-NOT-FOUND is a list of commands to
38 # run it if it is not found. If ACTION-IF-FOUND is not specified, the
51 # 2007-07-29
117 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
118 # libraries is broken (non-POSIX).
120 # Create a list of thread flags to try. Items starting with a "-" are
122 # which indicates that we try without any flags at all, and "pthread-config"
125 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
130 # pthreads: AIX (must check this before -lpthread)
131 # none: in case threads are in libc; should be tried before -Kthread and
133 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
134 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
135 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
136 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
137 # -pthreads: Solaris/gcc
138 # -mthreads: Mingw32/gcc, Lynx/gcc
139 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
141 # also defines -D_REENTRANT)
142 # ... -mt is also the pthreads flag for HP/aCC
144 # --thread-safe: KAI C++
145 # pthread-config: use pthread-config program (for GNU Pth library)
147 case "${host_cpu}-${host_os}" in
151 # (non-functional) versions of the pthreads routines, so link-based
152 # tests will erroneously succeed. (We need to link with -pthreads/-mt/
153 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
156 # we'll just look for -pthreads and -lpthread first:
158 acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
170 -*)
175 pthread-config)
176 AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
178 PTHREAD_CFLAGS="`pthread-config --cflags`"
179 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
183 AC_MSG_CHECKING([for the pthreads library -l$flag])
184 PTHREAD_LIBS="-l$flag"
195 # need a special flag -Kthread to make this header compile.)
196 # We check for pthread_join because it is in -lpthread on IRIX
198 # due to DEC craziness with -lpthreads. We check for
200 # functions on Solaris that doesn't have a non-functional libc stub.
239 uses a non-standard name on your system.])
244 case "${host_cpu}-${host_os}" in
245 *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
246 *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
270 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: