mxcl/homebrew — Issue #10824: Not all versions of autoreconf respect `ACLOCAL_PATH` or `ACLOCAL_FLAGS`
Author: Sharpie
Created: 2012-03-09 21:35:18+00:00
State: open
Labels: autotools, bugs

In the past, it was a common practice to encode the path to non-standard aclocal directories, such as `#{HOMEBREW_PREFIX}/share/aclocal` or the aclocal directory of a keg-only formula by setting them as an explicit part of the `aclocal` call:

```ruby
ENV['ACLOCAL'] = "aclocal -I#{HOMEBREW_PREFIX}/share/aclocal #{gettext.share}/aclocal
```

However, these declarations were removed in commits like 56771ee0605a368e765187bdebaed45695ca3e91 and e8bb54b9cffe0c134c0fe894c065092d5a88a86c based on the assumption that we now add these directories to `ACLOCAL_PATH` so everything should be good.

However, it appears that older versions of `autoreconf`, from Xcode 4.2 and lower, do not respect either `ACLOCAL_PATH` or `ACLOCAL_FLAGS`, so explicitly setting `ACLOCAL` appears to be our only option.

We need to either:

- Re-introduce the calls to `ENV['ACLOCAL']`

- Bite the bullet and duplicate autotools for every Homebrew installation, not just Xcode 4.3 and above so that we can use `ACLOCAL_PATH` and stop abusing `ACLOCAL`.

- Find some other way around the problem.