From 001841974a7e0441362afcb37736075550dcd9e9 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Fri, 29 May 2020 10:04:55 +0200 Subject: [PATCH] [wp][config] don't check why3 version if why3 not installed --- src/plugins/wp/configure.ac | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/plugins/wp/configure.ac b/src/plugins/wp/configure.ac index 138aea30a32..0c3828b35ff 100644 --- a/src/plugins/wp/configure.ac +++ b/src/plugins/wp/configure.ac @@ -50,15 +50,19 @@ plugin_use(wp,gui) ###################### configure_pkg(why3,[package why3 not found]) -plugin_require_external(wp,why3) +plugin_require_pkg(wp,why3) + +check_plugin_dependencies + +if test "$HAS_OCAML_WHY3" = "yes"; then +AC_MSG_CHECKING(why3 version) WHY3VERSION=`ocamlfind query -format %v why3 | tr -d '\\r\\n'` -if test "$WHY3VERSION" == "" ; -then - plugin_disable(wp,[why3 not found]) -else - AC_MSG_CHECKING(why3 version) - case $WHY3VERSION in +case $WHY3VERSION in + "") + AC_MSG_RESULT([not found!]) + plugin_disable(wp,[why3 not found]) + ;; 0.* | 1.[[012]].* | 1.3.0) AC_MSG_RESULT([found $WHY3VERSION: requires 1.3.1+]) plugin_disable(wp,[non-supported why3 $WHY3VERSION]) @@ -69,7 +73,7 @@ else *) AC_MSG_RESULT([found $WHY3VERSION: might work (should be 1.3.1+)]) ;; - esac +esac fi # Nb: this would deserve to use plugin_requires mechanism -- GitLab