4 AM_INIT_AUTOMAKE([foreign])
11 CFG_CFLAGS+=" -fno-omit-frame-pointer -fno-math-errno -fno-signed-zeros"
12 CFG_CFLAGS+=" -pthread -Wall"
13 # misguided pedantic warnings
14 # this is extra work, not a gain...
15 CFG_CFLAGS+=" -Wno-unknown-warning-option"
16 CFG_CFLAGS+=" -Wno-attributes"
17 CFG_CFLAGS+=" -Wno-unused-result"
18 CFG_CFLAGS+=" -Wno-stringop-overflow"
19 CFG_CFLAGS+=" -Wno-format-truncation"
20 CFG_CFLAGS+=" -Wno-format-overflow"
21 CFG_CFLAGS+=" -Wno-parentheses"
22 CFG_CFLAGS+=" -Wno-stringop-truncation"
23 CFG_CFLAGS+=" -D__STDC_CONSTANT_MACROS"
24 CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS"
25 CFG_CFLAGS+=" -DPNG_SKIP_SETJMP_CHECK=1"
26 CFG_CFLAGS+=" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
27 CFG_CFLAGS+=" -I/usr/include -I/usr/local/include"
28 CFG_CFLAGS+=" -I/usr/include/freetype2 -I/usr/local/include/freetype2"
29 CFG_CFLAGS+=" -I/usr/include/uuid -I/usr/local/include/uuid"
30 CFG_CFLAGS+=" -I/usr/include/mjpegtools -I/usr/local/include/mjpegtools"
32 AC_DEFUN([CHECK_WITH], [
34 AC_HELP_STRING([--with-[$1]], [$2 ($4)]),
35 [WANT_$3=$withval], [WANT_$3='$4'])
39 CHECK_WITH([jobs],[parallel build jobs],[JOBS],[auto])
40 CHECK_WITH([exec-name],[binary executable name],[CIN],[cin])
41 CHECK_WITH([single-user],[to install cin in bin],[CINBIN_BUILD],[no])
42 CHECK_WITH([lv2],[lv2 library support],[LV2],[yes])
43 CHECK_WITH([cinlib],[cinelerra library path],[CINLIB_DIR],[auto])
44 CHECK_WITH([cindat],[cinelerra share path],[CINDAT_DIR],[auto])
45 CHECK_WITH([plugin-dir],[plugin install dir],[PLUGIN_DIR],[auto])
46 CHECK_WITH([ladspa-dir],[ladspa install dir],[LADSPA_DIR],[auto])
47 CHECK_WITH([ladspa-build],[build ladspa library],[LADSPA_BUILD],[yes])
48 CHECK_WITH([config-dir],[.bcast config dir],[CONFIG_DIR],[$$HOME/.bcast5])
49 CHECK_WITH([nested-dir],[nested proxy dir],[NESTED_DIR],[$$HOME/Videos])
50 CHECK_WITH([snap-dir],[snapshot/grabshot dir],[SNAP_DIR],[$$HOME/Pictures])
51 CHECK_WITH([browser],[cin_browser path],[CIN_BROWSER],[firefox])
52 CHECK_WITH([git-ffmpeg],[git ffmpeg using url],[GIT_FFMPEG],[no])
53 CHECK_WITH([noelision],[use noelision/libpthread],[NOELISION],[auto])
54 CHECK_WITH([booby],[window lock trace booby trap],[BOOBY],[no])
55 CHECK_WITH([libzmpeg],[build libzmpeg],[LIBZMPEG],[yes])
56 CHECK_WITH([commercial],[enable commercial capture],[COMMERCIAL],[no])
57 CHECK_WITH([thirdparty],[use thirdparty build],[CIN_3RDPARTY],[yes])
58 CHECK_WITH([shuttle],[shuttle device],[SHUTTLE],[yes])
59 CHECK_WITH([wintv],[usb 2040:826d wintv device],[WINTV],[yes])
60 CHECK_WITH([x10tv],[usb 0bc7:0004 X10 remote device],[X10TV],[yes])
61 CHECK_WITH([vaapi],[video acceleration api],[VAAPI],[yes])
62 CHECK_WITH([vdpau],[video decode+presentation api for unix],[VDPAU],[yes])
63 CHECK_WITH([nv],[nvenc/nvdec ffnvcodec api],[NV],[yes])
64 CHECK_WITH([cuda],[nv cuda plugins],[CUDA],[auto])
65 CHECK_WITH([clang],[use clang instead of gcc/g++],[CLANG],[no])
67 if test "x$WANT_LV2" != "xno"; then
68 GTK2_LIBS=`pkg-config --libs gtk+-2.0`
69 AC_CHECK_LIB([m], [gtk_init], [HAVE_gtk=yes], [HAVE_gtk=no], [$GTK2_LIBS])
70 test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --cflags gtk+-2.0`" && HAVE_gtk=no
71 test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --libs gtk+-2.0`" && HAVE_gtk=no
72 if test "x$HAVE_gtk" = "xno"; then
73 AC_MSG_ERROR([LV2 requires gtk+-2.0 support.])
77 if test "x$WANT_COMMERCIAL" = "xyes" -a "x$WANT_LIBZMPEG" != "xyes" ; then
78 AC_MSG_ERROR([commercial requires libzmpeg support.])
81 if test "x$WANT_CINBIN_BUILD" = "xyes"; then
82 WANT_LOCALE_DIR='$$CIN_LIB/locale'
83 test "x$WANT_CINDAT_DIR" = "xauto" && WANT_CINDAT_DIR='$$CIN_PATH'
84 test "x$WANT_CINLIB_DIR" = "xauto" && WANT_CINLIB_DIR='$$CIN_PATH'
85 test "x$WANT_PLUGIN_DIR" = "xauto" && WANT_PLUGIN_DIR='$$CIN_LIB/plugins'
86 test "x$WANT_LADSPA_DIR" = "xauto" && WANT_LADSPA_DIR='$$CIN_LIB/ladspa'
88 lcldir=`test "x$prefix" = "xNONE" && prefix=$ac_default_prefix; \
89 test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"; \
90 eval "dir=\"$localedir\""; eval "dir=\"$dir\""; eval "dir=\"$dir\""; \
92 usrdat=`test "x$prefix" = "xNONE" && prefix=$ac_default_prefix; \
93 test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"; \
94 eval "dir=\"$datadir\""; eval "dir=\"$dir\""; eval "dir=\"$dir\""; \
96 usrlib=`test "x$prefix" = "xNONE" && prefix="$ac_default_prefix"; \
97 test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"; \
98 eval "dir=\"$libdir\""; eval "dir=\"$dir\""; eval "dir=\"$dir\""; \
100 test "x$usrlib" = "x/lib" -o "x$usrlib" = "x/usr/lib" -o \
101 "x$usrlib" = "x/usr/local/lib" -a -e "/usr/lib64" && \
102 test ! -e "/usr/lib" -o `ls -1 /usr/lib64 | wc -l` -gt `ls -1 /usr/lib | wc -l` && \
104 WANT_LOCALE_DIR="$lcldir"
105 test "x$WANT_CINDAT_DIR" = "xauto" && WANT_CINDAT_DIR="$usrdat/$WANT_CIN"
106 test "x$WANT_CINLIB_DIR" = "xauto" && WANT_CINLIB_DIR="$usrlib/$WANT_CIN"
107 test "x$WANT_PLUGIN_DIR" = "xauto" && WANT_PLUGIN_DIR="$WANT_CINLIB_DIR/plugins"
108 test "x$WANT_LADSPA_DIR" = "xauto" && WANT_LADSPA_DIR="$WANT_CINLIB_DIR/ladspa"
113 if test "x$WANT_LIBZMPEG" = "xyes"; then
114 CIN_INSTALLS+=" zmp_install"
115 CIN_UNINSTALLS+=" zmp_uninstall"
117 if test "x$WANT_COMMERCIAL" = "xyes"; then
118 CIN_INSTALLS+=" com_install"
119 CIN_UNINSTALLS+=" com_uninstall"
121 if test "x$WANT_LADSPA_BUILD" = "xyes"; then
122 CIN_INSTALLS+=" lad_install "
123 CIN_UNINSTALLS+=" lad_uninstall "
125 if test "x$WANT_LV2" = "xyes"; then
126 CIN_INSTALLS+=" lv2_install "
127 CIN_UNINSTALLS+=" lv2_uninstall "
129 AC_SUBST(CIN_INSTALLS)
130 AC_SUBST(CIN_UNINSTALLS)
132 if test "x$WANT_CINBIN_BUILD" = "xyes"; then
133 MAK_INSTALLS="dvl_install"
134 MAK_UNINSTALLS="dvl_uninstall"
136 MAK_INSTALLS=" sys_install"
137 MAK_UNINSTALLS="sys_uninstall"
139 AC_SUBST(MAK_INSTALLS)
140 AC_SUBST(MAK_UNINSTALLS)
142 if test "x$WANT_JOBS" = "xauto"; then
143 CPUS=`grep -c "^proc" /proc/cpuinfo`
144 WANT_JOBS=`expr $CPUS + $CPUS / 2 + 2`
156 AC_HELP_STRING([--enable-$1],[build $1 ($2)]),
157 [PKG_$1=$enableval], [PKG_$1=$2])
158 PKG_DEF([$1],[$3],[$4],[$5])
163 PKG_3RD([a52dec],[yes],
165 [ liba52/.libs/liba52.a ],
168 PKG_3RD([djbfft],[yes],
173 PKG_3RD([audiofile],[no],
175 [ libaudiofile/.libs/libaudiofile.a \
176 libaudiofile/modules/.libs/libmodules.a \
177 libaudiofile/alac/.libs/libalac.a ],
180 PKG_3RD([encore],[no],
182 [ \$(OBJDIR)/libencore.a ],
185 PKG_3RD([esound],[no],
191 PKG_3RD([ffmpeg],[yes],
193 [ libavutil/libavutil.a \
194 libavcodec/libavcodec.a \
195 libpostproc/libpostproc.a \
196 libavdevice/libavdevice.a \
197 libavformat/libavformat.a \
198 libswscale/libswscale.a \
199 libavfilter/libavfilter.a \
200 libswresample/libswresample.a ],
203 if test "x$WANT_GIT_FFMPEG" != "xno" ; then
204 ver_ffmpeg="ffmpeg.git"
207 PKG_3RD([fftw],[auto],
210 libbench2/libbench2.a \
211 rdft/scalar/r2cb/.libs/librdft_scalar_r2cb.a \
212 rdft/scalar/r2r/.libs/librdft_scalar_r2r.a \
213 rdft/scalar/.libs/librdft_scalar.a \
214 rdft/scalar/r2cf/.libs/librdft_scalar_r2cf.a \
215 rdft/.libs/librdft.a \
217 reodft/.libs/libreodft.a \
218 dft/scalar/codelets/.libs/libdft_scalar_codelets.a \
219 dft/scalar/.libs/libdft_scalar.a \
221 kernel/.libs/libkernel.a \
222 simd-support/.libs/libsimd_support.a ],
225 PKG_3RD([flac],[auto],
227 [ src/libFLAC/.libs/libFLAC.a \
228 src/libFLAC++/.libs/libFLAC++.a \
229 src/share/replaygain_analysis/.libs/libreplaygain_analysis.a \
230 src/share/replaygain_synthesis/.libs/libreplaygain_synthesis.a \
231 src/share/grabbag/.libs/libgrabbag.a \
232 src/share/utf8/.libs/libutf8.a \
233 src/test_libs_common/.libs/libtest_libs_common.a ],
236 PKG_3RD([giflib],[yes],
242 PKG_DEF([ladspa], [ladspa-0.4.17], [], [])
244 PKG_3RD([lame],[auto],
246 [ libmp3lame/.libs/libmp3lame.a \
247 mpglib/.libs/libmpgdecoder.a ],
250 PKG_3RD([libavc1394],[auto],
252 [ libavc1394/.libs/libavc1394.a \
253 librom1394/.libs/librom1394.a \
254 common/.libs/libraw1394util.a ],
257 PKG_3RD([libraw1394],[auto],
259 [ src/.libs/libraw1394.a ],
262 PKG_3RD([libiec61883],[auto],
264 [ src/.libs/libiec61883.a ],
267 PKG_3RD([libdv],[auto],
269 [ libdv/.libs/libdv.a ],
272 PKG_3RD([libjpeg],[auto],
273 [libjpeg-turbo-2.1.0],
275 build/libturbojpeg.a ],
276 [ opt/libjpeg-turbo/include ])
278 PKG_3RD([opus],[auto],
283 PKG_3RD([openjpeg],[auto],
285 [ bin/libopenjp2.a ],
288 PKG_3RD([libogg],[auto],
290 [ src/.libs/libogg.a ],
293 PKG_3RD([libsndfile],[auto],
295 [ src/.libs/libsndfile.a \
296 src/.libs/libcommon.a \
297 src/G72x/.libs/libg72x.a \
298 src/GSM610/.libs/libgsm.a ],
301 PKG_3RD([libtheora],[auto],
303 [ lib/.libs/libtheora.a \
304 lib/.libs/libtheoradec.a \
305 lib/.libs/libtheoraenc.a ],
308 PKG_3RD([libuuid],[yes],
313 PKG_3RD([libvorbis],[auto],
315 [ lib/.libs/libvorbis.a \
316 lib/.libs/libvorbisenc.a \
317 lib/.libs/libvorbisfile.a ],
320 PKG_3RD([mjpegtools],[yes],
322 [ utils/mmxsse/.libs/libmmxsse.a \
323 utils/.libs/libmjpegutils.a \
324 lavtools/.libs/liblavfile.a \
325 lavtools/.libs/liblavjpeg.a \
326 mplex/.libs/libmplex2.a \
327 yuvfilters/.libs/libyuvfilters.a \
328 mpeg2enc/.libs/libmpeg2encpp.a ],
329 [ . lavtools utils ])
331 PKG_3RD([openexr],[auto],
333 [ usr/local/lib/libHalf.a \
334 usr/local/lib/libIex.a \
335 usr/local/lib/libIexMath.a \
336 usr/local/lib/libIlmThread.a \
337 usr/local/lib/libImath.a \
338 usr/local/lib/libIlmImf.a \
339 usr/local/lib/libIlmImfUtil.a ],
340 [ usr/local/include/OpenEXR ])
342 PKG_3RD([openExr],[auto], [openExr], [] [])
343 PKG_3RD([ilmBase],[auto], [ilmBase], [] [])
345 #PKG_3RD([festival],[no],
349 #PKG_3RD(speech_tools,[no],
354 PKG_3RD([tiff],[auto],
356 [ libtiff/.libs/libtiff.a \
357 libtiff/.libs/libtiffxx.a \
358 port/.libs/libport.a ],[
361 PKG_3RD([twolame],[auto],
363 [ libtwolame/.libs/libtwolame.a ],
366 PKG_3RD([x264],[auto],
367 [x264-snapshot-20191217-2245-stable],
371 PKG_3RD([x265],[auto],
376 PKG_3RD([libvpx],[auto],
381 PKG_3RD([lv2],[auto],
384 [ usr/local/include usr/local/lib64/lv2 usr/local/lib/lv2 ])
386 PKG_3RD([sratom],[auto],
388 [ usr/local/lib/libsratom-0.a ],
389 [ usr/local/include ])
391 PKG_3RD([serd],[auto],
393 [ usr/local/lib/libserd-0.a ],
394 [ usr/local/include ])
396 PKG_3RD([sord],[auto],
398 [ usr/local/lib/libsord-0.a ],
399 [ usr/local/include ])
401 PKG_3RD([lilv],[auto],
403 [ usr/local/lib/liblilv-0.a ],
404 [ usr/local/include ])
406 PKG_3RD([suil],[auto],
408 [ usr/local/lib/libsuil-0.a ],
409 [ usr/local/include ])
411 PKG_3RD([libaom],[auto],
413 [ usr/local/lib*/libaom*.a ],
414 [ usr/local/include ])
416 PKG_3RD([dav1d],[auto],
418 [ usr/local/lib*/libdav1d*.a ],
419 [ usr/local/include ])
421 PKG_3RD([libwebp],[auto],
423 [ usr/local/lib*/libwebp*.a ],
424 [ usr/local/include ])
426 PKG_3RD([ffnvcodec],[auto],
431 AC_SUBST(STATIC_PKGS)
433 AC_DEFUN([CHECK_ENABLE], [
435 AC_HELP_STRING([--enable-[$1]], [$3 ([$4])]),
436 [WANT_$2=$enableval], [WANT_$2=[$4]])
439 CHECK_ENABLE([static-build], [STATIC_BUILD], [build static], [auto])
440 CHECK_ENABLE([x264_hidepth], [X264_HIDEPTH], [build x264 10bit], [no])
441 CHECK_ENABLE([x265_hidepth], [X265_HIDEPTH], [build x265 10bit], [no])
443 test "x$WANT_STATIC_BUILD" = "xauto" && WANT_STATIC_BUILD=$WANT_CINBIN_BUILD
445 AC_DEFUN([CHECK_PROG], [
446 AC_CHECK_PROG([PROG_$1], [$2], [yes],[no])
448 AC_DEFUN([REQUIRE_PROG], [
449 CHECK_PROG([$1],[$2])
450 if test "x$PROG_$1" = "xno"; then
451 AC_MSG_WARN([$2 is missing and required.])
458 I86=[`expr "x$ARCH" : 'xi[346]86.*'`]
459 X86=[`expr "x$ARCH" : 'x..._64*'`]
461 if test "x$I86$X86" != "x00" ; then
462 # Checks for ix86 programs.
463 REQUIRE_PROG(NASM, [nasm])
465 AC_MSG_CHECKING([nasm x264 compatible])
466 echo "vmovdqa32 [[eax]]{k1}{z}, zmm0" > conftest.asm
467 nasm conftest.asm -o conftest.o > /dev/null 2>&1
468 if test $? != 0 ; then
470 AC_MSG_WARN([libx264 built without assembly code])
471 X264_CFG_PARAMS="$X264_CFG_PARAMS --disable-asm"
475 rm -f conftest.asm conftest.o
476 REQUIRE_PROG(YASM, [yasm])
479 ## end arch dep tests
481 REQUIRE_PROG(OBJCOPY, [objcopy])
482 if test "x$FATAL_ERROR" != "x"; then
483 AC_MSG_ERROR("fatal eror.")
485 CHECK_PROG(PACTL, [pactl])
486 WANT_PACTL=$PROG_PACTL
488 AC_CHECK_DECL([X_HAVE_UTF8_STRING],,[no_utf=yes],[#include <X11/Xlib.h>])
489 if test "$no_utf" = "yes"; then
490 AC_MSG_ERROR([Cinelerra requires utf8 support in X Windows.])
493 # Checks for headers/libraries.
495 AC_DEFUN([CHECK_HEADERS], [
496 if test "x$HAVE_$1" != "xno"; then
497 AC_CHECK_HEADER(m4_apply([m4_car],m4_split([$3])), [HAVE_$1=yes], [HAVE_$1=no],
498 [m4_foreach([i], m4_split([$3]), [[#include "]i["
501 AC_MSG_CHECKING([$2])
502 AC_MSG_RESULT([$HAVE_$1])
503 if test "x$HAVE_$1" = "xno"; then
504 if test "x$PKG_$1" = "x"; then RESULT=no; fi
509 AC_DEFUN([CHECK_LIB], [
510 if test "x$HAVE_$1" != "xno"; then
511 if test "x$PKG_$1" = "x" -o "x$WANT_STATIC_BUILD" = "xno" -a "x$PKG_$1" != "xno"; then
512 AC_CHECK_LIB([$2], [$3], [HAVE_$1=yes], [HAVE_$1=no], [$4])
514 if test "x$WANT_$1" != "xno"; then
515 if test "x$HAVE_$1" = "xyes"; then
516 if test "x$PKG_$1" = "x"; then
517 SYSTEM_LIBS+=" -l[$2]"
518 for lib in [$4]; do SYSTEM_LIBS+=" $lib"; done
521 for lib in [$4]; do SHARED_LIBS+=" $lib"; done
523 elif test "x$PKG_$1" = "x"; then
531 CHECK_LIB([X11], [X11], [XOpenDisplay])
532 CHECK_HEADERS([X11], [X11 headers], [X11/X.h X11/Xlib.h X11/Xutil.h X11/cursorfont.h])
533 CHECK_HEADERS([X11], [X11 headers], [X11/keysym.h X11/Sunkeysym.h X11/Xatom.h X11/XF86keysym.h])
534 CHECK_LIB([XEXT], [Xext], [XShmQueryExtension])
535 CHECK_HEADERS([XEXT], [Xlib XShm extention], [X11/Xlib.h X11/extensions/XShm.h X11/extensions/shape.h])
536 CHECK_LIB([XINERAMA], [Xinerama], [XineramaQueryExtension])
537 CHECK_HEADERS([XINERAMA], [Xinerama headers], [X11/extensions/Xinerama.h])
538 CHECK_LIB([XFIXES], [Xfixes], [XFixesQueryVersion])
539 CHECK_LIB([BZ2], [bz2], [BZ2_bzDecompress])
540 CHECK_LIB([FONTCONFIG], [fontconfig], [FcInit])
541 CHECK_LIB([FREETYPE], [freetype], [FT_Init_FreeType])
542 CHECK_LIB([LZMA], [lzma], [lzma_version_number])
543 CHECK_LIB([PNG], [png], [png_read_png])
544 CHECK_LIB([PTHREAD], [pthread], [pthread_create])
545 CHECK_LIB([Z], [z], [gzopen])
546 CHECK_LIB([fftw], [fftw3], [fftw_execute])
547 CHECK_HEADERS([fftw], [fftw headers], [fftw3.h])
548 CHECK_LIB([libuuid], [uuid], [uuid_clear])
549 CHECK_HEADERS([libuuid], [uuid headers], [uuid/uuid.h])
550 CHECK_HEADERS([LINUX_CDROM], [linux cdrom headers], [linux/cdrom.h linux/futex.h])
551 CHECK_HEADERS([LINUX_SYS], [linux sys], [sys/ioctl.h sys/stat.h sys/types.h sys/time.h sys/syscall.h])
552 CHECK_LIB([flac], [FLAC], [FLAC__stream_decoder_new])
553 CHECK_HEADERS([flac], [FLAC headers], [FLAC/stream_decoder.h])
554 CHECK_LIB([lame], [mp3lame], [lame_init])
555 CHECK_HEADERS([lame], [lame headers], [lame/lame.h])
556 CHECK_LIB([libjpeg], [jpeg], [jpeg_start_decompress])
557 CHECK_HEADERS([libjpeg], [jpeg headers], [stdio.h jpeglib.h])
558 CHECK_LIB([openjpeg], [openjp2], [opj_version])
559 CHECK_HEADERS([openjpeg], [openjpeg headers], [openjpeg.h])
560 CHECK_LIB([libsndfile], [sndfile], [sf_open])
561 CHECK_HEADERS([libsndfile], [sndfile headers], [sndfile.h])
562 CHECK_LIB([ilmbase], [IlmImf], [ImfOpenInputFile])
563 CHECK_HEADERS([ilmbase], [IlmImf headers], [OpenEXR/ImfCRgbaFile.h])
564 CHECK_LIB([libvpx], [vpx], [vpx_codec_decode])
565 CHECK_HEADERS([libvpx], [vpx headers], [vpx/vpx_decoder.h])
566 CHECK_LIB([mjpegtools], [mjpegutils], [mjpeg_info])
567 CHECK_HEADERS([mjpegtools], [mjpegtools headers], [mjpegtools/mjpeg_types.h])
568 CHECK_LIB([tiff], [tiff], [TIFFOpen])
569 CHECK_HEADERS([tiff], [tiff headers], [tiff.h tiffio.h])
570 CHECK_LIB([twolame], [twolame], [twolame_encode_buffer_float32_interleaved])
571 CHECK_HEADERS([twolame], [twolame headers], [twolame.h])
572 CHECK_LIB([x264], [x264], [x264_encoder_encode])
573 CHECK_HEADERS([x264], [x264 headers], [stdint.h x264.h])
574 CHECK_LIB([x265], [x265], [x265_encoder_encode])
575 CHECK_HEADERS([x265], [x265 headers], [x265.h])
576 CHECK_LIB([opus], [opus], [opus_multistream_decoder_create])
577 CHECK_HEADERS([opus], [libopus headers], [opus/opus_multistream.h])
578 CHECK_LIB([libaom], [aom], [aom_codec_version])
579 CHECK_HEADERS([libaom], [libaom headers], [aom/aom.h])
580 CHECK_LIB([dav1d], [dav1d], [dav1d_version])
581 CHECK_HEADERS([dav1d], [libdav1d headers], [dav1d/dav1d.h])
582 CHECK_LIB([libwebp], [webp], [WebPGetEncoderVersion])
583 CHECK_HEADERS([libwebp], [libwebp headers], [webp/encode.h])
584 CHECK_LIB([a52dec], [a52], [a52_init])
585 CHECK_HEADERS([a52dec], [a52 headers], [stdint.h a52.h])
586 CHECK_LIB([encore], [encore], [encore])
587 CHECK_HEADERS([encore], [encore headers], [encore.h])
588 CHECK_LIB([giflib], [gif], [DGifOpen])
589 CHECK_HEADERS([giflib], [gif lib headers], [gif_lib.h])
590 CHECK_LIB([jbig], [jbig], [jbg_dec_init])
592 CHECK_LIB([VDPAU], [vdpau], [vdp_device_create_x11])
593 if test "x$HAVE_VDPAU" != "xyes" -a "x$WANT_VDPAU" = "xyes"; then
594 AC_MSG_ERROR([requires vdpau support.])
597 CHECK_LIB([VAAPI], [va], [vaInitialize])
598 if test "x$HAVE_VAAPI" = "xyes" -a "x$WANT_VAAPI" != "xno"; then
599 CHECK_HEADERS([vaapi_x11], [va x11 headers], [va/va_x11.h])
600 CHECK_LIB([vaapi_x11], [va-x11], [vaGetDisplay])
601 CHECK_HEADERS([vaapi_drm], [va drm headers], [va/va_drm.h])
602 CHECK_LIB([vaapi_drm], [va-drm], [vaGetDisplayDRM])
604 if test "x$HAVE_VAAPI" != "xyes" -a "x$WANT_VAAPI" = "xyes"; then
605 AC_MSG_ERROR([requires vaapi support.])
608 #CHECK_LIB([NVENC], [nvidia-encode], [NvEncodeAPICreateInstance])
610 #if test "x$HAVE_mjpegtools" = "xyes"; then
611 #CFG_CFLAGS+=" -I/usr/include/mjpegtools -I/usr/local/include/mjpegtools"
614 AC_DEFUN([CHECK_WANT], [
617 AC_ARG_WITH(m4_tolower([$1]),
618 AC_HELP_STRING([m4_join([-],[--with],m4_tolower([$1]))], [$3] (auto)),
619 [WANT_$1=$withval],[WANT_$1=$2])
621 if test "x$WANT_$1" = "xauto" ; then
623 elif test "x$WANT_$1" = "xyes" ; then
624 if test "x$RESULT" = "xno" -a "x$PKG_$1" = "x"; then
625 AC_MSG_ERROR([required for $1 support.])
632 CHECK_WANT([GL], [auto], [use opengl], [
633 CHECK_LIB([GL], [GL], [glUseProgram])
634 CHECK_LIB([GL], [GLU], [gluOrtho2D])
635 CHECK_HEADERS([GL], [opengl headers], [GL/gl.h GL/glext.h GL/glu.h GL/glx.h])])
637 CHECK_WANT([XV], [auto], [use xv], [
638 CHECK_LIB([xv], [Xv], [XvQueryExtension])
639 CHECK_HEADERS([xv], [Xlib Xv extention], [X11/Xlib.h X11/extensions/Xvlib.h])])
641 CHECK_WANT([OSS], [auto], [use OSS audio], [
642 CHECK_HEADERS([OSS], [oss headers], [sys/soundcard.h])])
644 CHECK_WANT([XFT], [auto], [use libXft], [
645 CHECK_LIB([XFT], [Xft], [XftInit])
646 CHECK_HEADERS([XFT], [Xft/freetype headers], [X11/Xlib.h X11/Xft/Xft.h])])
648 CHECK_WANT([ALSA], [auto], [use libasound/alsa], [
649 CHECK_LIB([ALSA], [asound], [snd_pcm_open])
650 CHECK_HEADERS([ALSA], [asound headers], [alsa/asoundlib.h])])
652 CHECK_WANT([OGG], [auto], [use ogg/theora/vorbis], [
653 CHECK_LIB([libogg], [ogg], [ogg_stream_init])
654 CHECK_HEADERS([libogg], [ogg headers], [ogg/ogg.h])
655 CHECK_LIB([libtheora], [theora], [theora_info_init], [-ltheoraenc -ltheoradec -logg])
656 CHECK_HEADERS([libtheora], [threora headers], [theora/theoraenc.h])
657 CHECK_LIB([libvorbis], [vorbisenc], [vorbis_encode_init], [-lvorbis -lvorbisfile -logg])
658 CHECK_HEADERS([libvorbis], [vorbis encoders headers], [vorbis/vorbisenc.h])
659 CHECK_LIB([libvorbis], [vorbisfile], [ov_open])
660 CHECK_HEADERS([libvorbis], [vorbis file headers], [vorbis/vorbisfile.h])])
662 CHECK_WANT([FIREWIRE], [auto], [use firewire], [
663 CHECK_LIB([libavc1394], [avc1394], [avc1394_init_target])
664 CHECK_HEADERS([libavc1394], [libavc1394 headers], [libavc1394/avc1394.h])
665 CHECK_LIB([libavc1394], [rom1394], [rom1394_get_bus_id])
666 CHECK_HEADERS([libavc1394], [librom1394 headers], [libavc1394/rom1394.h])
667 CHECK_LIB([libiec61883], [iec61883], [iec61883_mpeg2_recv_init])
668 CHECK_HEADERS([libiec61883], [libiec61883 headers], [libiec61883/iec61883.h])
669 CHECK_LIB([libraw1394], [raw1394], [raw1394_iso_recv_init])
670 CHECK_HEADERS([libraw1394], [libraw1394 headers], [libraw1394/raw1394.h])])
672 test "x$HAVE_libavc1394" = "xyes" && \
673 test "x$HAVE_libiec61883" = "xyes" && \
674 test "x$HAVE_libraw1394" = "xyes" && \
675 HAVE_FIREWIRE=yes || \
677 HAVE_libiec61883=no \
681 CHECK_WANT([DV], [auto], [use dv], [
682 CHECK_LIB([libdv], [dv], [dv_init])
683 CHECK_HEADERS([libdv], [libdv headers], [libdv/dv.h])])
685 CHECK_WANT([DVB], [auto], [use dvb], [
686 CHECK_HEADERS([DVB], [dvb device headers], [linux/dvb/dmx.h linux/dvb/frontend.h])])
688 CHECK_WANT([VIDEO4LINUX2], [auto], [use v4l2], [
689 CHECK_HEADERS([VIDEO4LINUX2], [v4l2 system headers], [linux/kernel.h linux/types.h linux/videodev2.h])])
691 CHECK_WANT([XXF86VM], [auto], [use xf86vmode], [
692 CHECK_HEADERS([XXF86VM], [XF86VM headers], [X11/Xlib.h X11/extensions/xf86vmode.h])])
694 CHECK_WANT([ESOUND], [no], [use esd], [
695 CHECK_LIB([esound], [esd], [esd_open_sound])
696 CHECK_HEADERS([esound], [esound headers], [esd.h])
697 CHECK_LIB([audiofile], [audiofile], [afOpenFile])
698 CHECK_HEADERS([audiofile], [audiofile headers], [audiofile.h])])
700 test "x$HAVE_esound" = "xyes" && \
701 test "x$HAVE_audiofile" = "xyes" && \
707 CHECK_WANT([PULSE], [auto], [use pulseaudio], [
708 CHECK_LIB([pulse_simple], [pulse-simple], [pa_simple_new])
709 CHECK_HEADERS([pulse_simple], [pulse-simple headers], [pulse/simple.h])
710 CHECK_LIB([pulse], [pulse], [pa_context_new])
711 CHECK_HEADERS([pulse], [pulse headers], [pulse/error.h])])
713 CHECK_WANT([ISOFS], [auto], [use isofs], [
714 CHECK_HEADERS([isofs], [isofs headers], [linux/isofs.h])])
716 if test "x$WANT_LADSPA_BUILD" != "xyes" ; then
717 CHECK_WANT([LADSPA], [auto], [ladspa plugin clients], [
718 CHECK_HEADERS([ladspa], [ladspa headers], [ladspa.h])])
723 CHECK_WANT([SHUTTLE], [yes], [shuttle dev support], [
724 CHECK_HEADERS([keysyms], [x11 keysym defs], [X11/keysymdef.h])])
725 if test "x$WANT_SHUTTLE" = "xno"; then
726 WANT_SHUTTLE_USB="no"
728 CHECK_WANT([SHUTTLE_USB], [yes], [use libusb-1.0], [
729 CHECK_LIB([libusbx], [usb-1.0], [libusb_init])
730 CHECK_HEADERS([libusbx], [libusb headers], [libusb-1.0/libusb.h])])
732 CHECK_WANT([LV2], [auto], [use lv2], [
733 saved_CFLAGS="$CFLAGS"
734 CHECK_LIB([lilv], [lilv-0], [lilv_world_new])
735 CHECK_LIB([sord], [sord-0], [sord_world_new])
736 CHECK_LIB([serd], [serd-0], [serd_reader_new])
737 CHECK_LIB([sratom], [sratom-0], [sratom_new])
738 CFLAGS="-I/usr/include/lilv-0 -I/usr/local/include/lilv-0"
739 CHECK_HEADERS([lv2], [lilv headers], [lilv/lilv.h])
740 CHECK_LIB([suil], [suil-0], [suil_instance_new])
741 CFLAGS="-I/usr/include/suil-0 -I/usr/local/include/suil-0"
742 CHECK_HEADERS([lv2], [suil headers], [suil/suil.h])
743 CFLAGS="$saved_CFLAGS"])
745 test "x$HAVE_lv2" = "xyes" && \
746 test "x$HAVE_lilv" = "xyes" && \
747 test "x$HAVE_sord" = "xyes" && \
748 test "x$HAVE_serd" = "xyes" && \
749 test "x$HAVE_sratom" = "xyes" && \
750 test "x$HAVE_suil" = "xyes" && \
760 CHECK_WANT([CUDA], [auto], [build cuda plugins], [
761 CHECK_HEADERS([CUDA], [cuda sdk], [${CUDA_PATH:-/usr/local/cuda}/include/cuda.h])])
763 CHECK_WANT([DL], [auto], [system has libdl], [
764 CHECK_LIB([DL], [dl], [dlopen])])
766 CHECK_WANT([OPENCV], [no], [opencv=sys/sta/dyn,git/tar=url], [
769 CHECK_WANT([NUMA], [auto], [system has libnuma], [
770 CHECK_LIB([NUMA], [numa], [numa_alloc])])
772 CHECK_WANT([OPENEXR], [auto], [use openexr], [
773 AC_MSG_CHECKING([for openexr available])
775 saved_CXXFLAGS="$CXXFLAGS"
777 LIBS=" -lIlmImf -lIlmThread -lIex -lpthread"
778 CXXFLAGS="-I/usr/include/OpenEXR -I/usr/local/include/OpenEXR"
780 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
781 #include "ImfChannelList.h"
782 #include "ImfChromaticities.h"
783 #include "ImfCompression.h"
785 #include "ImfInputFile.h"
786 #include "ImfOutputFile.h"
787 #include "ImfPixelType.h"
788 #include "ImfRgbaFile.h"
789 #include "ImfRgbaYca.h"
790 #include "ImfVersion.h"
791 class EXRIStream : public Imf::IStream { public:
792 EXRIStream() : Imf::IStream("mypath") {} };
793 class EXROStream : public Imf::OStream { public:
794 EXROStream() : Imf::OStream("mypath") {} };
795 ]])], [HAVE_OPENEXR=yes], [HAVE_OPENEXR=no])
796 if test "x$WANT_OPENEXR" = "xauto"; then
799 if test "x$WANT_OPENEXR" = "xyes" -a "x$HAVE_OPENEXR" = "xyes"; then
800 if test "x$WANT_STATIC_BUILD" = "xno"; then
801 SHARED_openexr="$LIBS"
802 SHARED_LIBS+=" $LIBS"
803 CFG_CFLAGS+=" -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR"
807 CXXFLAGS="$saved_CXXFLAGS"
809 AC_MSG_RESULT([$HAVE_OPENEXR])
811 AC_SUBST([HAVE_OPENEXR])
813 test "x$HAVE_openexr" = "xyes" && \
814 test "x$HAVE_ilmbase" = "xyes" && \
815 HAVE_OPENEXR=yes || \
820 # build global_config
824 echo "AC_HELP_STRING([Reason],[Package])"
825 echo "AC_HELP_STRING([------],[-------])"
827 AC_DEFUN([PKG_DISABLED],[
831 echo "AC_HELP_STRING([disabled],[$1])"
833 AC_DEFUN([PKG_SHARED],[
837 SHARED_LIBS+="$SHARED_$1"
840 AC_DEFUN([PKG_STATIC],[
841 if test "x$WANT_CIN_3RDPARTY" != "xno"; then
846 echo "AC_HELP_STRING([$2],[$1])"
850 AC_DEFUN([PKG_FORCED],[PKG_STATIC([$1],[forced])])
852 if test "x$WANT_CIN_3RDPARTY" != "xno"; then
855 ffmpeg/twolame ffmpeg/lame ffmpeg/openjpeg \
856 ffmpeg/libvorbis ffmpeg/libtheora ffmpeg/x264 ffmpeg/x265 \
857 libiec61883/libraw1394 libavc1394/librom1394 \
858 openexr/ilmbase ilmbase/libogg \
859 libtheora/libogg libtheora/libvorbis ; do
860 lib=`dirname $dep`; needs=`basename $dep`
861 eval pkg_lib="\$PKG_$lib"
862 if test "x$pkg_lib" != "xno"; then
863 eval "PKG_$needs=yes"
868 AC_DEFUN([PKG_PROVIDE],[
869 if test "x$BUILD_$1" = "x" ; then
870 if test "x$PKG_$1" = "xyes"; then
871 if test "x$WANT_CIN_3RDPARTY" = "xno"; then
876 elif test "x$2" = "xno" -o "x$PKG_$1" = "xno"; then
878 elif test "x$WANT_STATIC_BUILD" = "xyes"; then
879 PKG_STATIC([$1],[static])
880 elif test "x$HAVE_$1" = "xyes"; then
883 PKG_STATIC([$1],[needed])
888 PKG_PROVIDE([a52dec])
889 PKG_PROVIDE([djbfft])
890 PKG_PROVIDE([encore])
891 PKG_PROVIDE([audiofile],[$WANT_ESOUND])
892 PKG_PROVIDE([esound],[$WANT_ESOUND])
893 PKG_PROVIDE([ffmpeg])
896 PKG_PROVIDE([giflib])
897 PKG_PROVIDE([ilmBase], [$WANT_OPENEXR])
898 PKG_PROVIDE([ladspa],[$WANT_LADSPA_BUILD])
900 PKG_PROVIDE([libavc1394],[$WANT_FIREWIRE])
901 PKG_PROVIDE([libraw1394],[$WANT_FIREWIRE])
902 PKG_PROVIDE([libiec61883],[$WANT_FIREWIRE])
903 PKG_PROVIDE([libdv],[$WANT_DV])
904 PKG_PROVIDE([libjpeg])
905 PKG_PROVIDE([libogg])
906 PKG_PROVIDE([libsndfile])
907 PKG_PROVIDE([libtheora])
908 PKG_PROVIDE([libuuid])
909 PKG_PROVIDE([libvorbis])
910 PKG_PROVIDE([mjpegtools])
911 PKG_PROVIDE([libaom])
913 PKG_PROVIDE([libwebp])
914 PKG_PROVIDE([openExr], [$WANT_OPENEXR])
915 PKG_PROVIDE([openexr], [$WANT_OPENEXR])
916 PKG_PROVIDE([openjpeg])
918 PKG_PROVIDE([twolame])
921 PKG_PROVIDE([libvpx])
923 PKG_PROVIDE([lv2], [$WANT_LV2])
924 PKG_PROVIDE([lilv], [$WANT_LV2])
925 PKG_PROVIDE([sratom], [$WANT_LV2])
926 PKG_PROVIDE([serd], [$WANT_LV2])
927 PKG_PROVIDE([sord], [$WANT_LV2])
928 PKG_PROVIDE([suil], [$WANT_LV2])
929 PKG_PROVIDE([ffnvcodec], [$WANT_NV])
931 if test "x$WANT_LV2" = "xyes"; then
932 if test "x$HAVE_lv2" = "xyes" -a "x$BUILD_lilv" = "x0"; then
933 CFG_CFLAGS+=' -I/usr/include/lilv-0 -I/usr/local/include/lilv-0'
934 CFG_CFLAGS+=' -I/usr/include/suil-0 -I/usr/local/include/suil-0'
938 AC_SUBST(STATIC_BLDS)
939 for f in $SHARED_LIBS; do
940 echo "AC_HELP_STRING([shared],[$f])"
942 AC_SUBST(SHARED_LIBS)
943 for f in $SYSTEM_LIBS; do
944 echo "AC_HELP_STRING([system],[$f])"
946 AC_SUBST(SYSTEM_LIBS)
949 if test "x$WANT_CIN_3RDPARTY" != "xno"; then
950 CFG_CFLAGS+=" -DHAVE_CIN_3RDPARTY"
952 for v in GL XFT XXF86VM OSS ALSA FIREWIRE OGG DV DVB LADSPA \
953 VIDEO4LINUX2 ESOUND PULSE PACTL OPENEXR LV2 \
954 COMMERCIAL LIBZMPEG SHUTTLE SHUTTLE_USB XV \
955 VAAPI VDPAU CUDA NV WINTV X10TV; do
957 if test "x$vv" != "xno"; then
958 CFG_CFLAGS+=" -DHAVE_$v"
963 v=`echo "$v" | tr "A-Z" "a-z"`
964 echo " using: $vv-$v"
968 if test "x$WANT_CLANG" = "xyes" ; then
969 FFMPEG_EXTRA_CFG+=' --cc=clang --cxx=clang++'
971 if test "x$HAVE_tiff" = "xyes"; then
972 if test "x$HAVE_jbig" = "xyes"; then
973 EXTRA_LIBS+=' -ljbig'
976 if test "x$HAVE_NUMA" = "xyes"; then
977 EXTRA_LIBS+=' -lnuma'
980 FFMPEG_EXTRA_LDFLAGS=""
981 if test "x$WANT_VAAPI" != "xno" -a "x$HAVE_VAAPI" = "xyes"; then
982 FFMPEG_EXTRA_LDFLAGS+=' -lva'
985 if test "x$HAVE_vaapi_x11" = "xyes"; then
986 FFMPEG_EXTRA_LDFLAGS+=' -lva-x11'
987 EXTRA_LIBS+=' -lva-x11'
989 if test "x$HAVE_vaapi_drm" = "xyes"; then
990 FFMPEG_EXTRA_LDFLAGS+=' -lva-drm'
991 EXTRA_LIBS+=' -lva-drm'
996 if test "x$WANT_VDPAU" != "xno" -a "x$HAVE_VDPAU" = "xyes"; then
1001 if test "x$WANT_NV" != "xno"; then
1006 if test "x$HAVE_DL" = "xyes"; then
1008 FFMPEG_EXTRA_LDFLAGS+=' -ldl'
1010 if test "x$FFMPEG_EXTRA_LDFLAGS" != "x"; then
1011 FFMPEG_EXTRA_CFG+=' --extra-ldflags="'$FFMPEG_EXTRA_LDFLAGS'"'
1014 if test "x$WANT_BOOBY" != "xno"; then
1015 CFG_CFLAGS+=" -DBOOBY"
1018 # intel lock elision bugs
1019 if test "x$WANT_NOELISION" != "xno"; then
1020 CFG_RPATH=`ls -1fd 2> /dev/null \
1021 /usr/lib/noelision \
1023 /usr/lib64/noelision \
1028 echo " using: with-jobs = $WANT_JOBS"
1029 echo " using: exec-name = $WANT_CIN"
1030 echo " using: with-cinlib = $WANT_CINLIB_DIR"
1031 echo " using: with-cindat = $WANT_CINDAT_DIR"
1032 echo " using: with-config-dir = $WANT_CONFIG_DIR"
1033 echo " using: with-nested-dir = $WANT_NESTED_DIR"
1034 echo " using: with-snap-dir = $WANT_SNAP_DIR"
1035 echo " using: with-browser = $WANT_CIN_BROWSER"
1036 echo " using: with-plugin-dir = $WANT_PLUGIN_DIR"
1037 echo " using: with-ladspa-dir = $WANT_LADSPA_DIR"
1038 echo " using: with-opencv = $WANT_OPENCV"
1039 echo " using: with-git-ffmpeg = $WANT_GIT_FFMPEG"
1040 echo " using: with-noelision = $WANT_NOELISION"
1041 echo " using: with-booby = $WANT_BOOBY"
1042 echo " using: with-clang = $WANT_CLANG"
1044 echo " using: thirdparty build = $WANT_CIN_3RDPARTY"
1045 echo " using: single-user = $WANT_CINBIN_BUILD"
1046 echo " using: static-build = $WANT_STATIC_BUILD"
1047 echo " using: ladspa-build = $WANT_LADSPA_BUILD"
1050 AC_SUBST(WANT_CIN_3RDPARTY)
1051 AC_SUBST(EXTRA_LIBS)
1052 AC_SUBST(FFMPEG_EXTRA_CFG)
1053 AC_SUBST(WANT_X264_HIDEPTH)
1054 AC_SUBST(WANT_X265_HIDEPTH)
1056 AC_SUBST(CFG_CFLAGS)
1057 AC_SUBST(CFG_CXXFLAGS)
1059 AC_CONFIG_FILES([Makefile])
1062 exec > global_config
1064 echo "SHELL := /bin/bash"
1066 echo "WANT_JOBS := $WANT_JOBS"
1067 if test "x$WANT_CLANG" = "xyes" ; then
1069 echo "CXX = clang++"
1070 echo "export CC CXX"
1073 echo "OBJDIR := $OBJDIR"
1074 echo "BINDIR := \$(TOPDIR)/bin"
1075 echo "CINELERRA := \$(TOPDIR)/cinelerra"
1076 echo "GUICAST := \$(TOPDIR)/guicast"
1077 echo "LIBZMPEG3 := \$(TOPDIR)/libzmpeg3"
1078 echo "MPEG2ENC := \$(TOPDIR)/mpeg2enc"
1079 echo "MPLEXLO := \$(TOPDIR)/mplexlo"
1080 echo "PLUGINS := \$(TOPDIR)/plugins"
1081 echo "TDB := \$(TOPDIR)/db"
1082 echo "THIRDPARTY := \$(TOPDIR)/thirdparty"
1083 echo "EXTRA_LIBS := $EXTRA_LIBS"
1084 echo "FFMPEG_EXTRA_CFG := $FFMPEG_EXTRA_CFG"
1085 echo "export OBJDIR BINDIR CINELERRA GUICAST LIBZMPEG3"
1086 echo "export MPEG2ENC MPLEXLO PLUGINS TDB"
1087 echo "export THIRDPARTY EXTRA_LIBS FFMPEG_EXTRA_CFG"
1090 echo "WANT_CIN := $WANT_CIN"
1091 CFG_WANTS+=" CIN_3RDPARTY LIBZMPEG COMMERCIAL STATIC_BUILD"
1092 for w in $CFG_WANTS; do ww=WANT_$w; echo "WANT_$w := ${!ww}"; done
1095 echo "ifndef CFLAGS_"
1097 echo "CFLAGS_ := \$(CFLAGS)"
1099 echo "CFLAGS_ := ${CFLAGS:--g -O2}"
1102 echo "ifndef CXXFLAGS_"
1103 echo "ifdef CXXFLAGS"
1104 echo "CXXFLAGS_ := \$(CXXFLAGS)"
1107 echo "ifndef LDFLAGS_"
1108 echo "ifdef LDFLAGS"
1109 echo "LDFLAGS_ := \$(LDFLAGS)"
1113 echo "CFLAGS := \$(CFLAGS_)"
1114 echo "CFLAGS += '-DCIN=\"\$(WANT_CIN)\"'"
1115 echo "CFLAGS += '-DCINLIB_DIR=\"$WANT_CINLIB_DIR\"'"
1116 echo "CFLAGS += '-DCINDAT_DIR=\"$WANT_CINDAT_DIR\"'"
1117 echo "CFLAGS += '-DCONFIG_DIR=\"$WANT_CONFIG_DIR\"'"
1118 echo "CFLAGS += '-DNESTED_DIR=\"$WANT_NESTED_DIR\"'"
1119 echo "CFLAGS += '-DSNAP_DIR=\"$WANT_SNAP_DIR\"'"
1120 echo "CFLAGS += '-DPLUGIN_DIR=\"$WANT_PLUGIN_DIR\"'"
1121 echo "CFLAGS += '-DLOCALE_DIR=\"$WANT_LOCALE_DIR\"'"
1122 echo "CFLAGS += '-DLADSPA_DIR=\"$WANT_LADSPA_DIR\"'"
1123 echo "CFLAGS += '-DCIN_BROWSER=\"$WANT_CIN_BROWSER\"'"
1124 for flg in $CFG_CFLAGS; do echo "CFLAGS += $flg"; done
1126 if test "x$CFG_CXXFLAGS" != "x"; then
1127 for flg in $CFG_CXXFLAGS; do echo "CXXFLAGS += $flg"; done
1130 if test "x$CFG_LDFLAGS" != "x" ; then
1131 echo "LDFLAGS +=$CFG_LDFLAGS"
1135 if test "x$CYGWIN" != "x" ; then
1136 echo 'FF_PATH ?= /usr/local'
1137 echo 'LDFLAGS += -L$(FF_PATH)/lib'
1138 echo 'CFLAGS += -I$(FF_PATH)/include'
1140 echo "CFLAGS += -DNO_BTRACE"
1141 echo "CFLAGS += -DNO_GDB"
1142 echo "CFLAGS += -DNO_CTX"
1143 echo "CFLAGS += -DNO_PRCTL"
1144 echo "CFLAGS += -DNO_TID"
1145 echo "CFLAGS += -DNO_XSELECT"
1148 LDFLAGS+=" -z noexecstack"
1150 if test "x$BSD" != "x" ; then
1151 echo "CFLAGS += -DNO_PRCTL"
1152 echo "CFLAGS += -DNO_TID"
1153 echo "CFLAGS += -DNO_GDB"
1156 if test "x$WANT_X264_HIDEPTH" = "xyes" ; then
1157 X264_CFG_PARAMS="$X264_CFG_PARAMS --bit-depth=10"
1159 if test "x$WANT_X265_HIDEPTH" = "xyes" ; then
1160 X265_CFG_PARAMS="$X265_CFG_PARAMS -DHIGH_BIT_DEPTH:BOOL=ON" # -DMAIN12:BOOL=ON"
1163 for pkg in $STATIC_PKGS; do
1164 eval pkg_lib="\$PKG_$pkg"
1165 if test "x$pkg_lib" = "xyes"; then
1166 echo "static_pkgs += $pkg"
1167 elif test "x$pkg_lib" = "xshared"; then
1168 echo "shared_pkgs += $pkg"
1173 for pkg in $STATIC_BLDS; do
1174 echo "static_blds += $pkg"
1176 echo "$ver_pkg := \$(THIRDPARTY)/${!ver_pkg}"
1178 echo "$inc_pkg := \\"
1179 for inc in ${!inc_pkg}; do
1180 echo " -I\$($ver_pkg)/$inc \\"
1183 echo "static_incs += \$(inc_$pkg)"
1185 echo "$lib_pkg := \\"
1186 for lib in ${!lib_pkg}; do
1187 echo " \$($ver_pkg)/$lib \\"
1190 echo "static_libs += \$($lib_pkg)"
1195 for lib in $SHARED_LIBS; do echo "shared_libs += $lib"; done
1197 for lib in $SYSTEM_LIBS; do echo "system_libs += $lib"; done
1198 echo "export static_pkgs shared_pkgs static_blds shared_libs system_libs"
1201 echo "thirdparty_libraries := \$(static_libs) \$(shared_libs)"
1203 if test "x$CFG_RPATH" != "x"; then
1204 echo "libraries+= -Wl,-rpath=$CFG_RPATH"
1207 echo "libraries += -Wl,--start-group"
1208 echo "libraries += \$(thirdparty_libraries)"
1209 echo "libraries += \$(shared_libs)"
1210 echo "libraries += \$(system_libs)"
1211 echo "libraries += \$(EXTRA_LIBS)"
1212 echo "libraries += -Wl,--end-group"
1213 # -Wl,--start-group ... -Wl,--end-group does not work on ubuntu
1214 echo "libraries += \$(thirdparty_libraries)"
1215 echo "libraries += \$(shared_libs)"
1216 echo "libraries += \$(system_libs)"
1217 echo "libraries += \$(EXTRA_LIBS)"
1219 echo "export thirdparty_libraries libraries"
1220 echo "export CFLAGS_ CXXFLAGS_ LDFLAGS_"
1221 echo "unexport CFLAGS CXXFLAGS LDFLAGS"
1223 if test "x$HAVE_tiff" = "xyes"; then
1224 if test "x$HAVE_jbig" != "xyes"; then
1225 echo "tiff.cfg_params+= --disable-jbig"
1229 if test "x$WANT_GIT_FFMPEG" != "xno"; then
1230 echo "ffmpeg.git := $WANT_GIT_FFMPEG"
1232 if test "x$X264_CFG_PARAMS" != "x" ; then
1233 echo "x264.cfg_params :=$X264_CFG_PARAMS --enable-static --enable-pic"
1235 if test "x$X265_CFG_PARAMS" != "x" ; then
1236 echo "x265.cfg_params :=$X265_CFG_PARAMS -DENABLE_SHARED=no"