From f001b65f3208991c7cfebd52615e73edf07d0ad4 Mon Sep 17 00:00:00 2001
From: Andrew Randrianasulu <andrewrandrianasulu@Andrews-MacBook-Pro.local>
Date: Mon, 10 Jun 2024 22:12:38 +0300
Subject: [PATCH 04/11] macos configure.ac for macports WIP

---
 cinelerra-5.1/configure.ac | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac
index 8159da8f..496c53c1 100644
--- a/cinelerra-5.1/configure.ac
+++ b/cinelerra-5.1/configure.ac
@@ -46,7 +46,7 @@ CFG_CFLAGS+=" -D__STDC_CONSTANT_MACROS"
 CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS"
 CFG_CFLAGS+=" -DPNG_SKIP_SETJMP_CHECK=1"
 CFG_CFLAGS+=" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
-CFG_CFLAGS+=" -I/usr/include -I/usr/local/include"
+CFG_CFLAGS+=" -I/usr/include -I/usr/local/include -I/opt/local/include"
 CFG_CFLAGS+=" -I/data/data/com.termux/files/usr/include/a52dec -I/usr/include/a52dec"
 CFG_CFLAGS+=" -I/usr/include/freetype2 -I/usr/local/include/freetype2"
 CFG_CFLAGS+=" -I/data/data/com.termux/files/usr/include/freetype2"
@@ -557,13 +557,15 @@ fi
 
 ## end arch dep tests
 
-REQUIRE_PROG(OBJCOPY, [objcopy])
+REQUIRE_PROG(OBJCOPY, [gobjcopy])
 if test "x$FATAL_ERROR" != "x"; then
  AC_MSG_ERROR("fatal eror.")
 fi
 CHECK_PROG(PACTL, [pactl])
 WANT_PACTL=$PROG_PACTL
 
+CFLAGS+="-I/opt/local/include/"
+LDFLAGS="-L/opt/local/lib/"
 AC_CHECK_DECL([X_HAVE_UTF8_STRING],,[no_utf=yes],[#include <X11/Xlib.h>])
 if test "$no_utf" = "yes"; then
   AC_MSG_ERROR([Cinelerra requires utf8 support in X Windows.])
@@ -1300,6 +1302,20 @@ echo "CFLAGS += -I/usr/pkg/include/uuid"
 
 fi
 
+if test [ "$(uname)"] = "Darwin" ; then
+echo "CFLAGS += -DNO_BTRACE"
+echo "CFLAGS += -DNO_CTX"
+echo "system_libs += -lpng16"
+echo "system_libs += -lintl"
+echo "CFLAGS += -I/opt/local/libexec/ffmpeg6/include/"
+echo "CFLAGS += -I/opt/local/include -std=c++11"
+echo "CFLAGS += $(pkg-config --cflags xft)"
+echo "CFLAGS += -I/usr/pkg/include"
+echo "CFLAGS += -I/usr/pkg/include/uuid"
+
+fi
+
+
 if test "x$WANT_X264_HIDEPTH" = "xyes" ; then
   X264_CFG_PARAMS="$X264_CFG_PARAMS --bit-depth=10"
 fi
-- 
2.13.5 (Apple Git-94)

