Modify it to adjust Tizen IVI enviroment
[platform/upstream/kmscon.git] / configure.ac
index e0b93b8..eb3020f 100644 (file)
@@ -5,34 +5,65 @@
 
 AC_PREREQ(2.68)
 
-AC_INIT([kmscon], [4])
-AC_SUBST(PACKAGE_URL, [https://github.com/dvdhrm/kmscon])
-AC_CONFIG_SRCDIR([src/main.c])
+AC_INIT([kmscon],
+        [8],
+        [http://bugs.freedesktop.org/enter_bug.cgi?product=kmscon],
+        [kmscon],
+        [http://www.freedesktop.org/wiki/Software/kmscon])
+AC_CONFIG_SRCDIR([src/kmscon_main.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADER(config.h)
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
+AC_CANONICAL_SYSTEM
 
-AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-bzip2 no-dist-gzip tar-pax -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-xz no-dist-gzip tar-pax -Wall -Werror -Wno-portability])
 AM_SILENT_RULES([yes])
 
 #
 # Don't add a default "-g -O2" if CFLAGS wasn't specified. For debugging it is
 # often more convenient to have "-g -O0". You can still override it by
-# explicitely setting it on the command line.
+# explicitly setting it on the command line.
 #
 
 : ${CFLAGS=""}
 
-AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_CC
+AX_PROG_CC_FOR_BUILD
 AC_PROG_CC_C99
 AM_PROG_CC_C_O
-AM_PROG_AR
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+AC_PROG_SED
+AC_PROG_MKDIR_P
+AC_PROG_LN_S
+AC_PROG_GREP
+AC_PROG_AWK
 
 LT_PREREQ(2.2)
 LT_INIT
 
 #
+# Required pkg-config dependencies
+#
+
+PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon])
+AC_SUBST(XKBCOMMON_CFLAGS)
+AC_SUBST(XKBCOMMON_LIBS)
+
+PKG_CHECK_MODULES([TSM], [libtsm])
+AC_SUBST(TSM_CFLAGS)
+AC_SUBST(TSM_LIBS)
+
+PKG_CHECK_MODULES([UDEV], [libudev >= 172])
+AC_SUBST(UDEV_CFLAGS)
+AC_SUBST(UDEV_LIBS)
+
+PKG_CHECK_MODULES([DRM], [libdrm])
+AC_SUBST(DRM_CFLAGS)
+AC_SUBST(DRM_LIBS)
+
+#
 # pkg-config dependencies
 # This unconditionally checks for all dependencies even if they are disabled. We
 # later look whether all required depedencies are met and finish the
@@ -43,620 +74,715 @@ LT_INIT
 # ourself.
 #
 
-PKG_CHECK_MODULES([SYSTEMD], [libsystemd-login],
+PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon libsystemd-login],
                   [have_systemd=yes], [have_systemd=no])
-
-PKG_CHECK_MODULES([UDEV], [libudev],
-                  [have_udev=yes], [have_udev=no])
-
-PKG_CHECK_MODULES([DBUS], [dbus-1],
-                  [have_dbus=yes], [have_dbus=no])
-
-PKG_CHECK_MODULES([DRM], [libdrm],
-                  [have_drm=yes], [have_drm=no])
+AC_SUBST(SYSTEMD_CFLAGS)
+AC_SUBST(SYSTEMD_LIBS)
 
 PKG_CHECK_MODULES([GBM], [gbm],
                   [have_gbm=yes], [have_gbm=no])
+AC_SUBST(GBM_CFLAGS)
+AC_SUBST(GBM_LIBS)
 
 PKG_CHECK_MODULES([EGL], [egl],
                   [have_egl=yes], [have_egl=no])
+AC_SUBST(EGL_CFLAGS)
+AC_SUBST(EGL_LIBS)
 
 PKG_CHECK_MODULES([GLES2], [glesv2],
                   [have_gles2=yes], [have_gles2=no])
-
-PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon],
-                  [have_xkbcommon=yes], [have_xkbcommon=no])
-
-PKG_CHECK_MODULES([FREETYPE2], [freetype2 fontconfig],
-                  [have_freetype2=yes], [have_freetype2=no])
+AC_SUBST(GLES2_CFLAGS)
+AC_SUBST(GLES2_LIBS)
 
 PKG_CHECK_MODULES([PANGO], [pango pangoft2],
                   [have_pango=yes], [have_pango=no])
+AC_SUBST(PANGO_CFLAGS)
+AC_SUBST(PANGO_LIBS)
 
-PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server wayland-cursor],
-                  [have_wayland=yes], [have_wayland=no])
-
-#
-# Parse arguments for applications
-# Parse all command-line arguments that enable or disable build of applications.
-# This allows us to compute which dependencies we need.
-#
-
-AC_MSG_CHECKING([whether to compile eloop])
-AC_ARG_ENABLE([eloop],
-              [AS_HELP_STRING([--enable-eloop],
-                              [build eloop library])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to compile TSM])
-AC_ARG_ENABLE([tsm],
-              [AS_HELP_STRING([--enable-tsm],
-                              [build tsm library])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to compile uterm])
-AC_ARG_ENABLE([uterm],
-              [AS_HELP_STRING([--enable-uterm],
-                              [build uterm library])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to compile kmscon])
-AC_ARG_ENABLE([kmscon],
-              [AS_HELP_STRING([--disable-kmscon],
-                              [do not build kmscon])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to build wlterm])
-AC_ARG_ENABLE([wlterm],
-              [AS_HELP_STRING([--enable-wlterm],
-                              [build wlterm])])
-AC_MSG_RESULT([ok])
+PKG_CHECK_MODULES([PIXMAN], [pixman-1],
+                  [have_pixman=yes], [have_pixman=no])
+AC_SUBST(PIXMAN_CFLAGS)
+AC_SUBST(PIXMAN_LIBS)
 
 #
-# Parse depedency arguments
-# This parses all command-line arguments to check for which dependencies should
-# be used and how the applications should be built.
+# Parse arguments
+# This parses all arguments that are given via "--enable-XY" or "--with-XY" and
+# saves the results in local variables. This does not check dependencies or
+# similar but does only parse the arguments.
 #
 
-AC_MSG_CHECKING([whether to use systemd for multi-seat support])
-AC_ARG_ENABLE([systemd],
-              [AS_HELP_STRING([--enable-systemd],
-                              [enable multi-seat support with systemd])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use udev for device hotplug support])
-AC_ARG_ENABLE([udev],
-              [AS_HELP_STRING([--enable-udev],
-                              [enable device hotplug support with udev])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use dbus for IPC])
-AC_ARG_ENABLE([dbus],
-              [AS_HELP_STRING([--enable-dbus],
-                              [enable dbus IPC])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use uterm fbdev video backend])
-AC_ARG_ENABLE([fbdev],
-              [AS_HELP_STRING([--enable-fbdev],
-                              [enable uterm fbdev video backend])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use uterm drm video backend])
-AC_ARG_ENABLE([drm],
-              [AS_HELP_STRING([--enable-drm],
-                              [enable uterm drm video backend])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to provide OpenGLES2 support])
-AC_ARG_ENABLE([gles2],
-              [AS_HELP_STRING([--enable-gles2],
-                              [provide uterm OpenGLES2 support])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use xkbcommon keyboard backend])
-AC_ARG_ENABLE([xkbcommon],
-              [AS_HELP_STRING([--disable-xkbcommon],
-                              [disable xkbcommon keyboard backend])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use static unifont backend])
-AC_ARG_ENABLE([unifont],
-              [AS_HELP_STRING([--enable-unifont],
-                              [enable static unifont font backend (GPL)])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use static 8x16 font backend])
-AC_ARG_ENABLE([f8x16],
-              [AS_HELP_STRING([--disable-f8x16],
-                              [disable static 8x16 font backend])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use freetype2 font backend])
-AC_ARG_ENABLE([freetype2],
-              [AS_HELP_STRING([--disable-freetype2],
-                              [disable freetype2 font backend])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use pango font backend])
-AC_ARG_ENABLE([pango],
-              [AS_HELP_STRING([--disable-pango],
-                              [disable pango font backend])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use bblit rendering backend])
-AC_ARG_ENABLE([bblit],
-              [AS_HELP_STRING([--disable-bblit],
-                              [disable bblit rendering backend])])
-AC_MSG_RESULT([ok])
-
-AC_MSG_CHECKING([whether to use bbulk rendering backend])
-AC_ARG_ENABLE([bbulk],
-              [AS_HELP_STRING([--disable-bbulk],
-                              [disable bbulk rendering backend])])
-AC_MSG_RESULT([ok])
-
-#
-# Parse miscellaneous arguments
-# These don't belong into the categories above for several reason so they are
-# handled specially.
-# They configure compiler options and similar.
-#
+# all
+AC_MSG_CHECKING([whether user wants all])
+AC_ARG_ENABLE([all],
+              [AS_HELP_STRING([--enable-all],
+                              [enable all options (used for debugging)])])
+if test "x$enable_all" = "x" ; then
+        enable_all="no"
+fi
+AC_MSG_RESULT([$enable_all])
 
+# debug
 AC_MSG_CHECKING([whether to build with debugging on])
 AC_ARG_ENABLE([debug],
               [AS_HELP_STRING([--enable-debug],
                               [whether to build with debugging on])])
-AC_MSG_RESULT([ok])
+if test "x$enable_all" = "xyes" ; then
+        enable_debug="yes"
+elif test "x$enable_debug" = "x" ; then
+        enable_debug="yes (default)"
+fi
+AC_MSG_RESULT([$enable_debug])
 
+# optimizations
 AC_MSG_CHECKING([whether to disable code optimizations])
 AC_ARG_ENABLE([optimizations],
               [AS_HELP_STRING([--disable-optimizations],
                               [whether to disable code optimizations])])
-AC_MSG_RESULT([ok])
-
-#
-# Debug mode and code optimizations
-# In debug mode we compile with -g and enable several debug-messages and flags.
-# With optimizations (default), we add -O2 to compile-flags.
-#
-
-debug_enabled=no
-if test x$enable_debug = xyes ; then
-        debug_enabled=yes
+if test "x$enable_all" = "xyes" ; then
+        enable_optimizations="yes"
+elif test "x$enable_optimizations" = "x" ; then
+        enable_optimizations="yes (default)"
 fi
+AC_MSG_RESULT([$enable_optimizations])
 
-optimizations_enabled=no
-if test ! x$enable_optimizations = xno ; then
-        optimizations_enabled=yes
-fi
-
-if test x$debug_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_DEBUG], [1],
-                  [Enable debug mode])
-else
-        AC_DEFINE([NDEBUG], [1], [No Debug])
+# multi-seat
+AC_MSG_CHECKING([whether user wants systemd for multi-seat support])
+AC_ARG_ENABLE([multi-seat],
+              [AS_HELP_STRING([--enable-multi-seat],
+                              [enable multi-seat support with systemd])])
+if test "x$enable_all" = "xyes" ; then
+        enable_multi_seat="yes"
+elif test "x$enable_multi_seat" = "x" ; then
+        enable_multi_seat="yes (default)"
+fi
+AC_MSG_RESULT([$enable_multi_seat])
+
+# video backends
+AC_MSG_CHECKING([which video backends the user wants])
+AC_ARG_WITH([video],
+            [AS_HELP_STRING([--with-video],
+              [specify list of optional video backends])],
+            [],
+            [with_video="default"])
+enable_video_fbdev="no"
+enable_video_drm2d="no"
+enable_video_drm3d="no"
+if test "x$enable_all" = "xyes" ; then
+        enable_video_fbdev="yes"
+        enable_video_drm2d="yes"
+        enable_video_drm3d="yes"
+        with_video="fbdev,drm2d,drm3d (all)"
+elif test "x$with_video" = "xdefault" ; then
+        enable_video_fbdev="yes (default)"
+        enable_video_drm2d="yes (default)"
+        enable_video_drm3d="yes (default)"
+        with_video="fbdev,drm2d,drm3d (default)"
+elif test ! "x$with_video" = "x" ; then
+        SAVEIFS="$IFS"
+        IFS=","
+        for i in $with_video ; do
+                if test "x$i" = "xfbdev" ; then
+                        enable_video_fbdev="yes"
+                elif test "x$i" = "xdrm2d" ; then
+                        enable_video_drm2d="yes"
+                elif test "x$i" = "xdrm3d" ; then
+                        enable_video_drm3d="yes"
+                else
+                        IFS="$SAVEIFS"
+                        AC_ERROR([Invalid video backend $i])
+                fi
+        done
+        IFS="$SAVEIFS"
+fi
+AC_MSG_RESULT([$with_video])
+
+# renderers
+AC_MSG_CHECKING([which render backends the user wants])
+AC_ARG_WITH([renderers],
+            [AS_HELP_STRING([--with-renderers],
+              [specify list of optional render backends])],
+            [],
+            [with_renderers="default"])
+enable_renderer_bbulk="no"
+enable_renderer_gltex="no"
+enable_renderer_pixman="no"
+if test "x$enable_all" = "xyes" ; then
+        enable_renderer_bbulk="yes"
+        enable_renderer_gltex="yes"
+        enable_renderer_pixman="yes"
+        with_renderers="bbulk,gltex,pixman (all)"
+elif test "x$with_renderers" = "xdefault" ; then
+        enable_renderer_bbulk="yes (default)"
+        enable_renderer_gltex="yes (default)"
+        enable_renderer_pixman="no (default)"
+        with_renderers="bbulk,gltex (default)"
+elif test ! "x$with_renderers" = "x" ; then
+        SAVEIFS="$IFS"
+        IFS=","
+        for i in $with_renderers ; do
+                if test "x$i" = "xbbulk" ; then
+                        enable_renderer_bbulk="yes"
+                elif test "x$i" = "xgltex" ; then
+                        enable_renderer_gltex="yes"
+                elif test "x$i" = "xpixman" ; then
+                        enable_renderer_pixman="yes"
+                else
+                        IFS="$SAVEIFS"
+                        AC_ERROR([Unknown renderer $i])
+                fi
+        done
+        IFS="$SAVEIFS"
+fi
+AC_MSG_RESULT([$with_renderers])
+
+# font backends
+AC_MSG_CHECKING([which font backends the user wants])
+AC_ARG_WITH([fonts],
+            [AS_HELP_STRING([--with-fonts],
+              [specify list of optional font backends])],
+            [],
+            [with_fonts="default"])
+enable_font_unifont="no"
+enable_font_pango="no"
+if test "x$enable_all" = "xyes" ; then
+        enable_font_unifont="yes"
+        enable_font_pango="yes"
+        with_fonts="unifont,pango (all)"
+elif test "x$with_fonts" = "xdefault" ; then
+        enable_font_unifont="yes (default)"
+        enable_font_pango="yes (default)"
+        with_fonts="unifont,pango (default)"
+elif test ! "x$with_fonts" = "x" ; then
+        SAVEIFS="$IFS"
+        IFS=","
+        for i in $with_fonts ; do
+                if test "x$i" = "xunifont" ; then
+                        enable_font_unifont="yes"
+                elif test "x$i" = "xpango" ; then
+                        enable_font_pango="yes"
+                else
+                        IFS="$SAVEIFS"
+                        AC_ERROR([Unknown font backend $i])
+                fi
+        done
+        IFS="$SAVEIFS"
+fi
+AC_MSG_RESULT([$with_fonts])
+
+# kmscon sessions
+AC_MSG_CHECKING([which sessions the user wants])
+AC_ARG_WITH([sessions],
+            [AS_HELP_STRING([--with-sessions],
+              [specify list of optional sessions])],
+            [],
+            [with_sessions="default"])
+enable_session_dummy="no"
+enable_session_terminal="no"
+if test "x$enable_all" = "xyes" ; then
+        enable_session_dummy="yes"
+        enable_session_terminal="yes"
+        with_sessions="dummy,terminal (all)"
+elif test "x$with_sessions" = "xdefault" ; then
+        enable_session_dummy="yes (default)"
+        enable_session_terminal="yes (default)"
+        with_sessions="dummy,terminal (default)"
+elif test ! "x$with_sessions" = "x" ; then
+        SAVEIFS="$IFS"
+        IFS=","
+        for i in $with_sessions ; do
+                if test "x$i" = "xdummy" ; then
+                        enable_session_dummy="yes"
+                elif test "x$i" = "xterminal" ; then
+                        enable_session_terminal="yes"
+                else
+                        IFS="$SAVEIFS"
+                        AC_ERROR([Unknown session type $i])
+                fi
+        done
+        IFS="$SAVEIFS"
 fi
+AC_MSG_RESULT([$with_sessions])
 
-AM_CONDITIONAL([BUILD_ENABLE_DEBUG],
-               [test x$debug_enabled = xyes])
-AM_CONDITIONAL([BUILD_ENABLE_OPTIMIZATIONS],
-               [test x$optimizations_enabled = xyes])
-
-# check for _Static_assert
-AC_MSG_CHECKING([whether _Static_assert() is supported])
-AC_LANG([C])
-have_static_assert=yes
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[_Static_assert(1, "What?");]])],
-                  [AC_DEFINE([BUILD_HAVE_STATIC_ASSERT],
-                             [1],
-                             [Define to 1 if _Static_assert() is supported])],
-                  [have_static_assert=no])
-AC_MSG_RESULT([$have_static_assert])
-
-#
-# Main applications
-# This checks which applications to build so we can optionally disable unused
-# dependencies below.
-#
-# Dependency Calculations
-# The first thing we do is checking which applications to build. Then we
-# forcibly enable all libraries that are needed by these and then we forcibly
-# enable all other source-code dependecies.
 #
-# The "enable_XY" flag is user input that is set to "yes" if they enabled it
-# explicitly, "no" if they disabled it explicitly or "" (empty) if they did
-# not specify it explicitly. In the latter case we enable it if all dependencies
-# are met, otherwise, we disable it. This does not work for applications,
-# though. If an application is not specified explicitly by the user, then we
-# force the default value.
-# An application also forces all _hard_ dependencies to "yes" and so fails if
-# they cannot be met.
+# Check what can be built
+# This checks each configuration option and tests whether all dependencies are
+# met. This is done from bottom up to ensure the right order.
 #
 
-kmscon_enabled=no
-if test ! x$enable_kmscon = xno ; then
-        kmscon_enabled=yes
-        enable_eloop=yes
-        enable_tsm=yes
-        enable_uterm=yes
+# debug
+debug_avail=no
+debug_missing=""
+if test ! "x$enable_debug" = "xno" ; then
+        debug_avail=yes
+else
+        debug_missing="enable-debug"
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_KMSCON],
-               [test x$kmscon_enabled = xyes])
-
-wlterm_enabled=no
-if test x$enable_wlterm = xyes ; then
-        wlterm_enabled=yes
-        enable_eloop=yes
-        enable_tsm=yes
-        enable_wayland=yes
-        enable_xkbcommon=yes
+# optimizations
+optimizations_avail=no
+optimizations_missing=""
+if test ! "x$enable_optimizations" = "xno" ; then
+        optimizations_avail=yes
+else
+        optimizations_missing="enable-optimizations"
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_WLTERM],
-               [test x$wlterm_enabled = xyes])
-
-uterm_enabled=no
-if test x$enable_uterm = xyes ; then
-        uterm_enabled=yes
-        eloop_enabled=yes
+# video fbdev
+video_fbdev_avail=no
+video_fbdev_missing=""
+if test ! "x$enable_video_fbdev" = "xno" ; then
+        # TODO: check for kernel headers
+        video_fbdev_avail=yes
+else
+        video_fbdev_missing="enable-video-fbdev"
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_UTERM],
-               [test x$uterm_enabled = xyes])
-
-eloop_enabled=no
-if test x$enable_eloop = xyes ; then
-        eloop_enabled=yes
+# video drm2d
+video_drm2d_avail=no
+video_drm2d_missing=""
+if test ! "x$enable_video_drm2d" = "xno" ; then
+        video_drm2d_avail=yes
+else
+        video_drm2d_missing="enable-video-drm2d"
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_ELOOP],
-               [test x$eloop_enabled = xyes])
+# video drm3d
+video_drm3d_avail=no
+video_drm3d_missing=""
+if test ! "x$enable_video_drm3d" = "xno" ; then
+        video_drm3d_avail=yes
+        if test "x$have_gbm" = "xno" ; then
+                video_drm3d_avail=no
+                video_drm3d_missing="libgbm,$video_drm3d_missing"
+        fi
+        if test "x$have_egl" = "xno" ; then
+                video_drm3d_avail=no
+                video_drm3d_missing="libegl,$video_drm3d_missing"
+        fi
+        if test "x$have_gles2" = "xno" ; then
+                video_drm3d_avail=no
+                video_drm3d_missing="libgles2,$video_drm3d_missing"
+        fi
 
-tsm_enabled=no
-if test x$enable_tsm = xyes ; then
-        tsm_enabled=yes
+        if test "x$video_drm3d_avail" = "xno" ; then
+                if test "x$enable_video_drm3d" = "xyes" ; then
+                        AC_ERROR([missing for drm3d video backend: $video_drm3d_missing])
+                fi
+        fi
+else
+        video_drm3d_missing="enable-video-drm3d"
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_TSM],
-               [test x$tsm_enabled = xyes])
-
-#
-# Systemd dependency
-# We can optionally use systemd for multi-seat support. If systemd is not
-# available or the system was not started with systemd, we simply fall back to
-# single-seat mode.
-#
+# multi-seat
+multi_seat_avail=no
+multi_seat_missing=""
+if test ! "x$enable_multi_seat" = "xno" ; then
+        multi_seat_avail=yes
+        if test "x$have_systemd" = "xno" ; then
+                multi_seat_avail=no
+                multi_seat_missing="libsystemd"
+        fi
 
-systemd_enabled=no
-if test ! x$enable_systemd = xno ; then
-        if test x$have_systemd = xyes ; then
-                systemd_enabled=yes
-        elif test x$enable_systemd = xyes ; then
-                AC_ERROR([systemd libraries not found for multi-seat support])
+        if test "x$multi_seat_avail" = "xno" ; then
+                if test "x$enable_multi_seat" = "xyes" ; then
+                        AC_ERROR([missing for multi-seat support: $multi_seat_missing])
+                fi
         fi
+else
+        multi_seat_missing="enable-multi-seat"
 fi
 
-if test x$systemd_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_SYSTEMD], [1],
-                  [Use systemd for multi-seat support])
+# renderer bbulk
+renderer_bbulk_avail=no
+renderer_bbulk_missing=""
+if test ! "x$enable_renderer_bbulk" = "xno" ; then
+        renderer_bbulk_avail=yes
 else
-        SYSTEMD_CFLAGS=""
-        SYSTEMD_LIBS=""
+        renderer_bbulk_missing="enable-renderer-bbulk"
 fi
 
-#
-# Udev dependency
-# For hotplugging support we need udev to notify us about system events. If udev
-# is not available, we simply fall back to static mode. Periodic scanning is
-# also supported.
-#
-
-udev_enabled=no
-if test ! x$enable_udev = xno ; then
-        if test x$have_udev = xyes ; then
-                udev_enabled=yes
-        elif test x$enable_udev = xyes ; then
-                AC_ERROR([udev libraries not found for device hotplug support])
+# renderer gltex
+renderer_gltex_avail=no
+renderer_gltex_missing=""
+if test ! "x$enable_renderer_gltex" = "xno" ; then
+        renderer_gltex_avail=yes
+        if test "x$have_gles2" = "xno" ; then
+                renderer_gltex_avail=no
+                renderer_gltex_missing="libgles2"
         fi
-fi
 
-if test x$udev_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_UDEV], [1],
-                  [Use udev for device hotplug support])
+        if test "x$renderer_gltex_avail" = "xno" ; then
+                if test "x$enable_renderer_gltex" = "xyes" ; then
+                        AC_ERROR([missing for renderer-gltex: $renderer_gltex_missing])
+                fi
+        fi
 else
-        UDEV_CFLAGS=""
-        UDEV_LIBS=""
+        renderer_gltex_missing="enable-renderer-gltex"
 fi
 
-#
-# DBus dependency
-# For IPC mechanisms we use DBus. Especially multi-seat enabled multi-session
-# capable applications need DBus to manage application and terminal switching.
-#
+# renderer pixman
+renderer_pixman_avail=no
+renderer_pixman_missing=""
+if test ! "x$enable_renderer_pixman" = "xno" ; then
+        renderer_pixman_avail=yes
+        if test "x$have_pixman" = "xno" ; then
+                renderer_pixman_avail=no
+                renderer_pixman_missing="pixman"
+        fi
 
-dbus_enabled=no
-if test x$enable_dbus = xyes ; then
-        if test x$have_dbus = xyes ; then
-                dbus_enabled=yes
-        elif test x$enable_dbus = xyes; then
-                AC_ERROR([dbus libraries not found])
+        if test "x$renderer_pixman_avail" = "xno" ; then
+                if test "x$enable_renderer_pixman" = "xyes" ; then
+                        AC_ERROR([missing for renderer-pixman: $renderer_pixman_missing])
+                fi
         fi
+else
+        renderer_pixman_missing="enable-renderer-pixman"
 fi
 
-if test x$dbus_enabled = xyes; then
-        AC_DEFINE([BUILD_ENABLE_DBUS], [1],
-                  [Use dbus for IPC])
+# font unifont
+font_unifont_avail=no
+font_unifont_missing=""
+if test ! "x$enable_font_unifont" = "xno" ; then
+        font_unifont_avail=yes
 else
-        DBUS_CFLAGS=""
-        DBUS_LIBS=""
+        font_unifont_missing="enable-font-unifont"
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_DBUS], [test x$dbus_enabled = xyes])
-
-#
-# Uterm fbdev backend
-# This checks whether the fbdev backend was requested and enables it then. There
-# are no special dependencies for it except the kernel headers.
-# TODO: check for kernel headers here
-#
+# font pango
+font_pango_avail=no
+font_pango_missing=""
+if test ! "x$enable_font_pango" = "xno" ; then
+        font_pango_avail=yes
+        if test "x$have_pango" = "xno" ; then
+                font_pango_avail=no
+                font_pango_missing="libpango"
+        fi
 
-fbdev_enabled=no
-if test ! x$enable_fbdev = xno ; then
-        fbdev_enabled=yes
+        if test "x$font_pango_avail" = "xno" ; then
+                if test "x$enable_font_pango" = "xyes" ; then
+                        AC_ERROR([missing for font-pango: $font_pango_missing])
+                fi
+        fi
+else
+        font_pango_missing="enable-font-pango"
 fi
 
-if test x$fbdev_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_FBDEV], [1],
-                  [Use uterm fbdev video backend])
+# session dummy
+session_dummy_avail=no
+session_dummy_missing=""
+if test ! "x$enable_session_dummy" = "xno" ; then
+        session_dummy_avail=yes
+else
+        session_dummy_missing="enable-session-dummy"
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_FBDEV], [test x$fbdev_enabled = xyes])
+# session terminal
+session_terminal_avail=no
+session_terminal_missing=""
+if test ! "x$enable_session_terminal" = "xno" ; then
+        session_terminal_avail=yes
+else
+        session_terminal_missing="enable-session-terminal"
+fi
 
 #
-# Uterm drm backend
-# This checks whether libdrm is available and some combination of libgbm, egl
-# and gl or glesv2. If it is not available, then the drm backend is simply not
-# built.
+# Enable all required modules
+# We now know which modules can be built by checking the *_avail variables set
+# above. We now only have to disable all modules that are disabled by default
+# and the user didn't force-enable them and no other module that is enabled
+# needs them. This is done top-down of course.
 #
 
-dumb_enabled=no
-drm_enabled=no
-gles2_enabled=no
-if test ! x$enable_drm = xno ; then
-        if test x$have_drm = xyes ; then
-                dumb_enabled=yes
+# session terminal
+session_terminal_enabled=no
+if test "x$session_terminal_avail" = "xyes" ; then
+        if test "x${enable_session_terminal% *}" = "xyes" ; then
+                session_terminal_enabled=yes
         fi
+fi
 
-        if test ! x$enable_gles2 = xno ; then
-                if test x$have_drm = xyes -a x$have_gbm = xyes -a x$have_egl = xyes ; then
-                        if test x$have_gles2 = xyes ; then
-                                drm_enabled=yes
-                                gles2_enabled=yes
-                        fi
-                fi
+# session dummy
+session_dummy_enabled=no
+if test "x$session_dummy_avail" = "xyes" ; then
+        if test "x${enable_session_dummy% *}" = "xyes" ; then
+                session_dummy_enabled=yes
         fi
+fi
 
-        if test x$enable_drm = xyes -a x$dumb_enabled = xno ; then
-                AC_ERROR([drm library not found for uterm dumb drm backend])
+# font pango
+font_pango_enabled=no
+if test "x$font_pango_avail" = "xyes" ; then
+        if test "x${enable_font_pango% *}" = "xyes" ; then
+                font_pango_enabled=yes
         fi
+fi
 
-        if test x$enable_gles2 = xyes -a x$drm_enabled = xno ; then
-                AC_ERROR([drm, gbm, egl, gl or gles2 libraries not found for uterm drm backend])
+# font unifont
+font_unifont_enabled=no
+if test "x$font_unifont_avail" = "xyes" ; then
+        if test "x${enable_font_unifont% *}" = "xyes" ; then
+                font_unifont_enabled=yes
         fi
 fi
 
-if test x$dumb_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_DUMB], [1],
-                  [Use uterm dumb drm video backend])
+# renderer gltex
+renderer_gltex_enabled=no
+if test "x$renderer_gltex_avail" = "xyes" ; then
+        if test "x${enable_renderer_gltex% *}" = "xyes" ; then
+                renderer_gltex_enabled=yes
+        fi
+fi
 
-        if test x$drm_enabled = xyes ; then
-                AC_DEFINE([BUILD_ENABLE_DRM], [1],
-                          [Use uterm DRM video backend])
-        else
-                GBM_CFLAGS=""
-                GBM_LIBS=""
-                EGL_CFLAGS=""
-                EGL_LIBS=""
+# renderer pixman
+renderer_pixman_enabled=no
+if test "x$renderer_pixman_avail" = "xyes" ; then
+        if test "x${enable_renderer_pixman% *}" = "xyes" ; then
+                renderer_pixman_enabled=yes
         fi
-else
-        DRM_CFLAGS=""
-        DRM_LIBS=""
-        GBM_CFLAGS=""
-        GBM_LIBS=""
-        EGL_CFLAGS=""
-        EGL_LIBS=""
 fi
 
-if test x$gles2_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_GLES2], [1],
-                  [Use OpenGLESv2 as drawing backend])
-else
-        GLES2_CFLAGS=""
-        GLES2_LIBS=""
+# renderer bbulk
+renderer_bbulk_enabled=no
+if test "x$renderer_bbulk_avail" = "xyes" ; then
+        if test "x${enable_renderer_bbulk% *}" = "xyes" ; then
+                renderer_bbulk_enabled=yes
+        fi
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_DUMB], [test x$dumb_enabled = xyes])
-AM_CONDITIONAL([BUILD_ENABLE_DRM], [test x$drm_enabled = xyes])
-AM_CONDITIONAL([BUILD_ENABLE_GLES2], [test x$gles2_enabled = xyes])
+# multi-seat
+multi_seat_enabled=no
+if test "x$multi_seat_avail" = "xyes" ; then
+        if test "x${enable_multi_seat% *}" = "xyes" ; then
+                multi_seat_enabled=yes
+        fi
+fi
 
-# check for gbm_bo_get_stride() function, otherwise gbm_bo_get_pitch() is used
-if test x$have_gbm = xyes ; then
-        save_CFLAGS="$CFLAGS"
-        save_LIBS="$LIBS"
-        CFLAGS="$CFLAGS $GBM_CFLAGS $DRM_CFLAGS"
-        LIBS="$LIBS $GBM_LIBS $DRM_LIBS"
-        AC_CHECK_LIB([gbm],
-                     [gbm_bo_get_stride],
-                     [AC_DEFINE([BUILD_HAVE_GBM_BO_GET_STRIDE],
-                                [1],
-                                [Define to 1 if your libgbm provides gbm_bo_get_stride])])
-        CFLAGS="$save_CFLAGS"
-        LIBS="$save_LIBS"
+# video drm3d
+video_drm3d_enabled=no
+if test "x$video_drm3d_avail" = "xyes" ; then
+        if test "x${enable_video_drm3d% *}" = "xyes" ; then
+                video_drm3d_enabled=yes
+        fi
 fi
 
-#
-# xkbcommon keyboard backend
-# This checks for the xkbcommon library for keyboard handling in uterm. If it is
-# not available, we use a dumb-keyboard backend as fall-back.
-#
+# video drm2d
+video_drm2d_enabled=no
+if test "x$video_drm2d_avail" = "xyes" ; then
+        if test "x${enable_video_drm2d% *}" = "xyes" ; then
+                video_drm2d_enabled=yes
+        fi
+fi
 
-xkbcommon_enabled=no
-if test ! x$enable_xkbcommon = xno ; then
-        if test x$have_xkbcommon = xyes ; then
-                xkbcommon_enabled=yes
-        elif test x$enable_xkbcommon = xyes ; then
-                AC_ERROR([xkbcommon not found for keyboard backend])
+# video fbdev
+video_fbdev_enabled=no
+if test "x$video_fbdev_avail" = "xyes" ; then
+        if test "x${enable_video_fbdev% *}" = "xyes" ; then
+                video_fbdev_enabled=yes
         fi
 fi
 
-if test x$xkbcommon_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_XKBCOMMON], [1],
-                  [Use xkbcommon as input keyboard handling backend])
-else
-        XKBCOMMON_CFLAGS=""
-        XKBCOMMON_LIBS=""
+# optimizations
+optimizations_enabled=no
+if test "x$optimizations_avail" = "xyes" ; then
+        if test "x${enable_optimizations% *}" = "xyes" ; then
+                optimizations_enabled=yes
+        fi
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_XKBCOMMON], [test x$xkbcommon_enabled = xyes])
+# debug
+debug_enabled=no
+if test "x$debug_avail" = "xyes" ; then
+        if test "x${enable_debug% *}" = "xyes" ; then
+                debug_enabled=yes
+        fi
+fi
 
 #
-# Font backends
-# This checks for the unifont, 8x16, freetype2 and pango font backends and
-# enables them if requested and available.
-#
-# Please note that the Unifont-data is GPL'ed and we compile this statically
-# into our application. I do not consider this a "derivative" but a lawyer may
-# disagree. So please make sure you enable this only if you use the GPL as
-# license for kmscon.
+# Module Configuration
+# We have now done all dependency checking and default-value validation and we
+# now know which modules are enabled via the *_enabled variables.
+# Everything below is related to the configuration of each module and setting
+# the correct flags for the build process.
 #
 
-unifont_enabled=no
-if test x$enable_unifont = xyes ; then
-        unifont_enabled=yes
+# debug
+if test "x$debug_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_DEBUG], [1], [Enable debug mode])
+else
+        AC_DEFINE([NDEBUG], [1], [No Debug])
 fi
 
-if test x$unifont_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_UNIFONT], [1],
-                  [Use static unifont backend])
-fi
+AM_CONDITIONAL([BUILD_ENABLE_DEBUG],
+               [test "x$debug_enabled" = "xyes"])
 
-AM_CONDITIONAL([BUILD_ENABLE_UNIFONT], [test x$unifont_enabled = xyes])
+# optimizations
+AM_CONDITIONAL([BUILD_ENABLE_OPTIMIZATIONS],
+               [test "x$optimizations_enabled" = "xyes"])
 
-f8x16_enabled=no
-if test ! x$enable_f8x16 = xno ; then
-        f8x16_enabled=yes
+# video fbdev
+if test "x$video_fbdev_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_VIDEO_FBDEV], [1],
+                  [Build uterm fbdev video backend])
 fi
 
-if test x$f8x16_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_8X16], [1],
-                  [Use static 8x16 font backend])
+AM_CONDITIONAL([BUILD_ENABLE_VIDEO_FBDEV],
+               [test "x$video_fbdev_enabled" = "xyes"])
+
+# video drm2d
+if test "x$video_drm2d_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_VIDEO_DRM2D], [1],
+                  [Build uterm drm2d drm3d video backend])
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_8X16], [test x$f8x16_enabled = xyes])
+AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM2D],
+               [test "x$video_drm2d_enabled" = "xyes"])
 
-freetype2_enabled=no
-if test ! x$enable_freetype2 = xno ; then
-        if test x$have_freetype2 = xyes ; then
-                freetype2_enabled=yes
-        elif test x$enable_freetype2 = xyes ; then
-                AC_ERROR([freetype2/fontconfig not found for freetype2 backend])
-        fi
+# video drm3d
+if test "x$video_drm3d_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_VIDEO_DRM3D], [1],
+                  [Build uterm drm3d video backend])
 fi
 
-if test x$freetype2_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_FREETYPE2], [1],
-                  [Use freetype2 as font backend])
-else
-        FREETYPE2_CFLAGS=""
-        FREETYPE2_LIBS=""
+AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM3D],
+               [test "x$video_drm3d_enabled" = "xyes"])
+
+# multi-seat
+if test "x$multi_seat_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_MULTI_SEAT], [1],
+                  [Use systemd for multi-seat support])
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_FREETYPE2], [test x$freetype2_enabled = xyes])
+AM_CONDITIONAL([BUILD_ENABLE_MULTI_SEAT],
+               [test "x$multi_seat_enabled" = "xyes"])
 
-pango_enabled=no
-if test ! x$enable_pango = xno ; then
-        if test x$have_pango = xyes ; then
-                pango_enabled=yes
-        elif test x$enable_pango = xyes ; then
-                AC_ERROR([pango not found for pango font backend])
-        fi
+# renderer bbulk
+if test "x$renderer_bbulk_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_RENDERER_BBULK], [1],
+                  [Build bbulk rendering backend])
 fi
 
-if test x$pango_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_PANGO], [1],
-                  [Use pango as font backend])
-else
-        PANGO_CFLAGS=""
-        PANGO_LIBS=""
-fi
+AM_CONDITIONAL([BUILD_ENABLE_RENDERER_BBULK],
+               [test "x$renderer_bbulk_enabled" = "xyes"])
 
-AM_CONDITIONAL([BUILD_ENABLE_PANGO], [test x$pango_enabled = xyes])
+# renderer gltex
+if test "x$renderer_gltex_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_RENDERER_GLTEX], [1],
+                  [Build gltex rendering backend])
+fi
 
-#
-# BBlit Rendering backend
-#
+AM_CONDITIONAL([BUILD_ENABLE_RENDERER_GLTEX],
+               [test "x$renderer_gltex_enabled" = "xyes"])
 
-bblit_enabled=no
-if test ! x$enable_bblit = xno ; then
-        bblit_enabled=yes
+# renderer pixman
+if test "x$renderer_pixman_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_RENDERER_PIXMAN], [1],
+                  [Build pixman rendering backend])
 fi
 
-if test x$bblit_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_BBLIT], [1],
-                  [Use bblit rendering backend])
+AM_CONDITIONAL([BUILD_ENABLE_RENDERER_PIXMAN],
+               [test "x$renderer_pixman_enabled" = "xyes"])
+
+# font unifont
+if test "x$font_unifont_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_FONT_UNIFONT], [1],
+                  [Build static unifont backend])
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_BBLIT], [test x$bblit_enabled = xyes])
+AM_CONDITIONAL([BUILD_ENABLE_FONT_UNIFONT],
+               [test "x$font_unifont_enabled" = "xyes"])
 
-#
-# BBulk Rendering backend
-#
+# font pango
+if test "x$font_pango_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_FONT_PANGO], [1],
+                  [Build pango font backend])
+fi
+
+AM_CONDITIONAL([BUILD_ENABLE_FONT_PANGO],
+               [test "x$font_pango_enabled" = "xyes"])
 
-bbulk_enabled=no
-if test ! x$enable_bbulk = xno ; then
-        bbulk_enabled=yes
+# session dummy
+if test "x$session_dummy_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_SESSION_DUMMY], [1],
+                  [Build dummy session])
 fi
 
-if test x$bbulk_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_BBULK], [1],
-                  [Use bbulk rendering backend])
+AM_CONDITIONAL([BUILD_ENABLE_SESSION_DUMMY],
+               [test "x$session_dummy_enabled" = "xyes"])
+
+# session terminal
+if test "x$session_terminal_enabled" = "xyes" ; then
+        AC_DEFINE([BUILD_ENABLE_SESSION_TERMINAL], [1],
+                  [Build terminal session])
 fi
 
-AM_CONDITIONAL([BUILD_ENABLE_BBULK], [test x$bbulk_enabled = xyes])
+AM_CONDITIONAL([BUILD_ENABLE_SESSION_TERMINAL],
+               [test "x$session_terminal_enabled" = "xyes"])
 
 #
-# OpenGL Texture rendering backend
-# This is not really an option but automatically enabled if OpenGLES2 support
-# was selected.
+# Miscellaneous Checks
+# All checks below are independent of module checking or depend on the results
+# of it. They do not have any dependencies themselves so they are not part of the
+# module infrastructure.
 #
 
-gltex_enabled=no
-if test x$gles2_enabled = xyes ; then
-        gltex_enabled=yes
+# check for _Static_assert
+AC_MSG_CHECKING([whether _Static_assert() is supported])
+AC_LANG([C])
+have_static_assert=yes
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[_Static_assert(1, "What?");]])],
+                  [AC_DEFINE([BUILD_HAVE_STATIC_ASSERT],
+                             [1],
+                             [Define to 1 if _Static_assert() is supported])],
+                  [have_static_assert=no])
+AC_MSG_RESULT([$have_static_assert])
+
+# check for gbm_bo_get_pitch() function, otherwise gbm_bo_get_stride() is used
+if test x$have_gbm = xyes ; then
+        save_CFLAGS="$CFLAGS"
+        save_LIBS="$LIBS"
+        save_LDFLAGS="$LDFLAGS"
+        CFLAGS="$DRM_CFLAGS $GBM_CFLAGS"
+        LIBS="$DRM_LIBS $GBM_LIBS"
+        LDFLAGS=""
+        AC_CHECK_LIB([gbm],
+                     [gbm_bo_get_pitch],
+                     [AC_DEFINE([BUILD_HAVE_GBM_BO_GET_PITCH],
+                                [1],
+                                [Define to 1 if your libgbm provides gbm_bo_get_pitch])])
+        CFLAGS="$save_CFLAGS"
+        LIBS="$save_LIBS"
+        LDFLAGS="$save_LDFLAGS"
+fi
+
+# check for xsltproc
+AC_ARG_VAR([XSLTPROC], [xsltproc program])
+AC_PATH_PROG(XSLTPROC, xsltproc)
+AM_CONDITIONAL([BUILD_HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
+
+# check for offline man-pages stylesheet
+AC_MSG_CHECKING([for docbook manpages stylesheet])
+BUILD_MANPAGES_STYLESHEET="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
+AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
+                            AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$BUILD_MANPAGES_STYLESHEET" > /dev/null 2>&1`],
+                                  [BUILD_HAVE_MANPAGES_STYLESHEET=yes]))
+if test "x$BUILD_HAVE_MANPAGES_STYLESHEET" = "xyes"; then
+        AM_CONDITIONAL([BUILD_HAVE_MANPAGES_STYLESHEET], true)
+        AC_SUBST(BUILD_MANPAGES_STYLESHEET)
+        AC_MSG_RESULT([yes])
+else
+        AM_CONDITIONAL([BUILD_HAVE_MANPAGES_STYLESHEET], false)
+        AC_MSG_RESULT([no])
 fi
 
-#
-# Wayland
-# This checks whether the wayland libraries are needed and available.
-#
+# gles2 helpers
+AM_CONDITIONAL([BUILD_HAVE_GLES2], [test "x$have_gles2" = "xyes"])
 
-wayland_enabled=no
-if test ! x$enable_wayland = xno ; then
-        if test x$have_wayland = xyes ; then
-                wayland_enabled=yes
-        elif test x$enable_wayland = xyes ; then
-                AC_ERROR([wayland libraries not found])
-        fi
-fi
+# check for mandatory objcopy program
+AC_ARG_VAR([OBJCOPY], [objcopy program])
+AC_CHECK_TOOL([OBJCOPY], [objcopy], "")
 
-if test x$wayland_enabled = xyes ; then
-        AC_DEFINE([BUILD_ENABLE_WAYLAND], [1],
-                  [Enable wayland backends])
-else
-        WAYLAND_CFLAGS=""
-        WAYLAND_LIBS=""
+if test "x$OBJCOPY" = "x" ; then
+        AC_ERROR([Cannot find "objcopy" program])
 fi
 
 #
@@ -665,30 +791,7 @@ fi
 # makefiles.
 #
 
-AC_SUBST(SYSTEMD_CFLAGS)
-AC_SUBST(SYSTEMD_LIBS)
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-AC_SUBST(DRM_CFLAGS)
-AC_SUBST(DRM_LIBS)
-AC_SUBST(EGL_CFLAGS)
-AC_SUBST(EGL_LIBS)
-AC_SUBST(GBM_CFLAGS)
-AC_SUBST(GBM_LIBS)
-AC_SUBST(GLES2_CFLAGS)
-AC_SUBST(GLES2_LIBS)
-AC_SUBST(UDEV_CFLAGS)
-AC_SUBST(UDEV_LIBS)
-AC_SUBST(XKBCOMMON_CFLAGS)
-AC_SUBST(XKBCOMMON_LIBS)
-AC_SUBST(FREETYPE2_CFLAGS)
-AC_SUBST(FREETYPE2_LIBS)
-AC_SUBST(PANGO_CFLAGS)
-AC_SUBST(PANGO_LIBS)
-AC_SUBST(WAYLAND_CFLAGS)
-AC_SUBST(WAYLAND_LIBS)
-
-AC_CONFIG_FILES([Makefile libeloop.pc libtsm.pc libuterm.pc])
+AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 
 #
@@ -699,38 +802,32 @@ AC_OUTPUT
 
 AC_MSG_NOTICE([Build configuration:
 
-  Applications and libraries:
-              kmscon: $kmscon_enabled
-              wlterm: $wlterm_enabled
-               uterm: $uterm_enabled
-               eloop: $eloop_enabled
-                 tsm: $tsm_enabled
-
-  Miscellaneous options:
-               debug: $debug_enabled
-       optimizations: $optimizations_enabled
-
-  Optional dependencies:
-             systemd: $systemd_enabled
-                udev: $udev_enabled
-                dbus: $dbus_enabled
-           xkbcommon: $xkbcommon_enabled
-
-  libuterm video backends:
-               fbdev: $fbdev_enabled
-            dumb drm: $dumb_enabled
-                 drm: $drm_enabled
-           OpenGLES2: $gles2_enabled
-
-  font backends:
-             unifont: $unifont_enabled
-                8x16: $f8x16_enabled
-           freetype2: $freetype2_enabled
-               pango: $pango_enabled
-
-  rendering backends:
-               bblit: $bblit_enabled
-               bbulk: $bbulk_enabled
-               gltex: $gltex_enabled
-
-       Run "make" to start compilation process])
+               prefix: $prefix
+          exec-prefix: $exec_prefix
+               libdir: $libdir
+           includedir: $includedir
+
+  Miscellaneous Options:
+                debug: $debug_enabled ($debug_avail: $debug_missing)
+        optimizations: $optimizations_enabled ($optimizations_avail: $optimizations_missing)
+           multi-seat: $multi_seat_enabled ($multi_seat_avail: $multi_seat_missing)
+
+  Video Backends:
+                fbdev: $video_fbdev_enabled ($video_fbdev_avail: $video_fbdev_missing)
+                drm2d: $video_drm2d_enabled ($video_drm2d_avail: $video_drm2d_missing)
+                drm3d: $video_drm3d_enabled ($video_drm3d_avail: $video_drm3d_missing)
+
+  Font Backends:
+              unifont: $font_unifont_enabled ($font_unifont_avail: $font_unifont_missing)
+                pango: $font_pango_enabled ($font_pango_avail: $font_pango_missing)
+
+  Renderers:
+                bbulk: $renderer_bbulk_enabled ($renderer_bbulk_avail: $renderer_bbulk_missing)
+                gltex: $renderer_gltex_enabled ($renderer_gltex_avail: $renderer_gltex_missing)
+               pixman: $renderer_pixman_enabled ($renderer_pixman_avail: $renderer_pixman_missing)
+
+  Session Types:
+                dummy: $session_dummy_enabled ($session_dummy_avail: $session_dummy_missing)
+             terminal: $session_terminal_enabled ($session_terminal_avail: $session_terminal_missing)
+
+        Run "${MAKE-make}" to start compilation process])