This applies to net-snmp-5.4.3 as well. Error message : checking for Perl cc... configure: error: Could not determine the compiler that was used to build /usr/bin/perl. Either set the environment variable PERLPROG to a different perl binary or use --without-perl-modules to build without Perl. The problems comes from the fact that perl -V:cc returns this : cc='hppa2.0-unknown-linux-gnu-gcc'; The regex doesn't match the . in hppa2.0. The attached patch solves the issue.
Created attachment 240575 [details, diff] Build fix
Fixed without a revision bump in 5.4.2.1-r4.