Thanks for the patch. I was hoping that we didn't need to worry about
older platforms needing -ldl. Oh well.
The patch causes 'configure' to search for dlopen even when there's no
crypto library. 'configure' could instead use AC_SEARCH_LIBS only if the
AC_LINK_IFELSE fails (or simply put AC_LINK_ELSE in an 'for LIB_DL in ""
-ldl' loop). But perhaps it's better to leave things be, in case we ever
need dlopen for something else.
Also, if I understand things correctly, with this patch it's
theoretically possible to pass -ldl to gcc even when 'sort' doesn't do
dynamic linking, and we could complicate configure.ac further to omit
-ldl in that case. But I doubt whether it's worth worrying about this.