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
19 AC_PREFIX_DEFAULT([/usr])
22 AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-xz no-dist-gzip tar-pax -Wall -Werror -Wno-portability])
23 AM_SILENT_RULES([yes])
26 # Don't add a default "-g -O2" if CFLAGS wasn't specified. For debugging it is
27 # often more convenient to have "-g -O0". You can still override it by
28 # explicitly setting it on the command line.
37 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
48 # pkg-config dependencies
49 # This unconditionally checks for all dependencies even if they are disabled. We
50 # later look whether all required depedencies are met and finish the
51 # configuration. We group similar packages into one logical group here to avoid
52 # having variables for each single library.
53 # This, however, makes ./configure output very unintuitive error messages if a
54 # package is not found so we must make sure we print more verbose messages
58 PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon],
59 [have_xkbcommon=yes], [have_xkbcommon=no])
60 AC_SUBST(XKBCOMMON_CFLAGS)
61 AC_SUBST(XKBCOMMON_LIBS)
63 PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon libsystemd-login],
64 [have_systemd=yes], [have_systemd=no])
65 AC_SUBST(SYSTEMD_CFLAGS)
66 AC_SUBST(SYSTEMD_LIBS)
68 PKG_CHECK_MODULES([UDEV], [libudev >= 172],
69 [have_udev=yes], [have_udev=no])
73 PKG_CHECK_MODULES([DBUS], [dbus-1],
74 [have_dbus=yes], [have_dbus=no])
78 PKG_CHECK_MODULES([DRM], [libdrm],
79 [have_drm=yes], [have_drm=no])
83 PKG_CHECK_MODULES([GBM], [gbm],
84 [have_gbm=yes], [have_gbm=no])
88 PKG_CHECK_MODULES([EGL], [egl],
89 [have_egl=yes], [have_egl=no])
93 PKG_CHECK_MODULES([GLES2], [glesv2],
94 [have_gles2=yes], [have_gles2=no])
95 AC_SUBST(GLES2_CFLAGS)
98 PKG_CHECK_MODULES([PANGO], [pango pangoft2],
99 [have_pango=yes], [have_pango=no])
100 AC_SUBST(PANGO_CFLAGS)
103 PKG_CHECK_MODULES([PIXMAN], [pixman-1],
104 [have_pixman=yes], [have_pixman=no])
105 AC_SUBST(PIXMAN_CFLAGS)
106 AC_SUBST(PIXMAN_LIBS)
108 PKG_CHECK_MODULES([TSM], [libtsm],
109 [have_tsm=yes], [have_tsm=no])
115 # This parses all arguments that are given via "--enable-XY" or "--with-XY" and
116 # saves the results in local variables. This does not check dependencies or
117 # similar but does only parse the arguments.
121 AC_MSG_CHECKING([whether user wants all])
123 [AS_HELP_STRING([--enable-all],
124 [enable all options (used for debugging)])])
125 if test "x$enable_all" = "x" ; then
128 AC_MSG_RESULT([$enable_all])
131 AC_MSG_CHECKING([whether user wants eloop])
132 AC_ARG_ENABLE([eloop],
133 [AS_HELP_STRING([--enable-eloop],
134 [build eloop library])])
135 if test "x$enable_all" = "xyes" ; then
137 elif test "x$enable_eloop" = "x" ; then
138 enable_eloop="no (default)"
140 AC_MSG_RESULT([$enable_eloop])
143 AC_MSG_CHECKING([whether user wants uterm])
144 AC_ARG_ENABLE([uterm],
145 [AS_HELP_STRING([--enable-uterm],
146 [build uterm library])])
147 if test "x$enable_all" = "xyes" ; then
149 elif test "x$enable_uterm" = "x" ; then
150 enable_uterm="no (default)"
152 AC_MSG_RESULT([$enable_uterm])
155 AC_MSG_CHECKING([whether user wants kmscon])
156 AC_ARG_ENABLE([kmscon],
157 [AS_HELP_STRING([--disable-kmscon],
158 [do not build kmscon])])
159 if test "x$enable_all" = "xyes" ; then
161 elif test "x$enable_kmscon" = "x" ; then
162 enable_kmscon="yes (default)"
164 AC_MSG_RESULT([$enable_kmscon])
167 AC_MSG_CHECKING([whether to build with debugging on])
168 AC_ARG_ENABLE([debug],
169 [AS_HELP_STRING([--enable-debug],
170 [whether to build with debugging on])])
171 if test "x$enable_all" = "xyes" ; then
173 elif test "x$enable_debug" = "x" ; then
174 enable_debug="yes (default)"
176 AC_MSG_RESULT([$enable_debug])
179 AC_MSG_CHECKING([whether to disable code optimizations])
180 AC_ARG_ENABLE([optimizations],
181 [AS_HELP_STRING([--disable-optimizations],
182 [whether to disable code optimizations])])
183 if test "x$enable_all" = "xyes" ; then
184 enable_optimizations="yes"
185 elif test "x$enable_optimizations" = "x" ; then
186 enable_optimizations="yes (default)"
188 AC_MSG_RESULT([$enable_optimizations])
191 AC_MSG_CHECKING([whether user wants systemd for multi-seat support])
192 AC_ARG_ENABLE([multi-seat],
193 [AS_HELP_STRING([--enable-multi-seat],
194 [enable multi-seat support with systemd])])
195 if test "x$enable_all" = "xyes" ; then
196 enable_multi_seat="yes"
197 elif test "x$enable_multi_seat" = "x" ; then
198 enable_multi_seat="yes (default)"
200 AC_MSG_RESULT([$enable_multi_seat])
203 AC_MSG_CHECKING([whether user wants udev for device hotplug support])
204 AC_ARG_ENABLE([hotplug],
205 [AS_HELP_STRING([--enable-hotplug],
206 [enable device hotplug support with udev])])
207 if test "x$enable_all" = "xyes" ; then
209 elif test "x$enable_hotplug" = "x" ; then
210 enable_hotplug="yes (default)"
212 AC_MSG_RESULT([$enable_hotplug])
215 AC_MSG_CHECKING([whether user wants eloop dbus support])
216 AC_ARG_ENABLE([eloop-dbus],
217 [AS_HELP_STRING([--enable-eloop-dbus],
218 [enable eloop dbus support])])
219 if test "x$enable_all" = "xyes" ; then
220 enable_eloop_dbus="yes"
221 elif test "x$enable_eloop_dbus" = "x" ; then
222 enable_eloop_dbus="no (default)"
224 AC_MSG_RESULT([$enable_eloop_dbus])
227 AC_MSG_CHECKING([which video backends the user wants])
229 [AS_HELP_STRING([--with-video],
230 [specify list of optional video backends])],
232 [with_video="default"])
233 enable_video_fbdev="no"
234 enable_video_drm2d="no"
235 enable_video_drm3d="no"
236 if test "x$enable_all" = "xyes" ; then
237 enable_video_fbdev="yes"
238 enable_video_drm2d="yes"
239 enable_video_drm3d="yes"
240 with_video="fbdev,drm2d,drm3d (all)"
241 elif test "x$with_video" = "xdefault" ; then
242 enable_video_fbdev="yes (default)"
243 enable_video_drm2d="yes (default)"
244 enable_video_drm3d="yes (default)"
245 with_video="fbdev,drm2d,drm3d (default)"
246 elif test ! "x$with_video" = "x" ; then
249 for i in $with_video ; do
250 if test "x$i" = "xfbdev" ; then
251 enable_video_fbdev="yes"
252 elif test "x$i" = "xdrm2d" ; then
253 enable_video_drm2d="yes"
254 elif test "x$i" = "xdrm3d" ; then
255 enable_video_drm3d="yes"
258 AC_ERROR([Invalid video backend $i])
263 AC_MSG_RESULT([$with_video])
266 AC_MSG_CHECKING([which render backends the user wants])
267 AC_ARG_WITH([renderers],
268 [AS_HELP_STRING([--with-renderers],
269 [specify list of optional render backends])],
271 [with_renderers="default"])
272 enable_renderer_bbulk="no"
273 enable_renderer_gltex="no"
274 enable_renderer_pixman="no"
275 if test "x$enable_all" = "xyes" ; then
276 enable_renderer_bbulk="yes"
277 enable_renderer_gltex="yes"
278 enable_renderer_pixman="yes"
279 with_renderers="bbulk,gltex,pixman (all)"
280 elif test "x$with_renderers" = "xdefault" ; then
281 enable_renderer_bbulk="yes (default)"
282 enable_renderer_gltex="yes (default)"
283 enable_renderer_pixman="no (default)"
284 with_renderers="bbulk,gltex (default)"
285 elif test ! "x$with_renderers" = "x" ; then
288 for i in $with_renderers ; do
289 if test "x$i" = "xbbulk" ; then
290 enable_renderer_bbulk="yes"
291 elif test "x$i" = "xgltex" ; then
292 enable_renderer_gltex="yes"
293 elif test "x$i" = "xpixman" ; then
294 enable_renderer_pixman="yes"
297 AC_ERROR([Unknown renderer $i])
302 AC_MSG_RESULT([$with_renderers])
305 AC_MSG_CHECKING([which font backends the user wants])
307 [AS_HELP_STRING([--with-fonts],
308 [specify list of optional font backends])],
310 [with_fonts="default"])
311 enable_font_unifont="no"
312 enable_font_pango="no"
313 if test "x$enable_all" = "xyes" ; then
314 enable_font_unifont="yes"
315 enable_font_pango="yes"
316 with_fonts="unifont,pango (all)"
317 elif test "x$with_fonts" = "xdefault" ; then
318 enable_font_unifont="yes (default)"
319 enable_font_pango="yes (default)"
320 with_fonts="unifont,pango (default)"
321 elif test ! "x$with_fonts" = "x" ; then
324 for i in $with_fonts ; do
325 if test "x$i" = "xunifont" ; then
326 enable_font_unifont="yes"
327 elif test "x$i" = "xpango" ; then
328 enable_font_pango="yes"
331 AC_ERROR([Unknown font backend $i])
336 AC_MSG_RESULT([$with_fonts])
339 AC_MSG_CHECKING([which sessions the user wants])
340 AC_ARG_WITH([sessions],
341 [AS_HELP_STRING([--with-sessions],
342 [specify list of optional sessions])],
344 [with_sessions="default"])
345 enable_session_dummy="no"
346 enable_session_terminal="no"
347 if test "x$enable_all" = "xyes" ; then
348 enable_session_dummy="yes"
349 enable_session_terminal="yes"
350 with_sessions="dummy,terminal (all)"
351 elif test "x$with_sessions" = "xdefault" ; then
352 enable_session_dummy="yes (default)"
353 enable_session_terminal="yes (default)"
354 with_sessions="dummy,terminal (default)"
355 elif test ! "x$with_sessions" = "x" ; then
358 for i in $with_sessions ; do
359 if test "x$i" = "xdummy" ; then
360 enable_session_dummy="yes"
361 elif test "x$i" = "xterminal" ; then
362 enable_session_terminal="yes"
365 AC_ERROR([Unknown session type $i])
370 AC_MSG_RESULT([$with_sessions])
373 # Check what can be built
374 # This checks each configuration option and tests whether all dependencies are
375 # met. This is done from bottom up to ensure the right order.
381 if test ! "x$enable_debug" = "xno" ; then
384 debug_missing="enable-debug"
388 optimizations_avail=no
389 optimizations_missing=""
390 if test ! "x$enable_optimizations" = "xno" ; then
391 optimizations_avail=yes
393 optimizations_missing="enable-optimizations"
398 eloop_dbus_missing=""
399 if test ! "x$enable_eloop_dbus" = "xno" ; then
401 if test "x$have_dbus" = "xno" ; then
403 eloop_dbus_missing="libdbus"
406 if test "x$eloop_dbus_avail" = "xno" ; then
407 if test "x$enable_eloop_dbus" = "xyes" ; then
408 AC_ERROR([missing for eloop-dbus: $eloop_dbus_missing])
412 eloop_dbus_missing="enable-eloop-dbus"
418 if test ! "x$enable_eloop" = "xno" ; then
421 eloop_missing="enable-eloop"
426 video_fbdev_missing=""
427 if test ! "x$enable_video_fbdev" = "xno" ; then
428 # TODO: check for kernel headers
429 video_fbdev_avail=yes
431 video_fbdev_missing="enable-video-fbdev"
436 video_drm2d_missing=""
437 if test ! "x$enable_video_drm2d" = "xno" ; then
438 video_drm2d_avail=yes
439 if test "x$have_drm3d" = "xno" ; then
441 video_drm2d_missing="libdrm3d"
444 if test "x$video_drm2d_avail" = "xno" ; then
445 if test "x$enable_video_drm2d" = "xyes" ; then
446 AC_ERROR([missing for drm2d video backend: $video_drm2d_missing])
450 video_drm2d_missing="enable-video-drm2d"
455 video_drm3d_missing=""
456 if test ! "x$enable_video_drm3d" = "xno" ; then
457 video_drm3d_avail=yes
458 if test "x$have_drm3d" = "xno" ; then
460 video_drm3d_missing="libdrm3d,$video_drm3d_missing"
462 if test "x$have_gbm" = "xno" ; then
464 video_drm3d_missing="libgbm,$video_drm3d_missing"
466 if test "x$have_egl" = "xno" ; then
468 video_drm3d_missing="libegl,$video_drm3d_missing"
470 if test "x$have_gles2" = "xno" ; then
472 video_drm3d_missing="libgles2,$video_drm3d_missing"
475 if test "x$video_drm3d_avail" = "xno" ; then
476 if test "x$enable_video_drm3d" = "xyes" ; then
477 AC_ERROR([missing for drm3d video backend: $video_drm3d_missing])
481 video_drm3d_missing="enable-video-drm3d"
487 if test ! "x$enable_uterm" = "xno" ; then
490 uterm_missing="enable-uterm"
495 multi_seat_missing=""
496 if test ! "x$enable_multi_seat" = "xno" ; then
498 if test "x$have_systemd" = "xno" ; then
500 multi_seat_missing="libsystemd"
503 if test "x$multi_seat_avail" = "xno" ; then
504 if test "x$enable_multi_seat" = "xyes" ; then
505 AC_ERROR([missing for multi-seat support: $multi_seat_missing])
509 multi_seat_missing="enable-multi-seat"
515 if test ! "x$enable_hotplug" = "xno" ; then
517 if test "x$have_udev" = "xno" ; then
519 hotplug_missing="libudev"
522 if test "x$hotplug_avail" = "xno" ; then
523 if test "x$enable_hotplug" = "xyes" ; then
524 AC_ERROR([missing for hotplug-support: $hotplug_missing])
528 hotplug_missing="enable-hotplug"
532 renderer_bbulk_avail=no
533 renderer_bbulk_missing=""
534 if test ! "x$enable_renderer_bbulk" = "xno" ; then
535 renderer_bbulk_avail=yes
537 renderer_bbulk_missing="enable-renderer-bbulk"
541 renderer_gltex_avail=no
542 renderer_gltex_missing=""
543 if test ! "x$enable_renderer_gltex" = "xno" ; then
544 renderer_gltex_avail=yes
545 if test "x$have_gles2" = "xno" ; then
546 renderer_gltex_avail=no
547 renderer_gltex_missing="libgles2"
550 if test "x$renderer_gltex_avail" = "xno" ; then
551 if test "x$enable_renderer_gltex" = "xyes" ; then
552 AC_ERROR([missing for renderer-gltex: $renderer_gltex_missing])
556 renderer_gltex_missing="enable-renderer-gltex"
560 renderer_pixman_avail=no
561 renderer_pixman_missing=""
562 if test ! "x$enable_renderer_pixman" = "xno" ; then
563 renderer_pixman_avail=yes
564 if test "x$have_pixman" = "xno" ; then
565 renderer_pixman_avail=no
566 renderer_pixman_missing="pixman"
569 if test "x$renderer_pixman_avail" = "xno" ; then
570 if test "x$enable_renderer_pixman" = "xyes" ; then
571 AC_ERROR([missing for renderer-pixman: $renderer_pixman_missing])
575 renderer_pixman_missing="enable-renderer-pixman"
579 font_unifont_avail=no
580 font_unifont_missing=""
581 if test ! "x$enable_font_unifont" = "xno" ; then
582 font_unifont_avail=yes
584 font_unifont_missing="enable-font-unifont"
589 font_pango_missing=""
590 if test ! "x$enable_font_pango" = "xno" ; then
592 if test "x$have_pango" = "xno" ; then
594 font_pango_missing="libpango"
597 if test "x$font_pango_avail" = "xno" ; then
598 if test "x$enable_font_pango" = "xyes" ; then
599 AC_ERROR([missing for font-pango: $font_pango_missing])
603 font_pango_missing="enable-font-pango"
607 session_dummy_avail=no
608 session_dummy_missing=""
609 if test ! "x$enable_session_dummy" = "xno" ; then
610 session_dummy_avail=yes
612 session_dummy_missing="enable-session-dummy"
616 session_terminal_avail=no
617 session_terminal_missing=""
618 if test ! "x$enable_session_terminal" = "xno" ; then
619 session_terminal_avail=yes
620 if test "x$have_tsm" = "xno" ; then
621 session_terminal_avail=no
622 session_terminal_missing="libtsm"
625 if test "x$session_terminal_avail" = "xno" ; then
626 if test "x$enable_session_terminal" = "xyes" ; then
627 AC_ERROR([missing for session-terminal: $session_terminal_missing])
631 session_terminal_missing="enable-session-terminal"
637 if test ! "x$enable_kmscon" = "xno" ; then
639 if test "x$eloop_avail" = "xno" ; then
641 kmscon_missing="$eloop_missing,$kmscon_missing"
644 if test "x$have_tsm" = "xno" ; then
646 kmscon_missing="libtsm,$kmscon_missing"
649 if test "x$uterm_avail" = "xno" ; then
651 kmscon_missing="$uterm_missing,$kmscon_missing"
654 if test "x$kmscon_avail" = "xno" ; then
655 if test "x$enable_kmscon" = "xyes" ; then
656 AC_ERROR([missing for kmscon: $kmscon_missing])
660 kmscon_missing="enable-kmscon"
664 # Enable all required modules
665 # We now know which modules can be built by checking the *_avail variables set
666 # above. We now only have to disable all modules that are disabled by default
667 # and the user didn't force-enable them and no other module that is enabled
668 # needs them. This is done top-down of course.
673 if test "x$kmscon_avail" = "xyes" ; then
674 if test "x${enable_kmscon% *}" = "xyes" ; then
682 session_terminal_enabled=no
683 if test "x$session_terminal_avail" = "xyes" ; then
684 if test "x${enable_session_terminal% *}" = "xyes" ; then
685 session_terminal_enabled=yes
690 session_dummy_enabled=no
691 if test "x$session_dummy_avail" = "xyes" ; then
692 if test "x${enable_session_dummy% *}" = "xyes" ; then
693 session_dummy_enabled=yes
698 font_pango_enabled=no
699 if test "x$font_pango_avail" = "xyes" ; then
700 if test "x${enable_font_pango% *}" = "xyes" ; then
701 font_pango_enabled=yes
706 font_unifont_enabled=no
707 if test "x$font_unifont_avail" = "xyes" ; then
708 if test "x${enable_font_unifont% *}" = "xyes" ; then
709 font_unifont_enabled=yes
714 renderer_gltex_enabled=no
715 if test "x$renderer_gltex_avail" = "xyes" ; then
716 if test "x${enable_renderer_gltex% *}" = "xyes" ; then
717 renderer_gltex_enabled=yes
722 renderer_pixman_enabled=no
723 if test "x$renderer_pixman_avail" = "xyes" ; then
724 if test "x${enable_renderer_pixman% *}" = "xyes" ; then
725 renderer_pixman_enabled=yes
730 renderer_bbulk_enabled=no
731 if test "x$renderer_bbulk_avail" = "xyes" ; then
732 if test "x${enable_renderer_bbulk% *}" = "xyes" ; then
733 renderer_bbulk_enabled=yes
739 if test "x$hotplug_avail" = "xyes" ; then
740 if test "x${enable_hotplug% *}" = "xyes" ; then
746 multi_seat_enabled=no
747 if test "x$multi_seat_avail" = "xyes" ; then
748 if test "x${enable_multi_seat% *}" = "xyes" ; then
749 multi_seat_enabled=yes
755 if test "x$uterm_avail" = "xyes" ; then
756 if test "x${enable_uterm% *}" = "xyes" ; then
762 video_drm3d_enabled=no
763 if test "x$video_drm3d_avail" = "xyes" ; then
764 if test "x${enable_video_drm3d% *}" = "xyes" ; then
765 video_drm3d_enabled=yes
770 video_drm2d_enabled=no
771 if test "x$video_drm2d_avail" = "xyes" ; then
772 if test "x${enable_video_drm2d% *}" = "xyes" ; then
773 video_drm2d_enabled=yes
778 video_fbdev_enabled=no
779 if test "x$video_fbdev_avail" = "xyes" ; then
780 if test "x${enable_video_fbdev% *}" = "xyes" ; then
781 video_fbdev_enabled=yes
787 if test "x$eloop_avail" = "xyes" ; then
788 if test "x${enable_eloop% *}" = "xyes" ; then
794 eloop_dbus_enabled=no
795 if test "x$eloop_dbus_avail" = "xyes" ; then
796 if test "x${enable_eloop_dbus% *}" = "xyes" ; then
797 eloop_dbus_enabled=yes
802 optimizations_enabled=no
803 if test "x$optimizations_avail" = "xyes" ; then
804 if test "x${enable_optimizations% *}" = "xyes" ; then
805 optimizations_enabled=yes
811 if test "x$debug_avail" = "xyes" ; then
812 if test "x${enable_debug% *}" = "xyes" ; then
818 # Module Configuration
819 # We have now done all dependency checking and default-value validation and we
820 # now know which modules are enabled via the *_enabled variables.
821 # Everything below is related to the configuration of each module and setting
822 # the correct flags for the build process.
826 if test "x$debug_enabled" = "xyes" ; then
827 AC_DEFINE([BUILD_ENABLE_DEBUG], [1], [Enable debug mode])
829 AC_DEFINE([NDEBUG], [1], [No Debug])
832 AM_CONDITIONAL([BUILD_ENABLE_DEBUG],
833 [test "x$debug_enabled" = "xyes"])
836 AM_CONDITIONAL([BUILD_ENABLE_OPTIMIZATIONS],
837 [test "x$optimizations_enabled" = "xyes"])
840 AM_CONDITIONAL([BUILD_ENABLE_ELOOP_DBUS],
841 [test "x$eloop_dbus_enabled" = "xyes"])
844 AM_CONDITIONAL([BUILD_ENABLE_ELOOP],
845 [test "x$eloop_enabled" = "xyes"])
848 if test "x$video_fbdev_enabled" = "xyes" ; then
849 AC_DEFINE([BUILD_ENABLE_VIDEO_FBDEV], [1],
850 [Build uterm fbdev video backend])
853 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_FBDEV],
854 [test "x$video_fbdev_enabled" = "xyes"])
857 if test "x$video_drm2d_enabled" = "xyes" ; then
858 AC_DEFINE([BUILD_ENABLE_VIDEO_DRM2D], [1],
859 [Build uterm drm2d drm3d video backend])
862 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM2D],
863 [test "x$video_drm2d_enabled" = "xyes"])
866 if test "x$video_drm3d_enabled" = "xyes" ; then
867 AC_DEFINE([BUILD_ENABLE_VIDEO_DRM3D], [1],
868 [Build uterm drm3d video backend])
871 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM3D],
872 [test "x$video_drm3d_enabled" = "xyes"])
875 AM_CONDITIONAL([BUILD_ENABLE_UTERM],
876 [test "x$uterm_enabled" = "xyes"])
879 if test "x$multi_seat_enabled" = "xyes" ; then
880 AC_DEFINE([BUILD_ENABLE_MULTI_SEAT], [1],
881 [Use systemd for multi-seat support])
884 AM_CONDITIONAL([BUILD_ENABLE_MULTI_SEAT],
885 [test "x$multi_seat_enabled" = "xyes"])
888 if test "x$hotplug_enabled" = "xyes" ; then
889 AC_DEFINE([BUILD_ENABLE_HOTPLUG], [1],
890 [Use udev for hotplug support])
893 AM_CONDITIONAL([BUILD_ENABLE_HOTPLUG],
894 [test "x$hotplug_enabled" = "xyes"])
897 if test "x$renderer_bbulk_enabled" = "xyes" ; then
898 AC_DEFINE([BUILD_ENABLE_RENDERER_BBULK], [1],
899 [Build bbulk rendering backend])
902 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_BBULK],
903 [test "x$renderer_bbulk_enabled" = "xyes"])
906 if test "x$renderer_gltex_enabled" = "xyes" ; then
907 AC_DEFINE([BUILD_ENABLE_RENDERER_GLTEX], [1],
908 [Build gltex rendering backend])
911 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_GLTEX],
912 [test "x$renderer_gltex_enabled" = "xyes"])
915 if test "x$renderer_pixman_enabled" = "xyes" ; then
916 AC_DEFINE([BUILD_ENABLE_RENDERER_PIXMAN], [1],
917 [Build pixman rendering backend])
920 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_PIXMAN],
921 [test "x$renderer_pixman_enabled" = "xyes"])
924 if test "x$font_unifont_enabled" = "xyes" ; then
925 AC_DEFINE([BUILD_ENABLE_FONT_UNIFONT], [1],
926 [Build static unifont backend])
929 AM_CONDITIONAL([BUILD_ENABLE_FONT_UNIFONT],
930 [test "x$font_unifont_enabled" = "xyes"])
933 if test "x$font_pango_enabled" = "xyes" ; then
934 AC_DEFINE([BUILD_ENABLE_FONT_PANGO], [1],
935 [Build pango font backend])
938 AM_CONDITIONAL([BUILD_ENABLE_FONT_PANGO],
939 [test "x$font_pango_enabled" = "xyes"])
942 if test "x$session_dummy_enabled" = "xyes" ; then
943 AC_DEFINE([BUILD_ENABLE_SESSION_DUMMY], [1],
944 [Build dummy session])
947 AM_CONDITIONAL([BUILD_ENABLE_SESSION_DUMMY],
948 [test "x$session_dummy_enabled" = "xyes"])
951 if test "x$session_terminal_enabled" = "xyes" ; then
952 AC_DEFINE([BUILD_ENABLE_SESSION_TERMINAL], [1],
953 [Build terminal session])
956 AM_CONDITIONAL([BUILD_ENABLE_SESSION_TERMINAL],
957 [test "x$session_terminal_enabled" = "xyes"])
960 AM_CONDITIONAL([BUILD_ENABLE_KMSCON],
961 [test "x$kmscon_enabled" = "xyes"])
964 # Miscellaneous Checks
965 # All checks below are independent of module checking or depend on the results
966 # of it. They do not have any dependencies themselves so they are not part of the
967 # module infrastructure.
970 # check for _Static_assert
971 AC_MSG_CHECKING([whether _Static_assert() is supported])
973 have_static_assert=yes
974 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[_Static_assert(1, "What?");]])],
975 [AC_DEFINE([BUILD_HAVE_STATIC_ASSERT],
977 [Define to 1 if _Static_assert() is supported])],
978 [have_static_assert=no])
979 AC_MSG_RESULT([$have_static_assert])
981 # check for gbm_bo_get_pitch() function, otherwise gbm_bo_get_stride() is used
982 if test x$have_gbm = xyes ; then
983 save_CFLAGS="$CFLAGS"
985 save_LDFLAGS="$LDFLAGS"
986 CFLAGS="$DRM_CFLAGS $GBM_CFLAGS"
987 LIBS="$DRM_LIBS $GBM_LIBS"
991 [AC_DEFINE([BUILD_HAVE_GBM_BO_GET_PITCH],
993 [Define to 1 if your libgbm provides gbm_bo_get_pitch])])
994 CFLAGS="$save_CFLAGS"
996 LDFLAGS="$save_LDFLAGS"
1000 AC_PATH_PROG(XSLTPROC, xsltproc)
1001 AM_CONDITIONAL([BUILD_HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
1003 # check for offline man-pages stylesheet
1004 AC_MSG_CHECKING([for docbook manpages stylesheet])
1005 BUILD_MANPAGES_STYLESHEET="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
1006 AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
1007 AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$BUILD_MANPAGES_STYLESHEET" > /dev/null 2>&1`],
1008 [BUILD_HAVE_MANPAGES_STYLESHEET=yes]))
1009 if test "x$BUILD_HAVE_MANPAGES_STYLESHEET" = "xyes"; then
1010 AM_CONDITIONAL([BUILD_HAVE_MANPAGES_STYLESHEET], true)
1011 AC_SUBST(BUILD_MANPAGES_STYLESHEET)
1012 AC_MSG_RESULT([yes])
1014 AM_CONDITIONAL([BUILD_HAVE_MANPAGES_STYLESHEET], false)
1020 # After everything is configured, we correctly substitute the values for the
1024 AC_CONFIG_FILES([Makefile
1026 docs/pc/libuterm.pc])
1030 # Configuration output
1031 # Show configuration to the user so they can check whether everything was
1032 # configured as expected.
1035 AC_MSG_NOTICE([Build configuration:
1038 exec-prefix: $exec_prefix
1040 includedir: $includedir
1042 Applications and Libraries:
1043 kmscon: $kmscon_enabled ($kmscon_avail: $kmscon_missing)
1044 uterm: $uterm_enabled ($uterm_avail: $uterm_missing)
1045 eloop: $eloop_enabled ($eloop_avail: $eloop_missing)
1047 Miscellaneous Options:
1048 debug: $debug_enabled ($debug_avail: $debug_missing)
1049 optimizations: $optimizations_enabled ($optimizations_avail: $optimizations_missing)
1050 multi-seat: $multi_seat_enabled ($multi_seat_avail: $multi_seat_missing)
1051 hotplug: $hotplug_enabled ($hotplug_avail: $hotplug_missing)
1052 eloop-dbus: $eloop_dbus_enabled ($eloop_dbus_avail: $eloop_dbus_missing)
1055 fbdev: $video_fbdev_enabled ($video_fbdev_avail: $video_fbdev_missing)
1056 drm2d: $video_drm2d_enabled ($video_drm2d_avail: $video_drm2d_missing)
1057 drm3d: $video_drm3d_enabled ($video_drm3d_avail: $video_drm3d_missing)
1060 unifont: $font_unifont_enabled ($font_unifont_avail: $font_unifont_missing)
1061 pango: $font_pango_enabled ($font_pango_avail: $font_pango_missing)
1064 bbulk: $renderer_bbulk_enabled ($renderer_bbulk_avail: $renderer_bbulk_missing)
1065 gltex: $renderer_gltex_enabled ($renderer_gltex_avail: $renderer_gltex_missing)
1066 pixman: $renderer_pixman_enabled ($renderer_pixman_avail: $renderer_pixman_missing)
1069 dummy: $session_dummy_enabled ($session_dummy_avail: $session_dummy_missing)
1070 terminal: $session_terminal_enabled ($session_terminal_avail: $session_terminal_missing)
1072 Run "${MAKE-make}" to start compilation process])