diff options
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/erts/configure.in b/erts/configure.in index 7455516def..4799178583 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -881,6 +881,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" @@ -1971,7 +1987,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 <stdlib.h> #include <string.h> #ifdef HAVE_WINSOCK2_H @@ -2086,7 +2102,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 @@ -2228,7 +2244,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 <sched.h>], +AC_TRY_LINK([#include <sched.h>], [ #ifndef CPU_SETSIZE #error no CPU_SETSIZE @@ -2251,7 +2267,7 @@ fi AC_MSG_CHECKING([for pset functionality]) -AC_TRY_COMPILE([#include <sys/pset.h>], +AC_TRY_LINK([#include <sys/pset.h>], [ int res; psetid_t id = PS_MYID; @@ -2269,7 +2285,7 @@ if test $pset_functionality = yes; then fi AC_MSG_CHECKING([for processor_bind functionality]) -AC_TRY_COMPILE([ +AC_TRY_LINK([ #include <sys/types.h> #include <sys/processor.h> #include <sys/procset.h> @@ -2285,7 +2301,7 @@ if test $processor_bind_functionality = yes; then fi AC_MSG_CHECKING([for cpuset_getaffinity/cpuset_setaffinity]) -AC_TRY_COMPILE([ +AC_TRY_LINK([ #include <sys/param.h> #include <sys/cpuset.h> ], @@ -2484,7 +2500,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 <sys/types.h> + AC_TRY_LINK([#include <sys/types.h> #include <unistd.h>], [$rtype sbrk($atype incr);], [erts_cv_sbrk_ret_arg_types="$rtype,$atype"]) @@ -2521,7 +2537,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 <sys/types.h> + AC_TRY_LINK([#include <sys/types.h> #include <unistd.h>], [$rtype brk($atype endds);], [erts_cv_brk_ret_arg_types="$rtype,$atype"]) @@ -2805,7 +2821,7 @@ if test X${enable_fp_exceptions} != Xyes ; then FPE=unreliable else - AC_MSG_CHECKING([for unreliable floating point execptions]) + AC_MSG_CHECKING([for unreliable floating point exceptions]) AC_TRY_RUN([ @@ -3543,7 +3559,7 @@ fi # if test $have_kernel_poll = epoll; then AC_MSG_CHECKING([whether epoll is level triggered]) - AC_TRY_COMPILE([#include <sys/epoll.h>],[ + AC_TRY_LINK([#include <sys/epoll.h>],[ #ifdef EPOLLET /* Edge triggered option exist, assume level triggered is default */ |