aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure8
1 files changed, 6 insertions, 2 deletions
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."