configure.ac 7.02 KB
Newer Older
1
AC_PREREQ(2.63)
Florian Müllner's avatar
Florian Müllner committed
2
AC_INIT([gnome-shell],[3.9.5],[https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-shell],[gnome-shell])
Owen Taylor's avatar
Owen Taylor committed
3

4 5 6 7
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/shell-global.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])
Owen Taylor's avatar
Owen Taylor committed
8

9 10 11
AC_SUBST([PACKAGE_NAME], ["$PACKAGE_NAME"])
AC_SUBST([PACKAGE_VERSION], ["$PACKAGE_VERSION"])

12
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar foreign])
13
AM_MAINTAINER_MODE([enable])
14

15
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
Owen Taylor's avatar
Owen Taylor committed
16

17
# Checks for programs.
Owen Taylor's avatar
Owen Taylor committed
18 19
AC_PROG_CC

20 21 22 23
# Initialize libtool
LT_PREREQ([2.2.6])
LT_INIT([disable-static])

24 25 26 27 28 29
# i18n
IT_PROG_INTLTOOL([0.40])

AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.17])

30
GETTEXT_PACKAGE=gnome-shell
31 32 33
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
                   [The prefix for our gettext translation domains.])
34 35

PKG_PROG_PKG_CONFIG([0.22])
Colin Walters's avatar
Colin Walters committed
36

37 38
AC_PATH_PROG([XSLTPROC], [xsltproc])

39 40
GLIB_GSETTINGS

41 42 43 44
# Get a value to substitute into gnome-shell.in
AM_PATH_PYTHON([2.5])
AC_SUBST(PYTHON)

45 46
# We need at least this, since gst_plugin_register_static() was added
# in 0.10.16, but nothing older than 0.10.21 has been tested.
47
GSTREAMER_MIN_VERSION=0.11.92
48 49 50 51

recorder_modules=
build_recorder=false
AC_MSG_CHECKING([for GStreamer (needed for recording functionality)])
52
if $PKG_CONFIG --exists gstreamer-1.0 '>=' $GSTREAMER_MIN_VERSION ; then
53 54
   AC_MSG_RESULT(yes)
   build_recorder=true
55
   recorder_modules="gstreamer-1.0 gstreamer-base-1.0 x11 gtk+-3.0"
56
   PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes)
57 58 59 60 61 62
else
   AC_MSG_RESULT(no)
fi

AM_CONDITIONAL(BUILD_RECORDER, $build_recorder)

63
CLUTTER_MIN_VERSION=1.13.4
Colin Walters's avatar
Colin Walters committed
64
GOBJECT_INTROSPECTION_MIN_VERSION=0.10.1
Rico Tzschichholz's avatar
Rico Tzschichholz committed
65
GJS_MIN_VERSION=1.35.4
Florian Müllner's avatar
Florian Müllner committed
66
MUTTER_MIN_VERSION=3.9.5
67
GTK_MIN_VERSION=3.7.9
68
GIO_MIN_VERSION=2.37.0
69 70
LIBECAL_MIN_VERSION=3.5.3
LIBEDATASERVER_MIN_VERSION=3.5.3
71
TELEPATHY_GLIB_MIN_VERSION=0.17.5
72
POLKIT_MIN_VERSION=0.100
73
STARTUP_NOTIFICATION_MIN_VERSION=0.11
74
GCR_MIN_VERSION=3.7.5
75
GNOME_DESKTOP_REQUIRED_VERSION=3.7.90
76
GNOME_MENUS_REQUIRED_VERSION=3.5.3
77
NETWORKMANAGER_MIN_VERSION=0.9.8
78
PULSE_MIN_VERS=2.0
79

80
# Collect more than 20 libraries for a prize!
81 82
PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
			       libxml-2.0
83
                               gtk+-3.0 >= $GTK_MIN_VERSION
Bastien Nocera's avatar
Bastien Nocera committed
84
                               atk-bridge-2.0
85
                               libmutter >= $MUTTER_MIN_VERSION
86
                               gjs-internals-1.0 >= $GJS_MIN_VERSION
87 88
			       libgnome-menu-3.0 >= $GNOME_MENUS_REQUIRED_VERSION
                               $recorder_modules
89
                               gdk-x11-3.0 libsoup-2.4
90 91
			       clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
			       clutter-glx-1.0 >= $CLUTTER_MIN_VERSION
92
                               libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
93
                               gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
94
			       libcanberra libcanberra-gtk3
95
                               telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
96
                               polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
97 98
                               libnm-glib libnm-util >= $NETWORKMANAGER_MIN_VERSION
                               libnm-gtk >= $NETWORKMANAGER_MIN_VERSION
99
                               libsecret-unstable gcr-base-3 >= $GCR_MIN_VERSION)
100

101 102
PKG_CHECK_MODULES(GNOME_SHELL_JS, gio-2.0 gjs-internals-1.0 >= $GJS_MIN_VERSION)
PKG_CHECK_MODULES(ST, clutter-1.0 gtk+-3.0 libcroco-0.6 >= 0.6.8 x11)
103
PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
104
PKG_CHECK_MODULES(SHELL_HOTPLUG_SNIFFER, gio-2.0 gdk-pixbuf-2.0)
105
PKG_CHECK_MODULES(BROWSER_PLUGIN, gio-2.0 >= $GIO_MIN_VERSION json-glib-1.0 >= 0.13.2)
106
PKG_CHECK_MODULES(TRAY, gtk+-3.0)
107
PKG_CHECK_MODULES(GVC, libpulse >= $PULSE_MIN_VERS libpulse-mainloop-glib gobject-2.0)
108
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 3.7.4)
109
PKG_CHECK_MODULES(CARIBOU, caribou-1.0 >= 0.4.8)
110

111
AC_MSG_CHECKING([for bluetooth support])
112
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.9.0],
113 114
        [BLUETOOTH_DIR=`$PKG_CONFIG --variable=applet_libdir gnome-bluetooth-1.0`
	 BLUETOOTH_LIBS=`$PKG_CONFIG --variable=applet_libs gnome-bluetooth-1.0`
115
	 AC_SUBST([BLUETOOTH_LIBS],["$BLUETOOTH_LIBS"])
116
	 AC_SUBST([BLUETOOTH_DIR],["$BLUETOOTH_DIR"])
117 118 119 120 121
	 AC_DEFINE_UNQUOTED([BLUETOOTH_DIR],["$BLUETOOTH_DIR"],[Path to installed GnomeBluetooth typelib and library])
	 AC_DEFINE([HAVE_BLUETOOTH],[1],[Define if you have libgnome-bluetooth-applet])
	 AC_SUBST([HAVE_BLUETOOTH],[1])
	 AC_MSG_RESULT([yes])],
	[AC_DEFINE([HAVE_BLUETOOTH],[0])
122
	 AC_SUBST([HAVE_BLUETOOTH],[0])
123 124
	 AC_MSG_RESULT([no])])

125
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION gio-2.0)
126 127
AC_SUBST(CALENDAR_SERVER_CFLAGS)
AC_SUBST(CALENDAR_SERVER_LIBS)
128

129 130 131 132 133
GNOME_KEYBINDINGS_KEYSDIR=`$PKG_CONFIG --variable keysdir gnome-keybindings`
AC_SUBST([GNOME_KEYBINDINGS_KEYSDIR])

GOBJECT_INTROSPECTION_CHECK([$GOBJECT_INTROSPECTION_MIN_VERSION])

134 135
MUTTER_GIR_DIR=`$PKG_CONFIG --variable=girdir libmutter`
MUTTER_TYPELIB_DIR=`$PKG_CONFIG --variable=typelibdir libmutter`
136 137
AC_SUBST(MUTTER_GIR_DIR)
AC_SUBST(MUTTER_TYPELIB_DIR)
138

139 140
GJS_CONSOLE=`$PKG_CONFIG --variable=gjs_console gjs-1.0`
AC_SUBST(GJS_CONSOLE)
141

142
AC_CHECK_FUNCS(fdwalk)
143
AC_CHECK_FUNCS(mallinfo)
144 145
AC_CHECK_HEADERS([sys/resource.h])

146 147 148 149 150 151 152 153 154 155 156
# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],
                                   [[nl_langinfo(_NL_TIME_FIRST_WEEKDAY);]])],
               [langinfo_ok=yes], [langinfo_ok=no])
AC_MSG_RESULT($langinfo_ok)
if test "$langinfo_ok" = "yes"; then
  AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
            [Define if _NL_TIME_FIRST_WEEKDAY is available])
fi

157 158
# Sets GLIB_GENMARSHAL and GLIB_MKENUMS
AM_PATH_GLIB_2_0()
Owen Taylor's avatar
Owen Taylor committed
159

160 161
GTK_DOC_CHECK([1.15], [--flavour no-tmpl])

162 163 164 165 166 167 168 169 170 171 172 173
AC_ARG_ENABLE(man,
              [AS_HELP_STRING([--enable-man],
                              [generate man pages [default=yes]])],,
              enable_man=yes)
if test "$enable_man" != no; then
  AC_PATH_PROG([XSLTPROC], [xsltproc])
  if test -z "$XSLTPROC"; then
    AC_MSG_ERROR([xsltproc is required for --enable-man])
  fi
fi
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)

174
GNOME_COMPILE_WARNINGS([error])
Owen Taylor's avatar
Owen Taylor committed
175

176
AC_ARG_ENABLE(jhbuild-wrapper-script,
177
  AS_HELP_STRING([--enable-jhbuild-wrapper-script],[Make "gnome-shell" script work for jhbuild]),,enable_jhbuild_wrapper_script=no)
178 179
AM_CONDITIONAL(USE_JHBUILD_WRAPPER_SCRIPT, test "x$enable_jhbuild_wrapper_script" = xyes)

180 181 182
BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}"
AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])

183
AC_CONFIG_FILES([
Owen Taylor's avatar
Owen Taylor committed
184
  Makefile
185
  data/Makefile
186 187 188 189 190 191
  docs/Makefile
  docs/reference/Makefile
  docs/reference/shell/Makefile
  docs/reference/shell/shell-docs.sgml
  docs/reference/st/Makefile
  docs/reference/st/st-docs.sgml
192
  js/Makefile
193
  src/calendar-server/evolution-calendar.desktop.in
Owen Taylor's avatar
Owen Taylor committed
194
  src/Makefile
195
  src/gvc/Makefile
196
  browser-plugin/Makefile
197
  tests/Makefile
Colin Walters's avatar
Colin Walters committed
198
  po/Makefile.in
199
  man/Makefile
Owen Taylor's avatar
Owen Taylor committed
200
])
201
AC_OUTPUT