Added custom check for pango(not used for now).
This commit is contained in:
parent
a18fb6a73f
commit
c079143228
2 changed files with 24 additions and 2 deletions
|
@ -88,7 +88,7 @@ opts.AddOptions(
|
|||
# Setup
|
||||
#
|
||||
|
||||
sys.path.append("./scons")
|
||||
sys.path.insert(0, "./scons")
|
||||
env = Environment(tools=["tar", "gettext", "install"], options = opts, toolpath = ["scons"])
|
||||
|
||||
opts.Save('.scons-option-cache', env)
|
||||
|
@ -179,7 +179,7 @@ def Warning(message):
|
|||
return False
|
||||
|
||||
from metasconf import init_metasconf
|
||||
conf = Configure(env, custom_tests = init_metasconf(env, ["cplusplus", "python_devel", "sdl", "boost"]), config_h = "config.h")
|
||||
conf = Configure(env, custom_tests = init_metasconf(env, ["cplusplus", "python_devel", "sdl", "boost", "pango"]), config_h = "config.h")
|
||||
|
||||
if env["prereqs"]:
|
||||
if env["gettextdir"]:
|
||||
|
@ -191,6 +191,7 @@ if env["prereqs"]:
|
|||
conf.CheckCHeader("libintl.h", "<>") and \
|
||||
conf.CheckSDL(require_version = '1.2.7') or Die("Base prerequisites are not met.")
|
||||
|
||||
# conf.CheckPango("cairo") and \
|
||||
have_client_prereqs = \
|
||||
conf.CheckBoost("regex") and \
|
||||
conf.CheckSDL("SDL_ttf", require_version = "2.0.8") and \
|
||||
|
|
21
scons/pango.py
Normal file
21
scons/pango.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
# vi: syntax=python:et:ts=4
|
||||
import os
|
||||
from os.path import join
|
||||
|
||||
def CheckPango(context, backend):
|
||||
context.Message("Checking for Pango with " + backend + " backend... ")
|
||||
env = context.env
|
||||
gtkdir = os.environ.get("GTK_BASEPATH")
|
||||
if gtkdir:
|
||||
env.AppendENVPath("PATH", join(gtkdir, "bin"))
|
||||
env.AppendENVPath("PKG_CONFIG_PATH", join(gtkdir, "lib/pkgconfig"))
|
||||
result, output = context.TryAction("pkg-config --libs --cflags pango" + backend + " > $TARGET")
|
||||
if result:
|
||||
env.MergeFlags(output)
|
||||
context.Result("yes")
|
||||
return True
|
||||
else:
|
||||
context.Result("no")
|
||||
return False
|
||||
|
||||
config_checks = { "CheckPango" : CheckPango }
|
Loading…
Add table
Reference in a new issue