diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-03-22 19:46:11 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-03-22 19:46:11 +0100 |
commit | 67f479d05794592d7a2f1752c3da9c75418c3454 (patch) | |
tree | caf7b1af7e4563bde38e986ac680008607362c8c /configure.ac | |
parent | Merge remote-tracking branch 'maandree/leaks' (diff) | |
download | redshift-ng-67f479d05794592d7a2f1752c3da9c75418c3454.tar.gz redshift-ng-67f479d05794592d7a2f1752c3da9c75418c3454.tar.bz2 redshift-ng-67f479d05794592d7a2f1752c3da9c75418c3454.tar.xz |
Support for running Redshift without a graphical environment in Linux by using Direct Rendering Manager
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 550ed0f..6679d70 100644 --- a/configure.ac +++ b/configure.ac @@ -16,6 +16,7 @@ AC_PROG_CC_C99 AM_GNU_GETTEXT_VERSION([0.17]) AM_GNU_GETTEXT([external]) +PKG_CHECK_MODULES([DRM], [libdrm], [have_drm=yes], [have_drm=no]) PKG_CHECK_MODULES([X11], [x11], [have_x11=yes], [have_x11=no]) PKG_CHECK_MODULES([XF86VM], [xxf86vm], [have_xf86vm=yes], [have_xf86vm=no]) PKG_CHECK_MODULES([XCB], [xcb], [have_xcb=yes], [have_xcb=no]) @@ -29,6 +30,30 @@ AC_CHECK_HEADER([windows.h], [have_windows_h=yes], [have_windows_h=no]) # Check for Python AM_PATH_PYTHON([3.3], [have_python=yes], [have_python=no]) +# Check DRM method +AC_MSG_CHECKING([whether to enable DRM method]) +AC_ARG_ENABLE([drm], [AC_HELP_STRING([--enable-drm], + [enable DRM method])], + [enable_drm=$enableval],[enable_drm=maybe]) +AS_IF([test "x$enable_drm" != xno], [ + AS_IF([test $have_drm = yes], [ + AC_DEFINE([ENABLE_DRM], 1, + [Define to 1 to enable DRM method]) + AC_MSG_RESULT([yes]) + enable_drm=yes + ], [ + AC_MSG_RESULT([missing dependencies]) + AS_IF([test "x$enable_drm" = xyes], [ + AC_MSG_ERROR([missing dependencies for DRM method]) + ]) + enable_drm=no + ]) +], [ + AC_MSG_RESULT([no]) + enable_drm=no +]) +AM_CONDITIONAL([ENABLE_DRM], [test "x$enable_drm" = xyes]) + # Check RANDR method AC_MSG_CHECKING([whether to enable RANDR method]) AC_ARG_ENABLE([randr], [AC_HELP_STRING([--enable-randr], @@ -191,6 +216,7 @@ echo " ldflags: ${LDFLAGS} Adjustment methods: + DRM: ${enable_drm} RANDR: ${enable_randr} VidMode: ${enable_vidmode} WinGDI: ${enable_wingdi} |