2 Implement a trivial subset of the pthreads library.
16 AC_DEFINE([_REENTRANT], 1, [For thread-safety on OSF/1, Solaris.])
17 AC_DEFINE([_THREAD_SAFE], 1, [For thread-safety on AIX, FreeBSD.])
21 gl_MODULE_INDICATOR([pthread])
24 BUILT_SOURCES += $(PTHREAD_H)
26 # We need the following in order to create <pthread.h> when the system
27 # doesn't have one that works with the given compiler.
28 if GL_GENERATE_PTHREAD_H
29 pthread.h: pthread.in.h $(top_builddir)/config.status
30 $(AM_V_GEN)rm -f $@-t $@ && \
31 { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
32 sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
33 -e 's|@''HAVE_PTHREAD_H''@|$(HAVE_PTHREAD_H)|g' \
34 -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
35 -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
36 -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
37 -e 's|@''NEXT_PTHREAD_H''@|$(NEXT_PTHREAD_H)|g' \
38 -e 's|@''HAVE_PTHREAD_T''@|$(HAVE_PTHREAD_T)|g' \
39 -e 's|@''HAVE_PTHREAD_SPINLOCK_T''@|$(HAVE_PTHREAD_SPINLOCK_T)|g' \
40 < $(srcdir)/pthread.in.h; \
44 pthread.h: $(top_builddir)/config.status
47 MOSTLYCLEANFILES += pthread.h pthread.h-t
59 Glen Lenker and Paul Eggert