when testing for GCC's atomic builtins, try to link too (see bug #1844128); also more closely mirror wx's use by using unsigned int and not int for tests

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-12-04 15:29:17 +00:00
parent dc0c395d83
commit 9dcff96ba9
2 changed files with 11 additions and 9 deletions

View File

@@ -8,10 +8,10 @@ AC_DEFUN([WX_ATOMIC_BUILTINS],
if test -n "$GCC"; then
AC_MSG_CHECKING([for __sync_fetch_* builtins])
AC_CACHE_VAL(wx_cv_cc_gcc_atomic_builtins, [
AC_TRY_COMPILE(
AC_TRY_LINK(
[],
[
int value=0;
unsigned int value=0;
__sync_fetch_and_add(&value, 1);
__sync_sub_and_fetch(&value, 1);
],