| Index: build/config/linux/pkg-config.py
|
| diff --git a/build/config/linux/pkg-config.py b/build/config/linux/pkg-config.py
|
| index d63b2d65b91e9fe2c5641ea74c1eec11285a2456..675ce1ab7d5c4495f7ddfed34e55269c2aaeed83 100755
|
| --- a/build/config/linux/pkg-config.py
|
| +++ b/build/config/linux/pkg-config.py
|
| @@ -123,6 +123,7 @@ def main():
|
| parser.add_option('--atleast-version', action='store',
|
| dest='atleast_version', type='string')
|
| parser.add_option('--libdir', action='store_true', dest='libdir')
|
| + parser.add_option('--dridriverdir', action='store_true', dest='dridriverdir')
|
| (options, args) = parser.parse_args()
|
|
|
| # Make a list of regular expressions to strip out.
|
| @@ -162,6 +163,18 @@ def main():
|
| sys.stdout.write(libdir.strip())
|
| return 0
|
|
|
| + if options.dridriverdir:
|
| + cmd = [options.pkg_config, "--variable=dridriverdir"] + args
|
| + if options.debug:
|
| + sys.stderr.write('Running: %s\n' % cmd)
|
| + try:
|
| + dridriverdir = subprocess.check_output(cmd)
|
| + except:
|
| + print "Error from pkg-config."
|
| + return 1
|
| + sys.stdout.write(dridriverdir.strip())
|
| + return 0
|
| +
|
| cmd = [options.pkg_config, "--cflags", "--libs"] + args
|
| if options.debug:
|
| sys.stderr.write('Running: %s\n' % ' '.join(cmd))
|
|
|