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