From e8452de418b3ec7ac2864a5384d7e3fc4e0fb6b1 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Fri, 26 Mar 2021 14:32:09 +0000 Subject: [PATCH] extend/ENV/super: set M4 for libtool [g]libtoolize looks for m4 using the environment variable M4. When that isn't set, it looks for m4 in PATH. However, when libtool is a build dependency but m4 is not, m4 will not be found in PATH. Since it is currently not set in the environment by superenv, this causes some builds to fail. Closes https://github.com/Homebrew/homebrew-core/pull/73932. --- Library/Homebrew/extend/ENV/super.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index 3ac9ffeded..38bf75789f 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -74,6 +74,7 @@ module Superenv self["CMAKE_INCLUDE_PATH"] = determine_cmake_include_path self["CMAKE_LIBRARY_PATH"] = determine_cmake_library_path self["ACLOCAL_PATH"] = determine_aclocal_path + self["M4"] = "#{HOMEBREW_PREFIX}/opt/m4/bin/m4" if deps.any? { |d| d.name == "libtool" } self["HOMEBREW_ISYSTEM_PATHS"] = determine_isystem_paths self["HOMEBREW_INCLUDE_PATHS"] = determine_include_paths self["HOMEBREW_LIBRARY_PATHS"] = determine_library_paths