3 AC_INIT([cinelerra], [5.1], [mail@lists.cinelerra-gg.org])
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],[yes])
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_3RD([ilmbase],[auto],
244 [ Iex/.libs/libIex.a \
245 IexMath/.libs/libIexMath.a \
246 Half/.libs/libHalf.a \
247 Imath/.libs/libImath.a \
248 IlmThread/.libs/libIlmThread.a ],
249 [ Iex Half Imath config IlmThread ])
251 PKG_DEF([ladspa], [ladspa-0.4.17], [], [])
253 PKG_3RD([lame],[auto],
255 [ libmp3lame/.libs/libmp3lame.a \
256 mpglib/.libs/libmpgdecoder.a ],
259 PKG_3RD([libavc1394],[auto],
261 [ libavc1394/.libs/libavc1394.a \
262 librom1394/.libs/librom1394.a \
263 common/.libs/libraw1394util.a ],
266 PKG_3RD([libraw1394],[auto],
268 [ src/.libs/libraw1394.a ],
271 PKG_3RD([libiec61883],[auto],
273 [ src/.libs/libiec61883.a ],
276 PKG_3RD([libdv],[auto],
278 [ libdv/.libs/libdv.a ],
281 PKG_3RD([libjpeg],[auto],
282 [libjpeg-turbo-2.0.4],
284 build/libturbojpeg.a ],
285 [ opt/libjpeg-turbo/include ])
287 PKG_3RD([opus],[auto],
292 PKG_3RD([openjpeg],[auto],
294 [ bin/libopenjp2.a ],
297 PKG_3RD([libogg],[auto],
299 [ src/.libs/libogg.a ],
302 PKG_3RD([libsndfile],[auto],
304 [ src/.libs/libsndfile.a \
305 src/.libs/libcommon.a \
306 src/G72x/.libs/libg72x.a \
307 src/GSM610/.libs/libgsm.a ],
310 PKG_3RD([libtheora],[auto],
312 [ lib/.libs/libtheora.a \
313 lib/.libs/libtheoradec.a \
314 lib/.libs/libtheoraenc.a ],
317 PKG_3RD([libuuid],[yes],
322 PKG_3RD([libvorbis],[auto],
324 [ lib/.libs/libvorbis.a \
325 lib/.libs/libvorbisenc.a \
326 lib/.libs/libvorbisfile.a ],
329 PKG_3RD([mjpegtools],[yes],
331 [ utils/mmxsse/.libs/libmmxsse.a \
332 utils/.libs/libmjpegutils.a \
333 lavtools/.libs/liblavfile.a \
334 lavtools/.libs/liblavjpeg.a \
335 mplex/.libs/libmplex2.a \
336 yuvfilters/.libs/libyuvfilters.a \
337 mpeg2enc/.libs/libmpeg2encpp.a ],
338 [ . lavtools utils ])
340 PKG_3RD([openexr],[auto],
342 [ IlmImf/.libs/libIlmImf.a \
343 IlmImfUtil/.libs/libIlmImfUtil.a ],
346 #PKG_3RD([festival],[no],
350 #PKG_3RD(speech_tools,[no],
355 PKG_3RD([tiff],[auto],
357 [ libtiff/.libs/libtiff.a \
358 libtiff/.libs/libtiffxx.a \
359 port/.libs/libport.a ],[
362 PKG_3RD([twolame],[auto],
364 [ libtwolame/.libs/libtwolame.a ],
367 PKG_3RD([x264],[auto],
368 [x264-snapshot-20191217-2245-stable],
372 PKG_3RD([x265],[auto],
377 PKG_3RD([libvpx],[auto],
382 PKG_3RD([lv2],[auto],
385 [ usr/local/include usr/local/lib64/lv2 usr/local/lib/lv2 ])
387 PKG_3RD([sratom],[auto],
389 [ usr/local/lib/libsratom-0.a ],
390 [ usr/local/include ])
392 PKG_3RD([serd],[auto],
394 [ usr/local/lib/libserd-0.a ],
395 [ usr/local/include ])
397 PKG_3RD([sord],[auto],
399 [ usr/local/lib/libsord-0.a ],
400 [ usr/local/include ])
402 PKG_3RD([lilv],[auto],
404 [ usr/local/lib/liblilv-0.a ],
405 [ usr/local/include ])
407 PKG_3RD([suil],[auto],
409 [ usr/local/lib/libsuil-0.a ],
410 [ usr/local/include ])
412 PKG_3RD([libaom],[auto],
414 [ usr/local/lib*/libaom*.a ],
415 [ usr/local/include ])
417 PKG_3RD([dav1d],[auto],
419 [ usr/local/lib*/libdav1d*.a ],
420 [ usr/local/include ])
422 PKG_3RD([libwebp],[auto],
424 [ usr/local/lib*/libwebp*.a ],
425 [ usr/local/include ])
427 PKG_3RD([ffnvcodec],[auto],
432 AC_SUBST(STATIC_PKGS)
434 AC_DEFUN([CHECK_ENABLE], [
436 AC_HELP_STRING([--enable-[$1]], [$3 ([$4])]),
437 [WANT_$2=$enableval], [WANT_$2=[$4]])
440 CHECK_ENABLE([static-build], [STATIC_BUILD], [build static], [auto])
441 CHECK_ENABLE([x264_hidepth], [X264_HIDEPTH], [build x264 10bit], [no])
442 CHECK_ENABLE([x265_hidepth], [X265_HIDEPTH], [build x265 10bit], [no])
444 test "x$WANT_STATIC_BUILD" = "xauto" && WANT_STATIC_BUILD=$WANT_CINBIN_BUILD
446 AC_DEFUN([CHECK_PROG], [
447 AC_CHECK_PROG([PROG_$1], [$2], [yes],[no])
449 AC_DEFUN([REQUIRE_PROG], [
450 CHECK_PROG([$1],[$2])
451 if test "x$PROG_$1" = "xno"; then
452 AC_MSG_WARN([$2 is missing and required.])
459 I86=[`expr "x$ARCH" : 'xi[346]86.*'`]
460 X86=[`expr "x$ARCH" : 'x..._64*'`]
462 if test "x$I86$X86" != "x00" ; then
463 # Checks for ix86 programs.
464 REQUIRE_PROG(NASM, [nasm])
466 AC_MSG_CHECKING([nasm x264 compatible])
467 echo "vmovdqa32 [[eax]]{k1}{z}, zmm0" > conftest.asm
468 nasm conftest.asm -o conftest.o > /dev/null 2>&1
469 if test $? != 0 ; then
471 AC_MSG_WARN([libx264 built without assembly code])
472 X264_CFG_PARAMS="$X264_CFG_PARAMS --disable-asm"
476 rm -f conftest.asm conftest.o
477 REQUIRE_PROG(YASM, [yasm])
480 ## end arch dep tests
482 REQUIRE_PROG(OBJCOPY, [objcopy])
483 if test "x$FATAL_ERROR" != "x"; then
484 AC_MSG_ERROR("fatal eror.")
486 CHECK_PROG(PACTL, [pactl])
487 WANT_PACTL=$PROG_PACTL
489 AC_CHECK_DECL([X_HAVE_UTF8_STRING],,[no_utf=yes],[#include <X11/Xlib.h>])
490 if test "$no_utf" = "yes"; then
491 AC_MSG_ERROR([Cinelerra requires utf8 support in X Windows.])
494 # Checks for headers/libraries.
496 AC_DEFUN([CHECK_HEADERS], [
497 if test "x$HAVE_$1" != "xno"; then
498 AC_CHECK_HEADER(m4_apply([m4_car],m4_split([$3])), [HAVE_$1=yes], [HAVE_$1=no],
499 [m4_foreach([i], m4_split([$3]), [[#include "]i["
502 AC_MSG_CHECKING([$2])
503 AC_MSG_RESULT([$HAVE_$1])
504 if test "x$HAVE_$1" = "xno"; then
505 if test "x$PKG_$1" = "x"; then RESULT=no; fi
510 AC_DEFUN([CHECK_LIB], [
511 if test "x$HAVE_$1" != "xno"; then
512 if test "x$PKG_$1" = "x" -o "x$WANT_STATIC_BUILD" = "xno" -a "x$PKG_$1" != "xno"; then
513 AC_CHECK_LIB([$2], [$3], [HAVE_$1=yes], [HAVE_$1=no], [$4])
515 if test "x$WANT_$1" != "xno"; then
516 if test "x$HAVE_$1" = "xyes"; then
517 if test "x$PKG_$1" = "x"; then
518 SYSTEM_LIBS+=" -l[$2]"
519 for lib in [$4]; do SYSTEM_LIBS+=" $lib"; done
522 for lib in [$4]; do SHARED_LIBS+=" $lib"; done
524 elif test "x$PKG_$1" = "x"; then
532 CHECK_LIB([X11], [X11], [XOpenDisplay])
533 CHECK_HEADERS([X11], [X11 headers], [X11/X.h X11/Xlib.h X11/Xutil.h X11/cursorfont.h])
534 CHECK_HEADERS([X11], [X11 headers], [X11/keysym.h X11/Sunkeysym.h X11/Xatom.h X11/XF86keysym.h])
535 CHECK_LIB([XEXT], [Xext], [XShmQueryExtension])
536 CHECK_HEADERS([XEXT], [Xlib XShm extention], [X11/Xlib.h X11/extensions/XShm.h X11/extensions/shape.h])
537 CHECK_LIB([XINERAMA], [Xinerama], [XineramaQueryExtension])
538 CHECK_HEADERS([XINERAMA], [Xinerama headers], [X11/extensions/Xinerama.h])
539 CHECK_LIB([XFIXES], [Xfixes], [XFixesQueryVersion])
540 CHECK_LIB([BZ2], [bz2], [BZ2_bzDecompress])
541 CHECK_LIB([FONTCONFIG], [fontconfig], [FcInit])
542 CHECK_LIB([FREETYPE], [freetype], [FT_Init_FreeType])
543 CHECK_LIB([LZMA], [lzma], [lzma_version_number])
544 CHECK_LIB([PNG], [png], [png_read_png])
545 CHECK_LIB([PTHREAD], [pthread], [pthread_create])
546 CHECK_LIB([Z], [z], [gzopen])
547 CHECK_LIB([fftw], [fftw3], [fftw_execute])
548 CHECK_HEADERS([fftw], [fftw headers], [fftw3.h])
549 CHECK_LIB([libuuid], [uuid], [uuid_clear])
550 CHECK_HEADERS([libuuid], [uuid headers], [uuid/uuid.h])
551 CHECK_HEADERS([LINUX_CDROM], [linux cdrom headers], [linux/cdrom.h linux/futex.h])
552 CHECK_HEADERS([LINUX_SYS], [linux sys], [sys/ioctl.h sys/stat.h sys/types.h sys/time.h sys/syscall.h])
553 CHECK_LIB([flac], [FLAC], [FLAC__stream_decoder_new])
554 CHECK_HEADERS([flac], [FLAC headers], [FLAC/stream_decoder.h])
555 CHECK_LIB([lame], [mp3lame], [lame_init])
556 CHECK_HEADERS([lame], [lame headers], [lame/lame.h])
557 CHECK_LIB([libjpeg], [jpeg], [jpeg_start_decompress])
558 CHECK_HEADERS([libjpeg], [jpeg headers], [stdio.h jpeglib.h])
559 CHECK_LIB([openjpeg], [openjp2], [opj_version])
560 CHECK_HEADERS([openjpeg], [openjpeg headers], [openjpeg.h])
561 CHECK_LIB([libsndfile], [sndfile], [sf_open])
562 CHECK_HEADERS([libsndfile], [sndfile headers], [sndfile.h])
563 CHECK_LIB([ilmbase], [IlmImf], [ImfOpenInputFile])
564 CHECK_HEADERS([ilmbase], [IlmImf headers], [OpenEXR/ImfCRgbaFile.h])
565 CHECK_LIB([libvpx], [vpx], [vpx_codec_decode])
566 CHECK_HEADERS([libvpx], [vpx headers], [vpx/vpx_decoder.h])
567 CHECK_LIB([mjpegtools], [mjpegutils], [mjpeg_info])
568 CHECK_HEADERS([mjpegtools], [mjpegtools headers], [mjpegtools/mjpeg_types.h])
569 CHECK_LIB([tiff], [tiff], [TIFFOpen])
570 CHECK_HEADERS([tiff], [tiff headers], [tiff.h tiffio.h])
571 CHECK_LIB([twolame], [twolame], [twolame_encode_buffer_float32_interleaved])
572 CHECK_HEADERS([twolame], [twolame headers], [twolame.h])
573 CHECK_LIB([x264], [x264], [x264_encoder_encode])
574 CHECK_HEADERS([x264], [x264 headers], [stdint.h x264.h])
575 CHECK_LIB([x265], [x265], [x265_encoder_encode])
576 CHECK_HEADERS([x265], [x265 headers], [x265.h])
577 CHECK_LIB([opus], [opus], [opus_multistream_decoder_create])
578 CHECK_HEADERS([opus], [libopus headers], [opus/opus_multistream.h])
579 CHECK_LIB([libaom], [aom], [aom_codec_version])
580 CHECK_HEADERS([libaom], [libaom headers], [aom/aom.h])
581 CHECK_LIB([dav1d], [dav1d], [dav1d_version])
582 CHECK_HEADERS([dav1d], [libdav1d headers], [dav1d/dav1d.h])
583 CHECK_LIB([libwebp], [webp], [WebPGetEncoderVersion])
584 CHECK_HEADERS([libwebp], [libwebp headers], [webp/encode.h])
585 CHECK_LIB([a52dec], [a52], [a52_init])
586 CHECK_HEADERS([a52dec], [a52 headers], [stdint.h a52.h])
587 CHECK_LIB([encore], [encore], [encore])
588 CHECK_HEADERS([encore], [encore headers], [encore.h])
589 CHECK_LIB([giflib], [gif], [DGifOpen])
590 CHECK_HEADERS([giflib], [gif lib headers], [gif_lib.h])
591 CHECK_LIB([jbig], [jbig], [jbg_dec_init])
593 CHECK_LIB([VDPAU], [vdpau], [vdp_device_create_x11])
594 if test "x$HAVE_VDPAU" != "xyes" -a "x$WANT_VDPAU" = "xyes"; then
595 AC_MSG_ERROR([requires vdpau support.])
598 CHECK_LIB([VAAPI], [va], [vaInitialize])
599 if test "x$HAVE_VAAPI" = "xyes" -a "x$WANT_VAAPI" != "xno"; then
600 CHECK_HEADERS([vaapi_x11], [va x11 headers], [va/va_x11.h])
601 CHECK_LIB([vaapi_x11], [va-x11], [vaGetDisplay])
602 CHECK_HEADERS([vaapi_drm], [va drm headers], [va/va_drm.h])
603 CHECK_LIB([vaapi_drm], [va-drm], [vaGetDisplayDRM])
605 if test "x$HAVE_VAAPI" != "xyes" -a "x$WANT_VAAPI" = "xyes"; then
606 AC_MSG_ERROR([requires vaapi support.])
609 #CHECK_LIB([NVENC], [nvidia-encode], [NvEncodeAPICreateInstance])
611 #if test "x$HAVE_mjpegtools" = "xyes"; then
612 #CFG_CFLAGS+=" -I/usr/include/mjpegtools -I/usr/local/include/mjpegtools"
615 AC_DEFUN([CHECK_WANT], [
618 AC_ARG_WITH(m4_tolower([$1]),
619 AC_HELP_STRING([m4_join([-],[--with],m4_tolower([$1]))], [$3] (auto)),
620 [WANT_$1=$withval],[WANT_$1=$2])
622 if test "x$WANT_$1" = "xauto" ; then
624 elif test "x$WANT_$1" = "xyes" ; then
625 if test "x$RESULT" = "xno" -a "x$PKG_$1" = "x"; then
626 AC_MSG_ERROR([required for $1 support.])
633 CHECK_WANT([GL], [auto], [use opengl], [
634 CHECK_LIB([GL], [GL], [glUseProgram])
635 CHECK_LIB([GL], [GLU], [gluOrtho2D])
636 CHECK_HEADERS([GL], [opengl headers], [GL/gl.h GL/glext.h GL/glu.h GL/glx.h])])
638 CHECK_WANT([XV], [auto], [use xv], [
639 CHECK_LIB([xv], [Xv], [XvQueryExtension])
640 CHECK_HEADERS([xv], [Xlib Xv extention], [X11/Xlib.h X11/extensions/Xvlib.h])])
642 CHECK_WANT([OSS], [auto], [use OSS audio], [
643 CHECK_HEADERS([OSS], [oss headers], [sys/soundcard.h])])
645 CHECK_WANT([XFT], [auto], [use libXft], [
646 CHECK_LIB([XFT], [Xft], [XftInit])
647 CHECK_HEADERS([XFT], [Xft/freetype headers], [X11/Xlib.h X11/Xft/Xft.h])])
649 CHECK_WANT([ALSA], [auto], [use libasound/alsa], [
650 CHECK_LIB([ALSA], [asound], [snd_pcm_open])
651 CHECK_HEADERS([ALSA], [asound headers], [alsa/asoundlib.h])])
653 CHECK_WANT([OGG], [auto], [use ogg/theora/vorbis], [
654 CHECK_LIB([libogg], [ogg], [ogg_stream_init])
655 CHECK_HEADERS([libogg], [ogg headers], [ogg/ogg.h])
656 CHECK_LIB([libtheora], [theora], [theora_info_init], [-ltheoraenc -ltheoradec -logg])
657 CHECK_HEADERS([libtheora], [threora headers], [theora/theoraenc.h])
658 CHECK_LIB([libvorbis], [vorbisenc], [vorbis_encode_init], [-lvorbis -lvorbisfile -logg])
659 CHECK_HEADERS([libvorbis], [vorbis encoders headers], [vorbis/vorbisenc.h])
660 CHECK_LIB([libvorbis], [vorbisfile], [ov_open])
661 CHECK_HEADERS([libvorbis], [vorbis file headers], [vorbis/vorbisfile.h])])
663 CHECK_WANT([FIREWIRE], [auto], [use firewire], [
664 CHECK_LIB([libavc1394], [avc1394], [avc1394_init_target])
665 CHECK_HEADERS([libavc1394], [libavc1394 headers], [libavc1394/avc1394.h])
666 CHECK_LIB([libavc1394], [rom1394], [rom1394_get_bus_id])
667 CHECK_HEADERS([libavc1394], [librom1394 headers], [libavc1394/rom1394.h])
668 CHECK_LIB([libiec61883], [iec61883], [iec61883_mpeg2_recv_init])
669 CHECK_HEADERS([libiec61883], [libiec61883 headers], [libiec61883/iec61883.h])
670 CHECK_LIB([libraw1394], [raw1394], [raw1394_iso_recv_init])
671 CHECK_HEADERS([libraw1394], [libraw1394 headers], [libraw1394/raw1394.h])])
673 test "x$HAVE_libavc1394" = "xyes" && \
674 test "x$HAVE_libiec61883" = "xyes" && \
675 test "x$HAVE_libraw1394" = "xyes" && \
676 HAVE_FIREWIRE=yes || \
677 HAVE_libavc1394=no && \
678 HAVE_libiec61883=no && \
679 HAVE_libraw1394=no && \
682 CHECK_WANT([DV], [auto], [use dv], [
683 CHECK_LIB([libdv], [dv], [dv_init])
684 CHECK_HEADERS([libdv], [libdv headers], [libdv/dv.h])])
686 CHECK_WANT([DVB], [auto], [use dvb], [
687 CHECK_HEADERS([DVB], [dvb device headers], [linux/dvb/dmx.h linux/dvb/frontend.h])])
689 CHECK_WANT([VIDEO4LINUX2], [auto], [use v4l2], [
690 CHECK_HEADERS([VIDEO4LINUX2], [v4l2 system headers], [linux/kernel.h linux/types.h linux/videodev2.h])])
692 CHECK_WANT([XXF86VM], [auto], [use xf86vmode], [
693 CHECK_HEADERS([XXF86VM], [XF86VM headers], [X11/Xlib.h X11/extensions/xf86vmode.h])])
695 CHECK_WANT([ESOUND], [no], [use esd], [
696 CHECK_LIB([esound], [esd], [esd_open_sound])
697 CHECK_HEADERS([esound], [esound headers], [esd.h])
698 CHECK_LIB([audiofile], [audiofile], [afOpenFile])
699 CHECK_HEADERS([audiofile], [audiofile headers], [audiofile.h])])
701 test "x$HAVE_esound" = "xyes" && \
702 test "x$HAVE_audiofile" = "xyes" && \
705 HAVE_audiofile=no && \
708 CHECK_WANT([PULSE], [auto], [use pulseaudio], [
709 CHECK_LIB([pulse_simple], [pulse-simple], [pa_simple_new])
710 CHECK_HEADERS([pulse_simple], [pulse-simple headers], [pulse/simple.h])
711 CHECK_LIB([pulse], [pulse], [pa_context_new])
712 CHECK_HEADERS([pulse], [pulse headers], [pulse/error.h])])
714 CHECK_WANT([ISOFS], [auto], [use isofs], [
715 CHECK_HEADERS([isofs], [isofs headers], [linux/isofs.h])])
717 if test "x$WANT_LADSPA_BUILD" != "xyes" ; then
718 CHECK_WANT([LADSPA], [auto], [ladspa plugin clients], [
719 CHECK_HEADERS([ladspa], [ladspa headers], [ladspa.h])])
724 CHECK_WANT([SHUTTLE], [yes], [shuttle dev support], [
725 CHECK_HEADERS([keysyms], [x11 keysym defs], [X11/keysymdef.h])])
726 if test "x$WANT_SHUTTLE" = "xno"; then
727 WANT_SHUTTLE_USB="no"
729 CHECK_WANT([SHUTTLE_USB], [yes], [use libusb-1.0], [
730 CHECK_LIB([libusbx], [usb-1.0], [libusb_init])
731 CHECK_HEADERS([libusbx], [libusb headers], [libusb-1.0/libusb.h])])
733 CHECK_WANT([LV2], [auto], [use lv2], [
734 saved_CFLAGS="$CFLAGS"
735 CHECK_LIB([lilv], [lilv-0], [lilv_world_new])
736 CHECK_LIB([sord], [sord-0], [sord_world_new])
737 CHECK_LIB([serd], [serd-0], [serd_reader_new])
738 CHECK_LIB([sratom], [sratom-0], [sratom_new])
739 CFLAGS="-I/usr/include/lilv-0 -I/usr/local/include/lilv-0"
740 CHECK_HEADERS([lv2], [lilv headers], [lilv/lilv.h])
741 CHECK_LIB([suil], [suil-0], [suil_instance_new])
742 CFLAGS="-I/usr/include/suil-0 -I/usr/local/include/suil-0"
743 CHECK_HEADERS([lv2], [suil headers], [suil/suil.h])
744 CFLAGS="$saved_CFLAGS"])
746 test "x$HAVE_lv2" = "xyes" && \
747 test "x$HAVE_lilv" = "xyes" && \
748 test "x$HAVE_sord" = "xyes" && \
749 test "x$HAVE_serd" = "xyes" && \
750 test "x$HAVE_sratom" = "xyes" && \
751 test "x$HAVE_suil" = "xyes" && \
761 CHECK_WANT([CUDA], [auto], [build cuda plugins], [
762 CHECK_HEADERS([CUDA], [cuda sdk], [${CUDA_PATH:-/usr/local/cuda}/include/cuda.h])])
764 CHECK_WANT([DL], [auto], [system has libdl], [
765 CHECK_LIB([DL], [dl], [dlopen])])
767 CHECK_WANT([OPENCV], [no], [opencv=sys/sta/dyn,git/tar=url], [
770 CHECK_WANT([NUMA], [auto], [system has libnuma], [
771 CHECK_LIB([NUMA], [numa], [numa_alloc])])
773 CHECK_WANT([OPENEXR], [auto], [use openexr], [
774 AC_MSG_CHECKING([for openexr available])
776 saved_CXXFLAGS="$CXXFLAGS"
778 LIBS=" -lIlmImf -lIlmThread -lIex -lpthread"
779 CXXFLAGS="-I/usr/include/OpenEXR -I/usr/local/include/OpenEXR"
781 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
782 #include "ImfChannelList.h"
783 #include "ImfChromaticities.h"
784 #include "ImfCompression.h"
786 #include "ImfInputFile.h"
787 #include "ImfOutputFile.h"
788 #include "ImfPixelType.h"
789 #include "ImfRgbaFile.h"
790 #include "ImfRgbaYca.h"
791 #include "ImfVersion.h"
792 class EXRIStream : public Imf::IStream { public:
793 EXRIStream() : Imf::IStream("mypath") {} };
794 class EXROStream : public Imf::OStream { public:
795 EXROStream() : Imf::OStream("mypath") {} };
796 ]])], [HAVE_OPENEXR=yes], [HAVE_OPENEXR=no])
797 if test "x$WANT_OPENEXR" = "xauto"; then
800 if test "x$WANT_OPENEXR" = "xyes" -a "x$HAVE_OPENEXR" = "xyes"; then
801 if test "x$WANT_STATIC_BUILD" = "xno"; then
802 SHARED_openexr="$LIBS"
803 SHARED_LIBS+=" $LIBS"
804 CFG_CFLAGS+=" -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR"
808 CXXFLAGS="$saved_CXXFLAGS"
810 AC_MSG_RESULT([$HAVE_OPENEXR])
812 AC_SUBST([HAVE_OPENEXR])
814 test "x$HAVE_openexr" = "xyes" && \
815 test "x$HAVE_ilmbase" = "xyes" && \
816 HAVE_OPENEXR=yes || \
821 # build global_config
825 echo "AC_HELP_STRING([Reason],[Package])"
826 echo "AC_HELP_STRING([------],[-------])"
828 AC_DEFUN([PKG_DISABLED],[
832 echo "AC_HELP_STRING([disabled],[$1])"
834 AC_DEFUN([PKG_SHARED],[
838 SHARED_LIBS+="$SHARED_$1"
841 AC_DEFUN([PKG_STATIC],[
842 if test "x$WANT_CIN_3RDPARTY" != "xno"; then
847 echo "AC_HELP_STRING([$2],[$1])"
851 AC_DEFUN([PKG_FORCED],[PKG_STATIC([$1],[forced])])
853 if test "x$WANT_CIN_3RDPARTY" != "xno"; then
856 ffmpeg/twolame ffmpeg/lame ffmpeg/openjpeg \
857 ffmpeg/libvorbis ffmpeg/libtheora ffmpeg/x264 ffmpeg/x265 \
858 libiec61883/libraw1394 libavc1394/librom1394 \
859 openexr/ilmbase ilmbase/libogg \
860 libtheora/libogg libtheora/libvorbis ; do
861 lib=`dirname $dep`; needs=`basename $dep`
862 eval pkg_lib="\$PKG_$lib"
863 if test "x$pkg_lib" != "xno"; then
864 eval "PKG_$needs=yes"
869 AC_DEFUN([PKG_PROVIDE],[
870 if test "x$BUILD_$1" = "x" ; then
871 if test "x$PKG_$1" = "xyes"; then
872 if test "x$WANT_CIN_3RDPARTY" = "xno"; then
877 elif test "x$2" = "xno" -o "x$PKG_$1" = "xno"; then
879 elif test "x$WANT_STATIC_BUILD" = "xyes"; then
880 PKG_STATIC([$1],[static])
881 elif test "x$HAVE_$1" = "xyes"; then
884 PKG_STATIC([$1],[needed])
889 PKG_PROVIDE([a52dec])
890 PKG_PROVIDE([djbfft])
891 PKG_PROVIDE([encore])
892 PKG_PROVIDE([audiofile],[$WANT_ESOUND])
893 PKG_PROVIDE([esound],[$WANT_ESOUND])
894 PKG_PROVIDE([ffmpeg])
897 PKG_PROVIDE([giflib])
898 PKG_PROVIDE([ilmbase], [$WANT_OPENEXR])
899 PKG_PROVIDE([ladspa],[$WANT_LADSPA_BUILD])
901 PKG_PROVIDE([libavc1394],[$WANT_FIREWIRE])
902 PKG_PROVIDE([libraw1394],[$WANT_FIREWIRE])
903 PKG_PROVIDE([libiec61883],[$WANT_FIREWIRE])
904 PKG_PROVIDE([libdv],[$WANT_DV])
905 PKG_PROVIDE([libjpeg])
906 PKG_PROVIDE([libogg])
907 PKG_PROVIDE([libsndfile])
908 PKG_PROVIDE([libtheora])
909 PKG_PROVIDE([libuuid])
910 PKG_PROVIDE([libvorbis])
911 PKG_PROVIDE([mjpegtools])
912 PKG_PROVIDE([libaom])
914 PKG_PROVIDE([libwebp])
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"