I'm trying to install elinks with ECMAScript support on a Mac (El Capitan) via Homebrew.
To make sure everything would compile correctly, I first manually downloaded the package myself to ./configure
and then make
. It didn't recognize my SpiderMonkey install until I set the following environment variables:
export PKG_CONFIG=pkg-config
export PKG_CONFIG_PATH=/usr/local/Cellar/nspr/4.12/lib/pkgconfig:/usr/local/Cellar/spidermonkey/1.8.5_1/lib/pkgconfig
At this point, the manual configuration is going swimmingly. Relevantly,
checking pkg-config is at least version 0.9.0... yes
...
checking for SpiderMonkey (1.8.5 or later) in pkg-config mozjs185... yes
But then when I go to brew install --devel -v elinks
, I get the following output:
checking pkg-config is at least version 0.9.0... ./configure: line 4211: pkg-config: command not found
no
...
checking for SpiderMonkey (1.8.5 or later) in pkg-config mozjs185... no
What gives?
(I'm not sure this is relevant, but I did a little bit of tweaking in brew edit elinks
to get it to download the latest experimental build, 0.13 – 0.12pre6 is what's on tap. )
Homebrew is designed not to allow packages to find other software that wasn't specified as a dependency; you'll need to add these lines to the dependencies for it to work:
depends_on "pkg-config" => :build depends_on "spidermonkey"