Summary: public Infer depends on OCaml >= 4.02.3 now. Reviewed By: jberdine Differential Revision: D2865159 fb-gh-sync-id: 5ec45e5master
parent
099821f279
commit
07d71d2370
@ -0,0 +1,22 @@
|
|||||||
|
dnl Copyright (c) 2016 - present Facebook, Inc.
|
||||||
|
dnl All rights reserved.
|
||||||
|
dnl
|
||||||
|
dnl This source code is licensed under the BSD style license found in the
|
||||||
|
dnl LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
dnl of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
|
||||||
|
AC_DEFUN([AC_ASSERT_OCAML_MIN_VERSION],
|
||||||
|
[dnl
|
||||||
|
AC_REQUIRE([AC_PROG_OCAML])
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([if OCaml version is >= $1])
|
||||||
|
|
||||||
|
AC_COMPARE_VERSION_STRINGS([$1], [$OCAMLVERSION],
|
||||||
|
[AC_MSG_RESULT([yes])],
|
||||||
|
[AC_MSG_ERROR([m4_join([],[found version $OCAMLVERSION.
|
||||||
|
m4_newline([ Please upgrade to OCaml >= $1. If you are using opam, you can run])
|
||||||
|
m4_newline([dnl
|
||||||
|
opam switch $1
|
||||||
|
eval \$(opam config env)])
|
||||||
|
])])])
|
||||||
|
])
|
@ -0,0 +1,32 @@
|
|||||||
|
dnl Copyright (c) 2016 - present Facebook, Inc.
|
||||||
|
dnl All rights reserved.
|
||||||
|
dnl
|
||||||
|
dnl This source code is licensed under the BSD style license found in the
|
||||||
|
dnl LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
dnl of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
|
||||||
|
AC_DEFUN([AC_COMPARE_VERSION_STRINGS],
|
||||||
|
[dnl
|
||||||
|
unset major_req
|
||||||
|
unset minor_req
|
||||||
|
unset patch_req
|
||||||
|
unset major_inst
|
||||||
|
unset minor_inst
|
||||||
|
unset patch_inst
|
||||||
|
|
||||||
|
major_req=$(printf "$1" | cut -d . -f 1)
|
||||||
|
minor_req=$(printf "$1" | cut -d . -f 2)
|
||||||
|
patch_req=$(printf "$1" | cut -d . -f 3)
|
||||||
|
|
||||||
|
major_inst=$(printf "$2" | cut -d . -f 1)
|
||||||
|
minor_inst=$(printf "$2" | cut -d . -f 2)
|
||||||
|
# discard trailing characters after patch number, eg 1.2.3+4~5 -> 3
|
||||||
|
patch_inst=$(printf "$2" | cut -d . -f 3 | grep -o -e '^[[[:digit:]]]*')
|
||||||
|
AS_IF([test $major_inst -gt $major_req || \
|
||||||
|
(test $major_inst -eq $major_req && \
|
||||||
|
(test $minor_inst -gt $minor_req || \
|
||||||
|
(test $minor_inst -eq $minor_req && \
|
||||||
|
test $patch_inst -ge $patch_req)))],
|
||||||
|
$3,
|
||||||
|
$4)
|
||||||
|
])
|
Loading…
Reference in new issue