Skip to content

Commit

Permalink
Clean-up the OS X selection logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
bosilca committed Aug 17, 2015
1 parent 3eaefd7 commit 5aadf39
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions config/opal_config_asm.m4
Original file line number Diff line number Diff line change
Expand Up @@ -872,23 +872,21 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
[], [enable_osx_builtin_atomics="yes"])
opal_cv_asm_builtin="BUILTIN_NO"
if test "$enable_osx_builtin_atomics" = "yes" ; then
AC_MSG_CHECKING([for OSX atomic support])
AC_CHECK_HEADER([libkern/OSAtomic.h],
[opal_cv_asm_builtin="BUILTIN_OSX"
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
fi
if test "$opal_cv_asm_builtin" = "BUILTIN_NO" -a "$enable_builtin_atomics" = "yes" ; then
AC_MSG_CHECKING([for builtin atomic support])
OPAL_CHECK_SYNC_BUILTINS([opal_cv_asm_builtin="BUILTIN_SYNC"
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])AC_DEFINE([OPAL_C_GCC_INLINE_ASSEMBLY], [1],
[Whether C compiler supports GCC style inline assembly])
[AC_MSG_RESULT([no])])
AC_DEFINE([OPAL_C_GCC_INLINE_ASSEMBLY], [1],
[Whether C compiler supports GCC style inline assembly])
OPAL_CHECK_SYNC_BUILTIN_CSWAP_INT128
elif test "$enable_osx_builtin_atomics" = "yes" ; then
AC_CHECK_HEADER([libkern/OSAtomic.h],[opal_cv_asm_builtin="BUILTIN_OSX"],
[AC_MSG_ERROR([OSX builtin atomics requested but not found.])])
fi
if test "$opal_cv_asm_builtin" = "BUILTIN_NO" -a "$enable_osx_builtin_atomics" = "yes" ; then
AC_MSG_CHECKING([for OSX atomic support])
AC_CHECK_HEADER([libkern/OSAtomic.h],
[opal_cv_asm_builtin="BUILTIN_OSX"
AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
else
opal_cv_asm_builtin="BUILTIN_NO"
fi
Expand Down

0 comments on commit 5aadf39

Please sign in to comment.