configure.ac: improve validation of some --enable-xxx options
Catch an invalid option like "--enable-buspirate=rubbish". Also mention all valid values in the help text for those options. Change-Id: Ib0fb8904132d07cc5cde421aa816ca6971a08769 Signed-off-by: R. Diez <rdiezmail-openocd@yahoo.de> Reviewed-on: https://review.openocd.org/c/openocd/+/8540 Reviewed-by: R. Diez <rdiez-2006@rd10.de> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
This commit is contained in:
parent
2627f8ce6d
commit
11f24fc2f2
|
@ -272,9 +272,13 @@ AC_ARG_ENABLE([dmem],
|
|||
m4_define([AC_ARG_ADAPTERS], [
|
||||
m4_foreach([adapter], [$1],
|
||||
[AC_ARG_ENABLE(ADAPTER_OPT([adapter]),
|
||||
AS_HELP_STRING([--enable-ADAPTER_OPT([adapter])],
|
||||
AS_HELP_STRING([--enable-ADAPTER_OPT([adapter])[[[=yes/no/auto]]]],
|
||||
[Enable building support for the ]ADAPTER_DESC([adapter])[ (default is $2)]),
|
||||
[], [ADAPTER_VAR([adapter])=$2])
|
||||
[case "${enableval}" in
|
||||
yes|no|auto) ;;
|
||||
*) AC_MSG_ERROR([Option --enable-ADAPTER_OPT([adapter]) has invalid value "${enableval}".]) ;;
|
||||
esac],
|
||||
[ADAPTER_VAR([adapter])=$2])
|
||||
])
|
||||
])
|
||||
|
||||
|
|
Loading…
Reference in New Issue