From 4131ef4f95f4dceb1684d67335f4eda35b77f99c Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Sat, 15 May 2021 21:05:21 +0300
Subject: [PATCH 5/6] Add libzmpeg ifdef in fileac3, move fireware objects into
 their own group in Makefile in cinelerra/

---
 cinelerra-5.1/cinelerra/Makefile  | 22 ++++++++++++++--------
 cinelerra-5.1/cinelerra/fileac3.C |  3 ++-
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile
index 81d1acee..d5145d7d 100644
--- a/cinelerra-5.1/cinelerra/Makefile
+++ b/cinelerra-5.1/cinelerra/Makefile
@@ -56,7 +56,6 @@ OBJS := $(OVERLAYS) \
 	$(OBJDIR)/assets.o \
 	$(OBJDIR)/atrack.o \
 	$(OBJDIR)/attachmentpoint.o \
-	$(OBJDIR)/audio1394.o \
 	$(OBJDIR)/audioalsa.o \
 	$(OBJDIR)/audiodevice.o \
 	$(OBJDIR)/audiodvb.o \
@@ -70,8 +69,6 @@ OBJS := $(OVERLAYS) \
 	$(OBJDIR)/automation.o \
 	$(OBJDIR)/auto.o \
 	$(OBJDIR)/autos.o \
-	$(OBJDIR)/avc1394control.o \
-	$(OBJDIR)/avc1394transport.o \
 	$(OBJDIR)/awindowgui.o \
 	$(OBJDIR)/awindow.o \
 	$(OBJDIR)/batch.o \
@@ -112,8 +109,6 @@ OBJS := $(OVERLAYS) \
 	$(OBJDIR)/cwindowtool.o \
 	$(OBJDIR)/dcoffset.o \
 	$(OBJDIR)/deleteallindexes.o \
-	$(OBJDIR)/device1394input.o \
-	$(OBJDIR)/device1394output.o \
 	$(OBJDIR)/devicedvbinput.o \
 	$(OBJDIR)/devicev4l2base.o \
 	$(OBJDIR)/devicev4l2input.o \
@@ -170,8 +165,6 @@ OBJS := $(OVERLAYS) \
 	$(OBJDIR)/garbage.o \
 	$(OBJDIR)/gwindowgui.o \
 	$(OBJDIR)/gwindow.o \
-	$(OBJDIR)/iec61883input.o \
-	$(OBJDIR)/iec61883output.o \
 	$(OBJDIR)/indexable.o \
 	$(OBJDIR)/indexfile.o \
 	$(OBJDIR)/indexstate.o \
@@ -339,7 +332,6 @@ OBJS := $(OVERLAYS) \
 	$(OBJDIR)/undostack.o \
 	$(OBJDIR)/vattachmentpoint.o \
 	$(OBJDIR)/vautomation.o \
-	$(OBJDIR)/vdevice1394.o \
 	$(OBJDIR)/vdevicebase.o \
 	$(OBJDIR)/vdevicedvb.o \
 	$(OBJDIR)/vdeviceprefs.o \
@@ -378,6 +370,19 @@ OBJS := $(OVERLAYS) \
 	$(OBJDIR)/zwindow.o \
 	$(OBJDIR)/zwindowgui.o \
 
+ifneq ($(WANT_FIREWARE),no)
+OBJ += \
+	$(OBJDIR)/audio1394.o \
+	$(OBJDIR)/avc1394control.o \
+	$(OBJDIR)/avc1394transport.o \
+	$(OBJDIR)/vdevice1394.o \
+	$(OBJDIR)/device1394input.o \
+	$(OBJDIR)/device1394output.o \
+	$(OBJDIR)/iec61883input.o \
+	$(OBJDIR)/iec61883output.o \
+
+endif
+
 ifneq ($(WANT_LIBZMPEG),no)
 OBJS += \
 	$(OBJDIR)/audiompeg.o \
@@ -426,6 +431,7 @@ LIBRARIES += \
 
 endif
 
+
 LIBS := $(LIBRARIES)
 
 ifeq ($(WANT_CIN_3RDPARTY),no)
diff --git a/cinelerra-5.1/cinelerra/fileac3.C b/cinelerra-5.1/cinelerra/fileac3.C
index c6a94161..be62f2b7 100644
--- a/cinelerra-5.1/cinelerra/fileac3.C
+++ b/cinelerra-5.1/cinelerra/fileac3.C
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
  */
-
+#if HAVE_LIBZMPEG
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -421,3 +421,4 @@ int AC3ConfigAudioBitrate::handle_event()
 }
 
 #endif
+#endif //libzmpeg
\ No newline at end of file
-- 
2.31.1

