diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2010-07-28 00:48:49 +0200 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2010-07-28 00:48:49 +0200 |
commit | fb7f1b5a4a4ac73737801e1ae00306d2b5d55876 (patch) | |
tree | e8a99c21c860d61846ce0a2ebbad08a27be29579 /configure.ac | |
parent | Provide feedback on what location provider/color adjustment method that (diff) | |
parent | Optimize indicators code. (diff) | |
download | redshift-ng-fb7f1b5a4a4ac73737801e1ae00306d2b5d55876.tar.gz redshift-ng-fb7f1b5a4a4ac73737801e1ae00306d2b5d55876.tar.bz2 redshift-ng-fb7f1b5a4a4ac73737801e1ae00306d2b5d55876.tar.xz |
Merge GUI optimization from Francesco Marella with a few tweaks.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 50 |
1 files changed, 13 insertions, 37 deletions
diff --git a/configure.ac b/configure.ac index 15f67d1..54450b6 100644 --- a/configure.ac +++ b/configure.ac @@ -131,49 +131,25 @@ AS_IF([test "x$enable_gnome_clock" != xno], [ ]) AM_CONDITIONAL([ENABLE_GNOME_CLOCK], [test "x$enable_gnome_clock" = xyes]) - -# Check for GUI -# There doesn't seem to be an easy way of detecting the presence -# of a python module. For that reason, statusicon is the default GUI. -AC_MSG_CHECKING([which GUI to enable]) +# Check for GUI status icon +AC_MSG_CHECKING([whether to enable GUI status icon]) AC_ARG_ENABLE([gui], [AC_HELP_STRING([--enable-gui], - [enable GUI (appindicator, statusicon or none)])], + [enable GUI status icon])], [enable_gui=$enableval],[enable_gui=maybe]) - -# Statusicon GUI -AS_IF([test "x$enable_gui" = xstatusicon -o "x$enable_gui" = xmaybe], [ - AS_IF([test "x$have_python" != xyes], [ - AS_IF([test "x$enable_gui" = xstatusicon], [ - AC_MSG_ERROR([status icon script requires Python 2.6]) - ]) - enable_gui=maybe +AS_IF([test "x$enable_gui" != xno], [ + AS_IF([test $have_python = yes], [ + AC_MSG_RESULT([yes]) ], [ - enable_gui=statusicon - ]) -]) - -# Appindicator GUI -AS_IF([test "x$enable_gui" = xappindicator -o "x$enable_gui" = xmaybe], [ - AS_IF([test "x$have_python" != xyes], [ - AS_IF([test "x$enable_gui" = xappindicator], [ - AC_MSG_ERROR([application indicator script requires Python 2.6]) + AC_MSG_RESULT([missing dependencies]) + AS_IF([test "x$enable_gui" = xyes], [ + AC_MSG_ERROR([GUI status icon script requires Python 2.6]) ]) - enable_gui=maybe - ], [ - enable_gui=appindicator + enable_gui=no ]) +], [ + AC_MSG_RESULT([no]) ]) - -# Fall back to no GUI -AS_IF([test "x$enable_gui" != xappindicator -a "x$enable_gui" != xstatusicon], [ - enable_gui=none -]) - -AC_MSG_RESULT([$enable_gui]) - -AM_CONDITIONAL([ENABLE_GUI], [test "x$enable_gui" != xnone]) -AM_CONDITIONAL([ENABLE_STATUSICON], [test "x$enable_gui" = xstatusicon]) -AM_CONDITIONAL([ENABLE_APPINDICATOR], [test "x$enable_gui" = xappindicator]) +AM_CONDITIONAL([ENABLE_GUI], [test "x$enable_gui" != xno]) # Checks for header files. |