From 684bfb7172720b9cd0383c3db0fd25cad3f6d966 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Thu, 22 Sep 2016 19:09:00 +0200 Subject: Fix posix_memalign configure test --- erts/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/configure.in') diff --git a/erts/configure.in b/erts/configure.in index 883ce2db68..5c95f2fa35 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -2079,7 +2079,7 @@ int main(void) { fi]);; esac -if test $have_posix_memalign = yes; then +if test "$have_posix_memalign" = "yes"; then AC_DEFINE(HAVE_POSIX_MEMALIGN,[1], [Define to 1 if you have the `posix_memalign' function.]) fi -- cgit v1.2.3 From 80ea7cf5010ccad47206a05a3d2c7a9cf4bac421 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Thu, 22 Sep 2016 16:23:11 +0200 Subject: Try to handle not yet available functionality in MacOSX SDK --- erts/configure.in | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'erts/configure.in') diff --git a/erts/configure.in b/erts/configure.in index 5c95f2fa35..80f1efe05b 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -875,6 +875,22 @@ dnl for now that is the way we do it. USER_LD=$LD USER_LDFLAGS="$LDFLAGS" LD='$(CC)' +case $host_os in + darwin*) + saved_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-no_weak_imports" + AC_TRY_LINK([],[], + [ + LD_MAY_BE_WEAK=no + ], + [ + LD_MAY_BE_WEAK=yes + LDFLAGS="$saved_LDFLAGS" + ]);; + *) + LD_MAY_BE_WEAK=no;; +esac + AC_SUBST(LD) LDFLAG_RUNTIME_LIBRARY_PATH="$CFLAG_RUNTIME_LIBRARY_PATH" @@ -1964,7 +1980,7 @@ getaddrinfo("","",NULL,NULL); if test $have_getaddrinfo = yes; then AC_MSG_RESULT([yes]) AC_MSG_CHECKING([whether getaddrinfo accepts enough flags]) - AC_TRY_COMPILE([ + AC_TRY_LINK([ #include #include #ifdef HAVE_WINSOCK2_H @@ -2221,7 +2237,7 @@ dnl Checks for features/quirks in the system that affects Erlang. dnl ---------------------------------------------------------------------- AC_MSG_CHECKING([for sched_getaffinity/sched_setaffinity]) -AC_TRY_COMPILE([#include ], +AC_TRY_LINK([#include ], [ #ifndef CPU_SETSIZE #error no CPU_SETSIZE @@ -2244,7 +2260,7 @@ fi AC_MSG_CHECKING([for pset functionality]) -AC_TRY_COMPILE([#include ], +AC_TRY_LINK([#include ], [ int res; psetid_t id = PS_MYID; @@ -2262,7 +2278,7 @@ if test $pset_functionality = yes; then fi AC_MSG_CHECKING([for processor_bind functionality]) -AC_TRY_COMPILE([ +AC_TRY_LINK([ #include #include #include @@ -2278,7 +2294,7 @@ if test $processor_bind_functionality = yes; then fi AC_MSG_CHECKING([for cpuset_getaffinity/cpuset_setaffinity]) -AC_TRY_COMPILE([ +AC_TRY_LINK([ #include #include ], @@ -2477,7 +2493,7 @@ if test "x$ac_cv_func_sbrk" = "xyes"; then for rtype in $ret_types; do for atype in $arg_types; do IFS=$save_ifs - AC_TRY_COMPILE([#include + AC_TRY_LINK([#include #include ], [$rtype sbrk($atype incr);], [erts_cv_sbrk_ret_arg_types="$rtype,$atype"]) @@ -2514,7 +2530,7 @@ if test $ac_cv_func_brk = yes; then for rtype in $ret_types; do for atype in $arg_types; do IFS=$save_ifs - AC_TRY_COMPILE([#include + AC_TRY_LINK([#include #include ], [$rtype brk($atype endds);], [erts_cv_brk_ret_arg_types="$rtype,$atype"]) @@ -3536,7 +3552,7 @@ fi # if test $have_kernel_poll = epoll; then AC_MSG_CHECKING([whether epoll is level triggered]) - AC_TRY_COMPILE([#include ],[ + AC_TRY_LINK([#include ],[ #ifdef EPOLLET /* Edge triggered option exist, assume level triggered is default */ -- cgit v1.2.3