From 3b1f3dd57d8c10c1c29f67f0f745e3263d9d3daf Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 7 Jul 2020 14:07:37 +0200 Subject: Revised detection of menhirLib directory (#248) Use `ocamlfind query menhirLib` in preference to `menhir --suggest-menhirLib`. Fixes: #363 --- configure | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index b358f3cb..432bacff 100755 --- a/configure +++ b/configure @@ -582,8 +582,12 @@ case "$menhir_ver" in 20[0-9][0-9][0-9][0-9][0-9][0-9]) if test "$menhir_ver" -ge $MENHIR_REQUIRED; then echo "version $menhir_ver -- good!" - menhir_dir=$(menhir --suggest-menhirLib | tr -d '\r' | tr '\\' '/') - if test -z "$menhir_dir"; then + menhir_dir=$(ocamlfind query menhirLib 2>/dev/null \ + | tr -d '\r' | tr '\\' '/') || \ + menhir_dir=$(menhir --suggest-menhirLib \ + | tr -d '\r' | tr '\\' '/') || \ + menhir_dir="" + if test ! -d "$menhir_dir"; then echo "Error: cannot determine the location of the Menhir API library." echo "This can be due to an incorrect Menhir package." echo "Consider using the OPAM package for Menhir." -- cgit