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
|
AC_INIT([gnome-control-center], [2.25.3],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-control-center])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([shell])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 tar-ustar])
AM_MAINTAINER_MODE
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_C_O
AC_STDC_HEADERS
AM_PROG_LIBTOOL
# Use the GNOME documentation framework
GNOME_DOC_INIT
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
# Internationalization support
IT_PROG_INTLTOOL([0.37.1])
GETTEXT_PACKAGE=gnome-control-center-2.0
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
GNOME_COMMON_INIT
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES
AC_PATH_XTRA
x_libs="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
AC_CHECK_FUNC(XScreenSaverQueryInfo, [
TYPING_BREAK="typing-break"], [
save_LIBS=$LIBS
LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lXss -lXext -lX11"
AC_CHECK_LIB(Xss, XScreenSaverQueryInfo, [
TYPING_BREAK="typing-break"
SCREENSAVER_LIBS="$X_PRE_LIBS $X_LIBS -lXss -lXext -lX11"], [
LIBS=$save_LIBS
LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lXext -lX11"
AC_CHECK_LIB(Xext, XScreenSaverQueryInfo, [
TYPING_BREAK="typing-break"
SCREENSAVER_LIBS="$X_PRE_LIBS $X_LIBS -lXext -lX11"],[])])
LIBS=$save_LIBS])
AC_SUBST(TYPING_BREAK)
AC_SUBST(SCREENSAVER_LIBS)
PKG_CHECK_MODULES(LIBCANBERRA_GTK, libcanberra-gtk, [
CANBERRA_GTK=1
AC_SUBST(LIBCANBERRA_GTK_CFLAGS)
AC_SUBST(LIBCANBERRA_GTK_LIBS)
], [:])
AM_CONDITIONAL(HAVE_LIBCANBERRA_GTK, test "x$CANBERRA_GTK" = "x1")
AM_CONDITIONAL(HAVE_TYPING_BREAK, test "x$TYPING_BREAK" = xtyping-break)
dnl keyboard-properties-capplet
savecppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_CHECK_HEADERS([X11/Xlib.h])
AC_CHECK_LIB(Xxf86misc, XF86MiscQueryExtension, [
AC_CHECK_HEADERS([X11/extensions/xf86misc.h], [XF86MISC_LIBS="-lXxf86misc"],[],
[#if HAVE_X11_XLIB_H
#include <X11/Xlib.h>
#endif
])])
AC_SUBST(XF86MISC_LIBS)
AC_CHECK_HEADERS(X11/extensions/XKB.h)
CPPFLAGS=$savecppflags
dnl ==============================================
dnl Check that we meet the dependencies
dnl ==============================================
ENABLE_DYNAMIC_LIBSLAB=0
AM_CONDITIONAL(ENABLE_DYNAMIC_LIBSLAB, test "x$ENABLE_DYNAMIC_LIBSLAB" = "x1")
COMMON_MODULES="gtk+-2.0 >= 2.13.1 dnl
glib-2.0 >= 2.17.4 dnl
gio-2.0 dnl
gconf-2.0 dnl
libglade-2.0 >= 2.0.0 dnl
gnome-desktop-2.0 >= 2.25.1"
PKG_CHECK_MODULES(LIBSLAB, $COMMON_MODULES libgnomeui-2.0 gnome-desktop-2.0 librsvg-2.0 libgnome-menu pango libgnomeui-2.0)
PKG_CHECK_MODULES(CAPPLET, $COMMON_MODULES)
PKG_CHECK_MODULES(GNOMECC, $COMMON_MODULES libgnome-menu >= 2.10.1)
PKG_CHECK_MODULES(GNOMECC_SHELL, $COMMON_MODULES libgnomeui-2.0 libgnome-menu libpanelapplet-2.0)
PKG_CHECK_MODULES(DBUS, dbus-1 dbus-glib-1)
PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-2.0)
PKG_CHECK_MODULES(DEFAULT_APPLICATIONS_CAPPLET, libxml-2.0)
PKG_CHECK_MODULES(METACITY, libmetacity-private >= 2.23.1)
PKG_CHECK_MODULES(TYPING, glib-2.0 > 2.11 gconf-2.0 gtk+-2.0)
PKG_CHECK_MODULES(GSD_DBUS, gnome-settings-daemon)
PKG_CHECK_MODULES(GIO, gio-2.0)
gtk_lib_dir=`$PKG_CONFIG --variable libdir gtk+-2.0`
gtk_binary_version=`$PKG_CONFIG --variable gtk_binary_version gtk+-2.0`
GTK_ENGINE_DIR="$gtk_lib_dir/gtk-2.0/$gtk_binary_version/engines"
AC_SUBST(GTK_ENGINE_DIR)
dnl
dnl Check for Xft version 2; we build in extra functionality to the font capplet
dnl when we have it.
dnl
xft_modules=
if $PKG_CONFIG --exists xft ; then
xft_modules="xft"
AC_DEFINE(HAVE_XFT2,,[Define if Xft functionality is available])
fi
PKG_CHECK_MODULES(FONT_CAPPLET, $COMMON_MODULES $xft_modules)
PKG_CHECK_MODULES(FONT_VIEWER, $COMMON_MODULES $xft_modules libgnomeui-2.0)
PKG_CHECK_MODULES(AT_CAPPLET, $COMMON_MODULES)
dnl
dnl Check for XRandR, needed for display capplet
dnl
have_randr=no
AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
[AC_CHECK_HEADER(X11/extensions/Xrandr.h,
have_randr=yes
RANDR_LIBS="-lXrandr -lXrender"
AC_DEFINE(HAVE_RANDR, 1, [Define if Xrandr extension is available]),
:, [#include <X11/Xlib.h>])], : ,
-lXrandr -lXrender $x_libs)
AM_CONDITIONAL(HAVE_RANDR, [test $have_randr = yes])
PKG_CHECK_MODULES(DISPLAY_CAPPLET, $COMMON_MODULES)
DISPLAY_CAPPLET_LIBS="$DISPLAY_CAPPLET_LIBS $RANDR_LIBS"
CAPPLET_LIBS="$CAPPLET_LIBS $x_libs"
GNOMECC_LIBS="$GNOMECC_LIBS $x_libs"
dnl
dnl Check for XCursor support. If it exists, then we compile the
dnl mouse capplet with support for it turned on
dnl
have_xcursor=no
PKG_CHECK_MODULES(XCURSOR, [
xcursor
],
have_xcursor=yes
AC_DEFINE(HAVE_XCURSOR, 1, [Define if the Xcursor extension is available]),
have_xcursor=no)
AM_CONDITIONAL(HAVE_XCURSOR, [test $have_xcursor=yes])
AC_SUBST(XCURSOR_CFLAGS)
AC_SUBST(XCURSOR_LIBS)
if test x$have_xcursor = xyes; then
AC_MSG_CHECKING([for XCURSOR cursor location])
XCURSOR_ICONDIR=$($PKG_CONFIG --variable=icondir xcursor)
if test "x$XCURSOR_ICONDIR" != x; then
AC_DEFINE_UNQUOTED(XCURSOR_ICONDIR, "${XCURSOR_ICONDIR}", [Define to the xcursor icon path])
else
XCURSOR_ICONDIR=none
fi
AC_MSG_RESULT([${XCURSOR_ICONDIR}])
fi
CAPPLET_LIBS="$CAPPLET_LIBS $XCURSOR_LIBS"
dnl ==============
dnl gswitchit
dnl ==============
PKG_CHECK_MODULES(LIBGNOMEKBD, [libgnomekbd >= 2.21.4.1 libxklavier >= 3.6])
AC_SUBST(LIBGNOMEKBD_CFLAGS)
AC_SUBST(LIBGNOMEKBD_LIBS)
PKG_CHECK_MODULES(LIBGNOMEKBDUI, [libgnomekbdui >= 2.21])
AC_SUBST(LIBGNOMEKBDUI_CFLAGS)
AC_SUBST(LIBGNOMEKBDUI_LIBS)
dnl ==============================================
dnl About-me
dnl ==============================================
AC_MSG_CHECKING([whether to enable About Me])
AC_ARG_ENABLE([aboutme],
AC_HELP_STRING([--enable-aboutme],
[enable about-me capplet]),,
[enable_aboutme=no])
AC_MSG_RESULT([$enable_aboutme])
if test "x$enable_aboutme" = "xyes"; then
PKG_CHECK_MODULES(LIBEBOOK, [libebook-1.2 >= 1.7.90],
[AC_DEFINE([HAVE_LIBEBOOK], 1,
[Define if evolution-data-server libebook-1.2 is available])])
dnl PolicyKit-gnome is optional
PKG_CHECK_MODULES(POLKIT_GNOME, [polkit-gnome],
[AC_DEFINE([HAVE_POLKIT], 1,
[Define if PolicyKit-gnome is available])],
has_polkit=false)
fi
AM_CONDITIONAL(BUILD_ABOUTME, test "x$enable_aboutme" = "xyes")
dnl ==============================================
dnl HAL stuff
dnl ==============================================
AC_ARG_ENABLE(hal, AC_HELP_STRING([--disable-hal],[build without hal support]))
if test "x$enable_hal" != "xno"; then
PKG_CHECK_MODULES(HAL, [hal >= 0.5.6, dbus-1 >= 0.32, dbus-glib-1 >= 0.32],
[ AC_DEFINE(USE_HAL, 1, [Define if libhal is available]) ],)
AC_SUBST(HAL_CFLAGS)
AC_SUBST(HAL_LIBS)
fi
dnl ==============================================
dnl End: Check that we meet the dependencies
dnl ==============================================
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal, no)
if test x"$GLIB_GENMARSHAL" = xno; then
AC_MSG_ERROR([glib-genmarshal executable not found in your path - should be installed with glib])
fi
AC_SUBST(GLIB_GENMARSHAL)
dnl ==============================================
dnl Special GConf section
dnl ==============================================
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
AM_GCONF_SOURCE_2
dnl ==============================================
dnl Define the main variables
dnl ==============================================
COMMON_CFLAGS="-I\$(top_srcdir)/capplets/common"
COMMON_LIBS="\$(top_builddir)/capplets/common/libcommon.la"
EXTRA_CFLAGS="-I\$(top_srcdir)/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-properties\\\"\""
GNOMECC_CAPPLETS_CFLAGS="${COMMON_CFLAGS} ${CAPPLET_CFLAGS} ${EXTRA_CFLAGS} ${DBUS_CFLAGS}"
GNOMECC_CAPPLETS_LIBS="${COMMON_LIBS} ${CAPPLET_LIBS} ${DBUS_LIBS}"
GNOMECC_CAPPLETS_CLEANFILES="\$(desktop) \$(desktop).in"
GNOMECC_CAPPLETS_EXTRA_DIST="ChangeLog \$(desktop).in.in \$(cappletname)-capplet.png \$(cappletname)-properties.glade \$(pixmaps_DATA)"
AC_SUBST(GNOMECC_CAPPLETS_EXTRA_DIST)
AC_SUBST(GNOMECC_CAPPLETS_CLEANFILES)
AC_SUBST(GNOMECC_CAPPLETS_CFLAGS)
AC_SUBST(GNOMECC_CAPPLETS_LIBS)
dnl =======================================
dnl Update Mime Database
dnl =======================================
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
AC_ARG_ENABLE(update-mimedb,
AC_HELP_STRING([--disable-update-mimedb],
[do not update mime database after installation]),,
enable_update_mimedb=yes)
AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
AC_CONFIG_FILES([
Makefile
capplets/Makefile
capplets/about-me/Makefile
capplets/about-me/gnome-about-me.desktop.in
capplets/accessibility/Makefile
capplets/accessibility/at-properties/at-properties.desktop.in
capplets/accessibility/at-properties/Makefile
capplets/appearance/Makefile
capplets/appearance/data/Makefile
capplets/appearance/data/gnome-appearance-properties.desktop.in
capplets/appearance/data/gnome-theme-installer.desktop.in
capplets/common/Makefile
capplets/default-applications/Makefile
capplets/default-applications/default-applications.desktop.in
capplets/default-applications/gnome-at-commandline.in
capplets/default-applications/gnome-at-session.desktop.in
capplets/default-applications/gnome-default-applications.pc
capplets/display/Makefile
capplets/display/display-properties.desktop.in
capplets/keybindings/Makefile
capplets/keybindings/gnome-keybindings.pc
capplets/keybindings/keybinding.desktop.in
capplets/keyboard/Makefile
capplets/keyboard/keyboard.desktop.in
capplets/mouse/Makefile
capplets/mouse/gnome-settings-mouse.desktop.in
capplets/network/Makefile
capplets/network/gnome-network-properties.desktop.in
capplets/windows/Makefile
capplets/windows/window-properties.desktop.in
font-viewer/Makefile
font-viewer/gnome-font-viewer.desktop.in
help/Makefile
libslab/Makefile
libslab/libslab.pc
libwindow-settings/Makefile
libwindow-settings/gnome-window-settings-2.0.pc
po/Makefile.in
shell/Makefile
shell/gnomecc.desktop.in
typing-break/Makefile
])
dnl due to a bug in intltool we need to expand something from the root last control-center.spec
AC_OUTPUT
|