From f8b45835f78da16ecc89c0b85ed9fbe92ab4a764 Mon Sep 17 00:00:00 2001 From: Théo Zimmermann Date: Tue, 2 Jan 2018 13:16:45 +0100 Subject: Update the lower-bound of the lablgtk dependency. Closes #6509. --- .travis.yml | 2 +- INSTALL.ide | 4 ++-- configure.ml | 26 +++++++++++--------------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0bc43c110..8f1f1e699 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ env: - CAMLP5_VER_BE="7.03" - FINDLIB_VER="1.4.1" - FINDLIB_VER_BE="1.7.3" - - LABLGTK="lablgtk.2.16.0 lablgtk-extras.1.5" + - LABLGTK="lablgtk.2.18.3 lablgtk-extras.1.6" - LABLGTK_BE="lablgtk.2.18.6 lablgtk-extras.1.6" - NATIVE_COMP="yes" - COQ_DEST="-local" diff --git a/INSTALL.ide b/INSTALL.ide index 513e37c91..26c192baa 100644 --- a/INSTALL.ide +++ b/INSTALL.ide @@ -39,7 +39,7 @@ COMPILATION REQUIREMENTS install GTK+ 2.x, should you need to force it for one reason or another.) - The OCaml bindings for GTK+ 2.x, lablgtk2 with support for gtksourceview2. - You need at least version 2.16. + You need at least version 2.18.3. Your distribution may contain precompiled packages. For example, for Debian, run @@ -57,7 +57,7 @@ COMPILATION REQUIREMENTS ./configure && make world && make install You must have write access to the OCaml standard library path. - If this fails, read lablgtk-2.14.2/README. + If this fails, read the README. INSTALLATION diff --git a/configure.ml b/configure.ml index a86b78ba5..eedc01752 100644 --- a/configure.ml +++ b/configure.ml @@ -758,24 +758,20 @@ let get_lablgtkdir () = let check_lablgtk_version src dir = match src with | Manual | Stdlib -> - let test accu f = - if accu then - let test = sprintf "grep -q -w %s %S/glib.mli" f dir in - Sys.command test = 0 - else false - in - let heuristics = [ - "convert_with_fallback"; - "wrap_poll_func"; (** Introduced in lablgtk 2.16 *) - ] in - let ans = List.fold_left test true heuristics in - if ans then printf "Warning: could not check the version of lablgtk2.\n"; - (ans, "an unknown version") + printf "Warning: could not check the version of lablgtk2.\nMake sure your version is at least 2.18.3.\n"; + (true, "an unknown version") | OCamlFind -> let v, _ = tryrun camlexec.find ["query"; "-format"; "%v"; "lablgtk2"] in try let vi = List.map s2i (numeric_prefix_list v) in - ([2; 16] <= vi, v) + if vi = [2; 18; 0] then + begin + (* Version 2.18.3 is known to report incorrectly as 2.18.0 *) + printf "Warning: could not check the version of lablgtk2.\nMake sure your version is at least 2.18.3.\n"; + (true, "an unknown version") + end + else + ([2; 18; 3] <= vi, v) with _ -> (false, v) let pr_ide = function No -> "no" | Byte -> "only bytecode" | Opt -> "native" @@ -802,7 +798,7 @@ let check_coqide () = if dir = "" then set_ide No "LablGtk2 not found"; let (ok, version) = check_lablgtk_version via dir in let found = sprintf "LablGtk2 found (%s, %s)" (get_source via) version in - if not ok then set_ide No (found^", but too old (required >= 2.16, found " ^ version ^ ")"); + if not ok then set_ide No (found^", but too old (required >= 2.18.3, found " ^ version ^ ")"); (* We're now sure to produce at least one kind of coqide *) lablgtkdir := shorten_camllib dir; if !Prefs.coqide = Some Byte then set_ide Byte (found^", bytecode requested"); -- cgit v1.2.3