package/x11r7/xserver_xorg-server: Relax dependency on libdrm
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 15 Feb 2015 13:19:32 +0000 (14:19 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 19 Feb 2015 21:39:36 +0000 (22:39 +0100)
commitd01389c9d9cacd860c569f229ff9ec47f9dffb2c
tree3eda1cde483edae049a861d9de06aa063ee5bf15
parentbac9bb2047bdd8f5c39c581b32219f2f18d72b8f
package/x11r7/xserver_xorg-server: Relax dependency on libdrm

xserver_xorg-server needs libdrm only when DRI is enabled, see configure.ac,
line 1280. But since version 1.16.99.901 configure searches for optional libdrm
support in configure.ac, line 2041,

http://cgit.freedesktop.org/xorg/xserver/commit/configure.ac?id=2feda3b6b58f46cef91ea41312aac9021a703777

as well due to libdrm support being enabled by default, but the macro
PKG_CHECK_EXISTS used in line 2041 does not add libdrm-specific CFLAGS to
Makefile causing the build to fail:

In file included from dumb_bo.c:36:0:
/home/br/br7/output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/include/xf86drm.h:40:17: fatal error: drm.h: No such file or directory
 #include <drm.h>

This patch enables libdrm support only when dri support is enabled, which in
turn depends on mesa3d. Since mesa3d selects libdrm already remove that line
from Config.in as well.

Tested using this defconfig

BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XSERVER_XORG_SERVER=y
BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR=y

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/x11r7/xserver_xorg-server/Config.in
package/x11r7/xserver_xorg-server/xserver_xorg-server.mk