From 3da4f24b67f4ae945ba51a4fd37ec28ec607b10f Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Fri, 17 Sep 2021 11:45:46 +0100 Subject: [PATCH] Tidy-up dependency checking in configure Don't support any packaging of dose.common or dose.algo and re.glob doesn't need explicitly checking. extlib is no longer used by opam. --- configure | 58 ++++++---------------------------------------------- configure.ac | 17 ++++++--------- 2 files changed, 12 insertions(+), 63 deletions(-) diff --git a/configure b/configure index 9f622f2ade0..606c078387c 100755 --- a/configure +++ b/configure @@ -637,9 +637,7 @@ OCAML_PKG_cudf OCAML_PKG_ocamlgraph OCAML_PKG_cmdliner OCAML_PKG_base64 -OCAML_PKG_re_glob OCAML_PKG_re -OCAML_PKG_extlib OCAML_PKG_bigarray OCAML_PKG_unix CONF_MANIFEST_O @@ -5773,6 +5771,7 @@ fi echo +# Dependencies { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package unix" >&5 $as_echo_n "checking for OCaml findlib package unix... " >&6; } @@ -5822,30 +5821,6 @@ $as_echo "not found" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package extlib" >&5 -$as_echo_n "checking for OCaml findlib package extlib... " >&6; } - - unset found - unset pkg - found=no - for pkg in extlib ; do - if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - OCAML_PKG_extlib=$pkg - found=yes - break - fi - done - if test "$found" = "no" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - OCAML_PKG_extlib=no - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package re" >&5 $as_echo_n "checking for OCaml findlib package re... " >&6; } @@ -5870,30 +5845,6 @@ $as_echo "not found" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package re.glob" >&5 -$as_echo_n "checking for OCaml findlib package re.glob... " >&6; } - - unset found - unset pkg - found=no - for pkg in re.glob ; do - if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 -$as_echo "found" >&6; } - OCAML_PKG_re_glob=$pkg - found=yes - break - fi - done - if test "$found" = "no" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 -$as_echo "not found" >&6; } - OCAML_PKG_re_glob=no - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package base64" >&5 $as_echo_n "checking for OCaml findlib package base64... " >&6; } @@ -5996,7 +5947,7 @@ $as_echo_n "checking for OCaml findlib package dose3.common... " >&6; } unset found unset pkg found=no - for pkg in dose3.common dose.common ; do + for pkg in dose3.common ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } @@ -6020,7 +5971,7 @@ $as_echo_n "checking for OCaml findlib package dose3.algo... " >&6; } unset found unset pkg found=no - for pkg in dose3.algo dose.algo ; do + for pkg in dose3.algo ; do if $OCAMLFIND query $pkg >/dev/null 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } @@ -6086,6 +6037,8 @@ $as_echo "not found" >&6; } +# Optional dependencies + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCaml findlib package mccs" >&5 $as_echo_n "checking for OCaml findlib package mccs... " >&6; } @@ -6523,6 +6476,7 @@ if test "x${enable_checks}" != "xno" && { test "x$OCAML_PKG_ocamlgraph" = "xno" || test "x$OCAML_PKG_cudf" = "xno" || test "x$OCAML_PKG_dose3_common" = "xno" || + test "x$OCAML_PKG_dose3_algo" = "xno" || test "x$OCAML_PKG_opam_file_format" = "xno" || test "x$OCAML_PKG_spdx_licenses" = "xno" || test "x$CPPO" = "x" || diff --git a/configure.ac b/configure.ac index d220cb1adc9..47466ae045e 100644 --- a/configure.ac +++ b/configure.ac @@ -322,19 +322,20 @@ AC_SUBST(CONF_MANIFEST_O) echo +# Dependencies AC_CHECK_OCAML_PKG([unix]) AC_CHECK_OCAML_PKG([bigarray]) -AC_CHECK_OCAML_PKG([extlib]) AC_CHECK_OCAML_PKG([re]) -AC_CHECK_OCAML_PKG([re.glob]) AC_CHECK_OCAML_PKG([base64]) AC_CHECK_OCAML_PKG([cmdliner]) AC_CHECK_OCAML_PKG([ocamlgraph]) AC_CHECK_OCAML_PKG([cudf]) -AC_CHECK_OCAML_PKG(dose3.common,dose.common) -AC_CHECK_OCAML_PKG(dose3.algo,dose.algo) +AC_CHECK_OCAML_PKG([dose3.common]) +AC_CHECK_OCAML_PKG([dose3.algo]) AC_CHECK_OCAML_PKG([opam-file-format]) AC_CHECK_OCAML_PKG([spdx_licenses]) + +# Optional dependencies AC_CHECK_OCAML_PKG([mccs]) AC_CHECK_OCAML_PKG([opam-0install-cudf]) @@ -381,13 +382,6 @@ AS_IF([test "x$OPAM_0INSTALL_SOLVER_ENABLED" = "xtrue" -a "x$OCAML_PKG_opam_0ins ]) ]) -dnl echo -dnl echo "extlib........................ ${OCAML_PKG_extlib}" -dnl echo "re............................ ${OCAML_PKG_re}" -dnl echo "cmdliner...................... ${OCAML_PKG_cmdliner}" -dnl echo "graph......................... ${OCAML_PKG_ocamlgraph}" -dnl echo "cudf.......................... ${OCAML_PKG_cudf}" -dnl echo "dose3......................... ${OCAML_PKG_dose3}" echo AS_IF([test "x${enable_checks}" != "xno" && { @@ -398,6 +392,7 @@ AS_IF([test "x${enable_checks}" != "xno" && { test "x$OCAML_PKG_ocamlgraph" = "xno" || test "x$OCAML_PKG_cudf" = "xno" || test "x$OCAML_PKG_dose3_common" = "xno" || + test "x$OCAML_PKG_dose3_algo" = "xno" || test "x$OCAML_PKG_opam_file_format" = "xno" || test "x$OCAML_PKG_spdx_licenses" = "xno" || test "x$CPPO" = "x" ||