I've been fixing up my packages' -config scripts by just doing:
-libdir=@libdir@
+libdir=`pkg-config --variable=libdir $PACKAGE`
which is simple enough and a maintainable hack, and not entirely
dreadful.
Still, I think this task is futile for many packages; httpd, mod_perl,
probably both {postgre,my}sql.
joe