3
# Fibonacci sequence for micro version numbering:
4
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
5
AC_INIT([metacity], [2.12.1],
6
[http://bugzilla.gnome.org/enter_bug.cgi?product=metacity])
8
AC_CONFIG_SRCDIR(src/display.c)
9
AC_CONFIG_HEADERS(config.h)
15
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
17
GETTEXT_PACKAGE=metacity
18
AC_SUBST(GETTEXT_PACKAGE)
19
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain])
21
AC_PROG_INTLTOOL([0.21])
31
AC_CHECK_SIZEOF(short)
34
AC_CHECK_SIZEOF(void *)
35
AC_CHECK_SIZEOF(long long)
36
AC_CHECK_SIZEOF(__int64)
44
if test "x$GCC" = "xyes"; then
46
*[\ \ ]-Wall[\ \ ]*) ;;
47
*) CFLAGS="$CFLAGS -Wall" ;;
51
# *[\ \ ]-Wshadow[\ \ ]*) ;;
52
# *) CFLAGS="$CFLAGS -Wshadow" ;;
56
*[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
57
*) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
61
*[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
62
*) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
66
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
67
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
71
*[\ \ ]-Wnested-externs[\ \ ]*) ;;
72
*) CFLAGS="$CFLAGS -Wnested-externs" ;;
76
*[\ \ ]-Wpointer-arith[\ \ ]*) ;;
77
*) CFLAGS="$CFLAGS -Wpointer-arith" ;;
81
*[\ \ ]-Wcast-align[\ \ ]*) ;;
82
*) CFLAGS="$CFLAGS -Wcast-align" ;;
86
*[\ \ ]-Wsign-compare[\ \ ]*) ;;
87
*) CFLAGS="$CFLAGS -Wsign-compare" ;;
90
if test "x$enable_ansi" = "xyes"; then
92
*[\ \ ]-ansi[\ \ ]*) ;;
93
*) CFLAGS="$CFLAGS -ansi" ;;
97
*[\ \ ]-pedantic[\ \ ]*) ;;
98
*) CFLAGS="$CFLAGS -pedantic" ;;
104
METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.0'
107
AC_HELP_STRING([--disable-gconf],
108
[disable gconf usage, for embedded/size-sensitive non-GNOME builds]),,
111
if test x$enable_gconf = xyes; then
112
AC_DEFINE(HAVE_GCONF,1,[Build with gconf support])
113
METACITY_PC_MODULES="$METACITY_PC_MODULES gconf-2.0 >= 1.2.0"
116
AC_ARG_ENABLE(verbose-mode,
117
AC_HELP_STRING([--disable-verbose],
118
[disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds]),,
119
enable_verbose_mode=yes)
121
if test x$enable_verbose_mode = xyes; then
122
AC_DEFINE(WITH_VERBOSE_MODE,1,[Build with verbose mode support])
126
AC_HELP_STRING([--disable-sm],
127
[disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds]),,
130
AC_ARG_ENABLE(startup-notification,
131
AC_HELP_STRING([--disable-startup-notification],
132
[disable metacity's startup notification support, for embedded/size-sensitive custom non-GNOME builds]),,
133
enable_startup_notification=auto)
135
AC_ARG_ENABLE(compositor,
136
AC_HELP_STRING([--disable-compositor],
137
[disable metacity's compositing manager]),,
138
enable_compositor=auto)
141
AC_HELP_STRING([--disable-xsync],
142
[disable metacity's use of the XSync extension]),,
145
AC_ARG_ENABLE(render,
146
AC_HELP_STRING([--disable-render],
147
[disable metacity's use of the RENDER extension]),,
151
AC_HELP_STRING([--disable-shape],
152
[disable metacity's use of the shaped window extension]),,
155
## try definining HAVE_BACKTRACE
156
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
158
ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy id is it ja ko lt lv mk ml mn ms nb ne nl nn no or pa pl pt pt_BR ro ru rw sl sk sq sr sr@Latn sv ta th tk tr uk vi wa xh zh_CN zh_TW"
161
## here we get the flags we'll actually use
162
# GOptionEntry requires glib-2.6.0
163
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.6.0)
164
# gtk_window_set_icon_name requires gtk2+-2.60
165
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.6.0)
166
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.6.0)
168
if $PKG_CONFIG --atleast-version 1.2.0 pangoxft; then
169
echo "pangoxft found"
171
AC_MSG_ERROR("Pango 1.2.0 or greater based on Xft2 is required")
174
STARTUP_NOTIFICATION_VERSION=0.7
175
AC_MSG_CHECKING([Startup notification library >= $STARTUP_NOTIFICATION_VERSION])
176
if $PKG_CONFIG --atleast-version $STARTUP_NOTIFICATION_VERSION libstartup-notification-1.0; then
177
have_startup_notification=yes
179
have_startup_notification=no
181
AC_MSG_RESULT($have_startup_notification)
183
if test x$enable_startup_notification = xyes; then
184
have_startup_notification=yes
185
echo "startup-notification support forced on"
186
elif test x$enable_startup_notification = xauto; then
189
have_startup_notification=no
192
if test x$have_startup_notification = xyes; then
193
echo "Building with libstartup-notification"
194
METACITY_PC_MODULES="$METACITY_PC_MODULES libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION"
195
AC_DEFINE(HAVE_STARTUP_NOTIFICATION, , [Building with startup notification support])
197
echo "Building without libstartup-notification"
200
## init this, it gets set either in the compositor check below
201
## or the render-specific check later
204
XCOMPOSITE_VERSION=0.2
205
AC_MSG_CHECKING([Xcomposite >= $XCOMPOSITE_VERSION])
206
if $PKG_CONFIG --atleast-version $XCOMPOSITE_VERSION xcomposite; then
211
AC_MSG_RESULT($have_xcomposite)
213
if test x$enable_compositor = xyes; then
215
echo "CompositeExt support forced on"
216
elif test x$enable_compositor = xauto; then
217
echo "Not building compositing manager by default now, must enable explicitly to get it. And it doesn't work, so don't bother unless you want to hack on it..."
223
if test x$have_xcomposite = xyes; then
224
echo "Building with CompositeExt"
225
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
226
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, , [Building with compositing manager support])
228
## force on render also
231
echo "Building without compositing manager"
234
## if no compositor, still possibly enable render
235
if test x$have_xcomposite = xno; then
237
AC_MSG_CHECKING([xrender >= $XRENDER_VERSION])
238
if $PKG_CONFIG --atleast-version $XRENDER_VERSION xrender; then
243
AC_MSG_RESULT($have_xrender)
245
if test x$enable_render = xyes; then
247
echo "Render support forced on"
248
elif test x$enable_render = xauto; then
254
if test x$have_xrender = xyes; then
255
echo "Building with Render"
256
METACITY_PC_MODULES="$METACITY_PC_MODULES xrender >= $XRENDER_VERSION"
260
if test x$have_xrender = xyes; then
261
AC_DEFINE(HAVE_RENDER, , [Building with Render extension support])
264
AC_MSG_CHECKING([Xcursor])
265
if $PKG_CONFIG xcursor; then
270
AC_MSG_RESULT($have_xcursor)
272
if test x$have_xcursor = xyes; then
273
echo "Building with Xcursor"
274
METACITY_PC_MODULES="$METACITY_PC_MODULES xcursor"
275
AC_DEFINE(HAVE_XCURSOR, , [Building with Xcursor support])
278
PKG_CHECK_MODULES(METACITY, $METACITY_PC_MODULES)
282
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
284
# Check for Xinerama extension (Solaris impl or Xfree impl)
285
metacity_save_cppflags="$CPPFLAGS"
286
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
288
AC_ARG_ENABLE(xinerama,
289
AC_HELP_STRING([--disable-xinerama],
290
[disable metacity's use of the Xinerama extension]),
291
try_xinerama=$enable_xinerama,try_xinerama=yes)
293
use_solaris_xinerama=no
294
use_xfree_xinerama=no
295
if test "${try_xinerama}" != no; then
299
use_solaris_xinerama=yes
300
AC_CHECK_LIB(Xext, XineramaGetInfo,
301
use_solaris_xinerama=yes, use_solaris_xinerama=no,
303
if test "x$use_solaris_xinerama" = "xyes"; then
304
AC_CHECK_HEADER(X11/extensions/xinerama.h,
305
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
306
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
308
AC_DEFINE(HAVE_SOLARIS_XINERAMA, , [Have Solaris-style Xinerama])
309
AC_DEFINE(HAVE_XINERAMA, , [Have some version of Xinerama]),
310
use_solaris_xinerama=no,
311
[#include <X11/Xlib.h>])
313
AC_MSG_CHECKING(for Xinerama support on Solaris)
314
AC_MSG_RESULT($use_solaris_xinerama);
318
use_xfree_xinerama=yes
319
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
320
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
321
X_EXTRA_LIBS="-lXinerama $X_EXTRA_LIBS"
322
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
323
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
325
AC_DEFINE(HAVE_XFREE_XINERAMA, , [Have XFree86-style Xinerama])
326
AC_DEFINE(HAVE_XINERAMA,, [Have some version of Xinerama]),
327
use_xfree_xinerama=no,
328
[#include <X11/Xlib.h>])],
329
use_xfree_xinerama=no, -lXext $ALL_X_LIBS)
330
AC_MSG_CHECKING(for Xinerama support on XFree86)
331
AC_MSG_RESULT($use_xfree_xinerama);
336
CPPFLAGS="$metacity_save_cppflags"
340
AC_CHECK_LIB(Xext, XShapeQueryExtension,
341
[AC_CHECK_HEADER(X11/extensions/shape.h,
342
SHAPE_LIBS=-lXext found_shape=yes)],
345
if test x$enable_shape = xno; then
349
if test x$enable_shape = xyes; then
350
if test "$found_shape" = "no"; then
351
AC_MSG_ERROR([--enable-shape forced and Shape not found])
356
if test "x$found_shape" = "xyes"; then
357
AC_DEFINE(HAVE_SHAPE, , [Have the shape extension library])
361
AC_CHECK_LIB(X11, XkbQueryExtension,
362
[AC_CHECK_HEADER(X11/XKBlib.h,
366
if test "x$found_xkb" = "xyes"; then
367
AC_DEFINE(HAVE_XKB, , [Have keyboard extension library])
373
AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
374
[AC_CHECK_HEADER(X11/extensions/Xrandr.h,
375
RANDR_LIBS=-lXrandr found_randr=yes,,
376
[#include <X11/Xlib.h>])],
377
, -lXrender -lXext $ALL_X_LIBS)
379
if test "x$found_randr" = "xyes"; then
380
AC_DEFINE(HAVE_RANDR, , [Have the Xrandr extension library])
385
AC_CHECK_LIB(Xext, XSyncQueryExtension,
386
[AC_CHECK_HEADER(X11/extensions/sync.h,
388
[#include <X11/Xlib.h>])],
391
if test x$enable_xsync = xno; then
395
if test x$enable_xsync = xyes; then
396
if test "$found_xsync" = "no"; then
397
AC_MSG_ERROR([--enable-xsync forced and XSync not found])
402
if test "x$found_xsync" = "xyes"; then
404
AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
407
METACITY_LIBS="$XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS"
408
METACITY_MESSAGE_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_MESSAGE_LIBS"
409
METACITY_WINDOW_DEMO_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_WINDOW_DEMO_LIBS"
410
METACITY_PROPS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_PROPS_LIBS"
413
case "$METACITY_LIBS" in
418
AC_CHECK_LIB(SM, SmcSaveYourselfDone,
419
[AC_CHECK_HEADERS(X11/SM/SMlib.h,
420
METACITY_LIBS="-lSM -lICE $METACITY_LIBS" found_sm=no)],
425
if test x$enable_sm = xno; then
429
if test x$enable_sm = xyes; then
430
if test "$found_sm" = "no"; then
431
AC_MSG_ERROR([--enable-sm forced and -lSM not found])
436
if test "$found_sm" = "yes"; then
437
AC_DEFINE(HAVE_SM, , [Building with SM support])
440
AM_CONDITIONAL(HAVE_SM, test "$found_sm" = "yes")
442
HOST_ALIAS=$host_alias
445
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
447
if test x"$GDK_PIXBUF_CSOURCE" = xno; then
448
AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK])
451
AC_SUBST(GDK_PIXBUF_CSOURCE)
453
## hack to work with old GTK versions for now
454
save_LDFLAGS=$LDFLAGS
455
LDFLAGS="$METACITY_LIBS $LDFLAGS"
456
AC_CHECK_FUNCS(gdk_pixbuf_new_from_stream)
457
LDFLAGS=$save_LDFLAGS
459
if test x$enable_gconf = xyes; then
460
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
461
if test x"$GCONFTOOL" = xno; then
462
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
473
src/wm-tester/Makefile
474
src/libmetacity-private.pc
482
if test x$enable_gconf = xno; then
483
echo "*** WARNING WARNING WARNING WARNING WARNING"
484
echo "*** Building without GConf"
485
echo "*** This means there's no way to change prefs except"
486
echo "*** hacking source code, at least for now."
487
echo "*** Also, some prefs may have broken defaults."
488
echo "*** Patches needed for a simple no-gconf config file."
489
echo "*** This is intended for embedded systems etc., not for normal use."
492
if test x$enable_verbose_mode = xno; then
493
echo "*** WARNING WARNING WARNING WARNING WARNING"
494
echo "*** Building without verbose mode"
495
echo "*** This means there's no way to debug metacity problems."
496
echo "*** Please build normal desktop versions of metacity"
497
echo "*** with verbose mode enabled so users can use it when they report bugs."
500
dnl ==========================================================================
505
source code location: ${srcdir}
508
GConf: ${enable_gconf}
509
XFree86 Xinerama: ${use_xfree_xinerama}
510
Solaris Xinerama: ${use_solaris_xinerama}
511
Startup notification: ${have_startup_notification}
512
Compositing manager: ${have_xcomposite}
513
Session management: ${found_sm}
514
Shape extension: ${found_shape}
515
Resize-and-rotate: ${found_randr}
516
Xsync: ${found_xsync}
517
Render: ${have_xrender}
518
Xcursor: ${have_xcursor}
520
#echo "This is the UNSTABLE branch of metacity"
521
#echo "Use 2.10.x for stable (gnome-2-10 branch in CVS)"