summaryrefslogtreecommitdiffstats
path: root/old-configure
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-01-01 20:42:13 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2014-01-01 20:52:54 +0100
commite568299c2c2f438cbbee687aa57d0a6cdecf7e0b (patch)
tree1d852c2b170d45e572f1fa767dd5e19f23f4ab3b /old-configure
parentfaf68f3b8eb51427949833999264aecf801a0ced (diff)
downloadmpv-e568299c2c2f438cbbee687aa57d0a6cdecf7e0b.tar.bz2
mpv-e568299c2c2f438cbbee687aa57d0a6cdecf7e0b.tar.xz
build: make configure fail if both __atomic and __sync are not available
Diffstat (limited to 'old-configure')
-rwxr-xr-xold-configure18
1 files changed, 18 insertions, 0 deletions
diff --git a/old-configure b/old-configure
index 34c553695b..b8c2ed1f7c 100755
--- a/old-configure
+++ b/old-configure
@@ -1343,6 +1343,23 @@ else
fi
echores "$_atomic"
+if test "$_atomic" = no ; then
+ echocheck "compiler support for __sync built-ins"
+ _sync=no
+ statement_check stdint.h 'int64_t test = 0; test = __sync_add_and_fetch(&test, 1)' && _sync=yes
+ if test "$_sync" = yes ; then
+ def_sync="#define HAVE_SYNC_BUILTINS 1"
+ else
+ def_sync="#define HAVE_SYNC_BUILTINS 0"
+ fi
+ echores "$_sync"
+else
+ def_sync="#define HAVE_SYNC_BUILTINS 0"
+fi
+
+if test "$_atomic" = no && test "$_sync" = no ; then
+ die "your compiler must support either __atomic or __aync bult-ins."
+fi
if test "$_pthreads" = yes ; then
@@ -3537,6 +3554,7 @@ $def_avresample_has_set_channel_mapping
$def_fast_64bit
$def_pthreads
$def_atomic
+$def_sync
#define HAVE_INLINE_ASM 1