configure: rework wayland_scanner handling(fix make distcheck)
configure: rework wayland_scanner handling(fix make distcheck)

Currently having the wayland-scanner is optional, which causes problems
when autotools parses through the makefiles, and tries to generate all
the BUILT_SOURCES.

As the config option --with-egl-platform=wayland is not the default, we
won't end up setting the WAYLAND_SCANNER variable, which in turn will
cause some files to not get generated.

There has been a wayland-scanner package as of wayland 1.2 which
provides a variable for the scanner binary, so let's use that one and
fall back to manually searching via AC_PATH_PROG when needed.

Cc: "10.5" <59f39c0db42d4479a46b02d4d2bc11120e37bb44@lists.freedesktop.org>
Signed-off-by: Emil Velikov <4c996f2f093ddd0585a556460b4cc3ba555546ef@gmail.com>
Reviewed-by: Kristian Høgsberg <ca9b5b1e27d4fa7f4ba6848bdd08ca52cfd6330c@bitplanet.net>
Reviewed-by: Matt Turner <789b315743a28dd066a4ba1459c35951c291d8a6@gmail.com>

metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler