fixes and changes to Makefile for more generality
authorGood Guy <[email protected]>
Sun, 8 May 2022 16:42:32 +0000 (10:42 -0600)
committerGood Guy <[email protected]>
Sun, 8 May 2022 16:42:32 +0000 (10:42 -0600)
cinelerra-5.1/blds/termux_dyn.bld
cinelerra-5.1/configure.ac
cinelerra-5.1/guicast/Makefile
cinelerra-5.1/libzmpeg3/Makefile
cinelerra-5.1/mpeg2enc/Makefile
cinelerra-5.1/mplexlo/Makefile
cinelerra-5.1/plugins/shapewipe/Makefile
cinelerra-5.1/plugins/titler/Makefile

index b557686ce23a39710456b32e0aed5cb2b6f28811..c24f686a607700371a99a95ed10133e91d8791ab 100755 (executable)
@@ -1,6 +1,9 @@
 #!/bin/sh
+#CFLAGS=$(pkg-config --cflags OpenEXR)
+#echo $CFLAGS
+export CFLAGS
 ./configure --with-single-user --without-thirdparty \
     --without-dv \
     --without-firewire  --without-vaapi \
-    --without-vdpau --without-lv2 --without-openexr --without-ogg \
+    --without-vdpau --without-lv2 --without-libdpx --without-ogg \
     --without-gl
index e83d466603546e1ef77da0920edd392720e8a564..f1414a795e66db0f5ccfc6f50de41cb41bf063b3 100644 (file)
@@ -29,6 +29,7 @@ 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/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"
 CFG_CFLAGS+=" -I/usr/include/uuid -I/usr/local/include/uuid"
@@ -85,6 +86,12 @@ fi
 if test "x$WANT_COMMERCIAL" = "xyes" -a "x$WANT_LIBZMPEG" != "xyes" ; then
   AC_MSG_ERROR([commercial requires libzmpeg support.])
 fi
+if test "x$WANT_VIDEO4LINUX2" = "xyes" -a "x$WANT_LIBZMPEG" != "xyes" ; then
+  AC_MSG_ERROR([video4linux2 currently requires libzmpeg support.])
+fi
+if test "x$WANT_DVB" = "xyes" -a "x$WANT_LIBZMPEG" != "xyes" ; then
+  AC_MSG_ERROR([dvb currently requires libzmpeg support.])
+fi
 
 if test "x$WANT_CINBIN_BUILD" = "xyes"; then
   WANT_LOCALE_DIR='$$CIN_LIB/locale'
@@ -582,7 +589,16 @@ CHECK_LIB([XEXT], [Xext], [XShmQueryExtension])
 CHECK_HEADERS([XEXT], [Xlib XShm extention], [X11/Xlib.h X11/extensions/XShm.h X11/extensions/shape.h])
 CHECK_LIB([XINERAMA], [Xinerama], [XineramaQueryExtension])
 CHECK_HEADERS([XINERAMA], [Xinerama headers], [X11/extensions/Xinerama.h])
+
+if test "x$HAVE_XINERAMA" != "xyes"; then
+  AC_MSG_ERROR([requires Xinerama support.])
+fi
+
 CHECK_LIB([XFIXES], [Xfixes], [XFixesQueryVersion])
+if test "x$HAVE_XFIXES" != "xyes"; then
+  AC_MSG_ERROR([requires XFixes support.])
+fi
+
 CHECK_LIB([BZ2], [bz2], [BZ2_bzDecompress])
 CHECK_LIB([FONTCONFIG], [fontconfig], [FcInit])
 CHECK_LIB([FREETYPE], [freetype], [FT_Init_FreeType])
@@ -629,7 +645,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])
@@ -823,6 +839,7 @@ CHECK_WANT([OPENEXR], [auto], [use openexr], [
  # ilmbase libs
  LIBS=" -lIlmImf -lIlmThread -lIex -lpthread"
  CXXFLAGS="-I/usr/include/OpenEXR -I/usr/local/include/OpenEXR"
+ CXXFLAGS+=" $(pkg-config --cflags OpenEXR)"
  AC_LANG_PUSH(C++)
  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
 #include "ImfChannelList.h"
@@ -848,7 +865,9 @@ EXROStream() : Imf::OStream("mypath") {} };
     SHARED_openexr="$LIBS"
     SHARED_LIBS+=" $LIBS"
     CFG_CFLAGS+=" -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR"
+    CFG_CFLAGS+=" $(pkg-config --cflags OpenEXR)"
   fi
+  CFG_CFLAGS+=" $(pkg-config --cflags OpenEXR)"
  fi
  LIBS="$saved_LIBS"
  CXXFLAGS="$saved_CXXFLAGS"
index d771b4624d932cca7cdfd100eb3c4690271c3ba6..354b40b2fb9493b7470f96130ccc070edddccb3e 100644 (file)
@@ -117,9 +117,14 @@ $(shell echo $(CFLAGS) > $(OBJDIR)/c_flags)
 $(shell echo $(OBJS) > $(OBJDIR)/objs)
 
 all: $(OUTPUT) $(UTILS)
+ifeq ($(uname -s), FreeBSD)
+python = $(shell find /usrlocal/bin -name python3\* | head -n 1)
+else
+python = `which python`
+endif
 
 $(BCXFER):     bccmdl.py bcxfer.C bcxfer.h
-       python3 < ./bccmdl.py
+       $(python) < ./bccmdl.py
        +$(MAKE) -C xfer
 
 $(OUTPUT): $(OBJS) $(BCXFER)
@@ -132,8 +137,11 @@ $(OBJDIR)/bootstrap:
 $(OBJDIR)/pngtoh: pngtoh.c
        $(CC) -O2 pngtoh.c -o $(OBJDIR)/pngtoh
 
+PNGTORAWFLAGS = $(shell pkg-config --libs libpng pkg-config --cflags libpng)
+
+
 $(OBJDIR)/pngtoraw: pngtoraw.c
-       $(CC) -O2 pngtoraw.c -o $(OBJDIR)/pngtoraw -lpng -lz
+       $(CC) -O2 pngtoraw.c -o $(OBJDIR)/pngtoraw $(PNGTORAWFLAGS) -lz
 
 clean:
        rm -rf $(OBJDIR)
index 47a0596f445527bafae894549f0e33b2ebfa5618..c5b8a083d37ac3ebd173b1d83bd19c89a027bd24 100644 (file)
@@ -79,6 +79,12 @@ UTILS += $(OBJDIR)/zmpeg3ifochk
 UTILS += $(OBJDIR)/zmpeg3cc2txt
 
 LIBS = -lm -lpthread
+ifeq ($(WANT_CIN_3RDPARTY),no)
+LIBS += -la52
+endif
+ifeq ($(shell uname -o), Android)
+LIBS += jpt.a
+endif
 
 LIBS += $(lib_a52dec) $(lib_djbfft) $(lib_libbthread)
 
index 80e0f8f939f3d38453287f81947fb8dfbcd4123a..bab267cfbcb85811d7f4923896e8bff0751ff513 100644 (file)
@@ -56,6 +56,13 @@ OBJ = \
 LIBS := $(LIBZMPEG3)/$(OBJDIR)/libzmpeg3.a
 LIBS += $(libraries)
 
+ifeq ($(WANT_CIN_3RDPARTY),no)
+LIBS += -la52
+endif
+ifeq ($(shell uname -o), Android)
+LIBS += jpt.a
+endif
+
 HVEG2LIB = $(OBJDIR)/hveg2enc.a
 HVEG2ENC = $(OBJDIR)/hveg2enc
 HVEG2ENC_G = $(OBJDIR)/hveg2enc_g
index c1a8aae8a4c1022f840241c440b2eb3e1759fb40..66126523e487de38e326024b38f14e1f1e5b70f8 100644 (file)
@@ -13,6 +13,13 @@ CFLAGS += $(static_incs)
 LIBS := $(LIBZMPEG3)/$(OBJDIR)/libzmpeg3.a
 LIBS += $(libraries)
 
+ifeq ($(WANT_CIN_3RDPARTY),no)
+LIBS += -la52
+endif
+ifeq ($(shell uname -o), Android)
+LIBS += jpt.a
+endif
+
 OUTPUT := $(OBJDIR)/mplexlo
 
 $(OUTPUT) all: $(OBJS)
index b5e196392900da159bae87caa628671dc62e314c..b494009bc76888d4ce6d3f877e4164dbf2e96ffd 100644 (file)
@@ -1,7 +1,7 @@
 include ../../plugin_defs
 
 OBJS = $(OBJDIR)/shapewipe.o
-LFLAGS += -lpng
+LFLAGS += `pkg-config --libs libpng`
 
 PLUGIN = shapewipe
 
index 3e520ac798d9c368e74b79d44688c6becb81b02f..44b43a333bd0b815d1c079e09fda76f4d3e7c225 100644 (file)
@@ -7,7 +7,7 @@ PLUGIN = titler
 CFLAGS += -Wall
 
 ifneq ($(STATIC_LIBRARIES), y)
-LFLAGS += -lfreetype
+LFLAGS += `pkg-config --libs freetype`
 endif
 
 include ../../plugin_config