From f95cde60ff02e897088d35052426964a3db90eb7 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Tue, 26 Jul 2016 07:55:54 +0100 Subject: build: add --htmldir option Defaults to docdir but makes it possible to install html documentation separately. --- wscript | 1 + 1 file changed, 1 insertion(+) (limited to 'wscript') diff --git a/wscript b/wscript index 9269d95b54..309efd3bb2 100644 --- a/wscript +++ b/wscript @@ -942,6 +942,7 @@ _INSTALL_DIRS_LIST = [ ('datadir', '${PREFIX}/share', 'data files'), ('mandir', '${DATADIR}/man', 'man pages '), ('docdir', '${DATADIR}/doc/mpv', 'documentation files'), + ('htmldir', '${DOCDIR}', 'html documentation files'), ('zshdir', '${DATADIR}/zsh/site-functions', 'zsh completion functions'), ('confloaddir', '${CONFDIR}', 'configuration files load directory'), -- cgit v1.2.3 From d4ee5e5a8ad450d16fb2ede212c536e01970ae16 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 5 Aug 2016 17:10:22 +0200 Subject: build: always require atomics Always require them, instead of just for some components which have hard requirements on correct atomic semantics. They should be widely available, and are supported by all recent gcc and clang compiler versions. We even have the fallbacks builtins, which should keep this working on very old gcc releases. In particular, w32_common.c recently added a hard requirement on atomics, but checking this properly in the build system would have been messy. This commit makes sure it always works. The fallback where weak atomic semantics are always fine is in theory rather questionable as well. --- wscript | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 309efd3bb2..a18df6f581 100644 --- a/wscript +++ b/wscript @@ -175,6 +175,7 @@ main_dependencies = [ 'name': 'atomics', 'desc': 'compiler support for usable thread synchronization built-ins', 'func': check_true, + 'req': True, 'deps_any': ['stdatomic', 'atomic-builtins', 'sync-builtins'], }, { 'name': 'c11-tls', @@ -517,13 +518,11 @@ audio_output_features = [ { 'name': '--sdl2', 'desc': 'SDL2', - 'deps': ['atomics'], 'func': check_pkg_config('sdl2'), 'default': 'disable' }, { 'name': '--sdl1', 'desc': 'SDL (1.x)', - 'deps': ['atomics'], 'deps_neg': [ 'sdl2' ], 'func': check_pkg_config('sdl'), 'default': 'disable' @@ -574,7 +573,6 @@ audio_output_features = [ }, { 'name': '--jack', 'desc': 'JACK audio output', - 'deps': ['atomics'], 'func': check_pkg_config('jack'), }, { 'name': '--openal', @@ -592,14 +590,13 @@ audio_output_features = [ }, { 'name': '--coreaudio', 'desc': 'CoreAudio audio output', - 'deps': ['atomics'], 'func': check_cc( fragment=load_fragment('coreaudio.c'), framework_name=['CoreFoundation', 'CoreAudio', 'AudioUnit', 'AudioToolbox']) }, { 'name': '--wasapi', 'desc': 'WASAPI audio output', - 'deps': ['win32', 'atomics'], + 'deps': ['win32'], 'func': check_cc(fragment=load_fragment('wasapi.c')), } ] -- cgit v1.2.3 From 8c2e299b84524b5f3f732afa32382bb6e70ca660 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 8 Aug 2016 23:34:32 +0200 Subject: wscript: improve stdatomic check The current stdatomic check verifies the availability of the function by calling atomic_load(). It also uses this test to check if linking against libatomic is needed or not. Unfortunately, on specific architectures (namely SPARC), using atomic_load() does *not* require linking against libatomic, while other atomic operations do. Due to this, mpv's wscript concludes that stdatomic is available, and that linking against libatomic is not needed, causing the following link failure: [190/190] Linking build/mpv audio/out/ao.c.13.o: In function `ao_query_and_reset_events': /home/peko/autobuild/instance-0/output/build/mpv-0.18.1/build/../audio/out/ao.c:399: undefined reference to `__atomic_fetch_and_4' In order to fix this, the stdatomic check is adjusted to call atomic_fetch_add() instead, which does require libatomic. Thanks to this, the wscript realizes that linking against libatomic is needed, and the build works fine. Signed-off-by: Thomas Petazzoni --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wscript') diff --git a/wscript b/wscript index a18df6f581..4c49caf4b2 100644 --- a/wscript +++ b/wscript @@ -154,7 +154,7 @@ main_dependencies = [ 'func': check_libs(['atomic'], check_statement('stdatomic.h', 'atomic_int_least64_t test = ATOMIC_VAR_INIT(123);' - 'int test2 = atomic_load(&test)')) + 'atomic_fetch_add(&test, 1)')) }, { 'name': 'atomic-builtins', 'desc': 'compiler support for __atomic built-ins', -- cgit v1.2.3