I discovered these problems when I tried to build from a git clone
(which has no config.h in the source directory).
CC = @CC@
CFLAGS = @CFLAGS@
DEFS = @DEFS@
-INCLUDES = -I$(top_srcdir) @CPPFLAGS@
+# add include dir .. for config.h when building in different directory
+INCLUDES = -I$(top_srcdir) -I.. @CPPFLAGS@
CONFIGDEFS = -DNMHETCDIR='"$(etcdir)"' \
-DSENDMAILPATH='"$(sendmailpath)"' \
-DMAILSPOOL='"$(mailspool)"'
CC = @CC@
CFLAGS = @CFLAGS@
DEFS = @DEFS@
-# add include dir . for sigmsg.h when building in different directory
-INCLUDES = -I$(top_srcdir) -I. @CPPFLAGS@
+# add include dir . for sigmsg.h and .. for config.h when building
+# in different directory
+INCLUDES = -I$(top_srcdir) -I. -I.. @CPPFLAGS@
LEX = @LEX@
AWK = @AWK@
CC = @CC@
CFLAGS = @CFLAGS@
DEFS = @DEFS@
-INCLUDES = -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@
+# add include dir .. for config.h when building in different directory
+INCLUDES = -I$(srcdir) -I$(top_srcdir) -I.. @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@