ld.so.conf (et. al.) only affects runtime linking, not compile time linking. Likewise the LD_LIBRARY_PATH environment variable only has any effect on runtime linking.
To the best of my knowledge, there exists no compile-time counterpart to ld.so.conf. However, there is an environment variable similar to LD_LIBRARY_PATH. It is LIBRARY_PATH. Anything set in this variable will be searched by gcc during the link stage. However, it would appear you still need to specify your CFLAGS, since you're asking it to include a non-standard path.
That should be helpful many times in my life... I have had trouble compiling a lot of programs, and whenever I search an error and OS combo, the response is always "add
this to ld.so.conf (or equivalent) and run ldconfig". Now I know why it NEVER worked for me on several different flavors. Thanks for the info.