summaryrefslogtreecommitdiff
path: root/libkms
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-11-01 10:41:29 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-06-27 10:01:15 +0200
commit7214db763ab952771b10d8fdf72b902718f35902 (patch)
treeb1adecc47afe2a125f93c42b95c200bbdfb614c1 /libkms
parentfbd106ad76b0ee33814f6a5b94efaa0b067ec2af (diff)
kms: Allow compiling libkms without Intel support
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'libkms')
-rw-r--r--libkms/Makefile.am5
-rw-r--r--libkms/linux.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/libkms/Makefile.am b/libkms/Makefile.am
index 215450ac..518021ff 100644
--- a/libkms/Makefile.am
+++ b/libkms/Makefile.am
@@ -15,10 +15,13 @@ libkms_la_LIBADD = ../libdrm.la
libkms_la_SOURCES = \
internal.h \
linux.c \
- intel.c \
dumb.c \
api.c
+if HAVE_INTEL
+libkms_la_SOURCES += intel.c
+endif
+
if HAVE_VMWGFX
libkms_la_SOURCES += vmwgfx.c
endif
diff --git a/libkms/linux.c b/libkms/linux.c
index eec01622..d160bc8e 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -101,8 +101,12 @@ linux_from_sysfs(int fd, struct kms_driver **out)
if (ret)
return ret;
- if (!strcmp(name, "intel"))
+ if (0)
+ {}
+#ifdef HAVE_INTEL
+ else if (!strcmp(name, "intel"))
ret = intel_create(fd, out);
+#endif
#ifdef HAVE_VMWGFX
else if (!strcmp(name, "vmwgfx"))
ret = vmwgfx_create(fd, out);