Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to build on OS X Lion (using their script in scripts/ and after numerous hurdles I'm stuck on this error:

./configure: line 16062: syntax error near unexpected token `OPENCV,'
./configure: line 16062: `PKG_CHECK_MODULES(OPENCV, opencv >= 1.0.0, HAVE_OPENCV=true, true)'
ERROR: Unable to configure frei0r

From what I already Googled this means that the PKG_CHECK_MODULES macro hasn't been defined, which probably means there's something wrong with my pkg-config, which I installed via Homebrew. Sounds like the pkg.m4 file isn't found.

When I brew install pkg-config I get the following warning:

Warning: m4 macros were installed to "share/aclocal".
Homebrew does not append "/usr/local/share/aclocal"
to "/usr/share/aclocal/dirlist". If an autoconf script you use
requires these m4 macros, you'll need to add this path manually.

Well I've appended that line to the dirlist file and it doesn't fix the problem above.

Can anyone suggest a way forward here?

I have briefly tried building my own pkg-config from source but (bizarrely) when I tried to ./configure I got the following error:

checking for pkg-config... no
./configure: line 13540: --exists: command not found
configure: error: pkg-config and glib-2.0 not found, please set GLIB_CFLAGS and GLIB_LIBS to the correct values

If building pkg-config needs pkg-config it seems like a weird catch 22 situation... I think this is probably an unnecessary sidetrack anyway.

share|improve this question
I'd still kind of like to be able to build this from source myself, but for anyone else who just wants to have a look at Shotcut there are binaries (not very visible to Google) here: – Anentropic Jun 10 '12 at 17:51
up vote 2 down vote accepted

It's a known bug in pkg-config 0.26, not so good solution is use 0.25:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .