mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-04 03:00:20 +02:00
Shuffled around and extended the thread configuration code to allow
the "null" thread package to be selected. Define USE_NULL_THREADS in that case.
This commit is contained in:
parent
028e573c8a
commit
afcfb9df4d
1 changed files with 29 additions and 17 deletions
46
configure.in
46
configure.in
|
@ -643,6 +643,8 @@ case "$with_threads" in
|
||||||
"yes" | "qt" | "coop" | "")
|
"yes" | "qt" | "coop" | "")
|
||||||
with_threads=qt
|
with_threads=qt
|
||||||
;;
|
;;
|
||||||
|
"null" )
|
||||||
|
;;
|
||||||
"no" )
|
"no" )
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
|
@ -660,12 +662,16 @@ case "${with_threads}" in
|
||||||
## correctly.
|
## correctly.
|
||||||
QTHREADS_CONFIGURE
|
QTHREADS_CONFIGURE
|
||||||
;;
|
;;
|
||||||
|
"null" )
|
||||||
|
THREAD_PACKAGE="null"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
## If we're using threads, bring in some other parts of Guile which
|
## If we're using threads, bring in some other parts of Guile which
|
||||||
## work with them.
|
## work with them.
|
||||||
if test "${THREAD_PACKAGE}" != "" ; then
|
if test "${THREAD_PACKAGE}" != "" ; then
|
||||||
AC_DEFINE(USE_THREADS, 1, [Define if using any sort of threads.])
|
AC_DEFINE(USE_THREADS, 1, [Define if providing the thread API.])
|
||||||
|
|
||||||
## Include the Guile thread interface in the library...
|
## Include the Guile thread interface in the library...
|
||||||
AC_LIBOBJ([threads])
|
AC_LIBOBJ([threads])
|
||||||
|
@ -675,28 +681,34 @@ if test "${THREAD_PACKAGE}" != "" ; then
|
||||||
"QT" )
|
"QT" )
|
||||||
AC_DEFINE(USE_COOP_THREADS, 1,
|
AC_DEFINE(USE_COOP_THREADS, 1,
|
||||||
[Define if using cooperative multithreading.])
|
[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
|
||||||
|
|
||||||
|
## Bring in scm_internal_select, if appropriate.
|
||||||
|
if test $ac_cv_func_gettimeofday = yes &&
|
||||||
|
test $ac_cv_func_select = yes; then
|
||||||
|
AC_DEFINE(GUILE_ISELECT, 1, [Define to implement scm_internal_select.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
"null" )
|
||||||
|
AC_DEFINE(USE_NULL_THREADS, 1,
|
||||||
|
[Define if using one-thread 'multi'threading.])
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
AC_MSG_ERROR(invalid value for THREAD_PACKAGE: ${THREAD_PACKAGE})
|
AC_MSG_ERROR(invalid value for THREAD_PACKAGE: ${THREAD_PACKAGE})
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
## Bring in scm_internal_select, if appropriate.
|
|
||||||
if test $ac_cv_func_gettimeofday = yes &&
|
|
||||||
test $ac_cv_func_select = yes; then
|
|
||||||
AC_DEFINE(GUILE_ISELECT, 1, [Define to implement scm_internal_select.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Cross building
|
## Cross building
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue