65
65
--disable-logging do not log configure debug information
66
66
--prefix=PREFIX install in PREFIX [$prefix]
67
67
--bindir=DIR install binaries in DIR [PREFIX/bin]
68
--datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
68
--datadir=DIR install data files in DIR [PREFIX/share/avconv]
69
69
--libdir=DIR install libs in DIR [PREFIX/lib]
70
70
--shlibdir=DIR install shared libs in DIR [PREFIX/lib]
71
71
--incdir=DIR install includes in DIR [PREFIX/include]
81
81
and binaries will be unredistributable [no]
82
82
--disable-doc do not build documentation
83
83
--disable-ffmpeg disable ffmpeg build
84
--disable-ffplay disable ffplay build
85
--disable-ffprobe disable ffprobe build
86
--disable-ffserver disable ffserver build
84
--disable-avconv disable avconv build
85
--disable-avplay disable avplay build
86
--disable-avprobe disable avprobe build
87
--disable-avserver disable avserver build
87
88
--disable-avdevice disable libavdevice build
88
89
--disable-avcodec disable libavcodec build
89
90
--disable-avformat disable libavformat build
90
91
--disable-swscale disable libswscale build
91
--disable-postproc disable libpostproc build
92
--enable-postproc enable libpostproc build (deprecated) [no]
92
93
--disable-avfilter disable video filter support [no]
93
94
--disable-pthreads disable pthreads [auto]
94
--enable-w32threads use Win32 threads [no]
95
--disable-w32threads disable Win32 threads [auto]
95
96
--enable-x11grab enable X11 grabbing [no]
96
97
--disable-network disable network support [no]
97
98
--enable-gray enable full grayscale support (slower color)
107
108
--disable-mdct disable MDCT code
108
109
--disable-rdft disable RDFT code
109
110
--enable-vaapi enable VAAPI code
111
--enable-vda enable VDA code
110
112
--enable-vdpau enable VDPAU code
111
113
--disable-dxva2 disable DXVA2 code
112
114
--enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)
113
115
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
116
--disable-safe-bitstream-reader
117
disable buffer boundary checking in bitreaders
118
(faster, but may crash)
114
119
--enable-memalign-hack emulate memalign, interferes with memory debuggers
115
120
--disable-everything disable all components listed below
116
121
--disable-encoder=NAME disable encoder NAME
161
166
--enable-avisynth enable reading of AVISynth script files [no]
162
167
--enable-bzlib enable bzlib [autodetect]
163
168
--enable-frei0r enable frei0r video filtering
169
--enable-gnutls enable gnutls [no]
164
170
--enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
165
171
--enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
166
172
--enable-libopencv enable video filtering via libopencv [no]
173
--enable-libcdio enable audio CD grabbing with libcdio
167
174
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
168
175
and libraw1394 [no]
169
176
--enable-libdirac enable Dirac support via libdirac [no]
174
181
--enable-libnut enable NUT (de)muxing via libnut,
175
182
native (de)muxer exists [no]
176
183
--enable-libopenjpeg enable JPEG 2000 decoding via OpenJPEG [no]
184
--enable-libpulse enable Pulseaudio input via libpulse [no]
177
185
--enable-librtmp enable RTMP[E] support via librtmp [no]
178
186
--enable-libschroedinger enable Dirac support via libschroedinger [no]
179
--enable-libspeex enable Speex decoding via libspeex [no]
187
--enable-libspeex enable Speex support via libspeex [no]
180
188
--enable-libtheora enable Theora encoding via libtheora [no]
181
189
--enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
182
190
--enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
188
196
--enable-libxvid enable Xvid encoding via xvidcore,
189
197
native MPEG-4/Xvid encoder exists [no]
190
198
--enable-mlib enable Sun medialib [no]
199
--enable-openssl enable openssl [no]
191
200
--enable-zlib enable zlib [autodetect]
193
202
Advanced options (experts only):
237
246
--malloc-prefix=PFX prefix malloc and related names with PFX
238
247
--enable-sram allow use of on-chip SRAM
239
248
--disable-symver disable symbol versioning
249
--optflags override optimization-related compiler flags
241
251
Developer options (useful when working on Libav itself):
242
252
--disable-debug disable debugging symbols
1227
1256
fast_clz_if_any="alpha armv5te avr32 mips ppc x86"
1228
1257
fast_unaligned_if_any="armv6 ppc x86"
1259
inline_asm_deps="!tms470"
1230
1260
need_memalign="altivec neon sse"
1231
inline_asm_deps="!tms470"
1233
1262
symver_if_any="symver_asm_label symver_gnu_asm"
1268
1297
flac_encoder_select="golomb lpc"
1269
1298
flashsv_decoder_select="zlib"
1270
1299
flashsv_encoder_select="zlib"
1300
flashsv2_decoder_select="zlib"
1271
1301
flv_decoder_select="h263_decoder"
1272
1302
flv_encoder_select="h263_encoder"
1273
1303
fraps_decoder_select="huffman"
1277
1307
h263_vaapi_hwaccel_select="vaapi h263_decoder"
1278
1308
h263i_decoder_select="h263_decoder"
1279
1309
h263p_encoder_select="h263_encoder"
1280
h264_decoder_select="golomb h264dsp h264pred"
1310
h264_decoder_select="golomb h264chroma h264dsp h264pred"
1281
1311
h264_dxva2_hwaccel_deps="dxva2api_h"
1282
1312
h264_dxva2_hwaccel_select="dxva2 h264_decoder"
1283
h264_vaapi_hwaccel_select="vaapi"
1313
h264_vaapi_hwaccel_select="vaapi h264_decoder"
1314
h264_vda_hwaccel_select="vda h264_decoder"
1284
1315
h264_vdpau_decoder_select="vdpau h264_decoder"
1285
1316
imc_decoder_select="fft mdct sinewin"
1286
1317
jpegls_decoder_select="golomb"
1290
1321
mjpeg_encoder_select="aandct"
1291
1322
mlp_decoder_select="mlp_parser"
1292
1323
mp1_decoder_select="mpegaudiodsp"
1324
mp1float_decoder_select="mpegaudiodsp"
1293
1325
mp2_decoder_select="mpegaudiodsp"
1326
mp2float_decoder_select="mpegaudiodsp"
1327
mp3_decoder_select="mpegaudiodsp"
1294
1328
mp3adu_decoder_select="mpegaudiodsp"
1295
mp3_decoder_select="mpegaudiodsp"
1296
mp3on4_decoder_select="mpegaudiodsp"
1297
mp1float_decoder_select="mpegaudiodsp"
1298
mp2float_decoder_select="mpegaudiodsp"
1299
1329
mp3adufloat_decoder_select="mpegaudiodsp"
1300
1330
mp3float_decoder_select="mpegaudiodsp"
1331
mp3on4_decoder_select="mpegaudiodsp"
1301
1332
mp3on4float_decoder_select="mpegaudiodsp"
1302
mpeg1video_encoder_select="aandct"
1303
mpeg2video_encoder_select="aandct"
1304
mpeg4_decoder_select="h263_decoder mpeg4video_parser"
1305
mpeg4_encoder_select="h263_encoder"
1333
mpc7_decoder_select="mpegaudiodsp"
1334
mpc8_decoder_select="mpegaudiodsp"
1306
1335
mpeg_vdpau_decoder_select="vdpau mpegvideo_decoder"
1336
mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
1337
mpeg_xvmc_decoder_select="mpegvideo_decoder"
1307
1338
mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder"
1339
mpeg1video_encoder_select="aandct"
1308
1340
mpeg2_dxva2_hwaccel_deps="dxva2api_h"
1309
1341
mpeg2_dxva2_hwaccel_select="dxva2 mpeg2video_decoder"
1310
1342
mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder"
1343
mpeg2video_encoder_select="aandct"
1344
mpeg4_decoder_select="h263_decoder mpeg4video_parser"
1345
mpeg4_encoder_select="h263_encoder"
1311
1346
mpeg4_vaapi_hwaccel_select="vaapi mpeg4_decoder"
1312
1347
mpeg4_vdpau_decoder_select="vdpau mpeg4_decoder"
1313
mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
1314
mpeg_xvmc_decoder_select="mpegvideo_decoder"
1315
1348
msmpeg4v1_decoder_select="h263_decoder"
1316
1349
msmpeg4v1_encoder_select="h263_encoder"
1317
1350
msmpeg4v2_decoder_select="h263_decoder"
1329
1362
rv10_encoder_select="h263_encoder"
1330
1363
rv20_decoder_select="h263_decoder"
1331
1364
rv20_encoder_select="h263_encoder"
1332
rv30_decoder_select="golomb h264pred"
1333
rv40_decoder_select="golomb h264pred"
1365
rv30_decoder_select="golomb h264chroma h264pred"
1366
rv40_decoder_select="golomb h264chroma h264pred"
1334
1367
shorten_decoder_select="golomb"
1335
1368
sipr_decoder_select="lsp"
1336
1369
snow_decoder_select="dwt"
1337
1370
snow_encoder_select="aandct dwt"
1338
1371
svq1_encoder_select="aandct"
1339
svq3_decoder_select="golomb h264dsp h264pred"
1372
svq3_decoder_select="golomb h264chroma h264dsp h264pred"
1340
1373
svq3_decoder_suggest="zlib"
1341
1374
theora_decoder_select="vp3_decoder"
1342
1375
tiff_decoder_suggest="zlib"
1344
1377
truehd_decoder_select="mlp_decoder"
1345
1378
tscc_decoder_select="zlib"
1346
1379
twinvq_decoder_select="mdct lsp sinewin"
1347
vc1_decoder_select="h263_decoder"
1380
vc1_decoder_select="h263_decoder h264chroma"
1348
1381
vc1_dxva2_hwaccel_deps="dxva2api_h DXVA_PictureParameters_wDecodedPictureIndex"
1349
1382
vc1_dxva2_hwaccel_select="dxva2 vc1_decoder"
1350
1383
vc1_vaapi_hwaccel_select="vaapi vc1_decoder"
1351
1384
vc1_vdpau_decoder_select="vdpau vc1_decoder"
1385
vc1image_decoder_select="vc1_decoder"
1352
1386
vorbis_decoder_select="mdct"
1353
1387
vorbis_encoder_select="mdct"
1354
1388
vp6_decoder_select="huffman"
1369
1403
wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel"
1370
1404
wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel"
1371
1405
wmv3_vdpau_decoder_select="vc1_vdpau_decoder"
1406
wmv3image_decoder_select="wmv3_decoder"
1372
1407
zlib_decoder_select="zlib"
1373
1408
zlib_encoder_select="zlib"
1374
1409
zmbv_decoder_select="zlib"
1375
1410
zmbv_encoder_select="zlib"
1377
1412
vaapi_deps="va_va_h"
1413
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
1378
1414
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
1381
h264_parser_select="golomb h264dsp h264pred"
1417
h264_parser_select="golomb h264chroma h264dsp h264pred"
1383
1419
# external libraries
1384
1420
libdirac_decoder_deps="libdirac !libschroedinger"
1396
1432
libschroedinger_decoder_deps="libschroedinger"
1397
1433
libschroedinger_encoder_deps="libschroedinger"
1398
1434
libspeex_decoder_deps="libspeex"
1435
libspeex_encoder_deps="libspeex"
1399
1436
libtheora_encoder_deps="libtheora"
1400
1437
libvo_aacenc_encoder_deps="libvo_aacenc"
1401
1438
libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
1444
1481
dv1394_indev_deps="dv1394 dv_demuxer"
1445
1482
fbdev_indev_deps="linux_fb_h"
1446
1483
jack_indev_deps="jack_jack_h"
1484
libcdio_indev_deps="libcdio"
1447
1485
libdc1394_indev_deps="libdc1394"
1448
1486
oss_indev_deps_any="soundcard_h sys_soundcard_h"
1449
1487
oss_outdev_deps_any="soundcard_h sys_soundcard_h"
1488
pulse_indev_deps="libpulse"
1450
1489
sndio_indev_deps="sndio_h"
1451
1490
sndio_outdev_deps="sndio_h"
1452
1491
v4l_indev_deps="linux_videodev_h"
1460
1499
gopher_protocol_deps="network"
1500
httpproxy_protocol_deps="network"
1501
httpproxy_protocol_select="tcp_protocol"
1461
1502
http_protocol_deps="network"
1462
1503
http_protocol_select="tcp_protocol"
1504
https_protocol_select="tls_protocol"
1463
1505
mmsh_protocol_select="http_protocol"
1464
1506
mmst_protocol_deps="network"
1465
1507
rtmp_protocol_select="tcp_protocol"
1466
1508
rtp_protocol_select="udp_protocol"
1467
1509
tcp_protocol_deps="network"
1510
tls_protocol_deps_any="openssl gnutls"
1511
tls_protocol_select="tcp_protocol"
1468
1512
udp_protocol_deps="network"
1471
1515
blackframe_filter_deps="gpl"
1516
boxblur_filter_deps="gpl"
1472
1517
cropdetect_filter_deps="gpl"
1518
delogo_filter_deps="gpl"
1473
1519
drawtext_filter_deps="libfreetype"
1474
1520
frei0r_filter_deps="frei0r dlopen strtok_r"
1475
1521
frei0r_src_filter_deps="frei0r dlopen strtok_r"
1484
1530
postproc_deps="gpl"
1533
avconv_deps="avcodec avformat swscale"
1534
avplay_deps="avcodec avformat swscale sdl"
1535
avplay_select="rdft"
1536
avprobe_deps="avcodec avformat"
1537
avserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
1538
avserver_extralibs='$ldl'
1487
1539
ffmpeg_deps="avcodec avformat swscale"
1488
ffmpeg_select="buffer_filter"
1489
ffplay_deps="avcodec avformat swscale sdl"
1490
ffplay_select="rdft"
1491
ffprobe_deps="avcodec avformat"
1492
ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
1493
ffserver_extralibs='$ldl'
1495
1541
doc_deps="texi2html"
1513
eval ${1}_be_test_deps="bigendian"
1514
eval ${1}_le_test_deps="!bigendian"
1517
1558
mxf_d10_test_deps="avfilter"
1518
1559
seek_lavf_mxf_d10_test_deps="mxf_d10_test"
1520
1561
test_deps _encoder _decoder \
1523
1563
adpcm_ima_wav \
1542
1583
mjpeg="jpg mjpeg ljpeg" \
1544
1585
mpeg1video="mpeg mpeg1b" \
1545
mpeg2video="mpeg2 mpeg2thread" \
1546
mpeg4="mpeg4 mpeg4adv mpeg4nr mpeg4thread error rc" \
1586
mpeg2video="mpeg2 mpeg2_422 mpeg2_idct_int mpeg2_ilace mpeg2_ivlc_qprd" \
1587
mpeg2video="mpeg2thread mpeg2thread_ilace" \
1588
mpeg4="mpeg4 mpeg4_adap mpeg4_qpel mpeg4_qprd mpeg4adv mpeg4nr" \
1589
mpeg4="mpeg4thread error rc" \
1547
1590
msmpeg4v3=msmpeg4 \
1593
1636
ac3_fixed_test_deps="ac3_fixed_encoder ac3_decoder rm_muxer rm_demuxer"
1594
1637
mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
1596
set_ne_test_deps pixdesc
1597
set_ne_test_deps pixfmts_copy
1598
set_ne_test_deps pixfmts_crop
1599
set_ne_test_deps pixfmts_hflip
1600
set_ne_test_deps pixfmts_null
1601
set_ne_test_deps pixfmts_pad
1602
set_ne_test_deps pixfmts_scale
1603
set_ne_test_deps pixfmts_vflip
1605
1639
# default parameters
1607
1641
logfile="config.log"
1609
1643
# installation paths
1610
1644
prefix_default="/usr/local"
1611
1645
bindir_default='${prefix}/bin'
1612
datadir_default='${prefix}/share/ffmpeg'
1646
datadir_default='${prefix}/share/avconv'
1613
1647
incdir_default='${prefix}/include'
1614
1648
libdir_default='${prefix}/lib'
1615
1649
mandir_default='${prefix}/share/man'
1673
1705
SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
1674
1706
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
1675
1707
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
1708
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
1709
SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
1679
1714
host_cflags='-D_ISOC99_SOURCE -O3 -g'
1689
1724
# find source path
1690
1725
if test -f configure; then
1691
source_path="$(pwd)"
1692
disable source_path_used
1694
1728
source_path=$(cd $(dirname "$0"); pwd)
1695
enable source_path_used
1696
1729
echo "$source_path" | grep -q '[[:blank:]]' &&
1697
1730
die "Out of tree builds are impossible with whitespace in source path."
1698
1731
test -e "$source_path/config.h" &&
1735
1782
LAVFI_TESTS=$(find_tests lavfi)
1736
1783
SEEK_TESTS=$(find_tests seek seek_)
1785
ALL_TESTS="$ACODEC_TESTS $VCODEC_TESTS $LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS"
1738
1787
pcm_test_deps=$(map 'echo ${v%_*}_decoder $v' $(filter pcm_* $ENCODER_LIST))
1740
1789
for n in $COMPONENT_LIST; do
2028
2077
cc_ident=$($cc -V 2>&1 | head -n1 | cut -d' ' -f 2-)
2029
2078
DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
2030
2079
DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
2031
2081
speed_cflags='-O5'
2032
2082
size_cflags='-O5 -xspace'
2033
2083
filter_cflags=suncc_flags
2271
2321
cortex-a*) subarch=armv7a ;;
2272
2322
cortex-r*) subarch=armv7r ;;
2273
cortex-m*) subarch=armv7m ;;
2323
cortex-m*) enable thumb; subarch=armv7m ;;
2274
2324
arm11*) subarch=armv6 ;;
2275
2325
arm[79]*e*|arm9[24]6*|arm96*|arm102[26]) subarch=armv5te ;;
2276
2326
armv4*|arm7*|arm9[24]*) subarch=armv4 ;;
2371
2421
SHFLAGS='-shared -Wl,-h,$$(@F)'
2372
2422
enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
2373
2423
network_extralibs="-lsocket -lnsl"
2374
2424
add_cppflags -D__EXTENSIONS__
2425
# When using suncc to build, the Solaris linker will mark
2426
# an executable with each instruction set encountered by
2427
# the Solaris assembler. As our libraries contain their own
2428
# guards for processor-specific code, instead suppress
2429
# generation of the HWCAPS ELF section on Solaris x86 only.
2430
enabled_all suncc x86 && echo "hwcap_1 = OVERRIDE;" > mapfile && add_ldflags -Wl,-M,mapfile
2375
2431
nm_opts='-P -g'
2412
2468
SLIBSUF=".dylib"
2413
2469
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
2414
2470
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
2415
FFSERVERLDFLAGS=-Wl,-bind_at_load
2471
AVSERVERLDFLAGS=-Wl,-bind_at_load
2416
2472
objformat="macho"
2417
2473
enabled x86_64 && objformat="macho64"
2418
2474
enabled_any pic shared ||
2437
2493
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
2438
2494
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
2439
SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
2440
SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
2441
install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"; \
2442
install -d "$(LIBDIR)"; \
2443
install -m 644 $(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) "$(LIBDIR)/lib$(SLIBNAME:$(SLIBSUF)=.dll.a)"'
2444
SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"'
2495
SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
2496
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
2498
SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
2499
SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
2445
2500
SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
2446
2501
objformat="win32"
2447
2502
dlltool="${cross_prefix}dlltool"
2499
2554
emxexp -o $(OBJS) >> $(SUBDIR)$(NAME).def'
2500
2555
SLIB_EXTRA_CMD='emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(NAME).def; \
2501
2556
emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;'
2502
SLIB_INSTALL_EXTRA_CMD='install -m 644 $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"'
2503
SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
2557
SLIB_INSTALL_EXTRA_LIB='$(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib'
2504
2558
enable dos_paths
2518
2572
enable dos_paths
2519
add_cflags --include=$sysinclude/gcce/gcce.h
2573
add_cflags --include=$sysinclude/gcce/gcce.h -fvisibility=default
2574
add_cppflags -D__GCCE__ -D__SYMBIAN32__ -DSYMBIAN_OE_POSIX_SIGNALS
2575
add_ldflags -Wl,--target1-abs,--no-undefined \
2576
-Wl,-Ttext,0x80000,-Tdata,0x1000000 -shared \
2577
-Wl,--entry=_E32Startup -Wl,-u,_E32Startup
2578
add_extralibs -l:eexe.lib -l:usrt2_2.lib -l:dfpaeabi.dso \
2579
-l:drtaeabi.dso -l:scppnwdl.dso -lsupc++ -lgcc \
2580
-l:libc.dso -l:libm.dso -l:euser.dso -l:libcrt0.lib
2545
disabled static && LIBNAME=""
2547
2606
die_license_disabled() {
2548
2607
enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; }
2610
die_license_disabled gpl libcdio
2551
2611
die_license_disabled gpl libx264
2552
2612
die_license_disabled gpl libxavs
2553
2613
die_license_disabled gpl libxvid
2554
2614
die_license_disabled gpl x11grab
2556
2616
die_license_disabled nonfree libfaac
2617
die_license_disabled nonfree openssl
2558
2619
die_license_disabled version3 libopencore_amrnb
2559
2620
die_license_disabled version3 libopencore_amrwb
2625
2686
warn "Compiler does not indicate floating-point ABI, guessing $fpabi."
2628
# We have to check if pld is a nop and disable it.
2629
check_asm pld '"pld [r0]"'
2631
2689
enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"'
2632
2690
enabled armv6 && check_asm armv6 '"sadd16 r0, r0, r0"'
2633
2691
enabled armv6t2 && check_asm armv6t2 '"movt r0, #0"'
2636
2694
enabled neon && check_asm neon '"vadd.i16 q0, q0, q0"'
2637
2695
enabled vfpv3 && check_asm vfpv3 '"vmov.f32 s0, #1.0"'
2697
check_asm asm_mod_y '"vmul.i32 d0, d0, %y0" :: "x"(0)'
2639
2699
enabled_all armv6t2 shared !pic && enable_pic
2641
2701
elif enabled mips; then
2704
2764
# check whether xmm clobbers are supported
2705
2765
check_asm xmm_clobbers '"":::"%xmm0"'
2707
# check whether more than 10 operands are supported
2708
check_cc <<EOF && enable ten_operands
2713
:"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
2719
2767
# check whether binutils is new enough to compile SSSE3/MMX2
2720
2768
enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
2721
2769
enabled mmx2 && check_asm mmx2 '"pmaxub %mm0, %mm1"'
2723
check_asm bswap '"bswap %%eax" ::: "%eax"'
2725
2771
if ! disabled_any asm mmx yasm; then
2726
2772
if check_cmd $yasmexe --version; then
2727
2773
enabled x86_64 && yasm_extra="-m amd64"
2810
2856
check_func ${malloc_prefix}posix_memalign && enable posix_memalign
2811
2857
check_func setrlimit
2812
2858
check_func strerror_r
2813
2860
check_func strtok_r
2861
check_func sched_getaffinity
2814
2864
check_func_headers io.h setmode
2815
2865
check_func_headers lzo/lzo1x.h lzo1x_999_compress
2816
2866
check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
2867
check_func_headers windows.h GetProcessAffinityMask
2817
2868
check_func_headers windows.h GetProcessTimes
2818
2869
check_func_headers windows.h MapViewOfFile
2819
2870
check_func_headers windows.h VirtualAlloc
2834
2886
disabled zlib || check_lib zlib.h zlibVersion -lz || disable zlib
2835
2887
disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
2889
if ! disabled w32threads && ! enabled pthreads; then
2890
check_func _beginthreadex && enable w32threads
2837
2893
# check for some common methods of building with pthread support
2838
2894
# do this before the optional library checks as some of them require pthreads
2839
2895
if ! disabled pthreads && ! enabled w32threads; then
2880
2936
# these are off by default, so fail if requested and not available
2881
2937
enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
2882
2938
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
2939
enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
2883
2940
enabled libdirac && require_pkg_config dirac \
2884
2941
"libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h" \
2885
2942
"dirac_decoder_init dirac_encoder_init"
2892
2949
enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
2893
2950
enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader
2894
2951
enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg
2952
enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new
2895
2953
enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
2896
2954
enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
2897
2955
enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex
2905
2963
enabled libvpx_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_enc_init_ver -lvpx ||
2906
2964
die "ERROR: libvpx encoder version must be >=0.9.1"; } }
2907
2965
enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 &&
2908
{ check_cpp_condition x264.h "X264_BUILD >= 115" ||
2909
die "ERROR: libx264 version must be >= 0.115."; }
2966
{ check_cpp_condition x264.h "X264_BUILD >= 118" ||
2967
die "ERROR: libx264 version must be >= 0.118."; }
2910
2968
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
2911
2969
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
2912
2970
enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
2971
enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
2972
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
2973
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
2974
die "ERROR: openssl not found"; }
2914
2976
# libdc1394 check
2915
2977
if enabled libdc1394; then
2931
2993
check_header linux/fb.h
2932
2994
check_header linux/videodev.h
2933
2995
check_header linux/videodev2.h
2996
check_struct linux/videodev2.h "struct v4l2_frmivalenum" discrete
2934
2998
check_header sys/videoio.h
2936
3000
check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extralibs"
2965
3032
check_func XShmCreateImage -lX11 -lXext &&
2966
3033
check_func XFixesGetCursorImage -lX11 -lXext -lXfixes
3035
# check for VDA header
3036
if ! disabled vda && check_header VideoDecodeAcceleration/VDADecoder.h; then
3037
enable vda && add_extralibs -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore
2968
3040
if ! disabled vdpau && enabled vdpau_vdpau_h; then
2969
3041
check_cpp_condition \
2970
3042
vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" ||
2979
3051
check_cflags -Wall
2980
3052
check_cflags -Wno-parentheses
2981
3053
check_cflags -Wno-switch
3054
check_cflags -Wno-format-zero-length
2982
3055
check_cflags -Wdisabled-optimization
2983
3056
check_cflags -Wpointer-arith
2984
3057
check_cflags -Wredundant-decls
2988
3061
check_cflags -Wtype-limits
2989
3062
check_cflags -Wundef
2990
3063
check_cflags -Wmissing-prototypes
3064
check_cflags -Wstrict-prototypes
2991
3065
enabled extra_warnings && check_cflags -Winline
2993
3067
# add some linker flags
2994
3068
check_ldflags -Wl,--warn-common
2995
check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil
3069
check_ldflags -Wl,-rpath-link=libpostproc:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil
2996
3070
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
2998
3072
echo "X{};" > $TMPV
3052
3128
check_cflags -fno-tree-vectorize
3053
3129
check_cflags -Werror=implicit-function-declaration
3054
3130
check_cflags -Werror=missing-prototypes
3131
check_cflags -Werror=declaration-after-statement
3055
3132
elif enabled llvm_gcc; then
3056
3133
check_cflags -mllvm -stack-alignment=16
3057
3134
elif enabled clang; then
3123
3186
echo "CMOV is fast ${fast_cmov-no}"
3124
3187
echo "EBX available ${ebx_available-no}"
3125
3188
echo "EBP available ${ebp_available-no}"
3126
echo "10 operands supported ${ten_operands-no}"
3128
3190
if enabled arm; then
3129
3191
echo "ARMv5TE enabled ${armv5te-no}"
3153
3215
echo "new filter support ${avfilter-no}"
3154
3216
echo "network support ${network-no}"
3155
3217
echo "threading support ${thread_type-no}"
3218
echo "safe bitstream reader ${safe_bitstream_reader-no}"
3156
3219
echo "SDL support ${sdl-no}"
3157
3220
echo "Sun medialib support ${mlib-no}"
3221
echo "libdxva2 enabled ${dxva2-no}"
3222
echo "libva enabled ${vaapi-no}"
3223
echo "libvdpau enabled ${vdpau-no}"
3158
3224
echo "AVISynth enabled ${avisynth-no}"
3159
3225
echo "frei0r enabled ${frei0r-no}"
3226
echo "gnutls enabled ${gnutls-no}"
3227
echo "libcdio support ${libcdio-no}"
3160
3228
echo "libdc1394 support ${libdc1394-no}"
3161
3229
echo "libdirac enabled ${libdirac-no}"
3162
3230
echo "libfaac enabled ${libfaac-no}"
3167
3235
echo "libopencore-amrwb support ${libopencore_amrwb-no}"
3168
3236
echo "libopencv support ${libopencv-no}"
3169
3237
echo "libopenjpeg enabled ${libopenjpeg-no}"
3238
echo "libpulse enabled ${libpulse-no}"
3170
3239
echo "librtmp enabled ${librtmp-no}"
3171
3240
echo "libschroedinger enabled ${libschroedinger-no}"
3172
3241
echo "libspeex enabled ${libspeex-no}"
3173
3242
echo "libtheora enabled ${libtheora-no}"
3174
echo "libva enabled ${vaapi-no}"
3175
3243
echo "libvo-aacenc support ${libvo_aacenc-no}"
3176
3244
echo "libvo-amrwbenc support ${libvo_amrwbenc-no}"
3177
3245
echo "libvorbis enabled ${libvorbis-no}"
3179
3247
echo "libx264 enabled ${libx264-no}"
3180
3248
echo "libxavs enabled ${libxavs-no}"
3181
3249
echo "libxvid enabled ${libxvid-no}"
3250
echo "openssl enabled ${openssl-no}"
3182
3251
echo "zlib enabled ${zlib-no}"
3183
3252
echo "bzlib enabled ${bzlib-no}"
3206
3275
echo "Creating config.mak and config.h..."
3208
# build tree in object directory if source path is different from current one
3209
if enabled source_path_used; then
3234
libavcodec/${arch}/Makefile
3235
libavdevice/Makefile
3236
libavfilter/Makefile
3237
libavfilter/${arch}/Makefile
3238
libavformat/Makefile
3240
libpostproc/Makefile
3243
map 'mkdir -p $v' $DIRS;
3244
map 'test -f "$source_path/$v" && $ln_s "$source_path/$v" $v' $FILES
3277
test -e Makefile || $ln_s "$source_path/Makefile" .
3247
3279
config_files="$TMPH config.mak"
3249
3281
cat > config.mak <<EOF
3250
3282
# Automatically generated by configure - do not modify!
3251
ifndef LIBAV_CONFIG_MAK
3253
3283
LIBAV_CONFIGURATION=$LIBAV_CONFIGURATION
3255
3285
LIBDIR=\$(DESTDIR)$libdir
3312
3342
SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}
3313
3343
SLIB_CREATE_DEF_CMD=${SLIB_CREATE_DEF_CMD}
3314
3344
SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}
3315
SLIB_INSTALL_EXTRA_CMD=${SLIB_INSTALL_EXTRA_CMD}
3316
SLIB_UNINSTALL_EXTRA_CMD=${SLIB_UNINSTALL_EXTRA_CMD}
3345
SLIB_INSTALL_NAME=${SLIB_INSTALL_NAME}
3346
SLIB_INSTALL_LINKS=${SLIB_INSTALL_LINKS}
3347
SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB}
3348
SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
3317
3349
SAMPLES:=${samples:-\$(FATE_SAMPLES)}
3327
3359
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
3330
get_version LIBSWSCALE libswscale/swscale.h
3331
get_version LIBPOSTPROC libpostproc/postprocess.h
3332
3362
get_version LIBAVCODEC libavcodec/version.h
3333
3363
get_version LIBAVDEVICE libavdevice/avdevice.h
3364
get_version LIBAVFILTER libavfilter/avfilter.h
3334
3365
get_version LIBAVFORMAT libavformat/version.h
3335
3366
get_version LIBAVUTIL libavutil/avutil.h
3336
get_version LIBAVFILTER libavfilter/avfilter.h
3367
get_version LIBPOSTPROC libpostproc/postprocess.h
3368
get_version LIBSWSCALE libswscale/swscale.h
3338
3370
cat > $TMPH <<EOF
3339
3371
/* Automatically generated by configure - do not modify! */
3341
3373
#define LIBAV_CONFIG_H
3342
3374
#define LIBAV_CONFIGURATION "$(c_escape $LIBAV_CONFIGURATION)"
3343
3375
#define LIBAV_LICENSE "$(c_escape $license)"
3344
#define FFMPEG_DATADIR "$(eval c_escape $datadir)"
3376
#define AVCONV_DATADIR "$(eval c_escape $datadir)"
3345
3377
#define CC_TYPE "$cc_type"
3346
3378
#define CC_VERSION $cc_version
3347
3379
#define restrict $_restrict
3461
3483
pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
3462
3484
pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
3463
3485
pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs"
3464
pkgconfig_generate libpostproc "Libav post processing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
3486
pkgconfig_generate libpostproc "Libav postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
3465
3487
pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"