From fc627a94e4a1f9f7f4ad90f27149e4a0e31296c4 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 29 Oct 2013 10:36:07 +0100 Subject: [PATCH] build: enable kmscon unconditionally We removed all additional libraries/applications so we can now always enable building kmscon. This also means we can remove a bunch of old now unused options and flags. Signed-off-by: David Herrmann --- Makefile.am | 9 +-- README | 9 +-- configure.ac | 164 +++++++-------------------------------------------- 3 files changed, 24 insertions(+), 158 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5dfa7d9..c8006fe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -224,8 +224,10 @@ nodist_libuterm_la_SOURCES = libuterm_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ + $(UDEV_CFLAGS) \ $(XKBCOMMON_CFLAGS) libuterm_la_LIBADD = \ + $(UDEV_LIBS) \ $(XKBCOMMON_LIBS) \ libeloop.la \ libshl.la @@ -238,11 +240,6 @@ libuterm_la_CPPFLAGS += $(SYSTEMD_CFLAGS) libuterm_la_LIBADD += $(SYSTEMD_LIBS) endif -if BUILD_ENABLE_HOTPLUG -libuterm_la_CPPFLAGS += $(UDEV_CFLAGS) -libuterm_la_LIBADD += $(UDEV_LIBS) -endif - if BUILD_ENABLE_VIDEO_FBDEV libuterm_la_SOURCES += \ src/uterm_fbdev_internal.h \ @@ -454,7 +451,6 @@ mod_pixman_la_LDFLAGS = \ # built as part of kmscon. # -if BUILD_ENABLE_KMSCON bin_PROGRAMS += kmscon check_PROGRAMS += \ test_output \ @@ -462,7 +458,6 @@ check_PROGRAMS += \ test_input \ test_key MANPAGES += docs/man/kmscon.1 -endif kmscon_SOURCES = \ src/conf.h \ diff --git a/README b/README index 57e4259..b7610f8 100644 --- a/README +++ b/README @@ -13,6 +13,8 @@ Website: - libtsm: terminal emulator state machine - libudev: providing input, video, etc. device hotplug support (>=v172) - libxkbcommon: providing internationalized keyboard handling + - libdrm: graphics access to DRM/KMS subsystem + - linux-headers: linux kernel headers for ABI definitions Everything else is optional: @@ -59,8 +61,6 @@ Released tarballs can be found at: explicitly enable it via command line: --enable-multi-seat: This requires the systemd-logind library to provide multi-seat support for kmscon. [default: on] - --enable-hotplug: This requires libudev for hotplugging support. This is - currently mandatory and cannot be disabled. [default: on] --enable-debug: Enable debug mode/messages [default: on] --enable-optimizations: Enable code optimizations [default: on] @@ -86,11 +86,6 @@ Released tarballs can be found at: - dummy: Dummy fallback session - terminal: Terminal-emulator sessions - The following options select which applications are built. If - dependency-checks fail, they are disabled by default unless explicitly enabled - on the command line: - --enable-kmscon: Build kmscon application [default: on] - == Running == To get usage information, run: diff --git a/configure.ac b/configure.ac index 021c509..40c53fa 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,26 @@ 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 @@ -54,31 +74,11 @@ LT_INIT # ourself. # -PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon], - [have_xkbcommon=yes], [have_xkbcommon=no]) -AC_SUBST(XKBCOMMON_CFLAGS) -AC_SUBST(XKBCOMMON_LIBS) - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon libsystemd-login], [have_systemd=yes], [have_systemd=no]) AC_SUBST(SYSTEMD_CFLAGS) AC_SUBST(SYSTEMD_LIBS) -PKG_CHECK_MODULES([UDEV], [libudev >= 172], - [have_udev=yes], [have_udev=no]) -AC_SUBST(UDEV_CFLAGS) -AC_SUBST(UDEV_LIBS) - -PKG_CHECK_MODULES([DBUS], [dbus-1], - [have_dbus=yes], [have_dbus=no]) -AC_SUBST(DBUS_CFLAGS) -AC_SUBST(DBUS_LIBS) - -PKG_CHECK_MODULES([DRM], [libdrm], - [have_drm=yes], [have_drm=no]) -AC_SUBST(DRM_CFLAGS) -AC_SUBST(DRM_LIBS) - PKG_CHECK_MODULES([GBM], [gbm], [have_gbm=yes], [have_gbm=no]) AC_SUBST(GBM_CFLAGS) @@ -104,11 +104,6 @@ PKG_CHECK_MODULES([PIXMAN], [pixman-1], AC_SUBST(PIXMAN_CFLAGS) AC_SUBST(PIXMAN_LIBS) -PKG_CHECK_MODULES([TSM], [libtsm], - [have_tsm=yes], [have_tsm=no]) -AC_SUBST(TSM_CFLAGS) -AC_SUBST(TSM_LIBS) - # # Parse arguments # This parses all arguments that are given via "--enable-XY" or "--with-XY" and @@ -126,18 +121,6 @@ if test "x$enable_all" = "x" ; then fi AC_MSG_RESULT([$enable_all]) -# kmscon -AC_MSG_CHECKING([whether user wants kmscon]) -AC_ARG_ENABLE([kmscon], - [AS_HELP_STRING([--disable-kmscon], - [do not build kmscon])]) -if test "x$enable_all" = "xyes" ; then - enable_kmscon="yes" -elif test "x$enable_kmscon" = "x" ; then - enable_kmscon="yes (default)" -fi -AC_MSG_RESULT([$enable_kmscon]) - # debug AC_MSG_CHECKING([whether to build with debugging on]) AC_ARG_ENABLE([debug], @@ -174,18 +157,6 @@ elif test "x$enable_multi_seat" = "x" ; then fi AC_MSG_RESULT([$enable_multi_seat]) -# hotplug -AC_MSG_CHECKING([whether user wants udev for device hotplug support]) -AC_ARG_ENABLE([hotplug], - [AS_HELP_STRING([--enable-hotplug], - [enable device hotplug support with udev])]) -if test "x$enable_all" = "xyes" ; then - enable_hotplug="yes" -elif test "x$enable_hotplug" = "x" ; then - enable_hotplug="yes (default)" -fi -AC_MSG_RESULT([$enable_hotplug]) - # video backends AC_MSG_CHECKING([which video backends the user wants]) AC_ARG_WITH([video], @@ -371,16 +342,6 @@ video_drm2d_avail=no video_drm2d_missing="" if test ! "x$enable_video_drm2d" = "xno" ; then video_drm2d_avail=yes - if test "x$have_drm3d" = "xno" ; then - video_drm2d_avail=no - video_drm2d_missing="libdrm3d" - fi - - if test "x$video_drm2d_avail" = "xno" ; then - if test "x$enable_video_drm2d" = "xyes" ; then - AC_ERROR([missing for drm2d video backend: $video_drm2d_missing]) - fi - fi else video_drm2d_missing="enable-video-drm2d" fi @@ -390,10 +351,6 @@ video_drm3d_avail=no video_drm3d_missing="" if test ! "x$enable_video_drm3d" = "xno" ; then video_drm3d_avail=yes - if test "x$have_drm3d" = "xno" ; then - video_drm3d_avail=no - video_drm3d_missing="libdrm3d,$video_drm3d_missing" - fi if test "x$have_gbm" = "xno" ; then video_drm3d_avail=no video_drm3d_missing="libgbm,$video_drm3d_missing" @@ -435,25 +392,6 @@ else multi_seat_missing="enable-multi-seat" fi -# hotplug -hotplug_avail=no -hotplug_missing="" -if test ! "x$enable_hotplug" = "xno" ; then - hotplug_avail=yes - if test "x$have_udev" = "xno" ; then - hotplug_avail=no - hotplug_missing="libudev" - fi - - if test "x$hotplug_avail" = "xno" ; then - if test "x$enable_hotplug" = "xyes" ; then - AC_ERROR([missing for hotplug-support: $hotplug_missing]) - fi - fi -else - hotplug_missing="enable-hotplug" -fi - # renderer bbulk renderer_bbulk_avail=no renderer_bbulk_missing="" @@ -543,39 +481,10 @@ session_terminal_avail=no session_terminal_missing="" if test ! "x$enable_session_terminal" = "xno" ; then session_terminal_avail=yes - if test "x$have_tsm" = "xno" ; then - session_terminal_avail=no - session_terminal_missing="libtsm" - fi - - if test "x$session_terminal_avail" = "xno" ; then - if test "x$enable_session_terminal" = "xyes" ; then - AC_ERROR([missing for session-terminal: $session_terminal_missing]) - fi - fi else session_terminal_missing="enable-session-terminal" fi -# kmscon -kmscon_avail=no -kmscon_missing="" -if test ! "x$enable_kmscon" = "xno" ; then - kmscon_avail=yes - if test "x$have_tsm" = "xno" ; then - kmscon_avail=no - kmscon_missing="libtsm,$kmscon_missing" - fi - - if test "x$kmscon_avail" = "xno" ; then - if test "x$enable_kmscon" = "xyes" ; then - AC_ERROR([missing for kmscon: $kmscon_missing]) - fi - fi -else - kmscon_missing="enable-kmscon" -fi - # # Enable all required modules # We now know which modules can be built by checking the *_avail variables set @@ -584,14 +493,6 @@ fi # needs them. This is done top-down of course. # -# kmscon -kmscon_enabled=no -if test "x$kmscon_avail" = "xyes" ; then - if test "x${enable_kmscon% *}" = "xyes" ; then - kmscon_enabled=yes - fi -fi - # session terminal session_terminal_enabled=no if test "x$session_terminal_avail" = "xyes" ; then @@ -648,14 +549,6 @@ if test "x$renderer_bbulk_avail" = "xyes" ; then fi fi -# hotplug -hotplug_enabled=no -if test "x$hotplug_avail" = "xyes" ; then - if test "x${enable_hotplug% *}" = "xyes" ; then - hotplug_enabled=yes - fi -fi - # multi-seat multi_seat_enabled=no if test "x$multi_seat_avail" = "xyes" ; then @@ -762,15 +655,6 @@ fi AM_CONDITIONAL([BUILD_ENABLE_MULTI_SEAT], [test "x$multi_seat_enabled" = "xyes"]) -# hotplug -if test "x$hotplug_enabled" = "xyes" ; then - AC_DEFINE([BUILD_ENABLE_HOTPLUG], [1], - [Use udev for hotplug support]) -fi - -AM_CONDITIONAL([BUILD_ENABLE_HOTPLUG], - [test "x$hotplug_enabled" = "xyes"]) - # renderer bbulk if test "x$renderer_bbulk_enabled" = "xyes" ; then AC_DEFINE([BUILD_ENABLE_RENDERER_BBULK], [1], @@ -834,10 +718,6 @@ fi AM_CONDITIONAL([BUILD_ENABLE_SESSION_TERMINAL], [test "x$session_terminal_enabled" = "xyes"]) -# kmscon -AM_CONDITIONAL([BUILD_ENABLE_KMSCON], - [test "x$kmscon_enabled" = "xyes"]) - # # Miscellaneous Checks # All checks below are independent of module checking or depend on the results @@ -915,14 +795,10 @@ AC_MSG_NOTICE([Build configuration: libdir: $libdir includedir: $includedir - Applications and Libraries: - kmscon: $kmscon_enabled ($kmscon_avail: $kmscon_missing) - 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) - hotplug: $hotplug_enabled ($hotplug_avail: $hotplug_missing) Video Backends: fbdev: $video_fbdev_enabled ($video_fbdev_avail: $video_fbdev_missing)