6fba32bb011683640a4571ce010b7517555a2eb0
[goodguy/history.git] / cinelerra-5.1 / configure.ac
1
2 AC_PREREQ([2.69])
3 AC_INIT([cinelerra], [5.1], [mail@lists.cinelerra-cv.org])
4 AM_INIT_AUTOMAKE([foreign])
5
6 AM_PROG_AS
7 AC_LANG_CPLUSPLUS
8 AC_LANG_C
9 AC_PROG_CXX
10
11 CFG_CFLAGS+=" -fno-omit-frame-pointer -fno-math-errno -fno-signed-zeros"
12 CFG_CFLAGS+=" -pthread -Wall"
13 # misguided pedantic warnings
14 CFG_CFLAGS+=" -Wno-unknown-warning"
15 CFG_CFLAGS+=" -Wno-unused-result"
16 CFG_CFLAGS+=" -Wno-stringop-overflow"
17 CFG_CFLAGS+=" -Wno-format-truncation"
18 CFG_CFLAGS+=" -Wno-format-overflow"
19 CFG_CFLAGS+=" -Wno-parentheses"
20 CFG_CFLAGS+=" -Wno-stringop-truncation"
21 CFG_CFLAGS+=" -D__STDC_CONSTANT_MACROS"
22 CFG_CFLAGS+=" -D__STDC_LIMIT_MACROS"
23 CFG_CFLAGS+=" -DPNG_SKIP_SETJMP_CHECK=1"
24 CFG_CFLAGS+=" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
25 CFG_CFLAGS+=" -I/usr/include/freetype2"
26 CFG_CFLAGS+=" -I/usr/include/uuid"
27 CFG_CFLAGS+=" -I/usr/include/mjpegtools"
28
29 AC_DEFUN([CHECK_WITH], [
30 AC_ARG_WITH([$1],
31   AC_HELP_STRING([--with-[$1]], [$2 ($4)]),
32   [WANT_$3=$withval], [WANT_$3='$4'])
33 AC_SUBST([WANT_$3])
34 ])
35
36 CHECK_WITH([jobs],[parallel build jobs],[JOBS],[auto])
37 CHECK_WITH([exec-name],[binary executable name],[CIN],[cin])
38 CHECK_WITH([single-user],[to install cin in bin],[CINBIN_BUILD],[no])
39 CHECK_WITH([ladspa-build],[build ladspa library],[LADSPA_BUILD],[yes])
40 CHECK_WITH([lv2],[lv2 library support],[LV2],[yes])
41 CHECK_WITH([cinlib],[cinelerra library path],[CINLIB_DIR],[auto])
42 CHECK_WITH([cindat],[cinelerra share path],[CINDAT_DIR],[auto])
43 CHECK_WITH([plugin-dir],[plugin install dir],[PLUGIN_DIR],[auto])
44 CHECK_WITH([ladspa-dir],[ladspa install dir],[LADSPA_DIR],[auto])
45 CHECK_WITH([config-dir],[.bcast config dir],[CONFIG_DIR],[$$HOME/.bcast5])
46 CHECK_WITH([browser],[cin_browser path],[CIN_BROWSER],[firefox])
47 CHECK_WITH([git-ffmpeg],[git ffmpeg using url],[GIT_FFMPEG],[no])
48 CHECK_WITH([noelision],[use noelision/libpthread],[NOELISION],[auto])
49 CHECK_WITH([libzmpeg],[build libzmpeg],[LIBZMPEG],[yes])
50 CHECK_WITH([commercial],[enable commercial capture],[COMMERCIAL],[yes])
51 CHECK_WITH([thirdparty],[use thirdparty build],[CIN_3RDPARTY],[yes])
52
53 if test "x$WANT_LV2" != "xno"; then
54   GTK2_LIBS=`pkg-config --libs gtk+-2.0`
55   AC_CHECK_LIB([m], [gtk_init], [HAVE_gtk=yes], [HAVE_gtk=no], [$GTK2_LIBS])
56   test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --cflags gtk+-2.0`" && HAVE_gtk=no
57   test "x$HAVE_gtk" != "xno" && test -z "`pkg-config --libs gtk+-2.0`" && HAVE_gtk=no
58   if test "x$HAVE_gtk" = "xno"; then
59     AC_MSG_ERROR([LV2 requires gtk+-2.0 support.])
60   fi
61 fi
62
63 if test "x$WANT_COMMERCIAL" = "xyes" -a "x$WANT_LIBZMPEG" != "xyes" ; then
64   AC_MSG_ERROR([commercial requires libzmpeg support.])
65 fi
66
67 if test "x$WANT_CINBIN_BUILD" = "xyes"; then
68   WANT_LOCALE_DIR='$$CIN_LIB/locale'
69   test "x$WANT_CINDAT_DIR" = "xauto" && WANT_CINDAT_DIR='$$CIN_PATH'
70   test "x$WANT_CINLIB_DIR" = "xauto" && WANT_CINLIB_DIR='$$CIN_PATH'
71   test "x$WANT_PLUGIN_DIR" = "xauto" && WANT_PLUGIN_DIR='$$CIN_LIB/plugins'
72   test "x$WANT_LADSPA_DIR" = "xauto" && WANT_LADSPA_DIR='$$CIN_LIB/ladspa'
73   sinstall=dinstall
74   suninstall=duninstall
75 else
76   lcldir=`test "x$prefix" = "xNONE" && prefix=$ac_default_prefix; \
77     test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"; \
78     eval "dir=\"$localedir\""; eval "dir=\"$dir\""; eval "dir=\"$dir\""; \
79     echo "$dir"`
80   usrdat=`test "x$prefix" = "xNONE" && prefix=$ac_default_prefix; \
81     test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"; \
82     eval "dir=\"$datadir\""; eval "dir=\"$dir\""; eval "dir=\"$dir\""; \
83     echo "$dir"`
84   usrlib=`test "x$prefix" = "xNONE" && prefix="$ac_default_prefix"; \
85     test "x$exec_prefix" = "xNONE" && exec_prefix="${prefix}"; \
86     eval "dir=\"$libdir\""; eval "dir=\"$dir\""; eval "dir=\"$dir\""; \
87     echo "$dir"`
88   test "x$usrlib" = "x/lib" -o "x$usrlib" = "x/usr/lib" -o \
89        "x$usrlib" = "x/usr/local/lib" -a -e "/usr/lib64" && \
90   test ! -e "/usr/lib" -o `ls -1 /usr/lib64 | wc -l` -gt `ls -1 /usr/lib | wc -l` && \
91     usrlib+="64"
92   WANT_LOCALE_DIR="$lcldir"
93   test "x$WANT_CINDAT_DIR" = "xauto" && WANT_CINDAT_DIR="$usrdat/$WANT_CIN"
94   test "x$WANT_CINLIB_DIR" = "xauto" && WANT_CINLIB_DIR="$usrlib/$WANT_CIN"
95   test "x$WANT_PLUGIN_DIR" = "xauto" && WANT_PLUGIN_DIR="$WANT_CINLIB_DIR/plugins"
96   test "x$WANT_LADSPA_DIR" = "xauto" && WANT_LADSPA_DIR="$WANT_CINLIB_DIR/ladspa"
97   sinstall=cinstall
98   suninstall=cuninstall
99 fi
100 AC_SUBST(sinstall)
101 AC_SUBST(suninstall)
102
103 if test "x$WANT_JOBS" = "xauto"; then
104   CPUS=`grep -c "^proc" /proc/cpuinfo`
105   WANT_JOBS=`expr $CPUS + $CPUS / 2 + 2`
106 fi
107
108 AC_DEFUN([PKG_DEF],[
109 STATIC_PKGS+=" [$1]"
110 ver_$1="$2"
111 lib_$1="$3"
112 inc_$1="$4"
113 ])
114
115 AC_DEFUN([PKG_3RD],[
116 AC_ARG_ENABLE([$1],
117   AC_HELP_STRING([--enable-$1],[build $1 ($2)]),
118   [PKG_$1=$enableval], [PKG_$1=$2])
119 PKG_DEF([$1],[$3],[$4],[$5])
120 ])
121
122 # thirdparty builds
123
124 PKG_3RD([a52dec],[yes],
125   [a52dec-0.7.4],
126   [ liba52/.libs/liba52.a ],
127   [ include ])
128
129 PKG_3RD([djbfft],[yes],
130   [djbfft-0.76],
131   [ libdjbfft.a ],
132   [ . ])
133
134 PKG_3RD([audiofile],[no],
135   [audiofile-0.3.6],
136   [ libaudiofile/.libs/libaudiofile.a \
137     libaudiofile/modules/.libs/libmodules.a \
138     libaudiofile/alac/.libs/libalac.a ],
139   [ libaudiofile ])
140
141 PKG_3RD([encore],[no],
142   [encore-5.0],
143   [ \$(OBJDIR)/libencore.a ],
144   [ . ])
145
146 PKG_3RD([esound],[no],
147   [esound-0.2.41],
148   [ .libs/libesd.a \
149     .libs/libesddsp.a ],
150   [ . ])
151
152 PKG_3RD([fdk],[auto],
153   [fdk-aac-0.1.5],
154   [ .libs/libfdk-aac.a ],
155   [ libAACdec/include libAACenc/include libSYS/include ])
156
157 PKG_3RD([ffmpeg],[yes],
158   [ffmpeg-4.0],
159   [ libavutil/libavutil.a \
160     libavcodec/libavcodec.a \
161     libpostproc/libpostproc.a \
162     libavdevice/libavdevice.a \
163     libavformat/libavformat.a \
164     libswscale/libswscale.a \
165     libavfilter/libavfilter.a \
166     libswresample/libswresample.a ],
167   [ . ])
168
169 if test "x$WANT_GIT_FFMPEG" != "xno" ; then
170   ver_ffmpeg="ffmpeg.git"
171 fi
172
173 PKG_3RD([fftw],[auto],
174   [fftw-3.3.7],
175   [ .libs/libfftw3.a \
176     libbench2/libbench2.a \
177     rdft/scalar/r2cb/.libs/librdft_scalar_r2cb.a \
178     rdft/scalar/r2r/.libs/librdft_scalar_r2r.a \
179     rdft/scalar/.libs/librdft_scalar.a \
180     rdft/scalar/r2cf/.libs/librdft_scalar_r2cf.a \
181     rdft/.libs/librdft.a \
182     api/.libs/libapi.a \
183     reodft/.libs/libreodft.a \
184     dft/scalar/codelets/.libs/libdft_scalar_codelets.a \
185     dft/scalar/.libs/libdft_scalar.a \
186     dft/.libs/libdft.a \
187     kernel/.libs/libkernel.a \
188     simd-support/.libs/libsimd_support.a ],
189   [ api ])
190
191 PKG_3RD([flac],[auto],
192   [flac-1.3.2],
193   [ src/libFLAC/.libs/libFLAC.a \
194     src/libFLAC++/.libs/libFLAC++.a \
195     src/share/replaygain_analysis/.libs/libreplaygain_analysis.a \
196     src/share/replaygain_synthesis/.libs/libreplaygain_synthesis.a \
197     src/share/grabbag/.libs/libgrabbag.a \
198     src/share/utf8/.libs/libutf8.a \
199     src/test_libs_common/.libs/libtest_libs_common.a ],
200   [ include ])
201
202 PKG_3RD([giflib],[yes],
203   [giflib-5.1.4],
204   [ lib/.libs/libgif.a \
205     util/libgetarg.a ],
206   [ lib ])
207
208 PKG_3RD([ilmbase],[auto],
209   [ilmbase-2.2.1],
210   [ Iex/.libs/libIex.a \
211     IexMath/.libs/libIexMath.a \
212     Half/.libs/libHalf.a \
213     Imath/.libs/libImath.a \
214     IlmThread/.libs/libIlmThread.a ],
215   [ Iex Half Imath config IlmThread ])
216
217 PKG_DEF([ladspa], [ladspa-0.4.17], [], [])
218
219 PKG_3RD([lame],[auto],
220   [lame-3.100],
221   [ libmp3lame/.libs/libmp3lame.a \
222     mpglib/.libs/libmpgdecoder.a ],
223   [ include ])
224
225 PKG_3RD([libavc1394],[auto],
226   [libavc1394-0.5.4],
227   [ libavc1394/.libs/libavc1394.a \
228     librom1394/.libs/librom1394.a \
229     common/.libs/libraw1394util.a ],
230   [ . ])
231
232 PKG_3RD([libraw1394],[auto],
233   [libraw1394-2.1.2],
234   [ src/.libs/libraw1394.a ],
235   [ . ])
236
237 PKG_3RD([libiec61883],[auto],
238   [libiec61883-1.2.0],
239   [ src/.libs/libiec61883.a ],
240   [ src ])
241
242 PKG_3RD([libdv],[auto],
243   [libdv-1.0.0],
244   [ libdv/.libs/libdv.a ],
245   [ . ])
246
247 PKG_3RD([libjpeg],[auto],
248   [libjpeg-turbo-1.5.1],
249   [ .libs/libjpeg.a \
250     .libs/libturbojpeg.a \
251     simd/.libs/libsimd.a ],
252   [ . ])
253
254 PKG_3RD([opus],[auto],
255   [opus-1.2.1],
256   [ .libs/libopus.a ],
257   [ include ])
258
259 PKG_3RD([openjpeg],[auto],
260   [openjpeg-2.3.0],
261   [ bin/libopenjp2.a ],
262   [ src/lib/openjp2 ])
263
264 PKG_3RD([libogg],[auto],
265   [libogg-1.3.2],
266   [ src/.libs/libogg.a ],
267   [ include ])
268
269 PKG_3RD([libsndfile],[auto],
270   [libsndfile-1.0.28],
271   [ src/.libs/libsndfile.a \
272     src/.libs/libcommon.a \
273     src/G72x/.libs/libg72x.a \
274     src/GSM610/.libs/libgsm.a ],
275   [ . ])
276
277 PKG_3RD([libtheora],[auto],
278   [libtheora-1.1.1],
279   [ lib/.libs/libtheora.a \
280     lib/.libs/libtheoradec.a \
281     lib/.libs/libtheoraenc.a ],
282   [ . ])
283
284 PKG_3RD([libuuid],[yes],
285   [libuuid-1.0.3],
286   [ .libs/libuuid.a ],
287   [ . ])
288
289 PKG_3RD([libvorbis],[auto],
290   [libvorbis-1.3.5],
291   [ lib/.libs/libvorbis.a \
292     lib/.libs/libvorbisenc.a \
293     lib/.libs/libvorbisfile.a ],
294   [ include . ])
295
296 PKG_3RD([mjpegtools],[yes],
297   [mjpegtools-2.1.0],
298   [ utils/mmxsse/.libs/libmmxsse.a \
299     utils/.libs/libmjpegutils.a \
300     lavtools/.libs/liblavfile.a \
301     lavtools/.libs/liblavjpeg.a \
302     mplex/.libs/libmplex2.a \
303     yuvfilters/.libs/libyuvfilters.a \
304     mpeg2enc/.libs/libmpeg2encpp.a ],
305   [ .  lavtools utils ])
306
307 PKG_3RD([openexr],[auto],
308   [openexr-2.2.1],
309   [ IlmImf/.libs/libIlmImf.a \
310     IlmImfUtil/.libs/libIlmImfUtil.a ],
311   [ IlmImf config ])
312
313 #PKG_3RD([festival],[no],
314 #  [festival],
315 #  [],
316 #  [])
317 #PKG_3RD(speech_tools,[no],
318 #  [speech_tools],
319 #  [],
320 #  [])
321 #
322 PKG_3RD([tiff],[auto],
323   [tiff-4.0.9],
324   [ libtiff/.libs/libtiff.a \
325     libtiff/.libs/libtiffxx.a \
326     port/.libs/libport.a ],[
327    . ])
328
329 PKG_3RD([twolame],[auto],
330   [twolame-0.3.13],
331   [ libtwolame/.libs/libtwolame.a ],
332   [  libtwolame ])
333
334 PKG_3RD([x264],[auto],
335   [x264-snapshot-20180118-2245],
336   [ libx264.a ],
337   [ . ])
338
339 PKG_3RD([x265],[auto],
340   [x265_2.8],
341   [ libx265.a ],
342   [ . source ])
343
344 PKG_3RD([libvpx],[auto],
345   [libvpx-1.7.0],
346   [ libvpx.a ],
347   [ . ])
348
349 PKG_3RD([lv2],[auto],
350   [lv2-1.14.0],
351   [ ],
352   [ usr/local/include usr/local/lib64/lv2 usr/local/lib/lv2 ])
353
354 PKG_3RD([sratom],[auto],
355   [sratom-0.6.0],
356   [ usr/local/lib/libsratom-0.a ],
357   [ usr/local/include ])
358
359 PKG_3RD([serd],[auto],
360   [serd-0.28.0],
361   [ usr/local/lib/libserd-0.a ],
362   [ usr/local/include ])
363
364 PKG_3RD([sord],[auto],
365   [sord-0.16.0],
366   [ usr/local/lib/libsord-0.a ],
367   [ usr/local/include ])
368
369 PKG_3RD([lilv],[auto],
370   [lilv-0.24.2],
371   [ usr/local/lib/liblilv-0.a ],
372   [ usr/local/include ])
373
374 PKG_3RD([suil],[auto],
375   [suil-0.8.4],
376   [ usr/local/lib/libsuil-0.a ],
377   [ usr/local/include ])
378
379 AC_SUBST(STATIC_PKGS)
380
381 AC_DEFUN([CHECK_ENABLE], [
382 AC_ARG_ENABLE([$1],
383   AC_HELP_STRING([--enable-[$1]], [$3 ([$4])]),
384   [WANT_$2=$enableval], [WANT_$2=[$4]])
385 ])
386
387 CHECK_ENABLE([static-build], [STATIC_BUILD], [build static], [auto])
388 CHECK_ENABLE([x264_hidepth], [X264_HIDEPTH], [build x264 10bit], [no])
389 CHECK_ENABLE([x265_hidepth], [X265_HIDEPTH], [build x265 10bit], [no])
390
391 test "x$WANT_STATIC_BUILD" = "xauto" && WANT_STATIC_BUILD=$WANT_CINBIN_BUILD
392
393 AC_DEFUN([CHECK_PROG], [
394  AC_CHECK_PROG([PROG_$1], [$2], [yes],[no])
395 ])
396 AC_DEFUN([REQUIRE_PROG], [
397  CHECK_PROG([$1],[$2])
398  if test "x$PROG_$1" = "xno"; then
399    AC_MSG_WARN([$2 is missing and required.])
400    FATAL_ERROR=1
401  fi
402 ])
403
404 # Checks for programs.
405
406 REQUIRE_PROG(NASM, [nasm])
407 REQUIRE_PROG(YASM, [yasm])
408 REQUIRE_PROG(OBJCOPY, [objcopy])
409 if test "x$FATAL_ERROR" != "x"; then
410  AC_MSG_ERROR("fatal eror.")
411 fi
412 CHECK_PROG(PACTL, [pactl])
413 WANT_PACTL=$PROG_PACTL
414
415 # libx264 nasm fix
416 AC_MSG_CHECKING([nasm x264 compatible])
417 echo "vmovdqa32 [[eax]]{k1}{z}, zmm0" > conftest.asm
418 nasm conftest.asm -o conftest.o > /dev/null 2>&1
419 if test $? != 0 ; then
420  AC_MSG_RESULT([no])
421  AC_MSG_WARN([libx264 built without assembly code])
422  X264_CFG_PARAMS="$X264_CFG_PARAMS --disable-asm"
423 else
424  AC_MSG_RESULT([yes])
425 fi
426 rm -f conftest.asm conftest.o
427
428 AC_CHECK_DECL([X_HAVE_UTF8_STRING],,[no_utf=yes],[#include <X11/Xlib.h>])
429 if test "$no_utf" = "yes"; then
430   AC_MSG_ERROR([Cinelerra requires utf8 support in X Windows.])
431 fi
432
433 # Checks for headers/libraries.
434
435 AC_DEFUN([CHECK_HEADERS], [
436 if test "x$HAVE_$1" != "xno"; then
437  AC_CHECK_HEADER(m4_apply([m4_car],m4_split([$3])), [HAVE_$1=yes], [HAVE_$1=no],
438   [m4_foreach([i], m4_split([$3]), [[#include "]i["
439 ]])])
440  AC_SUBST([HAVE_$1])
441  AC_MSG_CHECKING([$2])
442  AC_MSG_RESULT([$HAVE_$1])
443  if test "x$HAVE_$1" = "xno"; then
444   if test "x$PKG_$1" = "x"; then RESULT=no; fi
445  fi
446 fi
447 ])
448
449 AC_DEFUN([CHECK_LIB], [
450 if test "x$HAVE_$1" != "xno"; then
451  if test "x$PKG_$1" = "x" -o "x$WANT_STATIC_BUILD" = "xno"; then
452   AC_CHECK_LIB([$2], [$3], [HAVE_$1=yes], [HAVE_$1=no], [$4])
453   AC_SUBST([HAVE_$1])
454   if test "x$HAVE_$1" = "xyes"; then
455    if test "x$PKG_$1" = "x"; then
456     SYSTEM_LIBS+=" -l[$2]"
457     for lib in [$4]; do SYSTEM_LIBS+=" $lib"; done
458    else
459     SHARED_$1+=" -l[$2]"
460     for lib in [$4]; do SHARED_LIBS+=" $lib"; done
461    fi
462   elif test "x$PKG_$1" = "x"; then RESULT=no; fi
463  fi
464 fi
465 ])
466
467 CHECK_LIB([X11], [X11], [XOpenDisplay])
468 CHECK_HEADERS([X11], [X11 headers], [X11/X.h X11/Xlib.h X11/Xutil.h X11/cursorfont.h])
469 CHECK_HEADERS([X11], [X11 headers], [X11/keysym.h X11/Sunkeysym.h X11/Xatom.h X11/XF86keysym.h])
470 CHECK_LIB([XEXT], [Xext], [XShmQueryExtension])
471 CHECK_HEADERS([XEXT], [Xlib XShm extention], [X11/Xlib.h X11/extensions/XShm.h X11/extensions/shape.h])
472 CHECK_LIB([XINERAMA], [Xinerama], [XineramaQueryExtension])
473 CHECK_HEADERS([XINERAMA], [Xinerama headers], [X11/extensions/Xinerama.h])
474 CHECK_LIB([XV], [Xv], [XvQueryExtension])
475 CHECK_HEADERS([XV], [Xlib Xv extention], [X11/Xlib.h X11/extensions/Xvlib.h])
476 CHECK_LIB([XFIXES], [Xfixes], [XFixesQueryVersion])
477 CHECK_LIB([BZ2], [bz2], [BZ2_bzDecompress])
478 CHECK_LIB([FONTCONFIG], [fontconfig], [FcInit])
479 CHECK_LIB([FREETYPE], [freetype], [FT_Init_FreeType])
480 CHECK_LIB([LZMA], [lzma], [lzma_version_number])
481 CHECK_LIB([PNG], [png], [png_read_png])
482 CHECK_LIB([PTHREAD], [pthread], [pthread_create])
483 CHECK_LIB([Z], [z], [gzopen])
484 CHECK_LIB([fftw], [fftw3], [fftw_execute])
485 CHECK_HEADERS([fftw], [fftw headers], [fftw3.h])
486 CHECK_LIB([libuuid], [uuid], [uuid_clear])
487 CHECK_HEADERS([libuuid], [uuid headers], [uuid/uuid.h])
488 CHECK_HEADERS([LINUX_CDROM], [linux cdrom headers], [linux/cdrom.h linux/futex.h])
489 CHECK_HEADERS([LINUX_SYS], [linux sys], [sys/ioctl.h sys/stat.h sys/types.h sys/time.h sys/syscall.h])
490 CHECK_LIB([flac], [FLAC], [FLAC__stream_decoder_new])
491 CHECK_HEADERS([flac], [FLAC headers], [FLAC/stream_decoder.h])
492 CHECK_LIB([lame], [mp3lame], [lame_init])
493 CHECK_HEADERS([lame], [lame headers], [lame/lame.h])
494 CHECK_LIB([libjpeg], [jpeg], [jpeg_start_decompress])
495 CHECK_HEADERS([libjpeg], [jpeg headers], [stdio.h jpeglib.h])
496 CHECK_LIB([libogg], [ogg], [ogg_stream_init])
497 CHECK_HEADERS([libogg], [ogg headers], [ogg/ogg.h])
498 CHECK_LIB([openjpeg], [openjp2], [opj_version])
499 CHECK_HEADERS([openjpeg], [openjpeg headers], [openjpeg.h])
500 CHECK_LIB([libsndfile], [sndfile], [sf_open])
501 CHECK_HEADERS([libsndfile], [sndfile headers], [sndfile.h])
502 CHECK_LIB([ilmbase], [IlmImf], [ImfOpenInputFile])
503 CHECK_HEADERS([ilmbase], [IlmImf headers], [OpenEXR/ImfCRgbaFile.h])
504 CHECK_LIB([libtheora], [theora], [theora_info_init], [-ltheoraenc -ltheoradec -logg])
505 CHECK_HEADERS([libtheora], [threora headers], [theora/theoraenc.h])
506 CHECK_LIB([libvorbis], [vorbisenc], [vorbis_encode_init], [-lvorbis -lvorbisfile -logg])
507 CHECK_HEADERS([libvorbis], [vorbis encoders headers], [vorbis/vorbisenc.h])
508 CHECK_LIB([libvorbis], [vorbisfile], [ov_open])
509 CHECK_HEADERS([libvorbis], [vorbis file headers], [vorbis/vorbisfile.h])
510 CHECK_LIB([libvpx], [vpx], [vpx_codec_decode])
511 CHECK_HEADERS([libvpx], [vpx headers], [vpx/vpx_decoder.h])
512 CHECK_LIB([mjpegtools], [mjpegutils], [mjpeg_info])
513 CHECK_HEADERS([mjpegtools], [mjpegtools headers], [mjpegtools/mjpeg_types.h])
514 CHECK_LIB([tiff], [tiff], [TIFFOpen])
515 CHECK_HEADERS([tiff], [tiff headers], [tiff.h tiffio.h])
516 CHECK_LIB([twolame], [twolame], [twolame_encode_buffer_float32_interleaved])
517 CHECK_HEADERS([twolame], [twolame headers], [twolame.h])
518 CHECK_LIB([x264], [x264], [x264_encoder_encode])
519 CHECK_HEADERS([x264], [x264 headers], [stdint.h x264.h])
520 CHECK_LIB([x265], [x265], [x265_encoder_encode])
521 CHECK_HEADERS([x265], [x265 headers], [x265.h])
522 CHECK_LIB([a52dec], [a52], [a52_init])
523 CHECK_HEADERS([a52dec], [a52 headers], [a52.h])
524 CHECK_LIB([encore], [encore], [encore])
525 CHECK_HEADERS([encore], [encore headers], [encore.h])
526 CHECK_LIB([giflib], [gif], [DGifOpen])
527 CHECK_HEADERS([giflib], [gif lib headers], [gif_lib.h])
528 CHECK_LIB([fdk], [fdk-aac], [faacDecInit])
529 CHECK_HEADERS([fdk], [fdk headers], [fdk-aac/genericStds.h])
530 CHECK_LIB([jbig], [jbig], [jbg_dec_init])
531 CHECK_LIB([vdpau], [vdpau], [vdp_device_create_x11])
532
533 #if test "x$HAVE_mjpegtools" = "xyes"; then
534 #CFG_CFLAGS+=" -I/usr/include/mjpegtools"
535 #fi
536
537 AC_DEFUN([CHECK_WANT], [
538 RESULT=yes
539 # WANT_$1
540 if test "x$WANT_$1" != "xyes" -a "x$WANT_$1" != "xno" ; then
541 AC_ARG_WITH(m4_tolower([$1]),
542  AC_HELP_STRING([m4_join([-],[--with],m4_tolower([$1]))], [$3] (auto)),
543   [WANT_$1=$withval],[WANT_$1=$2])
544  m4_quote($4)
545  if test "x$RESULT" = "xno" -a "x$PKG_$1" = "x"; then
546   echo "=== want $1 Failed."
547   WANT_$1=no
548  elif test "x$WANT_$1" = "xauto" ; then
549   WANT_$1=yes
550  fi
551 fi
552 CFG_WANTS+=" $1"
553 AC_SUBST([WANT_$1])
554 ])
555
556 CHECK_WANT([GL], [auto], [use opengl], [
557  CHECK_LIB([GL], [GL], [glUseProgram])
558  CHECK_LIB([GL], [GLU], [gluOrtho2D])
559  CHECK_HEADERS([GL], [opengl headers], [GL/gl.h GL/glext.h GL/glu.h GL/glx.h])])
560
561 CHECK_WANT([OSS], [auto], [use OSS audio], [
562  CHECK_HEADERS([OSS], [oss headers], [sys/soundcard.h])])
563
564 CHECK_WANT([XFT], [auto], [use libXft], [
565  CHECK_LIB([XFT], [Xft], [XftInit])
566  CHECK_HEADERS([XFT], [Xft/freetype headers], [X11/Xlib.h X11/Xft/Xft.h])])
567
568 CHECK_WANT([ALSA], [auto], [use libasound/alsa], [
569  CHECK_LIB([ALSA], [asound], [snd_pcm_open])
570  CHECK_HEADERS([ALSA], [asound headers], [alsa/asoundlib.h])])
571
572 CHECK_WANT([FIREWIRE], [auto], [use firewire], [
573  CHECK_LIB([libavc1394], [avc1394], [avc1394_init_target])
574  CHECK_HEADERS([libavc1394], [libavc1394 headers], [libavc1394/avc1394.h])
575  CHECK_LIB([libavc1394], [rom1394], [rom1394_get_bus_id])
576  CHECK_HEADERS([libavc1394], [librom1394 headers], [libavc1394/rom1394.h])
577  CHECK_LIB([libiec61883], [iec61883], [iec61883_mpeg2_recv_init])
578  CHECK_HEADERS([libiec61883], [libiec61883 headers], [libiec61883/iec61883.h])
579  CHECK_LIB([libraw1394], [raw1394], [raw1394_iso_recv_init])
580  CHECK_HEADERS([libraw1394], [libraw1394 headers], [libraw1394/raw1394.h])])
581
582 CHECK_WANT([DV], [auto], [use dv], [
583  CHECK_LIB([libdv], [dv], [dv_init])
584  CHECK_HEADERS([libdv], [libdv headers], [libdv/dv.h])])
585
586 CHECK_WANT([DVB], [auto], [use dvb], [
587  CHECK_HEADERS([DVB], [dvb device headers], [linux/dvb/dmx.h linux/dvb/frontend.h])])
588
589 CHECK_WANT([VIDEO4LINUX2], [auto], [use v4l2], [
590  CHECK_HEADERS([VIDEO4LINUX2], [v4l2 system headers], [linux/kernel.h linux/types.h linux/videodev2.h])])
591
592 CHECK_WANT([XXF86VM], [auto], [use xf86vmode], [
593  CHECK_HEADERS([XXF86VM], [XF86VM headers], [X11/Xlib.h X11/extensions/xf86vmode.h])])
594
595 CHECK_WANT([ESOUND], [no], [use esd], [
596  CHECK_LIB([esound], [esd], [esd_open_sound])
597  CHECK_HEADERS([esound], [esound headers], [esd.h])
598  CHECK_LIB([audiofile], [audiofile], [afOpenFile])
599  CHECK_HEADERS([audiofile], [audiofile headers], [audiofile.h])])
600
601 CHECK_WANT([OPUS], [auto], [use libopus], [
602  CHECK_LIB([opus], [opus], [opus_multistream_decoder_create])
603  CHECK_HEADERS([opus], [libopus headers], [opus/opus_multistream.h])])
604
605 CHECK_WANT([LV2], [auto], [use lv2], [
606  saved_CFLAGS="$CFLAGS"
607  CHECK_LIB([lilv], [lilv-0], [lilv_world_new])
608  CHECK_LIB([sord], [sord-0], [sord_world_new])
609  CHECK_LIB([serd], [serd-0], [serd_reader_new])
610  CHECK_LIB([sratom], [sratom-0], [sratom_new])
611  CFLAGS="-I/usr/include/lilv-0"
612  CHECK_HEADERS([lv2], [lilv headers], [lilv/lilv.h])
613  CHECK_LIB([suil], [suil-0], [suil_instance_new])
614  CFLAGS="-I/usr/include/suil-0"
615  CHECK_HEADERS([lv2], [suil headers], [suil/suil.h])
616  CFLAGS="$saved_CFLAGS"])
617
618 CHECK_WANT([DL], [auto], [system has libdl], [
619  CHECK_LIB([DL], [dl], [dlopen])])
620
621 CHECK_WANT([EXR], [auto], [use exr], [])
622
623 CHECK_WANT([OPENCV], [no], [opencv=sys/sta/dyn,git/tar=url], [
624 ])
625
626 CHECK_WANT([NUMA], [auto], [system has libnuma], [
627  CHECK_LIB([NUMA], [numa], [numa_alloc])])
628
629 CHECK_WANT([OPENEXR], [auto], [use openexr], [
630  AC_MSG_CHECKING([for openexr available])
631  saved_LIBS="$LIBS"
632  saved_CXXFLAGS="$CXXFLAGS"
633  # ilmbase libs
634  LIBS=" -lIlmImf -lIlmThread -lIex -lpthread"
635  CXXFLAGS="-I/usr/include/OpenEXR"
636  AC_LANG_PUSH(C++)
637  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
638 #include "ImfChannelList.h"
639 #include "ImfChromaticities.h"
640 #include "ImfCompression.h"
641 #include "ImfIO.h"
642 #include "ImfInputFile.h"
643 #include "ImfOutputFile.h"
644 #include "ImfPixelType.h"
645 #include "ImfRgbaFile.h"
646 #include "ImfRgbaYca.h"
647 #include "ImfVersion.h"
648 class EXRIStream : public Imf::IStream { public:
649 EXRIStream() : Imf::IStream("mypath") {} };
650 class EXROStream : public Imf::OStream { public: 
651 EXROStream() : Imf::OStream("mypath") {} };
652 ]])], [HAVE_OPENEXR=yes], [HAVE_OPENEXR=no])
653  RESULT="$HAVE_OPENEXR"
654  if test "x$RESULT" = "xyes"; then
655    SHARED_openexr="$LIBS"
656    CFG_CFLAGS+=" -I/usr/include/OpenEXR"
657  fi
658  LIBS="$saved_LIBS"
659  CXXFLAGS="$saved_CXXFLAGS"
660  AC_LANG_POP(C++)
661  AC_MSG_RESULT([$HAVE_OPENEXR])
662 ])
663 AC_SUBST([HAVE_OPENEXR])
664
665 # build global_config
666 OBJDIR=`uname -m`
667 AC_SUBST(OBJDIR)
668
669 echo "AC_HELP_STRING([Reason],[Package])"
670 echo "AC_HELP_STRING([------],[-------])"
671
672 AC_DEFUN([PKG_DISABLED],[
673  PKG_$1="no"
674  BUILD_$1=0
675  AC_SUBST(BUILD_$1)
676  echo "AC_HELP_STRING([disabled],[$1])"
677 ])
678 AC_DEFUN([PKG_SHARED],[
679  BUILD_$1=0
680  AC_SUBST(BUILD_$1)
681  SHARED_LIBS+="$SHARED_$1"
682  echo "AC_HELP_STRING([shared],[$1])"
683 ])
684
685 AC_DEFUN([PKG_STATIC],[
686  if test "x$WANT_CIN_3RDPARTY" != "xno"; then
687   PKG_$1="yes"
688   BUILD_$1=1
689   AC_SUBST(BUILD_$1)
690   STATIC_BLDS+=" [$1]"
691   echo "AC_HELP_STRING([$2],[$1])"
692  fi
693 ])
694
695 AC_DEFUN([PKG_FORCED],[PKG_STATIC([$1],[forced])])
696
697 if test "x$WANT_CIN_3RDPARTY" != "xno"; then
698 # order matters
699 for dep in \
700         ffmpeg/twolame ffmpeg/lame ffmpeg/openjpeg \
701         ffmpeg/libvorbis ffmpeg/libtheora ffmpeg/x264 ffmpeg/x265 ffmpeg/fdk \
702         libiec61883/libraw1394 libavc1394/librom1394 \
703         openexr/ilmbase ilmbase/libogg \
704         libtheora/libogg libtheora/libvorbis ; do
705   lib=`dirname $dep`;  needs=`basename $dep`
706   eval pkg_lib="\$PKG_$lib"; eval needs_lib="\$HAVE_$needs";
707   if test "x$pkg_lib" != "xno"; then
708     eval "PKG_$needs=yes"
709   fi
710 done
711 fi
712
713 AC_DEFUN([PKG_PROVIDE],[
714 if test "x$BUILD_$1" = "x" ; then
715  if test "x$2" = "xno" -o "x$PKG_$1" = "xno"; then
716   PKG_DISABLED([$1])
717  elif test "x$PKG_$1" = "xyes"; then
718   PKG_FORCED([$1])
719  elif test "x$WANT_STATIC_BUILD" = "xyes"; then
720   PKG_STATIC([$1],[static])
721  elif test "x$HAVE_$1" = "xyes"; then
722   PKG_SHARED([$1])
723  else
724   PKG_STATIC([$1],[needed])
725  fi
726 fi
727 ])
728
729 PKG_PROVIDE([a52dec])
730 PKG_PROVIDE([djbfft])
731 PKG_PROVIDE([encore])
732 PKG_PROVIDE([audiofile],[$WANT_ESOUND])
733 PKG_PROVIDE([esound],[$WANT_ESOUND])
734 PKG_PROVIDE([fdk])
735 PKG_PROVIDE([ffmpeg])
736 PKG_PROVIDE([fftw])
737 PKG_PROVIDE([flac])
738 PKG_PROVIDE([giflib])
739 PKG_PROVIDE([ilmbase], [$WANT_OPENEXR])
740 PKG_PROVIDE([ladspa],[$WANT_LADSPA_BUILD])
741 PKG_PROVIDE([lame])
742 PKG_PROVIDE([libavc1394],[$WANT_FIREWIRE])
743 PKG_PROVIDE([libraw1394],[$WANT_FIREWIRE])
744 PKG_PROVIDE([libiec61883],[$WANT_FIREWIRE])
745 PKG_PROVIDE([libdv],[$WANT_DV])
746 PKG_PROVIDE([libjpeg])
747 PKG_PROVIDE([libogg])
748 PKG_PROVIDE([libsndfile])
749 PKG_PROVIDE([libtheora])
750 PKG_PROVIDE([libuuid])
751 PKG_PROVIDE([libvorbis])
752 PKG_PROVIDE([mjpegtools])
753 PKG_PROVIDE([openexr], [$WANT_OPENEXR])
754 PKG_PROVIDE([openjpeg])
755 PKG_PROVIDE([tiff])
756 PKG_PROVIDE([twolame])
757 PKG_PROVIDE([x264])
758 PKG_PROVIDE([x265])
759 PKG_PROVIDE([libvpx])
760 PKG_PROVIDE([opus], [$WANT_OPUS])
761 PKG_PROVIDE([lv2], [$WANT_LV2])
762 PKG_PROVIDE([lilv], [$WANT_LV2])
763 PKG_PROVIDE([sratom], [$WANT_LV2])
764 PKG_PROVIDE([serd], [$WANT_LV2])
765 PKG_PROVIDE([sord], [$WANT_LV2])
766 PKG_PROVIDE([suil], [$WANT_LV2])
767
768 if test "x$WANT_LV2" = "xyes"; then
769   if test "x$HAVE_lv2" = "xyes" -a "x$BUILD_lilv" = "x0"; then
770     CFG_CFLAGS+=' -I/usr/include/lilv-0 -I/usr/include/suil-0'
771   fi
772 fi
773
774 AC_SUBST(STATIC_BLDS)
775 AC_SUBST(SHARED_LIBS)
776
777 for f in $SYSTEM_LIBS; do
778   echo "AC_HELP_STRING([system],[$f])"
779 done
780 AC_SUBST(SYSTEM_LIBS)
781
782 echo ""
783 if test "x$WANT_CIN_3RDPARTY" != "xno"; then
784   CFG_CFLAGS+=" -DHAVE_CIN_3RDPARTY"
785 fi
786 for v in GL XFT XXF86VM OSS ALSA FIREWIRE DV DVB \
787          VIDEO4LINUX2 ESOUND PACTL OPENEXR LV2 \
788          COMMERCIAL LIBZMPEG; do
789   eval vv="\$WANT_$v"
790   if test "x$vv" != "xno"; then
791     CFG_CFLAGS+=" -DHAVE_$v"
792     vv=with
793   else
794     vv=without
795   fi
796   v=`echo "$v" | tr "A-Z" "a-z"`
797   echo "  using: $vv-$v"
798 done
799
800 echo "  using: with-jobs = $WANT_JOBS"
801 echo "  using: exec-name = $WANT_CIN"
802 echo "  using: with-cinlib = $WANT_CINLIB_DIR"
803 echo "  using: with-cindat = $WANT_CINDAT_DIR"
804 echo "  using: with-config-dir = $WANT_CONFIG_DIR"
805 echo "  using: with-browser = $WANT_CIN_BROWSER"
806 echo "  using: with-plugin-dir = $WANT_PLUGIN_DIR"
807 echo "  using: with-ladspa-dir = $WANT_LADSPA_DIR"
808 echo "  using: with-opencv = $WANT_OPENCV"
809 echo "  using: with-git-ffmpeg = $WANT_GIT_FFMPEG"
810 echo "  using: with-noelision = $WANT_NOELISION"
811 echo "  using: with-libzmpeg = $WANT_LIBZMPEG"
812 echo "  using: with-commerical = $WANT_COMMERCIAL"
813 echo ""
814 echo "  using: thirdparty build = $WANT_CIN_3RDPARTY"
815 echo "  using: single-user  = $WANT_CINBIN_BUILD"
816 echo "  using: static-build = $WANT_STATIC_BUILD"
817 echo "  using: ladspa-build = $WANT_LADSPA_BUILD"
818 echo ""
819
820 # build extras
821 if test "x$HAVE_tiff" = "xyes"; then
822   if test "x$HAVE_jbig" = "xyes"; then
823     EXTRA_LIBS+=' -ljbig'
824   fi
825 fi
826 if test "x$HAVE_NUMA" = "xyes"; then
827   EXTRA_LIBS+=' -lnuma'
828 fi
829 if test "x$HAVE_DL" = "xyes"; then
830   EXTRA_LIBS+=' -ldl'
831   FFMPEG_EXTRA_CFG+=' --extra-ldflags="-ldl"'
832 fi
833 if test "x$WANT_OPUS" = "xyes"; then
834   FFMPEG_EXTRA_CFG+=' --enable-libopus'
835   if test "x$HAVE_opus" = "xyes" -a "x$BUILD_opus" = "x0"; then
836     EXTRA_LIBS+=' -lopus'
837     CFG_CFLAGS+=' -I/usr/include/opus'
838   fi
839 fi
840
841 # intel lock elision bugs
842 if test "x$WANT_NOELISION" != "xno"; then
843   CFG_RPATH=`ls -1fd 2> /dev/null \
844  /usr/lib/noelision \
845  /lib/noelision \
846  /usr/lib64/noelision \
847  /lib64/noelision \
848   | tail -1`
849 fi
850
851 AC_SUBST(WANT_CIN_3RDPARTY)
852 AC_SUBST(EXTRA_LIBS)
853 AC_SUBST(FFMPEG_EXTRA_CFG)
854 AC_SUBST(WANT_X264_HIDEPTH)
855 AC_SUBST(WANT_X265_HIDEPTH)
856
857 AC_SUBST(CFG_CFLAGS)
858 AC_SUBST(CFG_CXXFLAGS)
859
860 AC_CONFIG_FILES([Makefile])
861 AC_OUTPUT
862
863 exec > global_config
864
865 echo "SHELL := /bin/bash"
866 echo "export SHELL"
867 echo "WANT_JOBS := $WANT_JOBS"
868 echo ""
869 echo "OBJDIR := $OBJDIR"
870 echo "BINDIR := \$(TOPDIR)/bin"
871 echo "CINELERRA := \$(TOPDIR)/cinelerra"
872 echo "GUICAST := \$(TOPDIR)/guicast"
873 echo "LIBZMPEG3 := \$(TOPDIR)/libzmpeg3"
874 echo "MPEG2ENC := \$(TOPDIR)/mpeg2enc"
875 echo "MPLEXLO := \$(TOPDIR)/mplexlo"
876 echo "PLUGINS := \$(TOPDIR)/plugins"
877 echo "TDB := \$(TOPDIR)/db"
878 echo "THIRDPARTY := \$(TOPDIR)/thirdparty"
879 echo "EXTRA_LIBS := $EXTRA_LIBS"
880 echo "FFMPEG_EXTRA_CFG := $FFMPEG_EXTRA_CFG"
881 echo "export OBJDIR BINDIR CINELERRA GUICAST LIBZMPEG3"
882 echo "export MPEG2ENC MPLEXLO PLUGINS TDB"
883 echo "export THIRDPARTY EXTRA_LIBS FFMPEG_EXTRA_CFG"
884 echo ""
885
886 echo "WANT_CIN := $WANT_CIN"
887 CFG_WANTS+=" CIN_3RDPARTY LIBZMPEG COMMERCIAL"
888 for w in $CFG_WANTS; do ww=WANT_$w; echo "WANT_$w := ${!ww}"; done
889 echo ""
890
891 echo "ifndef CFLAGS_"
892 echo "ifdef CFLAGS"
893 echo "CFLAGS_ := \$(CFLAGS)"
894 echo "else"
895 echo "CFLAGS_ := ${CFLAGS:--g -O2}"
896 echo "endif"
897 echo "endif"
898
899 echo "CFLAGS := \$(CFLAGS_)"
900 echo "CFLAGS += '-DCIN=\"\$(WANT_CIN)\"'"
901 echo "CFLAGS += '-DCINLIB_DIR=\"$WANT_CINLIB_DIR\"'"
902 echo "CFLAGS += '-DCINDAT_DIR=\"$WANT_CINDAT_DIR\"'"
903 echo "CFLAGS += '-DCONFIG_DIR=\"$WANT_CONFIG_DIR\"'"
904 echo "CFLAGS += '-DPLUGIN_DIR=\"$WANT_PLUGIN_DIR\"'"
905 echo "CFLAGS += '-DLOCALE_DIR=\"$WANT_LOCALE_DIR\"'"
906 echo "CFLAGS += '-DLADSPA_DIR=\"$WANT_LADSPA_DIR\"'"
907 echo "CFLAGS += '-DCIN_BROWSER=\"$WANT_CIN_BROWSER\"'"
908 for flg in $CFG_CFLAGS; do echo "CFLAGS += $flg"; done
909 echo ""
910 for flg in $CFG_CXXFLAGS; do echo "CXXFLAGS += $flg"; done
911 echo ""
912
913 if test "x$WANT_X264_HIDEPTH" = "xyes" ; then
914   X264_CFG_PARAMS="$X264_CFG_PARAMS --bit-depth=10"
915 fi
916 if test "x$WANT_X265_HIDEPTH" = "xyes" ; then
917   X265_CFG_PARAMS="$X265_CFG_PARAMS -DHIGH_BIT_DEPTH:BOOL=ON" # -DMAIN12:BOOL=ON"
918 fi
919
920 for pkg in $STATIC_PKGS; do
921   eval pkg_lib="\$PKG_$pkg"
922   if test "x$pkg_lib" = "xno"; then continue; fi;
923   echo "static_pkgs += $pkg"
924 done
925 echo ""
926
927 for pkg in $STATIC_BLDS; do
928   echo "static_blds += $pkg"
929   ver_pkg=ver_$pkg
930   echo "$ver_pkg := \$(THIRDPARTY)/${!ver_pkg}"
931   inc_pkg=inc_$pkg
932   echo "$inc_pkg := \\"
933   for inc in ${!inc_pkg}; do
934     echo "  -I\$($ver_pkg)/$inc \\"
935   done
936   echo ""
937   echo "static_incs += \$(inc_$pkg)"
938   lib_pkg=lib_$pkg
939   echo "$lib_pkg := \\"
940   for lib in ${!lib_pkg}; do
941     echo "  \$($ver_pkg)/$lib \\"
942   done
943   echo ""
944   echo "static_libs += \$($lib_pkg)"
945   echo ""
946 done
947 echo ""
948
949 for lib in $SHARED_LIBS; do echo "shared_libs += $lib"; done
950 echo ""
951 for lib in $SYSTEM_LIBS; do echo "system_libs += $lib"; done
952 echo "export static_pkgs static_blds shared_libs system_libs"
953 echo ""
954
955 echo "thirdparty_libraries := \$(static_libs) \$(shared_libs)"
956
957 if test "x$CFG_RPATH" != "x"; then
958   echo "libraries+= -Wl,-rpath=$CFG_RPATH"
959 fi
960
961 echo "libraries += -Wl,--start-group"
962 echo "libraries += \$(thirdparty_libraries)"
963 echo "libraries += \$(system_libs)"
964 echo "libraries += \$(EXTRA_LIBS)"
965 echo "libraries += -Wl,--end-group"
966 # -Wl,--start-group ... -Wl,--end-group does not work on ubuntu
967 echo "libraries += \$(thirdparty_libraries)"
968 echo "libraries += \$(system_libs)"
969 echo "libraries += \$(EXTRA_LIBS)"
970 echo ""
971 echo "export thirdparty_libraries libraries"
972 echo "export CFLAGS_ CXXFLAGS_ LDFLAGS_"
973 echo "unexport CFLAGS CXXFLAGS LDFLAGS"
974
975 if test "x$HAVE_tiff" = "xyes"; then
976   if test "x$HAVE_jbig" != "xyes"; then
977     echo "tiff.cfg_params+= --disable-jbig"
978   fi
979 fi
980
981 if test "x$WANT_GIT_FFMPEG" != "xno"; then
982   echo "ffmpeg.git := $WANT_GIT_FFMPEG"
983 fi
984 if test "x$WANT_OPUS" = "xyes" -a "x$BUILD_opus" = "x0"; then
985   echo 'ffmpeg.cflags+=" -I/usr/include/opus"'
986 fi
987 if test "x$X264_CFG_PARAMS" != "x" ; then
988   echo "x264.cfg_params :=$X264_CFG_PARAMS --enable-static --enable-pic"
989 fi
990 if test "x$X265_CFG_PARAMS" != "x" ; then
991   echo "x265.cfg_params :=$X265_CFG_PARAMS -DENABLE_SHARED=no"
992 fi