[MPlayer-cvslog] r38197 - trunk/configure

reimar subversion at mplayerhq.hu
Sun Aug 30 20:44:22 EEST 2020

Author: reimar
Date: Sun Aug 30 20:44:21 2020
New Revision: 38197

configure: check that stdatomic.h actually works correctly.

In particular, that it does not create e.g. dependencies on
libatomic. In that case the compat fallback will actually work better.


Modified: trunk/configure
--- trunk/configure	Sun Aug 30 18:54:24 2020	(r38196)
+++ trunk/configure	Sun Aug 30 20:44:21 2020	(r38197)
@@ -3960,7 +3960,9 @@ echores "$_fast_inttypes"
 echocheck "stdatomic.h"
-header_check stdatomic.h && stdatomic_h=yes
+# need to use statement_check because some implementations (Rasbian) create a dependency
+# on libatomic, in which case we rather want to use the fallback
+statement_check stdatomic.h "atomic_int_least64_t a; atomic_fetch_add_explicit(&a, 5, memory_order_relaxed)" && stdatomic_h=yes
 echores "$stdatomic_h"
 if test "$stdatomic_h" = no ; then
   CFLAGS="-Icompat/atomics/gcc $CFLAGS"

More information about the MPlayer-cvslog mailing list