aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Bornecrantz2010-01-05 13:55:02 -0600
committerJakob Bornecrantz2010-01-05 14:06:13 -0600
commit5dbc1b333b85695735dc5b484372758b9979b693 (patch)
treef846acb10f12def5fcfa12601c1d562188cbdfd1
parentdfbaffea07ba785d5a2d5493282f416488e217cc (diff)
downloadexternal-libdrm-5dbc1b333b85695735dc5b484372758b9979b693.tar.gz
external-libdrm-5dbc1b333b85695735dc5b484372758b9979b693.tar.xz
external-libdrm-5dbc1b333b85695735dc5b484372758b9979b693.zip
libkms: Make vmwgfx optional
-rw-r--r--configure.ac3
-rw-r--r--libkms/Makefile.am7
-rw-r--r--libkms/api.c5
3 files changed, 13 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index b9573145..9bad81a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -147,6 +147,9 @@ fi
147AM_CONDITIONAL(HAVE_LIBKMS, [test "x$LIBKMS" = xyes]) 147AM_CONDITIONAL(HAVE_LIBKMS, [test "x$LIBKMS" = xyes])
148 148
149AM_CONDITIONAL(HAVE_VMWGFX, [test "x$VMWGFX" = xyes]) 149AM_CONDITIONAL(HAVE_VMWGFX, [test "x$VMWGFX" = xyes])
150if test "x$VMWGFX" = xyes; then
151 AC_DEFINE(HAVE_VMWGFX, 1, [Have vmwgfx kernel headers])
152fi
150 153
151AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes]) 154AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes])
152 155
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
8libkms_la_LIBADD = 8libkms_la_LIBADD =
9 9
10libkms_la_SOURCES = \ 10libkms_la_SOURCES = \
11 api.c \ 11 api.c
12 vmwgfx.c 12
13if HAVE_VMWGFX
14libkms_la_SOURCES += vmwgfx.c
15endif
13 16
14libkmsincludedir = ${includedir}/libkms 17libkmsincludedir = ${includedir}/libkms
15libkmsinclude_HEADERS = libkms.h 18libkmsinclude_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 @@
26 **************************************************************************/ 26 **************************************************************************/
27 27
28 28
29#include "config.h"
29#include <errno.h> 30#include <errno.h>
30#include <stdlib.h> 31#include <stdlib.h>
31#include <string.h> 32#include <string.h>
@@ -33,7 +34,11 @@
33 34
34int kms_create(int fd, struct kms_driver **out) 35int kms_create(int fd, struct kms_driver **out)
35{ 36{
37#ifdef HAVE_VMWGFX
36 return vmwgfx_create(fd, out); 38 return vmwgfx_create(fd, out);
39#else
40 return -ENOSYS;
41#endif
37} 42}
38 43
39int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) 44int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out)