-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
373 lines (311 loc) · 12.8 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
AC_INIT([consort-panel], [3.4.2.1],
[http://bugzilla.gnome.org/enter_bug.cgi?product=consort-panel])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar -Wno-portability])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
# Before making a release, the LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
# change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A
LIBPANEL_APPLET_API_VERSION=1.0
AC_SUBST([LIBPANEL_APPLET_API_VERSION],[$LIBPANEL_APPLET_API_VERSION])
LIB_PANEL_APPLET_LT_VERSION=1:1:1
AC_SUBST(LIB_PANEL_APPLET_LT_VERSION)
GNOME_MAINTAINER_MODE_DEFINES
AC_ARG_ENABLE([documentation],
AS_HELP_STRING([--enable-documentation], [enable man pages and HTML]),
[], [enable_documentation=yes])
AM_CONDITIONAL(ENABLE_DOCUMENTATION, test x$enable_documentation = xyes)
LT_PREREQ([2.2.6])
LT_INIT([dlopen disable-static])
IT_PROG_INTLTOOL([0.40.6])
AC_PROG_CC
AM_PATH_PYTHON
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
AC_PATH_PROG(GCONFTOOL, gconftool-2)
GNOME_COMPILE_WARNINGS([maximum])
# Check for introspection
GOBJECT_INTROSPECTION_CHECK([0.9.5])
GLIB_GSETTINGS
m4_pattern_allow([AM_V_GEN])dnl Make autoconf not complain about the rule below
PANEL_INTLTOOL_PANEL_APPLET_RULE='%.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(AM_V_GEN) LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
AC_SUBST([PANEL_INTLTOOL_PANEL_APPLET_RULE])
AC_ARG_ENABLE(deprecation_flags,
[AC_HELP_STRING([--enable-deprecation-flags],
[use *_DISABLE_DEPRECATED flags @<:@default=no@:>@])],,
[enable_deprecation_flags=no])
if test "x$enable_deprecation_flags" = "xyes"; then
DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi
AC_CHECK_HEADERS(crt_externs.h)
AC_CHECK_FUNCS(_NSGetEnviron)
LIBGNOME_DESKTOP_REQUIRED=2.91.0
GDK_PIXBUF_REQUIRED=2.25.2
PANGO_REQUIRED=1.15.4
GLIB_REQUIRED=2.31.14
GTK_REQUIRED=3.3.8
LIBWNCK_REQUIRED=2.91.0
GCONF_REQUIRED=2.6.1
LIBGNOME_MENU_REQUIRED=3.1.4
TELEPATHY_GLIB_REQUIRED=0.14.0
LIBECAL_REQUIRED=2.91.2
LIBEDATASERVER_REQUIRED=2.91.2
LIBEDATASERVERUI_REQUIRED=2.91.2
CAIRO_REQUIRED=1.0.0
GWEATHER_REQUIRED=2.91.0
DBUS_GLIB_REQUIRED=0.80
dnl pkg-config dependency checks
PKG_CHECK_MODULES(EGG_SMCLIENT, ice sm gtk+-3.0)
PKG_CHECK_MODULES(PANEL, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED pango >= $PANGO_REQUIRED gtk+-3.0 >= $GTK_REQUIRED cairo-xlib glib-2.0 >= $GLIB_REQUIRED gmodule-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED gio-unix-2.0 >= $GLIB_REQUIRED gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libgnome-menu-3.0 >= $LIBGNOME_MENU_REQUIRED dconf)
AC_SUBST(PANEL_CFLAGS)
AC_SUBST(PANEL_LIBS)
AC_ARG_ENABLE(telepathy_glib, AS_HELP_STRING([--enable-telepathy-glib],[Enable telepathy-glib support (auto)]),enable_telepathy_glib=$enableval,enable_telepathy_glib=auto)
if test "x$enable_telepathy_glib" = "xno" ; then
HAVE_TELEPATHY_GLIB=no
else
PKG_CHECK_MODULES(TELEPATHY_GLIB, telepathy-glib >= $TELEPATHY_GLIB_REQUIRED, HAVE_TELEPATHY_GLIB=yes, HAVE_TELEPATHY_GLIB=no)
fi
if test "x$HAVE_TELEPATHY_GLIB" = "xyes" ; then
AC_DEFINE(HAVE_TELEPATHY_GLIB, 1, [Defined if telepathy-glib support is enabled])
fi
PKG_CHECK_MODULES(LIBPANEL_APPLET, gtk+-3.0 >= $GTK_REQUIRED cairo-xlib cairo-gobject gconf-2.0 >= $GCONF_REQUIRED gio-2.0 >= $GLIB_REQUIRED gio-unix-2.0 >= $GLIB_REQUIRED)
AC_SUBST(LIBPANEL_APPLET_CFLAGS)
AC_SUBST(LIBPANEL_APPLET_LIBS)
PKG_CHECK_MODULES(FISH, gtk+-3.0 >= $GTK_REQUIRED cairo >= $CAIRO_REQUIRED)
AC_SUBST(FISH_CFLAGS)
AC_SUBST(FISH_LIBS)
PKG_CHECK_MODULES(NOTIFICATION_AREA, gtk+-3.0 >= $GTK_REQUIRED)
AC_SUBST(NOTIFICATION_AREA_CFLAGS)
AC_SUBST(NOTIFICATION_AREA_LIBS)
PKG_CHECK_MODULES(WNCKLET, gtk+-3.0 >= $GTK_REQUIRED libwnck-3.0 >= $LIBWNCK_REQUIRED)
AC_SUBST(WNCKLET_CFLAGS)
AC_SUBST(WNCKLET_LIBS)
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNCS(nl_langinfo)
AC_ARG_ENABLE(eds,
AC_HELP_STRING([--enable-eds],
[Enable evolution-data-server dependencies @<:@default=auto@:>@]
),,enable_eds=auto)
LIBECAL_REQUIREMENT=
HAVE_EDS=no
if test "x$enable_eds" = "xyes"; then
LIBECAL_REQUIREMENT="libecal-1.2 >= $LIBECAL_REQUIRED libedataserver-1.2 >= $LIBEDATASERVER_REQUIRED libedataserverui-3.0 >= $LIBEDATASERVERUI_REQUIRED gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED"
CLOCK_EDS_ICONDIR=`$PKG_CONFIG --variable=datadir evolution-data-server-1.2`/pixmaps/evolution-data-server
else
if test "x$enable_eds" != "xno"; then
AC_MSG_CHECKING(for evolution-data-server)
if $PKG_CONFIG --exists libecal-1.2 libedataserverui-3.0 evolution-data-server-1.2; then
AC_MSG_RESULT(yes)
LIBECAL_REQUIREMENT="libecal-1.2 >= $LIBECAL_REQUIRED libedataserver-1.2 >= $LIBEDATASERVER_REQUIRED libedataserverui-3.0 >= $LIBEDATASERVERUI_REQUIRED gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED"
CLOCK_EDS_ICONDIR=`$PKG_CONFIG --variable=datadir evolution-data-server-1.2`/pixmaps/evolution-data-server
HAVE_EDS=yes
else
AC_MSG_RESULT(no)
fi
fi
fi
if test -n "$LIBECAL_REQUIREMENT"; then
AC_DEFINE([HAVE_LIBECAL], 1,
[Defined when evolution-data-server libecal-1.2 and libedataserverui-3.0 are detected])
fi
AM_CONDITIONAL(HAVE_LIBECAL, test -n "$LIBECAL_REQUIREMENT")
AC_SUBST(CLOCK_EDS_ICONDIR)
PKG_CHECK_MODULES(TZ, gio-2.0 >= $GLIB_REQUIRED)
AC_SUBST(TZ_CFLAGS)
AC_SUBST(TZ_LIBS)
PKG_CHECK_MODULES(CLOCK, pango >= $PANGO_REQUIRED gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED gio-2.0 >= $GLIB_REQUIRED $LIBECAL_REQUIREMENT librsvg-2.0 gweather-3.0 >= $GWEATHER_REQUIRED gnome-desktop-3.0 >= $LIBGNOME_DESKTOP_REQUIRED)
AC_SUBST(CLOCK_CFLAGS)
AC_SUBST(CLOCK_LIBS)
DBUS_REQUIRED=1.1.2
NETWORK_MANAGER_REQUIRED=0.6
AC_ARG_ENABLE(network_manager, AS_HELP_STRING([--enable-network-manager],[Enable NetworkManager support (auto)]),enable_network_manager=$enableval,enable_network_manager=auto)
if test "x$enable_network_manager" = "xno" ; then
HAVE_NETWORK_MANAGER=no
else
PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager >= $NETWORK_MANAGER_REQUIRED, HAVE_NETWORK_MANAGER=yes, HAVE_NETWORK_MANAGER=no)
fi
if test "x$HAVE_NETWORK_MANAGER" = "xyes" ; then
AC_DEFINE(HAVE_NETWORK_MANAGER, 1, [Defined if NetworkManager support is enabled])
fi
# Make it possible to compile the applets in-process
PANEL_INPROCESS_NONE=
PANEL_INPROCESS_ALL=
PANEL_INPROCESS_APPLETS=
AC_ARG_WITH(in-process-applets,
AC_HELP_STRING([--with-in-process-applets=APPLETS],
[comma-separated list of applets to compile in-process (possible values: none, clock, fish, notification-area, wncklet, all) @<:@default=none@:>@]),
[for i in `echo $withval | tr , ' '`; do
if test $i = "none"; then
PANEL_INPROCESS_NONE=1
else if test $i = "all"; then
PANEL_INPROCESS_ALL=1
else if test $i = "clock"; then
PANEL_INPROCESS_APPLETS="$PANEL_INPROCESS_APPLETS $i"
else if test $i = "fish"; then
PANEL_INPROCESS_APPLETS="$PANEL_INPROCESS_APPLETS $i"
else if test $i = "notification-area"; then
PANEL_INPROCESS_APPLETS="$PANEL_INPROCESS_APPLETS $i"
else if test $i = "wncklet"; then
PANEL_INPROCESS_APPLETS="$PANEL_INPROCESS_APPLETS $i"
else
echo "applet $i not recognized, ignoring..."
fi; fi; fi; fi; fi; fi
done],
[])
if test -n "$PANEL_INPROCESS_ALL"; then
PANEL_INPROCESS_APPLETS="clock fish notification-area wncklet"
fi
if test -n "$PANEL_INPROCESS_NONE"; then
PANEL_INPROCESS_APPLETS=""
fi
for i in $PANEL_INPROCESS_APPLETS; do
if test $i = "clock"; then
CLOCK_COMPILE_INPROCESS=1
AC_DEFINE([CLOCK_INPROCESS], 1,
[Defined when compiling the clock applet in-process])
else if test $i = "fish"; then
FISH_COMPILE_INPROCESS=1
AC_DEFINE([FISH_INPROCESS], 1,
[Defined when compiling the fish applet in-process])
else if test $i = "notification-area"; then
NOTIFICATION_AREA_COMPILE_INPROCESS=1
AC_DEFINE([NOTIFICATION_AREA_INPROCESS], 1,
[Defined when compiling the notification-area applet in-process])
else if test $i = "wncklet"; then
WNCKLET_COMPILE_INPROCESS=1
AC_DEFINE([WNCKLET_INPROCESS], 1,
[Defined when compiling the wncklet applet in-process])
fi; fi; fi; fi
done
if test "x$PANEL_INPROCESS_APPLETS" = "x"; then
PANEL_INPROCESS_APPLETS="(none)"
fi
AM_CONDITIONAL(CLOCK_INPROCESS, test -n "$CLOCK_COMPILE_INPROCESS")
AM_CONDITIONAL(FISH_INPROCESS, test -n "$FISH_COMPILE_INPROCESS")
AM_CONDITIONAL(NOTIFICATION_AREA_INPROCESS, test -n "$NOTIFICATION_AREA_COMPILE_INPROCESS")
AM_CONDITIONAL(WNCKLET_INPROCESS, test -n "$WNCKLET_COMPILE_INPROCESS")
# For the run dialog
gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
dnl X development libraries check
PKG_CHECK_MODULES(X, x11 xau, :, [
# pkg-config modules not found (only present since X11R7 aka Xorg); use
# old-style detection
AC_PATH_XTRA()
# X not found
if test x$no_x = xyes ; then
AC_MSG_ERROR([X development libraries not found])
fi
gp_save_cflags="$CFLAGS"
gp_save_libs="$LIBS"
CFLAGS="$X_CFLAGS"
LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"
AC_CHECK_LIB(X11, XFree,, AC_MSG_ERROR([libX11 not found]))
AC_CHECK_LIB(Xau, XauFileName,, AC_MSG_ERROR([libXau not found]))
CFLAGS="$gp_save_cflags"
LIBS="$gp_save_libs"
X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 -lXau $X_EXTRA_LIBS"
])
AC_SUBST(X_LIBS)
dnl X RANDR extension
PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2.0, have_randr=yes, have_randr=no)
if test "x$have_randr" = "xyes"; then
AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
fi
dnl Modules dir
AC_SUBST([modulesdir],"\$(libdir)/consort-panel/modules")
dnl Applets dir
AC_SUBST([appletsdir],"\$(datadir)/consort-panel/\$(LIBPANEL_APPLET_API_VERSION)/applets")
AC_SUBST([appletsdir_pkgconfig],"\${datadir}/consort-panel/\${libpanel_applet_api_version}/applets")
dnl Language Support
GETTEXT_PACKAGE=consort-panel-3.0
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define the gettext package to be used])
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
dnl gtk-doc stuff
GTK_DOC_CHECK([1.0])
dnl gnome-doc-utils stuff
GNOME_DOC_INIT
AM_GCONF_SOURCE_2
dnl platform test
case $host in
*-*-solaris*)
ostype=solaris
AC_DEFINE(HAVE_SOLARIS, 1, [Define to 1])
;;
esac
AC_CONFIG_FILES([
Makefile
data/Makefile
data/16x16/Makefile
data/22x22/Makefile
data/24x24/Makefile
data/32x32/Makefile
data/48x48/Makefile
data/scalable/Makefile
consort-panel/Makefile
consort-panel/libegg/Makefile
consort-panel/libpanel-applet-private/Makefile
consort-panel/libpanel-util/Makefile
consort-panel/consort-panel.desktop.in
libpanel-applet/Makefile
libpanel-applet/libpanelapplet-1.0.pc
libpanel-applet/libpanelapplet-1.0-uninstalled.pc
po/Makefile.in
applets/Makefile
applets/clock/Makefile
applets/clock/pixmaps/Makefile
applets/fish/Makefile
applets/notification_area/Makefile
applets/wncklet/Makefile
doc/Makefile
doc/reference/Makefile
doc/reference/panel-applet/Makefile
help/Makefile
help/clock/Makefile
help/fish/Makefile
man/Makefile
])
AC_OUTPUT
if echo foo | xgettext --from-code=UTF-8 -LC -o - - 2>/dev/null ; then
:;
else
echo "Warning: Your version of gettext does not support --from-code."
echo " This will cause translation of some strings in non US-English"
echo " locales to fail. For full support please upgrade to GNU"
echo " gettext 0.12 or later."
echo
fi
dnl ---------------------------------------------------------------------------
dnl - Show summary
dnl ---------------------------------------------------------------------------
echo "
consort-panel $VERSION
`echo consort-panel $VERSION | sed "s/./=/g"`
prefix: ${prefix}
exec_prefix: ${exec_prefix}
libdir: ${libdir}
bindir: ${bindir}
sbindir: ${sbindir}
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
datadir: ${datadir}
source code location: ${srcdir}
compiler: ${CC}
cflags: ${CFLAGS}
Maintainer mode: ${USE_MAINTAINER_MODE}
Use *_DISABLE_DEPRECATED: ${enable_deprecation_flags}
Bonobo applets support: ${HAVE_BONOBO}
Applets to build in-process: ${PANEL_INPROCESS_APPLETS}
Evolution-Data-Server support: ${HAVE_EDS}
Telepathy-Glib support: ${HAVE_TELEPATHY_GLIB}
NetworkManager support: ${HAVE_NETWORK_MANAGER}
XRandr support: ${have_randr}
Build introspection support: ${found_introspection}
Build gtk-doc documentation: ${enable_gtk_doc}
"