aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac48
1 files changed, 47 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 550ed0f..8c6b079 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([redshift], [1.8], [https://bugs.launchpad.net/redshift])
+AC_INIT([redshift], [1.8], [https://github.com/jonls/redshift/issues])
AC_CONFIG_SRCDIR([src/redshift.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz])
@@ -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],
@@ -161,6 +186,25 @@ AS_IF([test "x$enable_ubuntu" != xno], [
])
AM_CONDITIONAL([ENABLE_UBUNTU], [test "x$enable_ubuntu" != xno])
+
+# Check for systemd
+PKG_PROG_PKG_CONFIG
+AC_MSG_CHECKING([Directory to install systemd user unit files])
+AC_ARG_WITH([systemduserunitdir],
+ [AS_HELP_STRING([--with-systemduserunitdir=<dir>],
+ [Directory for systemd user unit files])],
+ [], [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)])
+AS_IF([test -n "$with_systemduserunitdir" -a "x$with_systemduserunitdir" != xno], [
+ AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
+ AC_MSG_RESULT([$systemduserunitdir])
+ enable_systemd=yes
+], [
+ AC_MSG_RESULT([not enabled])
+ enable_systemd=no
+])
+AM_CONDITIONAL([ENABLE_SYSTEMD], [test "x$enable_systemd" != xno])
+
+
# Checks for header files.
AC_CHECK_HEADERS([locale.h stdint.h stdlib.h string.h unistd.h signal.h])
@@ -191,6 +235,7 @@ echo "
ldflags: ${LDFLAGS}
Adjustment methods:
+ DRM: ${enable_drm}
RANDR: ${enable_randr}
VidMode: ${enable_vidmode}
WinGDI: ${enable_wingdi}
@@ -200,4 +245,5 @@ echo "
GUI: ${enable_gui}
Ubuntu icons: ${enable_ubuntu}
+ systemd units: ${enable_systemd} ${systemduserunitdir}
"