diff --git a/racket/src/configure b/racket/src/configure index ad1f2f8add..9e1b296e8b 100755 --- a/racket/src/configure +++ b/racket/src/configure @@ -3075,6 +3075,7 @@ show_explicitly_enabled "${enable_extflonum}" "Extflonums" show_explicitly_disabled "${enable_extflonum}" "Extflonums" show_explicitly_enabled "${enable_pthread}" "pthreads" +show_explicitly_disabled "${enable_pthread}" "pthreads" show_explicitly_enabled "${enable_ffipoll}" "ffipoll" show_explicitly_enabled "${enable_oskit}" "OSKit" show_explicitly_enabled "${enable_smalloskit}" "OSKit small mode" @@ -3217,6 +3218,7 @@ enable_strip_by_default=yes use_flag_pthread=yes use_flag_posix_pthread=no +mzrt_needs_pthread=yes skip_iconv_check=no check_page_size=yes try_no_nullability_completeness=no @@ -4672,6 +4674,7 @@ case "$host_os" in ;; *mingw*) enable_parallel_by_default=yes + mzrt_needs_pthread=no use_flag_pthread=no MZOPTIONS="$MZOPTIONS -fno-omit-frame-pointer" # to make JIT backtraces work MINGW="" @@ -4812,7 +4815,6 @@ $as_echo "#define HAVE_STDINT_H 1" >>confdefs.h NOT_OSX=".other" MZINSTALLTARGET=osx-install DYN_CFLAGS="" - enable_pthread=no if test "${enable_libfw}" = "yes" ; then FRAMEWORK_INSTALL_DIR=/Library/Frameworks FRAMEWORK_REL_INSTALL=no @@ -6375,7 +6377,13 @@ fi ############### OS threads ################### if test "${enable_mzrt}" = "yes" ; then - enable_pthread=yes + if test "${mzrt_needs_pthread}" = "yes" ; then + if test "${enable_pthread}" = "no" ; then + echo configure: cannot disable pthreads with places/futures enabled + exit 1 + fi + enable_pthread=yes + fi fi ############### pthread ################### @@ -6877,6 +6885,13 @@ if test "${enable_shared}" = "yes" ; then SUB_CONFIGURE_EXTRAS="$SUB_CONFIGURE_EXTRAS --enable-shared" fi +# Make sure the --enable-pthread result is propagated: +if test "${enable_pthread}" = "yes" ; then + SUB_CONFIGURE_EXTRAS="$SUB_CONFIGURE_EXTRAS --enable-pthread" +else + SUB_CONFIGURE_EXTRAS="$SUB_CONFIGURE_EXTRAS --disable-pthread" +fi + FOREIGNTARGET= FOREIGN_IF_USED="FOREIGN_NOT_USED" if test -d "${srcdir}/foreign" && test "${enable_foreign}" = "yes" ; then diff --git a/racket/src/racket/configure.ac b/racket/src/racket/configure.ac index 0305633c2a..d738ff7579 100644 --- a/racket/src/racket/configure.ac +++ b/racket/src/racket/configure.ac @@ -330,6 +330,7 @@ show_explicitly_enabled "${enable_extflonum}" "Extflonums" show_explicitly_disabled "${enable_extflonum}" "Extflonums" show_explicitly_enabled "${enable_pthread}" "pthreads" +show_explicitly_disabled "${enable_pthread}" "pthreads" show_explicitly_enabled "${enable_ffipoll}" "ffipoll" show_explicitly_enabled "${enable_oskit}" "OSKit" show_explicitly_enabled "${enable_smalloskit}" "OSKit small mode" @@ -472,6 +473,7 @@ enable_strip_by_default=yes use_flag_pthread=yes use_flag_posix_pthread=no +mzrt_needs_pthread=yes skip_iconv_check=no check_page_size=yes try_no_nullability_completeness=no @@ -780,6 +782,7 @@ case "$host_os" in ;; *mingw*) enable_parallel_by_default=yes + mzrt_needs_pthread=no use_flag_pthread=no MZOPTIONS="$MZOPTIONS -fno-omit-frame-pointer" # to make JIT backtraces work MINGW="" @@ -918,7 +921,6 @@ case "$host_os" in NOT_OSX=".other" MZINSTALLTARGET=osx-install DYN_CFLAGS="" - enable_pthread=no if test "${enable_libfw}" = "yes" ; then FRAMEWORK_INSTALL_DIR=/Library/Frameworks FRAMEWORK_REL_INSTALL=no @@ -1369,7 +1371,13 @@ fi ############### OS threads ################### if test "${enable_mzrt}" = "yes" ; then - enable_pthread=yes + if test "${mzrt_needs_pthread}" = "yes" ; then + if test "${enable_pthread}" = "no" ; then + echo configure: cannot disable pthreads with places/futures enabled + exit 1 + fi + enable_pthread=yes + fi fi ############### pthread ################### @@ -1810,6 +1818,13 @@ if test "${enable_shared}" = "yes" ; then SUB_CONFIGURE_EXTRAS="$SUB_CONFIGURE_EXTRAS --enable-shared" fi +# Make sure the --enable-pthread result is propagated: +if test "${enable_pthread}" = "yes" ; then + SUB_CONFIGURE_EXTRAS="$SUB_CONFIGURE_EXTRAS --enable-pthread" +else + SUB_CONFIGURE_EXTRAS="$SUB_CONFIGURE_EXTRAS --disable-pthread" +fi + FOREIGNTARGET= FOREIGN_IF_USED="FOREIGN_NOT_USED" if test -d "${srcdir}/foreign" && test "${enable_foreign}" = "yes" ; then diff --git a/racket/src/racket/src/port.c b/racket/src/racket/src/port.c index cb076bc3fb..0610be1ea2 100644 --- a/racket/src/racket/src/port.c +++ b/racket/src/racket/src/port.c @@ -36,6 +36,9 @@ #ifndef DONT_IGNORE_PIPE_SIGNAL # include #endif +#ifdef USE_ITIMER +# include +#endif #define mzAssert(x) /* if (!(x)) abort() */