From 6ccc8ad86462d803eb1a6382e855e08706fb251b Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Mon, 25 Mar 2019 16:20:20 +0000 Subject: [PATCH 1/2] Esy compatibility for libev detection --- src/unix/config/configure.ml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/unix/config/configure.ml b/src/unix/config/configure.ml index 9767229e4c..95cb5aaf64 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 | _ -> () From f574f2012c5d069b001bf2edf6c765a2db778ca8 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Wed, 27 Mar 2019 01:50:14 +0000 Subject: [PATCH 2/2] Fix unused variables --- src/unix/config/configure.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/config/configure.ml b/src/unix/config/configure.ml index 95cb5aaf64..ce35013eb1 100644 --- a/src/unix/config/configure.ml +++ b/src/unix/config/configure.ml @@ -52,7 +52,7 @@ let main () = use_libev := Some false | exception Not_found -> use_libev := Some false - | flags, libs -> () + | _flags, _libs -> () end | _ -> ()