I am having trouble installing a dependency for a program that itself depends on pcre.h. I have this installed to /opt/local/include, but the C compiler does not see it and
Use the pcre-config utility to get the right flags:
pcre-config
$ pcre-config --libs --cflags -L/opt/local/lib -lpcre -I/opt/local/include
If you're compiling via the command line,
$ gcc -Wall -g `pcre-config --libs --cflags` main.c