gnome-control-center/configure.ac
Thomas Wood 8aedeff4ca Disable Window settings from the build
Window settings are not planned to be included in the next release, so
remove the window settings capplet from the build.
2010-05-24 21:51:28 +01:00

420 lines
13 KiB
Text

m4_define([gnome_control_center_version], 2.31.1)
AC_INIT([gnome-control-center], [gnome_control_center_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-control-center])
AC_CONFIG_SRCDIR([shell])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2 tar-ustar])
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
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
# 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 app indicator
APPINDICATOR_REQUIRED=0.0.7
AC_ARG_ENABLE(appindicator,
AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for application indicators ]),
[enable_appindicator=$enableval],
[enable_appindicator="auto"])
if test x$enable_appindicator = xauto ; then
PKG_CHECK_EXISTS([appindicator-0.1 >= $APPINDICATOR_REQUIRED],
enable_appindicator="yes",
enable_appindicator="no")
fi
if test x$enable_appindicator = xyes ; then
PKG_CHECK_EXISTS([appindicator-0.1 >= $APPINDICATOR_REQUIRED],,
AC_MSG_ERROR([appindicator-0.1 is not installed]))
PKG_CHECK_MODULES(APP_INDICATOR,
appindicator-0.1 >= $APPINDICATOR_REQUIRED)
AC_SUBST(APP_INDICATOR_CFLAGS)
AC_SUBST(APP_INDICATOR_LIBS)
AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator])
fi
AM_CONDITIONAL(HAVE_APP_INDICATOR, test x"$enable_appindicator" = xyes)
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
AC_CHECK_LIB(m, floor)
dnl ==============================================
dnl Check that we meet the dependencies
dnl ==============================================
COMMON_MODULES="gtk+-2.0 >= 2.20.0 dnl
glib-2.0 >= 2.17.4 dnl
gthread-2.0 dnl
gio-2.0 dnl
gconf-2.0 dnl
libxml-2.0 dnl
gnome-desktop-2.0 >= 2.29.4"
PKG_CHECK_MODULES(CAPPLET, $COMMON_MODULES)
PKG_CHECK_MODULES(GNOMECC, $COMMON_MODULES libgnome-menu >= 2.10.1)
PKG_CHECK_MODULES(GNOMECC_SHELL, $COMMON_MODULES libgnome-menu unique-1.0 gio-unix-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)
PKG_CHECK_MODULES(GLIB, glib-2.0)
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)
PKG_CHECK_MODULES(AT_CAPPLET, $COMMON_MODULES)
PKG_CHECK_MODULES(DISPLAY_CAPPLET, $COMMON_MODULES)
DISPLAY_CAPPLET_LIBS="$DISPLAY_CAPPLET_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 X Input library >= 1.2 with property support
dnl =============================================
have_xinput=no
PKG_CHECK_MODULES(XINPUT, [xi >= 1.2],
have_xinput=yes
AC_DEFINE(HAVE_XINPUT, 1, [Define if the XInput extension is available]),
have_xinput=no)
AM_CONDITIONAL(HAVE_XINPUT, [test $have_xinput=yes])
AC_SUBST(XINPUT_CFLAGS)
AC_SUBST(XINPUT_LIBS)
CAPPLET_LIBS="$CAPPLET_LIBS $XINPUT_LIBS"
dnl ==============
dnl gswitchit
dnl ==============
PKG_CHECK_MODULES(LIBGNOMEKBD, [libgnomekbd >= 2.31.1 libxklavier >= 4.0])
AC_SUBST(LIBGNOMEKBD_CFLAGS)
AC_SUBST(LIBGNOMEKBD_LIBS)
PKG_CHECK_MODULES(LIBGNOMEKBDUI, [libgnomekbdui >= 2.31.1])
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])])
fi
AM_CONDITIONAL(BUILD_ABOUTME, test "x$enable_aboutme" = "xyes")
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 \$(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 Panels
dnl =======================================
PANELS_DIR="${libdir}/control-center-1/panels"
AC_SUBST(PANELS_DIR)
PANEL_CFLAGS="-I\$(top_srcdir)/libgnome-control-center/"
AC_SUBST(PANEL_CFLAGS)
PANEL_LIBS="\$(top_builddir)/libgnome-control-center/libgnome-control-center.la"
AC_SUBST(PANEL_LIBS)
PANEL_LDFLAGS="-export_dynamic -avoid-version -module -no-undefined -export-symbols-regex '^g_io_module_(load|unload)'"
AC_SUBST(PANEL_LDFLAGS)
dnl ==============================================
dnl Example Panel
dnl ==============================================
AC_MSG_CHECKING([whether to build the example panel])
AC_ARG_ENABLE([examples],
AC_HELP_STRING([--enable-examples],
[enable the examples]),,
[enable_examples=no])
AC_MSG_RESULT([$enable_examples])
AM_CONDITIONAL(BUILD_EXAMPLES, test "x$enable_examples" = "xyes")
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)
# check for gtk-doc
GTK_DOC_CHECK([1.9])
CONTROL_CENTER_VERSION=gnome_control_center_version
AC_SUBST(CONTROL_CENTER_VERSION)
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 \
-Wcast-align -Wsign-compare -Wp,-D_FORTIFY_SOURCE=2 \
$CFLAGS"
for option in -Wno-strict-aliasing -Wno-sign-compare; do
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
AC_MSG_CHECKING([whether gcc understands $option])
AC_TRY_COMPILE([], [],
has_option=yes,
has_option=no,)
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
AC_CONFIG_FILES([
Makefile
capplets/Makefile
capplets/about-me/Makefile
capplets/about-me/gnome-about-me.desktop.in
capplets/about-me/icons/Makefile
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
panels/default-applications/Makefile
panels/default-applications/default-applications.desktop.in
panels/default-applications/gnome-at-commandline.in
panels/default-applications/gnome-at-session.desktop.in
panels/default-applications/gnome-default-applications.pc
capplets/display/Makefile
capplets/display/display-properties.desktop.in
panels/keybindings/Makefile
panels/keybindings/gnome-keybindings.pc
panels/keybindings/keybinding.desktop.in
docs/Makefile
docs/reference/Makefile
docs/reference/libgnome-control-center/Makefile
docs/reference/libgnome-control-center/version.xml
examples/Makefile
examples/gnome-example-panel.desktop.in
font-viewer/Makefile
font-viewer/gnome-font-viewer.desktop.in
help/Makefile
libgnome-control-center/Makefile
libgnome-control-center/libgnome-control-center.pc
libwindow-settings/Makefile
libwindow-settings/gnome-window-settings-2.0.pc
panels/Makefile
panels/mouse/Makefile
panels/mouse/gnome-settings-mouse.desktop.in
panels/keyboard/Makefile
panels/keyboard/keyboard.desktop.in
panels/network/Makefile
panels/network/gnome-network-properties.desktop.in
po/Makefile.in
shell/Makefile
shell/gnome-control-center.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