Add DRM driver abstraction

This adds an abstraction interface in src/drmmode_driver.h for the
driver-specific values (and in future functions) that we need. It
also adds documentation and build system support (--with-drmmode)
to choose your supported driver.

Initially, the dumb allocation flags and page flip events flags
are abstracted with support for pl111 and eynos.

A template implementation is also provided for ease of adding new
driver support.

Change-Id: I98890ddab6b907c3007b72a662ecd7ee6caa4402
diff --git a/configure.ac b/configure.ac
index d47f8ef..258de0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,15 @@
             [moduledir="$withval"],
             [moduledir="$libdir/xorg/modules"])
 
+AC_MSG_CHECKING([which DRM driver to use])
+AC_ARG_WITH(drmmode,
+            AC_HELP_STRING([--with-drmmode],
+                           [Which DRM driver to use (see README)]),
+            [drmmode=$withval],
+            AC_MSG_FAILURE([You must specify which DRM driver to build for - see README]))
+AC_MSG_RESULT([$drmmode])
+AC_SUBST(drmmode)
+
 # Checks for extensions
 XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
 XORG_DRIVER_CHECK_EXT(RENDER, renderproto)