1
Fork 0
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:
Marius Vollmer 2002-12-02 01:02:46 +00:00
parent 1d798a004a
commit 18622c4e84

View file

@ -639,73 +639,35 @@ fi
### What thread package has the user asked for? ### What thread package has the user asked for?
AC_ARG_WITH(threads, [ --with-threads thread interface], 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 case "$with_threads" in
"yes" | "qt" | "coop" | "") "yes" | "coop-pthread" | "copt" | "coop" | "")
with_threads=qt 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") "no" | "null")
with_threads=null AC_DEFINE(USE_NULL_THREADS, 1,
;; [Define if using one-thread 'multi'threading.])
"coop-pthreads" | "copt" ) with_threads="null-threads"
with_threads="coop-pthreads"
;; ;;
* ) * )
AC_MSG_ERROR(invalid value for --with-threads: $with_threads) AC_MSG_ERROR(invalid value for --with-threads: $with_threads)
;; ;;
esac esac
AC_MSG_CHECKING(what kind of threads to support)
AC_MSG_RESULT($with_threads) 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 ## Cross building
if test "$cross_compiling" = "yes"; then if test "$cross_compiling" = "yes"; then
AC_MSG_CHECKING(cc for build) AC_MSG_CHECKING(cc for build)
@ -864,10 +826,6 @@ AC_CONFIG_FILES([
oop/goops/Makefile oop/goops/Makefile
scripts/Makefile scripts/Makefile
srfi/Makefile srfi/Makefile
qt/Makefile
qt/qt.h
qt/md/Makefile
qt/time/Makefile
guile-config/Makefile guile-config/Makefile
doc/Makefile doc/Makefile
doc/ref/Makefile doc/ref/Makefile