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
374
|
AC_INIT(control-center)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(control-center, 2.3.3)
AM_MAINTAINER_MODE
AC_PROG_INTLTOOL
GNOME_COMPILE_WARNINGS
AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AM_PROG_LIBTOOL
m4_define(fontilus_version, 0.4)
m4_define(gnomevfs_minver, 2.0.0)
m4_define(fontconfig_minver, 1.0.0)
m4_define(xft_minver, 2.0.0)
m4_define(gtk_minver, 2.0.0)
m4_define(libbonobo_minver, 2.0.0)
m4_define(libgnomeui_minver, 2.1.90)
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
# Internationalization support
ALL_LINGUAS="am ar az be bg bn ca cs da de el en_GB es et fa fi fr ga gl he hr hu id it ja ko lt lv mk ml mn ms nl nn no pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta th tr uk vi wa zh_CN zh_TW"
GETTEXT_PACKAGE=control-center-2.0
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
AC_CHECK_FUNCS(usleep)
AC_CHECK_FUNCS(putenv,[AC_DEFINE(HAVE_PUTENV,,[putenv])])
AC_CHECK_FUNCS(setenv,[AC_DEFINE(HAVE_SETENV,,[setenv])])
AC_PATH_XTRA
x_libs="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
dnl keyboard-properties-capplet
savecppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_CHECK_HEADERS(X11/extensions/xf86misc.h, XF86MISC_LIBS="-lXxf86misc")
AC_SUBST(XF86MISC_LIBS)
AC_CHECK_HEADERS(X11/extensions/XKB.h)
CPPFLAGS=$savecppflags
dnl ==============================================
dnl Check that we meet the dependencies
dnl ==============================================
COMMON_MODULES="gtk+-2.0 >= 2.2.0 gconf-2.0 libgnomeui-2.0 >= 2.2.0 libglade-2.0 >= 1.99.12 libbonobo-2.0 libbonoboui-2.0 libglade-2.0 gconf-2.0 gnome-desktop-2.0 >= 2.2.0"
PKG_CHECK_MODULES(CAPPLET, $COMMON_MODULES)
PKG_CHECK_MODULES(GNOMECC, $COMMON_MODULES libxml-2.0 gnome-desktop-2.0 gnome-vfs-2.0)
PKG_CHECK_MODULES(GNOME_SETTINGS_DAEMON, gtk+-2.0 gconf-2.0 libgnomeui-2.0 esound gnome-desktop-2.0)
PKG_CHECK_MODULES(OLD_CAPPLET, libgnomeui-2.0 libglade-2.0)
PKG_CHECK_MODULES(GNOME, libgnomeui-2.0)
PKG_CHECK_MODULES(VFS_CAPPLET, $COMMON_MODULES gnome-vfs-module-2.0 gnome-vfs-2.0)
PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-2.0)
PKG_CHECK_MODULES(SOUND_CAPPLET, esound)
PKG_CHECK_MODULES(METACITY, libmetacity-private)
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,,[Build Xft functionality to the font capplet])
fi
PKG_CHECK_MODULES(FONT_CAPPLET, $COMMON_MODULES $xft_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, Have the Xrandr extension library),
:, [#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"
GNOME_SETTINGS_DAEMON_LIBS="$GNOME_SETTINGS_DAEMON_LIBS $x_libs"
AC_PATH_PROG(GCONFTOOL, gconftool-2)
dnl
dnl Check for gtk+ with multihead support
dnl
AC_MSG_CHECKING([for gtk+ multihead support])
if $PKG_CONFIG --atleast-version 2.1.0 gtk+-2.0; then
AC_DEFINE(HAVE_GTK_MULTIHEAD,,[gtk+ with multihead support found])
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
dnl ==============================================
dnl themus and fontilust dependencies
dnl ==============================================
AC_ARG_ENABLE(themus, [ --disable-vfs-methods Do not build the fonts:/// and themes:/// uri schemes],, enable_vfs_methods=yes)
if test x$enable_vfs_methods = xyes; then
PKG_CHECK_MODULES(THEME_METHOD, gnome-vfs-module-2.0 >= 2.2.0 gnome-vfs-2.0 >= 2.2.0)
PKG_CHECK_MODULES(THEMUS_THUMBNAILER, gdk-2.0 >= 2.2.0 libgnomeui-2.0 >= 2.2.0 libmetacity-private gnome-vfs-2.0 >= 2.2.0)
PKG_CHECK_MODULES(THEMUS_COMPONENT, glib-2.0 >= 2.2.0 gtk+-2.0 >= 2.2.0 atk >= 1.2.0 libgnome-2.0 >= 2.2.0 libgnomeui-2.0 >= 2.2.0 gnome-vfs-2.0 >= 2.2.0 libbonobo-2.0 >= 2.2.0 libbonoboui-2.0 >= 2.2.0 libnautilus >= 2.2.0)
PKG_CHECK_MODULES(FONT_METHOD, [gnome-vfs-module-2.0 >= gnomevfs_minver fontconfig >= fontconfig_minver])
PKG_CHECK_MODULES(FONT_THUMBNAILER, [gnome-vfs-2.0 >= gnomevfs_minver gdk-pixbuf-2.0 >= gtk_minver])
PKG_CHECK_MODULES(FONT_CONTEXT_MENU, [gnome-vfs-2.0 >= gnomevfs_minver libbonobo-2.0 >= libbonobo_minver])
PKG_CHECK_MODULES(FONT_VIEW, [gnome-vfs-2.0 >= gnomevfs_minver xft >= xft_minver gtk+-2.0 >= gtk_minver libgnomeui-2.0 >= libgnomeui_minver])
# Add freetype flags to the thumbnailer script
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
if test "x$FREETYPE_CONFIG" = xno; then
AC_MSG_ERROR([Could not find freetype-config script])
fi
FONT_THUMBNAILER_CFLAGS="$FONT_THUMBNAILER_CFLAGS `$FREETYPE_CONFIG --cflags`"
FONT_THUMBNAILER_LIBS="$FONT_THUMBNAILER_LIBS `$FREETYPE_CONFIG --libs`"
THEMUS=themus
FONTILUS=fontilus
AC_SUBST(THEME_METHOD_CFLAGS)
AC_SUBST(THEME_METHOD_LIBS)
AC_SUBST(THEMUS_THUMBNAILER_CFLAGS)
AC_SUBST(THEMUS_THUMBNAILER_LIBS)
AC_SUBST(THEMUS_COMPONENT_CFLAGS)
AC_SUBST(THEMUS_COMPONENT_LIBS)
AC_SUBST(THEMUS)
AC_SUBST(FONT_THUMBNAILER_CFLAGS)
AC_SUBST(FONT_THUMBNAILER_LIBS)
AC_SUBST(FONT_VIEW_CFLAGS)
AC_SUBST(FONT_VIEW_LIBS)
AC_SUBST(FONT_METHOD_CFLAGS)
AC_SUBST(FONT_METHOD_LIBS)
AC_SUBST(FONT_METHOD_CFLAGS)
AC_SUBST(FONT_METHOD_LIBS)
AC_SUBST(FONT_CONTEXT_MENU_CFLAGS)
AC_SUBST(FONT_CONTEXT_MENU_LIBS)
AC_SUBST(FONTILUS)
# update LIBS for $export_dynamic
if test -n "$export_dynamic"; then
FONT_VIEW_LIBS=`echo $FONT_VIEW_LIBS | sed -e "s/$export_dynamic//"`
fi
if test -n "$export_dynamic"; then
FONT_CONTEXT_MENU_LIBS=`echo $CONTEXT_MENU_LIBS | sed -e "s/$export_dynamic//"`
fi
if test -n "$export_dynamic"; then
FONT_THUMBNAILER_LIBS=`echo FONT_$THUMBNAILER_LIBS | sed -e "s/$export_dynamic//"`
fi
if test -n "$export_dynamic"; then
FONT_METHOD_LIBS=`echo $FONT_METHOD_LIBS | sed -e "s/$export_dynamic//"`
fi
GLIB_DEFINE_LOCALEDIR(FONTILUS_LOCALEDIR)
fi
dnl ==============================================
dnl End: Check that we meet the dependencies
dnl ==============================================
dnl ==============================================
dnl IDL settings
dnl ==============================================
# orbit-idl
ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
AC_SUBST(ORBIT_IDL)
# idl directories
LIBBONOBO_IDL_DIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
AC_SUBST(LIBBONOBO_IDL_DIR)
BONOBO_ACTIVATION_IDL_DIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
AC_SUBST(BONOBO_ACTIVATION_IDL_DIR)
# esd
ESDSERVERDIR=`$PKG_CONFIG --variable=esd_serverdir esound`
if test x"$ESDSERVERDIR" = x; then
ESD_SERVER="esd"
else
ESD_SERVER="$ESDSERVERDIR/esd"
fi
AC_SUBST(ESD_SERVER)
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
if test x"$GDK_PIXBUF_CSOURCE" = xno; then
AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK])
fi
AC_SUBST(GDK_PIXBUF_CSOURCE)
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\\\"\" -DGNOMELOCALEDIR=\"\\\"${prefix}/${DATADIRNAME}/locale\\\"\""
GNOMECC_CAPPLETS_CFLAGS="${CAPPLET_CFLAGS} ${EXTRA_CFLAGS} ${COMMON_CFLAGS}"
GNOMECC_CAPPLETS_LIBS="${CAPPLET_LIBS} ${COMMON_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)
AC_SUBST(GNOME_SETTINGS_DAEMON_CFLAGS)
AC_SUBST(GNOME_SETTINGS_DAEMON_LIBS)
AC_SUBST(VFS_CAPPLET_CFLAGS)
AC_SUBST(VFS_CAPPLET_LIBS)
AC_SUBST(SOUND_CAPPLET_CFLAGS)
AC_SUBST(SOUND_CAPPLET_LIBS)
AC_SUBST(FONT_CAPPLET_CFLAGS)
AC_SUBST(FONT_CAPPLET_LIBS)
AC_SUBST(DISPLAY_CAPPLET_CFLAGS)
AC_SUBST(DISPLAY_CAPPLET_LIBS)
AC_SUBST(GNOMECC_CFLAGS)
AC_SUBST(GNOMECC_LIBS)
AC_SUBST(GNOME_DESKTOP_CFLAGS)
AC_SUBST(GNOME_DESKTOP_LIBS)
AC_SUBST(METACITY_CFLAGS)
AC_SUBST(METACITY_LIBS)
dnl ==============================================
dnl End: Define the main variables
dnl ==============================================
GCONF_CONFIG_SOURCE=
AC_ARG_ENABLE(gconf-source, [ --enable-gconf-source=sourceaddress Where to install schema files.],GCONF_CONFIG_SOURCE=$enable_gconf_source,)
if test "x$GCONF_CONFIG_SOURCE" = "x"; then
GCONF_CONFIG_SOURCE="xml::\${DESTDIR}\${sysconfdir}/gconf/gconf.xml.defaults"
fi
AC_SUBST(GCONF_CONFIG_SOURCE)
AC_SUBST(INSTALL_GCONF_CONFIG_SOURCE)
ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
AC_SUBST(ORBIT_IDL)
LIBBONOBO_IDL_DIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
AC_SUBST(LIBBONOBO_IDL_DIR)
BONOBO_ACTIVATION_IDL_DIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
AC_SUBST(BONOBO_ACTIVATION_IDL_DIR)
dnl ==============================================
dnl Define the directories
dnl ==============================================
if test "x${prefix}" = "xNONE"; then
real_prefix=${ac_default_prefix}
else
real_prefix=${prefix}
fi
AC_DEFINE_UNQUOTED(GNOMECC_DATA_DIR, "${real_prefix}/share/${GETTEXT_PACKAGE}",[Path to gnomecc data files])
GNOMECC_ICONS_DIR='$(datadir)/'${GETTEXT_PACKAGE}'/icons'
AC_SUBST(GNOMECC_ICONS_DIR)
GNOMECC_DESKTOP_DIR='$(datadir)/'${GETTEXT_PACKAGE}'/capplets'
AC_SUBST(GNOMECC_DESKTOP_DIR)
GNOMECC_GLADE_DIR='$(datadir)/'${GETTEXT_PACKAGE}'/interfaces'
AC_SUBST(GNOMECC_GLADE_DIR)
GNOMECC_PIXMAPS_DIR='$(datadir)/'${GETTEXT_PACKAGE}'/pixmaps'
AC_SUBST(GNOMECC_PIXMAPS_DIR)
dnl ==============================================
dnl End: Define the directories
dnl ==============================================
dnl =======================================
dnl Variables for config_archiverConf.sh.in
dnl =======================================
CONFIG_ARCHIVER_LIBDIR='-L${libdir}'
CONFIG_ARCHIVER_LIBS="$CONFIG_ARCHIVER_LIBS -lconfig_archiver"
CONFIG_ARCHIVER_INCLUDEDIR="$CONFIG_ARCHIVER_CFLAGS -I${includedir}"
AC_SUBST(CONFIG_ARCHIVER_LIBDIR)
AC_SUBST(CONFIG_ARCHIVER_LIBS)
AC_SUBST(CONFIG_ARCHIVER_INCLUDEDIR)
dnl =======================================
dnl End: Variables for config_archiverConf.sh.in
dnl =======================================
AC_OUTPUT([
Makefile
po/Makefile.in
idl/Makefile
gnome-settings-daemon/Makefile
gnome-settings-daemon/xrdb/Makefile
control-center/Makefile
libbackground/Makefile
libwindow-settings/Makefile
libwindow-settings/gnome-window-settings-2.0.pc
capplets/Makefile
capplets/common/Makefile
capplets/background/Makefile
capplets/default-applications/Makefile
capplets/desktop-links/Makefile
capplets/display/Makefile
capplets/file-types/Makefile
capplets/file-types/libuuid/Makefile
capplets/font/Makefile
capplets/keybindings/Makefile
capplets/keyboard/Makefile
capplets/mouse/Makefile
capplets/sound/Makefile
capplets/theme-switcher/Makefile
capplets/ui-properties/Makefile
capplets/accessibility/Makefile
capplets/accessibility/keyboard/Makefile
capplets/network/Makefile
capplets/windows/Makefile
schemas/Makefile
libsounds/Makefile
vfs-methods/Makefile
vfs-methods/themus/Makefile
vfs-methods/fontilus/Makefile
control-center.spec
])
dnl due to a bug in intltool we need to expand something from the root last control-center.spec
|