scons: fix build failure with --config=force

This commit is contained in:
loonycyborg 2020-02-09 14:55:10 +03:00
parent 0a2719b7af
commit 9424069298

View file

@ -407,16 +407,18 @@ if env["prereqs"]:
have_X = conf.CheckLib('X11')
env["notifications"] = env["notifications"] and conf.CheckPKG("dbus-1")
if env["notifications"]:
client_env.Append(CPPDEFINES = ["HAVE_LIBDBUS"])
client_env['fribidi'] = client_env['fribidi'] and (conf.CheckPKG('fribidi >= 0.10.9') or Warning("Can't find FriBiDi, disabling FriBiDi support."))
if client_env['fribidi']:
client_env.Append(CPPDEFINES = ["HAVE_FRIBIDI"])
env["history"] = env["history"] and (conf.CheckLib("history") or Warning("Can't find GNU history, disabling history support."))
if env["history"]:
client_env.Append(CPPDEFINES = ["HAVE_HISTORY"])
client_env = conf.Finish()
# We set those outside of Configure() section because SCons doesn't merge CPPPATH var properly in conf.Finish()
if env["notifications"]:
client_env.Append(CPPDEFINES = ["HAVE_LIBDBUS"])
if client_env['fribidi']:
client_env.Append(CPPDEFINES = ["HAVE_FRIBIDI"])
if env["history"]:
client_env.Append(CPPDEFINES = ["HAVE_HISTORY"])
if env["forum_user_handler"]:
found_connector = False
@ -435,8 +437,6 @@ if env["prereqs"]:
Exit("Failed to find sql connector library but forum user handler support is requested.")
have_server_prereqs = False
client_env = conf.Finish()
test_env = client_env.Clone()
conf = test_env.Configure(**configure_args)