configure: don't allow plugins to be enabled for a non-TCG build
authorAlex Bennée <alex.bennee@linaro.org>
Fri, 9 Jul 2021 14:29:54 +0000 (15:29 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 14 Jul 2021 14:54:13 +0000 (15:54 +0100)
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210709143005.1554-30-alex.bennee@linaro.org>

configure

index 4d0a2bfdd87301b9ae18834606bc9edc75e36f01..e2a353ce1ca265ad5186bb5c2bf7cdbf2d1f8acc 100755 (executable)
--- a/configure
+++ b/configure
@@ -1110,6 +1110,7 @@ for opt do
   --enable-cap-ng) cap_ng="enabled"
   ;;
   --disable-tcg) tcg="disabled"
+                 plugins="no"
   ;;
   --enable-tcg) tcg="enabled"
   ;;
@@ -1575,6 +1576,11 @@ for opt do
   esac
 done
 
+# test for any invalid configuration combinations
+if test "$plugins" = "yes" -a "$tcg" = "disabled"; then
+    error_exit "Can't enable plugins on non-TCG builds"
+fi
+
 case $git_submodules_action in
     update|validate)
         if test ! -e "$source_path/.git"; then