From 219896331c151b147b405f27570ee5521709e2d1 Mon Sep 17 00:00:00 2001
From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
Date: Tue, 7 Jul 2020 20:07:30 -0400
Subject: [PATCH] Fix mutual-exclusion logic

---
 cinelerra-5.1/configure.ac | 42 +++++++++++++++++++++++---------------
 1 file changed, 25 insertions(+), 17 deletions(-)

diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
index daa267f0..7a2dc0db 100644
--- a/cinelerra-5.1/configure.ac
+++ b/cinelerra-5.1/configure.ac
@@ -673,10 +673,12 @@ test "x$HAVE_libavc1394" = "xyes" && \
 test "x$HAVE_libiec61883" = "xyes" && \
 test "x$HAVE_libraw1394" = "xyes" && \
   HAVE_FIREWIRE=yes || \
-HAVE_libavc1394=no && \
-HAVE_libiec61883=no && \
-HAVE_libraw1394=no && \
- HAVE_FIREWIRE=no
+( \
+  HAVE_libavc1394=no && \
+  HAVE_libiec61883=no && \
+  HAVE_libraw1394=no && \
+  HAVE_FIREWIRE=no \
+)
 
 CHECK_WANT([DV], [auto], [use dv], [
  CHECK_LIB([libdv], [dv], [dv_init])
@@ -700,9 +702,11 @@ CHECK_WANT([ESOUND], [no], [use esd], [
 test "x$HAVE_esound" = "xyes" && \
 test "x$HAVE_audiofile" = "xyes" && \
   HAVE_ESOUND=yes || \
-HAVE_esound=no && \
-HAVE_audiofile=no && \
-  HAVE_ESOUND=no
+( \
+  HAVE_esound=no && \
+  HAVE_audiofile=no && \
+  HAVE_ESOUND=no \
+)
 
 CHECK_WANT([PULSE], [auto], [use pulseaudio], [
  CHECK_LIB([pulse_simple], [pulse-simple], [pa_simple_new])
@@ -749,13 +753,15 @@ test "x$HAVE_serd" = "xyes" && \
 test "x$HAVE_sratom" = "xyes" && \
 test "x$HAVE_suil" = "xyes" && \
   HAVE_LV2=yes || \
-HAVE_lv2=no && \
-HAVE_lilv=no && \
-HAVE_sord=no && \
-HAVE_serd=no && \
-HAVE_sratom=no && \
-HAVE_suil=no && \
-  HAVE_LV2=no
+( \
+  HAVE_lv2=no && \
+  HAVE_lilv=no && \
+  HAVE_sord=no && \
+  HAVE_serd=no && \
+  HAVE_sratom=no && \
+  HAVE_suil=no && \
+  HAVE_LV2=no \
+)
 
 CHECK_WANT([CUDA], [auto], [build cuda plugins], [
   CHECK_HEADERS([CUDA], [cuda sdk], [${CUDA_PATH:-/usr/local/cuda}/include/cuda.h])])
@@ -813,9 +819,11 @@ AC_SUBST([HAVE_OPENEXR])
 test "x$HAVE_openexr" = "xyes" && \
 test "x$HAVE_ilmbase" = "xyes" && \
   HAVE_OPENEXR=yes || \
-HAVE_openexr=no && \
-HAVE_ilmbase=no &&
-  HAVE_OPENEXR=no
+( \
+  HAVE_openexr=no && \
+  HAVE_ilmbase=no && \
+  HAVE_OPENEXR=no \
+)
 
 # build global_config
 OBJDIR=`uname -m`
-- 
2.26.2

