bml links various programs against -ldl.
This causes problems on NetBSD, where the functions which are in libdl on Linux are already included in libc. No libdl exists.
On NetBSD, linking against libdl is thus contraproductive.
Suggested solution: add an autoconf test for the wanted symbols and search for them in libc and libdl; only link against libdl if they are there.