Lines Matching +full:no +full:- +full:threads
2 # http://www.gnu.org/software/autoconf-archive/ax_pthread.html
7 # AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
11 # This macro figures out how to build C programs using POSIX threads. It
12 # sets the PTHREAD_LIBS output variable to the threads library and linker
18 # multi-threaded programs (defaults to the value of CC otherwise). (This
25 # If you are only building threads programs, you may wish to use these
32 # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
40 # ACTION-IF-FOUND is a list of shell commands to run if a threads library
41 # is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
42 # is not found. If ACTION-IF-FOUND is not specified, the default action
91 ax_pthread_ok=no
98 # etcetera environment variables, and if threads linking works using
116 # We must check for the threads library under a number of different
118 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
119 # libraries is broken (non-POSIX).
121 # Create a list of thread flags to try. Items starting with a "-" are
123 # which indicates that we try without any flags at all, and "pthread-config"
126 ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --th…
131 # pthreads: AIX (must check this before -lpthread)
132 # none: in case threads are in libc; should be tried before -Kthread and
134 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
135 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
136 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
137 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
138 # -pthreads: Solaris/gcc
139 # -mthreads: Mingw32/gcc, Lynx/gcc
140 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
142 # also defines -D_REENTRANT)
143 # ... -mt is also the pthreads flag for HP/aCC
145 # --thread-safe: KAI C++
146 # pthread-config: use pthread-config program (for GNU Pth library)
152 # (non-functional) versions of the pthreads routines, so link-based
153 # tests will erroneously succeed. (We need to link with -pthreads/-mt/
154 # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
157 # we'll just look for -pthreads and -lpthread first:
159 ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
163 ax_pthread_flags="-pthread $ax_pthread_flags"
175 -*)
180 pthread-config)
181 AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
183 PTHREAD_CFLAGS="`pthread-config --cflags`"
184 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
188 AC_MSG_CHECKING([for the pthreads library -l$flag])
189 PTHREAD_LIBS="-l$flag"
200 # need a special flag -Kthread to make this header compile.)
201 # We check for pthread_join because it is in -lpthread on IRIX
203 # due to DEC craziness with -lpthreads. We check for
205 # functions on Solaris that doesn't have a non-functional libc stub.
252 uses a non-standard name on your system.])
256 flag=no
258 aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
259 osf* | hpux*) flag="-D_REENTRANT";;
262 flag="-D_REENTRANT"
264 flag="-mt -D_REENTRANT"
278 [ax_cv_PTHREAD_PRIO_INHERIT=no])
302 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
308 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
310 …ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files…
313 ax_pthread_ok=no