From f745f95d818c932733e6185bb805f1a5b2ca687a Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.oliveiramaroneze@cea.fr> Date: Wed, 15 Feb 2017 08:53:03 +0100 Subject: [PATCH] [configure] simplify checking of zarith --- configure.in | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/configure.in b/configure.in index 3404b36969e..0837facc538 100644 --- a/configure.in +++ b/configure.in @@ -272,34 +272,13 @@ esac # zarith ######## -AC_ARG_ENABLE( - zarith, - [ --enable-zarith=<dir> use ZArith library], - ZARITH_PATH=$enableval,) - -AC_MSG_CHECKING(for Zarith) - -if test -z "$ZARITH_PATH"; then - # standard installation procedure of zarith diverges according to - # ocamlfind installation (see zarith's README) - ZARITH_PATH=$($OCAMLFIND query zarith 2>/dev/null | tr -d '\r\n') - if test -z "$ZARITH_PATH"; then - HAS_ZARITH="no"; - else - HAS_ZARITH="yes"; - fi; - if test "$HAS_ZARITH" = "no"; then - AC_MSG_ERROR(Zarith not found but required by Frama-C) - else - AC_MSG_RESULT(found) - fi +AC_MSG_CHECKING(for zarith) + +ZARITH=$($OCAMLFIND query zarith -format %v) +if test -z "$ZARITH" ; then + AC_MSG_ERROR(Cannot find zarith via ocamlfind.) else - AC_CHECK_FILE($ZARITH_PATH/zarith.$LIB_SUFFIX,HAS_ZARITH=yes,HAS_ZARITH=no) - if test "$HAS_ZARITH" = "no"; then - AC_MSG_ERROR(Zarith: file $ZARITH_PATH/zarith.$LIB_SUFFIX not found.) - else - AC_MSG_RESULT(found) - fi + AC_MSG_RESULT(found) fi # apron -- GitLab