Skip to content

Commit

Permalink
Fix regexp for detecting OCaml version
Browse files Browse the repository at this point in the history
The current regexp has 'false positives' when the OCaml compiler is
installed in a patch containing 'version '. Fix this by using a
more constrained regexp. The new regexp should capture both
'The OCaml compiler, version NNN' (current text)
and
'The Objective Caml compiler, version NNN' (previously used)

Fixes #96
  • Loading branch information
yakobowski committed Feb 26, 2020
1 parent 69fd491 commit b20963e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.in
Expand Up @@ -44,7 +44,7 @@ if test "$OCAMLC" = no ; then
fi

# we extract Ocaml version number and library path
OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version *\(.*\)$|\1|p' `
OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|The O.*, version *\(.*\)$|\1|p' `
echo "ocaml version is $OCAMLVERSION"

case $OCAMLVERSION in
Expand Down

0 comments on commit b20963e

Please sign in to comment.