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 kmscon])
131 AC_ARG_ENABLE([kmscon],
132 [AS_HELP_STRING([--disable-kmscon],
133 [do not build kmscon])])
134 if test "x$enable_all" = "xyes" ; then
136 elif test "x$enable_kmscon" = "x" ; then
137 enable_kmscon="yes (default)"
139 AC_MSG_RESULT([$enable_kmscon])
142 AC_MSG_CHECKING([whether to build with debugging on])
143 AC_ARG_ENABLE([debug],
144 [AS_HELP_STRING([--enable-debug],
145 [whether to build with debugging on])])
146 if test "x$enable_all" = "xyes" ; then
148 elif test "x$enable_debug" = "x" ; then
149 enable_debug="yes (default)"
151 AC_MSG_RESULT([$enable_debug])
154 AC_MSG_CHECKING([whether to disable code optimizations])
155 AC_ARG_ENABLE([optimizations],
156 [AS_HELP_STRING([--disable-optimizations],
157 [whether to disable code optimizations])])
158 if test "x$enable_all" = "xyes" ; then
159 enable_optimizations="yes"
160 elif test "x$enable_optimizations" = "x" ; then
161 enable_optimizations="yes (default)"
163 AC_MSG_RESULT([$enable_optimizations])
166 AC_MSG_CHECKING([whether user wants systemd for multi-seat support])
167 AC_ARG_ENABLE([multi-seat],
168 [AS_HELP_STRING([--enable-multi-seat],
169 [enable multi-seat support with systemd])])
170 if test "x$enable_all" = "xyes" ; then
171 enable_multi_seat="yes"
172 elif test "x$enable_multi_seat" = "x" ; then
173 enable_multi_seat="yes (default)"
175 AC_MSG_RESULT([$enable_multi_seat])
178 AC_MSG_CHECKING([whether user wants udev for device hotplug support])
179 AC_ARG_ENABLE([hotplug],
180 [AS_HELP_STRING([--enable-hotplug],
181 [enable device hotplug support with udev])])
182 if test "x$enable_all" = "xyes" ; then
184 elif test "x$enable_hotplug" = "x" ; then
185 enable_hotplug="yes (default)"
187 AC_MSG_RESULT([$enable_hotplug])
190 AC_MSG_CHECKING([which video backends the user wants])
192 [AS_HELP_STRING([--with-video],
193 [specify list of optional video backends])],
195 [with_video="default"])
196 enable_video_fbdev="no"
197 enable_video_drm2d="no"
198 enable_video_drm3d="no"
199 if test "x$enable_all" = "xyes" ; then
200 enable_video_fbdev="yes"
201 enable_video_drm2d="yes"
202 enable_video_drm3d="yes"
203 with_video="fbdev,drm2d,drm3d (all)"
204 elif test "x$with_video" = "xdefault" ; then
205 enable_video_fbdev="yes (default)"
206 enable_video_drm2d="yes (default)"
207 enable_video_drm3d="yes (default)"
208 with_video="fbdev,drm2d,drm3d (default)"
209 elif test ! "x$with_video" = "x" ; then
212 for i in $with_video ; do
213 if test "x$i" = "xfbdev" ; then
214 enable_video_fbdev="yes"
215 elif test "x$i" = "xdrm2d" ; then
216 enable_video_drm2d="yes"
217 elif test "x$i" = "xdrm3d" ; then
218 enable_video_drm3d="yes"
221 AC_ERROR([Invalid video backend $i])
226 AC_MSG_RESULT([$with_video])
229 AC_MSG_CHECKING([which render backends the user wants])
230 AC_ARG_WITH([renderers],
231 [AS_HELP_STRING([--with-renderers],
232 [specify list of optional render backends])],
234 [with_renderers="default"])
235 enable_renderer_bbulk="no"
236 enable_renderer_gltex="no"
237 enable_renderer_pixman="no"
238 if test "x$enable_all" = "xyes" ; then
239 enable_renderer_bbulk="yes"
240 enable_renderer_gltex="yes"
241 enable_renderer_pixman="yes"
242 with_renderers="bbulk,gltex,pixman (all)"
243 elif test "x$with_renderers" = "xdefault" ; then
244 enable_renderer_bbulk="yes (default)"
245 enable_renderer_gltex="yes (default)"
246 enable_renderer_pixman="no (default)"
247 with_renderers="bbulk,gltex (default)"
248 elif test ! "x$with_renderers" = "x" ; then
251 for i in $with_renderers ; do
252 if test "x$i" = "xbbulk" ; then
253 enable_renderer_bbulk="yes"
254 elif test "x$i" = "xgltex" ; then
255 enable_renderer_gltex="yes"
256 elif test "x$i" = "xpixman" ; then
257 enable_renderer_pixman="yes"
260 AC_ERROR([Unknown renderer $i])
265 AC_MSG_RESULT([$with_renderers])
268 AC_MSG_CHECKING([which font backends the user wants])
270 [AS_HELP_STRING([--with-fonts],
271 [specify list of optional font backends])],
273 [with_fonts="default"])
274 enable_font_unifont="no"
275 enable_font_pango="no"
276 if test "x$enable_all" = "xyes" ; then
277 enable_font_unifont="yes"
278 enable_font_pango="yes"
279 with_fonts="unifont,pango (all)"
280 elif test "x$with_fonts" = "xdefault" ; then
281 enable_font_unifont="yes (default)"
282 enable_font_pango="yes (default)"
283 with_fonts="unifont,pango (default)"
284 elif test ! "x$with_fonts" = "x" ; then
287 for i in $with_fonts ; do
288 if test "x$i" = "xunifont" ; then
289 enable_font_unifont="yes"
290 elif test "x$i" = "xpango" ; then
291 enable_font_pango="yes"
294 AC_ERROR([Unknown font backend $i])
299 AC_MSG_RESULT([$with_fonts])
302 AC_MSG_CHECKING([which sessions the user wants])
303 AC_ARG_WITH([sessions],
304 [AS_HELP_STRING([--with-sessions],
305 [specify list of optional sessions])],
307 [with_sessions="default"])
308 enable_session_dummy="no"
309 enable_session_terminal="no"
310 if test "x$enable_all" = "xyes" ; then
311 enable_session_dummy="yes"
312 enable_session_terminal="yes"
313 with_sessions="dummy,terminal (all)"
314 elif test "x$with_sessions" = "xdefault" ; then
315 enable_session_dummy="yes (default)"
316 enable_session_terminal="yes (default)"
317 with_sessions="dummy,terminal (default)"
318 elif test ! "x$with_sessions" = "x" ; then
321 for i in $with_sessions ; do
322 if test "x$i" = "xdummy" ; then
323 enable_session_dummy="yes"
324 elif test "x$i" = "xterminal" ; then
325 enable_session_terminal="yes"
328 AC_ERROR([Unknown session type $i])
333 AC_MSG_RESULT([$with_sessions])
336 # Check what can be built
337 # This checks each configuration option and tests whether all dependencies are
338 # met. This is done from bottom up to ensure the right order.
344 if test ! "x$enable_debug" = "xno" ; then
347 debug_missing="enable-debug"
351 optimizations_avail=no
352 optimizations_missing=""
353 if test ! "x$enable_optimizations" = "xno" ; then
354 optimizations_avail=yes
356 optimizations_missing="enable-optimizations"
361 video_fbdev_missing=""
362 if test ! "x$enable_video_fbdev" = "xno" ; then
363 # TODO: check for kernel headers
364 video_fbdev_avail=yes
366 video_fbdev_missing="enable-video-fbdev"
371 video_drm2d_missing=""
372 if test ! "x$enable_video_drm2d" = "xno" ; then
373 video_drm2d_avail=yes
374 if test "x$have_drm3d" = "xno" ; then
376 video_drm2d_missing="libdrm3d"
379 if test "x$video_drm2d_avail" = "xno" ; then
380 if test "x$enable_video_drm2d" = "xyes" ; then
381 AC_ERROR([missing for drm2d video backend: $video_drm2d_missing])
385 video_drm2d_missing="enable-video-drm2d"
390 video_drm3d_missing=""
391 if test ! "x$enable_video_drm3d" = "xno" ; then
392 video_drm3d_avail=yes
393 if test "x$have_drm3d" = "xno" ; then
395 video_drm3d_missing="libdrm3d,$video_drm3d_missing"
397 if test "x$have_gbm" = "xno" ; then
399 video_drm3d_missing="libgbm,$video_drm3d_missing"
401 if test "x$have_egl" = "xno" ; then
403 video_drm3d_missing="libegl,$video_drm3d_missing"
405 if test "x$have_gles2" = "xno" ; then
407 video_drm3d_missing="libgles2,$video_drm3d_missing"
410 if test "x$video_drm3d_avail" = "xno" ; then
411 if test "x$enable_video_drm3d" = "xyes" ; then
412 AC_ERROR([missing for drm3d video backend: $video_drm3d_missing])
416 video_drm3d_missing="enable-video-drm3d"
421 multi_seat_missing=""
422 if test ! "x$enable_multi_seat" = "xno" ; then
424 if test "x$have_systemd" = "xno" ; then
426 multi_seat_missing="libsystemd"
429 if test "x$multi_seat_avail" = "xno" ; then
430 if test "x$enable_multi_seat" = "xyes" ; then
431 AC_ERROR([missing for multi-seat support: $multi_seat_missing])
435 multi_seat_missing="enable-multi-seat"
441 if test ! "x$enable_hotplug" = "xno" ; then
443 if test "x$have_udev" = "xno" ; then
445 hotplug_missing="libudev"
448 if test "x$hotplug_avail" = "xno" ; then
449 if test "x$enable_hotplug" = "xyes" ; then
450 AC_ERROR([missing for hotplug-support: $hotplug_missing])
454 hotplug_missing="enable-hotplug"
458 renderer_bbulk_avail=no
459 renderer_bbulk_missing=""
460 if test ! "x$enable_renderer_bbulk" = "xno" ; then
461 renderer_bbulk_avail=yes
463 renderer_bbulk_missing="enable-renderer-bbulk"
467 renderer_gltex_avail=no
468 renderer_gltex_missing=""
469 if test ! "x$enable_renderer_gltex" = "xno" ; then
470 renderer_gltex_avail=yes
471 if test "x$have_gles2" = "xno" ; then
472 renderer_gltex_avail=no
473 renderer_gltex_missing="libgles2"
476 if test "x$renderer_gltex_avail" = "xno" ; then
477 if test "x$enable_renderer_gltex" = "xyes" ; then
478 AC_ERROR([missing for renderer-gltex: $renderer_gltex_missing])
482 renderer_gltex_missing="enable-renderer-gltex"
486 renderer_pixman_avail=no
487 renderer_pixman_missing=""
488 if test ! "x$enable_renderer_pixman" = "xno" ; then
489 renderer_pixman_avail=yes
490 if test "x$have_pixman" = "xno" ; then
491 renderer_pixman_avail=no
492 renderer_pixman_missing="pixman"
495 if test "x$renderer_pixman_avail" = "xno" ; then
496 if test "x$enable_renderer_pixman" = "xyes" ; then
497 AC_ERROR([missing for renderer-pixman: $renderer_pixman_missing])
501 renderer_pixman_missing="enable-renderer-pixman"
505 font_unifont_avail=no
506 font_unifont_missing=""
507 if test ! "x$enable_font_unifont" = "xno" ; then
508 font_unifont_avail=yes
510 font_unifont_missing="enable-font-unifont"
515 font_pango_missing=""
516 if test ! "x$enable_font_pango" = "xno" ; then
518 if test "x$have_pango" = "xno" ; then
520 font_pango_missing="libpango"
523 if test "x$font_pango_avail" = "xno" ; then
524 if test "x$enable_font_pango" = "xyes" ; then
525 AC_ERROR([missing for font-pango: $font_pango_missing])
529 font_pango_missing="enable-font-pango"
533 session_dummy_avail=no
534 session_dummy_missing=""
535 if test ! "x$enable_session_dummy" = "xno" ; then
536 session_dummy_avail=yes
538 session_dummy_missing="enable-session-dummy"
542 session_terminal_avail=no
543 session_terminal_missing=""
544 if test ! "x$enable_session_terminal" = "xno" ; then
545 session_terminal_avail=yes
546 if test "x$have_tsm" = "xno" ; then
547 session_terminal_avail=no
548 session_terminal_missing="libtsm"
551 if test "x$session_terminal_avail" = "xno" ; then
552 if test "x$enable_session_terminal" = "xyes" ; then
553 AC_ERROR([missing for session-terminal: $session_terminal_missing])
557 session_terminal_missing="enable-session-terminal"
563 if test ! "x$enable_kmscon" = "xno" ; then
565 if test "x$have_tsm" = "xno" ; then
567 kmscon_missing="libtsm,$kmscon_missing"
570 if test "x$kmscon_avail" = "xno" ; then
571 if test "x$enable_kmscon" = "xyes" ; then
572 AC_ERROR([missing for kmscon: $kmscon_missing])
576 kmscon_missing="enable-kmscon"
580 # Enable all required modules
581 # We now know which modules can be built by checking the *_avail variables set
582 # above. We now only have to disable all modules that are disabled by default
583 # and the user didn't force-enable them and no other module that is enabled
584 # needs them. This is done top-down of course.
589 if test "x$kmscon_avail" = "xyes" ; then
590 if test "x${enable_kmscon% *}" = "xyes" ; then
596 session_terminal_enabled=no
597 if test "x$session_terminal_avail" = "xyes" ; then
598 if test "x${enable_session_terminal% *}" = "xyes" ; then
599 session_terminal_enabled=yes
604 session_dummy_enabled=no
605 if test "x$session_dummy_avail" = "xyes" ; then
606 if test "x${enable_session_dummy% *}" = "xyes" ; then
607 session_dummy_enabled=yes
612 font_pango_enabled=no
613 if test "x$font_pango_avail" = "xyes" ; then
614 if test "x${enable_font_pango% *}" = "xyes" ; then
615 font_pango_enabled=yes
620 font_unifont_enabled=no
621 if test "x$font_unifont_avail" = "xyes" ; then
622 if test "x${enable_font_unifont% *}" = "xyes" ; then
623 font_unifont_enabled=yes
628 renderer_gltex_enabled=no
629 if test "x$renderer_gltex_avail" = "xyes" ; then
630 if test "x${enable_renderer_gltex% *}" = "xyes" ; then
631 renderer_gltex_enabled=yes
636 renderer_pixman_enabled=no
637 if test "x$renderer_pixman_avail" = "xyes" ; then
638 if test "x${enable_renderer_pixman% *}" = "xyes" ; then
639 renderer_pixman_enabled=yes
644 renderer_bbulk_enabled=no
645 if test "x$renderer_bbulk_avail" = "xyes" ; then
646 if test "x${enable_renderer_bbulk% *}" = "xyes" ; then
647 renderer_bbulk_enabled=yes
653 if test "x$hotplug_avail" = "xyes" ; then
654 if test "x${enable_hotplug% *}" = "xyes" ; then
660 multi_seat_enabled=no
661 if test "x$multi_seat_avail" = "xyes" ; then
662 if test "x${enable_multi_seat% *}" = "xyes" ; then
663 multi_seat_enabled=yes
668 video_drm3d_enabled=no
669 if test "x$video_drm3d_avail" = "xyes" ; then
670 if test "x${enable_video_drm3d% *}" = "xyes" ; then
671 video_drm3d_enabled=yes
676 video_drm2d_enabled=no
677 if test "x$video_drm2d_avail" = "xyes" ; then
678 if test "x${enable_video_drm2d% *}" = "xyes" ; then
679 video_drm2d_enabled=yes
684 video_fbdev_enabled=no
685 if test "x$video_fbdev_avail" = "xyes" ; then
686 if test "x${enable_video_fbdev% *}" = "xyes" ; then
687 video_fbdev_enabled=yes
692 optimizations_enabled=no
693 if test "x$optimizations_avail" = "xyes" ; then
694 if test "x${enable_optimizations% *}" = "xyes" ; then
695 optimizations_enabled=yes
701 if test "x$debug_avail" = "xyes" ; then
702 if test "x${enable_debug% *}" = "xyes" ; then
708 # Module Configuration
709 # We have now done all dependency checking and default-value validation and we
710 # now know which modules are enabled via the *_enabled variables.
711 # Everything below is related to the configuration of each module and setting
712 # the correct flags for the build process.
716 if test "x$debug_enabled" = "xyes" ; then
717 AC_DEFINE([BUILD_ENABLE_DEBUG], [1], [Enable debug mode])
719 AC_DEFINE([NDEBUG], [1], [No Debug])
722 AM_CONDITIONAL([BUILD_ENABLE_DEBUG],
723 [test "x$debug_enabled" = "xyes"])
726 AM_CONDITIONAL([BUILD_ENABLE_OPTIMIZATIONS],
727 [test "x$optimizations_enabled" = "xyes"])
730 if test "x$video_fbdev_enabled" = "xyes" ; then
731 AC_DEFINE([BUILD_ENABLE_VIDEO_FBDEV], [1],
732 [Build uterm fbdev video backend])
735 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_FBDEV],
736 [test "x$video_fbdev_enabled" = "xyes"])
739 if test "x$video_drm2d_enabled" = "xyes" ; then
740 AC_DEFINE([BUILD_ENABLE_VIDEO_DRM2D], [1],
741 [Build uterm drm2d drm3d video backend])
744 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM2D],
745 [test "x$video_drm2d_enabled" = "xyes"])
748 if test "x$video_drm3d_enabled" = "xyes" ; then
749 AC_DEFINE([BUILD_ENABLE_VIDEO_DRM3D], [1],
750 [Build uterm drm3d video backend])
753 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM3D],
754 [test "x$video_drm3d_enabled" = "xyes"])
757 if test "x$multi_seat_enabled" = "xyes" ; then
758 AC_DEFINE([BUILD_ENABLE_MULTI_SEAT], [1],
759 [Use systemd for multi-seat support])
762 AM_CONDITIONAL([BUILD_ENABLE_MULTI_SEAT],
763 [test "x$multi_seat_enabled" = "xyes"])
766 if test "x$hotplug_enabled" = "xyes" ; then
767 AC_DEFINE([BUILD_ENABLE_HOTPLUG], [1],
768 [Use udev for hotplug support])
771 AM_CONDITIONAL([BUILD_ENABLE_HOTPLUG],
772 [test "x$hotplug_enabled" = "xyes"])
775 if test "x$renderer_bbulk_enabled" = "xyes" ; then
776 AC_DEFINE([BUILD_ENABLE_RENDERER_BBULK], [1],
777 [Build bbulk rendering backend])
780 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_BBULK],
781 [test "x$renderer_bbulk_enabled" = "xyes"])
784 if test "x$renderer_gltex_enabled" = "xyes" ; then
785 AC_DEFINE([BUILD_ENABLE_RENDERER_GLTEX], [1],
786 [Build gltex rendering backend])
789 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_GLTEX],
790 [test "x$renderer_gltex_enabled" = "xyes"])
793 if test "x$renderer_pixman_enabled" = "xyes" ; then
794 AC_DEFINE([BUILD_ENABLE_RENDERER_PIXMAN], [1],
795 [Build pixman rendering backend])
798 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_PIXMAN],
799 [test "x$renderer_pixman_enabled" = "xyes"])
802 if test "x$font_unifont_enabled" = "xyes" ; then
803 AC_DEFINE([BUILD_ENABLE_FONT_UNIFONT], [1],
804 [Build static unifont backend])
807 AM_CONDITIONAL([BUILD_ENABLE_FONT_UNIFONT],
808 [test "x$font_unifont_enabled" = "xyes"])
811 if test "x$font_pango_enabled" = "xyes" ; then
812 AC_DEFINE([BUILD_ENABLE_FONT_PANGO], [1],
813 [Build pango font backend])
816 AM_CONDITIONAL([BUILD_ENABLE_FONT_PANGO],
817 [test "x$font_pango_enabled" = "xyes"])
820 if test "x$session_dummy_enabled" = "xyes" ; then
821 AC_DEFINE([BUILD_ENABLE_SESSION_DUMMY], [1],
822 [Build dummy session])
825 AM_CONDITIONAL([BUILD_ENABLE_SESSION_DUMMY],
826 [test "x$session_dummy_enabled" = "xyes"])
829 if test "x$session_terminal_enabled" = "xyes" ; then
830 AC_DEFINE([BUILD_ENABLE_SESSION_TERMINAL], [1],
831 [Build terminal session])
834 AM_CONDITIONAL([BUILD_ENABLE_SESSION_TERMINAL],
835 [test "x$session_terminal_enabled" = "xyes"])
838 AM_CONDITIONAL([BUILD_ENABLE_KMSCON],
839 [test "x$kmscon_enabled" = "xyes"])
842 # Miscellaneous Checks
843 # All checks below are independent of module checking or depend on the results
844 # of it. They do not have any dependencies themselves so they are not part of the
845 # module infrastructure.
848 # check for _Static_assert
849 AC_MSG_CHECKING([whether _Static_assert() is supported])
851 have_static_assert=yes
852 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[_Static_assert(1, "What?");]])],
853 [AC_DEFINE([BUILD_HAVE_STATIC_ASSERT],
855 [Define to 1 if _Static_assert() is supported])],
856 [have_static_assert=no])
857 AC_MSG_RESULT([$have_static_assert])
859 # check for gbm_bo_get_pitch() function, otherwise gbm_bo_get_stride() is used
860 if test x$have_gbm = xyes ; then
861 save_CFLAGS="$CFLAGS"
863 save_LDFLAGS="$LDFLAGS"
864 CFLAGS="$DRM_CFLAGS $GBM_CFLAGS"
865 LIBS="$DRM_LIBS $GBM_LIBS"
869 [AC_DEFINE([BUILD_HAVE_GBM_BO_GET_PITCH],
871 [Define to 1 if your libgbm provides gbm_bo_get_pitch])])
872 CFLAGS="$save_CFLAGS"
874 LDFLAGS="$save_LDFLAGS"
878 AC_PATH_PROG(XSLTPROC, xsltproc)
879 AM_CONDITIONAL([BUILD_HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
881 # check for offline man-pages stylesheet
882 AC_MSG_CHECKING([for docbook manpages stylesheet])
883 BUILD_MANPAGES_STYLESHEET="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
884 AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
885 AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$BUILD_MANPAGES_STYLESHEET" > /dev/null 2>&1`],
886 [BUILD_HAVE_MANPAGES_STYLESHEET=yes]))
887 if test "x$BUILD_HAVE_MANPAGES_STYLESHEET" = "xyes"; then
888 AM_CONDITIONAL([BUILD_HAVE_MANPAGES_STYLESHEET], true)
889 AC_SUBST(BUILD_MANPAGES_STYLESHEET)
892 AM_CONDITIONAL([BUILD_HAVE_MANPAGES_STYLESHEET], false)
898 # After everything is configured, we correctly substitute the values for the
902 AC_CONFIG_FILES([Makefile])
906 # Configuration output
907 # Show configuration to the user so they can check whether everything was
908 # configured as expected.
911 AC_MSG_NOTICE([Build configuration:
914 exec-prefix: $exec_prefix
916 includedir: $includedir
918 Applications and Libraries:
919 kmscon: $kmscon_enabled ($kmscon_avail: $kmscon_missing)
921 Miscellaneous Options:
922 debug: $debug_enabled ($debug_avail: $debug_missing)
923 optimizations: $optimizations_enabled ($optimizations_avail: $optimizations_missing)
924 multi-seat: $multi_seat_enabled ($multi_seat_avail: $multi_seat_missing)
925 hotplug: $hotplug_enabled ($hotplug_avail: $hotplug_missing)
928 fbdev: $video_fbdev_enabled ($video_fbdev_avail: $video_fbdev_missing)
929 drm2d: $video_drm2d_enabled ($video_drm2d_avail: $video_drm2d_missing)
930 drm3d: $video_drm3d_enabled ($video_drm3d_avail: $video_drm3d_missing)
933 unifont: $font_unifont_enabled ($font_unifont_avail: $font_unifont_missing)
934 pango: $font_pango_enabled ($font_pango_avail: $font_pango_missing)
937 bbulk: $renderer_bbulk_enabled ($renderer_bbulk_avail: $renderer_bbulk_missing)
938 gltex: $renderer_gltex_enabled ($renderer_gltex_avail: $renderer_gltex_missing)
939 pixman: $renderer_pixman_enabled ($renderer_pixman_avail: $renderer_pixman_missing)
942 dummy: $session_dummy_enabled ($session_dummy_avail: $session_dummy_missing)
943 terminal: $session_terminal_enabled ($session_terminal_avail: $session_terminal_missing)
945 Run "${MAKE-make}" to start compilation process])