Ok, it's not entirely broken, as it manages to find the right library, but still it gives wrong diagnostic: checking for iconv in /usr/local... yes checking for working iconv... no configure: WARNING: Sufficient support for iconv function was not found. Install libiconv from http://freshmeat.net/projects/libiconv/ for better charset compatibility! But in the config.mk we can see that -liconv is added, together with /usr/local/{include,lib}. So, here I aatach two patches that eliminate this wrong diagnostics as well as doing things in a bit cleaner way.
Created attachment 1856 [details] first part of the fix
Created attachment 1857 [details] second part of the fix
Taking this bug.
Fixed in r15568