summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2014-01-01 20:42:13 +0100
committerwm4 <wm4@nowhere>2014-01-01 20:57:27 +0100
commit29b68d69c05406460602c40a5222e941547b2f87 (patch)
tree8c6e450881184b114490155fe77e4d984fad18da /wscript
parent6c770eb6df068d4c19894e5e64d8d129a843f756 (diff)
downloadmpv-29b68d69c05406460602c40a5222e941547b2f87.tar.bz2
mpv-29b68d69c05406460602c40a5222e941547b2f87.tar.xz
build: make configure fail if both __atomic and __sync are not available
Diffstat (limited to 'wscript')
-rw-r--r--wscript18
1 files changed, 16 insertions, 2 deletions
diff --git a/wscript b/wscript
index 7a6ee4fb02..ae3bb1d8c1 100644
--- a/wscript
+++ b/wscript
@@ -77,7 +77,7 @@ main_dependencies = [
'desc': 'linker support for --nxcompat --no-seh --dynamicbase',
'func': check_cc(linkflags=['-Wl,--nxcompat', '-Wl,--no-seh', '-Wl,--dynamicbase'])
}, {
- 'name': 'ebx_available',
+ 'name': 'ebx-available',
'desc': 'ebx availability',
'func': check_cc(fragment=load_fragment('ebx.c'))
} , {
@@ -99,13 +99,27 @@ main_dependencies = [
'req': True,
'fmsg': 'Unable to find pthreads support.'
}, {
- 'name': 'atomic_builtins',
+ 'name': 'atomic-builtins',
'desc': 'compiler support for __atomic built-ins',
'func': check_libs(['atomic'],
check_statement('stdint.h',
'int64_t test = 0;'
'test = __atomic_add_fetch(&test, 1, __ATOMIC_SEQ_CST)'))
}, {
+ 'name': 'sync-builtins',
+ 'desc': 'compiler support for __sync built-ins',
+ 'func': check_statement('stdint.h',
+ 'int64_t test = 0;'
+ 'test = __sync_add_and_fetch(&test, 1)'),
+ 'deps_neg': [ 'atomic-builtins' ],
+ }, {
+ 'name': 'thread-synchronization-builtins',
+ 'desc': 'compiler support for usable thread synchronization built-ins',
+ 'func': check_true,
+ 'deps_any': ['atomic-builtins', 'sync-builtins'],
+ 'req': True,
+ 'fmsg': 'your compiler must support either __atomic or __aync bult-ins',
+ }, {
'name': 'librt',
'desc': 'linking with -lrt',
'deps': [ 'pthreads' ],