1
m4_define([gnome_control_center_version], 3.3.5)
2
AC_INIT([gnome-control-center], [gnome_control_center_version],
3
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-control-center])
5
AC_CONFIG_SRCDIR([shell])
6
AC_CONFIG_HEADERS([config.h])
7
AC_CONFIG_MACRO_DIR([m4])
9
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar])
10
AM_MAINTAINER_MODE([enable])
11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
22
# .so version for libgnome-control-center
23
LIBGNOMECONTROLCENTER_CURRENT=1
24
LIBGNOMECONTROLCENTER_REVISION=0
25
LIBGNOMECONTROLCENTER_AGE=0
26
AC_SUBST(LIBGNOMECONTROLCENTER_CURRENT)
27
AC_SUBST(LIBGNOMECONTROLCENTER_REVISION)
28
AC_SUBST(LIBGNOMECONTROLCENTER_AGE)
30
# Use the GNOME documentation framework
33
# Internationalization support
35
IT_PROG_INTLTOOL([0.40.1])
37
GETTEXT_PACKAGE=gnome-control-center-2.0
38
AC_SUBST(GETTEXT_PACKAGE)
39
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
42
GNOME_COMPILE_WARNINGS([maximum])
45
x_libs="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
47
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
50
savecppflags=$CPPFLAGS
51
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
52
AC_CHECK_HEADERS([X11/Xlib.h])
53
AC_CHECK_LIB(Xxf86misc, XF86MiscQueryExtension, [
54
AC_CHECK_HEADERS([X11/extensions/xf86misc.h], [XF86MISC_LIBS="-lXxf86misc"],[],
59
AC_SUBST(XF86MISC_LIBS)
60
AC_CHECK_HEADERS(X11/extensions/XKB.h)
61
CPPFLAGS=$savecppflags
63
AC_CHECK_LIB(m, floor)
65
AC_ARG_ENABLE([systemd],
66
AS_HELP_STRING([--enable-systemd], [Use systemd]),
67
[with_systemd=$enableval],
69
if test "$with_systemd" = "yes" ; then
70
SYSTEMD=libsystemd-login
71
AC_DEFINE(HAVE_SYSTEMD, 1, [Define to 1 if systemd is available])
76
dnl ==============================================
77
dnl Check that we meet the dependencies
78
dnl ==============================================
80
GLIB_REQUIRED_VERSION=2.31.0
81
GTK_REQUIRED_VERSION=3.3.5
82
DESKTOP_SCHEMAS_REQUIRED_VERSION=3.0.2
83
PA_REQUIRED_VERSION=0.9.16
84
CANBERRA_REQUIRED_VERSION=0.13
85
GDKPIXBUF_REQUIRED_VERSION=2.23.0
86
POLKIT_REQUIRED_VERSION=0.97
87
GSD_REQUIRED_VERSION=3.3.4
88
NETWORK_MANAGER_REQUIRED_VERSION=0.8.992
89
LIBNOTIFY_REQUIRED_VERSION=0.7.3
90
GNOME_DESKTOP_REQUIRED_VERSION=3.1.91
91
SCHEMAS_REQUIRED_VERSION=3.3.0
92
LIBWACOM_REQUIRED_VERSION=0.3
94
COMMON_MODULES="gtk+-3.0 >= $GTK_REQUIRED_VERSION
95
glib-2.0 >= $GLIB_REQUIRED_VERSION
99
gsettings-desktop-schemas >= $DESKTOP_SCHEMAS_REQUIRED_VERSION
100
libnotify >= $LIBNOTIFY_REQUIRED_VERSION"
102
PKG_CHECK_MODULES(LIBGNOME_CONTROL_CENTER, $COMMON_MODULES gconf-2.0)
103
PKG_CHECK_MODULES(LIBLANGUAGE, $COMMON_MODULES gnome-desktop-3.0 fontconfig)
104
PKG_CHECK_MODULES(LIBSHORTCUTS, $COMMON_MODULES x11)
105
PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0)
106
PKG_CHECK_MODULES(BACKGROUND_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0
107
gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION gconf-2.0)
108
PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES dbus-glib-1
109
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
110
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
111
gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
112
PKG_CHECK_MODULES(DISPLAY_PANEL, $COMMON_MODULES gnome-desktop-3.0 >= 3.1.0)
113
PKG_CHECK_MODULES(INFO_PANEL, $COMMON_MODULES libgtop-2.0
114
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
115
PKG_CHECK_MODULES(KEYBOARD_PANEL, $COMMON_MODULES x11)
116
PKG_CHECK_MODULES(MEDIA_PANEL, $COMMON_MODULES)
117
PKG_CHECK_MODULES(MOUSE_PANEL, $COMMON_MODULES xi >= 1.2
118
gnome-settings-daemon >= $GSD_REQUIRED_VERSION x11)
119
PKG_CHECK_MODULES(NETWORK_PANEL, $COMMON_MODULES)
120
PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0)
121
PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1
122
gnome-settings-daemon >= $GSD_REQUIRED_VERSION)
123
PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES colord >= 0.1.8)
124
PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES dbus-glib-1
125
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
126
PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES libgnomekbd >= 2.91.91
127
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
128
libxklavier >= 5.1 libgnomekbdui >= 2.91.91)
129
PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES)
130
PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0
131
libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION
132
libpulse >= $PA_REQUIRED_VERSION
133
libpulse-mainloop-glib >= $PA_REQUIRED_VERSION
134
gsettings-desktop-schemas >= $SCHEMAS_REQUIRED_VERSION
136
PKG_CHECK_MODULES(UNIVERSAL_ACCESS_PANEL, $COMMON_MODULES gconf-2.0)
137
PKG_CHECK_MODULES(USER_ACCOUNTS_PANEL, $COMMON_MODULES dbus-glib-1
138
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
140
gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION
142
PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES
143
gnome-settings-daemon >= $GSD_REQUIRED_VERSION
144
xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
145
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
147
GDESKTOP_PREFIX=`$PKG_CONFIG --variable prefix gsettings-desktop-schemas`
148
AC_SUBST(GDESKTOP_PREFIX)
150
# Check for NetworkManager ~0.9
151
PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager >= $NETWORK_MANAGER_REQUIRED_VERSION
152
libnm-glib >= $NETWORK_MANAGER_REQUIRED_VERSION
153
libnm-util >= $NETWORK_MANAGER_REQUIRED_VERSION
154
libnm-gtk >= $NETWORK_MANAGER_REQUIRED_VERSION,
155
[have_networkmanager=yes], have_networkmanager=no)
156
if test "x$have_networkmanager" = xno ; then
157
AC_MSG_WARN(*** Network panel will not be built (NetworkManager ~0.9 or newer not found) ***)
159
AM_CONDITIONAL(BUILD_NETWORK, [test x$have_networkmanager = xyes])
161
# Check for gnome-bluetooth
162
PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.3.4,
163
[have_bluetooth=yes], have_bluetooth=no)
164
AM_CONDITIONAL(BUILD_BLUETOOTH, [test x$have_bluetooth = xyes])
166
# Check for CUPS 1.4 or newer
167
AC_ARG_ENABLE([cups],
168
AS_HELP_STRING([--disable-cups], [disable CUPS support (default: enabled)]),,
171
if test x"$enable_cups" != x"no" ; then
174
AC_PATH_PROG(CUPS_CONFIG, cups-config,
175
AC_MSG_ERROR([cups-config not found but CUPS support requested]))
177
CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
178
CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | cut -d . -f 1`
179
CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | cut -d . -f 2`
181
AC_CHECK_HEADERS([cups/cups.h cups/http.h cups/ipp.h cups/ppd.h],,
182
AC_MSG_ERROR([CUPS headers not found but CUPS support requested]))
184
if ! test $CUPS_API_MAJOR -gt 1 -o \
185
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 4 ; then
186
AC_MSG_ERROR([CUPS 1.4 or newer not found, but CUPS support requested])
189
CUPS_CFLAGS=`$CUPS_CONFIG --cflags | $SED -e 's/-O\w*//g' -e 's/-m\w*//g'`
190
CUPS_LIBS=`$CUPS_CONFIG --libs`
191
AC_SUBST(CUPS_CFLAGS)
195
AM_CONDITIONAL(BUILD_PRINTERS, [test x"$enable_cups" = x"yes"])
197
# Optional dependency for the user accounts panel
198
AC_ARG_WITH([cheese],
199
AS_HELP_STRING([--with-cheese], [enable cheese webcam support]),,
202
if test x"$with_cheese" != x"no" ; then
203
PKG_CHECK_MODULES(CHEESE, gstreamer-0.10 cheese >= 3.3.5 cheese-gtk >= 3.3.5, [have_cheese=yes], [have_cheese=no])
204
if test x${have_cheese} = xyes; then
205
AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
207
if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
208
AC_MSG_ERROR([Cheese configured but not found])
213
AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
215
# This is a hard-dependency for the region and user-accounts panels
216
PKG_CHECK_MODULES(ISOCODES, iso-codes)
218
AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
221
dnl ==============================================
222
dnl End: Check that we meet the dependencies
223
dnl ==============================================
225
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal, no)
227
if test x"$GLIB_GENMARSHAL" = xno; then
228
AC_MSG_ERROR([glib-genmarshal executable not found in your path - should be installed with glib])
231
AC_SUBST(GLIB_GENMARSHAL)
233
dnl =======================================
235
dnl =======================================
237
PANELS_DIR="${libdir}/control-center-1/panels"
240
PANEL_CFLAGS="-I\$(top_srcdir)/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-cc-panel\\\"\""
241
AC_SUBST(PANEL_CFLAGS)
243
PANEL_LIBS="\$(top_builddir)/libgnome-control-center/libgnome-control-center.la"
246
PANEL_LDFLAGS="-export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)'"
247
AC_SUBST(PANEL_LDFLAGS)
249
dnl ==============================================
251
dnl ==============================================
253
AC_MSG_CHECKING([Enable libsocialweb support])
254
AC_ARG_WITH([libsocialweb],
255
AS_HELP_STRING([--with-libsocialweb],
256
[enable libsocialweb support]),,
257
[with_libsocialweb=no])
258
AC_MSG_RESULT([$with_libsocialweb])
260
if test "x$with_libsocialweb" == "xyes"; then
261
PKG_CHECK_MODULES(SOCIALWEB, libsocialweb-client)
262
AC_DEFINE(HAVE_LIBSOCIALWEB, 1, [Defined if libsocialweb is available])
264
AM_CONDITIONAL(WITH_LIBSOCIALWEB, test "x$with_libsocialweb" = "xyes")
267
dnl =======================================
268
dnl Update Mime Database
269
dnl =======================================
271
AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
273
AC_ARG_ENABLE(update-mimedb,
274
AS_HELP_STRING([--disable-update-mimedb],
275
[do not update mime database after installation]),,
276
enable_update_mimedb=yes)
277
AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)
279
CONTROL_CENTER_VERSION=gnome_control_center_version
280
AC_SUBST(CONTROL_CENTER_VERSION)
282
dnl =======================================
284
dnl =======================================
286
# Turn on the additional warnings last
288
AC_ARG_ENABLE(more-warnings,
289
AS_HELP_STRING([--enable-more-warnings],
290
[Maximum compiler warnings]),
291
set_more_warnings="$enableval",[
292
if test -d $srcdir/.git; then
293
set_more_warnings=yes
298
AC_MSG_CHECKING(for more warnings)
299
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
302
-Wall -Wclobbered -Wempty-body -Wignored-qualifiers \
303
-Wmissing-field-initializers -Wmissing-parameter-type \
304
-Wold-style-declaration -Woverride-init -Wtype-limits \
306
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
307
-Wnested-externs -Wpointer-arith \
308
-Wcast-align -Wsign-compare -Wp,-D_FORTIFY_SOURCE=2 \
311
for option in -Wno-strict-aliasing -Wno-sign-compare; do
312
SAVE_CFLAGS="$CFLAGS"
313
CFLAGS="$CFLAGS $option"
314
AC_MSG_CHECKING([whether gcc understands $option])
315
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
318
if test $has_option = no; then
319
CFLAGS="$SAVE_CFLAGS"
321
AC_MSG_RESULT($has_option)
334
libgnome-control-center/Makefile
335
libgnome-control-center/libgnome-control-center.pc
337
panels/common/Makefile
338
panels/background/Makefile
339
panels/background/gnome-background-panel.desktop.in
340
panels/bluetooth/Makefile
341
panels/bluetooth/bluetooth-properties.desktop.in
342
panels/datetime/Makefile
343
panels/datetime/gnome-datetime-panel.desktop.in
344
panels/datetime/po-timezones/Makefile
345
panels/display/Makefile
346
panels/display/gnome-display-panel.desktop.in
347
panels/keyboard/Makefile
348
panels/keyboard/gnome-keyboard-panel.desktop.in
349
panels/keyboard/gnome-keybindings.pc
350
panels/region/Makefile
351
panels/region/gnome-region-panel.desktop.in
352
panels/mouse/Makefile
353
panels/mouse/gnome-mouse-panel.desktop.in
354
panels/online-accounts/Makefile
355
panels/online-accounts/gnome-online-accounts-panel.desktop.in
356
panels/online-accounts/icons/Makefile
357
panels/online-accounts/icons/16x16/Makefile
358
panels/online-accounts/icons/22x22/Makefile
359
panels/online-accounts/icons/24x24/Makefile
360
panels/online-accounts/icons/32x32/Makefile
361
panels/online-accounts/icons/48x48/Makefile
362
panels/online-accounts/icons/256x256/Makefile
363
panels/sound-nua/Makefile
364
panels/sound-nua/data/Makefile
365
panels/sound-nua/data/gnome-sound-nua-panel.desktop.in
366
panels/sound/Makefile
367
panels/sound/data/Makefile
368
panels/sound/data/gnome-sound-panel.desktop.in
369
panels/sound/data/symbolic-icons/Makefile
370
panels/sound/data/symbolic-icons/scalable/Makefile
371
panels/sound/data/symbolic-icons/scalable/status/Makefile
372
panels/sound/data/icons/Makefile
373
panels/sound/data/icons/16x16/Makefile
374
panels/sound/data/icons/16x16/apps/Makefile
375
panels/sound/data/icons/16x16/devices/Makefile
376
panels/sound/data/icons/16x16/status/Makefile
377
panels/sound/data/icons/22x22/Makefile
378
panels/sound/data/icons/22x22/apps/Makefile
379
panels/sound/data/icons/22x22/status/Makefile
380
panels/sound/data/icons/24x24/Makefile
381
panels/sound/data/icons/24x24/apps/Makefile
382
panels/sound/data/icons/24x24/devices/Makefile
383
panels/sound/data/icons/24x24/status/Makefile
384
panels/sound/data/icons/32x32/Makefile
385
panels/sound/data/icons/32x32/apps/Makefile
386
panels/sound/data/icons/32x32/devices/Makefile
387
panels/sound/data/icons/32x32/status/Makefile
388
panels/sound/data/icons/48x48/Makefile
389
panels/sound/data/icons/48x48/apps/Makefile
390
panels/sound/data/icons/48x48/devices/Makefile
391
panels/sound/data/icons/scalable/Makefile
392
panels/sound/data/icons/scalable/apps/Makefile
393
panels/sound/data/icons/scalable/devices/Makefile
394
panels/sound/data/sounds/Makefile
395
panels/screen/Makefile
396
panels/screen/gnome-screen-panel.desktop.in
398
panels/info/gnome-info-panel.desktop.in
399
panels/power/Makefile
400
panels/power/gnome-power-panel.desktop.in
401
panels/power/icons/Makefile
402
panels/power/icons/16x16/Makefile
403
panels/power/icons/22x22/Makefile
404
panels/power/icons/24x24/Makefile
405
panels/power/icons/32x32/Makefile
406
panels/power/icons/48x48/Makefile
407
panels/power/icons/256x256/Makefile
408
panels/color/Makefile
409
panels/color/gnome-color-panel.desktop.in
410
panels/color/icons/Makefile
411
panels/color/icons/16x16/Makefile
412
panels/color/icons/22x22/Makefile
413
panels/color/icons/24x24/Makefile
414
panels/color/icons/32x32/Makefile
415
panels/color/icons/48x48/Makefile
416
panels/color/icons/64x64/Makefile
417
panels/color/icons/256x256/Makefile
418
panels/color/icons/scalable/Makefile
419
panels/printers/Makefile
420
panels/printers/gnome-printers-panel.desktop.in
421
panels/network/Makefile
422
panels/network/gnome-network-panel.desktop.in
423
panels/universal-access/Makefile
424
panels/universal-access/gnome-universal-access-panel.desktop.in
425
panels/user-accounts/Makefile
426
panels/user-accounts/data/Makefile
427
panels/user-accounts/data/gnome-user-accounts-panel.desktop.in
428
panels/user-accounts/data/faces/Makefile
429
panels/user-accounts/data/icons/Makefile
430
panels/wacom/Makefile
431
panels/wacom/calibrator/Makefile
432
panels/wacom/gnome-wacom-panel.desktop.in
435
shell/gnome-control-center.desktop.in
438
AC_MSG_NOTICE([gnome-control-center was configured with the following options:])
439
if test "x$have_networkmanager" = "xyes"; then
440
AC_MSG_NOTICE([** NetworkManager (Network panel)])
442
AC_MSG_NOTICE([ Network panel disabled])
444
if test "x$have_bluetooth" = "xyes"; then
445
AC_MSG_NOTICE([** gnome-bluetooth (Bluetooth panel)])
447
AC_MSG_NOTICE([ Bluetooth panel disabled])
449
if test "x$enable_cups" = "xyes"; then
450
AC_MSG_NOTICE([** CUPS (Printers panel)])
452
AC_MSG_NOTICE([ Printers panel disabled])
454
if test "x$have_cheese" = "xyes"; then
455
AC_MSG_NOTICE([** Cheese (Users panel webcam support)])
457
AC_MSG_NOTICE([ Users panel webcam support disabled])
459
if test "x$with_libsocialweb" = "xyes"; then
460
AC_MSG_NOTICE([** libsocialweb (Background panel Flickr support)])
462
AC_MSG_NOTICE([ Background panel Flickr support disabled])
464
if test "x$with_systemd" = "xyes"; then
465
AC_MSG_NOTICE([** systemd (Systemd session tracking)])
467
AC_MSG_NOTICE([ Using ConsoleKit for session tracking])
469
AC_MSG_NOTICE([End options])