mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
build: Require OCaml >= 4.01.
RHEL 6, Debian <= 7 and Ubuntu < 14.04 are no longer supported (unless OCaml and other components are upgraded). See: https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html
This commit is contained in:
@@ -116,7 +116,7 @@ virt tools which are still written in Perl.
|
||||
|
||||
I<Required>. Part of Perl core.
|
||||
|
||||
=item OCaml E<ge> 3.11
|
||||
=item OCaml E<ge> 4.02
|
||||
|
||||
=item OCaml findlib
|
||||
|
||||
|
||||
@@ -38,15 +38,18 @@ AC_ARG_ENABLE([ocaml],
|
||||
[],
|
||||
[enable_ocaml=yes])
|
||||
|
||||
dnl OCaml >= 3.11 is required.
|
||||
AC_MSG_CHECKING([if OCaml version >= 3.11])
|
||||
dnl OCaml >= 4.01 is required.
|
||||
ocaml_ver_str=4.01
|
||||
ocaml_min_major=4
|
||||
ocaml_min_minor=1
|
||||
AC_MSG_CHECKING([if OCaml version >= $ocaml_ver_str])
|
||||
ocaml_major="`echo $OCAMLVERSION | $AWK -F. '{print $1}'`"
|
||||
ocaml_minor="`echo $OCAMLVERSION | $AWK -F. '{print $2}'`"
|
||||
AS_IF([test "$ocaml_major" -ge 4 || ( test "$ocaml_major" -eq 3 && test "$ocaml_minor" -ge 11 )],[
|
||||
AC_MSG_RESULT([yes])
|
||||
ocaml_minor="`echo $OCAMLVERSION | $AWK -F. '{print $2}' | sed 's/^0//'`"
|
||||
AS_IF([test "$ocaml_major" -ge $((ocaml_min_major+1)) || ( test "$ocaml_major" -eq $ocaml_min_major && test "$ocaml_minor" -ge $ocaml_min_minor )],[
|
||||
AC_MSG_RESULT([yes ($ocaml_major, $ocaml_minor)])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_FAILURE([OCaml compiler is not new enough. At least OCaml 3.11 is required])
|
||||
AC_MSG_FAILURE([OCaml compiler is not new enough. At least OCaml $ocaml_ver_str is required])
|
||||
])
|
||||
|
||||
AM_CONDITIONAL([HAVE_OCAML],
|
||||
|
||||
Reference in New Issue
Block a user