diff options
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 124 |
1 files changed, 67 insertions, 57 deletions
diff --git a/erts/configure.in b/erts/configure.in index ad9a66126f..2018e19b76 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -121,7 +121,6 @@ AS_HELP_STRING([--enable-bootstrap-only], enable_hipe=no enable_sctp=no enable_dirty_schedulers=no - enable_new_purge=no fi ]) @@ -140,13 +139,6 @@ AS_HELP_STRING([--enable-dirty-schedulers], [enable dirty scheduler support]), *) enable_dirty_schedulers=yes ;; esac ], enable_dirty_schedulers=default) -AC_ARG_ENABLE(new-purge-strategy, -AS_HELP_STRING([--enable-new-purge-strategy], [enable new code purge strategy]), -[ case "$enableval" in - no) enable_new_purge=no ;; - *) enable_new_purge=yes ;; - esac ], enable_new_purge=default) - AC_ARG_ENABLE(smp-support, AS_HELP_STRING([--enable-smp-support], [enable smp support]) AS_HELP_STRING([--disable-smp-support], [disable smp support]), @@ -541,6 +533,7 @@ if test "x$GCC" = xyes; then # Treat certain GCC warnings as errors LM_TRY_ENABLE_CFLAG([-Werror=return-type], [WERRORFLAGS]) LM_TRY_ENABLE_CFLAG([-Werror=implicit], [WERRORFLAGS]) + LM_TRY_ENABLE_CFLAG([-Werror=undef], [WERRORFLAGS]) # until the emulator can handle this, I suggest we turn it off! #WFLAGS="-Wall -Wshadow -Wcast-qual -Wmissing-declarations" @@ -1046,8 +1039,7 @@ case $ERTS_BUILD_SMP_EMU-$enable_dirty_schedulers in yes-yes) DIRTY_SCHEDULER_SUPPORT=yes;; yes-default) - ## Maybe yes for OTP 19... - DIRTY_SCHEDULER_SUPPORT=no;; + DIRTY_SCHEDULER_SUPPORT=yes;; no-default) DIRTY_SCHEDULER_SUPPORT=no;; no-yes) @@ -1058,27 +1050,6 @@ esac AC_MSG_RESULT($DIRTY_SCHEDULER_SUPPORT) AC_SUBST(DIRTY_SCHEDULER_SUPPORT) -AC_MSG_CHECKING(whether the new code purge strategy should be enabled) -case $enable_new_purge-$enable_dirty_schedulers in - yes-*) - AC_MSG_RESULT(yes) - enable_new_purge=yes;; - default-yes) - AC_MSG_RESULT(yes; forced by dirty scheduler support) - enable_new_purge=yes;; - no-yes) - AC_MSG_ERROR([Dirty schedulers enabled, but new code purge strategy disabled]);; - *) - AC_MSG_RESULT(no) - enable_new_purge=no;; -esac - -if test $enable_new_purge = yes; then - AC_DEFINE(ERTS_NEW_PURGE_STRATEGY, 1, [Define if you want to use the new code purge strategy]) -fi -NEW_PURGE_STRATEGY=$enable_new_purge -AC_SUBST(NEW_PURGE_STRATEGY) - if test $ERTS_BUILD_SMP_EMU = yes; then if test $found_threads = no; then @@ -1410,6 +1381,8 @@ AC_ARG_ENABLE(builtin-zlib, Z_LIB= if test "x$enable_builtin_zlib" = "xyes"; then + AC_DEFINE(HAVE_ZLIB_INFLATEGETDICTIONARY, 1, + [Define if your zlib version defines inflateGetDictionary.]) AC_MSG_NOTICE([Using our own built-in zlib source]) else AC_MSG_CHECKING(for zlib 1.2.5 or higher) @@ -1436,6 +1409,11 @@ error AC_MSG_RESULT(no) ]) LIBS=$zlib_save_LIBS + +AC_MSG_CHECKING(for zlib inflateGetDictionary presence) +AC_SEARCH_LIBS(inflateGetDictionary, [z], + AC_DEFINE(HAVE_ZLIB_INFLATEGETDICTIONARY, 1, + [Define if your zlib version defines inflateGetDictionary.])) fi AC_SUBST(Z_LIB) @@ -2061,7 +2039,7 @@ AC_CHECK_FUNCS([getipnodebyname getipnodebyaddr gethostbyname2]) AC_CHECK_FUNCS([ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlopen \ pread pwrite memmove strerror strerror_r strncasecmp \ - gethrtime localtime_r gmtime_r inet_pton \ + gethrtime localtime_r gmtime_r inet_pton mprotect \ mmap mremap memcpy mallopt sbrk _sbrk __sbrk brk _brk __brk \ flockfile fstat strlcpy strlcat setsid posix2time time2posix \ setlocale nl_langinfo poll mlockall ppoll]) @@ -2767,17 +2745,29 @@ ERL_TIME_CORRECTION AC_CHECK_PROG(M4, m4, m4) -dnl HiPE cannot run on 64-bit without MAP_FIXED and MAP_NORESERVE -if test X${enable_hipe} != Xno && test X$ac_cv_sizeof_void_p != X4; then - AC_CHECK_DECLS([MAP_FIXED, MAP_NORESERVE], [], [], [#include <sys/mman.h>]) - if test X$ac_cv_have_decl_MAP_FIXED != Xyes || test X$ac_cv_have_decl_MAP_NORESERVE != Xyes; then - if test X${enable_hipe} = Xyes; then - AC_MSG_ERROR([HiPE on 64-bit needs MAP_FIXED and MAP_NORESERVE flags for mmap()]) - else - enable_hipe=no - AC_MSG_WARN([Disable HiPE due to lack of MAP_FIXED and MAP_NORESERVE flags for mmap()]) - fi - fi +if test X${enable_hipe} != Xno; then + if test X$ac_cv_sizeof_void_p != X4 && test X$ARCH = Xamd64; then + dnl HiPE cannot run on x86_64 without MAP_FIXED and MAP_NORESERVE + AC_CHECK_DECLS([MAP_FIXED, MAP_NORESERVE], [], [], [#include <sys/mman.h>]) + if test X$ac_cv_have_decl_MAP_FIXED != Xyes || test X$ac_cv_have_decl_MAP_NORESERVE != Xyes; then + if test X${enable_hipe} = Xyes; then + AC_MSG_ERROR([HiPE on x86_64 needs MAP_FIXED and MAP_NORESERVE flags for mmap()]) + else + enable_hipe=no + AC_MSG_WARN([Disable HiPE due to lack of MAP_FIXED and MAP_NORESERVE flags for mmap()]) + fi + fi + else + dnl HiPE cannot run without mprotect() + if test X$ac_cv_func_mprotect != Xyes; then + if test X${enable_hipe} = Xyes; then + AC_MSG_ERROR([HiPE needs mprotect() on $ARCH]) + else + enable_hipe=no + AC_MSG_WARN([Disable HiPE due to lack of mprotect()]) + fi + fi + fi fi dnl check to auto-enable hipe here... @@ -3426,13 +3416,8 @@ if test X${enable_hipe} = Xyes; then AC_DEFINE(HIPE,[1],[Define to enable HiPE]) HIPE_HELPERS="xmerl syntax_tools edoc" ENABLE_ALLOC_TYPE_VARS="$ENABLE_ALLOC_TYPE_VARS hipe" - case "$ARCH" in - amd64) - # For now exec_alloc is only used for hipe on amd64 - AC_MSG_NOTICE([Enable exec_alloc for hipe code allocation]) - ENABLE_ALLOC_TYPE_VARS="$ENABLE_ALLOC_TYPE_VARS exec_alloc" - ;; - esac + AC_MSG_NOTICE([Enable exec_alloc for hipe code allocation]) + ENABLE_ALLOC_TYPE_VARS="$ENABLE_ALLOC_TYPE_VARS exec_alloc" fi fi AC_SUBST(HIPE_HELPERS) @@ -3968,6 +3953,7 @@ dnl use "PATH/include" and "PATH/lib". AC_SUBST(SSL_INCLUDE) AC_SUBST(SSL_INCDIR) AC_SUBST(SSL_LIBDIR) +AC_SUBST(SSL_FLAGS) AC_SUBST(SSL_CRYPTO_LIBNAME) AC_SUBST(SSL_SSL_LIBNAME) AC_SUBST(SSL_CC_RUNTIME_LIBRARY_PATH) @@ -4299,8 +4285,7 @@ yes #include <stdio.h> #include <openssl/hmac.h>], [ - HMAC_CTX hc; - HMAC_CTX_init(&hc); + HMAC(0, 0, 0, 0, 0, 0, 0); ], [ssl_linkable=yes], [ssl_linkable=no]) @@ -4355,8 +4340,7 @@ dnl so it is - be adoptable #include <stdio.h> #include <openssl/hmac.h>], [ - HMAC_CTX hc; - HMAC_CTX_init(&hc); + HMAC(0, 0, 0, 0, 0, 0, 0); ], [ssl_dyn_linkable=yes], [ssl_dyn_linkable=no]) @@ -4461,12 +4445,14 @@ esac if test "x$SSL_APP" != "x" ; then dnl We found openssl, now check if we use kerberos 5 support + dnl FIXME: Do we still support platforms that have Kerberos? AC_MSG_CHECKING(for OpenSSL kerberos 5 support) old_CPPFLAGS=$CPPFLAGS CPPFLAGS=$SSL_INCLUDE AC_EGREP_CPP(^yes$,[ +#include <openssl/opensslv.h> #include <openssl/opensslconf.h> -#ifndef OPENSSL_NO_KRB5 +#if OPENSSL_VERSION_NUMBER < 0x1010000fL && !defined(OPENSSL_NO_KRB5) yes #endif ],[ @@ -4617,8 +4603,7 @@ yes) # Use standard lib locations for ssl runtime library path #include <openssl/hmac.h> ], [ - HMAC_CTX hc; - HMAC_CTX_init(&hc); + HMAC(0, 0, 0, 0, 0, 0, 0); ], [rpath_success=yes], [rpath_success=no]) @@ -4657,6 +4642,31 @@ no) # Use no ssl runtime library path esac +AC_ARG_ENABLE(fips, +AS_HELP_STRING([--enable-fips], [enable OpenSSL FIPS mode support]) +AS_HELP_STRING([--disable-fips], [disable OpenSSL FIPS mode support (default)]), +[ case "$enableval" in + yes) enable_fips_support=yes ;; + *) enable_fips_support=no ;; + esac ], enable_fips_support=no) + +if test "x$enable_fips_support" = "xyes" && test "$CRYPTO_APP" != ""; then + saveCFLAGS="$CFLAGS" + saveLDFLAGS="$LDFLAGS" + saveLIBS="$LIBS" + CFLAGS="$CFLAGS $SSL_INCLUDE" + LDFLAGS="$LDFLAGS $SSL_LD_RUNTIME_LIBRARY_PATH -L$SSL_LIBDIR" + LIBS="-lcrypto" + AC_CHECK_FUNC([FIPS_mode_set], + [SSL_FLAGS="-DFIPS_SUPPORT"], + [SSL_FLAGS=]) + CFLAGS="$saveCFLAGS" + LDFLAGS="$saveLDFLAGS" + LIBS="$saveLIBS" +else + SSL_FLAGS= +fi + #-------------------------------------------------------------------- # Os mon stuff. #-------------------------------------------------------------------- |