3 AC_INIT([cinelerra],[5.1],[mail@lists.cinelerra-gg.org])
5 # Put autogenerated stuff in subdir m4, which must be created
6 # externally. This macro must be set before calling AC_INIT_AUTOMAKE
8 AM_INIT_AUTOMAKE([foreign])
15 CFG_CFLAGS+=" -fno-omit-frame-pointer -fno-math-errno -fno-signed-zeros"
16 CFG_CFLAGS+=" -pthread -Wall"
17 # misguided pedantic warnings
18 # this is extra work, not a gain...
19 #CFG_CFLAGS+=" -Wno-unknown-warning-option"
20 CFG_CFLAGS+=" -Wno-attributes"
21 CFG_CFLAGS+=" -Wno-unused-result"
22 CFG_CFLAGS+=" -Wno-stringop-overflow"
23 CFG_CFLAGS+=" -Wno-format-truncation"
24 CFG_CFLAGS+=" -Wno-format-overflow"
25 CFG_CFLAGS+=" -Wno-parentheses"
26 CFG_CFLAGS+=" -Wno-stringop-truncation"
27 CFG_CFLAGS+=" -D__STDC_CONSTANT_MACROS"
28 CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS"
29 CFG_CFLAGS+=" -DPNG_SKIP_SETJMP_CHECK=1"
30 CFG_CFLAGS+=" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
31 CFG_CFLAGS+=" -I/usr/include -I/usr/local/include"
32 CFG_CFLAGS+=" -I/usr/include/freetype2 -I/usr/local/include/freetype2"
33 CFG_CFLAGS+=" -I/data/data/com.termux/files/usr/include/freetype2"
34 CFG_CFLAGS+=" -I/usr/include/uuid -I/usr/local/include/uuid"
35 CFG_CFLAGS+=" -I/data/data/com.termux/files/usr/include/uuid -I/usr/local/include/uuid"
36 CFG_CFLAGS+=" -I/usr/include/mjpegtools -I/usr/local/include/mjpegtools"
38 AC_DEFUN([CHECK_WITH], [
40 AS_HELP_STRING([--with-[$1]],[$2 ($4)]),
41 [WANT_$3=$withval], [WANT_$3='$4'])
45 CHECK_WITH([jobs],[parallel build jobs],[JOBS],[auto])
46 CHECK_WITH([exec-name],[binary executable name],[CIN],[cin])
47 CHECK_WITH([single-user],[to install cin in bin],[CINBIN_BUILD],[no])
48 CHECK_WITH([lv2],[lv2 library support],[LV2],[yes])
49 CHECK_WITH([cinlib],[cinelerra library path],[CINLIB_DIR],[auto])
50 CHECK_WITH([cindat],[cinelerra share path],[CINDAT_DIR],[auto])
51 CHECK_WITH([plugin-dir],[plugin install dir],[PLUGIN_DIR],[auto])
52 CHECK_WITH([ladspa-dir],[ladspa install dir],[LADSPA_DIR],[auto])
53 CHECK_WITH([ladspa-build],[build ladspa library],[LADSPA_BUILD],[yes])
54 CHECK_WITH([config-dir],[.bcast config dir],[CONFIG_DIR],[$$HOME/.bcast5])
55 CHECK_WITH([nested-dir],[nested proxy dir],[NESTED_DIR],[$$HOME/Videos])
56 CHECK_WITH([snap-dir],[snapshot/grabshot dir],[SNAP_DIR],[$$HOME/Pictures])
57 CHECK_WITH([browser],[cin_browser path],[CIN_BROWSER],[firefox])
58 CHECK_WITH([git-ffmpeg],[git ffmpeg using url],[GIT_FFMPEG],[no])
59 CHECK_WITH([noelision],[use noelision/libpthread],[NOELISION],[auto])
60 CHECK_WITH([booby],[window lock trace booby trap],[BOOBY],[no])
61 CHECK_WITH([libzmpeg],[build libzmpeg],[LIBZMPEG],[yes])
62 CHECK_WITH([libdpx],[build libdpx],[LIBDPX],[auto])
63 CHECK_WITH([commercial],[enable commercial capture],[COMMERCIAL],[no])
64 CHECK_WITH([thirdparty],[use thirdparty build],[CIN_3RDPARTY],[yes])
65 CHECK_WITH([shuttle],[shuttle device],[SHUTTLE],[yes])
66 CHECK_WITH([wintv],[usb 2040:826d wintv device],[WINTV],[yes])
67 CHECK_WITH([x10tv],[usb 0bc7:0004 X10 remote device],[X10TV],[yes])
68 CHECK_WITH([vaapi],[video acceleration api],[VAAPI],[yes])
69 CHECK_WITH([vdpau],[video decode+presentation api for unix],[VDPAU],[yes])
70 CHECK_WITH([nv],[nvenc/nvdec ffnvcodec api],[NV],[yes])
71 CHECK_WITH([cuda],[nv cuda plugins],[CUDA],[auto])
72 CHECK_WITH([clang],[use clang instead of gcc/g++],[CLANG],[no])
73 CHECK_WITH([filegif],[enable filegif i/o], [GIFLIB],[yes])
75 if test "x$WANT_LV2" != "xno"; then
76 GTK2_LIBS=`pkg-config --libs gtk+-2.0`
77 AC_CHECK_LIB([m], [gtk_init], [HAVE_gtk=yes], [HAVE_gtk=no], [$GTK2_LIBS])
78 test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --cflags gtk+-2.0`" && HAVE_gtk=no
79 test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --libs gtk+-2.0`" && HAVE_gtk=no
80 if test "x$HAVE_gtk" = "xno"; then
81 AC_MSG_ERROR([LV2 requires gtk+-2.0 support.])
85 if test "x$WANT_COMMERCIAL" = "xyes" -a "x$WANT_LIBZMPEG" != "xyes" ; then
86 AC_MSG_ERROR([commercial requires libzmpeg support.])
89 if test "x$WANT_CINBIN_BUILD" = "xyes"; then
90 WANT_LOCALE_DIR='$$CIN_LIB/locale'
91 test "x$WANT_CINDAT_DIR" = "xauto" && WANT_CINDAT_DIR='$$CIN_PATH'
92 test "x$WANT_CINLIB_DIR" = "xauto" && WANT_CINLIB_DIR='$$CIN_PATH'
93 test "x$WANT_PLUGIN_DIR" = "xauto" && WANT_PLUGIN_DIR='$$CIN_LIB/plugins'
94 test "x$WANT_LADSPA_DIR" = "xauto" && WANT_LADSPA_DIR='$$CIN_LIB/ladspa'
96 lcldir=`test "x$prefix" = "xNONE" && prefix=$ac_default_prefix; \
97 test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"; \
98 eval "dir=\"$localedir\""; eval "dir=\"$dir\""; eval "dir=\"$dir\""; \
100 usrdat=`test "x$prefix" = "xNONE" && prefix=$ac_default_prefix; \
101 test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"; \
102 eval "dir=\"$datadir\""; eval "dir=\"$dir\""; eval "dir=\"$dir\""; \
104 usrlib=`test "x$prefix" = "xNONE" && prefix="$ac_default_prefix"; \
105 test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"; \
106 eval "dir=\"$libdir\""; eval "dir=\"$dir\""; eval "dir=\"$dir\""; \
108 test "x$usrlib" = "x/lib" -o "x$usrlib" = "x/usr/lib" -o \
109 "x$usrlib" = "x/usr/local/lib" -a -e "/usr/lib64" && \
110 test ! -e "/usr/lib" -o `ls -1 /usr/lib64 | wc -l` -gt `ls -1 /usr/lib | wc -l` && \
112 WANT_LOCALE_DIR="$lcldir"
113 test "x$WANT_CINDAT_DIR" = "xauto" && WANT_CINDAT_DIR="$usrdat/$WANT_CIN"
114 test "x$WANT_CINLIB_DIR" = "xauto" && WANT_CINLIB_DIR="$usrlib/$WANT_CIN"
115 test "x$WANT_PLUGIN_DIR" = "xauto" && WANT_PLUGIN_DIR="$WANT_CINLIB_DIR/plugins"
116 test "x$WANT_LADSPA_DIR" = "xauto" && WANT_LADSPA_DIR="$WANT_CINLIB_DIR/ladspa"
121 if test "x$WANT_LIBZMPEG" = "xyes"; then
122 CIN_INSTALLS+=" zmp_install"
123 CIN_UNINSTALLS+=" zmp_uninstall"
125 if test "x$WANT_COMMERCIAL" = "xyes"; then
126 CIN_INSTALLS+=" com_install"
127 CIN_UNINSTALLS+=" com_uninstall"
129 if test "x$WANT_LADSPA_BUILD" = "xyes"; then
130 CIN_INSTALLS+=" lad_install "
131 CIN_UNINSTALLS+=" lad_uninstall "
133 if test "x$WANT_LV2" = "xyes"; then
134 CIN_INSTALLS+=" lv2_install "
135 CIN_UNINSTALLS+=" lv2_uninstall "
137 AC_SUBST(CIN_INSTALLS)
138 AC_SUBST(CIN_UNINSTALLS)
140 if test "x$WANT_CINBIN_BUILD" = "xyes"; then
141 MAK_INSTALLS="dvl_install"
142 MAK_UNINSTALLS="dvl_uninstall"
144 MAK_INSTALLS=" sys_install"
145 MAK_UNINSTALLS="sys_uninstall"
147 AC_SUBST(MAK_INSTALLS)
148 AC_SUBST(MAK_UNINSTALLS)
150 if test "x$WANT_JOBS" = "xauto"; then
151 # CPUS=`grep -c "^proc" /proc/cpuinfo`
153 WANT_JOBS=`expr $CPUS + $CPUS / 2 + 2`
165 AS_HELP_STRING([--enable-$1],[build $1 ($2)]),
166 [PKG_$1=$enableval], [PKG_$1=$2])
167 PKG_DEF([$1],[$3],[$4],[$5])
172 PKG_3RD([a52dec],[yes],
174 [ liba52/.libs/liba52.a ],
177 PKG_3RD([djbfft],[yes],
182 PKG_3RD([audiofile],[no],
184 [ libaudiofile/.libs/libaudiofile.a \
185 libaudiofile/modules/.libs/libmodules.a \
186 libaudiofile/alac/.libs/libalac.a ],
189 PKG_3RD([encore],[no],
191 [ \$(OBJDIR)/libencore.a ],
194 PKG_3RD([esound],[no],
200 PKG_3RD([ffmpeg],[yes],
202 [ libavutil/libavutil.a \
203 libavcodec/libavcodec.a \
204 libpostproc/libpostproc.a \
205 libavformat/libavformat.a \
206 libswscale/libswscale.a \
207 libavfilter/libavfilter.a \
208 libswresample/libswresample.a ],
211 if test "x$WANT_GIT_FFMPEG" != "xno" ; then
212 ver_ffmpeg="ffmpeg.git"
215 PKG_3RD([fftw],[auto],
218 libbench2/libbench2.a \
219 rdft/scalar/r2cb/.libs/librdft_scalar_r2cb.a \
220 rdft/scalar/r2r/.libs/librdft_scalar_r2r.a \
221 rdft/scalar/.libs/librdft_scalar.a \
222 rdft/scalar/r2cf/.libs/librdft_scalar_r2cf.a \
223 rdft/.libs/librdft.a \
225 reodft/.libs/libreodft.a \
226 dft/scalar/codelets/.libs/libdft_scalar_codelets.a \
227 dft/scalar/.libs/libdft_scalar.a \
229 kernel/.libs/libkernel.a \
230 simd-support/.libs/libsimd_support.a ],
233 PKG_3RD([flac],[auto],
235 [ src/libFLAC/.libs/libFLAC.a \
236 src/libFLAC++/.libs/libFLAC++.a \
237 src/share/replaygain_analysis/.libs/libreplaygain_analysis.a \
238 src/share/replaygain_synthesis/.libs/libreplaygain_synthesis.a \
239 src/share/grabbag/.libs/libgrabbag.a \
240 src/share/utf8/.libs/libutf8.a \
241 src/test_libs_common/.libs/libtest_libs_common.a ],
244 PKG_3RD([giflib],[yes],
250 PKG_DEF([ladspa], [ladspa-0.4.17], [], [])
252 PKG_3RD([lame],[auto],
254 [ libmp3lame/.libs/libmp3lame.a \
255 mpglib/.libs/libmpgdecoder.a ],
258 PKG_3RD([libavc1394],[auto],
260 [ libavc1394/.libs/libavc1394.a \
261 librom1394/.libs/librom1394.a \
262 common/.libs/libraw1394util.a ],
265 PKG_3RD([libraw1394],[auto],
267 [ src/.libs/libraw1394.a ],
270 PKG_3RD([libiec61883],[auto],
272 [ src/.libs/libiec61883.a ],
275 PKG_3RD([libdv],[auto],
277 [ libdv/.libs/libdv.a ],
280 PKG_3RD([libjpeg],[auto],
281 [libjpeg-turbo-2.1.2],
283 build/libturbojpeg.a ],
284 [ opt/libjpeg-turbo/include ])
286 PKG_3RD([opus],[auto],
291 PKG_3RD([openjpeg],[auto],
293 [ bin/libopenjp2.a ],
296 PKG_3RD([libogg],[auto],
298 [ src/.libs/libogg.a ],
301 PKG_3RD([libsndfile],[auto],
303 [ src/.libs/libsndfile.a \
304 src/.libs/libcommon.a \
305 src/G72x/.libs/libg72x.a \
306 src/GSM610/.libs/libgsm.a ],
309 PKG_3RD([libtheora],[auto],
311 [ lib/.libs/libtheora.a \
312 lib/.libs/libtheoradec.a \
313 lib/.libs/libtheoraenc.a ],
316 PKG_3RD([libuuid],[yes],
321 PKG_3RD([libvorbis],[auto],
323 [ lib/.libs/libvorbis.a \
324 lib/.libs/libvorbisenc.a \
325 lib/.libs/libvorbisfile.a ],
330 I86=[`expr "x$ARCH" : 'xi[346]86.*'`]
331 X86=[`expr "x$ARCH" : 'x..._64*'`]
333 if test "x$I86$X86" != "x00" ; then
335 PKG_3RD([mjpegtools],[yes],
337 [ utils/mmxsse/.libs/libmmxsse.a \
338 utils/.libs/libmjpegutils.a \
339 lavtools/.libs/liblavfile.a \
340 lavtools/.libs/liblavjpeg.a \
341 mplex/.libs/libmplex2.a \
342 yuvfilters/.libs/libyuvfilters.a \
343 mpeg2enc/.libs/libmpeg2encpp.a ],
344 [ . lavtools utils ])
348 PKG_3RD([mjpegtools],[yes],
350 [ utils/.libs/libmjpegutils.a \
351 lavtools/.libs/liblavfile.a \
352 lavtools/.libs/liblavjpeg.a \
353 mplex/.libs/libmplex2.a \
354 yuvfilters/.libs/libyuvfilters.a \
355 mpeg2enc/.libs/libmpeg2encpp.a ],
356 [ . lavtools utils ])
360 PKG_3RD([openexr],[auto],
362 [ usr/local/lib/libHalf.a \
363 usr/local/lib/libIex.a \
364 usr/local/lib/libIexMath.a \
365 usr/local/lib/libIlmThread.a \
366 usr/local/lib/libImath.a \
367 usr/local/lib/libIlmImf.a \
368 usr/local/lib/libIlmImfUtil.a ],
369 [ usr/local/include/OpenEXR ])
371 PKG_3RD([openExr],[auto], [openExr], [] [])
372 PKG_3RD([ilmBase],[auto], [ilmBase], [] [])
374 #PKG_3RD([festival],[no],
378 #PKG_3RD(speech_tools,[no],
383 PKG_3RD([tiff],[auto],
385 [ libtiff/.libs/libtiff.a \
386 libtiff/.libs/libtiffxx.a \
387 port/.libs/libport.a ],[
390 PKG_3RD([twolame],[auto],
392 [ libtwolame/.libs/libtwolame.a ],
395 PKG_3RD([x264],[auto],
396 [x264-snapshot-20210615-master],
400 PKG_3RD([x265],[auto],
405 PKG_3RD([libvpx],[auto],
410 PKG_3RD([lv2],[auto],
413 [ usr/local/include usr/local/lib64/lv2 usr/local/lib/lv2 ])
415 PKG_3RD([sratom],[auto],
417 [ usr/local/lib/libsratom-0.a ],
418 [ usr/local/include ])
420 PKG_3RD([serd],[auto],
422 [ usr/local/lib/libserd-0.a ],
423 [ usr/local/include ])
425 PKG_3RD([sord],[auto],
427 [ usr/local/lib/libsord-0.a ],
428 [ usr/local/include ])
430 PKG_3RD([lilv],[auto],
432 [ usr/local/lib/liblilv-0.a ],
433 [ usr/local/include ])
435 PKG_3RD([suil],[auto],
437 [ usr/local/lib/libsuil-0.a ],
438 [ usr/local/include ])
440 PKG_3RD([libaom],[auto],
442 [ usr/local/lib*/libaom*.a ],
443 [ usr/local/include ])
445 PKG_3RD([dav1d],[auto],
447 [ usr/local/lib*/libdav1d*.a ],
448 [ usr/local/include ])
450 PKG_3RD([libwebp],[auto],
452 [ usr/local/lib*/libwebp*.a ],
453 [ usr/local/include ])
455 PKG_3RD([ffnvcodec],[auto],
460 PKG_3RD([libdpx],[auto],
465 if test [ "$(uname -o)"] = "Android" ; then
467 PKG_3RD([libbthread],[auto],
474 AC_SUBST(STATIC_PKGS)
476 AC_DEFUN([CHECK_ENABLE], [
478 AS_HELP_STRING([--enable-[$1]],[$3 ([$4])]),
479 [WANT_$2=$enableval], [WANT_$2=[$4]])
482 CHECK_ENABLE([static-build], [STATIC_BUILD], [build static], [auto])
483 CHECK_ENABLE([x264_hidepth], [X264_HIDEPTH], [build x264 10bit], [no])
484 CHECK_ENABLE([x265_hidepth], [X265_HIDEPTH], [build x265 10bit], [no])
486 test "x$WANT_STATIC_BUILD" = "xauto" && WANT_STATIC_BUILD=$WANT_CINBIN_BUILD
488 AC_DEFUN([CHECK_PROG], [
489 AC_CHECK_PROG([PROG_$1], [$2], [yes],[no])
491 AC_DEFUN([REQUIRE_PROG], [
492 CHECK_PROG([$1],[$2])
493 if test "x$PROG_$1" = "xno"; then
494 AC_MSG_WARN([$2 is missing and required.])
501 I86=[`expr "x$ARCH" : 'xi[346]86.*'`]
502 X86=[`expr "x$ARCH" : 'x..._64*'`]
504 if test "x$I86$X86" != "x00" ; then
505 # Checks for ix86 programs.
506 REQUIRE_PROG(NASM, [nasm])
508 AC_MSG_CHECKING([nasm x264 compatible])
509 echo "vmovdqa32 [[eax]]{k1}{z}, zmm0" > conftest.asm
510 nasm conftest.asm -o conftest.o > /dev/null 2>&1
511 if test $? != 0 ; then
513 AC_MSG_WARN([libx264 built without assembly code])
514 X264_CFG_PARAMS="$X264_CFG_PARAMS --disable-asm"
518 rm -f conftest.asm conftest.o
519 REQUIRE_PROG(YASM, [yasm])
522 if test "x$I86$X86" == "x00"; then
523 CFG_CFLAGS+=" -DNO_CTX -DNO_GDB -DNO_BTRACE"
526 ## end arch dep tests
528 REQUIRE_PROG(OBJCOPY, [objcopy])
529 if test "x$FATAL_ERROR" != "x"; then
530 AC_MSG_ERROR("fatal eror.")
532 CHECK_PROG(PACTL, [pactl])
533 WANT_PACTL=$PROG_PACTL
535 AC_CHECK_DECL([X_HAVE_UTF8_STRING],,[no_utf=yes],[#include <X11/Xlib.h>])
536 if test "$no_utf" = "yes"; then
537 AC_MSG_ERROR([Cinelerra requires utf8 support in X Windows.])
540 # Checks for headers/libraries.
542 AC_DEFUN([CHECK_HEADERS], [
543 if test "x$HAVE_$1" != "xno"; then
544 AC_CHECK_HEADER(m4_apply([m4_car],m4_split([$3])), [HAVE_$1=yes], [HAVE_$1=no],
545 [m4_foreach([i], m4_split([$3]), [[#include "]i["
548 AC_MSG_CHECKING([$2])
549 AC_MSG_RESULT([$HAVE_$1])
550 if test "x$HAVE_$1" = "xno"; then
551 if test "x$PKG_$1" = "x"; then RESULT=no; fi
556 AC_DEFUN([CHECK_LIB], [
557 if test "x$HAVE_$1" != "xno"; then
558 if test "x$PKG_$1" = "x" -o "x$WANT_STATIC_BUILD" = "xno" -a "x$PKG_$1" != "xno"; then
559 AC_CHECK_LIB([$2], [$3], [HAVE_$1=yes], [HAVE_$1=no], [$4])
561 if test "x$WANT_$1" != "xno"; then
562 if test "x$HAVE_$1" = "xyes"; then
563 if test "x$PKG_$1" = "x"; then
564 SYSTEM_LIBS+=" -l[$2]"
565 for lib in [$4]; do SYSTEM_LIBS+=" $lib"; done
568 for lib in [$4]; do SHARED_LIBS+=" $lib"; done
570 elif test "x$PKG_$1" = "x"; then
578 CHECK_LIB([X11], [X11], [XOpenDisplay])
579 CHECK_HEADERS([X11], [X11 headers], [X11/X.h X11/Xlib.h X11/Xutil.h X11/cursorfont.h])
580 CHECK_HEADERS([X11], [X11 headers], [X11/keysym.h X11/Sunkeysym.h X11/Xatom.h X11/XF86keysym.h])
581 CHECK_LIB([XEXT], [Xext], [XShmQueryExtension])
582 CHECK_HEADERS([XEXT], [Xlib XShm extention], [X11/Xlib.h X11/extensions/XShm.h X11/extensions/shape.h])
583 CHECK_LIB([XINERAMA], [Xinerama], [XineramaQueryExtension])
584 CHECK_HEADERS([XINERAMA], [Xinerama headers], [X11/extensions/Xinerama.h])
585 CHECK_LIB([XFIXES], [Xfixes], [XFixesQueryVersion])
586 CHECK_LIB([BZ2], [bz2], [BZ2_bzDecompress])
587 CHECK_LIB([FONTCONFIG], [fontconfig], [FcInit])
588 CHECK_LIB([FREETYPE], [freetype], [FT_Init_FreeType])
589 CHECK_LIB([LZMA], [lzma], [lzma_version_number])
590 CHECK_LIB([PNG], [png], [png_read_png])
591 CHECK_LIB([PTHREAD], [pthread], [pthread_create])
592 CHECK_LIB([Z], [z], [gzopen])
593 CHECK_LIB([fftw], [fftw3], [fftw_execute])
594 CHECK_HEADERS([fftw], [fftw headers], [fftw3.h])
595 CHECK_LIB([libuuid], [uuid], [uuid_clear])
596 CHECK_HEADERS([libuuid], [uuid headers], [uuid/uuid.h])
597 CHECK_HEADERS([LINUX_CDROM], [linux cdrom headers], [linux/cdrom.h linux/futex.h])
598 CHECK_HEADERS([LINUX_SYS], [linux sys], [sys/ioctl.h sys/stat.h sys/types.h sys/time.h sys/syscall.h])
599 CHECK_LIB([flac], [FLAC], [FLAC__stream_decoder_new])
600 CHECK_HEADERS([flac], [FLAC headers], [FLAC/stream_decoder.h])
601 CHECK_LIB([lame], [mp3lame], [lame_init])
602 CHECK_HEADERS([lame], [lame headers], [lame/lame.h])
603 CHECK_LIB([libjpeg], [jpeg], [jpeg_start_decompress])
604 CHECK_HEADERS([libjpeg], [jpeg headers], [stdio.h jpeglib.h])
605 CHECK_LIB([openjpeg], [openjp2], [opj_version])
606 CHECK_HEADERS([openjpeg], [openjpeg headers], [openjpeg.h])
607 CHECK_LIB([libsndfile], [sndfile], [sf_open])
608 CHECK_HEADERS([libsndfile], [sndfile headers], [sndfile.h])
609 CHECK_LIB([ilmbase], [IlmImf], [ImfOpenInputFile])
610 CHECK_HEADERS([ilmbase], [IlmImf headers], [OpenEXR/ImfCRgbaFile.h])
611 CHECK_LIB([libvpx], [vpx], [vpx_codec_decode])
612 CHECK_HEADERS([libvpx], [vpx headers], [vpx/vpx_decoder.h])
613 CHECK_LIB([mjpegtools], [mjpegutils], [mjpeg_info])
614 CHECK_HEADERS([mjpegtools], [mjpegtools headers], [mjpegtools/mjpeg_types.h])
615 CHECK_LIB([tiff], [tiff], [TIFFOpen])
616 CHECK_HEADERS([tiff], [tiff headers], [tiff.h tiffio.h])
617 CHECK_LIB([twolame], [twolame], [twolame_encode_buffer_float32_interleaved])
618 CHECK_HEADERS([twolame], [twolame headers], [twolame.h])
619 CHECK_LIB([x264], [x264], [x264_encoder_encode])
620 CHECK_HEADERS([x264], [x264 headers], [stdint.h x264.h])
621 CHECK_LIB([x265], [x265], [x265_encoder_encode])
622 CHECK_HEADERS([x265], [x265 headers], [x265.h])
623 CHECK_LIB([opus], [opus], [opus_multistream_decoder_create])
624 CHECK_HEADERS([opus], [libopus headers], [opus/opus_multistream.h])
625 CHECK_LIB([libaom], [aom], [aom_codec_version])
626 CHECK_HEADERS([libaom], [libaom headers], [aom/aom.h])
627 CHECK_LIB([dav1d], [dav1d], [dav1d_version])
628 CHECK_HEADERS([dav1d], [libdav1d headers], [dav1d/dav1d.h])
629 CHECK_LIB([libwebp], [webp], [WebPGetEncoderVersion])
630 CHECK_HEADERS([libwebp], [libwebp headers], [webp/encode.h])
631 CHECK_LIB([a52dec], [a52], [a52_init])
632 CHECK_HEADERS([a52dec], [a52 headers], [stdint.h a52.h])
633 CHECK_LIB([encore], [encore], [encore])
634 CHECK_HEADERS([encore], [encore headers], [encore.h])
635 CHECK_LIB([giflib], [gif], [DGifOpen])
636 CHECK_HEADERS([giflib], [gif lib headers], [gif_lib.h])
637 CHECK_LIB([jbig], [jbig], [jbg_dec_init])
639 CHECK_LIB([VDPAU], [vdpau], [vdp_device_create_x11])
640 if test "x$HAVE_VDPAU" != "xyes" -a "x$WANT_VDPAU" = "xyes"; then
641 AC_MSG_ERROR([requires vdpau support.])
644 CHECK_LIB([VAAPI], [va], [vaInitialize])
645 if test "x$HAVE_VAAPI" = "xyes" -a "x$WANT_VAAPI" != "xno"; then
646 CHECK_HEADERS([vaapi_x11], [va x11 headers], [va/va_x11.h])
647 CHECK_LIB([vaapi_x11], [va-x11], [vaGetDisplay])
648 CHECK_HEADERS([vaapi_drm], [va drm headers], [va/va_drm.h])
649 CHECK_LIB([vaapi_drm], [va-drm], [vaGetDisplayDRM])
651 if test "x$HAVE_VAAPI" != "xyes" -a "x$WANT_VAAPI" = "xyes"; then
652 AC_MSG_ERROR([requires vaapi support.])
655 #CHECK_LIB([NVENC], [nvidia-encode], [NvEncodeAPICreateInstance])
657 #if test "x$HAVE_mjpegtools" = "xyes"; then
658 #CFG_CFLAGS+=" -I/usr/include/mjpegtools -I/usr/local/include/mjpegtools"
661 AC_DEFUN([CHECK_WANT], [
664 AC_ARG_WITH(m4_tolower([$1]),
665 AS_HELP_STRING([m4_join([-],[--with],m4_tolower([$1]))],[$3 (auto)]),
666 [WANT_$1=$withval],[WANT_$1=$2])
668 if test "x$WANT_$1" = "xauto" ; then
670 elif test "x$WANT_$1" = "xyes" ; then
671 if test "x$RESULT" = "xno" -a "x$PKG_$1" = "x"; then
672 AC_MSG_ERROR([required for $1 support.])
679 CHECK_WANT([GL], [auto], [use opengl], [
680 CHECK_LIB([GL], [GL], [glUseProgram])
681 CHECK_LIB([GL], [GLU], [gluOrtho2D])
682 CHECK_HEADERS([GL], [opengl headers], [GL/gl.h GL/glext.h GL/glu.h GL/glx.h])])
684 CHECK_WANT([XV], [auto], [use xv], [
685 CHECK_LIB([xv], [Xv], [XvQueryExtension])
686 CHECK_HEADERS([xv], [Xlib Xv extention], [X11/Xlib.h X11/extensions/Xvlib.h])])
688 CHECK_WANT([OSS], [auto], [use OSS audio], [
689 CHECK_HEADERS([OSS], [oss headers], [sys/soundcard.h])])
691 CHECK_WANT([XFT], [auto], [use libXft], [
692 CHECK_LIB([XFT], [Xft], [XftInit])
693 CHECK_HEADERS([XFT], [Xft/freetype headers], [X11/Xlib.h X11/Xft/Xft.h])])
695 CHECK_WANT([ALSA], [auto], [use libasound/alsa], [
696 CHECK_LIB([ALSA], [asound], [snd_pcm_open])
697 CHECK_HEADERS([ALSA], [asound headers], [alsa/asoundlib.h])])
699 CHECK_WANT([OGG], [auto], [use ogg/theora/vorbis], [
700 CHECK_LIB([libogg], [ogg], [ogg_stream_init])
701 CHECK_HEADERS([libogg], [ogg headers], [ogg/ogg.h])
702 CHECK_LIB([libtheora], [theora], [theora_info_init], [-ltheoraenc -ltheoradec -logg])
703 CHECK_HEADERS([libtheora], [threora headers], [theora/theoraenc.h])
704 CHECK_LIB([libvorbis], [vorbisenc], [vorbis_encode_init], [-lvorbis -lvorbisfile -logg])
705 CHECK_HEADERS([libvorbis], [vorbis encoders headers], [vorbis/vorbisenc.h])
706 CHECK_LIB([libvorbis], [vorbisfile], [ov_open])
707 CHECK_HEADERS([libvorbis], [vorbis file headers], [vorbis/vorbisfile.h])])
709 CHECK_WANT([FIREWIRE], [auto], [use firewire], [
710 CHECK_LIB([libavc1394], [avc1394], [avc1394_init_target])
711 CHECK_HEADERS([libavc1394], [libavc1394 headers], [libavc1394/avc1394.h])
712 CHECK_LIB([libavc1394], [rom1394], [rom1394_get_bus_id])
713 CHECK_HEADERS([libavc1394], [librom1394 headers], [libavc1394/rom1394.h])
714 CHECK_LIB([libiec61883], [iec61883], [iec61883_mpeg2_recv_init])
715 CHECK_HEADERS([libiec61883], [libiec61883 headers], [libiec61883/iec61883.h])
716 CHECK_LIB([libraw1394], [raw1394], [raw1394_iso_recv_init])
717 CHECK_HEADERS([libraw1394], [libraw1394 headers], [libraw1394/raw1394.h])])
719 test "x$HAVE_libavc1394" = "xyes" && \
720 test "x$HAVE_libiec61883" = "xyes" && \
721 test "x$HAVE_libraw1394" = "xyes" && \
722 HAVE_FIREWIRE=yes || \
724 HAVE_libiec61883=no \
728 CHECK_WANT([DV], [auto], [use dv], [
729 CHECK_LIB([libdv], [dv], [dv_init])
730 CHECK_HEADERS([libdv], [libdv headers], [libdv/dv.h])])
732 CHECK_WANT([DVB], [auto], [use dvb], [
733 CHECK_HEADERS([DVB], [dvb device headers], [linux/dvb/dmx.h linux/dvb/frontend.h])])
735 CHECK_WANT([VIDEO4LINUX2], [auto], [use v4l2], [
736 CHECK_HEADERS([VIDEO4LINUX2], [v4l2 system headers], [linux/kernel.h linux/types.h linux/videodev2.h])])
738 CHECK_WANT([XXF86VM], [auto], [use xf86vmode], [
739 CHECK_HEADERS([XXF86VM], [XF86VM headers], [X11/Xlib.h X11/extensions/xf86vmode.h])])
741 CHECK_WANT([ESOUND], [no], [use esd], [
742 CHECK_LIB([esound], [esd], [esd_open_sound])
743 CHECK_HEADERS([esound], [esound headers], [esd.h])
744 CHECK_LIB([audiofile], [audiofile], [afOpenFile])
745 CHECK_HEADERS([audiofile], [audiofile headers], [audiofile.h])])
747 test "x$HAVE_esound" = "xyes" && \
748 test "x$HAVE_audiofile" = "xyes" && \
754 CHECK_WANT([PULSE], [auto], [use pulseaudio], [
755 CHECK_LIB([pulse_simple], [pulse-simple], [pa_simple_new])
756 CHECK_HEADERS([pulse_simple], [pulse-simple headers], [pulse/simple.h])
757 CHECK_LIB([pulse], [pulse], [pa_context_new])
758 CHECK_HEADERS([pulse], [pulse headers], [pulse/error.h])])
760 CHECK_WANT([ISOFS], [auto], [use isofs], [
761 CHECK_HEADERS([isofs], [isofs headers], [linux/isofs.h])])
763 if test "x$WANT_LADSPA_BUILD" != "xyes" ; then
764 CHECK_WANT([LADSPA], [auto], [ladspa plugin clients], [
765 CHECK_HEADERS([ladspa], [ladspa headers], [ladspa.h])])
770 CHECK_WANT([SHUTTLE], [yes], [shuttle dev support], [
771 CHECK_HEADERS([keysyms], [x11 keysym defs], [X11/keysymdef.h])])
772 if test "x$WANT_SHUTTLE" = "xno"; then
773 WANT_SHUTTLE_USB="no"
775 CHECK_WANT([SHUTTLE_USB], [yes], [use libusb-1.0], [
776 CHECK_LIB([libusbx], [usb-1.0], [libusb_init])
777 CHECK_HEADERS([libusbx], [libusb headers], [libusb-1.0/libusb.h])])
779 CHECK_WANT([LV2], [auto], [use lv2], [
780 saved_CFLAGS="$CFLAGS"
781 CHECK_LIB([lilv], [lilv-0], [lilv_world_new])
782 CHECK_LIB([sord], [sord-0], [sord_world_new])
783 CHECK_LIB([serd], [serd-0], [serd_reader_new])
784 CHECK_LIB([sratom], [sratom-0], [sratom_new])
785 CFLAGS="-I/usr/include/lilv-0 -I/usr/local/include/lilv-0"
786 CHECK_HEADERS([lv2], [lilv headers], [lilv/lilv.h])
787 CHECK_LIB([suil], [suil-0], [suil_instance_new])
788 CFLAGS="-I/usr/include/suil-0 -I/usr/local/include/suil-0"
789 CHECK_HEADERS([lv2], [suil headers], [suil/suil.h])
790 CFLAGS="$saved_CFLAGS"])
792 test "x$HAVE_lv2" = "xyes" && \
793 test "x$HAVE_lilv" = "xyes" && \
794 test "x$HAVE_sord" = "xyes" && \
795 test "x$HAVE_serd" = "xyes" && \
796 test "x$HAVE_sratom" = "xyes" && \
797 test "x$HAVE_suil" = "xyes" && \
807 CHECK_WANT([CUDA], [auto], [build cuda plugins], [
808 CHECK_HEADERS([CUDA], [cuda sdk], [${CUDA_PATH:-/usr/local/cuda}/include/cuda.h])])
810 CHECK_WANT([DL], [auto], [system has libdl], [
811 CHECK_LIB([DL], [dl], [dlopen])])
813 CHECK_WANT([OPENCV], [no], [opencv=sys/sta/dyn,git/tar=url], [
816 CHECK_WANT([NUMA], [auto], [system has libnuma], [
817 CHECK_LIB([NUMA], [numa], [numa_alloc])])
819 CHECK_WANT([OPENEXR], [auto], [use openexr], [
820 AC_MSG_CHECKING([for openexr available])
822 saved_CXXFLAGS="$CXXFLAGS"
824 LIBS=" -lIlmImf -lIlmThread -lIex -lpthread"
825 CXXFLAGS="-I/usr/include/OpenEXR -I/usr/local/include/OpenEXR"
827 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
828 #include "ImfChannelList.h"
829 #include "ImfChromaticities.h"
830 #include "ImfCompression.h"
832 #include "ImfInputFile.h"
833 #include "ImfOutputFile.h"
834 #include "ImfPixelType.h"
835 #include "ImfRgbaFile.h"
836 #include "ImfRgbaYca.h"
837 #include "ImfVersion.h"
838 class EXRIStream : public Imf::IStream { public:
839 EXRIStream() : Imf::IStream("mypath") {} };
840 class EXROStream : public Imf::OStream { public:
841 EXROStream() : Imf::OStream("mypath") {} };
842 ]])], [HAVE_OPENEXR=yes], [HAVE_OPENEXR=no])
843 if test "x$WANT_OPENEXR" = "xauto"; then
846 if test "x$WANT_OPENEXR" = "xyes" -a "x$HAVE_OPENEXR" = "xyes"; then
847 if test "x$WANT_STATIC_BUILD" = "xno"; then
848 SHARED_openexr="$LIBS"
849 SHARED_LIBS+=" $LIBS"
850 CFG_CFLAGS+=" -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR"
854 CXXFLAGS="$saved_CXXFLAGS"
856 AC_MSG_RESULT([$HAVE_OPENEXR])
858 AC_SUBST([HAVE_OPENEXR])
860 test "x$HAVE_openexr" = "xyes" && \
861 test "x$HAVE_ilmbase" = "xyes" && \
862 HAVE_OPENEXR=yes || \
867 # build global_config
871 echo "AS_HELP_STRING([Reason],[Package])"
872 echo "AS_HELP_STRING([------],[-------])"
874 AC_DEFUN([PKG_DISABLED],[
878 echo "AS_HELP_STRING([disabled],[$1])"
880 AC_DEFUN([PKG_SHARED],[
884 SHARED_LIBS+="$SHARED_$1"
887 AC_DEFUN([PKG_STATIC],[
888 if test "x$WANT_CIN_3RDPARTY" != "xno"; then
893 echo "AS_HELP_STRING([$2],[$1])"
897 AC_DEFUN([PKG_FORCED],[PKG_STATIC([$1],[forced])])
899 if test "x$WANT_CIN_3RDPARTY" != "xno"; then
902 ffmpeg/twolame ffmpeg/lame ffmpeg/openjpeg \
903 ffmpeg/libvorbis ffmpeg/libtheora ffmpeg/x264 ffmpeg/x265 \
904 libiec61883/libraw1394 libavc1394/librom1394 \
905 openexr/ilmbase ilmbase/libogg \
906 libtheora/libogg libtheora/libvorbis ; do
907 lib=`dirname $dep`; needs=`basename $dep`
908 eval pkg_lib="\$PKG_$lib"
909 if test "x$pkg_lib" != "xno"; then
910 eval "PKG_$needs=yes"
915 AC_DEFUN([PKG_PROVIDE],[
916 if test "x$BUILD_$1" = "x" ; then
917 if test "x$PKG_$1" = "xyes"; then
918 if test "x$WANT_CIN_3RDPARTY" = "xno"; then
923 elif test "x$2" = "xno" -o "x$PKG_$1" = "xno"; then
925 elif test "x$WANT_STATIC_BUILD" = "xyes"; then
926 PKG_STATIC([$1],[static])
927 elif test "x$HAVE_$1" = "xyes"; then
930 PKG_STATIC([$1],[needed])
935 PKG_PROVIDE([libbthread])
936 PKG_PROVIDE([a52dec])
937 PKG_PROVIDE([djbfft])
938 PKG_PROVIDE([encore])
939 PKG_PROVIDE([audiofile],[$WANT_ESOUND])
940 PKG_PROVIDE([esound],[$WANT_ESOUND])
941 PKG_PROVIDE([ffmpeg])
944 PKG_PROVIDE([giflib], [$WANT_GIFLIB])
945 PKG_PROVIDE([ilmBase], [$WANT_OPENEXR])
946 PKG_PROVIDE([ladspa],[$WANT_LADSPA_BUILD])
948 PKG_PROVIDE([libavc1394],[$WANT_FIREWIRE])
949 PKG_PROVIDE([libraw1394],[$WANT_FIREWIRE])
950 PKG_PROVIDE([libiec61883],[$WANT_FIREWIRE])
951 PKG_PROVIDE([libdv],[$WANT_DV])
952 PKG_PROVIDE([libjpeg])
953 PKG_PROVIDE([libogg])
954 PKG_PROVIDE([libsndfile])
955 PKG_PROVIDE([libtheora])
956 PKG_PROVIDE([libuuid])
957 PKG_PROVIDE([libvorbis])
958 PKG_PROVIDE([mjpegtools])
959 PKG_PROVIDE([libaom])
961 PKG_PROVIDE([libwebp])
962 PKG_PROVIDE([openExr], [$WANT_OPENEXR])
963 PKG_PROVIDE([openexr], [$WANT_OPENEXR])
964 PKG_PROVIDE([openjpeg])
966 PKG_PROVIDE([twolame])
969 PKG_PROVIDE([libvpx])
971 PKG_PROVIDE([lv2], [$WANT_LV2])
972 PKG_PROVIDE([lilv], [$WANT_LV2])
973 PKG_PROVIDE([sratom], [$WANT_LV2])
974 PKG_PROVIDE([serd], [$WANT_LV2])
975 PKG_PROVIDE([sord], [$WANT_LV2])
976 PKG_PROVIDE([suil], [$WANT_LV2])
977 PKG_PROVIDE([ffnvcodec], [$WANT_NV])
978 PKG_PROVIDE([libdpx])
980 if test "x$WANT_LV2" = "xyes"; then
981 if test "x$HAVE_lv2" = "xyes" -a "x$BUILD_lilv" = "x0"; then
982 CFG_CFLAGS+=' -I/usr/include/lilv-0 -I/usr/local/include/lilv-0'
983 CFG_CFLAGS+=' -I/usr/include/suil-0 -I/usr/local/include/suil-0'
987 AC_SUBST(STATIC_BLDS)
988 for f in $SHARED_LIBS; do
989 echo "AS_HELP_STRING([shared],[$f])"
991 AC_SUBST(SHARED_LIBS)
992 for f in $SYSTEM_LIBS; do
993 echo "AS_HELP_STRING([system],[$f])"
995 AC_SUBST(SYSTEM_LIBS)
998 if test "x$WANT_CIN_3RDPARTY" != "xno"; then
999 CFG_CFLAGS+=" -DHAVE_CIN_3RDPARTY"
1001 for v in GL XFT XXF86VM OSS ALSA FIREWIRE OGG DV DVB LADSPA \
1002 VIDEO4LINUX2 ESOUND PULSE PACTL OPENEXR LV2 \
1003 COMMERCIAL GIFLIB LIBZMPEG LIBDPX SHUTTLE SHUTTLE_USB XV \
1004 VAAPI VDPAU CUDA NV WINTV X10TV; do
1006 if test "x$vv" != "xno"; then
1007 CFG_CFLAGS+=" -DHAVE_$v"
1012 v=`echo "$v" | tr "A-Z" "a-z"`
1013 echo " using: $vv-$v"
1017 if test "x$WANT_CLANG" = "xyes" ; then
1018 FFMPEG_EXTRA_CFG+=' --cc=clang --cxx=clang++'
1020 if test "x$HAVE_tiff" = "xyes"; then
1021 if test "x$HAVE_jbig" = "xyes"; then
1022 EXTRA_LIBS+=' -ljbig'
1025 if test "x$HAVE_NUMA" = "xyes"; then
1026 EXTRA_LIBS+=' -lnuma'
1029 FFMPEG_EXTRA_LDFLAGS=""
1030 if test "x$WANT_VAAPI" != "xno" -a "x$HAVE_VAAPI" = "xyes"; then
1031 FFMPEG_EXTRA_LDFLAGS+=' -lva'
1034 if test "x$HAVE_vaapi_x11" = "xyes"; then
1035 FFMPEG_EXTRA_LDFLAGS+=' -lva-x11'
1036 EXTRA_LIBS+=' -lva-x11'
1038 if test "x$HAVE_vaapi_drm" = "xyes"; then
1039 FFMPEG_EXTRA_LDFLAGS+=' -lva-drm'
1040 EXTRA_LIBS+=' -lva-drm'
1045 if test "x$WANT_VDPAU" != "xno" -a "x$HAVE_VDPAU" = "xyes"; then
1050 if test "x$WANT_NV" != "xno"; then
1055 if test "x$HAVE_DL" = "xyes"; then
1057 FFMPEG_EXTRA_LDFLAGS+=' -ldl'
1059 if test "x$FFMPEG_EXTRA_LDFLAGS" != "x"; then
1060 FFMPEG_EXTRA_CFG+=' --extra-ldflags="'$FFMPEG_EXTRA_LDFLAGS'"'
1063 if test "x$WANT_BOOBY" != "xno"; then
1064 CFG_CFLAGS+=" -DBOOBY"
1067 if test [ "$(uname -o)"] = "Android" ; then
1069 EXTRA_LIBS+=' -liconv -landroid-shmem'
1072 # intel lock elision bugs
1073 if test "x$WANT_NOELISION" != "xno"; then
1074 CFG_RPATH=`ls -1fd 2> /dev/null \
1075 /usr/lib/noelision \
1077 /usr/lib64/noelision \
1082 echo " using: with-jobs = $WANT_JOBS"
1083 echo " using: exec-name = $WANT_CIN"
1084 echo " using: with-cinlib = $WANT_CINLIB_DIR"
1085 echo " using: with-cindat = $WANT_CINDAT_DIR"
1086 echo " using: with-config-dir = $WANT_CONFIG_DIR"
1087 echo " using: with-nested-dir = $WANT_NESTED_DIR"
1088 echo " using: with-snap-dir = $WANT_SNAP_DIR"
1089 echo " using: with-browser = $WANT_CIN_BROWSER"
1090 echo " using: with-plugin-dir = $WANT_PLUGIN_DIR"
1091 echo " using: with-ladspa-dir = $WANT_LADSPA_DIR"
1092 echo " using: with-opencv = $WANT_OPENCV"
1093 echo " using: with-git-ffmpeg = $WANT_GIT_FFMPEG"
1094 echo " using: with-noelision = $WANT_NOELISION"
1095 echo " using: with-booby = $WANT_BOOBY"
1096 echo " using: with-clang = $WANT_CLANG"
1098 echo " using: thirdparty build = $WANT_CIN_3RDPARTY"
1099 echo " using: single-user = $WANT_CINBIN_BUILD"
1100 echo " using: static-build = $WANT_STATIC_BUILD"
1101 echo " using: ladspa-build = $WANT_LADSPA_BUILD"
1104 AC_SUBST(WANT_CIN_3RDPARTY)
1105 AC_SUBST(EXTRA_LIBS)
1106 AC_SUBST(FFMPEG_EXTRA_CFG)
1107 AC_SUBST(WANT_X264_HIDEPTH)
1108 AC_SUBST(WANT_X265_HIDEPTH)
1110 AC_SUBST(CFG_CFLAGS)
1111 AC_SUBST(CFG_CXXFLAGS)
1113 AC_CONFIG_FILES([Makefile])
1116 exec > global_config
1118 echo "SHELL := /bin/bash"
1120 echo "WANT_JOBS := $WANT_JOBS"
1121 if test "x$WANT_CLANG" = "xyes" ; then
1123 echo "CXX = clang++"
1124 echo "export CC CXX"
1127 echo "OBJDIR := $OBJDIR"
1128 echo "BINDIR := \$(TOPDIR)/bin"
1129 echo "CINELERRA := \$(TOPDIR)/cinelerra"
1130 echo "GUICAST := \$(TOPDIR)/guicast"
1131 echo "LIBZMPEG3 := \$(TOPDIR)/libzmpeg3"
1132 echo "MPEG2ENC := \$(TOPDIR)/mpeg2enc"
1133 echo "MPLEXLO := \$(TOPDIR)/mplexlo"
1134 echo "PLUGINS := \$(TOPDIR)/plugins"
1135 echo "TDB := \$(TOPDIR)/db"
1136 echo "THIRDPARTY := \$(TOPDIR)/thirdparty"
1137 echo "EXTRA_LIBS := $EXTRA_LIBS"
1138 echo "FFMPEG_EXTRA_CFG := $FFMPEG_EXTRA_CFG"
1139 echo "export OBJDIR BINDIR CINELERRA GUICAST LIBZMPEG3"
1140 echo "export MPEG2ENC MPLEXLO PLUGINS TDB"
1141 echo "export THIRDPARTY EXTRA_LIBS FFMPEG_EXTRA_CFG"
1144 echo "WANT_CIN := $WANT_CIN"
1145 CFG_WANTS+=" CIN_3RDPARTY LIBZMPEG COMMERCIAL STATIC_BUILD"
1146 for w in $CFG_WANTS; do ww=WANT_$w; echo "WANT_$w := ${!ww}"; done
1149 echo "ifndef CFLAGS_"
1151 echo "CFLAGS_ := \$(CFLAGS)"
1153 echo "CFLAGS_ := ${CFLAGS:--g -O2}"
1156 echo "ifndef CXXFLAGS_"
1157 echo "ifdef CXXFLAGS"
1158 echo "CXXFLAGS_ := \$(CXXFLAGS)"
1161 echo "ifndef LDFLAGS_"
1162 echo "ifdef LDFLAGS"
1163 echo "LDFLAGS_ := \$(LDFLAGS)"
1167 echo "CFLAGS := \$(CFLAGS_)"
1168 echo "CFLAGS += '-DCIN=\"\$(WANT_CIN)\"'"
1169 echo "CFLAGS += '-DCINLIB_DIR=\"$WANT_CINLIB_DIR\"'"
1170 echo "CFLAGS += '-DCINDAT_DIR=\"$WANT_CINDAT_DIR\"'"
1171 echo "CFLAGS += '-DCONFIG_DIR=\"$WANT_CONFIG_DIR\"'"
1172 echo "CFLAGS += '-DNESTED_DIR=\"$WANT_NESTED_DIR\"'"
1173 echo "CFLAGS += '-DSNAP_DIR=\"$WANT_SNAP_DIR\"'"
1174 echo "CFLAGS += '-DPLUGIN_DIR=\"$WANT_PLUGIN_DIR\"'"
1175 echo "CFLAGS += '-DLOCALE_DIR=\"$WANT_LOCALE_DIR\"'"
1176 echo "CFLAGS += '-DLADSPA_DIR=\"$WANT_LADSPA_DIR\"'"
1177 echo "CFLAGS += '-DCIN_BROWSER=\"$WANT_CIN_BROWSER\"'"
1178 for flg in $CFG_CFLAGS; do echo "CFLAGS += $flg"; done
1180 if test "x$CFG_CXXFLAGS" != "x"; then
1181 for flg in $CFG_CXXFLAGS; do echo "CXXFLAGS += $flg"; done
1184 if test "x$CFG_LDFLAGS" != "x" ; then
1185 echo "LDFLAGS +=$CFG_LDFLAGS"
1189 if test "x$CYGWIN" != "x" ; then
1190 echo 'FF_PATH ?= /usr/local'
1191 echo 'LDFLAGS += -L$(FF_PATH)/lib'
1192 echo 'CFLAGS += -I$(FF_PATH)/include'
1194 echo "CFLAGS += -DNO_BTRACE"
1195 echo "CFLAGS += -DNO_GDB"
1196 echo "CFLAGS += -DNO_CTX"
1197 echo "CFLAGS += -DNO_PRCTL"
1198 echo "CFLAGS += -DNO_TID"
1199 echo "CFLAGS += -DNO_XSELECT"
1202 LDFLAGS+=" -z noexecstack"
1204 if test "x$BSD" != "x" ; then
1205 echo "CFLAGS += -DNO_PRCTL"
1206 echo "CFLAGS += -DNO_TID"
1207 echo "CFLAGS += -DNO_GDB"
1210 if test "x$WANT_X264_HIDEPTH" = "xyes" ; then
1211 X264_CFG_PARAMS="$X264_CFG_PARAMS --bit-depth=10"
1213 if test "x$WANT_X265_HIDEPTH" = "xyes" ; then
1214 X265_CFG_PARAMS="$X265_CFG_PARAMS -DHIGH_BIT_DEPTH:BOOL=ON" # -DMAIN12:BOOL=ON"
1217 for pkg in $STATIC_PKGS; do
1218 eval pkg_lib="\$PKG_$pkg"
1219 if test "x$pkg_lib" = "xyes"; then
1220 echo "static_pkgs += $pkg"
1221 elif test "x$pkg_lib" = "xshared"; then
1222 echo "shared_pkgs += $pkg"
1227 for pkg in $STATIC_BLDS; do
1228 echo "static_blds += $pkg"
1230 echo "$ver_pkg := \$(THIRDPARTY)/${!ver_pkg}"
1232 echo "$inc_pkg := \\"
1233 for inc in ${!inc_pkg}; do
1234 echo " -I\$($ver_pkg)/$inc \\"
1237 echo "static_incs += \$(inc_$pkg)"
1239 echo "$lib_pkg := \\"
1240 for lib in ${!lib_pkg}; do
1241 echo " \$($ver_pkg)/$lib \\"
1244 echo "static_libs += \$($lib_pkg)"
1249 for lib in $SHARED_LIBS; do echo "shared_libs += $lib"; done
1251 for lib in $SYSTEM_LIBS; do echo "system_libs += $lib"; done
1252 echo "export static_pkgs shared_pkgs static_blds shared_libs system_libs"
1255 echo "thirdparty_libraries := \$(static_libs) \$(shared_libs)"
1257 if test "x$CFG_RPATH" != "x"; then
1258 echo "libraries+= -Wl,-rpath=$CFG_RPATH"
1261 echo "libraries += -Wl,--start-group"
1262 echo "libraries += \$(thirdparty_libraries)"
1263 echo "libraries += \$(shared_libs)"
1264 echo "libraries += \$(system_libs)"
1265 echo "libraries += \$(EXTRA_LIBS)"
1266 echo "libraries += -Wl,--end-group"
1267 # -Wl,--start-group ... -Wl,--end-group does not work on ubuntu
1268 echo "libraries += \$(thirdparty_libraries)"
1269 echo "libraries += \$(shared_libs)"
1270 echo "libraries += \$(system_libs)"
1271 echo "libraries += \$(EXTRA_LIBS)"
1273 echo "export thirdparty_libraries libraries"
1274 echo "export CFLAGS_ CXXFLAGS_ LDFLAGS_"
1275 echo "unexport CFLAGS CXXFLAGS LDFLAGS"
1277 if test "x$HAVE_tiff" = "xyes"; then
1278 if test "x$HAVE_jbig" != "xyes"; then
1279 echo "tiff.cfg_params+= --disable-jbig"
1283 if test "x$WANT_GIT_FFMPEG" != "xno"; then
1284 echo "ffmpeg.git := $WANT_GIT_FFMPEG"
1286 if test "x$X264_CFG_PARAMS" != "x" ; then
1287 echo "x264.cfg_params :=$X264_CFG_PARAMS --enable-static --enable-pic"
1289 if test "x$X265_CFG_PARAMS" != "x" ; then
1290 echo "x265.cfg_params :=$X265_CFG_PARAMS -DENABLE_SHARED=no"