[backends/c] More advanced Makefile detection

Makefiles are now also searched in subdirectories relative
to configure.ac, if no other Makefile has been found. It takes
into account the relative path to the source from the configure.ac
location. This allows proper makefile detection when using a separate
build directory.