Use CC, CPPFLAGS, and LDFLAGS specified by MacPorts.
--- Makefile.in.orig	2005-06-17 08:34:14.000000000 -0500
+++ Makefile.in	2024-10-02 00:57:43.000000000 -0500
@@ -13,14 +13,18 @@
 
 OBJS=$(SRCS:.c=.o)
 
+CC=@CC@
 CFLAGS=-Wall -pedantic @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)\" @EXTRADEFS@ @CFLAGS@
+CPPFLAGS=@CPPFLAGS@
+LDFLAGS=@LDFLAGS@
+LIBS=@LIBS@
 
 .PHONY: all clean distclean install doc uninstall changelog
 
 all: nbsmtp
 
 nbsmtp: $(OBJS)
-	$(CC) -o nbsmtp $(OBJS) @LIBS@
+	$(CC) -o nbsmtp $(OBJS) $(LDFLAGS) $(LIBS)
 
 clean:
 	$(RM) nbsmtp *.o core