mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Make better use of GNU Pth -- patch by Andy Dustman.
I can't test this, so I'm just checking it in with blind faith in Andy. I've tested that it doesn't broeak a non-Pth build on Linux. Changes include: - There's a --with-pth configure option. - Instead of _GNU_PTH, we test for HAVE_PTH. - Better signal handling. - (The config.h.in file is regenerated in a slightly different order.)
This commit is contained in:
parent
0344424793
commit
9e8181b809
7 changed files with 521 additions and 558 deletions
13
configure.in
13
configure.in
|
@ -745,6 +745,15 @@ else
|
|||
AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(C_THREADS)
|
||||
LIBOBJS="$LIBOBJS thread.o"],[
|
||||
AC_MSG_CHECKING(for --with-pth)
|
||||
AC_ARG_WITH(pth,
|
||||
[ --with-pth use GNU pth threading libraries], [
|
||||
AC_MSG_RESULT($withval)
|
||||
AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(HAVE_PTH)
|
||||
LIBS="-lpth $LIBS"
|
||||
LIBOBJS="$LIBOBJS thread.o"],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(_POSIX_THREADS)
|
||||
LIBS="-lpthread $LIBS"
|
||||
|
@ -767,10 +776,6 @@ else
|
|||
AC_DEFINE(_POSIX_THREADS)
|
||||
LIBS="$LIBS -lthread"
|
||||
LIBOBJS="$LIBOBJS thread.o"], [
|
||||
AC_CHECK_LIB(pth, pth_init, [AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(_GNU_PTH)
|
||||
LIBS="-lpth $LIBS"
|
||||
LIBOBJS="$LIBOBJS thread.o"],[
|
||||
AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(_POSIX_THREADS)
|
||||
LIBS="$LIBS -lcma"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue