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
pull/1862/head
Daniele Forsi IU5HKX 2025-08-24 09:34:33 +02:00
rodzic b300747aa2
commit 91e5f1441f
1 zmienionych plików z 12 dodań i 7 usunięć

Wyświetl plik

@ -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