The source uses a mixture of "#ifdef HAVE_CONFIG_H" and "#if HAVE_CONFIG_H" checks. Judging from
DEFS=-DHAVE_CONFIG_H
in the configure I supposed it should be "#ifdef" in all cases. These incorrect checks cause build errors since it tries to include the config.h on a custom configuration, that don't provide one.
I can provide a patch, if necessary.
Fixed in: