The path to libiconv is selected in config/cf/OpenBSD.cf reusing the same trick as FreeBSD does.
@@ -1072,6 +1072,7 @@ CXXDEPENDINCLUDE != CcCmd -v -x c++ /dev/null -fsyntax-only \
#define ArchitectureDefines -DOPENBSD_ARCHITECTURE
#define BuildLibPathVar LD_LIBRARY_PATH
+ICONVSYSLIB != if test -f /usr/local/include/iconv.h; then echo -liconv; else echo; fi
#ifndef KornShell
#define KornShell /usr/local/bin/ksh93