fix configure wrt places/futures vs. pthreads enabled state

This commit is contained in:
Matthew Flatt 2017-06-19 10:55:44 -06:00
parent 68f55f5b85
commit 9bf68adbb0
3 changed files with 37 additions and 4 deletions

19
racket/src/configure vendored
View File

@ -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

View File

@ -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

View File

@ -36,6 +36,9 @@
#ifndef DONT_IGNORE_PIPE_SIGNAL
# include <signal.h>
#endif
#ifdef USE_ITIMER
# include <sys/time.h>
#endif
#define mzAssert(x) /* if (!(x)) abort() */