environment: Read VALAC from the environment and use it if set
The valac binary was hard coded in meson. We now check if VALAC is
defined in the environment, and if it is, use its value as the vala
compiler, if not, we proceed with the hard coded binary name.
@@ -682,6 +682,9 @@ class Environment:
raise EnvironmentException('Unknown compiler "' + ' '.join(exelist) + '"')
def detect_vala_compiler(self):
+ if 'VALAC' in os.environ:
+ exelist = shlex.split(os.environ['VALAC'])
+ else:
exelist = ['valac']
try:
p, out = Popen_safe(exelist + ['--version'])[0:2]
