[FreeBSD] error: idna.h not found which is part of GNU libidn

Error:

configure: error: idna.h not found which is part of GNU libidn.

Solution (as root):

export CPPFLAGS="-I /usr/local/include -L /usr/local/lib"

and run ./configure again.