1 | AC_PREREQ(2.50) |
---|
2 | AC_INIT(src/display.c) |
---|
3 | |
---|
4 | AM_CONFIG_HEADER(config.h) |
---|
5 | |
---|
6 | # 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987 |
---|
7 | # releases on a branch add a 4th version like 2.4.21.1 |
---|
8 | AM_INIT_AUTOMAKE(metacity, 2.4.21) |
---|
9 | |
---|
10 | # Honor aclocal flags |
---|
11 | ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" |
---|
12 | |
---|
13 | GETTEXT_PACKAGE=metacity |
---|
14 | AC_SUBST(GETTEXT_PACKAGE) |
---|
15 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain]) |
---|
16 | |
---|
17 | AM_MAINTAINER_MODE |
---|
18 | |
---|
19 | AC_PROG_INTLTOOL([0.21]) |
---|
20 | AC_PROG_CC |
---|
21 | AC_ISC_POSIX |
---|
22 | AC_HEADER_STDC |
---|
23 | AM_PROG_LIBTOOL |
---|
24 | |
---|
25 | changequote(,)dnl |
---|
26 | if test "x$GCC" = "xyes"; then |
---|
27 | case " $CFLAGS " in |
---|
28 | *[\ \ ]-Wall[\ \ ]*) ;; |
---|
29 | *) CFLAGS="$CFLAGS -Wall" ;; |
---|
30 | esac |
---|
31 | |
---|
32 | # case " $CFLAGS " in |
---|
33 | # *[\ \ ]-Wshadow[\ \ ]*) ;; |
---|
34 | # *) CFLAGS="$CFLAGS -Wshadow" ;; |
---|
35 | # esac |
---|
36 | |
---|
37 | case " $CFLAGS " in |
---|
38 | *[\ \ ]-Wchar-subscripts[\ \ ]*) ;; |
---|
39 | *) CFLAGS="$CFLAGS -Wchar-subscripts" ;; |
---|
40 | esac |
---|
41 | |
---|
42 | case " $CFLAGS " in |
---|
43 | *[\ \ ]-Wmissing-declarations[\ \ ]*) ;; |
---|
44 | *) CFLAGS="$CFLAGS -Wmissing-declarations" ;; |
---|
45 | esac |
---|
46 | |
---|
47 | case " $CFLAGS " in |
---|
48 | *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;; |
---|
49 | *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;; |
---|
50 | esac |
---|
51 | |
---|
52 | case " $CFLAGS " in |
---|
53 | *[\ \ ]-Wnested-externs[\ \ ]*) ;; |
---|
54 | *) CFLAGS="$CFLAGS -Wnested-externs" ;; |
---|
55 | esac |
---|
56 | |
---|
57 | case " $CFLAGS " in |
---|
58 | *[\ \ ]-Wpointer-arith[\ \ ]*) ;; |
---|
59 | *) CFLAGS="$CFLAGS -Wpointer-arith" ;; |
---|
60 | esac |
---|
61 | |
---|
62 | case " $CFLAGS " in |
---|
63 | *[\ \ ]-Wcast-align[\ \ ]*) ;; |
---|
64 | *) CFLAGS="$CFLAGS -Wcast-align" ;; |
---|
65 | esac |
---|
66 | |
---|
67 | case " $CFLAGS " in |
---|
68 | *[\ \ ]-Wsign-compare[\ \ ]*) ;; |
---|
69 | *) CFLAGS="$CFLAGS -Wsign-compare" ;; |
---|
70 | esac |
---|
71 | |
---|
72 | if test "x$enable_ansi" = "xyes"; then |
---|
73 | case " $CFLAGS " in |
---|
74 | *[\ \ ]-ansi[\ \ ]*) ;; |
---|
75 | *) CFLAGS="$CFLAGS -ansi" ;; |
---|
76 | esac |
---|
77 | |
---|
78 | case " $CFLAGS " in |
---|
79 | *[\ \ ]-pedantic[\ \ ]*) ;; |
---|
80 | *) CFLAGS="$CFLAGS -pedantic" ;; |
---|
81 | esac |
---|
82 | fi |
---|
83 | fi |
---|
84 | changequote([,])dnl |
---|
85 | |
---|
86 | METACITY_PC_MODULES='gtk+-2.0 >= 2.0.0' |
---|
87 | |
---|
88 | AC_ARG_ENABLE(config-dialog, [ --enable-config-dialog enable the config dialog that you need with GNOME 2.0 (obsolete with GNOME 2.2)],,enable_config_dialog=no) |
---|
89 | |
---|
90 | AM_CONDITIONAL(BUILD_CONFIG_DIALOG, test x$enable_config_dialog = xyes) |
---|
91 | if test x$enable_config_dialog = xyes; then |
---|
92 | AC_DEFINE(BUILD_CONFIG_DIALOG,1,[Build configuration dialog]) |
---|
93 | fi |
---|
94 | |
---|
95 | AC_ARG_ENABLE(gconf, [ --disable-gconf disable gconf usage, for embedded/size-sensitive non-GNOME builds],,enable_gconf=yes) |
---|
96 | |
---|
97 | if test x$enable_gconf = xyes; then |
---|
98 | AC_DEFINE(HAVE_GCONF,1,[Build with gconf support]) |
---|
99 | METACITY_PC_MODULES="$METACITY_PC_MODULES gconf-2.0 >= 1.2.0" |
---|
100 | fi |
---|
101 | |
---|
102 | AC_ARG_ENABLE(verbose-mode, [ --disable-verbose disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds],,enable_verbose_mode=yes) |
---|
103 | |
---|
104 | if test x$enable_verbose_mode = xyes; then |
---|
105 | AC_DEFINE(WITH_VERBOSE_MODE,1,[Build with verbose mode support]) |
---|
106 | fi |
---|
107 | |
---|
108 | AC_ARG_ENABLE(sm, [ --disable-sm disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds],,enable_sm=auto) |
---|
109 | |
---|
110 | AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification disable metacity's startup notification support, for embedded/size-sensitive custom non-GNOME builds],,enable_startup_notification=auto) |
---|
111 | |
---|
112 | AC_ARG_ENABLE(xsync, [ --disable-xsync disable metacity's use of the XSync extension],,enable_xsync=auto) |
---|
113 | |
---|
114 | AC_ARG_ENABLE(shape, [ --disable-shape disable metacity's use of the shaped window extension],,enable_shape=auto) |
---|
115 | |
---|
116 | ## try definining HAVE_BACKTRACE |
---|
117 | AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)]) |
---|
118 | |
---|
119 | ALL_LINGUAS="am az bg ca cs da de el es fi fr gl he hu it ja ko lv mk ms no pl pt pt_BR ro ru sl sk sv tr uk vi zh_CN zh_TW" |
---|
120 | AM_GLIB_GNU_GETTEXT |
---|
121 | |
---|
122 | ## here we get the flags we'll actually use |
---|
123 | PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.0.0) |
---|
124 | PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.0.0) |
---|
125 | |
---|
126 | if test x$enable_config_dialog = xyes; then |
---|
127 | PKG_CHECK_MODULES(METACITY_PROPS, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9 libglade-2.0) |
---|
128 | fi |
---|
129 | |
---|
130 | STARTUP_NOTIFICATION_VERSION=0.4 |
---|
131 | AC_MSG_CHECKING([Startup notification library >= $STARTUP_NOTIFICATION_VERSION]) |
---|
132 | if $PKG_CONFIG --atleast-version $STARTUP_NOTIFICATION_VERSION libstartup-notification-1.0; then |
---|
133 | have_startup_notification=yes |
---|
134 | else |
---|
135 | have_startup_notification=no |
---|
136 | fi |
---|
137 | AC_MSG_RESULT($have_startup_notification) |
---|
138 | |
---|
139 | if test x$enable_startup_notification = xyes; then |
---|
140 | have_startup_notification=yes |
---|
141 | echo "startup-notification support forced on" |
---|
142 | elif test x$enable_startup_notification = xauto; then |
---|
143 | true |
---|
144 | else |
---|
145 | have_startup_notification=no |
---|
146 | fi |
---|
147 | |
---|
148 | if test x$have_startup_notification = xyes; then |
---|
149 | echo "Building with libstartup-notification" |
---|
150 | METACITY_PC_MODULES="$METACITY_PC_MODULES libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION" |
---|
151 | AC_DEFINE(HAVE_STARTUP_NOTIFICATION, , [Building with startup notification support]) |
---|
152 | else |
---|
153 | echo "Building without libstartup-notification" |
---|
154 | fi |
---|
155 | |
---|
156 | PKG_CHECK_MODULES(METACITY, $METACITY_PC_MODULES) |
---|
157 | |
---|
158 | if $PKG_CONFIG --atleast-version 2.2.0 gtk+-2.0; then |
---|
159 | AC_DEFINE(HAVE_GTK_MULTIHEAD,,[gtk+ with multihead support found]) |
---|
160 | with_multihead=yes |
---|
161 | else |
---|
162 | with_multihead=no |
---|
163 | fi |
---|
164 | |
---|
165 | AC_PATH_XTRA |
---|
166 | |
---|
167 | ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" |
---|
168 | |
---|
169 | # Check for Xinerama extension (Solaris impl or Xfree impl) |
---|
170 | metacity_save_cppflags="$CPPFLAGS" |
---|
171 | CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
---|
172 | |
---|
173 | use_solaris_xinerama=no |
---|
174 | use_xfree_xinerama=no |
---|
175 | case "$host" in |
---|
176 | *-*-solaris*) |
---|
177 | # Check for solaris |
---|
178 | use_solaris_xinerama=yes |
---|
179 | AC_CHECK_LIB(Xext, XineramaGetInfo, |
---|
180 | use_solaris_xinerama=yes, use_solaris_xinerama=no, |
---|
181 | $ALL_X_LIBS) |
---|
182 | if test "x$use_solaris_xinerama" = "xyes"; then |
---|
183 | AC_CHECK_HEADER(X11/extensions/xinerama.h, |
---|
184 | if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then |
---|
185 | X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS" |
---|
186 | fi |
---|
187 | AC_DEFINE(HAVE_SOLARIS_XINERAMA, , [Have Solaris-style Xinerama]) |
---|
188 | AC_DEFINE(HAVE_XINERAMA, , [Have some version of Xinerama]), |
---|
189 | use_solaris_xinerama=no, |
---|
190 | [#include <X11/Xlib.h>]) |
---|
191 | fi |
---|
192 | AC_MSG_CHECKING(for Xinerama support on Solaris) |
---|
193 | AC_MSG_RESULT($use_solaris_xinerama); |
---|
194 | ;; |
---|
195 | *) |
---|
196 | # Check for XFree |
---|
197 | use_xfree_xinerama=yes |
---|
198 | AC_CHECK_LIB(Xinerama, XineramaQueryExtension, |
---|
199 | [AC_CHECK_HEADER(X11/extensions/Xinerama.h, |
---|
200 | X_EXTRA_LIBS="-lXinerama $X_EXTRA_LIBS" |
---|
201 | if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then |
---|
202 | X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS" |
---|
203 | fi |
---|
204 | AC_DEFINE(HAVE_XFREE_XINERAMA, , [Have XFree86-style Xinerama]) |
---|
205 | AC_DEFINE(HAVE_XINERAMA,, [Have some version of Xinerama]), |
---|
206 | use_xfree_xinerama=no, |
---|
207 | [#include <X11/Xlib.h>])], |
---|
208 | use_xfree_xinerama=no, -lXext $ALL_X_LIBS) |
---|
209 | AC_MSG_CHECKING(for Xinerama support on XFree86) |
---|
210 | AC_MSG_RESULT($use_xfree_xinerama); |
---|
211 | ;; |
---|
212 | esac |
---|
213 | |
---|
214 | CPPFLAGS="$metacity_save_cppflags" |
---|
215 | |
---|
216 | SHAPE_LIBS= |
---|
217 | found_shape=no |
---|
218 | AC_CHECK_LIB(Xext, XShapeQueryExtension, |
---|
219 | [AC_CHECK_HEADER(X11/extensions/shape.h, |
---|
220 | SHAPE_LIBS=-lXext found_shape=yes)], |
---|
221 | , $ALL_X_LIBS) |
---|
222 | |
---|
223 | if test x$enable_shape = xno; then |
---|
224 | found_shape=no |
---|
225 | fi |
---|
226 | |
---|
227 | if test x$enable_shape = xyes; then |
---|
228 | if test "$found_shape" = "no"; then |
---|
229 | AC_MSG_ERROR([--enable-shape forced and Shape not found]) |
---|
230 | exit 1 |
---|
231 | fi |
---|
232 | fi |
---|
233 | |
---|
234 | if test "x$found_shape" = "xyes"; then |
---|
235 | AC_DEFINE(HAVE_SHAPE, , [Have the shape extension library]) |
---|
236 | fi |
---|
237 | |
---|
238 | RANDR_LIBS= |
---|
239 | found_randr=no |
---|
240 | AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration, |
---|
241 | [AC_CHECK_HEADER(X11/extensions/Xrandr.h, |
---|
242 | RANDR_LIBS=-lXrandr found_randr=yes,, |
---|
243 | [#include <X11/Xlib.h>])], |
---|
244 | , -lXrender $ALL_X_LIBS) |
---|
245 | |
---|
246 | if test "x$found_randr" = "xyes"; then |
---|
247 | AC_DEFINE(HAVE_RANDR, , [Have the Xrandr extension library]) |
---|
248 | fi |
---|
249 | |
---|
250 | XSYNC_LIBS= |
---|
251 | found_xsync=no |
---|
252 | AC_CHECK_LIB(Xext, XSyncQueryExtension, |
---|
253 | [AC_CHECK_HEADER(X11/extensions/sync.h, |
---|
254 | found_xsync=yes,, |
---|
255 | [#include <X11/Xlib.h>])], |
---|
256 | , $ALL_X_LIBS) |
---|
257 | |
---|
258 | if test x$enable_xsync = xno; then |
---|
259 | found_xsync=no |
---|
260 | fi |
---|
261 | |
---|
262 | if test x$enable_xsync = xyes; then |
---|
263 | if test "$found_xsync" = "no"; then |
---|
264 | AC_MSG_ERROR([--enable-xsync forced and XSync not found]) |
---|
265 | exit 1 |
---|
266 | fi |
---|
267 | fi |
---|
268 | |
---|
269 | if test "x$found_xsync" = "xyes"; then |
---|
270 | XSYNC_LIBS=-lXext |
---|
271 | AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library]) |
---|
272 | fi |
---|
273 | |
---|
274 | METACITY_LIBS="$XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS" |
---|
275 | METACITY_MESSAGE_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_MESSAGE_LIBS" |
---|
276 | METACITY_WINDOW_DEMO_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_WINDOW_DEMO_LIBS" |
---|
277 | METACITY_PROPS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_PROPS_LIBS" |
---|
278 | |
---|
279 | found_sm=no |
---|
280 | case "$METACITY_LIBS" in |
---|
281 | *-lSM*) |
---|
282 | found_sm=yes |
---|
283 | ;; |
---|
284 | *) |
---|
285 | AC_CHECK_LIB(SM, SmcSaveYourselfDone, |
---|
286 | [AC_CHECK_HEADERS(X11/SM/SMlib.h, |
---|
287 | METACITY_LIBS="-lSM -lICE $METACITY_LIBS" found_sm=no)], |
---|
288 | , $METACITY_LIBS) |
---|
289 | ;; |
---|
290 | esac |
---|
291 | |
---|
292 | if test x$enable_sm = xno; then |
---|
293 | found_sm=no |
---|
294 | fi |
---|
295 | |
---|
296 | if test x$enable_sm = xyes; then |
---|
297 | if test "$found_sm" = "no"; then |
---|
298 | AC_MSG_ERROR([--enable-sm forced and -lSM not found]) |
---|
299 | exit 1 |
---|
300 | fi |
---|
301 | fi |
---|
302 | |
---|
303 | if test "$found_sm" = "yes"; then |
---|
304 | AC_DEFINE(HAVE_SM, , [Building with SM support]) |
---|
305 | fi |
---|
306 | |
---|
307 | AM_CONDITIONAL(HAVE_SM, test "$found_sm" = "yes") |
---|
308 | |
---|
309 | HOST_ALIAS=$host_alias |
---|
310 | AC_SUBST(HOST_ALIAS) |
---|
311 | |
---|
312 | AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no) |
---|
313 | |
---|
314 | if test x"$GDK_PIXBUF_CSOURCE" = xno; then |
---|
315 | AC_MSG_ERROR([gdk-pixbuf-csource executable not found in your path - should be installed with GTK]) |
---|
316 | fi |
---|
317 | |
---|
318 | AC_SUBST(GDK_PIXBUF_CSOURCE) |
---|
319 | |
---|
320 | ## hack to work with old GTK versions for now |
---|
321 | save_LDFLAGS=$LDFLAGS |
---|
322 | LDFLAGS="$METACITY_LIBS $LDFLAGS" |
---|
323 | AC_CHECK_FUNCS(gdk_pixbuf_new_from_stream) |
---|
324 | LDFLAGS=$save_LDFLAGS |
---|
325 | |
---|
326 | if test x$enable_gconf = xyes; then |
---|
327 | AC_PATH_PROG(GCONFTOOL, gconftool-2, no) |
---|
328 | if test x"$GCONFTOOL" = xno; then |
---|
329 | AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) |
---|
330 | fi |
---|
331 | |
---|
332 | AM_GCONF_SOURCE_2 |
---|
333 | fi |
---|
334 | |
---|
335 | AC_OUTPUT([ |
---|
336 | Makefile |
---|
337 | doc/Makefile |
---|
338 | src/Makefile |
---|
339 | src/wm-tester/Makefile |
---|
340 | src/libmetacity-private.pc |
---|
341 | src/tools/Makefile |
---|
342 | src/themes/Makefile |
---|
343 | po/Makefile.in |
---|
344 | metacity.spec |
---|
345 | ]) |
---|
346 | |
---|
347 | if test x$enable_gconf = xno; then |
---|
348 | echo "*** WARNING WARNING WARNING WARNING WARNING" |
---|
349 | echo "*** Building without GConf" |
---|
350 | echo "*** This means there's no way to change prefs except" |
---|
351 | echo "*** hacking source code, at least for now." |
---|
352 | echo "*** Also, some prefs may have broken defaults." |
---|
353 | echo "*** Patches needed for a simple no-gconf config file." |
---|
354 | echo "*** This is intended for embedded systems etc., not for normal use." |
---|
355 | fi |
---|
356 | |
---|
357 | if test x$enable_verbose_mode = xno; then |
---|
358 | echo "*** WARNING WARNING WARNING WARNING WARNING" |
---|
359 | echo "*** Building without verbose mode" |
---|
360 | echo "*** This means there's no way to debug metacity problems." |
---|
361 | echo "*** Please build normal desktop versions of metacity" |
---|
362 | echo "*** with verbose mode enabled so users can use it when they report bugs." |
---|
363 | fi |
---|
364 | |
---|
365 | dnl ========================================================================== |
---|
366 | echo " |
---|
367 | metacity-$VERSION: |
---|
368 | |
---|
369 | prefix: ${prefix} |
---|
370 | source code location: ${srcdir} |
---|
371 | compiler: ${CC} |
---|
372 | |
---|
373 | GConf: ${enable_gconf} |
---|
374 | XFree86 Xinerama: ${use_xfree_xinerama} |
---|
375 | Solaris Xinerama: ${use_solaris_xinerama} |
---|
376 | Multihead: ${with_multihead} |
---|
377 | Startup notification: ${have_startup_notification} |
---|
378 | Session management: ${found_sm} |
---|
379 | Shape extension: ${found_shape} |
---|
380 | Resize-and-rotate: ${found_randr} |
---|
381 | Xsync: ${found_xsync} |
---|
382 | Deprecated config dialog: ${enable_config_dialog} |
---|
383 | " |
---|