diff options
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/erts/configure.in b/erts/configure.in index dd6c52b079..820247b4b8 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -1760,6 +1760,25 @@ if test $ac_cv_sizeof_void_p = 8; then fi AC_SUBST(BITS64) +AC_MSG_CHECKING([for C compiler 'restrict' support]) +restrict_keyword="" +for x in restrict __restrict; do + AC_TRY_COMPILE([int * $x foo(int * $x arg); + int * $x foo(int * $x arg) + { int * $x var=arg; return var;} + ],[], + [restrict_keyword=$x],[]) + if test "x$restrict_keyword" != "x"; then + break + fi +done +AC_DEFINE_UNQUOTED(ERTS_RESTRICT,[$restrict_keyword],[Type qualifier restrict]) +if test "x$restrict_keyword" != "x"; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + if test "x$ac_compiler_gnu" = "xyes"; then AC_MSG_CHECKING([if we should add -fno-tree-copyrename to CFLAGS for computed gotos to work properly]) AC_TRY_COMPILE([],[ @@ -1779,8 +1798,6 @@ else AC_MSG_RESULT(no) fi - - AC_MSG_CHECKING([for broken gcc-4.3.0 compiler]) AC_TRY_RUN([ /* pr36339.c */ @@ -2704,6 +2721,13 @@ LIBS=$saved_libs dnl restore CPPFLAGS CPPFLAGS=$saved_cppflags +case $ARCH in + x86|amd64) + AC_DEFINE(ERTS_STRUCTURE_ALIGNED_ALLOC, 1, [Define if structure alignment is enough for allocators. If not defined, 64-bit alignment will be forced.]);; + *) + ;; +esac + LM_SYS_IPV6 LM_SYS_MULTICAST ERL_TIME_CORRECTION |