diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 90 |
1 files changed, 55 insertions, 35 deletions
diff --git a/configure.ac b/configure.ac index 22dd3e9..ae5874e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.64]) -AC_INIT([redshift], [1.3], [https://bugs.launchpad.net/redshift]) +AC_INIT([redshift], [1.6], [https://bugs.launchpad.net/redshift]) AC_CONFIG_SRCDIR([src/redshift.c]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([dist-bzip2]) @@ -22,8 +22,9 @@ 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]) -PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no]) +PKG_CHECK_MODULES([GLIB], [glib-2.0 gobject-2.0], [have_glib=yes], [have_glib=no]) PKG_CHECK_MODULES([GCONF], [gconf-2.0], [have_gconf=yes], [have_gconf=no]) +PKG_CHECK_MODULES([GEOCLUE], [geoclue], [have_geoclue=yes], [have_geoclue=no]) AC_CHECK_HEADER([windows.h], [have_windows_h=yes], [have_windows_h=no]) @@ -113,7 +114,7 @@ AC_ARG_ENABLE([gnome-clock], [AC_HELP_STRING([--enable-gnome-clock], [enable GNOME Clock location provider])], [enable_gnome_clock=$enableval],[enable_gnome_clock=maybe]) AS_IF([test "x$enable_gnome_clock" != xno], [ - AS_IF([test $have_glib = yes -a $have_gconf = yes], [ + AS_IF([test "x$have_glib" = "xyes" -a "x$have_gconf" = xyes], [ AC_DEFINE([ENABLE_GNOME_CLOCK], 1, [Define to 1 to enable GNOME Clock location provider]) AC_MSG_RESULT([yes]) @@ -131,48 +132,65 @@ 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]) -AC_ARG_ENABLE([gui], [AC_HELP_STRING([--enable-gui], - [enable GUI (appindicator, statusicon or none)])], - [enable_gui=$enableval],[enable_gui=maybe]) - -# Statusicon GUI -AS_IF([test "x$enable_gui" = xstatusicon -o "x$enable_gui" = maybe], [ - AS_IF([test $have_python != yes], [ - AS_IF([test "x$enable_gui" = xstatusicon], [ - AC_MSG_ERROR([status icon script requires Python 2.6]) +# Check Geoclue location provider +AC_MSG_CHECKING([whether to enable Geoclue location provider]) +AC_ARG_ENABLE([geoclue], [AC_HELP_STRING([--enable-geoclue], + [enable Geoclue location provider])], + [enable_geoclue=$enableval],[enable_geoclue=maybe]) +AS_IF([test "x$enable_geoclue" != xno], [ + AS_IF([test "x$have_geoclue" = xyes], [ + AC_DEFINE([ENABLE_GEOCLUE], 1, + [Define to 1 to enable Geoclue location provider]) + AC_MSG_RESULT([yes]) + enable_geoclue=yes + ], [ + AC_MSG_RESULT([missing dependencies]) + AS_IF([test "x$enable_geoclue" = xyes], [ + AC_MSG_ERROR([missing dependencies for Geoclue location provider]) ]) - enable_gui=maybe + enable_geoclue=no ]) +], [ + AC_MSG_RESULT([no]) + enable_geoclue=no ]) +AM_CONDITIONAL([ENABLE_GEOCLUE], [test "x$enable_geoclue" = xyes]) -# Appindicator GUI -AS_IF([test "x$enable_gui" = xappindicator -o "x$enable_gui" = maybe], [ - AS_IF([test $have_python != yes], [ - AS_IF([test "x$enable_gui" = xappindicator], [ - AC_MSG_ERROR([application indicator script requires Python 2.6]) + +# 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 status icon])], + [enable_gui=$enableval],[enable_gui=maybe]) +AS_IF([test "x$enable_gui" != xno], [ + AS_IF([test $have_python = yes], [ + AC_MSG_RESULT([yes]) + ], [ + 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=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 +AM_CONDITIONAL([ENABLE_GUI], [test "x$enable_gui" != xno]) + +# Check for Ubuntu icons +AC_MSG_CHECKING([whether to enable Ubuntu icons]) +AC_ARG_ENABLE([ubuntu], [AC_HELP_STRING([--enable-ubuntu], + [enable Ubuntu icons])], + [enable_ubuntu=$enableval],[enable_ubuntu=no]) +AS_IF([test "x$enable_ubuntu" != xno], [ + AC_MSG_RESULT([yes]) +], [ + AC_MSG_RESULT([no]) ]) - -AC_MSG_RESULT([$enable_gui]) - -AM_CONDITIONAL([ENABLE_STATUSICON], [test "x$enable_gui" = xstatusicon]) -AM_CONDITIONAL([ENABLE_APPINDICATOR], [test "x$enable_gui" = xappindicator]) - +AM_CONDITIONAL([ENABLE_UBUNTU], [test "x$enable_ubuntu" != xno]) # Checks for header files. -AC_CHECK_HEADERS([locale.h stdint.h stdlib.h string.h unistd.h sys/signal.h]) +AC_CHECK_HEADERS([locale.h stdint.h stdlib.h string.h unistd.h signal.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_UINT16_T @@ -206,6 +224,8 @@ echo " Location providers: GNOME Clock: ${enable_gnome_clock} + Geoclue: ${enable_geoclue} GUI: ${enable_gui} + Ubuntu icons: ${enable_ubuntu} " |