From 9bb747dda4d0038a7a96d626ffdc47608ca3924a Mon Sep 17 00:00:00 2001 From: Et7f3 Date: Fri, 5 Apr 2019 02:21:32 +0200 Subject: [PATCH] fix ocamllibdir/caml/mlvalues.h bug It seem that ocamlc -where print \r\n that does Cygwin fail. so we remove \r --- configure | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 62e7a9e..7de14a4 100755 --- a/configure +++ b/configure @@ -242,10 +242,11 @@ fi # directories if test "$ocamllibdir" = "auto"; then ocamllibdir=`ocamlc -where`; fi +# to avoir fail on Cygwin +ocamllibdir=${ocamllibdir//$'\r'/} -# fails on Cygwin: -# if test ! -f "$ocamllibdir/caml/mlvalues.h" -# then echo "cannot find OCaml libraries in $ocamllibdir"; exit 2; fi +if test ! -f "$ocamllibdir/caml/mlvalues.h" +then echo "cannot find OCaml libraries in $ocamllibdir"; exit 2; fi ccinc="-I$ocamllibdir $ccinc" checkinc "caml/mlvalues.h" if test $? -eq 0; then echo "cannot include caml/mlvalues.h"; exit 2; fi