configure: replace HAVE_LIBDRM with BUILD_DRM_COMPOSITOR
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 6 Apr 2017 10:18:59 +0000 (13:18 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 7 Apr 2017 09:02:47 +0000 (12:02 +0300)
commit2667e9e399fa553cb53c38a4c7a061a81ce4e0f7
treeebeed21e256a3629996ef2b2a2782e6d9f232e82
parentc394179488e9c84f3f113570cf4079ebd5da8760
configure: replace HAVE_LIBDRM with BUILD_DRM_COMPOSITOR

HAVE_LIBDRM was used as a condition for the launcher infrastructure to
call libdrm.so functions. It was set by an independent test for libdrm,
which would silently continue if libdrm was not found. It was assumed
that if you enabled a feature that used libdrm at runtime, the test for
that feature would imply that HAVE_LIBDRM is also set. This was quite
subtle.

The only feature that actually uses libdrm.so at runtime is the DRM
backend. No other backend needs the libdrm calls in the launcher
infrastructure.

Therefore to simplify things, stop using HAVE_LIBDRM and use
BUILD_DRM_COMPOSITOR instead. If you enable the DRM compositor, you
automatically also get libdrm support in the launchers.

There are still things depending on LIBDRM_CFLAGS and LIBDRM_LIBS, so
the test cannot be removed completely.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
configure.ac
libweston/launcher-direct.c
libweston/launcher-weston-launch.c
libweston/weston-launch.c