1
AC_INIT([indicator-session],[12.10.4])
2
AC_CONFIG_SRCDIR([src/session-menu-mgr.c])
3
AM_INIT_AUTOMAKE([check-news])
4
AC_CONFIG_HEADERS([config.h])
10
IT_PROG_INTLTOOL([0.35.0])
20
AC_CONFIG_MACRO_DIR([m4])
22
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
24
###########################
26
###########################
28
GIO_REQUIRED_VERSION=2.33
29
GLIB_REQUIRED_VERSION=2.35.4
30
GTK_REQUIRED_VERSION=3.0
31
INDICATOR_REQUIRED_VERSION=0.3.19
32
DBUSMENUGTK_REQUIRED_VERSION=0.5.90
33
DBUSTEST_REQUIRED_VERSION=0.0.5
34
DBUSMENUGLIB_REQUIRED_VERSION=0.1.1
37
PKG_CHECK_MODULES(APPLET, glib-2.0 >= $GLIB_REQUIRED_VERSION
38
gtk+-3.0 >= $GTK_REQUIRED_VERSION
39
indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION
40
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION)
41
AC_SUBST(APPLET_CFLAGS)
45
PKG_CHECK_MODULES(SESSIONSERVICE, glib-2.0 >= $GLIB_REQUIRED_VERSION
46
dbusmenu-glib-0.4 >= $DBUSMENUGLIB_REQUIRED_VERSION
47
dbusmenu-gtk3-0.4 >= $DBUSMENUGTK_REQUIRED_VERSION
49
indicator3-0.4 >= $INDICATOR_REQUIRED_VERSION)
50
AC_SUBST(SESSIONERVICE_CFLAGS)
51
AC_SUBST(SESSIONERVICE_LIBS)
53
AC_SUBST(GUDEV_CFLAGS)
56
###########################
58
###########################
60
AC_ARG_ENABLE([gtklogouthelper],
61
[AS_HELP_STRING([--enable-gtklogouthelper], [enable GTK Logout Helper])],
63
[enable_gtklogouthelper=auto])
65
if test x"$enable_gtklogouthelper" != x"no" ; then
66
PKG_CHECK_MODULES([GTKLOGOUTHELPER],
67
[gtk+-3.0 >= $GTK_REQUIRED_VERSION],
68
[have_gtklogouthelper=yes],
69
[have_gtklogouthelper=no])
70
if test x${have_gtklogouthelper} = xyes; then
71
AC_DEFINE(HAVE_GTKLOGOUTHELPER, 1, [Define to 1 to enable GTK Logout Helper])
73
if test x${enable_gtklogouthelper} = xyes && test x${have_gtklogouthelper} = xno; then
74
AC_MSG_ERROR([GTK Logout Helper configured but polkit-gobject not found])
77
have_gtklogouthelper=no
79
AM_CONDITIONAL(BUILD_GTKLOGOUTHELPER, test x${have_gtklogouthelper} = xyes)
81
AC_SUBST(GTKLOGOUTHELPER_CFLAGS)
82
AC_SUBST(GTKLOGOUTHELPER_LIBS)
84
###########################
85
# Check to see if we're local
86
###########################
88
with_localinstall="no"
89
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)
91
###########################
93
###########################
95
if test "x$with_localinstall" = "xyes"; then
96
INDICATORDIR="${libdir}/indicators/2/"
97
INDICATORICONSDIR="${datadir}/indicator-applet/icons/"
98
elif test "x$with_gtk" = x2; then
99
INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator-0.4`
100
INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator-0.4`
102
INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator3-0.4`
103
INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator3-0.4`
105
AC_SUBST(INDICATORDIR)
106
AC_SUBST(INDICATORICONSDIR)
108
###########################
110
###########################
112
if test "x$with_localinstall" = "xyes"; then
113
DBUSSERVICEDIR="${datadir}/dbus-1/services/"
115
DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
117
AC_SUBST(DBUSSERVICEDIR)
119
###########################
120
# Google Test framework
121
###########################
123
AC_ARG_ENABLE([tests],
124
[AS_HELP_STRING([--disable-tests], [Disable test scripts and tools (default=auto)])],
125
[enable_tests=${enableval}],
127
if test "x$enable_tests" != "xno"; then
128
m4_include([m4/gtest.m4])
131
if test "x$enable_tests" = "xauto"; then
132
enable_tests=${have_gtest}
133
elif test "x$enable_tests" = "xyes" && test "x$have_gtest" != "xyes"; then
134
AC_MSG_ERROR([tests were requested but gtest is not installed.])
136
if test "x$enable_tests" = "xyes"; then
137
PKG_CHECK_MODULES([TEST_SERVICE],[glib-2.0 >= $GLIB_REQUIRED_VERSION
138
gio-2.0 >= $GIO_REQUIRED_VERSION],
139
[enable_tests="yes"],
143
AM_CONDITIONAL([BUILD_TESTS],[test "x$enable_tests" = "xyes"])
144
AC_SUBST([TEST_SERVICE_CFLAGS])
145
AC_SUBST([TEST_SERVICE_LIBS])
147
##############################
149
##############################
151
AC_DEFUN([AC_DEFINE_PATH], [
152
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
153
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
154
ac_define_path=`eval echo [$]$2`
155
ac_define_path=`eval echo [$]ac_define_path`
159
AC_DEFINE_UNQUOTED($1, "$ac_define_path"),
160
AC_DEFINE_UNQUOTED($1, "$ac_define_path", $3))
163
###########################
164
# Internationalization
165
###########################
167
GETTEXT_PACKAGE=indicator-session
168
AC_SUBST(GETTEXT_PACKAGE)
169
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the default get text domain])
170
AC_DEFINE_PATH(GNOMELOCALEDIR, "${datadir}/locale", [locale directory])
174
###########################
175
# gcov coverage reporting
176
###########################
178
m4_include([m4/gcov.m4])
180
AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes])
181
AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes])
182
AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes])
183
AC_SUBST(COVERAGE_CFLAGS)
184
AC_SUBST(COVERAGE_LDFLAGS)
186
###########################
188
###########################
195
data/icons/16x16/Makefile
196
data/icons/16x16/actions/Makefile
197
data/icons/16x16/status/Makefile
198
data/icons/22x22/Makefile
199
data/icons/22x22/actions/Makefile
200
data/icons/22x22/status/Makefile
201
data/icons/24x24/Makefile
202
data/icons/24x24/actions/Makefile
203
data/icons/24x24/status/Makefile
204
data/icons/32x32/Makefile
205
data/icons/32x32/actions/Makefile
206
data/icons/32x32/status/Makefile
207
data/icons/scalable/Makefile
208
data/icons/scalable/actions/Makefile
209
data/icons/scalable/status/Makefile
210
data/extra-sessions/Makefile
212
tests/indicator-session.service
218
###########################
220
###########################
224
SUS Indicator Configuration:
227
Indicator Dir: $INDICATORDIR
228
Logout Helper: $have_gtklogouthelper
229
Unit Tests: $enable_tests
230
Coverage reporting: $use_gcov