2
AC_INIT(src/indicator-session.c)
6
AM_CONFIG_HEADER(config.h)
7
AM_INIT_AUTOMAKE(indicator-session, 0.3.96)
13
IT_PROG_INTLTOOL([0.35.0])
22
AC_CONFIG_MACRO_DIR([m4])
24
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
26
###########################
28
###########################
30
GTK_REQUIRED_VERSION=2.12
31
GTK3_REQUIRED_VERSION=3.0
32
INDICATOR_REQUIRED_VERSION=0.3.19
33
DBUSMENUGTK_REQUIRED_VERSION=0.5.90
34
POLKIT_REQUIRED_VERSION=0.92
37
[AS_HELP_STRING([--with-gtk],
38
[Which version of gtk to use for the indicator @<:@default=3@:>@])],
42
AS_IF([test "x$with_gtk" = x3],
43
[PKG_CHECK_MODULES(APPLET, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
44
indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
45
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
47
[test "x$with_gtk" = x2],
48
[PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
49
indicator-0.4 >= $INDICATOR_REQUIRED_VERSION
50
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
52
[AC_MSG_FAILURE([Value for --with-indicator-gtk was neither 2 nor 3])]
55
AC_SUBST(APPLET_CFLAGS)
58
DBUSMENUGLIB_REQUIRED_VERSION=0.1.1
60
AS_IF([test "x$with_gtk" = x3],
61
[PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
62
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
65
indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
68
[test "x$with_gtk" = x2],
69
[PKG_CHECK_MODULES(SESSIONSERVICE, dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
70
dbusmenu-gtk-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
73
indicator-0.4 >= $INDICATOR_REQUIRED_VERSION
78
AC_SUBST(SESSIONERVICE_CFLAGS)
79
AC_SUBST(SESSIONERVICE_LIBS)
81
PKG_CHECK_MODULES(GUDEV, gudev-1.0, has_gudev=true, has_gudev=false)
82
AC_SUBST(GUDEV_CFLAGS)
85
AM_CONDITIONAL([USE_GTK3], [test "x$with_gtk" = "x3"])
86
AS_IF([test "x$with_gtk" = x3], [
87
AC_DEFINE(HAVE_GTK3, 1, [whether gtk3 is available])
90
###########################
92
###########################
94
AC_ARG_ENABLE([gtklogouthelper],
95
AS_HELP_STRING([--enable-gtklogouthelper], [enable GTK Logout Helper]),,
96
enable_gtklogouthelper=auto)
98
if test x"$enable_gtklogouthelper" != x"no" ; then
99
AS_IF([test "x$with_gtk" = x3],
100
[PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-3.0 >= $GTK3_REQUIRED_VERSION
101
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
102
[have_gtklogouthelper=yes],
103
[have_gtklogouthelper=no])
105
[test "x$with_gtk" = x2],
106
[PKG_CHECK_MODULES(GTKLOGOUTHELPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION
107
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
108
[have_gtklogouthelper=yes],
109
[have_gtklogouthelper=no])
112
if test x${have_gtklogouthelper} = xyes; then
113
AC_DEFINE(HAVE_GTKLOGOUTHELPER, 1, [Define to 1 to enable GTK Logout Helper])
115
if test x${enable_gtklogouthelper} = xyes && test x${have_gtklogouthelper} = xno; then
116
AC_MSG_ERROR([GTK Logout Helper configured but polkit-gobject not found])
119
have_gtklogouthelper=no
121
AM_CONDITIONAL(BUILD_GTKLOGOUTHELPER, test x${have_gtklogouthelper} = xyes)
123
AC_SUBST(GTKLOGOUTHELPER_CFLAGS)
124
AC_SUBST(GTKLOGOUTHELPER_LIBS)
126
###########################
128
###########################
130
AC_HELP_STRING([--disable-apt], [disable APT support]),,
132
AM_CONDITIONAL([BUILD_APT], [test "x$enable_apt" != "xno"])
134
if test "x$enable_apt" != "xno"; then
135
AC_DEFINE(HAVE_APT, 1, [Define to 1 to enable APT support])
138
###########################
139
# Check to see if we're local
140
###########################
142
with_localinstall="no"
143
AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install all of the files localy instead of system directories (for distcheck)]), with_localinstall=$enableval, with_localinstall=no)
145
###########################
147
###########################
149
if test "x$with_localinstall" = "xyes"; then
150
INDICATORDIR="${libdir}/indicators/2/"
151
INDICATORICONSDIR="${datadir}/indicator-applet/icons/"
152
elif test "x$with_gtk" = x2; then
153
INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4`
154
INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator-0.4`
156
INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4`
157
INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4`
159
AC_SUBST(INDICATORDIR)
160
AC_SUBST(INDICATORICONSDIR)
162
###########################
164
###########################
166
if test "x$with_localinstall" = "xyes"; then
167
DBUSSERVICEDIR="${datadir}/dbus-1/services/"
169
DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
171
AC_SUBST(DBUSSERVICEDIR)
173
##############################
175
##############################
177
AC_DEFUN([AC_DEFINE_PATH], [
178
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
179
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
180
ac_define_path=`eval echo [$]$2`
181
ac_define_path=`eval echo [$]ac_define_path`
185
AC_DEFINE_UNQUOTED($1, "$ac_define_path"),
186
AC_DEFINE_UNQUOTED($1, "$ac_define_path", $3))
189
###########################
190
# Internationalization
191
###########################
193
GETTEXT_PACKAGE=indicator-session
194
AC_SUBST(GETTEXT_PACKAGE)
195
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the default get text domain])
196
AC_DEFINE_PATH(GNOMELOCALEDIR, "${datadir}/locale", [locale directory])
200
###########################
201
# gcov coverage reporting
202
###########################
204
m4_include([m4/gcov.m4])
206
AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes])
207
AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes])
208
AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes])
209
AC_SUBST(COVERAGE_CFLAGS)
210
AC_SUBST(COVERAGE_LDFLAGS)
212
###########################
214
###########################
216
AM_CONDITIONAL([HAS_GUDEV], [test "x$has_gudev" = "xtrue"])
223
data/icons/16x16/Makefile
224
data/icons/16x16/actions/Makefile
225
data/icons/16x16/status/Makefile
226
data/icons/22x22/Makefile
227
data/icons/22x22/actions/Makefile
228
data/icons/22x22/status/Makefile
229
data/icons/24x24/Makefile
230
data/icons/24x24/actions/Makefile
231
data/icons/24x24/status/Makefile
232
data/icons/32x32/Makefile
233
data/icons/32x32/actions/Makefile
234
data/icons/32x32/status/Makefile
235
data/icons/scalable/Makefile
236
data/icons/scalable/actions/Makefile
237
data/icons/scalable/status/Makefile
238
data/extra-sessions/Makefile
244
###########################
246
###########################
250
SUS Indicator Configuration:
253
Indicator Dir: $INDICATORDIR
254
Indicator GTK: $with_gtk
255
Logout Helper: $have_gtklogouthelper
256
APT support: $enable_apt
257
Coverage reporting: $use_gcov