Update mplayer submodule
[mplayer-build.git] / script / ffmpeg-config
blobe0cadf34f6c73c1913d2b0dc6d86ce46c8ce855e
1 #!/usr/bin/env python
3 import os
4 from os import path
5 from helpers import parse_configfile
6 from subprocess import check_call
8 def main():
9 try:
10 os.mkdir('ffmpeg_build')
11 except:
12 pass
13 mydir = os.getcwd()
14 extra_args = parse_configfile('common_options')
15 extra_args += parse_configfile('ffmpeg_options')
17 args = ['--prefix=%s/build_libs' % mydir,
18 '--enable-gpl',
19 '--cpu=native',
20 '--disable-debug',
21 '--enable-pthreads',
22 '--disable-shared', '--enable-static',
23 '--enable-postproc',
24 '--disable-devices', '--disable-ffmpeg',
25 '--disable-ffplay', '--disable-ffserver',
26 '--disable-vaapi']
28 if os.path.exists('ffmpeg-mt-enabled'):
29 ffmpeg_dir = 'ffmpeg-mt'
30 else:
31 ffmpeg_dir = 'ffmpeg'
32 executable = path.join(mydir, ffmpeg_dir, 'configure')
34 os.chdir('ffmpeg_build')
35 check_call([executable] + args + extra_args)
37 main()