[pulseaudio-commits] r1769 - /branches/lennart/configure.ac

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue Sep 4 14:24:46 PDT 2007


Author: lennart
Date: Tue Sep  4 23:24:45 2007
New Revision: 1769

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1769&root=pulseaudio&view=rev
Log:
detect whether gcc atomic builtins are available

Modified:
    branches/lennart/configure.ac

Modified: branches/lennart/configure.ac
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/configure.ac?rev=1769&root=pulseaudio&r1=1768&r2=1769&view=diff
==============================================================================
--- branches/lennart/configure.ac (original)
+++ branches/lennart/configure.ac Tue Sep  4 23:24:45 2007
@@ -81,8 +81,8 @@
 # GCC flags
 
 test_gcc_flag() {
-    AC_LANG_CONFTEST([int main() {}])
-    $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
+    AC_LANG_CONFTEST([int main(int argc, char*argv[]) {}])
+    $CC -c conftest.c $CFLAGS -o conftest.o > /dev/null 2> /dev/null
     ret=$?
     rm -f conftest.o
     return $ret
@@ -104,6 +104,18 @@
            AC_MSG_RESULT([no])
         fi
     done 
+fi
+
+AC_MSG_CHECKING([whether $CC knows __sync_bool_compare_and_swap()])
+AC_LANG_CONFTEST([int main() { int a = 4; __sync_bool_compare_and_swap(&a, 4, 5); }])
+$CC conftest.c $CFLAGS -o conftest > /dev/null 2> /dev/null
+ret=$?
+rm -f conftest.o conftest
+if test $ret -eq 0 ; then
+    AC_DEFINE([HAVE_ATOMIC_BUILTINS], 1, [Have __sync_bool_compare_and_swap() and friends.])
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
 fi
 
 #### libtool stuff ####




More information about the pulseaudio-commits mailing list