configure.ac: make judgement logic cleaner

Submitted by Zhaowei Yuan on Oct. 29, 2018, 7:08 a.m.

Details

Message ID 1540796906-6340-1-git-send-email-zhaowei.yuan@samsung.com
State New
Headers show
Series "configure.ac: make judgement logic cleaner" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Zhaowei Yuan Oct. 29, 2018, 7:08 a.m.
The purpose of judegment here is to output error message
and abort configure procedure if gbm is not enabled, the
original statement makes it work, however, its logic is
not clear and easy to make people confused.

Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/configure.ac b/configure.ac
index 6342458..e754061 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1866,8 +1866,9 @@  for plat in $platforms; do
         ;;
 
     drm)
-        test "x$enable_gbm" = "xno" &&
+        if test "x$enable_gbm" = "xno"; then
                 AC_MSG_ERROR([EGL platform drm needs gbm])
+        fi
         DEFINES="$DEFINES -DHAVE_DRM_PLATFORM"
         ;;
 

Comments

Can anyone review this patch?

On 10/29/18 3:08 PM, Zhaowei Yuan wrote:
> The purpose of judegment here is to output error message
> and abort configure procedure if gbm is not enabled, the
> original statement makes it work, however, its logic is
> not clear and easy to make people confused.
> 
> Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
> ---
>   configure.ac | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 6342458..e754061 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1866,8 +1866,9 @@ for plat in $platforms; do
>           ;;
>   
>       drm)
> -        test "x$enable_gbm" = "xno" &&
> +        if test "x$enable_gbm" = "xno"; then
>                   AC_MSG_ERROR([EGL platform drm needs gbm])
> +        fi
>           DEFINES="$DEFINES -DHAVE_DRM_PLATFORM"
>           ;;
>   
>