From 91e5f1441f43f638a0698fe037a4127ea6a11493 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sun, 24 Aug 2025 09:34:33 +0200 Subject: [PATCH] If neither yes or no were given, build INDI only if prerequisites are met Options availables are: ./configure # same as --with-indi=detect ./configure --with-indi=detect # build if prerequisites are met ./configure --with-indi=no # do not build ./configure --without-indi # do not build ./configure --with-indi=yes # fail if prerequisites aren't met --- configure.ac | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 1a2635c6c..647ab65da 100644 --- a/configure.ac +++ b/configure.ac @@ -407,18 +407,23 @@ AC_MSG_CHECKING([whether to use INDI in rotctl/rotctld]) AC_ARG_WITH([indi], [AS_HELP_STRING([--without-indi], - [disable INDI in rotctl/rotctld @<:@default=yes:>@])], + [disable INDI in rotctl/rotctld @<:@default=detect:>@])], [cf_with_indi_support=$withval], - [cf_with_indi_support=yes] + [cf_with_indi_support=detect] ) AC_MSG_RESULT([$cf_with_indi_support]) -AS_IF([test x"$cf_with_indi_support" = "xyes"], [ - AS_IF([test x"${cf_with_cxx}" != "xyes"], [ - AC_MSG_ERROR([INDI support needs a C++ compiler.]) - ]) -]) +case "${cf_with_indi_support}" in + detect) cf_with_indi_support=$cf_with_cxx ;; + yes) + AS_IF([test x"${cf_with_cxx}" != "xyes"], + [AC_MSG_ERROR([INDI support needs a C++ compiler.])] + ) + ;; + no) ;; + *) AC_MSG_ERROR([invalid value for --without-indi: ${cf_with_indi_support}]) ;; +esac AS_IF([test x"$cf_with_indi_support" != "xno"], [ # macros/ax_lib_nova.m4