diff --git a/configure.ac b/configure.ac index e838891..793931e 100644 --- a/configure.ac +++ b/configure.ac @@ -28,15 +28,17 @@ dnl ************************************** dnl ***** tests for compiler built-ins ***** dnl ************************************** -AC_CACHE_CHECK([for __sync_bool_compare_and_swap_8], -[ctrie_cv_func___sync_bool_compare_and_swap_8], -[AC_LINK_IFELSE([ -typedef unsigned int uint64 __attribute__ ((mode (DI))); -uint64 i; -int main() { return __sync_bool_compare_and_swap (&i, 0, 1); } -], -[ctrie_cv_func___sync_bool_compare_and_swap_8=yes], -[ctrie_cv_func___sync_bool_compare_and_swap_8=no])]) +AC_CACHE_CHECK( + [for __sync_bool_compare_and_swap_8], + [ctrie_cv_func___sync_bool_compare_and_swap_8], + [AC_LINK_IFELSE([AC_LANG_SOURCE([ + typedef unsigned int uint64 __attribute__ ((mode (DI))); + uint64 i; + int main() { return __sync_bool_compare_and_swap (&i, 0, 1); } + ])], + [ctrie_cv_func___sync_bool_compare_and_swap_8=yes], + [ctrie_cv_func___sync_bool_compare_and_swap_8=no])]) + if test "$ctrie_cv_func___sync_bool_compare_and_swap_8" = "yes"; then AC_DEFINE([HAVE__SYNC_BOOL_COMPARE_AND_SWAP_8], 1, [Define to 1 if the compiler provides the __sync_bool_compare_and_swap function for uint64])