[PATCH weston 05/11] configure.ac: Use consistent quoting

Kristian Høgsberg hoegsberg at gmail.com
Mon Dec 16 17:01:39 PST 2013


On Sun, Dec 08, 2013 at 07:45:37PM +0100, Quentin Glidic wrote:
> From: Quentin Glidic <sardemff7+git at sardemff7.net>

If we need to be consistent, can we not quote at all?  Surely xyes
doesn't need to be quoted.  And what could ever set something like
$enable_egl to something with spaces in it?  Is there a real reason
for this exessive quoting?

Kristian

> Also avoid "==" Bashisms
> 
> Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
> ---
>  configure.ac | 74 ++++++++++++++++++++++++++++++------------------------------
>  1 file changed, 37 insertions(+), 37 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 5b7c847..daf81eb 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -66,8 +66,8 @@ COMPOSITOR_MODULES="wayland-server >= 1.3.90 pixman-1"
>  
>  AC_ARG_ENABLE(egl, [  --disable-egl],,
>                enable_egl=yes)
> -AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes)
> -if test x$enable_egl = xyes; then
> +AM_CONDITIONAL(ENABLE_EGL, test "x$enable_egl" = "xyes")
> +if test "x$enable_egl" = "xyes"; then
>  	AC_DEFINE([ENABLE_EGL], [1], [Build Weston with EGL support])
>  	PKG_CHECK_MODULES(EGL, [egl >= 7.10 glesv2])
>  fi
> @@ -80,23 +80,23 @@ AC_ARG_ENABLE(xkbcommon,
>  			      be sent a keymap and and must know how to
>  			      interpret the keycode sent for any key event.]),,
>  	      enable_xkbcommon=yes)
> -if test x$enable_xkbcommon = xyes; then
> +if test "x$enable_xkbcommon" = "xyes"; then
>  	AC_DEFINE(ENABLE_XKBCOMMON, [1], [Build Weston with libxkbcommon support])
>  	COMPOSITOR_MODULES="$COMPOSITOR_MODULES xkbcommon >= 0.3.0"
>  fi
>  
>  AC_ARG_ENABLE(setuid-install, [  --enable-setuid-install],,
>  	      enable_setuid_install=yes)
> -AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
> +AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test "x$enable_setuid_install" = "xyes")
>  
>  
>  AC_ARG_ENABLE(xwayland, [  --enable-xwayland],,
>  	      enable_xwayland=yes)
>  AC_ARG_ENABLE(xwayland-test, [  --enable-xwayland-test],,
>                enable_xwayland_test=yes)
> -AM_CONDITIONAL(ENABLE_XWAYLAND, test x$enable_xwayland = xyes)
> -AM_CONDITIONAL(ENABLE_XWAYLAND_TEST, test x$enable_xwayland = xyes -a x$enable_xwayland_test = xyes)
> -if test x$enable_xwayland = xyes; then
> +AM_CONDITIONAL(ENABLE_XWAYLAND, test "x$enable_xwayland" = "xyes")
> +AM_CONDITIONAL(ENABLE_XWAYLAND_TEST, test "x$enable_xwayland" = "xyes" -a "x$enable_xwayland_test" = "xyes")
> +if test "x$enable_xwayland" = "xyes"; then
>    PKG_CHECK_MODULES([XWAYLAND], xcb xcb-xfixes xcb-composite xcursor cairo-xcb)
>    AC_DEFINE([BUILD_XWAYLAND], [1], [Build the X server launcher])
>  
> @@ -104,7 +104,7 @@ if test x$enable_xwayland = xyes; then
>                [Path to X server]), [XSERVER_PATH="$withval"],
>                [XSERVER_PATH="$bindir/Xorg"])
>    AC_SUBST([XSERVER_PATH])
> -  if test x$enable_xwayland_test = xyes; then
> +  if test "x$enable_xwayland_test" = "xyes"; then
>      PKG_CHECK_MODULES([XWAYLAND_TEST], xcb xcb-dri2 libdrm)
>    fi
>  fi
> @@ -114,8 +114,8 @@ PKG_CHECK_MODULES(LIBDRM, [libdrm],
>  
>  AC_ARG_ENABLE(x11-compositor, [  --enable-x11-compositor],,
>  	      enable_x11_compositor=yes)
> -AM_CONDITIONAL(ENABLE_X11_COMPOSITOR, test x$enable_x11_compositor = xyes)
> -if test x$enable_x11_compositor = xyes; then
> +AM_CONDITIONAL(ENABLE_X11_COMPOSITOR, test "x$enable_x11_compositor" = "xyes")
> +if test "x$enable_x11_compositor" = "xyes"; then
>    PKG_CHECK_MODULES([XCB], xcb)
>    xcb_save_LIBS=$LIBS
>    xcb_save_CFLAGS=$CFLAGS
> @@ -129,7 +129,7 @@ if test x$enable_x11_compositor = xyes; then
>  
>    PKG_CHECK_MODULES(X11_COMPOSITOR_XKB, [xcb-xkb],
>  		    [have_xcb_xkb="yes"], [have_xcb_xkb="no"])
> -  if test "x$have_xcb_xkb" = xyes; then
> +  if test "x$have_xcb_xkb" = "xyes"; then
>  	# Most versions of XCB have totally broken XKB bindings, where the
>  	# events don't work.  Make sure we can actually use them.
>  	xcb_xkb_save_CFLAGS=$CFLAGS
> @@ -138,7 +138,7 @@ if test x$enable_x11_compositor = xyes; then
>  			[], [have_xcb_xkb=no], [[#include <xcb/xkb.h>]])
>  	CFLAGS=$xcb_xkb_save_CFLAGS
>    fi
> -  if test "x$have_xcb_xkb" = xyes; then
> +  if test "x$have_xcb_xkb" = "xyes"; then
>  	X11_COMPOSITOR_MODULES="$X11_COMPOSITOR_MODULES xcb-xkb"
>  	AC_DEFINE([HAVE_XCB_XKB], [1], [libxcb supports XKB protocol])
>    fi
> @@ -150,8 +150,8 @@ fi
>  
>  AC_ARG_ENABLE(drm-compositor, [  --enable-drm-compositor],,
>  	      enable_drm_compositor=yes)
> -AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test x$enable_drm_compositor = xyes)
> -if test x$enable_drm_compositor = xyes; then
> +AM_CONDITIONAL(ENABLE_DRM_COMPOSITOR, test "x$enable_drm_compositor" = "xyes")
> +if test "x$enable_drm_compositor" = "xyes"; then
>    AC_DEFINE([BUILD_DRM_COMPOSITOR], [1], [Build the DRM compositor])
>    PKG_CHECK_MODULES(DRM_COMPOSITOR, [libudev >= 136 libdrm >= 2.4.30 gbm mtdev >= 1.1.0])
>  fi
> @@ -161,8 +161,8 @@ PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
>  AC_ARG_ENABLE(wayland-compositor, [  --enable-wayland-compositor],,
>  	      enable_wayland_compositor=yes)
>  AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR,
> -	       test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes)
> -if test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes; then
> +	       test "x$enable_wayland_compositor" = "xyes" -a "x$enable_egl" = "xyes")
> +if test "x$enable_wayland_compositor" = "xyes" -a "x$enable_egl" = "xyes"; then
>    AC_DEFINE([BUILD_WAYLAND_COMPOSITOR], [1],
>  	    [Build the Wayland (nested) compositor])
>    PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client wayland-egl wayland-cursor])
> @@ -172,7 +172,7 @@ fi
>  AC_ARG_ENABLE(headless-compositor, [  --enable-headless-compositor],,
>  	      enable_headless_compositor=yes)
>  AM_CONDITIONAL(ENABLE_HEADLESS_COMPOSITOR,
> -	       test x$enable_headless_compositor = xyes)
> +	       test "x$enable_headless_compositor" = "xyes")
>  
>  
>  AC_ARG_ENABLE(rpi-compositor,
> @@ -195,8 +195,8 @@ AM_CONDITIONAL(INSTALL_RPI_COMPOSITOR, test "x$have_bcm_host" = "xyes")
>  AC_ARG_ENABLE([fbdev-compositor], [  --enable-fbdev-compositor],,
>                enable_fbdev_compositor=yes)
>  AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR],
> -               [test x$enable_fbdev_compositor = xyes])
> -AS_IF([test x$enable_fbdev_compositor = xyes], [
> +               [test "x$enable_fbdev_compositor" = "xyes"])
> +AS_IF([test "x$enable_fbdev_compositor" = "xyes"], [
>    AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor])
>    PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
>  ])
> @@ -204,8 +204,8 @@ AS_IF([test x$enable_fbdev_compositor = xyes], [
>  AC_ARG_ENABLE([rdp-compositor], [  --enable-rdp-compositor],,
>                enable_rdp_compositor=no)
>  AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
> -               [test x$enable_rdp_compositor = xyes])
> -if test x$enable_rdp_compositor = xyes; then
> +               [test "x$enable_rdp_compositor" = "xyes"])
> +if test "x$enable_rdp_compositor" = "xyes"; then
>    AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
>    PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
>  fi
> @@ -250,7 +250,7 @@ AS_IF([test "x$have_webp" = "xyes"],
>  
>  AC_ARG_ENABLE(vaapi-recorder, [  --enable-vaapi-recorder],,
>  	      enable_vaapi_recorder=auto)
> -if test x$enable_vaapi_recorder != xno; then
> +if test "x$enable_vaapi_recorder" != "xno"; then
>    PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0],
>                      [have_libva=yes], [have_libva=no])
>    if test "x$have_libva" = "xno" -a "x$enable_vaapi_recorder" = "xyes"; then
> @@ -259,7 +259,7 @@ if test x$enable_vaapi_recorder != xno; then
>    AS_IF([test "x$have_libva" = "xyes"],
>          [AC_DEFINE([BUILD_VAAPI_RECORDER], [1], [Build the vaapi recorder])])
>  fi
> -AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = xyes)
> +AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = "xyes")
>  
>  
>  AC_SEARCH_LIBS([jpeg_CreateDecompress], [jpeg])
> @@ -279,7 +279,7 @@ AC_ARG_ENABLE(simple-clients,
>                               [do not build the simple wl_shm clients]),,
>                enable_simple_clients=yes)
>  AM_CONDITIONAL(BUILD_SIMPLE_CLIENTS, test "x$enable_simple_clients" = "xyes")
> -if test x$enable_simple_clients = xyes; then
> +if test "x$enable_simple_clients" = "xyes"; then
>    PKG_CHECK_MODULES(SIMPLE_CLIENT, [wayland-client])
>  fi
>  
> @@ -288,14 +288,14 @@ AC_ARG_ENABLE(simple-egl-clients,
>                               [do not build the simple EGL clients]),,
>                enable_simple_egl_clients="$enable_egl")
>  AM_CONDITIONAL(BUILD_SIMPLE_EGL_CLIENTS, test "x$enable_simple_egl_clients" = "xyes")
> -if test x$enable_simple_egl_clients = xyes; then
> +if test "x$enable_simple_egl_clients" = "xyes"; then
>    PKG_CHECK_MODULES(SIMPLE_EGL_CLIENT,
>                      [egl >= 7.10 glesv2 wayland-client wayland-egl wayland-cursor])
>  fi
>  
>  AC_ARG_ENABLE(clients, [  --enable-clients],, enable_clients=yes)
> -AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes)
> -if test x$enable_clients = xyes; then
> +AM_CONDITIONAL(BUILD_CLIENTS, test "x$enable_clients" = "xyes")
> +if test "x$enable_clients" = "xyes"; then
>    AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
>  
>    PKG_CHECK_MODULES(CLIENT, [wayland-client cairo >= 1.10.0 xkbcommon wayland-cursor])
> @@ -336,8 +336,8 @@ AS_IF([test "x$have_systemd_login_209" = "xyes"],
>        [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
>  
>  AC_ARG_ENABLE(weston-launch, [  --enable-weston-launch],, enable_weston_launch=yes)
> -AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
> -if test x$enable_weston_launch == xyes; then
> +AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test "x$enable_weston_launch" = "xyes")
> +if test "x$enable_weston_launch" = "xyes"; then
>  	AC_SEARCH_LIBS([pam_open_session], [pam])
>  	case "$ac_cv_search_pam_open_session" in
>  		no) AC_MSG_ERROR([pam support required for weston-launch]) ;;
> @@ -347,7 +347,7 @@ if test x$enable_weston_launch == xyes; then
>  	AC_SUBST([PAM_LIBS])
>  fi
>  
> -if test x$enable_egl = xyes; then
> +if test "x$enable_egl" = "xyes"; then
>    PKG_CHECK_MODULES(GLU, [glu], [have_glu=yes], [have_glu=no])
>  fi
>  AM_CONDITIONAL(HAVE_GLU, test "x$have_glu" = "xyes")
> @@ -361,7 +361,7 @@ AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
>  	       [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])
>  
>  AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS,
> -	       test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
> +	       test "x$cairo_modules" = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
>  
>  AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT,
>  	       [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"])
> @@ -410,8 +410,8 @@ fi
>  AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
>  
>  AC_ARG_ENABLE(wcap-tools, [  --disable-wcap-tools],, enable_wcap_tools=yes)
> -AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes)
> -if test x$enable_wcap_tools = xyes; then
> +AM_CONDITIONAL(BUILD_WCAP_TOOLS, test "x$enable_wcap_tools" = "xyes")
> +if test "x$enable_wcap_tools" = "xyes"; then
>    AC_DEFINE([BUILD_WCAP_TOOLS], [1], [Build the wcap tools])
>    PKG_CHECK_MODULES(WCAP, [cairo])
>    WCAP_LIBS="$WCAP_LIBS -lm"
> @@ -434,7 +434,7 @@ AC_ARG_ENABLE(libunwind,
>                AS_HELP_STRING([--disable-libunwind],
>                               [Disable libunwind usage for backtraces]),,
>                enable_libunwind=auto)
> -AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes])
> +AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = "xyes"])
>  if test "x$enable_libunwind" != "xno"; then
>          PKG_CHECK_MODULES(LIBUNWIND,
>                            libunwind,
> @@ -472,13 +472,13 @@ AM_CONDITIONAL(ENABLE_DEMO_CLIENTS, [test "x$enable_demo_clients" = "xyes"])
>  
>  PKG_CHECK_MODULES(LCMS, lcms2,
>                    [have_lcms=yes], [have_lcms=no])
> -if test "x$have_lcms" = xyes; then
> +if test "x$have_lcms" = "xyes"; then
>         AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
>  fi
> -AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
> +AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = "xyes"])
>  
>  AC_PATH_PROG([wayland_scanner], [wayland-scanner])
> -if test x$wayland_scanner = x; then
> +if test "x$wayland_scanner" = "x"; then
>  	AC_MSG_ERROR([wayland-scanner is needed to compile weston])
>  fi
>  
> -- 
> 1.8.4.3
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list