Update mplayer submodule
[mplayer-build.git] / script / mplayer-config
bloba2c43e3de3f6abff1d411e5b4ebe25a4b78be6a0
1 #!/usr/bin/env python
3 import os
4 from helpers import parse_configfile
5 from subprocess import check_call
7 def main():
8 mydir = os.getcwd()
9 extra_args = parse_configfile('common_options')
10 extra_args += parse_configfile('mplayer_options')
12 env = os.environ.copy()
13 PKG_CONFIG_PATH = '%s/build_libs/lib/pkgconfig:%s' % (
14 mydir, env.get('PKG_CONFIG_PATH', ''))
15 env['PKG_CONFIG_PATH'] = PKG_CONFIG_PATH
17 # The --extra-cflags and --extra-ldflags parameters should not be
18 # necessary to find the libraries, but they're there to ensure those
19 # directories appear first in the search path in case there's another
20 # version of the library installed on the system.
22 args = ['--extra-cflags=-I%s/build_libs/include' % mydir,
23 '--extra-ldflags=-L%s/build_libs/lib' % mydir]
25 os.chdir('mplayer')
26 check_call(['./configure'] + args + extra_args, env=env)
28 main()