From fbb73777afcfa098bda3a16d424ac89180c03488 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <randrianasulu@gmail.com>
Date: Sat, 2 Apr 2022 23:52:45 +0300
Subject: [PATCH 49/71] Hopefully fixed dynamic liba52

---
 cinelerra-5.1/configure.ac       | 2 +-
 cinelerra-5.1/libzmpeg3/Makefile | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
index c7394b7b..7481d411 100644
--- a/cinelerra-5.1/configure.ac
+++ b/cinelerra-5.1/configure.ac
@@ -622,7 +622,7 @@ CHECK_HEADERS([dav1d], [libdav1d headers], [dav1d/dav1d.h])
 CHECK_LIB([libwebp], [webp], [WebPGetEncoderVersion])
 CHECK_HEADERS([libwebp], [libwebp headers], [webp/encode.h])
 CHECK_LIB([a52dec], [a52], [a52_init])
-CHECK_HEADERS([a52dec], [a52 headers], [stdint.h a52.h])
+CHECK_HEADERS([a52dec], [a52 headers], [stdint.h a52dec/a52.h])
 CHECK_LIB([encore], [encore], [encore])
 CHECK_HEADERS([encore], [encore headers], [encore.h])
 CHECK_LIB([giflib], [gif], [DGifOpen])
diff --git a/cinelerra-5.1/libzmpeg3/Makefile b/cinelerra-5.1/libzmpeg3/Makefile
index 47a0596f..1e59d36f 100644
--- a/cinelerra-5.1/libzmpeg3/Makefile
+++ b/cinelerra-5.1/libzmpeg3/Makefile
@@ -79,6 +79,9 @@ UTILS += $(OBJDIR)/zmpeg3ifochk
 UTILS += $(OBJDIR)/zmpeg3cc2txt
 
 LIBS = -lm -lpthread
+ifeq ($(WITH_THIRDPARTY),no)
+LIBS += -la52
+endif
 
 LIBS += $(lib_a52dec) $(lib_djbfft) $(lib_libbthread)
 
-- 
2.35.1

