summaryrefslogtreecommitdiffstats
path: root/old-configure
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 /old-configure
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 '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