build: Don't actually check for glx for glx flavour
[profile/ivi/clutter.git] / configure.ac
1 # clutter package version number, (as distinct from shared library version)
2 # An odd micro number indicates in-progress development from Git
3 # An even micro number indicates a released version
4 #
5 # Making a point release:
6 # - increase clutter_micro_version to the next even number
7 # - increase clutter_interface_age to the next even number
8 # After the release:
9 # - increase clutter_micro_version to the next odd number
10 # - increase clutter_interface_version to the next odd number
11 m4_define([clutter_major_version], [1])
12 m4_define([clutter_minor_version], [9])
13 m4_define([clutter_micro_version], [1])
14
15 # • for stable releases: increase the interface age by 1 for each release;
16 #   if the API changes, set to 0. interface_age and binary_age are used to
17 #   create the soname of the shared object:
18 #
19 #  (<minor> * 100 + <micro>) - <interface_age>
20 #
21 # this allows using the same soname for different micro-releases in case
22 # no API was added or deprecated. for instance:
23 #
24 #   clutter 1.2.0  -> 100 * 2 + 0  = 200, interface age = 0 -> 200
25 #   clutter 1.2.2  -> 100 * 2 + 2  = 202, interface age = 2 -> 200
26 #   clutter 1.2.4  -> 100 * 2 + 4  = 204, interface age = 4 -> 200
27 #   [ API addition, deprecation ]
28 #   clutter 1.2.6  -> 100 * 2 + 6  = 206, interface age = 0 -> 206
29 #   clutter 1.2.8  -> 100 * 2 + 8  = 208, interface age = 2 -> 206
30 #   clutter 1.2.10 -> 100 * 2 + 10 = 210, interface age = 4 -> 206
31 #   ...
32 #
33 # • for development releases: keep clutter_interface_age to 0
34 m4_define([clutter_interface_age], [0])
35
36 m4_define([clutter_binary_age], [m4_eval(100 * clutter_minor_version + clutter_micro_version)])
37
38 m4_define([clutter_release_status],
39           [m4_if(m4_eval(clutter_micro_version % 2), [1], [git],
40                  [m4_if(m4_eval(clutter_minor_version % 2), [1], [snapshot],
41                                                                  [release])])])
42
43 m4_define([clutter_version], [clutter_major_version.clutter_minor_version.clutter_micro_version])
44
45 # change this only when breaking the API
46 m4_define([clutter_api_version], [1.0])
47
48 AC_PREREQ([2.63])
49
50 AC_INIT([clutter],
51         [clutter_version],
52         [http://bugzilla.gnome.org/enter_bug.cgi?product=clutter],
53         [clutter],
54         [http://www.clutter-project.org])
55
56 AC_CONFIG_SRCDIR([clutter/clutter.h])
57 AC_CONFIG_HEADERS([config.h])
58 AC_CONFIG_AUX_DIR([build])
59 AC_CONFIG_MACRO_DIR([build/autotools])
60
61 AM_INIT_AUTOMAKE([1.11 foreign -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
62 AM_SILENT_RULES([yes])
63
64 AC_SUBST([CLUTTER_MAJOR_VERSION],  [clutter_major_version])
65 AC_SUBST([CLUTTER_MINOR_VERSION],  [clutter_minor_version])
66 AC_SUBST([CLUTTER_MICRO_VERSION],  [clutter_micro_version])
67 AC_SUBST([CLUTTER_VERSION],        [clutter_version])
68 AC_SUBST([CLUTTER_API_VERSION],    [clutter_api_version])
69 AC_SUBST([CLUTTER_API_VERSION_AM], [$CLUTTER_MAJOR_VERSION\_0])
70 AC_SUBST([CLUTTER_RELEASE_STATUS], [clutter_release_status])
71
72 m4_define([lt_current],  [m4_eval(100 * clutter_minor_version + clutter_micro_version - clutter_interface_age)])
73 m4_define([lt_revision], [clutter_interface_age])
74 m4_define([lt_age],      [m4_eval(clutter_binary_age - clutter_interface_age)])
75 CLUTTER_LT_CURRENT=lt_current
76 CLUTTER_LT_REV=lt_revision
77 CLUTTER_LT_AGE=lt_age
78 CLUTTER_LT_VERSION="$CLUTTER_LT_CURRENT:$CLUTTER_LT_REV:$CLUTTER_LT_AGE"
79 CLUTTER_LT_LDFLAGS="-version-info $CLUTTER_LT_VERSION"
80
81 AC_PROG_SED
82
83 AC_CANONICAL_HOST
84 AC_MSG_CHECKING([if building for some Win32 platform])
85 AS_CASE([$host],
86         [*-*-mingw*|*-*-cygwin*],
87         [
88           CLUTTER_LT_LDFLAGS="$CLUTTER_LT_LDFLAGS -no-undefined"
89           platform_win32=yes
90         ],
91
92         [platform_win32=no]
93 )
94 AC_MSG_RESULT([$platform_win32])
95 AM_CONDITIONAL(OS_WIN32, [test "$platform_win32" = "yes"])
96
97 AC_CHECK_HEADER([OpenGL/gl.h], [platform_quartz=yes], [platform_quartz=no])
98 AM_CONDITIONAL(OS_QUARTZ, [test "$platform_quartz" = "yes"])
99
100 AC_SUBST(CLUTTER_LT_VERSION)
101 AC_SUBST(CLUTTER_LT_LDFLAGS)
102
103 dnl ========================================================================
104
105 # Checks for programs.
106 AM_PROG_CC_C_O
107
108 # require libtool >= 2.2
109 LT_PREREQ([2.2.6])
110 LT_INIT([disable-static])
111
112 # Checks for header files.
113 AC_HEADER_STDC
114
115 # required versions for dependencies
116 m4_define([glib_req_version],           [2.31.0])
117 m4_define([cogl_req_version],           [1.8.0])
118 m4_define([json_glib_req_version],      [0.12.0])
119 m4_define([atk_req_version],            [2.1.5])
120 m4_define([cairo_req_version],          [1.10])
121 m4_define([pango_req_version],          [1.20])
122 m4_define([gi_req_version],             [0.9.5])
123 m4_define([uprof_req_version],          [0.3])
124 m4_define([gtk_doc_req_version],        [1.15])
125 m4_define([xfixes_req_version],         [3])
126 m4_define([xcomposite_req_version],     [0.4])
127
128 AC_SUBST([GLIB_REQ_VERSION],       [glib_req_version])
129 AC_SUBST([COGL_REQ_VERSION],       [cogl_req_version])
130 AC_SUBST([JSON_GLIB_REQ_VERSION],  [json_glib_req_version])
131 AC_SUBST([ATK_REQ_VERSION],        [atk_req_version])
132 AC_SUBST([CAIRO_REQ_VERSION],      [cairo_req_version])
133 AC_SUBST([PANGO_REQ_VERSION],      [pango_req_version])
134 AC_SUBST([GI_REQ_VERSION],         [gi_req_version])
135 AC_SUBST([UPROF_REQ_VERSION],      [uprof_req_version])
136 AC_SUBST([GTK_DOC_REQ_VERSION],    [gtk_doc_req_version])
137 AC_SUBST([XFIXES_REQ_VERSION],     [xfixes_req_version])
138 AC_SUBST([XCOMPOSITE_REQ_VERSION], [xcomposite_req_version])
139
140 # Checks for typedefs, structures, and compiler characteristics.
141 AM_PATH_GLIB_2_0([glib_req_version],
142                  [],
143                  [AC_MSG_ERROR([glib-2.0 is required])],
144                  [gobject gthread gmodule-no-export])
145
146 # Check for -Bsymbolic-functions to avoid intra-library PLT jumps
147 AC_ARG_ENABLE([Bsymbolic],
148               [AS_HELP_STRING([--disable-Bsymbolic],
149                               [Avoid linking with -Bsymbolic])],
150               [],
151               [
152                 saved_LDFLAGS="${LDFLAGS}"
153                 AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
154                 LDFLAGS=-Wl,-Bsymbolic-functions
155                 AC_TRY_LINK([], [int main (void) { return 0; }],
156                             [
157                               AC_MSG_RESULT([yes])
158                               enable_Bsymbolic=yes
159                             ],
160                             [
161                               AC_MSG_RESULT([no])
162                               enable_Bsymbolic=no
163                             ])
164                 LDFLAGS="${saved_LDFLAGS}"
165               ])
166
167 AS_IF([test "x$enable_Bsymbolic" = "xyes"], [CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
168 AC_SUBST(CLUTTER_LINK_FLAGS)
169
170 dnl ========================================================================
171
172 # defaults
173 AS_IF([test "x$platform_win32" = "xyes"],  [CLUTTER_FLAVOUR=win32],
174       [test "x$platform_quartz" = "xyes"], [CLUTTER_FLAVOUR=osx],
175       [CLUTTER_FLAVOUR=glx])
176
177 FLAVOUR_LIBS=""
178 FLAVOUR_CFLAGS=""
179 CLUTTER_WINSYS_BASE=
180 CLUTTER_WINSYS_BASE_LIB=
181 CLUTTER_WINSYS=
182 glesversion=1.1
183 use_gles2_wrapper=no
184 experimental_backend=no
185 experimental_image=no
186
187 AC_ARG_WITH([flavour],
188             [AS_HELP_STRING([--with-flavour=@<:@glx/opengl-egl-xlib/wayland/eglx/eglnative/osx/win32/cex100@:>@],
189                             [Select the Clutter window system backend])],
190             [CLUTTER_FLAVOUR=$with_flavour])
191
192 AC_ARG_WITH([gles],
193             [AS_HELP_STRING([--with-gles=@<:@1.1/2.0@:>@],
194                             [Select Clutter GLES version (for EGL backends)])],
195             [glesversion=$with_gles])
196
197 # base dependencies for core
198 CLUTTER_BASE_PC_FILES="cogl-1.0 >= $COGL_REQ_VERSION cairo-gobject >= $CAIRO_REQ_VERSION atk >= $ATK_REQ_VERSION pangocairo >= $PANGO_REQ_VERSION cogl-pango-1.0 json-glib-1.0 >= $JSON_GLIB_REQ_VERSION"
199
200 # backend specific pkg-config files
201 BACKEND_PC_FILES=""
202
203 dnl === Clutter windowing system backend ======================================
204
205 AS_CASE([$CLUTTER_FLAVOUR],
206
207         [glx],
208         [
209           CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_GLX"
210
211           SUPPORT_X11=1
212           SUPPORT_XLIB=1
213           SUPPORT_GLX=1
214
215           CLUTTER_WINSYS=cogl
216           CLUTTER_WINSYS_BASE=x11
217           CLUTTER_WINSYS_BASE_LIB="x11/libclutter-x11.la"
218           CLUTTER_SONAME_INFIX=glx
219
220           # Mesa 7.3 added a GL pkg-config file, finally
221           PKG_CHECK_EXISTS([gl],
222                            [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"],
223                            # if a pkg-config file isn't found just add -lGL
224                            # and hope for the best.
225                            [FLAVOUR_LIBS="$FLAVOUR_LIBS -lGL"])
226
227           # We might fall back to DRM for sync-to-vblank on GLX
228           PKG_CHECK_EXISTS([libdrm],
229                            [
230                              AC_DEFINE([HAVE_DRM], [1], [Have libdrm support])
231                              BACKEND_PC_FILES="$BACKEND_PC_FILES libdrm"
232                            ],
233                            [])
234         ],
235
236         [opengl-egl-xlib],
237         [
238           CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_EGL"
239           CLUTTER_EGL_BACKEND="generic"
240
241           SUPPORT_X11=1
242           SUPPORT_XLIB=1
243           SUPPORT_EGL=1
244           SUPPORT_EGL_PLATFORM_POWERVR_X11=1
245
246           CLUTTER_WINSYS=cogl
247           CLUTTER_WINSYS_BASE=x11
248           CLUTTER_WINSYS_BASE_LIB="x11/libclutter-x11.la"
249           # I think this winsys can be API and ABI compatible with the
250           # glx flavour so we can also be cheeky and use the same soname
251           CLUTTER_SONAME_INFIX=glx
252
253           PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], [])
254           PKG_CHECK_EXISTS([egl], [BACKEND_PC_FILES="$BACKEND_PC_FILES egl"], [])
255         ],
256
257         [wayland],
258         [
259           experimental_backend="yes"
260           CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_WAYLAND"
261
262           SUPPORT_WAYLAND=1
263
264           CLUTTER_WINSYS=wayland
265           CLUTTER_SONAME_INFIX=wayland
266
267           PKG_CHECK_EXISTS([gl], [BACKEND_PC_FILES="$BACKEND_PC_FILES gl"], [])
268           PKG_CHECK_EXISTS([egl], [BACKEND_PC_FILES="$BACKEND_PC_FILES egl"], [])
269           PKG_CHECK_EXISTS([wayland-client xkbcommon],
270                            [BACKEND_PC_FILES="$BACKEND_PC_FILES wayland-client xkbcommon"], [])
271         ],
272
273         [eglx],
274         [
275           CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_EGL"
276           CLUTTER_EGL_BACKEND="generic"
277
278           SUPPORT_X11=1
279           SUPPORT_XLIB=1
280           SUPPORT_EGL=1
281           SUPPORT_EGL_PLATFORM_POWERVR_X11=1
282
283           CLUTTER_WINSYS=cogl
284           CLUTTER_WINSYS_BASE=x11
285           CLUTTER_WINSYS_BASE_LIB="x11/libclutter-x11.la"
286           CLUTTER_SONAME_INFIX=eglx
287         ],
288
289         [eglnative],
290         [
291           CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_EGL"
292           CLUTTER_EGL_BACKEND="generic"
293
294           SUPPORT_EGL=1
295           SUPPORT_EGL_PLATFORM_POWERVR_NULL=1
296
297           PKG_CHECK_MODULES(TSLIB, [tslib-1.0], [have_tslib=yes], [have_tslib=no])
298           AS_IF([test "x$have_tslib" = "xyes"],
299                 [AC_DEFINE([HAVE_TSLIB], [1], [Have tslib for touchscreen handling])]
300           )
301
302           # evdev
303           PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon],
304                             [have_evdev=yes], [have_evdev=no])
305           AS_IF([test "x$have_evdev" = "xyes"],
306                 [AC_DEFINE([HAVE_EVDEV], 1,
307                            [Have evdev support for input handling])]
308           )
309
310           # Make sure we don't enable tslib and evdev at the same time, we
311           # don't support multiple event backends yet.
312           AS_IF([test "x$have_tslib" = "xyes" -a "x$have_evdev" = "xyes"],
313                 [AC_MSG_ERROR([Cannot enable both tslib and evdev events])])
314
315           FLAVOUR_LIBS="$FLAVOUR_LIBS $TSLIB_LIBS $EVDEV_LIBS"
316           FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $TSLIB_CFLAGS $EVDEV_CFLAGS"
317
318           CLUTTER_WINSYS=cogl
319           CLUTTER_SONAME_INFIX=eglnative
320         ],
321
322         [cex100],
323         [
324           CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_EGL"
325           CLUTTER_EGL_BACKEND="cex100"
326
327           SUPPORT_EGL=1
328           SUPPORT_EGL_PLATFORM_GDL=1
329
330           # The cex100 is a small specialization of the EGL backend
331           CLUTTER_WINSYS=cogl
332           CLUTTER_SONAME_INFIX=cex100
333
334           found_gdl=no
335           AC_CHECK_HEADERS([libgdl.h], [found_gdl=yes])
336           AS_IF([test "x$found_gdl" = "xno"],
337                 [AC_CHECK_HEADERS([CE4100/libgdl.h],
338                                   [
339                                     FLAVOUR_CFLAGS="-I/usr/include/CE4100"
340                                     found_gdl=yes
341                                     CLUTTER_CEX100_LIBGDL_PREFIX=CE4100/
342                                   ])
343                 ])
344           AC_SUBST(CLUTTER_CEX100_LIBGDL_PREFIX)
345
346           AS_IF([test x"$found_gdl" = "xno"], [AC_MSG_ERROR([libgdl.h not found])])
347
348           # evdev
349           PKG_CHECK_MODULES(EVDEV, [gudev-1.0 xkbcommon],
350                             [have_evdev=yes], [have_evdev=no])
351           AS_IF([test "x$have_evdev" = "xyes"],
352                 [AC_DEFINE([HAVE_EVDEV], 1,
353                            [Have evdev support for input handling])]
354           )
355
356           FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $EVDEV_CFLAGS"
357           FLAVOUR_LIBS="$FLAVOUR_LIBS -lgdl $EVDEV_LIBS"
358         ],
359
360         [osx],
361         [
362           CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_OSX"
363
364           AC_DEFINE([HAVE_CLUTTER_OSX], [1], [Have the OSX backend])
365
366           FLAVOUR_LIBS="$FLAVOUR_LIBS -framework Cocoa -framework OpenGL"
367
368           CLUTTER_WINSYS=osx
369           CLUTTER_SONAME_INFIX=osx
370         ],
371
372         [win32],
373         [
374           CLUTTER_STAGE_TYPE="CLUTTER_TYPE_STAGE_WIN32"
375           AC_DEFINE([HAVE_CLUTTER_WIN32], [1], [Have the Win32 backend])
376
377           FLAVOUR_LIBS="$FLAVOUR_LIBS -lopengl32 -lgdi32 -lwinmm"
378           FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS -D_WIN32_WINNT=0x0500"
379
380           AC_CHECK_TOOL(WINDRES, windres, no)
381           if test "$WINDRES" = no; then
382              AC_MSG_ERROR([*** windres is required])
383           fi
384
385           CLUTTER_WINSYS=win32
386           CLUTTER_SONAME_INFIX=win32
387         ],
388
389         [AC_MSG_ERROR([Invalid backend for Clutter])]
390 )
391
392 AS_IF([test "x$SUPPORT_X11" = "x1"],
393       [
394         # we use fontconfig API and pango-fc when the fontconfig
395         # configuration changes
396         PKG_CHECK_EXISTS([pangoft2],
397                          [
398                            AC_DEFINE([HAVE_PANGO_FT2], [1], [Supports PangoFt2])
399                            BACKEND_PC_FILES="$BACKEND_PC_FILES pangoft2"
400                          ],
401                          [])
402       ])
403
404 AS_IF([test "x$SUPPORT_GLX" = "x1"],
405       [
406         AC_DEFINE([HAVE_CLUTTER_GLX], [1], [Have the GLX backend])
407       ])
408
409 AS_IF([test "x$SUPPORT_WAYLAND" = "x1"],
410       [
411         AC_DEFINE([HAVE_CLUTTER_WAYLAND], [1], [Have the Wayland backend])
412       ])
413
414 AS_IF([test "x$SUPPORT_EGL" = "x1"],
415       [
416         AC_DEFINE([HAVE_CLUTTER_EGL], [1], [Have the EGL backend])
417       ])
418
419 AS_IF([test "x$CLUTTER_EGL_BACKEND" = "xgeneric"],
420       AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend]))
421
422 AS_IF([test "x$CLUTTER_EGL_BACKEND" = "xcex100"],
423       AC_DEFINE([CLUTTER_EGL_BACKEND_CEX100], [1], [Use CEX100 EGL backend]))
424
425 # winsys conditionals for use in automake files...
426 AM_CONDITIONAL(SUPPORT_GLX, [test "x$SUPPORT_GLX" = "x1"])
427 AM_CONDITIONAL(SUPPORT_X11, [test "x$SUPPORT_X11" = "x1"])
428 AM_CONDITIONAL(SUPPORT_XLIB, [test "x$SUPPORT_XLIB" = "x1"])
429 AM_CONDITIONAL(SUPPORT_EGL, [test "x$SUPPORT_EGL" = "x1"])
430 AM_CONDITIONAL(SUPPORT_OSX, [test "x$CLUTTER_WINSYS" = "xosx"])
431 AM_CONDITIONAL(SUPPORT_WIN32, [test "x$CLUTTER_WINSYS" = "xwin32"])
432 AM_CONDITIONAL(SUPPORT_CEX100, [test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"])
433 AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$CLUTTER_WINSYS" = "xwayland"])
434 AM_CONDITIONAL(SUPPORT_STUB, [test "x$CLUTTER_WINSYS" = "xwin32" -o \
435                                    "x$CLUTTER_WINSYS" = "xosx" -o \
436                                    "x$CLUTTER_WINSYS" = "xwayland"])
437
438 AM_CONDITIONAL(USE_TSLIB, [test "x$have_tslib" = "xyes"])
439 AM_CONDITIONAL(SUPPORT_EVDEV, [test "x$have_evdev" = "xyes"])
440
441 dnl Instead of using AM_CFLAGS to ensure
442 dnl COGL_ENABLE_EXPERIMENTAL_2_0_API is defined while compiling clutter
443 dnl and cogl code we use a define in config.h instead. This helps ensure
444 dnl other tools such as glib-mkenums and gir-scanner don't end up
445 dnl using the define also.
446 AC_DEFINE([COGL_ENABLE_EXPERIMENTAL_2_0_API], [1], [Can use Cogl 2.0 API internally])
447
448 dnl === Clutter configuration =================================================
449
450 CLUTTER_CONFIG_DEFINES=
451
452 # windowing systems
453 AS_IF([test "x$SUPPORT_XLIB" = "x1"],
454       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
455 #define CLUTTER_WINDOWING_X11 1"])
456 AS_IF([test "x$SUPPORT_GLX" = "x1"],
457       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
458 #define CLUTTER_WINDOWING_GLX 1"])
459 AS_IF([test "x$SUPPORT_EGL" = "x1"],
460       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
461 #define CLUTTER_WINDOWING_EGL 1"])
462 AS_IF([test "x$CLUTTER_WINSYS" = "xwayland"],
463       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
464 #define CLUTTER_WINDOWING_WAYLAND 1"])
465 AS_IF([test "x$CLUTTER_WINSYS" = "xosx"],
466       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
467 #define CLUTTER_WINDOWING_OSX 1"])
468 AS_IF([test "x$CLUTTER_WINSYS" = "xwin32"],
469       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
470 #define CLUTTER_WINDOWING_WIN32 1"])
471 AS_IF([test "x$SUPPORT_EGL_PLATFORM_GDL" = "x1"],
472       [CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
473 #define CLUTTER_WINDOWING_CEX100 1"])
474
475 AC_SUBST([CLUTTER_CONFIG_DEFINES])
476
477 dnl === Clutter substitutions =================================================
478 # Eventually the idea of a winsys should be hidden from Clutter and moved
479 # into Cogl, but for now we have CLUTTER_WINSYS...
480 AC_SUBST([CLUTTER_WINSYS])
481 # The same goes for the winsys-base...
482 AC_SUBST([CLUTTER_WINSYS_BASE])
483 AC_SUBST([CLUTTER_WINSYS_BASE_LIB])
484 AC_SUBST(CLUTTER_STAGE_TYPE)
485 AC_SUBST(CLUTTER_SONAME_INFIX)
486
487 CLUTTER_WINSYS_LIB=libclutter-$CLUTTER_SONAME_INFIX-$CLUTTER_API_VERSION.la
488 AC_SUBST([CLUTTER_WINSYS_LIB])
489
490 dnl === Clutter substitutions kept for backwards compatibility ================
491 AC_SUBST([CLUTTER_FLAVOUR])
492 CLUTTER_COGL=undefined
493 AC_SUBST([CLUTTER_COGL])
494
495 dnl === Image loading backend =================================================
496 IMAGE_PC_FILES=""
497
498 dnl === X11 checks, only for X11-based backends ===============================
499 X11_PC_FILES=""
500 x11_tests=no
501
502 AS_IF([test "x$SUPPORT_XLIB" = "x1"],
503       [
504         # base X11 includes and libraries
505         AC_MSG_CHECKING([for X11])
506
507         # start with pkg-config
508         PKG_CHECK_EXISTS([x11], [have_x11=yes], [have_x11=no])
509         AS_IF([test "x$have_x11" = "xyes"],
510               [
511                 X11_PC_FILES="x11"
512
513                 # we actually need to ask for CFLAGS and LIBS
514                 X11_CFLAGS=`$PKG_CONFIG --cflags $X11_PC_FILES`
515                 X11_LIBS=`$PKG_CONFIG --libs $X11_PC_FILES`
516
517                 AC_MSG_RESULT([found])
518               ],
519               [
520                 # no pkg-config, let's go old school
521                 AC_PATH_X
522
523                 AS_IF([test "x$no_x" = "xyes"],
524                       [AC_MSG_ERROR([No X11 Libraries found])],
525                       [
526                         AS_IF([test "x$x_includes" != "xNONE" && test -n "$x_includes"],
527                               [X11_CFLAGS=-I`echo $x_includes | sed -e "s/:/ -I/g"`])
528
529                         AS_IF([test "x$x_libraries" != "xNONE" && test -n "$x_libraries"],
530                               [X11_LIBS=-L`echo $x_libraries | sed -e "s/:/ -L/g"`])
531
532                         AC_MSG_RESULT([found])
533                       ]
534                 )
535               ]
536         )
537
538         # XEXT (required)
539         AC_MSG_CHECKING([for XEXT extension])
540         PKG_CHECK_EXISTS([xext], [have_xext=yes], [have_xext=no])
541         AS_IF([test "x$have_xext" = "xyes"],
542               [
543                 AC_DEFINE(HAVE_XEXT, [1], [Define to 1 if we have the XEXT X extension])
544
545                 X11_LIBS="$X11_LIBS -lXext"
546                 X11_PC_FILES="$X11_PC_FILES xext"
547
548                 AC_MSG_RESULT([found])
549               ],
550               [AC_MSG_ERROR([Not found])]
551         )
552
553         # XFIXES (required)
554         AC_MSG_CHECKING([for XFIXES extension >= $XFIXES_REQ_VERSION])
555         PKG_CHECK_EXISTS([xfixes >= $XFIXES_REQ_VERSION], [have_xfixes=yes], [have_xfixes=no])
556         AS_IF([test "x$have_xfixes" = "xyes"],
557               [
558                 AC_DEFINE(HAVE_XFIXES, [1], [Define to 1 if we have the XFIXES X extension])
559
560                 X11_LIBS="$X11_LIBS -lXfixes"
561                 X11_PC_FILES="$X11_PC_FILES xfixes >= $XFIXES_REQ_VERSION"
562
563                 AC_MSG_RESULT([found])
564               ],
565               [AC_MSG_ERROR([Not found])]
566         )
567
568         # XDAMAGE (required)
569         AC_MSG_CHECKING([for XDAMAGE extension])
570         PKG_CHECK_EXISTS([xdamage], [have_xdamage=yes], [have_xdamage=no])
571         AS_IF([test "x$have_xdamage" = "xyes"],
572               [
573                 AC_DEFINE(HAVE_XDAMAGE, [1], [Define to 1 if we have the XDAMAGE X extension])
574
575                 X11_LIBS="$X11_LIBS -lXdamage"
576                 X11_PC_FILES="$X11_PC_FILES xdamage"
577
578                 AC_MSG_RESULT([found])
579               ],
580               [AC_MSG_ERROR([not found])]
581         )
582
583         # XCOMPOSITE (optional)
584         AC_MSG_CHECKING([for XCOMPOSITE extension >= $XCOMPOSITE_REQ_VERSION])
585         PKG_CHECK_EXISTS([xcomposite >= $XCOMPOSITE_REQ_VERSION], [have_xcomposite=yes], [have_xcomposite=no])
586         AS_IF([test "x$have_xcomposite" = "xyes"],
587               [
588                 AC_DEFINE(HAVE_XCOMPOSITE, [1], [Define to 1 if we have the XCOMPOSITE X extension])
589
590                 X11_LIBS="$X11_LIBS -lXcomposite"
591                 X11_PC_FILES="$X11_PC_FILES xcomposite >= $XCOMPOSITE_REQ_VERSION"
592
593                 AC_MSG_RESULT([found])
594               ],
595               [AC_MSG_ERROR([not found])]
596         )
597
598         # X Generic Extensions (optional)
599         clutter_save_CPPFLAGS="$CPPFLAGS"
600         CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
601
602         clutter_save_LIBS="$LIBS"
603         LIBS="$LIBS $X11_LIBS"
604
605         have_xge=no
606         AC_CHECK_FUNC([XGetEventData],
607                       [
608                         AC_DEFINE([HAVE_XGE], [1], [Define to 1 if X Generic Extensions is available])
609                         have_xge=yes
610                       ])
611
612         CPPFLAGS="$clutter_save_CPPFLAGS"
613         LIBS="$clutter_save_LIBS"
614
615         # XI (optional)
616         AC_ARG_ENABLE([xinput],
617                       [AS_HELP_STRING([--enable-xinput], [Use the XI X extension])],
618                       [],
619                       [enable_xinput=yes])
620
621         AS_IF([test "x$enable_xinput" = "xyes"],
622               [
623                 PKG_CHECK_EXISTS([xi], [have_xinput=yes], [have_xinput=no])
624               ],
625               [
626                 have_xinput=no
627               ])
628
629         AS_CASE([$have_xinput],
630
631                 [yes],
632                 [
633                   AC_CHECK_HEADERS([X11/extensions/XInput2.h],
634                                    [
635                                      have_xinput2=yes
636                                      AC_DEFINE([HAVE_XINPUT_2],
637                                                [1],
638                                                [Define to 1 if XI2 is available])
639                                    ],
640                                    [
641                                      have_xinput2=no
642                                      AC_DEFINE([HAVE_XINPUT],
643                                                [1],
644                                                [Define to 1 if XInput is available])
645                                    ])
646
647                   X11_LIBS="$X11_LIBS $XINPUT_LIBS"
648                   X11_PC_FILES="$X11_PC_FILES xi"
649                 ],
650
651                 [no],
652                 [have_xinput2=no],
653
654                 [*],
655                 [AC_MSG_ERROR([Invalid argument for --enable-xinput])]
656         )
657
658         # XKB
659         clutter_save_CPPFLAGS="$CPPFLAGS"
660         CPPFLAGS="$CPPFLAGS $X11_CFLAGS"
661
662         clutter_save_LIBS="$LIBS"
663         LIBS="$LIBS $X11_LIBS"
664
665         have_xkb=no
666         AC_CHECK_FUNC([XkbQueryExtension],
667                       [
668                         AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
669                         have_xkb=yes
670                       ])
671
672         CPPFLAGS="$clutter_save_CPPFLAGS"
673         LIBS="$clutter_save_LIBS"
674
675         x11_tests=yes
676         BACKEND_PC_FILES="$BACKEND_PC_FILES $X11_PC_FILES"
677         FLAVOUR_LIBS="$FLAVOUR_LIBS $X11_LIBS"
678         FLAVOUR_CFLAGS="$FLAVOUR_CFLAGS $X11_CFLAGS"
679       ]
680 )
681
682 AM_CONDITIONAL([BUILD_XI2], [test "x$have_xinput2" = "xyes"])
683 AM_CONDITIONAL(X11_TESTS, [test "x$x11_tests" = "xyes"])
684
685 dnl === Enable debug level ====================================================
686
687 m4_define([debug_default], [m4_if(m4_eval(clutter_minor_version % 2), [1], [yes], [minimum])])
688 AC_ARG_ENABLE([debug],
689               [AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
690                               [Control Clutter debugging level @<:@default=]debug_default[@:>@])],
691               [],
692               [enable_debug=debug_default])
693
694 AS_CASE([$enable_debug],
695
696         [yes],
697         [
698           test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
699           CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG"
700         ],
701
702         [minimum],
703         [CLUTTER_DEBUG_CFLAGS="-DCLUTTER_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"],
704
705         [no],
706         [CLUTTER_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
707
708         [AC_MSG_ERROR([Unknown argument for --enable-debug])]
709 )
710
711 AC_SUBST(CLUTTER_DEBUG_CFLAGS)
712
713 dnl === Enable deprecation guards ==================================================
714
715 m4_define([deprecated_default],
716           [m4_if(m4_eval(clutter_minor_version % 2),
717                  [1],
718                  [no],
719                  [yes])])
720
721 AC_ARG_ENABLE([deprecated],
722               [AS_HELP_STRING([--enable-deprecated=@<:@no/yes@:>@],
723                               [Whether deprecated symbols should be disabled when compiling Clutter @<:@default=]deprecated_default[@:>@])],
724               [],
725               [enable_deprecated=deprecated_default])
726
727 AS_CASE([$enable_deprecated],
728
729         [no],
730         [
731           CLUTTER_DEPRECATED_CFLAGS="-DG_DISABLE_SINGLE_INCLUDES -DCOGL_DISABLE_DEPRECATED -DCLUTTER_DISABLE_DEPRECATED"
732         ],
733
734         [yes],
735         [
736           CLUTTER_DEPRECATED_CFLAGS="-DGLIB_DISABLE_DEPRECATION_WARNINGS -DCLUTTER_DISABLE_DEPRECATION_WARNINGS"
737         ],
738
739         [AC_MSG_ERROR([Unknown argument for --enable-deprecated])]
740 )
741
742 AC_SUBST([CLUTTER_DEPRECATED_CFLAGS])
743
744
745 dnl === Conformance test suite ================================================
746
747 AC_ARG_ENABLE([conformance],
748               [AS_HELP_STRING([--enable-conformance=@<:@no/yes@:>@],
749                               [Build conformance test suite @<:@default=yes@:>@])],
750               [],
751               [enable_conformance=yes])
752
753 AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_conformance" = "xyes"])
754
755 dnl === Profiling =============================================================
756
757 m4_define([profile_default], [no])
758 AC_ARG_ENABLE(profile,
759               AS_HELP_STRING([--enable-profile=@<:@no/yes@:>@],
760                              [Turn on profiling support. yes; All profiling probe points are compiled in and may be runtime enabled. no; No profiling support will built into clutter.  @<:@default=no@:>@]),
761               [],
762               [enable_profile=profile_default])
763
764 AS_CASE([$enable_profile],
765
766         [yes],
767         [
768           AS_IF([test "x$GCC" = "xyes"],
769                 [
770                   PKG_CHECK_MODULES([PROFILE_DEP], [uprof-0.3])
771                   CLUTTER_PROFILE_CFLAGS="-DCLUTTER_ENABLE_PROFILE $PROFILE_DEP_CFLAGS"
772                   CLUTTER_PROFILE_LDFLAGS="$PROFILE_DEP_LIBS"
773
774                   AS_IF([test "x$enable_debug" = "xyes"], [CLUTTER_PROFILE_CFLAGS+=" -DUPROF_DEBUG"])
775                 ],
776                 [
777                   AC_MSG_ERROR([--enable-profile is currently only supported if using GCC])
778                 ])
779         ],
780
781         [no],
782         [
783           CLUTTER_PROFILE_CFLAGS=""
784           CLUTTER_PROFILE_LDFLAGS=""
785         ],
786
787         [*], [AC_MSG_ERROR([Invalid value for --enable-profile])]
788 )
789 AM_CONDITIONAL(PROFILE, test "x$enable_profile" != "xno")
790 AC_SUBST(CLUTTER_PROFILE_CFLAGS)
791 AC_SUBST(CLUTTER_PROFILE_LDFLAGS)
792
793 dnl === Coverage report =======================================================
794
795 AC_PATH_PROG([GCOV], [gcov], [enable_gcov=no])
796
797 AC_MSG_CHECKING([whether to build with gcov testing])
798
799 AC_ARG_ENABLE([gcov],
800               [AS_HELP_STRING([--enable-gcov],
801                               [Whether to enable coverage testing (requires gcc
802 and gcov)])],
803               [],
804               [enable_gcov=no])
805
806 AS_IF([test "x$enable_gcov" = "xyes" && test "x$GCC" = "xyes"],
807       [
808         AS_IF([test "x$enable_conformance" = "xno"],
809               [AC_MSG_WARN([Conformance test suite is disabled, the coverage report will be incomplete])],
810               [AC_MSG_RESULT([yes])]
811         )
812
813         GCOV_CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
814         GCOV_LDFLAGS="-lgcov"
815       ],
816       [AC_MSG_RESULT([no])]
817 )
818
819 AM_CONDITIONAL([GCOV_ENABLED], [test "x$enable_gcov" = "xyes"])
820 AC_SUBST([GCOV_CFLAGS])
821 AC_SUBST([GCOV_LDFLAGS])
822
823 dnl === Enable strict compiler flags ==========================================
824
825 # use strict compiler flags only when building from git; the rules for
826 # distcheck will take care of turning this on when making a release
827 m4_define([maintainer_flags_default], [m4_if(m4_eval(clutter_micro_version % 2), [1], [yes], [no])])
828 AC_ARG_ENABLE([maintainer-flags],
829               [AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes/error@:>@],
830                               [Use strict compiler flags @<:@default=]maintainer_flags_default[@:>@])],
831               [],
832               [enable_maintainer_flags=maintainer_flags_default])
833
834 MAINTAINER_COMPILER_FLAGS="-Wall -Wshadow -Wcast-align -Wuninitialized
835                            -Wno-strict-aliasing -Wempty-body -Wformat
836                            -Wformat-security -Winit-self
837                            -Wdeclaration-after-statement -Wvla
838                            -Wpointer-arith"
839
840 AS_CASE([$enable_maintainer_flags],
841         [yes],
842         [
843           AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
844         ],
845
846         [no],
847         [
848         ],
849
850         [error],
851         [
852           MAINTAINER_COMPILER_FLAGS="$MAINTAINER_COMPILER_FLAGS -Werror"
853           AS_COMPILER_FLAGS([MAINTAINER_CFLAGS], [$MAINTAINER_COMPILER_FLAGS])
854         ],
855
856         [*],
857         [AC_MSG_ERROR([Invalid option for --enable-maintainer-flags])]
858 )
859
860 # strip leading spaces
861 MAINTAINER_CFLAGS=${MAINTAINER_CFLAGS#*  }
862 AC_SUBST(MAINTAINER_CFLAGS)
863
864 dnl === Dependencies, compiler flags and linker libraries =====================
865 # strip leading space
866 BACKEND_PC_FILES=${BACKEND_PC_FILES#* }
867
868 CLUTTER_REQUIRES="$CLUTTER_BASE_PC_FILES $IMAGE_PC_FILES $BACKEND_PC_FILES"
869 PKG_CHECK_MODULES(CLUTTER_DEPS, [$CLUTTER_REQUIRES])
870 AC_SUBST(CLUTTER_REQUIRES)
871
872 CLUTTER_CFLAGS="$FLAVOUR_CFLAGS $CLUTTER_DEPS_CFLAGS $CLUTTER_PROFILE_CFLAGS $GLIB_CFLAGS"
873 CLUTTER_LIBS="$FLAVOUR_LIBS $CLUTTER_DEPS_LIBS $CLUTTER_PROFILE_LDFLAGS $GLIB_LIBS"
874 AC_SUBST(CLUTTER_CFLAGS)
875 AC_SUBST(CLUTTER_LIBS)
876
877
878 dnl === GObject-Introspection check ===========================================
879
880 GOBJECT_INTROSPECTION_CHECK([gi_req_version])
881
882 dnl === GTK Doc check =========================================================
883
884 GTK_DOC_CHECK([gtk_doc_req_version], [--flavour no-tmpl])
885
886 # we don't want to build the documentation from a Git clone unless we
887 # explicitly tell configure to do so; this allows avoiding to recurse into
888 # the documentation directory when building Clutter inside Poky for a
889 # target device that doesn't have gtk-doc installed. for reference
890 # see: http://bugzilla.openedhand.com/show_bug.cgi?id=1047
891 #
892 # we use autogen.sh as it exists only inside the Git clones, and it
893 # is not packaged into tarballs.
894 AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes" || test ! -f "autogen.sh"])
895
896 # prefixes for fixing gtk-doc references
897 CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
898 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
899 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
900 COGL_PREFIX="`$PKG_CONFIG --variable=prefix cogl-1.0`"
901 ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
902 AC_SUBST(CAIRO_PREFIX)
903 AC_SUBST(GLIB_PREFIX)
904 AC_SUBST(PANGO_PREFIX)
905 AC_SUBST(COGL_PREFIX)
906 AC_SUBST(ATK_PREFIX)
907
908 dnl === Manual ================================================================
909
910 AC_ARG_ENABLE([docs],
911               [AS_HELP_STRING([--enable-docs=@<:@no/yes@:>@],
912                               [Build optional documentation; requires xsltproc and jw.])],
913               [enable_docs=$enableval],
914               [enable_docs=no])
915
916 enable_pdfs=no
917 AS_IF([test "x$enable_docs" = "xyes"],
918       [
919         AC_PATH_PROG(JW, [jw], [no])
920         AS_IF([test "x$JW" = "xno"],
921               [
922                 AC_MSG_WARN([jw not found; pdf generation has been disabled])
923               ],
924               [enable_pdfs=yes])
925
926         AC_PATH_PROG(XSLTPROC, [xsltproc], [no])
927         AS_IF([test "x$XSLTPROC" = "xno"],
928               [
929                 AC_MSG_ERROR([xsltproc not found])
930               ])
931       ]
932 )
933
934 AM_CONDITIONAL(ENABLE_DOCS, [test "x$enable_docs" = "xyes"])
935 AM_CONDITIONAL(ENABLE_PDFS, [test "x$enable_pdfs" = "xyes"])
936
937 dnl === I18N ==================================================================
938
939 AM_GNU_GETTEXT_VERSION([0.17])
940 AM_GNU_GETTEXT([external])
941
942 GETTEXT_PACKAGE="clutter-1.0"
943 AC_SUBST(GETTEXT_PACKAGE)
944 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
945                    ["$GETTEXT_PACKAGE"],
946                    [The prefix for our gettext translation domains.])
947 AS_ALL_LINGUAS
948
949 dnl ===========================================================================
950
951 AC_CONFIG_FILES([
952         Makefile
953
954         README
955
956         build/Makefile
957         build/autotools/Makefile
958         build/mingw/Makefile
959
960         clutter/Makefile
961         clutter/clutter-config.h
962         clutter/clutter-version.h
963         clutter/clutter-$CLUTTER_API_VERSION.pc:clutter/clutter.pc.in
964
965         clutter/cally/cally-$CLUTTER_API_VERSION.pc:clutter/cally/cally.pc.in
966
967         clutter/cogl/clutter-cex100.h
968
969         tests/Makefile
970         tests/accessibility/Makefile
971         tests/conform/Makefile
972         tests/conform/test-launcher.sh
973         tests/data/Makefile
974         tests/interactive/Makefile
975         tests/interactive/wrapper.sh
976         tests/micro-bench/Makefile
977         tests/performance/Makefile
978
979         doc/Makefile
980         doc/reference/Makefile
981         doc/reference/clutter/Makefile
982         doc/reference/clutter/clutter-docs.xml
983         doc/reference/cally/Makefile
984         doc/reference/cally/cally-docs.xml
985         doc/common/Makefile
986         doc/cookbook/Makefile
987         doc/cookbook/clutter-cookbook.xml
988         doc/cookbook/examples/Makefile
989
990         po/Makefile.in
991 ])
992
993 AC_OUTPUT
994
995 dnl === Summary ===============================================================
996
997 echo ""
998 echo "Clutter - $VERSION (${CLUTTER_RELEASE_STATUS})"
999
1000 # Global flags
1001 echo ""
1002 echo " • Global:"
1003 echo "        Prefix: ${prefix}"
1004 echo "        Libdir: ${libdir}"
1005 echo "        Sysconfdir: ${sysconfdir}"
1006 echo "        Flavour: ${CLUTTER_WINSYS}"
1007 echo "        Target library: ${CLUTTER_WINSYS_LIB}"
1008
1009 # Compiler/Debug related flags
1010 echo ""
1011 echo " • Compiler options:"
1012 echo "        Clutter debug level: ${enable_debug}"
1013 echo "        Compiler flags: ${CFLAGS} ${MAINTAINER_CFLAGS}"
1014 echo "        Profiling enabled: ${enable_profile}"
1015 echo "        Enable coverage tests: ${enable_gcov}"
1016 echo "        Enable deprecated symbols: ${enable_deprecated}"
1017
1018 # Documentation
1019 echo ""
1020 echo " • Documentation:"
1021 echo "        Build API Reference: ${enable_gtk_doc}"
1022 echo "        Build Additional Documentation: ${enable_docs} (Generate PDF: ${enable_pdfs})"
1023
1024 # Miscellaneous
1025 echo ""
1026 echo " • Extra:"
1027 echo "        Build introspection data: ${enable_introspection}"
1028 echo "        Build conformance test suite: ${enable_conformance}"
1029
1030 # Clutter backend related flags
1031 echo ""
1032 echo " • Clutter Backend:"
1033
1034 if test "x$experimental_backend" = "xno"; then
1035 echo "        Windowing system: ${CLUTTER_WINSYS}"
1036 else
1037 echo "        Windowing system: ${CLUTTER_WINSYS} (WARNING: Experimental)"
1038 fi
1039
1040 if test "x$SUPPORT_XLIB" = "x1"; then
1041 echo "        Enable XComposite: ${have_xcomposite}"
1042 echo "        Enable XInput: ${have_xinput}"
1043 echo "        Enable Xge: ${have_xge}"
1044 echo "        Enable XI2: ${have_xinput2}"
1045 echo "        Enable XKB: ${have_xkb}"
1046 echo "        Enable X11 tests: ${x11_tests}"
1047 fi
1048
1049 echo ""
1050
1051 # General warning about experimental features
1052 if test "x$experimental_backend" = "xyes" ||
1053    test "x$experimental_image" = "xyes"
1054 then
1055 echo ""
1056 echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
1057 echo " *WARNING*"
1058 echo ""
1059 echo "  The stability of your build might be affected by one or more"
1060 echo "  experimental backends or experimental and unsupported features"
1061 echo "☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠☠"
1062 echo ""
1063 fi