···11diff --git a/SConstruct b/SConstruct22-index b3d033dc90..04b8dcc832 10064422+index d138c7b250..c925bf908e 10064433--- a/SConstruct44+++ b/SConstruct55-@@ -62,10 +62,9 @@ elif platform_arg == "javascript":66- custom_tools = ["cc", "c++", "ar", "link", "textfile", "zip"]77-55+@@ -65,10 +65,10 @@ elif platform_arg == "javascript":66+ # want to have to pull in manually.77+ # Then we prepend PATH to make it take precedence, while preserving SCons' own entries.88 env_base = Environment(tools=custom_tools)99--if "TERM" in os.environ:99+-env_base.PrependENVPath("PATH", os.getenv("PATH"))1010+-env_base.PrependENVPath("PKG_CONFIG_PATH", os.getenv("PKG_CONFIG_PATH"))1111+-if "TERM" in os.environ: # Used for colored output.1012- env_base["ENV"]["TERM"] = os.environ["TERM"]1111--env_base.AppendENVPath("PATH", os.getenv("PATH"))1212--env_base.AppendENVPath("PKG_CONFIG_PATH", os.getenv("PKG_CONFIG_PATH"))1313+for k in ("TERM", "PATH", "PKG_CONFIG_PATH"):1414+ if (k in os.environ):1515+ env_base["ENV"][k] = os.environ[k]1616++1717+1618 env_base.disabled_modules = []1719 env_base.use_ptrcall = False1818- env_base.module_version_string = ""