Use the CFLAGS, CPPFLAGS, and LDFLAGS that were set at configure time.
--- configure.orig	2020-12-20 02:01:50.000000000 -0600
+++ configure	2020-12-20 05:47:07.000000000 -0600
@@ -216,7 +216,7 @@
 INCLUDEDIR=${INCLUDEDIR-/usr/include}
 
 rm -f conftest conftest.c
-compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
+compile="$CC $CFLAGS $CPPFLAGS $LDFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
 
 # Check for various header files.
 
@@ -1308,6 +1308,9 @@
 s,@EXEEXT@,$EXEEXT,
 s,@BUILD_CC@,$BUILD_CC,
 s,@INSTALL@,$INSTALL,
+s%@CFLAGS@%$CFLAGS%
+s%@CPPFLAGS@%$CPPFLAGS%
+s%@LDFLAGS@%$LDFLAGS%
 s,@DEFS@,$DEFS,
 s,@LIBS@,$LIBS,
 s,@LIBOBJS@,$LIBOBJS,
--- man2html/Makefile.in.orig	2020-12-20 05:58:53.000000000 -0600
+++ man2html/Makefile.in	2020-12-20 05:59:30.000000000 -0600
@@ -1,4 +1,7 @@
 CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
 CFLAGS += -Wall -Wstrict-prototypes -Wmissing-prototypes
 OBJECTS = man2html.o cgibase.o abbrev.o strdefs.o
 EXEEXT = @EXEEXT@
--- src/Makefile.in.orig	2010-12-31 14:28:46.000000000 -0600
+++ src/Makefile.in	2020-12-20 06:16:00.000000000 -0600
@@ -13,6 +13,9 @@
 
 CC = @CC@
 BUILD_CC = @BUILD_CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
 INSTALL = @INSTALL@
 EXEEXT = @EXEEXT@
 
@@ -23,7 +26,7 @@
 CWARNNP = -Wall
 
 .c.o:
-	$(CC) -c $(CWARN) $(CFLAGS) -I. $(DEFS) $<
+	$(CC) -c $(CWARN) $(CFLAGS) -I. $(CPPFLAGS) $(DEFS) $<
 
 # LDFLAGS = -g
 LDFLAGS ?= -s
@@ -48,7 +51,7 @@
 
 # glob.c does not have prototypes
 glob.o: glob.c ndir.h
-	$(CC) -c $(CWARNNP) $(CFLAGS) -I. $(DEFS) glob.c
+	$(CC) -c $(CWARNNP) $(CFLAGS) -I. $(CPPFLAGS) $(DEFS) glob.c
 
 man-config.o man-getopt.o man.o manpath.o to_cat.o: defs.h
 different.o man.o: different.h
