AM_CONDITIONAL(HAVE_LIBKMS, [test "x$LIBKMS" = xyes])
AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" = xyes])
+if test "x$INTEL" = xyes; then
+ AC_DEFINE(HAVE_INTEL, 1, [Have intel support])
+fi
AM_CONDITIONAL(HAVE_VMWGFX, [test "x$VMWGFX" = xyes])
if test "x$VMWGFX" = xyes; then
libkms_la_SOURCES = \
internal.h \
linux.c \
- intel.c \
dumb.c \
api.c
libkms_la_SOURCES += vmwgfx.c
endif
+if HAVE_INTEL
+libkms_la_SOURCES += intel.c
+endif
+
if HAVE_NOUVEAU
libkms_la_SOURCES += nouveau.c
endif
if (ret)
return ret;
+#ifdef HAVE_INTEL
if (!strcmp(name, "intel"))
ret = intel_create(fd, out);
+ else
+#endif
#ifdef HAVE_VMWGFX
- else if (!strcmp(name, "vmwgfx"))
+ if (!strcmp(name, "vmwgfx"))
ret = vmwgfx_create(fd, out);
+ else
#endif
#ifdef HAVE_NOUVEAU
- else if (!strcmp(name, "nouveau"))
+ if (!strcmp(name, "nouveau"))
ret = nouveau_create(fd, out);
+ else
#endif
#ifdef HAVE_RADEON
- else if (!strcmp(name, "radeon"))
+ if (!strcmp(name, "radeon"))
ret = radeon_create(fd, out);
+ else
#endif
#ifdef HAVE_EXYNOS
- else if (!strcmp(name, "exynos"))
+ if (!strcmp(name, "exynos"))
ret = exynos_create(fd, out);
-#endif
else
+#endif
ret = -ENOSYS;
free(name);