diff options
author | Mike Hommey <mh@glandium.org> | 2012-03-27 13:03:07 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2012-03-30 17:25:59 (GMT) |
commit | 2cfe6d67ef6a622eeb47ba48b431bdafc0c45b35 (patch) | |
tree | 7e9489bf626dd38db9cb29186fda1d53c3b46026 /configure.ac | |
parent | 1a0e7770243e0539fa8fef7bb1512f784f93389f (diff) | |
download | jemalloc-2cfe6d67ef6a622eeb47ba48b431bdafc0c45b35.zip jemalloc-2cfe6d67ef6a622eeb47ba48b431bdafc0c45b35.tar.gz jemalloc-2cfe6d67ef6a622eeb47ba48b431bdafc0c45b35.tar.bz2 |
Change AC_COMPILE_IFELSE into AC_LINK_IFELSE for the __sync_{add, sub}_and_fetch() test
With the Android NDK, __sync_{add,sub}_and_fetch() compile fine for uint64_t,
but the corresponding libgcc function aren't there.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac index 2616b0a..c1b46dc 100644 --- a/configure.ac +++ b/configure.ac @@ -898,20 +898,20 @@ dnl __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n macros being undefined. AC_DEFUN([JE_SYNC_COMPARE_AND_SWAP_CHECK],[ AC_CACHE_CHECK([whether to force $1-bit __sync_{add,sub}_and_fetch()], [je_cv_sync_compare_and_swap_$2], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ - #include <stdint.h> - ], - [ - #ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_$2 - { - uint$1_t x$1 = 0; - __sync_add_and_fetch(&x$1, 42); - __sync_sub_and_fetch(&x$1, 1); - } - #else - #error __GCC_HAVE_SYNC_COMPARE_AND_SWAP_$2 is defined, no need to force - #endif - ])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM([ + #include <stdint.h> + ], + [ + #ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_$2 + { + uint$1_t x$1 = 0; + __sync_add_and_fetch(&x$1, 42); + __sync_sub_and_fetch(&x$1, 1); + } + #else + #error __GCC_HAVE_SYNC_COMPARE_AND_SWAP_$2 is defined, no need to force + #endif + ])], [je_cv_sync_compare_and_swap_$2=yes], [je_cv_sync_compare_and_swap_$2=no])]) |