comparison configure.in @ 5097:dceec93471e7

Improvements based on feedback from Anthony Williams
author Sam Lantinga <slouken@libsdl.org>
date Tue, 25 Jan 2011 17:40:06 -0800
parents 817064595222
children 797b37c0c046
comparison
equal deleted inserted replaced
5096:124cda437b07 5097:dceec93471e7
299 AC_TRY_LINK([ 299 AC_TRY_LINK([
300 ],[ 300 ],[
301 int a; 301 int a;
302 void *x, *y, *z; 302 void *x, *y, *z;
303 __sync_lock_test_and_set(&a, 4); 303 __sync_lock_test_and_set(&a, 4);
304 __sync_lock_test_and_set(&x, y);
304 __sync_fetch_and_add(&a, 1); 305 __sync_fetch_and_add(&a, 1);
305 __sync_bool_compare_and_swap(&a, 5, 10); 306 __sync_bool_compare_and_swap(&a, 5, 10);
306 __sync_bool_compare_and_swap(&x, y, z); 307 __sync_bool_compare_and_swap(&x, y, z);
307 ],[ 308 ],[
308 have_gcc_atomics=yes 309 have_gcc_atomics=yes
315 # See if we have the minimum operation needed for GCC atomics 316 # See if we have the minimum operation needed for GCC atomics
316 AC_TRY_LINK([ 317 AC_TRY_LINK([
317 ],[ 318 ],[
318 int a; 319 int a;
319 __sync_lock_test_and_set(&a, 1); 320 __sync_lock_test_and_set(&a, 1);
321 __sync_lock_release(&a);
320 ],[ 322 ],[
321 have_gcc_sync_lock_test_and_set=yes 323 have_gcc_sync_lock_test_and_set=yes
322 ]) 324 ])
323 if test x$have_gcc_sync_lock_test_and_set = xyes; then 325 if test x$have_gcc_sync_lock_test_and_set = xyes; then
324 AC_DEFINE(HAVE_GCC_SYNC_LOCK_TEST_AND_SET) 326 AC_DEFINE(HAVE_GCC_SYNC_LOCK_TEST_AND_SET)