pkg-config --libs gets you the linker flags, and pkg-config --cflags gets you the header include directories and any other flags it might need.