Fix the configure-check again: must use b.
authorThiago Macieira <thiago@kde.org>
Sat, 25 Jul 2009 11:21:01 +0000 (13:21 +0200)
committerThiago Macieira <thiago@kde.org>
Sat, 25 Jul 2009 11:21:01 +0000 (13:21 +0200)
Otherwise, when compiling with optimisation, the compiler will detect
that b was unused, then use the instructions that i386 supports.

configure.in

index f405586..d79d655 100644 (file)
@@ -355,7 +355,7 @@ fi
 AC_CACHE_CHECK([whether $CC knows __sync_sub_and_fetch()],
   dbus_cv_sync_sub_and_fetch,
   [AC_LINK_IFELSE(
-     AC_LANG_PROGRAM([], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4);]]),
+     AC_LANG_PROGRAM([], [[int a = 4; int b = __sync_sub_and_fetch(&a, 4); exit(b); ]]),
      [dbus_cv_sync_sub_and_fetch=yes],
      [dbus_cv_sync_sub_and_fetch=no])
   ])