From 1ed44f20f255f63b9e75e739a8bbe6911f4e1664 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Tue, 6 Apr 2021 12:21:38 +0200 Subject: m4: force path where to look for autoconf (#22765) Uses the M4 environment variable --- var/spack/repos/builtin/packages/m4/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/m4/package.py b/var/spack/repos/builtin/packages/m4/package.py index cc18685faf..49bf6ac203 100644 --- a/var/spack/repos/builtin/packages/m4/package.py +++ b/var/spack/repos/builtin/packages/m4/package.py @@ -48,6 +48,15 @@ class M4(AutotoolsPackage, GNUMirrorPackage): match = re.search(r'GNU M4\)?\s+(\S+)', output) return match.group(1) if match else None + def setup_dependent_build_environment(self, env, dependent_spec): + # Inform autom4te if it wasn't built correctly (some external + # installations such as homebrew). See + # https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/autom4te-Invocation.html + env.set('M4', self.prefix.bin.m4) + + def setup_run_environment(self, env): + env.set('M4', self.prefix.bin.m4) + def configure_args(self): spec = self.spec args = ['--enable-c++'] -- cgit v1.2.3-70-g09d2