configure.ac 21.3 KB
Newer Older
Rui Matos's avatar
Rui Matos committed
1
m4_define([gnome_control_center_version], 3.22.1)
2
AC_INIT([gnome-control-center], [gnome_control_center_version],
Jens Granseuer's avatar
Jens Granseuer committed
3
        [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-control-center])
4

Rodrigo Moya's avatar
Rodrigo Moya committed
5
AC_CONFIG_SRCDIR([shell])
James Henstridge's avatar
James Henstridge committed
6
AC_CONFIG_HEADERS([config.h])
7
AC_CONFIG_MACRO_DIR([m4])
8

9
AM_INIT_AUTOMAKE([1.11.2 no-dist-gzip dist-xz tar-ustar check-news subdir-objects])
10
AM_MAINTAINER_MODE([enable])
11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
12

13 14 15
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])

16
# Check for programs
17
AC_PROG_CC
18
AM_PROG_CC_C_O
19 20 21 22 23
AC_HEADER_STDC

# Initialize libtool
LT_PREREQ([2.2])
LT_INIT
24

25
# Internationalization support
26

27
IT_PROG_INTLTOOL([0.40.1])
28

29
GETTEXT_PACKAGE=gnome-control-center-2.0
30
AC_SUBST(GETTEXT_PACKAGE)
31
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
32

33 34
AC_DEFINE(USER_DIR_MODE, 0700, [Permissions for creating the user's config, cache and data directories])

35 36 37
AC_PATH_XTRA
x_libs="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"

38 39
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])

40 41 42 43 44 45 46 47 48 49 50
AC_ARG_ENABLE(documentation,
              AC_HELP_STRING([--enable-documentation],
                             [build documentation]),,
              enable_documentation=yes)
if test x$enable_documentation = xyes; then
   AC_PATH_PROG([XSLTPROC], [xsltproc])
   if test x$XSLTPROC = x; then
      AC_MSG_ERROR([xsltproc is required to build documentation])
   fi
fi
AM_CONDITIONAL(BUILD_DOCUMENTATION, test x$enable_documentation = xyes)
Matthias Clasen's avatar
Matthias Clasen committed
51

52
dnl Region panel
53 54
savecppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
55
AC_CHECK_HEADERS([X11/Xlib.h])
Jens Granseuer's avatar
Jens Granseuer committed
56 57
AC_CHECK_LIB(Xxf86misc, XF86MiscQueryExtension, [
  AC_CHECK_HEADERS([X11/extensions/xf86misc.h], [XF86MISC_LIBS="-lXxf86misc"],[],
58 59 60
[#if HAVE_X11_XLIB_H
#include <X11/Xlib.h>
#endif
Jens Granseuer's avatar
Jens Granseuer committed
61
])])
62
AC_SUBST(XF86MISC_LIBS)
Jody Goldberg's avatar
Jody Goldberg committed
63
AC_CHECK_HEADERS(X11/extensions/XKB.h)
64
CPPFLAGS=$savecppflags
65

Bastien Nocera's avatar
Bastien Nocera committed
66 67
AC_CHECK_LIB(m, floor)

68
# IBus support
69
IBUS_REQUIRED_VERSION=1.5.2
70

71 72 73 74 75 76 77
AC_ARG_ENABLE(ibus,
        AS_HELP_STRING([--disable-ibus],
                       [Disable IBus support]),
        enable_ibus=$enableval,
        enable_ibus=yes)

if test "x$enable_ibus" = "xyes" ; then
78
        IBUS_MODULE="ibus-1.0 >= $IBUS_REQUIRED_VERSION"
79 80 81 82 83
        AC_DEFINE(HAVE_IBUS, 1, [Defined if IBus support is enabled])
else
        IBUS_MODULE=
fi

84 85 86
dnl ==============================================
dnl Check that we meet the  dependencies
dnl ==============================================
87

88
GLIB_REQUIRED_VERSION=2.44.0
89
GTK_REQUIRED_VERSION=3.22.0
90
PA_REQUIRED_VERSION=2.0
91
CANBERRA_REQUIRED_VERSION=0.13
92
GDKPIXBUF_REQUIRED_VERSION=2.23.0
93
POLKIT_REQUIRED_VERSION=0.103
94
GSD_REQUIRED_VERSION=3.19.1
95 96
NETWORK_MANAGER_REQUIRED_VERSION=1.2.0
NETWORK_MANAGER_APPLET_REQUIRED_VERSION=1.2.0
97
MODEM_MANAGER_REQUIRED_VERSION=0.7
98
LIBNOTIFY_REQUIRED_VERSION=0.7.3
99
GNOME_DESKTOP_REQUIRED_VERSION=3.21.2
100
SCHEMAS_REQUIRED_VERSION=3.21.4
101
LIBWACOM_REQUIRED_VERSION=0.7
102
CLUTTER_REQUIRED_VERSION=1.11.3
103
GOA_REQUIRED_VERSION=3.21.5
104
ACCOUNTSSERVICE_REQUIRED_VERSION=0.6.39
105
COLORD_REQUIRED_VERSION=0.1.34
106
COLORD_GTK_REQUIRED_VERSION=0.1.24
107
PWQUALITY_REQUIRED_VERSION=1.2.2
108
GRILO_REQUIRED_VERSION=0.3.0
109 110 111

COMMON_MODULES="gtk+-3.0 >= $GTK_REQUIRED_VERSION
 glib-2.0 >= $GLIB_REQUIRED_VERSION
112 113
 gthread-2.0
 gio-2.0
114
 gio-unix-2.0
115
 gsettings-desktop-schemas >= $SCHEMAS_REQUIRED_VERSION"
116

117
LIBGD_INIT([_view-common static])
118

119
PKG_CHECK_MODULES(LIBLANGUAGE, $COMMON_MODULES gnome-desktop-3.0 fontconfig)
120
PKG_CHECK_MODULES(LIBSHORTCUTS, $COMMON_MODULES x11)
Kalev Lember's avatar
Kalev Lember committed
121
PKG_CHECK_MODULES(SHELL, $COMMON_MODULES x11 polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
122
PKG_CHECK_MODULES(BACKGROUND_PANEL, $COMMON_MODULES cairo-gobject libxml-2.0 gnome-desktop-3.0
123 124
                  gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION
                  goa-1.0 >= $GOA_REQUIRED_VERSION
125
                  grilo-0.3 >= $GRILO_REQUIRED_VERSION)
126
PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES
127
                  gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
128 129
                  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
                  gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION)
130
PKG_CHECK_MODULES(DISPLAY_PANEL, $COMMON_MODULES gnome-desktop-3.0 >= 3.1.0
131
                  upower-glib >= 0.99.0)
132
PKG_CHECK_MODULES(INFO_PANEL, $COMMON_MODULES libgtop-2.0
133
		  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
134 135 136
PKG_CHECK_MODULES(KEYBOARD_PANEL, $COMMON_MODULES
                  gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
                  x11)
137 138
PKG_CHECK_MODULES(MEDIA_PANEL, $COMMON_MODULES)
PKG_CHECK_MODULES(MOUSE_PANEL, $COMMON_MODULES xi >= 1.2
139
                  gnome-settings-daemon >= $GSD_REQUIRED_VERSION x11)
140 141
PKG_CHECK_MODULES(NETWORK_PANEL, $COMMON_MODULES gmodule-2.0
                  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
142
PKG_CHECK_MODULES(NOTIFICATIONS_PANEL, $COMMON_MODULES)
143
PKG_CHECK_MODULES(ONLINE_ACCOUNTS_PANEL, $COMMON_MODULES goa-1.0 goa-backend-1.0 >= $GOA_REQUIRED_VERSION)
144 145 146
PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES
                  colord >= $COLORD_REQUIRED_VERSION
                  colord-gtk >= $COLORD_GTK_REQUIRED_VERSION
147
                  libsoup-2.4
148
                  gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
Robert Ancell's avatar
Robert Ancell committed
149
PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES
150
                  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
151
PKG_CHECK_MODULES(PRIVACY_PANEL, $COMMON_MODULES)
152
PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES
153
                  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
154
                  gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
Matthias Clasen's avatar
Matthias Clasen committed
155
                  accountsservice >= $ACCOUNTSSERVICE_REQUIRED_VERSION
156
                  $IBUS_MODULE)
157
PKG_CHECK_MODULES(SCREEN_PANEL, $COMMON_MODULES)
158
PKG_CHECK_MODULES(SEARCH_PANEL, $COMMON_MODULES)
159 160 161
PKG_CHECK_MODULES(SOUND_PANEL, $COMMON_MODULES libxml-2.0
                  libcanberra-gtk3 >= $CANBERRA_REQUIRED_VERSION
                  libpulse >= $PA_REQUIRED_VERSION
162 163
                  libpulse-mainloop-glib >= $PA_REQUIRED_VERSION)
PKG_CHECK_MODULES(UNIVERSAL_ACCESS_PANEL, $COMMON_MODULES)
164
PKG_CHECK_MODULES(USER_ACCOUNTS_PANEL, $COMMON_MODULES
165 166
                  polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
                  gnome-desktop-3.0
167
                  gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION
168
                  pwquality >= $PWQUALITY_REQUIRED_VERSION
169
                  accountsservice >= $ACCOUNTSSERVICE_REQUIRED_VERSION)
Kalev Lember's avatar
Kalev Lember committed
170
PKG_CHECK_MODULES(SHARING_PANEL, $COMMON_MODULES)
171
PKG_CHECK_MODULES(REMOTE_LOGIN_HELPER, glib-2.0 >= $GLIB_REQUIRED_VERSION gio-2.0)
172

173 174 175
PKG_CHECK_MODULES(GVC, gobject-2.0 libpulse libpulse-mainloop-glib)
AM_CONDITIONAL(HAVE_INTROSPECTION, false)

Rodrigo Moya's avatar
Rodrigo Moya committed
176 177 178
GDESKTOP_PREFIX=`$PKG_CONFIG --variable prefix gsettings-desktop-schemas`
AC_SUBST(GDESKTOP_PREFIX)

179 180 181 182 183
PKG_CHECK_MODULES(DEVICES, $COMMON_MODULES)
PKG_CHECK_MODULES(UDEV, gudev-1.0, have_udev=yes, have_udev=no)
if test "x$have_udev" = xyes ; then
	AC_DEFINE(HAVE_UDEV, 1, [System has udev])
fi
184
AM_CONDITIONAL(HAVE_UDEV, [test "x$have_udev" = "xyes"])
185

186 187 188 189 190 191 192
PKG_CHECK_MODULES(WAYLAND, gdk-wayland-3.0, have_wayland=yes, have_wayland=no)
if test "x$have_wayland" = xyes ; then
	if test "x$have_udev" != xyes ; then
		AC_MSG_ERROR([udev is required for Wayland support])
	fi
fi

193 194 195
PKG_CHECK_MODULES(NETWORK_MANAGER,
                  libnm >= $NETWORK_MANAGER_REQUIRED_VERSION
                  libnma >= $NETWORK_MANAGER_APPLET_REQUIRED_VERSION
196
                  mm-glib >= $MODEM_MANAGER_REQUIRED_VERSION,
197
                  [have_networkmanager=yes], have_networkmanager=no)
198
if test "x$have_networkmanager" = xno ; then
199
        AC_MSG_WARN(*** Network panel will not be built (NetworkManager or ModemManager not found) ***)
200 201
else
	AC_DEFINE(BUILD_NETWORK, 1, [Define to 1 to build the Network panel])
202 203
fi
AM_CONDITIONAL(BUILD_NETWORK, [test x$have_networkmanager = xyes])
204 205
if test x${have_networkmanager} = xyes; then
  AC_DEFINE(HAVE_NETWORK_MANAGER, 1, [Define to 1 if NetworkManager is available])
206 207 208 209
  NM_VPN_CONFIG_DIR=`$PKG_CONFIG --variable configdir NetworkManager`/VPN
  NM_VPN_MODULE_DIR=`$PKG_CONFIG --variable plugindir NetworkManager`
  AC_SUBST(NM_VPN_CONFIG_DIR)
  AC_SUBST(NM_VPN_MODULE_DIR)
210
fi
211

212 213 214 215 216 217 218 219 220 221
# Check for power panel
if test x${have_networkmanager} = xyes; then
  PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.99.0
                    libnm >= $NETWORK_MANAGER_REQUIRED_VERSION
                    gnome-settings-daemon >= $GSD_REQUIRED_VERSION)
else
  PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.99.0
                    gnome-settings-daemon >= $GSD_REQUIRED_VERSION)
fi

222
# Check for gnome-bluetooth
223
PKG_CHECK_MODULES(BLUETOOTH, $COMMON_MODULES gnome-bluetooth-1.0 >= 3.18.2,
224
		  [have_bluetooth=yes], have_bluetooth=no)
225
if test "x$have_bluetooth" = xyes ; then
226
	AC_DEFINE(BUILD_BLUETOOTH, 1, [Define to 1 to build the Bluetooth panel])
227
fi
228
AM_CONDITIONAL(BUILD_BLUETOOTH, [test x$have_bluetooth = xyes])
229 230 231
if test x${have_bluetooth} = xyes; then
  AC_DEFINE(HAVE_BLUETOOTH, 1, [Define to 1 if bluetooth support is available])
fi
232

233 234 235 236 237 238 239 240
# Check for smbclient
PKG_CHECK_MODULES(SMBCLIENT, smbclient, [have_smbclient=yes], [have_smbclient=no])

if test x"$have_smbclient" = x"no"; then
    AC_MSG_WARN(*** Printer panel will not be built (smbclient.pc not found) ***)
    enable_cups=no
fi

241
# Check for CUPS 1.4 or newer
242 243 244 245 246
AC_ARG_ENABLE([cups],
              AS_HELP_STRING([--disable-cups], [disable CUPS support (default: enabled)]),,
              [enable_cups=yes])

if test x"$enable_cups" != x"no" ; then
247 248
  AC_PROG_SED

249 250 251 252 253
  AC_PATH_PROG(CUPS_CONFIG, cups-config)

  if test x$CUPS_CONFIG = x; then
    AC_MSG_ERROR([cups-config not found but CUPS support requested])
  fi
254

255
  CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
256 257
  CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | cut -d . -f 1`
  CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | cut -d . -f 2`
258

259
  AC_CHECK_HEADERS([cups/cups.h cups/http.h cups/ipp.h cups/ppd.h],,
260 261 262 263 264
                   AC_MSG_ERROR([CUPS headers not found but CUPS support requested]))

  if ! test $CUPS_API_MAJOR -gt 1 -o \
            $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 4 ; then
    AC_MSG_ERROR([CUPS 1.4 or newer not found, but CUPS support requested])
265
  fi
266

267 268
  AC_DEFINE(BUILD_PRINTERS, 1, [Define to 1 to build the Printers panel])

269 270 271 272 273 274 275
  # https://bugzilla.gnome.org/show_bug.cgi?id=696766
  CUPS_CPPFLAGS=""
  if test $CUPS_API_MAJOR -gt 1 -o \
          $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6 ; then
     CUPS_CPPFLAGS=-D_PPD_DEPRECATED=""
  fi

276
  CUPS_CFLAGS=`$CUPS_CONFIG --cflags | $SED -e 's/-O\w*//g' -e 's/-m\w*//g'`
277
  CUPS_LIBS=`$CUPS_CONFIG --libs`
278
  AC_SUBST(CUPS_CPPFLAGS)
279
  AC_SUBST(CUPS_CFLAGS)
280
  AC_SUBST(CUPS_LIBS)
281
fi
282 283

AM_CONDITIONAL(BUILD_PRINTERS, [test x"$enable_cups" = x"yes"])
284

285
# Optional dependency for the user accounts panel
286 287
AC_ARG_WITH([cheese],
            AS_HELP_STRING([--with-cheese], [enable cheese webcam support]),,
288
            with_cheese=auto)
289

290
if test x"$with_cheese" != x"no" ; then
291
   PKG_CHECK_MODULES(CHEESE, cheese-gtk >= 3.5.91 cheese clutter-gtk-1.0, [have_cheese=yes], [have_cheese=no])
292 293 294
   if test x${have_cheese} = xyes; then
     AC_DEFINE(HAVE_CHEESE, 1, [Define to 1 to enable cheese webcam support])
   fi
295 296 297
   if test x${with_cheese} = xyes && test x${have_cheese} = xno; then
     AC_MSG_ERROR([Cheese configured but not found])
   fi
298 299
else
   have_cheese=no
300
fi
301
AM_CONDITIONAL(BUILD_CHEESE, test x${have_cheese} = xyes)
302

303 304 305 306 307 308 309 310 311
# wacom is disabled for s390/s390x and non Linux platforms (needs udev)
case $host_os in
  linux*)
    if test "$host_cpu" = s390 -o "$host_cpu" = s390x; then
      have_wacom=no
    else
      PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES
                        gnome-settings-daemon >= $GSD_REQUIRED_VERSION
                        xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION
312 313
                        gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
                        clutter-gtk-1.0
314
                        clutter-1.0 >= $CLUTTER_REQUIRED_VERSION)
315
      have_wacom=yes
316 317
      AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel])
      AC_DEFINE(HAVE_WACOM, 1, [Define to 1 is Wacom is supportted])
318 319 320 321 322 323
    fi
    ;;
  *)
    have_wacom=no
    ;;
esac
324
AM_CONDITIONAL(BUILD_WACOM, [test x${have_wacom} = xyes])
325

326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
# Kerberos kerberos support
AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
if test "$KRB5_CONFIG" = "no"; then
  AC_MSG_ERROR([krb5-config executable not found in your path - should be installed with the kerberos libraries])
fi

AC_MSG_CHECKING(for krb5 libraries and flags)
KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
KRB5_LIBS="`$KRB5_CONFIG --libs`"
AC_MSG_RESULT($KRB5_CFLAGS $KRB5_LIBS)

AC_SUBST(KRB5_CFLAGS)
AC_SUBST(KRB5_LIBS)

USER_ACCOUNTS_PANEL_CFLAGS="$USER_ACCOUNTS_PANEL_CFLAGS $KRB5_CFLAGS"
USER_ACCOUNTS_PANEL_LIBS="$USER_ACCOUNTS_PANEL_LIBS $KRB5_LIBS"

343 344 345 346 347 348 349 350 351 352 353
dnl Check for info panel
AC_ARG_WITH([gnome-session-libexecdir],
	    AS_HELP_STRING([--with-gnome-session-libexecdir=DIR], [Directory for gnome-session s libexecdir]),
	    [],
	    [with_gnome_session_libexecdir=${libexecdir}])
if test x$with_gnome_session_libexecdir == xno; then
	with_gnome_session_libexecdir=${libexecdir}
fi
AS_AC_EXPAND(GNOMESESSIONDIR, $with_gnome_session_libexecdir)
AC_SUBST([gnome_session_libexecdir], [$GNOMESESSIONDIR])

354 355 356 357
dnl =======================================
dnl Panels
dnl =======================================

358
PANEL_CFLAGS="-I\$(top_srcdir)/ -DG_LOG_DOMAIN=\"\\\"\$(cappletname)-cc-panel\\\"\" -DPANEL_ID=\"\\\"\$(cappletname)\\\"\""
359 360
AC_SUBST(PANEL_CFLAGS)

361
PANEL_LIBS=""
362 363
AC_SUBST(PANEL_LIBS)

364 365 366 367 368 369 370
dnl =======================================
dnl Update Mime Database
dnl =======================================

AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)

AC_ARG_ENABLE(update-mimedb,
371 372
   AS_HELP_STRING([--disable-update-mimedb],
                  [do not update mime database after installation]),,
373
                   enable_update_mimedb=yes)
374 375
AM_CONDITIONAL(ENABLE_UPDATE_MIMEDB, test x$enable_update_mimedb = xyes)

376 377 378
CONTROL_CENTER_VERSION=gnome_control_center_version
AC_SUBST(CONTROL_CENTER_VERSION)

379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404
dnl =======================================
dnl Finish
dnl =======================================

# Turn on the additional warnings last

AC_ARG_ENABLE(more-warnings,
              AS_HELP_STRING([--enable-more-warnings],
                             [Maximum compiler warnings]),
              set_more_warnings="$enableval",[
	      if test -d $srcdir/.git; then
	        set_more_warnings=yes
	      else
	        set_more_warnings=no
              fi])

AC_MSG_CHECKING(for more warnings)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
        AC_MSG_RESULT(yes)
        CFLAGS="\
        -Wall -Wclobbered -Wempty-body -Wignored-qualifiers \
        -Wmissing-field-initializers -Wmissing-parameter-type \
        -Wold-style-declaration -Woverride-init -Wtype-limits \
        -Wuninitialized \
        -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
        -Wnested-externs -Wpointer-arith \
405
        -Wcast-align -Wsign-compare \
406 407
        $CFLAGS"

408 409 410 411 412 413 414 415 416 417 418 419 420
	# Only add this when optimizing is enabled (default)
	AC_MSG_CHECKING([whether optimization is enabled])
	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if __OPTIMIZE__ == 0
	                                     #error No optimization
	                                     #endif
	                                   ]], [[]])],
	                  [has_optimization=yes],
	                  [has_optimization=no])
	if test $has_optimization = yes; then
		CFLAGS="$CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
	fi
	AC_MSG_RESULT($has_optimization)

421 422 423 424
        for option in -Wno-strict-aliasing -Wno-sign-compare; do
                SAVE_CFLAGS="$CFLAGS"
                CFLAGS="$CFLAGS $option"
                AC_MSG_CHECKING([whether gcc understands $option])
425 426 427
                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
                                  [has_option=yes],
                                  [has_option=no])
428 429 430 431 432 433 434 435 436 437 438 439
                if test $has_option = no; then
                        CFLAGS="$SAVE_CFLAGS"
                fi
                AC_MSG_RESULT($has_option)
                unset has_option
                unset SAVE_CFLAGS
        done
        unset option
else
        AC_MSG_RESULT(no)
fi

440 441 442 443 444 445
case $host_os in
  linux*)
    if test "$host_cpu" = s390 -o "$host_cpu" = s390x; then
      # Nothing
      echo "USB-related panels disabled on S390"
    else
446 447 448
      if test "x$have_networkmanager" != "xyes" -o \
              "x$have_bluetooth" != "xyes" -o \
              "x$enable_cups" != "xyes" -o \
449 450 451 452 453 454
              "x$have_wacom" != "xyes"; then
        AC_MSG_ERROR([The Network, Bluetooth, Printers and Wacom panels are not optional on Linux systems])
     fi
    fi
    ;;
esac
455

456
AC_CONFIG_FILES([
457
Makefile
458
panels/Makefile
459
panels/common/Makefile
460 461
panels/background/Makefile
panels/background/gnome-background-panel.desktop.in
462
panels/bluetooth/Makefile
463
panels/bluetooth/gnome-bluetooth-panel.desktop.in
464 465
panels/datetime/Makefile
panels/datetime/gnome-datetime-panel.desktop.in
466
panels/datetime/po-timezones/Makefile
Thomas Wood's avatar
Thomas Wood committed
467 468
panels/display/Makefile
panels/display/gnome-display-panel.desktop.in
469 470 471
panels/keyboard/Makefile
panels/keyboard/gnome-keyboard-panel.desktop.in
panels/keyboard/gnome-keybindings.pc
472 473
panels/region/Makefile
panels/region/gnome-region-panel.desktop.in
Thomas Wood's avatar
Thomas Wood committed
474 475
panels/mouse/Makefile
panels/mouse/gnome-mouse-panel.desktop.in
476 477 478 479 480 481 482 483 484
panels/online-accounts/Makefile
panels/online-accounts/gnome-online-accounts-panel.desktop.in
panels/online-accounts/icons/Makefile
panels/online-accounts/icons/16x16/Makefile
panels/online-accounts/icons/22x22/Makefile
panels/online-accounts/icons/24x24/Makefile
panels/online-accounts/icons/32x32/Makefile
panels/online-accounts/icons/48x48/Makefile
panels/online-accounts/icons/256x256/Makefile
485 486
panels/search/Makefile
panels/search/gnome-search-panel.desktop.in
487 488
panels/sharing/Makefile
panels/sharing/gnome-sharing-panel.desktop.in
489
panels/sound/Makefile
490
panels/sound/gvc/Makefile
491 492 493 494 495 496 497 498
panels/sound/data/Makefile
panels/sound/data/gnome-sound-panel.desktop.in
panels/sound/data/symbolic-icons/Makefile
panels/sound/data/symbolic-icons/scalable/Makefile
panels/sound/data/symbolic-icons/scalable/status/Makefile
panels/sound/data/icons/Makefile
panels/sound/data/icons/16x16/Makefile
panels/sound/data/icons/16x16/apps/Makefile
Bastien Nocera's avatar
Bastien Nocera committed
499
panels/sound/data/icons/16x16/devices/Makefile
500 501 502 503 504 505
panels/sound/data/icons/16x16/status/Makefile
panels/sound/data/icons/22x22/Makefile
panels/sound/data/icons/22x22/apps/Makefile
panels/sound/data/icons/22x22/status/Makefile
panels/sound/data/icons/24x24/Makefile
panels/sound/data/icons/24x24/apps/Makefile
Bastien Nocera's avatar
Bastien Nocera committed
506
panels/sound/data/icons/24x24/devices/Makefile
507 508 509
panels/sound/data/icons/24x24/status/Makefile
panels/sound/data/icons/32x32/Makefile
panels/sound/data/icons/32x32/apps/Makefile
Bastien Nocera's avatar
Bastien Nocera committed
510
panels/sound/data/icons/32x32/devices/Makefile
511 512 513
panels/sound/data/icons/32x32/status/Makefile
panels/sound/data/icons/48x48/Makefile
panels/sound/data/icons/48x48/apps/Makefile
Bastien Nocera's avatar
Bastien Nocera committed
514
panels/sound/data/icons/48x48/devices/Makefile
515 516 517 518
panels/sound/data/icons/scalable/Makefile
panels/sound/data/icons/scalable/apps/Makefile
panels/sound/data/icons/scalable/devices/Makefile
panels/sound/data/sounds/Makefile
519 520
panels/info/Makefile
panels/info/gnome-info-panel.desktop.in
521 522
panels/power/Makefile
panels/power/gnome-power-panel.desktop.in
523 524 525 526 527 528 529
panels/power/icons/Makefile
panels/power/icons/16x16/Makefile
panels/power/icons/22x22/Makefile
panels/power/icons/24x24/Makefile
panels/power/icons/32x32/Makefile
panels/power/icons/48x48/Makefile
panels/power/icons/256x256/Makefile
530 531
panels/color/Makefile
panels/color/gnome-color-panel.desktop.in
532 533 534 535 536 537 538 539 540
panels/color/icons/Makefile
panels/color/icons/16x16/Makefile
panels/color/icons/22x22/Makefile
panels/color/icons/24x24/Makefile
panels/color/icons/32x32/Makefile
panels/color/icons/48x48/Makefile
panels/color/icons/64x64/Makefile
panels/color/icons/256x256/Makefile
panels/color/icons/scalable/Makefile
541 542
panels/printers/Makefile
panels/printers/gnome-printers-panel.desktop.in
Matthias Clasen's avatar
Matthias Clasen committed
543 544
panels/privacy/Makefile
panels/privacy/gnome-privacy-panel.desktop.in
545
panels/network/Makefile
546 547
panels/network/wireless-security/Makefile
panels/network/connection-editor/Makefile
548
panels/network/gnome-network-panel.desktop.in
549 550
panels/notifications/Makefile
panels/notifications/gnome-notifications-panel.desktop.in
Thomas Wood's avatar
Thomas Wood committed
551 552
panels/universal-access/Makefile
panels/universal-access/gnome-universal-access-panel.desktop.in
553 554 555
panels/user-accounts/Makefile
panels/user-accounts/data/Makefile
panels/user-accounts/data/gnome-user-accounts-panel.desktop.in
556
panels/user-accounts/data/faces/Makefile
557
panels/wacom/Makefile
558
panels/wacom/calibrator/Makefile
559
panels/wacom/gnome-wacom-panel.desktop.in
560
po/Makefile.in
561
libgd/Makefile
562
search-provider/Makefile
563
shell/appdata/Makefile
564
shell/alt/Makefile
565
shell/Makefile
566
shell/gnome-control-center.desktop.in
Matthias Clasen's avatar
Matthias Clasen committed
567
man/Makefile
Jody Goldberg's avatar
Jody Goldberg committed
568
])
James Henstridge's avatar
James Henstridge committed
569

570 571
AC_OUTPUT

572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592
AC_MSG_NOTICE([gnome-control-center was configured with the following options:])
if test "x$have_networkmanager" = "xyes"; then
	AC_MSG_NOTICE([** NetworkManager (Network panel)])
else
	AC_MSG_NOTICE([   Network panel disabled])
fi
if test "x$have_bluetooth" = "xyes"; then
	AC_MSG_NOTICE([** gnome-bluetooth (Bluetooth panel)])
else
	AC_MSG_NOTICE([   Bluetooth panel disabled])
fi
if test "x$enable_cups" = "xyes"; then
	AC_MSG_NOTICE([** CUPS (Printers panel)])
else
	AC_MSG_NOTICE([   Printers panel disabled])
fi
if test "x$have_cheese" = "xyes"; then
	AC_MSG_NOTICE([** Cheese (Users panel webcam support)])
else
	AC_MSG_NOTICE([   Users panel webcam support disabled])
fi
593 594 595 596 597
if test "x$have_wacom" = "xyes"; then
	AC_MSG_NOTICE([** wacom (Wacom tablet panel)])
else
	AC_MSG_NOTICE([   Wacom panel disabled])
fi
598
if test "x$enable_ibus" = "xyes"; then
599 600 601 602
	AC_MSG_NOTICE([** IBus (Region panel IBus support)])
else
	AC_MSG_NOTICE([   Region panel IBus support disabled])
fi
603
AC_MSG_NOTICE([** gnome-session libexecdir: $GNOMESESSIONDIR])
604
AC_MSG_NOTICE([End options])