From 5dbc1b333b85695735dc5b484372758b9979b693 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Tue, 5 Jan 2010 20:55:02 +0100 Subject: libkms: Make vmwgfx optional --- libkms/Makefile.am | 7 +++++-- libkms/api.c | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'libkms') diff --git a/libkms/Makefile.am b/libkms/Makefile.am index d65d6012..62d154b8 100644 --- a/libkms/Makefile.am +++ b/libkms/Makefile.am @@ -8,8 +8,11 @@ libkms_la_LDFLAGS = -version-number 1:0:0 -no-undefined libkms_la_LIBADD = libkms_la_SOURCES = \ - api.c \ - vmwgfx.c + api.c + +if HAVE_VMWGFX +libkms_la_SOURCES += vmwgfx.c +endif libkmsincludedir = ${includedir}/libkms libkmsinclude_HEADERS = libkms.h diff --git a/libkms/api.c b/libkms/api.c index 6f899c41..478fa38c 100644 --- a/libkms/api.c +++ b/libkms/api.c @@ -26,6 +26,7 @@ **************************************************************************/ +#include "config.h" #include #include #include @@ -33,7 +34,11 @@ int kms_create(int fd, struct kms_driver **out) { +#ifdef HAVE_VMWGFX return vmwgfx_create(fd, out); +#else + return -ENOSYS; +#endif } int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) -- cgit v1.2.3