diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2014-03-22 20:13:00 +0100 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2014-03-22 20:13:00 +0100 |
commit | 09efaddd23468ef3d906c13e3d725e2341d757be (patch) | |
tree | 01bba123ef11d342732eea114e9a4e509e3d3f5f /configure.ac | |
parent | Update Fedora spec file with systemd unit install (diff) | |
parent | Support for running Redshift without a graphical environment in Linux by using Direct Rendering Manager (diff) | |
download | redshift-ng-09efaddd23468ef3d906c13e3d725e2341d757be.tar.gz redshift-ng-09efaddd23468ef3d906c13e3d725e2341d757be.tar.bz2 redshift-ng-09efaddd23468ef3d906c13e3d725e2341d757be.tar.xz |
Merge pull request #42 from maandree/gamma-drm
Support for running Redshift outside X using libdrm
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 a396f99..8c6b079 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], @@ -210,6 +235,7 @@ echo " ldflags: ${LDFLAGS} Adjustment methods: + DRM: ${enable_drm} RANDR: ${enable_randr} VidMode: ${enable_vidmode} WinGDI: ${enable_wingdi} |