#!/usr/bin/env python import os from helpers import parse_configfile from subprocess import check_call def main(): mydir = os.getcwd() extra_args = parse_configfile('common_options') extra_args += parse_configfile('libass_options') env = os.environ.copy() PKG_CONFIG_PATH = '%s/build_libs/lib/pkgconfig:%s' % ( mydir, env.get('PKG_CONFIG_PATH', '')) env['PKG_CONFIG_PATH'] = PKG_CONFIG_PATH # The --extra-cflags and --extra-ldflags parameters should not be # necessary to find the libraries, but they're there to ensure those # directories appear first in the search path in case there's another # version of the library installed on the system. os.chdir('libass') check_call(['./configure'] + extra_args, env=env) main()