diff mbox series

[v1,29/39] configure: don't allow plugins to be enabled for a non-TCG build

Message ID 20210706145817.24109-30-alex.bennee@linaro.org
State New
Headers show
Series final pre-PR for 6.1 (testing and plugins) | expand

Commit Message

Alex Bennée July 6, 2021, 2:58 p.m. UTC
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 configure | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.20.1

Comments

Thomas Huth July 7, 2021, 4:17 a.m. UTC | #1
On 06/07/2021 16.58, Alex Bennée wrote:
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>   configure | 7 ++++++-

>   1 file changed, 6 insertions(+), 1 deletion(-)

> 

> diff --git a/configure b/configure

> index 650d9c0735..44a487e090 100755

> --- a/configure

> +++ b/configure

> @@ -1098,6 +1098,7 @@ for opt do

>     --enable-cap-ng) cap_ng="enabled"

>     ;;

>     --disable-tcg) tcg="disabled"

> +                 plugins="no"

>     ;;

>     --enable-tcg) tcg="enabled"

>     ;;

> @@ -1509,7 +1510,11 @@ for opt do

>     ;;

>     --disable-xkbcommon) xkbcommon="disabled"

>     ;;

> -  --enable-plugins) plugins="yes"

> +  --enable-plugins) if test "$tcg" = "enabled"; then

> +                        plugins="yes"

> +                    else

> +                        error_exit "Can't enable plugins on non-TCG builds"

> +                    fi


That's the wrong spot for checking. While it works fine with:

  .../configure --disable-tcg --enable-plugins

it fails to bail out with:

  .../configure --enable-plugins --disable-tcg

You should do such checks after all options have been parsed.

  Thomas
diff mbox series

Patch

diff --git a/configure b/configure
index 650d9c0735..44a487e090 100755
--- a/configure
+++ b/configure
@@ -1098,6 +1098,7 @@  for opt do
   --enable-cap-ng) cap_ng="enabled"
   ;;
   --disable-tcg) tcg="disabled"
+                 plugins="no"
   ;;
   --enable-tcg) tcg="enabled"
   ;;
@@ -1509,7 +1510,11 @@  for opt do
   ;;
   --disable-xkbcommon) xkbcommon="disabled"
   ;;
-  --enable-plugins) plugins="yes"
+  --enable-plugins) if test "$tcg" = "enabled"; then
+                        plugins="yes"
+                    else
+                        error_exit "Can't enable plugins on non-TCG builds"
+                    fi
   ;;
   --disable-plugins) plugins="no"
   ;;