When trying to build ohcount on OS X, I get:
computer-van-reinier-lamers:~/Source/ohcount reinier$ rake
(in /Users/reinier/Source/ohcount)
/Users/reinier/Source/ohcount/test/unit/*_test.rb
/usr/local/bin/ruby extconf.rb
checking for pcre_compile() in -lpcre... no
BUILD_TYPE: RELEASE
creating Makefile
make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I. -fno-common -g -O2 -fno-common -pipe -fno-common -g -O2 -Wall -DNDEBUG
-arch i386 -c common.c
In file included from common.c:1:
common.h:32:18: error: pcre.h: No such file or directory
In file included from common.h:35, from common.c:1: compiled_state.h:13: error: parse error before 'pcre' compiled_state.h:13: warning: no semicolon at end of struct or union compiledstate.h:14: warning: type defaults to 'int' in declaration of 'pcreextra' compiled_state.h:14: warning: data definition has no type or storage class compiled_state.h:16: error: parse error before '}' token compiled_state.h:16: warning: type defaults to 'int' in declaration of 'CompiledState' compiled_state.h:16: warning: data definition has no type or storage class compiled_state.h:19: error: parse error before '*' token compiled_state.h:20: error: parse error before '*' token In file included from common.h:36, from common.c:1: polyglot.h:14: error: parse error before 'CompiledState' polyglot.h:14: warning: no semicolon at end of struct or union polyglot.h:16: error: parse error before '}' token polyglot.h:16: warning: type defaults to 'int' in declaration of 'Polyglot' polyglot.h:16: warning: data definition has no type or storage class polyglot.h:18: error: parse error before '*' token polyglot.h:19: error: parse error before '*' token In file included from common.h:37, from common.c:1: polyglots.h:12: error: parse error before '*' token polyglots.h:12: warning: type defaults to 'int' in declaration of 'POLYGLOTS' polyglots.h:12: warning: data definition has no type or storage class In file included from common.h:39, from common.c:1: parser.h:32: error: parse error before 'Polyglot' common.c: In function 'die': common.c:5: warning: implicit declaration of function 'exit' common.c:5: warning: incompatible implicit declaration of built-in function 'exit' make: * [common.o] Error 1 rake aborted! Command failed with status (2): [make...] /Users/reinier/Source/ohcount/rakefile:64
I have installed PCRE via fink but gcc is not looking at the PCRE headers during the build. Manually fixing the Makefile in ext/ can get me beyond this error, but then gives me a dynamic linker error. Is there a nice way to build ohcount on OS X?