diff mbox

[libdrm,09/23] meson: fix entaviv=auto detection (was always false)

Message ID 20180320174659.1510-10-eric.engestrom@imgtec.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Engestrom March 20, 2018, 5:46 p.m. UTC
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
 meson.build | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/meson.build b/meson.build
index a5b71c5e8fb55600458e..0c26e11dc4bb64325f3c 100644
--- a/meson.build
+++ b/meson.build
@@ -160,19 +160,20 @@  if with_tegra and not with_atomics
   error('libdrm_tegra requires atomics.')
 endif
 
-with_etnaviv = false
-_etnaviv = get_option('etnaviv')
-if _etnaviv == 'true'
-  if not with_atomics
-    error('libdrm_etnaviv requires atomics.')
-  endif
-  with_etnaviv = true
-endif
-
 with_vc4 = false
 _vc4 = get_option('vc4')
 if _vc4 != 'false'
   with_vc4 = _vc4 == 'true' or ['arm', 'aarch64'].contains(host_machine.cpu_family())
+
+with_etnaviv = false
+_etnaviv = get_option('etnaviv')
+if _etnaviv == 'auto'
+  with_etnaviv = with_atomics
+else
+  with_etnaviv = _etnaviv == 'true'
+endif
+if with_etnaviv and not with_atomics
+  error('libdrm_etnaviv requires atomics.')
 endif
 
 # XXX: Aparently only freebsd and dragonfly bsd actually need this (and