diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2010-05-06 23:56:52 +0200 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2010-05-06 23:56:52 +0200 |
commit | 52a5a370fd394585d4bbf69d4a637bf92bd5878d (patch) | |
tree | a653ca89b5a2acfd094533704ba224b802b880b5 /configure.ac | |
parent | Don't call setlocale if NLS was disabled. (diff) | |
download | redshift-ng-52a5a370fd394585d4bbf69d4a637bf92bd5878d.tar.gz redshift-ng-52a5a370fd394585d4bbf69d4a637bf92bd5878d.tar.bz2 redshift-ng-52a5a370fd394585d4bbf69d4a637bf92bd5878d.tar.xz |
systemtime.c: Portably read current time on posix and windows.
w32gdi.c: Implements gamma ramp method for Windows GDI API.
Use double as a cross platform time representation.
Add WinGDI as a selectable method (currently limitied to minimum 4500K).
Fix a bug where redshift would crash if RANDR failed and VidMode wasn't
compiled in.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 5f75fd3..b2ee3a7 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,8 @@ PKG_CHECK_MODULES([XCB], [xcb], [have_xcb=yes], [have_xcb=no]) PKG_CHECK_MODULES([XCB_RANDR], [xcb-randr], [have_xcb_randr=yes], [have_xcb_randr=no]) +AC_CHECK_HEADER([windows.h], [have_windows_h=yes], [have_windows_h=no]) + # Check for Python AM_PATH_PYTHON([2.6], [have_python=yes], [have_python=no]) @@ -67,9 +69,31 @@ AS_IF([test "x$enable_vidmode" != xno], [ ]) AM_CONDITIONAL([ENABLE_VIDMODE], [test "x$enable_vidmode" != xno]) +# Check Windows GDI method +AC_MSG_CHECKING([whether to enable WinGDI method]) +AC_ARG_ENABLE([wingdi], [AC_HELP_STRING([--enable-wingdi], + [enable WinGDI method])], + [enable_wingdi=$enableval],[enable_wingdi=maybe]) +AS_IF([test "x$enable_wingdi" != xno], [ + AS_IF([test $have_windows_h = yes], [ + AC_DEFINE([ENABLE_WINGDI], 1, + [Define to 1 to enable WinGDI method]) + AC_MSG_RESULT([yes]) + ], [ + AC_MSG_RESULT([missing dependencies]) + AS_IF([test "x$enable_wingdi" = xyes], [ + AC_MSG_ERROR([missing Windows API headers for WinGDI method]) + ]) + enable_wingdi=no + ]) +], [ + AC_MSG_RESULT([no]) +]) +AM_CONDITIONAL([ENABLE_WINGDI], [test "x$enable_wingdi" != xno]) + # Check that at least one method is enabled -AS_IF([test "x$enable_randr" = xno -a "x$enable_vidmode" = xno], [ - AC_MSG_ERROR([either RANDR or VidMode must be enabled]) +AS_IF([test "x$enable_randr" = xno -a "x$enable_vidmode" = xno -a "x$enable_wingdi" = xno], [ + AC_MSG_ERROR([either RANDR, VidMode or WinGDI must be enabled]) ]) # Check for GTK+ status icon |