9b017e92c00cfe40c7e19f69c8ee38a5ac5be2a1
[platform/upstream/kmscon.git] / configure.ac
1 #
2 # Kmscon - build configuration script
3 # Copyright (c) 2012 David Herrmann <dh.herrmann@googlemail.com>
4 #
5
6 AC_PREREQ(2.68)
7
8 AC_INIT([kmscon], [5])
9 AC_SUBST(PACKAGE_URL, [https://github.com/dvdhrm/kmscon])
10 AC_CONFIG_SRCDIR([src/main.c])
11 AC_CONFIG_AUX_DIR([build-aux])
12 AC_CONFIG_MACRO_DIR([m4])
13 AC_CONFIG_HEADER(config.h)
14
15 AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-bzip2 no-dist-gzip tar-pax -Wall -Werror])
16 AM_SILENT_RULES([yes])
17
18 #
19 # Don't add a default "-g -O2" if CFLAGS wasn't specified. For debugging it is
20 # often more convenient to have "-g -O0". You can still override it by
21 # explicitely setting it on the command line.
22 #
23
24 : ${CFLAGS=""}
25
26 AC_USE_SYSTEM_EXTENSIONS
27 AC_PROG_CC
28 AC_PROG_CC_C99
29 AM_PROG_CC_C_O
30 AM_PROG_AR
31
32 LT_PREREQ(2.2)
33 LT_INIT
34
35 #
36 # pkg-config dependencies
37 # This unconditionally checks for all dependencies even if they are disabled. We
38 # later look whether all required depedencies are met and finish the
39 # configuration. We group similar packages into one logical group here to avoid
40 # having variables for each single library.
41 # This, however, makes ./configure output very unintuitive error messages if a
42 # package is not found so we must make sure we print more verbose messages
43 # ourself.
44 #
45
46 PKG_CHECK_MODULES([SYSTEMD], [libsystemd-login],
47                   [have_systemd=yes], [have_systemd=no])
48
49 PKG_CHECK_MODULES([UDEV], [libudev],
50                   [have_udev=yes], [have_udev=no])
51
52 PKG_CHECK_MODULES([DBUS], [dbus-1],
53                   [have_dbus=yes], [have_dbus=no])
54
55 PKG_CHECK_MODULES([DRM], [libdrm],
56                   [have_drm=yes], [have_drm=no])
57
58 PKG_CHECK_MODULES([GBM], [gbm],
59                   [have_gbm=yes], [have_gbm=no])
60
61 PKG_CHECK_MODULES([EGL], [egl],
62                   [have_egl=yes], [have_egl=no])
63
64 PKG_CHECK_MODULES([GLES2], [glesv2],
65                   [have_gles2=yes], [have_gles2=no])
66
67 PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon],
68                   [have_xkbcommon=yes], [have_xkbcommon=no])
69
70 PKG_CHECK_MODULES([FREETYPE2], [freetype2 fontconfig],
71                   [have_freetype2=yes], [have_freetype2=no])
72
73 PKG_CHECK_MODULES([PANGO], [pango pangoft2],
74                   [have_pango=yes], [have_pango=no])
75
76 PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server wayland-cursor],
77                   [have_wayland=yes], [have_wayland=no])
78
79 #
80 # Parse arguments for applications
81 # Parse all command-line arguments that enable or disable build of applications.
82 # This allows us to compute which dependencies we need.
83 #
84
85 AC_MSG_CHECKING([whether to compile eloop])
86 AC_ARG_ENABLE([eloop],
87               [AS_HELP_STRING([--enable-eloop],
88                               [build eloop library])])
89 AC_MSG_RESULT([ok])
90
91 AC_MSG_CHECKING([whether to compile TSM])
92 AC_ARG_ENABLE([tsm],
93               [AS_HELP_STRING([--enable-tsm],
94                               [build tsm library])])
95 AC_MSG_RESULT([ok])
96
97 AC_MSG_CHECKING([whether to compile uterm])
98 AC_ARG_ENABLE([uterm],
99               [AS_HELP_STRING([--enable-uterm],
100                               [build uterm library])])
101 AC_MSG_RESULT([ok])
102
103 AC_MSG_CHECKING([whether to compile kmscon])
104 AC_ARG_ENABLE([kmscon],
105               [AS_HELP_STRING([--disable-kmscon],
106                               [do not build kmscon])])
107 AC_MSG_RESULT([ok])
108
109 AC_MSG_CHECKING([whether to build wlterm])
110 AC_ARG_ENABLE([wlterm],
111               [AS_HELP_STRING([--enable-wlterm],
112                               [build wlterm])])
113 AC_MSG_RESULT([ok])
114
115 #
116 # Parse depedency arguments
117 # This parses all command-line arguments to check for which dependencies should
118 # be used and how the applications should be built.
119 #
120
121 AC_MSG_CHECKING([whether to use systemd for multi-seat support])
122 AC_ARG_ENABLE([systemd],
123               [AS_HELP_STRING([--enable-systemd],
124                               [enable multi-seat support with systemd])])
125 AC_MSG_RESULT([ok])
126
127 AC_MSG_CHECKING([whether to use udev for device hotplug support])
128 AC_ARG_ENABLE([udev],
129               [AS_HELP_STRING([--enable-udev],
130                               [enable device hotplug support with udev])])
131 AC_MSG_RESULT([ok])
132
133 AC_MSG_CHECKING([whether to use dbus for IPC])
134 AC_ARG_ENABLE([dbus],
135               [AS_HELP_STRING([--enable-dbus],
136                               [enable dbus IPC])])
137 AC_MSG_RESULT([ok])
138
139 AC_MSG_CHECKING([whether to use uterm fbdev video backend])
140 AC_ARG_ENABLE([fbdev],
141               [AS_HELP_STRING([--enable-fbdev],
142                               [enable uterm fbdev video backend])])
143 AC_MSG_RESULT([ok])
144
145 AC_MSG_CHECKING([whether to use uterm drm video backend])
146 AC_ARG_ENABLE([drm],
147               [AS_HELP_STRING([--enable-drm],
148                               [enable uterm drm video backend])])
149 AC_MSG_RESULT([ok])
150
151 AC_MSG_CHECKING([whether to provide OpenGLES2 support])
152 AC_ARG_ENABLE([gles2],
153               [AS_HELP_STRING([--enable-gles2],
154                               [provide uterm OpenGLES2 support])])
155 AC_MSG_RESULT([ok])
156
157 AC_MSG_CHECKING([whether to use xkbcommon keyboard backend])
158 AC_ARG_ENABLE([xkbcommon],
159               [AS_HELP_STRING([--disable-xkbcommon],
160                               [disable xkbcommon keyboard backend])])
161 AC_MSG_RESULT([ok])
162
163 AC_MSG_CHECKING([whether to use static unifont backend])
164 AC_ARG_ENABLE([unifont],
165               [AS_HELP_STRING([--enable-unifont],
166                               [enable static unifont font backend (GPL)])])
167 AC_MSG_RESULT([ok])
168
169 AC_MSG_CHECKING([whether to use static 8x16 font backend])
170 AC_ARG_ENABLE([f8x16],
171               [AS_HELP_STRING([--disable-f8x16],
172                               [disable static 8x16 font backend])])
173 AC_MSG_RESULT([ok])
174
175 AC_MSG_CHECKING([whether to use freetype2 font backend])
176 AC_ARG_ENABLE([freetype2],
177               [AS_HELP_STRING([--disable-freetype2],
178                               [disable freetype2 font backend])])
179 AC_MSG_RESULT([ok])
180
181 AC_MSG_CHECKING([whether to use pango font backend])
182 AC_ARG_ENABLE([pango],
183               [AS_HELP_STRING([--disable-pango],
184                               [disable pango font backend])])
185 AC_MSG_RESULT([ok])
186
187 AC_MSG_CHECKING([whether to use bblit rendering backend])
188 AC_ARG_ENABLE([bblit],
189               [AS_HELP_STRING([--disable-bblit],
190                               [disable bblit rendering backend])])
191 AC_MSG_RESULT([ok])
192
193 AC_MSG_CHECKING([whether to use bbulk rendering backend])
194 AC_ARG_ENABLE([bbulk],
195               [AS_HELP_STRING([--disable-bbulk],
196                               [disable bbulk rendering backend])])
197 AC_MSG_RESULT([ok])
198
199 #
200 # Parse miscellaneous arguments
201 # These don't belong into the categories above for several reason so they are
202 # handled specially.
203 # They configure compiler options and similar.
204 #
205
206 AC_MSG_CHECKING([whether to build with debugging on])
207 AC_ARG_ENABLE([debug],
208               [AS_HELP_STRING([--enable-debug],
209                               [whether to build with debugging on])])
210 AC_MSG_RESULT([ok])
211
212 AC_MSG_CHECKING([whether to disable code optimizations])
213 AC_ARG_ENABLE([optimizations],
214               [AS_HELP_STRING([--disable-optimizations],
215                               [whether to disable code optimizations])])
216 AC_MSG_RESULT([ok])
217
218 #
219 # Debug mode and code optimizations
220 # In debug mode we compile with -g and enable several debug-messages and flags.
221 # With optimizations (default), we add -O2 to compile-flags.
222 #
223
224 debug_enabled=no
225 if test x$enable_debug = xyes ; then
226         debug_enabled=yes
227 fi
228
229 optimizations_enabled=no
230 if test ! x$enable_optimizations = xno ; then
231         optimizations_enabled=yes
232 fi
233
234 if test x$debug_enabled = xyes ; then
235         AC_DEFINE([BUILD_ENABLE_DEBUG], [1],
236                   [Enable debug mode])
237 else
238         AC_DEFINE([NDEBUG], [1], [No Debug])
239 fi
240
241 AM_CONDITIONAL([BUILD_ENABLE_DEBUG],
242                [test x$debug_enabled = xyes])
243 AM_CONDITIONAL([BUILD_ENABLE_OPTIMIZATIONS],
244                [test x$optimizations_enabled = xyes])
245
246 # check for _Static_assert
247 AC_MSG_CHECKING([whether _Static_assert() is supported])
248 AC_LANG([C])
249 have_static_assert=yes
250 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[_Static_assert(1, "What?");]])],
251                   [AC_DEFINE([BUILD_HAVE_STATIC_ASSERT],
252                              [1],
253                              [Define to 1 if _Static_assert() is supported])],
254                   [have_static_assert=no])
255 AC_MSG_RESULT([$have_static_assert])
256
257 #
258 # Main applications
259 # This checks which applications to build so we can optionally disable unused
260 # dependencies below.
261 #
262 # Dependency Calculations
263 # The first thing we do is checking which applications to build. Then we
264 # forcibly enable all libraries that are needed by these and then we forcibly
265 # enable all other source-code dependecies.
266 #
267 # The "enable_XY" flag is user input that is set to "yes" if they enabled it
268 # explicitly, "no" if they disabled it explicitly or "" (empty) if they did
269 # not specify it explicitly. In the latter case we enable it if all dependencies
270 # are met, otherwise, we disable it. This does not work for applications,
271 # though. If an application is not specified explicitly by the user, then we
272 # force the default value.
273 # An application also forces all _hard_ dependencies to "yes" and so fails if
274 # they cannot be met.
275 #
276
277 kmscon_enabled=no
278 if test ! x$enable_kmscon = xno ; then
279         kmscon_enabled=yes
280         enable_eloop=yes
281         enable_tsm=yes
282         enable_uterm=yes
283 fi
284
285 AM_CONDITIONAL([BUILD_ENABLE_KMSCON],
286                [test x$kmscon_enabled = xyes])
287
288 wlterm_enabled=no
289 if test x$enable_wlterm = xyes ; then
290         wlterm_enabled=yes
291         enable_eloop=yes
292         enable_tsm=yes
293         enable_wayland=yes
294         enable_xkbcommon=yes
295 fi
296
297 AM_CONDITIONAL([BUILD_ENABLE_WLTERM],
298                [test x$wlterm_enabled = xyes])
299
300 uterm_enabled=no
301 if test x$enable_uterm = xyes ; then
302         uterm_enabled=yes
303         eloop_enabled=yes
304 fi
305
306 AM_CONDITIONAL([BUILD_ENABLE_UTERM],
307                [test x$uterm_enabled = xyes])
308
309 eloop_enabled=no
310 if test x$enable_eloop = xyes ; then
311         eloop_enabled=yes
312 fi
313
314 AM_CONDITIONAL([BUILD_ENABLE_ELOOP],
315                [test x$eloop_enabled = xyes])
316
317 tsm_enabled=no
318 if test x$enable_tsm = xyes ; then
319         tsm_enabled=yes
320 fi
321
322 AM_CONDITIONAL([BUILD_ENABLE_TSM],
323                [test x$tsm_enabled = xyes])
324
325 #
326 # Systemd dependency
327 # We can optionally use systemd for multi-seat support. If systemd is not
328 # available or the system was not started with systemd, we simply fall back to
329 # single-seat mode.
330 #
331
332 systemd_enabled=no
333 if test ! x$enable_systemd = xno ; then
334         if test x$have_systemd = xyes ; then
335                 systemd_enabled=yes
336         elif test x$enable_systemd = xyes ; then
337                 AC_ERROR([systemd libraries not found for multi-seat support])
338         fi
339 fi
340
341 if test x$systemd_enabled = xyes ; then
342         AC_DEFINE([BUILD_ENABLE_SYSTEMD], [1],
343                   [Use systemd for multi-seat support])
344 else
345         SYSTEMD_CFLAGS=""
346         SYSTEMD_LIBS=""
347 fi
348
349 #
350 # Udev dependency
351 # For hotplugging support we need udev to notify us about system events. If udev
352 # is not available, we simply fall back to static mode. Periodic scanning is
353 # also supported.
354 #
355
356 udev_enabled=no
357 if test ! x$enable_udev = xno ; then
358         if test x$have_udev = xyes ; then
359                 udev_enabled=yes
360         elif test x$enable_udev = xyes ; then
361                 AC_ERROR([udev libraries not found for device hotplug support])
362         fi
363 fi
364
365 if test x$udev_enabled = xyes ; then
366         AC_DEFINE([BUILD_ENABLE_UDEV], [1],
367                   [Use udev for device hotplug support])
368 else
369         UDEV_CFLAGS=""
370         UDEV_LIBS=""
371 fi
372
373 #
374 # DBus dependency
375 # For IPC mechanisms we use DBus. Especially multi-seat enabled multi-session
376 # capable applications need DBus to manage application and terminal switching.
377 #
378
379 dbus_enabled=no
380 if test x$enable_dbus = xyes ; then
381         if test x$have_dbus = xyes ; then
382                 dbus_enabled=yes
383         elif test x$enable_dbus = xyes; then
384                 AC_ERROR([dbus libraries not found])
385         fi
386 fi
387
388 if test x$dbus_enabled = xyes; then
389         AC_DEFINE([BUILD_ENABLE_DBUS], [1],
390                   [Use dbus for IPC])
391 else
392         DBUS_CFLAGS=""
393         DBUS_LIBS=""
394 fi
395
396 AM_CONDITIONAL([BUILD_ENABLE_DBUS], [test x$dbus_enabled = xyes])
397
398 #
399 # Uterm fbdev backend
400 # This checks whether the fbdev backend was requested and enables it then. There
401 # are no special dependencies for it except the kernel headers.
402 # TODO: check for kernel headers here
403 #
404
405 fbdev_enabled=no
406 if test ! x$enable_fbdev = xno ; then
407         fbdev_enabled=yes
408 fi
409
410 if test x$fbdev_enabled = xyes ; then
411         AC_DEFINE([BUILD_ENABLE_FBDEV], [1],
412                   [Use uterm fbdev video backend])
413 fi
414
415 AM_CONDITIONAL([BUILD_ENABLE_FBDEV], [test x$fbdev_enabled = xyes])
416
417 #
418 # Uterm drm backend
419 # This checks whether libdrm is available and some combination of libgbm, egl
420 # and gl or glesv2. If it is not available, then the drm backend is simply not
421 # built.
422 #
423
424 dumb_enabled=no
425 drm_enabled=no
426 gles2_enabled=no
427 if test ! x$enable_drm = xno ; then
428         if test x$have_drm = xyes ; then
429                 dumb_enabled=yes
430         fi
431
432         if test ! x$enable_gles2 = xno ; then
433                 if test x$have_drm = xyes -a x$have_gbm = xyes -a x$have_egl = xyes ; then
434                         if test x$have_gles2 = xyes ; then
435                                 drm_enabled=yes
436                                 gles2_enabled=yes
437                         fi
438                 fi
439         fi
440
441         if test x$enable_drm = xyes -a x$dumb_enabled = xno ; then
442                 AC_ERROR([drm library not found for uterm dumb drm backend])
443         fi
444
445         if test x$enable_gles2 = xyes -a x$drm_enabled = xno ; then
446                 AC_ERROR([drm, gbm, egl, gl or gles2 libraries not found for uterm drm backend])
447         fi
448 fi
449
450 if test x$dumb_enabled = xyes ; then
451         AC_DEFINE([BUILD_ENABLE_DUMB], [1],
452                   [Use uterm dumb drm video backend])
453
454         if test x$drm_enabled = xyes ; then
455                 AC_DEFINE([BUILD_ENABLE_DRM], [1],
456                           [Use uterm DRM video backend])
457         else
458                 GBM_CFLAGS=""
459                 GBM_LIBS=""
460                 EGL_CFLAGS=""
461                 EGL_LIBS=""
462         fi
463 else
464         DRM_CFLAGS=""
465         DRM_LIBS=""
466         GBM_CFLAGS=""
467         GBM_LIBS=""
468         EGL_CFLAGS=""
469         EGL_LIBS=""
470 fi
471
472 if test x$gles2_enabled = xyes ; then
473         AC_DEFINE([BUILD_ENABLE_GLES2], [1],
474                   [Use OpenGLESv2 as drawing backend])
475 else
476         GLES2_CFLAGS=""
477         GLES2_LIBS=""
478 fi
479
480 AM_CONDITIONAL([BUILD_ENABLE_DUMB], [test x$dumb_enabled = xyes])
481 AM_CONDITIONAL([BUILD_ENABLE_DRM], [test x$drm_enabled = xyes])
482 AM_CONDITIONAL([BUILD_ENABLE_GLES2], [test x$gles2_enabled = xyes])
483
484 # check for gbm_bo_get_stride() function, otherwise gbm_bo_get_pitch() is used
485 if test x$have_gbm = xyes ; then
486         save_CFLAGS="$CFLAGS"
487         save_LIBS="$LIBS"
488         CFLAGS="$CFLAGS $GBM_CFLAGS $DRM_CFLAGS"
489         LIBS="$LIBS $GBM_LIBS $DRM_LIBS"
490         AC_CHECK_LIB([gbm],
491                      [gbm_bo_get_stride],
492                      [AC_DEFINE([BUILD_HAVE_GBM_BO_GET_STRIDE],
493                                 [1],
494                                 [Define to 1 if your libgbm provides gbm_bo_get_stride])])
495         CFLAGS="$save_CFLAGS"
496         LIBS="$save_LIBS"
497 fi
498
499 #
500 # xkbcommon keyboard backend
501 # This checks for the xkbcommon library for keyboard handling in uterm. If it is
502 # not available, we use a dumb-keyboard backend as fall-back.
503 #
504
505 xkbcommon_enabled=no
506 if test ! x$enable_xkbcommon = xno ; then
507         if test x$have_xkbcommon = xyes ; then
508                 xkbcommon_enabled=yes
509         elif test x$enable_xkbcommon = xyes ; then
510                 AC_ERROR([xkbcommon not found for keyboard backend])
511         fi
512 fi
513
514 if test x$xkbcommon_enabled = xyes ; then
515         AC_DEFINE([BUILD_ENABLE_XKBCOMMON], [1],
516                   [Use xkbcommon as input keyboard handling backend])
517 else
518         XKBCOMMON_CFLAGS=""
519         XKBCOMMON_LIBS=""
520 fi
521
522 AM_CONDITIONAL([BUILD_ENABLE_XKBCOMMON], [test x$xkbcommon_enabled = xyes])
523
524 #
525 # Font backends
526 # This checks for the unifont, 8x16, freetype2 and pango font backends and
527 # enables them if requested and available.
528 #
529 # Please note that the Unifont-data is GPL'ed and we compile this statically
530 # into our application. I do not consider this a "derivative" but a lawyer may
531 # disagree. So please make sure you enable this only if you use the GPL as
532 # license for kmscon.
533 #
534
535 unifont_enabled=no
536 if test x$enable_unifont = xyes ; then
537         unifont_enabled=yes
538 fi
539
540 if test x$unifont_enabled = xyes ; then
541         AC_DEFINE([BUILD_ENABLE_UNIFONT], [1],
542                   [Use static unifont backend])
543 fi
544
545 AM_CONDITIONAL([BUILD_ENABLE_UNIFONT], [test x$unifont_enabled = xyes])
546
547 f8x16_enabled=no
548 if test ! x$enable_f8x16 = xno ; then
549         f8x16_enabled=yes
550 fi
551
552 if test x$f8x16_enabled = xyes ; then
553         AC_DEFINE([BUILD_ENABLE_8X16], [1],
554                   [Use static 8x16 font backend])
555 fi
556
557 AM_CONDITIONAL([BUILD_ENABLE_8X16], [test x$f8x16_enabled = xyes])
558
559 freetype2_enabled=no
560 if test ! x$enable_freetype2 = xno ; then
561         if test x$have_freetype2 = xyes ; then
562                 freetype2_enabled=yes
563         elif test x$enable_freetype2 = xyes ; then
564                 AC_ERROR([freetype2/fontconfig not found for freetype2 backend])
565         fi
566 fi
567
568 if test x$freetype2_enabled = xyes ; then
569         AC_DEFINE([BUILD_ENABLE_FREETYPE2], [1],
570                   [Use freetype2 as font backend])
571 else
572         FREETYPE2_CFLAGS=""
573         FREETYPE2_LIBS=""
574 fi
575
576 AM_CONDITIONAL([BUILD_ENABLE_FREETYPE2], [test x$freetype2_enabled = xyes])
577
578 pango_enabled=no
579 if test ! x$enable_pango = xno ; then
580         if test x$have_pango = xyes ; then
581                 pango_enabled=yes
582         elif test x$enable_pango = xyes ; then
583                 AC_ERROR([pango not found for pango font backend])
584         fi
585 fi
586
587 if test x$pango_enabled = xyes ; then
588         AC_DEFINE([BUILD_ENABLE_PANGO], [1],
589                   [Use pango as font backend])
590 else
591         PANGO_CFLAGS=""
592         PANGO_LIBS=""
593 fi
594
595 AM_CONDITIONAL([BUILD_ENABLE_PANGO], [test x$pango_enabled = xyes])
596
597 #
598 # BBlit Rendering backend
599 #
600
601 bblit_enabled=no
602 if test ! x$enable_bblit = xno ; then
603         bblit_enabled=yes
604 fi
605
606 if test x$bblit_enabled = xyes ; then
607         AC_DEFINE([BUILD_ENABLE_BBLIT], [1],
608                   [Use bblit rendering backend])
609 fi
610
611 AM_CONDITIONAL([BUILD_ENABLE_BBLIT], [test x$bblit_enabled = xyes])
612
613 #
614 # BBulk Rendering backend
615 #
616
617 bbulk_enabled=no
618 if test ! x$enable_bbulk = xno ; then
619         bbulk_enabled=yes
620 fi
621
622 if test x$bbulk_enabled = xyes ; then
623         AC_DEFINE([BUILD_ENABLE_BBULK], [1],
624                   [Use bbulk rendering backend])
625 fi
626
627 AM_CONDITIONAL([BUILD_ENABLE_BBULK], [test x$bbulk_enabled = xyes])
628
629 #
630 # OpenGL Texture rendering backend
631 # This is not really an option but automatically enabled if OpenGLES2 support
632 # was selected.
633 #
634
635 gltex_enabled=no
636 if test x$gles2_enabled = xyes ; then
637         gltex_enabled=yes
638 fi
639
640 #
641 # Wayland
642 # This checks whether the wayland libraries are needed and available.
643 #
644
645 wayland_enabled=no
646 if test ! x$enable_wayland = xno ; then
647         if test x$have_wayland = xyes ; then
648                 wayland_enabled=yes
649         elif test x$enable_wayland = xyes ; then
650                 AC_ERROR([wayland libraries not found])
651         fi
652 fi
653
654 if test x$wayland_enabled = xyes ; then
655         AC_DEFINE([BUILD_ENABLE_WAYLAND], [1],
656                   [Enable wayland backends])
657 else
658         WAYLAND_CFLAGS=""
659         WAYLAND_LIBS=""
660 fi
661
662 #
663 # Makefile vars
664 # After everything is configured, we correctly substitute the values for the
665 # makefiles.
666 #
667
668 AC_SUBST(SYSTEMD_CFLAGS)
669 AC_SUBST(SYSTEMD_LIBS)
670 AC_SUBST(DBUS_CFLAGS)
671 AC_SUBST(DBUS_LIBS)
672 AC_SUBST(DRM_CFLAGS)
673 AC_SUBST(DRM_LIBS)
674 AC_SUBST(EGL_CFLAGS)
675 AC_SUBST(EGL_LIBS)
676 AC_SUBST(GBM_CFLAGS)
677 AC_SUBST(GBM_LIBS)
678 AC_SUBST(GLES2_CFLAGS)
679 AC_SUBST(GLES2_LIBS)
680 AC_SUBST(UDEV_CFLAGS)
681 AC_SUBST(UDEV_LIBS)
682 AC_SUBST(XKBCOMMON_CFLAGS)
683 AC_SUBST(XKBCOMMON_LIBS)
684 AC_SUBST(FREETYPE2_CFLAGS)
685 AC_SUBST(FREETYPE2_LIBS)
686 AC_SUBST(PANGO_CFLAGS)
687 AC_SUBST(PANGO_LIBS)
688 AC_SUBST(WAYLAND_CFLAGS)
689 AC_SUBST(WAYLAND_LIBS)
690
691 AC_CONFIG_FILES([Makefile libeloop.pc libtsm.pc libuterm.pc])
692 AC_OUTPUT
693
694 #
695 # Configuration output
696 # Show configuration to the user so they can check whether everything was
697 # configured as expected.
698 #
699
700 AC_MSG_NOTICE([Build configuration:
701
702   Applications and libraries:
703                kmscon: $kmscon_enabled
704                wlterm: $wlterm_enabled
705                 uterm: $uterm_enabled
706                 eloop: $eloop_enabled
707                   tsm: $tsm_enabled
708
709   Miscellaneous options:
710                 debug: $debug_enabled
711         optimizations: $optimizations_enabled
712
713   Optional dependencies:
714               systemd: $systemd_enabled
715                  udev: $udev_enabled
716                  dbus: $dbus_enabled
717             xkbcommon: $xkbcommon_enabled
718
719   libuterm video backends:
720                 fbdev: $fbdev_enabled
721              dumb drm: $dumb_enabled
722                   drm: $drm_enabled
723             OpenGLES2: $gles2_enabled
724
725   font backends:
726               unifont: $unifont_enabled
727                  8x16: $f8x16_enabled
728             freetype2: $freetype2_enabled
729                 pango: $pango_enabled
730
731   rendering backends:
732                 bblit: $bblit_enabled
733                 bbulk: $bbulk_enabled
734                 gltex: $gltex_enabled
735
736         Run "make" to start compilation process])