diff --git a/SConstruct b/SConstruct index 0de1425dbe39..7c83a90c9348 100755 --- a/SConstruct +++ b/SConstruct @@ -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)