diff --git a/src/unix/config/configure.ml b/src/unix/config/configure.ml index 9767229e4c..ce35013eb1 100644 --- a/src/unix/config/configure.ml +++ b/src/unix/config/configure.ml @@ -45,7 +45,14 @@ let main () = match input_line ch with |"true" -> use_libev := Some true |_ -> use_libev := Some false - with _ -> use_libev := Some false + with _ -> + (* Esy users won't have opam installed in the esy sandbox. *) + match Sys.getenv "LIBEV_CFLAGS", Sys.getenv "LIBEV_LIBS" with + | "", "" -> + use_libev := Some false + | exception Not_found -> + use_libev := Some false + | _flags, _libs -> () end | _ -> ()