2 # Kmscon - build configuration script
3 # Copyright (c) 2012 David Herrmann <dh.herrmann@googlemail.com>
10 [http://bugs.freedesktop.org/enter_bug.cgi?product=kmscon],
12 [http://www.freedesktop.org/wiki/Software/kmscon])
13 AC_CONFIG_SRCDIR([src/kmscon_main.c])
14 AC_CONFIG_AUX_DIR([build-aux])
15 AC_CONFIG_MACRO_DIR([m4])
16 AC_CONFIG_HEADER(config.h)
17 AC_USE_SYSTEM_EXTENSIONS
21 AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-xz no-dist-gzip tar-pax -Wall -Werror -Wno-portability])
22 AM_SILENT_RULES([yes])
25 # Don't add a default "-g -O2" if CFLAGS wasn't specified. For debugging it is
26 # often more convenient to have "-g -O0". You can still override it by
27 # explicitly setting it on the command line.
36 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
47 # pkg-config dependencies
48 # This unconditionally checks for all dependencies even if they are disabled. We
49 # later look whether all required depedencies are met and finish the
50 # configuration. We group similar packages into one logical group here to avoid
51 # having variables for each single library.
52 # This, however, makes ./configure output very unintuitive error messages if a
53 # package is not found so we must make sure we print more verbose messages
57 PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon],
58 [have_xkbcommon=yes], [have_xkbcommon=no])
59 AC_SUBST(XKBCOMMON_CFLAGS)
60 AC_SUBST(XKBCOMMON_LIBS)
62 PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon libsystemd-login],
63 [have_systemd=yes], [have_systemd=no])
64 AC_SUBST(SYSTEMD_CFLAGS)
65 AC_SUBST(SYSTEMD_LIBS)
67 PKG_CHECK_MODULES([UDEV], [libudev >= 172],
68 [have_udev=yes], [have_udev=no])
72 PKG_CHECK_MODULES([DBUS], [dbus-1],
73 [have_dbus=yes], [have_dbus=no])
77 PKG_CHECK_MODULES([DRM], [libdrm],
78 [have_drm=yes], [have_drm=no])
82 PKG_CHECK_MODULES([GBM], [gbm],
83 [have_gbm=yes], [have_gbm=no])
87 PKG_CHECK_MODULES([EGL], [egl],
88 [have_egl=yes], [have_egl=no])
92 PKG_CHECK_MODULES([GLES2], [glesv2],
93 [have_gles2=yes], [have_gles2=no])
94 AC_SUBST(GLES2_CFLAGS)
97 PKG_CHECK_MODULES([PANGO], [pango pangoft2],
98 [have_pango=yes], [have_pango=no])
99 AC_SUBST(PANGO_CFLAGS)
102 PKG_CHECK_MODULES([PIXMAN], [pixman-1],
103 [have_pixman=yes], [have_pixman=no])
104 AC_SUBST(PIXMAN_CFLAGS)
105 AC_SUBST(PIXMAN_LIBS)
107 PKG_CHECK_MODULES([TSM], [libtsm],
108 [have_tsm=yes], [have_tsm=no])
114 # This parses all arguments that are given via "--enable-XY" or "--with-XY" and
115 # saves the results in local variables. This does not check dependencies or
116 # similar but does only parse the arguments.
120 AC_MSG_CHECKING([whether user wants all])
122 [AS_HELP_STRING([--enable-all],
123 [enable all options (used for debugging)])])
124 if test "x$enable_all" = "x" ; then
127 AC_MSG_RESULT([$enable_all])
130 AC_MSG_CHECKING([whether user wants eloop])
131 AC_ARG_ENABLE([eloop],
132 [AS_HELP_STRING([--enable-eloop],
133 [build eloop library])])
134 if test "x$enable_all" = "xyes" ; then
136 elif test "x$enable_eloop" = "x" ; then
137 enable_eloop="no (default)"
139 AC_MSG_RESULT([$enable_eloop])
142 AC_MSG_CHECKING([whether user wants uterm])
143 AC_ARG_ENABLE([uterm],
144 [AS_HELP_STRING([--enable-uterm],
145 [build uterm library])])
146 if test "x$enable_all" = "xyes" ; then
148 elif test "x$enable_uterm" = "x" ; then
149 enable_uterm="no (default)"
151 AC_MSG_RESULT([$enable_uterm])
154 AC_MSG_CHECKING([whether user wants kmscon])
155 AC_ARG_ENABLE([kmscon],
156 [AS_HELP_STRING([--disable-kmscon],
157 [do not build kmscon])])
158 if test "x$enable_all" = "xyes" ; then
160 elif test "x$enable_kmscon" = "x" ; then
161 enable_kmscon="yes (default)"
163 AC_MSG_RESULT([$enable_kmscon])
166 AC_MSG_CHECKING([whether to build with debugging on])
167 AC_ARG_ENABLE([debug],
168 [AS_HELP_STRING([--enable-debug],
169 [whether to build with debugging on])])
170 if test "x$enable_all" = "xyes" ; then
172 elif test "x$enable_debug" = "x" ; then
173 enable_debug="yes (default)"
175 AC_MSG_RESULT([$enable_debug])
178 AC_MSG_CHECKING([whether to disable code optimizations])
179 AC_ARG_ENABLE([optimizations],
180 [AS_HELP_STRING([--disable-optimizations],
181 [whether to disable code optimizations])])
182 if test "x$enable_all" = "xyes" ; then
183 enable_optimizations="yes"
184 elif test "x$enable_optimizations" = "x" ; then
185 enable_optimizations="yes (default)"
187 AC_MSG_RESULT([$enable_optimizations])
190 AC_MSG_CHECKING([whether user wants systemd for multi-seat support])
191 AC_ARG_ENABLE([multi-seat],
192 [AS_HELP_STRING([--enable-multi-seat],
193 [enable multi-seat support with systemd])])
194 if test "x$enable_all" = "xyes" ; then
195 enable_multi_seat="yes"
196 elif test "x$enable_multi_seat" = "x" ; then
197 enable_multi_seat="yes (default)"
199 AC_MSG_RESULT([$enable_multi_seat])
202 AC_MSG_CHECKING([whether user wants udev for device hotplug support])
203 AC_ARG_ENABLE([hotplug],
204 [AS_HELP_STRING([--enable-hotplug],
205 [enable device hotplug support with udev])])
206 if test "x$enable_all" = "xyes" ; then
208 elif test "x$enable_hotplug" = "x" ; then
209 enable_hotplug="yes (default)"
211 AC_MSG_RESULT([$enable_hotplug])
214 AC_MSG_CHECKING([whether user wants eloop dbus support])
215 AC_ARG_ENABLE([eloop-dbus],
216 [AS_HELP_STRING([--enable-eloop-dbus],
217 [enable eloop dbus support])])
218 if test "x$enable_all" = "xyes" ; then
219 enable_eloop_dbus="yes"
220 elif test "x$enable_eloop_dbus" = "x" ; then
221 enable_eloop_dbus="no (default)"
223 AC_MSG_RESULT([$enable_eloop_dbus])
226 AC_MSG_CHECKING([which video backends the user wants])
228 [AS_HELP_STRING([--with-video],
229 [specify list of optional video backends])],
231 [with_video="default"])
232 enable_video_fbdev="no"
233 enable_video_drm2d="no"
234 enable_video_drm3d="no"
235 if test "x$enable_all" = "xyes" ; then
236 enable_video_fbdev="yes"
237 enable_video_drm2d="yes"
238 enable_video_drm3d="yes"
239 with_video="fbdev,drm2d,drm3d (all)"
240 elif test "x$with_video" = "xdefault" ; then
241 enable_video_fbdev="yes (default)"
242 enable_video_drm2d="yes (default)"
243 enable_video_drm3d="yes (default)"
244 with_video="fbdev,drm2d,drm3d (default)"
245 elif test ! "x$with_video" = "x" ; then
248 for i in $with_video ; do
249 if test "x$i" = "xfbdev" ; then
250 enable_video_fbdev="yes"
251 elif test "x$i" = "xdrm2d" ; then
252 enable_video_drm2d="yes"
253 elif test "x$i" = "xdrm3d" ; then
254 enable_video_drm3d="yes"
257 AC_ERROR([Invalid video backend $i])
262 AC_MSG_RESULT([$with_video])
265 AC_MSG_CHECKING([which render backends the user wants])
266 AC_ARG_WITH([renderers],
267 [AS_HELP_STRING([--with-renderers],
268 [specify list of optional render backends])],
270 [with_renderers="default"])
271 enable_renderer_bbulk="no"
272 enable_renderer_gltex="no"
273 enable_renderer_pixman="no"
274 if test "x$enable_all" = "xyes" ; then
275 enable_renderer_bbulk="yes"
276 enable_renderer_gltex="yes"
277 enable_renderer_pixman="yes"
278 with_renderers="bbulk,gltex,pixman (all)"
279 elif test "x$with_renderers" = "xdefault" ; then
280 enable_renderer_bbulk="yes (default)"
281 enable_renderer_gltex="yes (default)"
282 enable_renderer_pixman="no (default)"
283 with_renderers="bbulk,gltex (default)"
284 elif test ! "x$with_renderers" = "x" ; then
287 for i in $with_renderers ; do
288 if test "x$i" = "xbbulk" ; then
289 enable_renderer_bbulk="yes"
290 elif test "x$i" = "xgltex" ; then
291 enable_renderer_gltex="yes"
292 elif test "x$i" = "xpixman" ; then
293 enable_renderer_pixman="yes"
296 AC_ERROR([Unknown renderer $i])
301 AC_MSG_RESULT([$with_renderers])
304 AC_MSG_CHECKING([which font backends the user wants])
306 [AS_HELP_STRING([--with-fonts],
307 [specify list of optional font backends])],
309 [with_fonts="default"])
310 enable_font_unifont="no"
311 enable_font_pango="no"
312 if test "x$enable_all" = "xyes" ; then
313 enable_font_unifont="yes"
314 enable_font_pango="yes"
315 with_fonts="unifont,pango (all)"
316 elif test "x$with_fonts" = "xdefault" ; then
317 enable_font_unifont="yes (default)"
318 enable_font_pango="yes (default)"
319 with_fonts="unifont,pango (default)"
320 elif test ! "x$with_fonts" = "x" ; then
323 for i in $with_fonts ; do
324 if test "x$i" = "xunifont" ; then
325 enable_font_unifont="yes"
326 elif test "x$i" = "xpango" ; then
327 enable_font_pango="yes"
330 AC_ERROR([Unknown font backend $i])
335 AC_MSG_RESULT([$with_fonts])
338 AC_MSG_CHECKING([which sessions the user wants])
339 AC_ARG_WITH([sessions],
340 [AS_HELP_STRING([--with-sessions],
341 [specify list of optional sessions])],
343 [with_sessions="default"])
344 enable_session_dummy="no"
345 enable_session_terminal="no"
346 if test "x$enable_all" = "xyes" ; then
347 enable_session_dummy="yes"
348 enable_session_terminal="yes"
349 with_sessions="dummy,terminal (all)"
350 elif test "x$with_sessions" = "xdefault" ; then
351 enable_session_dummy="yes (default)"
352 enable_session_terminal="yes (default)"
353 with_sessions="dummy,terminal (default)"
354 elif test ! "x$with_sessions" = "x" ; then
357 for i in $with_sessions ; do
358 if test "x$i" = "xdummy" ; then
359 enable_session_dummy="yes"
360 elif test "x$i" = "xterminal" ; then
361 enable_session_terminal="yes"
364 AC_ERROR([Unknown session type $i])
369 AC_MSG_RESULT([$with_sessions])
372 # Check what can be built
373 # This checks each configuration option and tests whether all dependencies are
374 # met. This is done from bottom up to ensure the right order.
380 if test ! "x$enable_debug" = "xno" ; then
383 debug_missing="enable-debug"
387 optimizations_avail=no
388 optimizations_missing=""
389 if test ! "x$enable_optimizations" = "xno" ; then
390 optimizations_avail=yes
392 optimizations_missing="enable-optimizations"
397 eloop_dbus_missing=""
398 if test ! "x$enable_eloop_dbus" = "xno" ; then
400 if test "x$have_dbus" = "xno" ; then
402 eloop_dbus_missing="libdbus"
405 if test "x$eloop_dbus_avail" = "xno" ; then
406 if test "x$enable_eloop_dbus" = "xyes" ; then
407 AC_ERROR([missing for eloop-dbus: $eloop_dbus_missing])
411 eloop_dbus_missing="enable-eloop-dbus"
417 if test ! "x$enable_eloop" = "xno" ; then
420 eloop_missing="enable-eloop"
425 video_fbdev_missing=""
426 if test ! "x$enable_video_fbdev" = "xno" ; then
427 # TODO: check for kernel headers
428 video_fbdev_avail=yes
430 video_fbdev_missing="enable-video-fbdev"
435 video_drm2d_missing=""
436 if test ! "x$enable_video_drm2d" = "xno" ; then
437 video_drm2d_avail=yes
438 if test "x$have_drm3d" = "xno" ; then
440 video_drm2d_missing="libdrm3d"
443 if test "x$video_drm2d_avail" = "xno" ; then
444 if test "x$enable_video_drm2d" = "xyes" ; then
445 AC_ERROR([missing for drm2d video backend: $video_drm2d_missing])
449 video_drm2d_missing="enable-video-drm2d"
454 video_drm3d_missing=""
455 if test ! "x$enable_video_drm3d" = "xno" ; then
456 video_drm3d_avail=yes
457 if test "x$have_drm3d" = "xno" ; then
459 video_drm3d_missing="libdrm3d,$video_drm3d_missing"
461 if test "x$have_gbm" = "xno" ; then
463 video_drm3d_missing="libgbm,$video_drm3d_missing"
465 if test "x$have_egl" = "xno" ; then
467 video_drm3d_missing="libegl,$video_drm3d_missing"
469 if test "x$have_gles2" = "xno" ; then
471 video_drm3d_missing="libgles2,$video_drm3d_missing"
474 if test "x$video_drm3d_avail" = "xno" ; then
475 if test "x$enable_video_drm3d" = "xyes" ; then
476 AC_ERROR([missing for drm3d video backend: $video_drm3d_missing])
480 video_drm3d_missing="enable-video-drm3d"
486 if test ! "x$enable_uterm" = "xno" ; then
489 uterm_missing="enable-uterm"
494 multi_seat_missing=""
495 if test ! "x$enable_multi_seat" = "xno" ; then
497 if test "x$have_systemd" = "xno" ; then
499 multi_seat_missing="libsystemd"
502 if test "x$multi_seat_avail" = "xno" ; then
503 if test "x$enable_multi_seat" = "xyes" ; then
504 AC_ERROR([missing for multi-seat support: $multi_seat_missing])
508 multi_seat_missing="enable-multi-seat"
514 if test ! "x$enable_hotplug" = "xno" ; then
516 if test "x$have_udev" = "xno" ; then
518 hotplug_missing="libudev"
521 if test "x$hotplug_avail" = "xno" ; then
522 if test "x$enable_hotplug" = "xyes" ; then
523 AC_ERROR([missing for hotplug-support: $hotplug_missing])
527 hotplug_missing="enable-hotplug"
531 renderer_bbulk_avail=no
532 renderer_bbulk_missing=""
533 if test ! "x$enable_renderer_bbulk" = "xno" ; then
534 renderer_bbulk_avail=yes
536 renderer_bbulk_missing="enable-renderer-bbulk"
540 renderer_gltex_avail=no
541 renderer_gltex_missing=""
542 if test ! "x$enable_renderer_gltex" = "xno" ; then
543 renderer_gltex_avail=yes
544 if test "x$have_gles2" = "xno" ; then
545 renderer_gltex_avail=no
546 renderer_gltex_missing="libgles2"
549 if test "x$renderer_gltex_avail" = "xno" ; then
550 if test "x$enable_renderer_gltex" = "xyes" ; then
551 AC_ERROR([missing for renderer-gltex: $renderer_gltex_missing])
555 renderer_gltex_missing="enable-renderer-gltex"
559 renderer_pixman_avail=no
560 renderer_pixman_missing=""
561 if test ! "x$enable_renderer_pixman" = "xno" ; then
562 renderer_pixman_avail=yes
563 if test "x$have_pixman" = "xno" ; then
564 renderer_pixman_avail=no
565 renderer_pixman_missing="pixman"
568 if test "x$renderer_pixman_avail" = "xno" ; then
569 if test "x$enable_renderer_pixman" = "xyes" ; then
570 AC_ERROR([missing for renderer-pixman: $renderer_pixman_missing])
574 renderer_pixman_missing="enable-renderer-pixman"
578 font_unifont_avail=no
579 font_unifont_missing=""
580 if test ! "x$enable_font_unifont" = "xno" ; then
581 font_unifont_avail=yes
583 font_unifont_missing="enable-font-unifont"
588 font_pango_missing=""
589 if test ! "x$enable_font_pango" = "xno" ; then
591 if test "x$have_pango" = "xno" ; then
593 font_pango_missing="libpango"
596 if test "x$font_pango_avail" = "xno" ; then
597 if test "x$enable_font_pango" = "xyes" ; then
598 AC_ERROR([missing for font-pango: $font_pango_missing])
602 font_pango_missing="enable-font-pango"
606 session_dummy_avail=no
607 session_dummy_missing=""
608 if test ! "x$enable_session_dummy" = "xno" ; then
609 session_dummy_avail=yes
611 session_dummy_missing="enable-session-dummy"
615 session_terminal_avail=no
616 session_terminal_missing=""
617 if test ! "x$enable_session_terminal" = "xno" ; then
618 session_terminal_avail=yes
619 if test "x$have_tsm" = "xno" ; then
620 session_terminal_avail=no
621 session_terminal_missing="libtsm"
624 if test "x$session_terminal_avail" = "xno" ; then
625 if test "x$enable_session_terminal" = "xyes" ; then
626 AC_ERROR([missing for session-terminal: $session_terminal_missing])
630 session_terminal_missing="enable-session-terminal"
636 if test ! "x$enable_kmscon" = "xno" ; then
638 if test "x$eloop_avail" = "xno" ; then
640 kmscon_missing="$eloop_missing,$kmscon_missing"
643 if test "x$have_tsm" = "xno" ; then
645 kmscon_missing="libtsm,$kmscon_missing"
648 if test "x$uterm_avail" = "xno" ; then
650 kmscon_missing="$uterm_missing,$kmscon_missing"
653 if test "x$kmscon_avail" = "xno" ; then
654 if test "x$enable_kmscon" = "xyes" ; then
655 AC_ERROR([missing for kmscon: $kmscon_missing])
659 kmscon_missing="enable-kmscon"
663 # Enable all required modules
664 # We now know which modules can be built by checking the *_avail variables set
665 # above. We now only have to disable all modules that are disabled by default
666 # and the user didn't force-enable them and no other module that is enabled
667 # needs them. This is done top-down of course.
672 if test "x$kmscon_avail" = "xyes" ; then
673 if test "x${enable_kmscon% *}" = "xyes" ; then
681 session_terminal_enabled=no
682 if test "x$session_terminal_avail" = "xyes" ; then
683 if test "x${enable_session_terminal% *}" = "xyes" ; then
684 session_terminal_enabled=yes
689 session_dummy_enabled=no
690 if test "x$session_dummy_avail" = "xyes" ; then
691 if test "x${enable_session_dummy% *}" = "xyes" ; then
692 session_dummy_enabled=yes
697 font_pango_enabled=no
698 if test "x$font_pango_avail" = "xyes" ; then
699 if test "x${enable_font_pango% *}" = "xyes" ; then
700 font_pango_enabled=yes
705 font_unifont_enabled=no
706 if test "x$font_unifont_avail" = "xyes" ; then
707 if test "x${enable_font_unifont% *}" = "xyes" ; then
708 font_unifont_enabled=yes
713 renderer_gltex_enabled=no
714 if test "x$renderer_gltex_avail" = "xyes" ; then
715 if test "x${enable_renderer_gltex% *}" = "xyes" ; then
716 renderer_gltex_enabled=yes
721 renderer_pixman_enabled=no
722 if test "x$renderer_pixman_avail" = "xyes" ; then
723 if test "x${enable_renderer_pixman% *}" = "xyes" ; then
724 renderer_pixman_enabled=yes
729 renderer_bbulk_enabled=no
730 if test "x$renderer_bbulk_avail" = "xyes" ; then
731 if test "x${enable_renderer_bbulk% *}" = "xyes" ; then
732 renderer_bbulk_enabled=yes
738 if test "x$hotplug_avail" = "xyes" ; then
739 if test "x${enable_hotplug% *}" = "xyes" ; then
745 multi_seat_enabled=no
746 if test "x$multi_seat_avail" = "xyes" ; then
747 if test "x${enable_multi_seat% *}" = "xyes" ; then
748 multi_seat_enabled=yes
754 if test "x$uterm_avail" = "xyes" ; then
755 if test "x${enable_uterm% *}" = "xyes" ; then
761 video_drm3d_enabled=no
762 if test "x$video_drm3d_avail" = "xyes" ; then
763 if test "x${enable_video_drm3d% *}" = "xyes" ; then
764 video_drm3d_enabled=yes
769 video_drm2d_enabled=no
770 if test "x$video_drm2d_avail" = "xyes" ; then
771 if test "x${enable_video_drm2d% *}" = "xyes" ; then
772 video_drm2d_enabled=yes
777 video_fbdev_enabled=no
778 if test "x$video_fbdev_avail" = "xyes" ; then
779 if test "x${enable_video_fbdev% *}" = "xyes" ; then
780 video_fbdev_enabled=yes
786 if test "x$eloop_avail" = "xyes" ; then
787 if test "x${enable_eloop% *}" = "xyes" ; then
793 eloop_dbus_enabled=no
794 if test "x$eloop_dbus_avail" = "xyes" ; then
795 if test "x${enable_eloop_dbus% *}" = "xyes" ; then
796 eloop_dbus_enabled=yes
801 optimizations_enabled=no
802 if test "x$optimizations_avail" = "xyes" ; then
803 if test "x${enable_optimizations% *}" = "xyes" ; then
804 optimizations_enabled=yes
810 if test "x$debug_avail" = "xyes" ; then
811 if test "x${enable_debug% *}" = "xyes" ; then
817 # Module Configuration
818 # We have now done all dependency checking and default-value validation and we
819 # now know which modules are enabled via the *_enabled variables.
820 # Everything below is related to the configuration of each module and setting
821 # the correct flags for the build process.
825 if test "x$debug_enabled" = "xyes" ; then
826 AC_DEFINE([BUILD_ENABLE_DEBUG], [1], [Enable debug mode])
828 AC_DEFINE([NDEBUG], [1], [No Debug])
831 AM_CONDITIONAL([BUILD_ENABLE_DEBUG],
832 [test "x$debug_enabled" = "xyes"])
835 AM_CONDITIONAL([BUILD_ENABLE_OPTIMIZATIONS],
836 [test "x$optimizations_enabled" = "xyes"])
839 AM_CONDITIONAL([BUILD_ENABLE_ELOOP_DBUS],
840 [test "x$eloop_dbus_enabled" = "xyes"])
843 AM_CONDITIONAL([BUILD_ENABLE_ELOOP],
844 [test "x$eloop_enabled" = "xyes"])
847 if test "x$video_fbdev_enabled" = "xyes" ; then
848 AC_DEFINE([BUILD_ENABLE_VIDEO_FBDEV], [1],
849 [Build uterm fbdev video backend])
852 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_FBDEV],
853 [test "x$video_fbdev_enabled" = "xyes"])
856 if test "x$video_drm2d_enabled" = "xyes" ; then
857 AC_DEFINE([BUILD_ENABLE_VIDEO_DRM2D], [1],
858 [Build uterm drm2d drm3d video backend])
861 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM2D],
862 [test "x$video_drm2d_enabled" = "xyes"])
865 if test "x$video_drm3d_enabled" = "xyes" ; then
866 AC_DEFINE([BUILD_ENABLE_VIDEO_DRM3D], [1],
867 [Build uterm drm3d video backend])
870 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM3D],
871 [test "x$video_drm3d_enabled" = "xyes"])
874 AM_CONDITIONAL([BUILD_ENABLE_UTERM],
875 [test "x$uterm_enabled" = "xyes"])
878 if test "x$multi_seat_enabled" = "xyes" ; then
879 AC_DEFINE([BUILD_ENABLE_MULTI_SEAT], [1],
880 [Use systemd for multi-seat support])
883 AM_CONDITIONAL([BUILD_ENABLE_MULTI_SEAT],
884 [test "x$multi_seat_enabled" = "xyes"])
887 if test "x$hotplug_enabled" = "xyes" ; then
888 AC_DEFINE([BUILD_ENABLE_HOTPLUG], [1],
889 [Use udev for hotplug support])
892 AM_CONDITIONAL([BUILD_ENABLE_HOTPLUG],
893 [test "x$hotplug_enabled" = "xyes"])
896 if test "x$renderer_bbulk_enabled" = "xyes" ; then
897 AC_DEFINE([BUILD_ENABLE_RENDERER_BBULK], [1],
898 [Build bbulk rendering backend])
901 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_BBULK],
902 [test "x$renderer_bbulk_enabled" = "xyes"])
905 if test "x$renderer_gltex_enabled" = "xyes" ; then
906 AC_DEFINE([BUILD_ENABLE_RENDERER_GLTEX], [1],
907 [Build gltex rendering backend])
910 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_GLTEX],
911 [test "x$renderer_gltex_enabled" = "xyes"])
914 if test "x$renderer_pixman_enabled" = "xyes" ; then
915 AC_DEFINE([BUILD_ENABLE_RENDERER_PIXMAN], [1],
916 [Build pixman rendering backend])
919 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_PIXMAN],
920 [test "x$renderer_pixman_enabled" = "xyes"])
923 if test "x$font_unifont_enabled" = "xyes" ; then
924 AC_DEFINE([BUILD_ENABLE_FONT_UNIFONT], [1],
925 [Build static unifont backend])
928 AM_CONDITIONAL([BUILD_ENABLE_FONT_UNIFONT],
929 [test "x$font_unifont_enabled" = "xyes"])
932 if test "x$font_pango_enabled" = "xyes" ; then
933 AC_DEFINE([BUILD_ENABLE_FONT_PANGO], [1],
934 [Build pango font backend])
937 AM_CONDITIONAL([BUILD_ENABLE_FONT_PANGO],
938 [test "x$font_pango_enabled" = "xyes"])
941 if test "x$session_dummy_enabled" = "xyes" ; then
942 AC_DEFINE([BUILD_ENABLE_SESSION_DUMMY], [1],
943 [Build dummy session])
946 AM_CONDITIONAL([BUILD_ENABLE_SESSION_DUMMY],
947 [test "x$session_dummy_enabled" = "xyes"])
950 if test "x$session_terminal_enabled" = "xyes" ; then
951 AC_DEFINE([BUILD_ENABLE_SESSION_TERMINAL], [1],
952 [Build terminal session])
955 AM_CONDITIONAL([BUILD_ENABLE_SESSION_TERMINAL],
956 [test "x$session_terminal_enabled" = "xyes"])
959 AM_CONDITIONAL([BUILD_ENABLE_KMSCON],
960 [test "x$kmscon_enabled" = "xyes"])
963 # Miscellaneous Checks
964 # All checks below are independent of module checking or depend on the results
965 # of it. They do not have any dependencies themselves so they are not part of the
966 # module infrastructure.
969 # check for _Static_assert
970 AC_MSG_CHECKING([whether _Static_assert() is supported])
972 have_static_assert=yes
973 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[_Static_assert(1, "What?");]])],
974 [AC_DEFINE([BUILD_HAVE_STATIC_ASSERT],
976 [Define to 1 if _Static_assert() is supported])],
977 [have_static_assert=no])
978 AC_MSG_RESULT([$have_static_assert])
980 # check for gbm_bo_get_pitch() function, otherwise gbm_bo_get_stride() is used
981 if test x$have_gbm = xyes ; then
982 save_CFLAGS="$CFLAGS"
984 save_LDFLAGS="$LDFLAGS"
985 CFLAGS="$DRM_CFLAGS $GBM_CFLAGS"
986 LIBS="$DRM_LIBS $GBM_LIBS"
990 [AC_DEFINE([BUILD_HAVE_GBM_BO_GET_PITCH],
992 [Define to 1 if your libgbm provides gbm_bo_get_pitch])])
993 CFLAGS="$save_CFLAGS"
995 LDFLAGS="$save_LDFLAGS"
999 AC_PATH_PROG(XSLTPROC, xsltproc)
1000 AM_CONDITIONAL([BUILD_HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
1002 # check for offline man-pages stylesheet
1003 AC_MSG_CHECKING([for docbook manpages stylesheet])
1004 BUILD_MANPAGES_STYLESHEET="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
1005 AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
1006 AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$BUILD_MANPAGES_STYLESHEET" > /dev/null 2>&1`],
1007 [BUILD_HAVE_MANPAGES_STYLESHEET=yes]))
1008 if test "x$BUILD_HAVE_MANPAGES_STYLESHEET" = "xyes"; then
1009 AM_CONDITIONAL([BUILD_HAVE_MANPAGES_STYLESHEET], true)
1010 AC_SUBST(BUILD_MANPAGES_STYLESHEET)
1011 AC_MSG_RESULT([yes])
1013 AM_CONDITIONAL([BUILD_HAVE_MANPAGES_STYLESHEET], false)
1019 # After everything is configured, we correctly substitute the values for the
1023 AC_CONFIG_FILES([Makefile
1025 docs/pc/libuterm.pc])
1029 # Configuration output
1030 # Show configuration to the user so they can check whether everything was
1031 # configured as expected.
1034 AC_MSG_NOTICE([Build configuration:
1037 exec-prefix: $exec_prefix
1039 includedir: $includedir
1041 Applications and Libraries:
1042 kmscon: $kmscon_enabled ($kmscon_avail: $kmscon_missing)
1043 uterm: $uterm_enabled ($uterm_avail: $uterm_missing)
1044 eloop: $eloop_enabled ($eloop_avail: $eloop_missing)
1046 Miscellaneous Options:
1047 debug: $debug_enabled ($debug_avail: $debug_missing)
1048 optimizations: $optimizations_enabled ($optimizations_avail: $optimizations_missing)
1049 multi-seat: $multi_seat_enabled ($multi_seat_avail: $multi_seat_missing)
1050 hotplug: $hotplug_enabled ($hotplug_avail: $hotplug_missing)
1051 eloop-dbus: $eloop_dbus_enabled ($eloop_dbus_avail: $eloop_dbus_missing)
1054 fbdev: $video_fbdev_enabled ($video_fbdev_avail: $video_fbdev_missing)
1055 drm2d: $video_drm2d_enabled ($video_drm2d_avail: $video_drm2d_missing)
1056 drm3d: $video_drm3d_enabled ($video_drm3d_avail: $video_drm3d_missing)
1059 unifont: $font_unifont_enabled ($font_unifont_avail: $font_unifont_missing)
1060 pango: $font_pango_enabled ($font_pango_avail: $font_pango_missing)
1063 bbulk: $renderer_bbulk_enabled ($renderer_bbulk_avail: $renderer_bbulk_missing)
1064 gltex: $renderer_gltex_enabled ($renderer_gltex_avail: $renderer_gltex_missing)
1065 pixman: $renderer_pixman_enabled ($renderer_pixman_avail: $renderer_pixman_missing)
1068 dummy: $session_dummy_enabled ($session_dummy_avail: $session_dummy_missing)
1069 terminal: $session_terminal_enabled ($session_terminal_avail: $session_terminal_missing)
1071 Run "${MAKE-make}" to start compilation process])