mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
Do not configure QTHREADS. Do not define USE_COOP_THREADS. Changed
logic for thread package selection so that the default is "coop-pthread" when -lpthread is found, "null" otherwise.
This commit is contained in:
parent
1d798a004a
commit
18622c4e84
1 changed files with 18 additions and 60 deletions
78
configure.in
78
configure.in
|
@ -639,73 +639,35 @@ fi
|
|||
|
||||
### What thread package has the user asked for?
|
||||
AC_ARG_WITH(threads, [ --with-threads thread interface],
|
||||
, with_threads=no)
|
||||
, with_threads=yes)
|
||||
|
||||
### Turn $with_threads into either the name of a threads package, like
|
||||
### `qt', or `no', meaning that threads should not be supported.
|
||||
AC_MSG_CHECKING(what kind of threads to support)
|
||||
case "$with_threads" in
|
||||
"yes" | "qt" | "coop" | "")
|
||||
with_threads=qt
|
||||
"yes" | "coop-pthread" | "copt" | "coop" | "")
|
||||
AC_CHECK_LIB(pthread, main,
|
||||
LIBS="-lpthread $LIBS"
|
||||
AC_DEFINE(USE_COPT_THREADS, 1,
|
||||
[Define if using coop-pthread multithreading.])
|
||||
with_threads="coop-pthreads",
|
||||
with_threads="null")
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$with_threads" in
|
||||
"coop-pthreads")
|
||||
;;
|
||||
"no" | "null")
|
||||
with_threads=null
|
||||
;;
|
||||
"coop-pthreads" | "copt" )
|
||||
with_threads="coop-pthreads"
|
||||
AC_DEFINE(USE_NULL_THREADS, 1,
|
||||
[Define if using one-thread 'multi'threading.])
|
||||
with_threads="null-threads"
|
||||
;;
|
||||
* )
|
||||
AC_MSG_ERROR(invalid value for --with-threads: $with_threads)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(what kind of threads to support)
|
||||
AC_MSG_RESULT($with_threads)
|
||||
|
||||
## Make sure the threads package we've chosen is actually supported on
|
||||
## the present platform.
|
||||
case "${with_threads}" in
|
||||
"qt" )
|
||||
## This configures the QuickThreads package, and sets or clears
|
||||
## the THREAD_PACKAGE variable if qthreads don't configure
|
||||
## correctly. In that case, we fall back on null-threads.
|
||||
QTHREADS_CONFIGURE
|
||||
;;
|
||||
* )
|
||||
THREAD_PACKAGE="${with_threads}"
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${THREAD_PACKAGE}" in
|
||||
"QT" )
|
||||
AC_DEFINE(USE_COOP_THREADS, 1,
|
||||
[Define if using cooperative multithreading.])
|
||||
|
||||
AC_ARG_ENABLE(linuxthreads,
|
||||
[ --disable-linuxthreads disable linuxthreads workaround],,
|
||||
enable_linuxthreads=yes)
|
||||
|
||||
## Workaround for linuxthreads (optionally disabled)
|
||||
if test $host_os = linux-gnu -a "$enable_linuxthreads" = yes; then
|
||||
AC_DEFINE(GUILE_PTHREAD_COMPAT, 1,
|
||||
[Define to enable workaround for COOP-linuxthreads compatibility.])
|
||||
AC_CHECK_LIB(pthread, main)
|
||||
fi
|
||||
|
||||
;;
|
||||
"null" | "" )
|
||||
AC_DEFINE(USE_NULL_THREADS, 1,
|
||||
[Define if using one-thread 'multi'threading.])
|
||||
;;
|
||||
"coop-pthreads" )
|
||||
AC_DEFINE(USE_COPT_THREADS, 1,
|
||||
[Define if using coop-pthread multithreading.])
|
||||
AC_CHECK_LIB(pthread, main)
|
||||
;;
|
||||
* )
|
||||
AC_MSG_ERROR(invalid value for THREAD_PACKAGE: ${THREAD_PACKAGE})
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
## Cross building
|
||||
if test "$cross_compiling" = "yes"; then
|
||||
AC_MSG_CHECKING(cc for build)
|
||||
|
@ -864,10 +826,6 @@ AC_CONFIG_FILES([
|
|||
oop/goops/Makefile
|
||||
scripts/Makefile
|
||||
srfi/Makefile
|
||||
qt/Makefile
|
||||
qt/qt.h
|
||||
qt/md/Makefile
|
||||
qt/time/Makefile
|
||||
guile-config/Makefile
|
||||
doc/Makefile
|
||||
doc/ref/Makefile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue