diff options
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/erts/configure.in b/erts/configure.in index b056ba44e2..00c7045ea2 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -150,6 +150,14 @@ AS_HELP_STRING([--disable-smp-support], [disable smp support]), *) enable_smp_support=yes ;; esac ], enable_smp_support=unknown) +AC_ARG_ENABLE(smp-require-native-atomics, + AS_HELP_STRING([--disable-smp-require-native-atomics], + [disable the SMP requirement of a native atomic implementation]), +[ case "$enableval" in + no) smp_require_native_atomics=no ;; + *) smp_require_native_atomics=yes ;; + esac ], smp_require_native_atomics=yes) + AC_ARG_WITH(termcap, AS_HELP_STRING([--with-termcap], [use termcap (default)]) AS_HELP_STRING([--without-termcap], @@ -1043,11 +1051,18 @@ if test $ERTS_BUILD_SMP_EMU = yes; then AC_DEFINE(ERTS_HAVE_SMP_EMU, 1, [Define if the smp emulator is built]) - case "$ethr_have_native_atomics-$ethr_have_native_spinlock" in + test "X$smp_require_native_atomics" = "Xyes" && + AC_DEFINE(ETHR_SMP_REQUIRE_NATIVE_IMPLS, 1, [Define if you want to enable check for native ethread implementations]) + + case "$ethr_have_native_atomics-$smp_require_native_atomics-$ethr_have_native_spinlock" in yes-*) ;; - no-yes) + no-yes-*) + AC_MSG_ERROR([No native atomic implementation found. See Configuring section in INSTALL.md for more information.]) + ;; + + no-no-yes) test -f "$ERL_TOP/erts/CONF_INFO" || echo "" > "$ERL_TOP/erts/CONF_INFO" @@ -1056,12 +1071,13 @@ if test $ERTS_BUILD_SMP_EMU = yes; then No native atomic implementation available. Fallbacks implemented using spinlocks will be used. Note that the performance of the SMP - runtime system will suffer due to this. + runtime system will suffer immensely due to + this. EOF ;; - no-no) + no-no-no) test -f "$ERL_TOP/erts/CONF_INFO" || echo "" > "$ERL_TOP/erts/CONF_INFO" @@ -1071,7 +1087,7 @@ EOF spinlock implementation available. Fallbacks implemented using mutexes will be used. Note that the performance of the SMP runtime system - will suffer much due to this. + will suffer immensely due to this. EOF ;; @@ -1663,6 +1679,10 @@ if test x"$ac_cv_header_netinet_sctp_h" = x"yes"; then ]) fi +dnl Check for setns +AC_CHECK_HEADERS(sched.h setns.h) +AC_CHECK_FUNCS([setns]) + HAVE_VALGRIND=no AC_CHECK_HEADER(valgrind/valgrind.h, HAVE_VALGRIND=yes) AC_SUBST(HAVE_VALGRIND) |