Use the standard method to locate the config.h file.
Use the #include <config.h> style to find the config.h file, requires -I flags to be defined correctly, but supports out of tree builds without any slight of hand methods to locate the file. From the autoconf documentation:
With the appropriate ‘-I’ option, you can use ‘#include <config.h>’. Actually, it’s a good habit to use it, because in the rare case when the source directory contains another ‘config.h’, the build directory should be searched first.