From: Good Guy Date: Sun, 8 May 2022 16:42:32 +0000 (-0600) Subject: fixes and changes to Makefile for more generality X-Git-Tag: 2022-05~9 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=cb36bca7007d514ffabb46ded2cdfed53ad3fe76;p=goodguy%2Fcinelerra.git fixes and changes to Makefile for more generality --- diff --git a/cinelerra-5.1/blds/termux_dyn.bld b/cinelerra-5.1/blds/termux_dyn.bld index b557686c..c24f686a 100755 --- a/cinelerra-5.1/blds/termux_dyn.bld +++ b/cinelerra-5.1/blds/termux_dyn.bld @@ -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 diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac index e83d4666..f1414a79 100644 --- a/cinelerra-5.1/configure.ac +++ b/cinelerra-5.1/configure.ac @@ -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" diff --git a/cinelerra-5.1/guicast/Makefile b/cinelerra-5.1/guicast/Makefile index d771b462..354b40b2 100644 --- a/cinelerra-5.1/guicast/Makefile +++ b/cinelerra-5.1/guicast/Makefile @@ -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) diff --git a/cinelerra-5.1/libzmpeg3/Makefile b/cinelerra-5.1/libzmpeg3/Makefile index 47a0596f..c5b8a083 100644 --- a/cinelerra-5.1/libzmpeg3/Makefile +++ b/cinelerra-5.1/libzmpeg3/Makefile @@ -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) diff --git a/cinelerra-5.1/mpeg2enc/Makefile b/cinelerra-5.1/mpeg2enc/Makefile index 80e0f8f9..bab267cf 100644 --- a/cinelerra-5.1/mpeg2enc/Makefile +++ b/cinelerra-5.1/mpeg2enc/Makefile @@ -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 diff --git a/cinelerra-5.1/mplexlo/Makefile b/cinelerra-5.1/mplexlo/Makefile index c1a8aae8..66126523 100644 --- a/cinelerra-5.1/mplexlo/Makefile +++ b/cinelerra-5.1/mplexlo/Makefile @@ -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) diff --git a/cinelerra-5.1/plugins/shapewipe/Makefile b/cinelerra-5.1/plugins/shapewipe/Makefile index b5e19639..b494009b 100644 --- a/cinelerra-5.1/plugins/shapewipe/Makefile +++ b/cinelerra-5.1/plugins/shapewipe/Makefile @@ -1,7 +1,7 @@ include ../../plugin_defs OBJS = $(OBJDIR)/shapewipe.o -LFLAGS += -lpng +LFLAGS += `pkg-config --libs libpng` PLUGIN = shapewipe diff --git a/cinelerra-5.1/plugins/titler/Makefile b/cinelerra-5.1/plugins/titler/Makefile index 3e520ac7..44b43a33 100644 --- a/cinelerra-5.1/plugins/titler/Makefile +++ b/cinelerra-5.1/plugins/titler/Makefile @@ -7,7 +7,7 @@ PLUGIN = titler CFLAGS += -Wall ifneq ($(STATIC_LIBRARIES), y) -LFLAGS += -lfreetype +LFLAGS += `pkg-config --libs freetype` endif include ../../plugin_config