From e16b7ac49d7600a8a1b35db5c8bba851c3af88ab Mon Sep 17 00:00:00 2001 From: Alexander Vdolainen Date: Thu, 25 Apr 2019 04:15:22 +0300 Subject: [PATCH] Fixed issue with autotools, AC_LANG_... --- configure.ac | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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])