diff options
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 132 |
1 files changed, 81 insertions, 51 deletions
diff --git a/erts/configure.in b/erts/configure.in index 5fa1245b13..5d02fd1ee4 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -61,6 +61,9 @@ if test x"${ERL_TOP}/erts" != x"$srcdir"; then fi erl_top=${ERL_TOP} +# Remove old configuration information +/bin/rm -f "$ERL_TOP/erts/CONF_INFO" + # echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # echo X # echo "X srcdir = $srcdir" @@ -123,6 +126,14 @@ AC_ARG_ENABLE(threads, *) enable_threads=yes ;; esac ], enable_threads=unknown) +AC_ARG_ENABLE(halfword-emulator, +[ --enable-halfword-emulator enable halfword emulator (only for 64bit builds) + --disable-halfword-emulator disable halfword emulator (only for 64bit builds)], +[ case "$enableval" in + no) enable_halfword_emualtor=no ;; + *) enable_halfword_emulator=yes ;; + esac ], enable_halfword_emulator=unknown) + AC_ARG_ENABLE(smp-support, [ --enable-smp-support enable smp support --disable-smp-support disable smp support], @@ -190,9 +201,6 @@ AC_ARG_ENABLE(native-libs, AC_ARG_ENABLE(tsp, [ --enable-tsp compile tsp app]) -AC_ARG_ENABLE(elib-malloc, -[ --enable-elib-malloc use elib_malloc instead of normal malloc]) - AC_ARG_ENABLE(fp-exceptions, [ --enable-fp-exceptions Use hardware floating point exceptions (default if hipe enabled)], [ case "$enableval" in @@ -269,20 +277,6 @@ AC_ARG_ENABLE(clock-gettime, *) clock_gettime_correction=yes ;; esac ], clock_gettime_correction=unknown) -AC_ARG_ENABLE(native-ethr-impls, -[ --enable-native-ethr-impls enable native ethread implementations - --disable-native-ethr-impls disable native ethread implementations], -[ case "$enableval" in - no) disable_native_ethr_impls=yes ;; - *) disable_native_ethr_impls=no ;; - esac ], disable_native_ethr_impls=no) - -dnl Defined in libraries/megaco/configure.in but we need it here -dnl also in order to show it to the "top user" - -AC_ARG_ENABLE(megaco_flex_scanner_lineno, -[ --disable-megaco-flex-scanner-lineno disable megaco flex scanner lineno]) - dnl Magic test for clearcase. OTP_RELEASE= if test "${ERLANG_COMMERCIAL_BUILD}" != ""; then @@ -749,6 +743,25 @@ esac AC_SUBST(LIBCARBON) +dnl Check if we should/can build a halfword emulator + +AC_MSG_CHECKING(if we are building a halfword emulator (32bit heap on 64bit machine)) +if test "$enable_halfword_emulator" = "yes"; then + if test "$ARCH" = "amd64"; then + AC_DEFINE(HALFWORD_HEAP_EMULATOR, [1], + [Define if building a halfword-heap 64bit emulator]) + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR(no; halfword emulator not supported on this architecture) + fi +else + AC_MSG_RESULT([no]) +fi + + + + + dnl some tests below will call this if we haven't already - and autoconf dnl can't handle those tests being done conditionally at runtime AC_PROG_CPP @@ -794,13 +807,14 @@ fi AC_CHECK_PROGS(XSLTPROC, xsltproc) if test -z "$XSLTPROC"; then echo "xsltproc" >> doc/CONF_INFO - AC_MSG_WARN([No 'xsltproc' command found: the documentation can not be built]) + AC_MSG_WARN([No 'xsltproc' command found: the documentation cannot be built]) fi AC_CHECK_PROGS(FOP, fop) if test -z "$FOP"; then + FOP="$ERL_TOP/make/fakefop" echo "fop" >> doc/CONF_INFO - AC_MSG_WARN([No 'fop' command found: the documentation can not be built]) + AC_MSG_WARN([No 'fop' command found: going to generate placeholder PDF files]) fi dnl @@ -1021,11 +1035,48 @@ if test $ERTS_BUILD_SMP_EMU = yes; then fi AC_DEFINE(ERTS_HAVE_SMP_EMU, 1, [Define if the smp emulator is built]) + + case "$ethr_have_native_atomics-$ethr_have_native_spinlock" in + yes-*) + ;; + + no-yes) + + test -f "$ERL_TOP/erts/CONF_INFO" || + echo "" > "$ERL_TOP/erts/CONF_INFO" + cat >> $ERL_TOP/erts/CONF_INFO <<EOF + + 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. + +EOF + ;; + + no-no) + + test -f "$ERL_TOP/erts/CONF_INFO" || + echo "" > "$ERL_TOP/erts/CONF_INFO" + cat >> "$ERL_TOP/erts/CONF_INFO" <<EOF + + No native atomic implementation, nor no native + 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. + +EOF + ;; + + esac + enable_threads=force fi AC_SUBST(ERTS_BUILD_SMP_EMU) +AC_CHECK_FUNCS([posix_fadvise]) # @@ -1120,17 +1171,15 @@ else enable_child_waiter_thread=yes ;; linux*) - AC_DEFINE(USE_RECURSIVE_MALLOC_MUTEX,[1], - [Define if malloc should use a recursive mutex]) AC_MSG_CHECKING([whether dlopen() needs to be called before first call to dlerror()]) - if test "x$ETHR_THR_LIB_BASE_NAME" != "xnptl"; then + if test "x$ETHR_THR_LIB_BASE_TYPE" != "xposix_nptl"; then AC_DEFINE(ERTS_NEED_DLOPEN_BEFORE_DLERROR,[1], [Define if dlopen() needs to be called before first call to dlerror()]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi - if test "x$ETHR_THR_LIB_BASE_NAME" != "xnptl"; then + if test "x$ETHR_THR_LIB_BASE_TYPE" != "xposix_nptl"; then # Child waiter thread cannot be enabled disable_child_waiter_thread=yes enable_child_waiter_thread=no @@ -1192,13 +1241,7 @@ fi AC_SUBST(EMU_LOCK_CHECKING) -ERTS_INTERNAL_X_LIBS= - -AC_CHECK_LIB(kstat, kstat_open, -[AC_DEFINE(HAVE_KSTAT, 1, [Define if you have kstat]) -ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat"]) - -AC_SUBST(ERTS_INTERNAL_X_LIBS) +ERL_INTERNAL_LIBS dnl THR_LIBS and THR_DEFS are only used by odbc THR_LIBS=$ETHR_X_LIBS @@ -1666,7 +1709,7 @@ AC_CHECK_FUNCS([getnameinfo getipnodebyname getipnodebyaddr gethostbyname2]) AC_CHECK_FUNCS([ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlopen \ pread pwrite writev memmove strerror strerror_r strncasecmp \ - gethrtime localtime_r gmtime_r mremap memcpy mallopt \ + gethrtime localtime_r gmtime_r mmap mremap memcpy mallopt \ sbrk _sbrk __sbrk brk _brk __brk \ flockfile fstat strlcpy strlcat setsid posix2time setlocale nl_langinfo poll]) if test "X$host" = "Xwin32"; then @@ -1698,7 +1741,6 @@ if test $disable_vfork = true; then fi AC_FUNC_VPRINTF -AC_FUNC_MMAP dnl The AC_DEFINEs are necessary for autoheader to work. :-( dnl for gzio @@ -1730,6 +1772,12 @@ fi dnl Need by run_erl. AC_CHECK_FUNCS([openpty]) +dnl fdatasync syscall (Unix only) +AC_CHECK_FUNCS([fdatasync]) + +dnl Find which C libraries are required to use fdatasync +AC_SEARCH_LIBS(fdatasync, [rt]) + dnl ---------------------------------------------------------------------- dnl Checks for features/quirks in the system that affects Erlang. dnl ---------------------------------------------------------------------- @@ -2883,7 +2931,7 @@ case $enable_hybrid_heap-$host_os in no-*) AC_MSG_RESULT([no; disabled by user]) ERTS_BUILD_HYBRID_EMU=no;; - *-win32|*-vxworks|*-ose) # vxworks and ose have their own "configure scripts"... + *-win32|*-vxworks) # vxworks have their own "configure scripts"... AC_MSG_RESULT([no; default on this platform]) ERTS_BUILD_HYBRID_EMU=no;; *) @@ -2946,17 +2994,6 @@ if test "x$HIPE_ENABLED" = "xyes" ; then fi # -# Check if we should use elib_malloc. -# - -if test X${enable_elib_malloc} = Xyes; then - AC_DEFINE(ENABLE_ELIB_MALLOC,[],[Define to enable use of elib_malloc (a malloc() replacement)]) - AC_DEFINE(ELIB_HEAP_SBRK,[],[Elib sbrk]) - AC_DEFINE(ELIB_ALLOC_IS_CLIB,[],[Use elib malloc as clib]) - AC_DEFINE(ELIB_SORTED_BLOCKS,[],[Define to enable the use of sorted blocks when using elib_malloc]) -fi - -# # Check for working poll(). # AC_MSG_CHECKING([for working poll()]) @@ -3702,13 +3739,6 @@ dnl so it is - be adoptable fi ;; *) - if test "$cross_compiling" = "yes"; then - case "$with_ssl" in - "$erl_xcomp_sysroot"*) ;; - *) AC_MSG_ERROR([Invalid path to option --with-ssl=PATH (not a subdirectory to cross system root)]);; - esac - fi - # Option given with PATH to package if test ! -d "$with_ssl" ; then AC_MSG_ERROR(Invalid path to option --with-ssl=PATH) |