configure.ac: provide a fall-back define for WAYLAND_SCANNER
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 2 Mar 2017 19:14:24 +0000 (19:14 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 13 Mar 2017 11:16:30 +0000 (11:16 +0000)
In some cases, we can end up calling WAYLAND_SCANNER even when
there's no binary. Do follow the other's approach set by
AX_PROG_FLEX/BISON and set the variable to :

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
configure.ac

index d64ed2d3e8d4133cfc818c4028bcc371fcdd2f4f..19a9cdd00708a703917ac6d3e53d6659062ebf82 100644 (file)
@@ -2106,7 +2106,7 @@ PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
         WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
         WAYLAND_SCANNER='')
 if test "x$WAYLAND_SCANNER" = x; then
-    AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner])
+    AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
 fi
 
 # Do per-EGL platform setups and checks
@@ -2117,7 +2117,7 @@ for plat in $egl_platforms; do
 
                PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
 
-               if test "x$WAYLAND_SCANNER" = x; then
+               if test "x$WAYLAND_SCANNER" = "x:"; then
                        AC_MSG_ERROR([wayland-scanner is needed to compile the wayland egl platform])
                fi
                ;;