wesnoth/scons/pkgconfig.py
2008-09-30 15:07:09 +01:00

15 lines
383 B
Python

# vi: syntax=python:et:ts=4
def CheckPKG(context, name):
env = context.env
context.Message( 'Checking for %s... ' % name )
try:
env.ParseConfig("pkg-config --libs --cflags $PKGCONFIG_FLAGS " + name)
context.Result("yes")
return True
except OSError:
context.Result("no")
return False
config_checks = { "CheckPKG" : CheckPKG }