- AC_CHECK_LIB([dl], [dlopen],, [AC_MSG_ERROR(cannot find libdl)])
+
+ case "${OS_DIR}" in
+ freebsd | netbsd )
+ dnl There is no libdl on FreeBSD, and NetBSD (see PR96).
+ ;;
+ *)
+ AC_CHECK_LIB([dl], [dlopen],, [AC_MSG_ERROR(cannot find libdl)])
+ ;;
+ esac
+