diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-12-16 16:51:40 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-12-16 16:51:40 -0800 |
commit | adee8a65c46c101249a665ad34bad70fcd8b0deb (patch) | |
tree | 2fcd8c477ae64ee6a3c538620a7a7a353c602133 /configure.in | |
parent | f3b316df6114d1b93d3b69c59802148d9656c4d4 (diff) | |
download | emacs-adee8a65c46c101249a665ad34bad70fcd8b0deb.tar.gz |
Port HAVE_PTHREAD configuration to MirBSD 10 (Bug#10201).
* configure.in (HAVE_PTHREAD): Check for pthread_atforkif linking
to gmalloc.c. This should prevent a MirBSD 10 build failure reported
by Nelson H. F. Beebe in
<http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00065.html>.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.in b/configure.in index b4bb8eb708c..83acc82064e 100644 --- a/configure.in +++ b/configure.in @@ -1720,7 +1720,15 @@ dnl Check if pthreads is available. LIB_PTHREAD= AC_CHECK_HEADERS(pthread.h) if test "$ac_cv_header_pthread_h"; then - AC_CHECK_LIB(pthread, pthread_self, HAVE_PTHREAD=yes) + dnl gmalloc.c uses pthread_atfork, which is not available on older-style + dnl hosts such as MirBSD 10, so test for pthread_atfork instead of merely + dnl testing for pthread_self if Emacs uses gmalloc.c. + if test "$GMALLOC_OBJ" = gmalloc.o; then + emacs_pthread_function=pthread_atfork + else + emacs_pthread_function=pthread_self + fi + AC_CHECK_LIB(pthread, $emacs_pthread_function, HAVE_PTHREAD=yes) fi if test "$HAVE_PTHREAD" = yes; then case "${canonical}" in |