i'am not sure, what your question is. The zlib dependency is handled in naviserver/m4/zlib.m4 and checks for the include file and one of the needed functions.
The handling of zlib in freebsd seems to be a common problem [1]. I would expect one should be able to find an appropriate .m4 snippet and/or configure flags to check at thre right places.
I agree, I don't know what my question was either!
This appears to be a bit of readahead pre-query drivel posted by a tired mind in anticipation encountering a problem before a specific error condition exists.
Sorry for the noise and happy for any laugh that comes out of it.