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 kmscon])
143 AC_ARG_ENABLE([kmscon],
144 [AS_HELP_STRING([--disable-kmscon],
145 [do not build kmscon])])
146 if test "x$enable_all" = "xyes" ; then
148 elif test "x$enable_kmscon" = "x" ; then
149 enable_kmscon="yes (default)"
151 AC_MSG_RESULT([$enable_kmscon])
154 AC_MSG_CHECKING([whether to build with debugging on])
155 AC_ARG_ENABLE([debug],
156 [AS_HELP_STRING([--enable-debug],
157 [whether to build with debugging on])])
158 if test "x$enable_all" = "xyes" ; then
160 elif test "x$enable_debug" = "x" ; then
161 enable_debug="yes (default)"
163 AC_MSG_RESULT([$enable_debug])
166 AC_MSG_CHECKING([whether to disable code optimizations])
167 AC_ARG_ENABLE([optimizations],
168 [AS_HELP_STRING([--disable-optimizations],
169 [whether to disable code optimizations])])
170 if test "x$enable_all" = "xyes" ; then
171 enable_optimizations="yes"
172 elif test "x$enable_optimizations" = "x" ; then
173 enable_optimizations="yes (default)"
175 AC_MSG_RESULT([$enable_optimizations])
178 AC_MSG_CHECKING([whether user wants systemd for multi-seat support])
179 AC_ARG_ENABLE([multi-seat],
180 [AS_HELP_STRING([--enable-multi-seat],
181 [enable multi-seat support with systemd])])
182 if test "x$enable_all" = "xyes" ; then
183 enable_multi_seat="yes"
184 elif test "x$enable_multi_seat" = "x" ; then
185 enable_multi_seat="yes (default)"
187 AC_MSG_RESULT([$enable_multi_seat])
190 AC_MSG_CHECKING([whether user wants udev for device hotplug support])
191 AC_ARG_ENABLE([hotplug],
192 [AS_HELP_STRING([--enable-hotplug],
193 [enable device hotplug support with udev])])
194 if test "x$enable_all" = "xyes" ; then
196 elif test "x$enable_hotplug" = "x" ; then
197 enable_hotplug="yes (default)"
199 AC_MSG_RESULT([$enable_hotplug])
202 AC_MSG_CHECKING([whether user wants eloop dbus support])
203 AC_ARG_ENABLE([eloop-dbus],
204 [AS_HELP_STRING([--enable-eloop-dbus],
205 [enable eloop dbus support])])
206 if test "x$enable_all" = "xyes" ; then
207 enable_eloop_dbus="yes"
208 elif test "x$enable_eloop_dbus" = "x" ; then
209 enable_eloop_dbus="no (default)"
211 AC_MSG_RESULT([$enable_eloop_dbus])
214 AC_MSG_CHECKING([which video backends the user wants])
216 [AS_HELP_STRING([--with-video],
217 [specify list of optional video backends])],
219 [with_video="default"])
220 enable_video_fbdev="no"
221 enable_video_drm2d="no"
222 enable_video_drm3d="no"
223 if test "x$enable_all" = "xyes" ; then
224 enable_video_fbdev="yes"
225 enable_video_drm2d="yes"
226 enable_video_drm3d="yes"
227 with_video="fbdev,drm2d,drm3d (all)"
228 elif test "x$with_video" = "xdefault" ; then
229 enable_video_fbdev="yes (default)"
230 enable_video_drm2d="yes (default)"
231 enable_video_drm3d="yes (default)"
232 with_video="fbdev,drm2d,drm3d (default)"
233 elif test ! "x$with_video" = "x" ; then
236 for i in $with_video ; do
237 if test "x$i" = "xfbdev" ; then
238 enable_video_fbdev="yes"
239 elif test "x$i" = "xdrm2d" ; then
240 enable_video_drm2d="yes"
241 elif test "x$i" = "xdrm3d" ; then
242 enable_video_drm3d="yes"
245 AC_ERROR([Invalid video backend $i])
250 AC_MSG_RESULT([$with_video])
253 AC_MSG_CHECKING([which render backends the user wants])
254 AC_ARG_WITH([renderers],
255 [AS_HELP_STRING([--with-renderers],
256 [specify list of optional render backends])],
258 [with_renderers="default"])
259 enable_renderer_bbulk="no"
260 enable_renderer_gltex="no"
261 enable_renderer_pixman="no"
262 if test "x$enable_all" = "xyes" ; then
263 enable_renderer_bbulk="yes"
264 enable_renderer_gltex="yes"
265 enable_renderer_pixman="yes"
266 with_renderers="bbulk,gltex,pixman (all)"
267 elif test "x$with_renderers" = "xdefault" ; then
268 enable_renderer_bbulk="yes (default)"
269 enable_renderer_gltex="yes (default)"
270 enable_renderer_pixman="no (default)"
271 with_renderers="bbulk,gltex (default)"
272 elif test ! "x$with_renderers" = "x" ; then
275 for i in $with_renderers ; do
276 if test "x$i" = "xbbulk" ; then
277 enable_renderer_bbulk="yes"
278 elif test "x$i" = "xgltex" ; then
279 enable_renderer_gltex="yes"
280 elif test "x$i" = "xpixman" ; then
281 enable_renderer_pixman="yes"
284 AC_ERROR([Unknown renderer $i])
289 AC_MSG_RESULT([$with_renderers])
292 AC_MSG_CHECKING([which font backends the user wants])
294 [AS_HELP_STRING([--with-fonts],
295 [specify list of optional font backends])],
297 [with_fonts="default"])
298 enable_font_unifont="no"
299 enable_font_pango="no"
300 if test "x$enable_all" = "xyes" ; then
301 enable_font_unifont="yes"
302 enable_font_pango="yes"
303 with_fonts="unifont,pango (all)"
304 elif test "x$with_fonts" = "xdefault" ; then
305 enable_font_unifont="yes (default)"
306 enable_font_pango="yes (default)"
307 with_fonts="unifont,pango (default)"
308 elif test ! "x$with_fonts" = "x" ; then
311 for i in $with_fonts ; do
312 if test "x$i" = "xunifont" ; then
313 enable_font_unifont="yes"
314 elif test "x$i" = "xpango" ; then
315 enable_font_pango="yes"
318 AC_ERROR([Unknown font backend $i])
323 AC_MSG_RESULT([$with_fonts])
326 AC_MSG_CHECKING([which sessions the user wants])
327 AC_ARG_WITH([sessions],
328 [AS_HELP_STRING([--with-sessions],
329 [specify list of optional sessions])],
331 [with_sessions="default"])
332 enable_session_dummy="no"
333 enable_session_terminal="no"
334 if test "x$enable_all" = "xyes" ; then
335 enable_session_dummy="yes"
336 enable_session_terminal="yes"
337 with_sessions="dummy,terminal (all)"
338 elif test "x$with_sessions" = "xdefault" ; then
339 enable_session_dummy="yes (default)"
340 enable_session_terminal="yes (default)"
341 with_sessions="dummy,terminal (default)"
342 elif test ! "x$with_sessions" = "x" ; then
345 for i in $with_sessions ; do
346 if test "x$i" = "xdummy" ; then
347 enable_session_dummy="yes"
348 elif test "x$i" = "xterminal" ; then
349 enable_session_terminal="yes"
352 AC_ERROR([Unknown session type $i])
357 AC_MSG_RESULT([$with_sessions])
360 # Check what can be built
361 # This checks each configuration option and tests whether all dependencies are
362 # met. This is done from bottom up to ensure the right order.
368 if test ! "x$enable_debug" = "xno" ; then
371 debug_missing="enable-debug"
375 optimizations_avail=no
376 optimizations_missing=""
377 if test ! "x$enable_optimizations" = "xno" ; then
378 optimizations_avail=yes
380 optimizations_missing="enable-optimizations"
385 eloop_dbus_missing=""
386 if test ! "x$enable_eloop_dbus" = "xno" ; then
388 if test "x$have_dbus" = "xno" ; then
390 eloop_dbus_missing="libdbus"
393 if test "x$eloop_dbus_avail" = "xno" ; then
394 if test "x$enable_eloop_dbus" = "xyes" ; then
395 AC_ERROR([missing for eloop-dbus: $eloop_dbus_missing])
399 eloop_dbus_missing="enable-eloop-dbus"
405 if test ! "x$enable_eloop" = "xno" ; then
408 eloop_missing="enable-eloop"
413 video_fbdev_missing=""
414 if test ! "x$enable_video_fbdev" = "xno" ; then
415 # TODO: check for kernel headers
416 video_fbdev_avail=yes
418 video_fbdev_missing="enable-video-fbdev"
423 video_drm2d_missing=""
424 if test ! "x$enable_video_drm2d" = "xno" ; then
425 video_drm2d_avail=yes
426 if test "x$have_drm3d" = "xno" ; then
428 video_drm2d_missing="libdrm3d"
431 if test "x$video_drm2d_avail" = "xno" ; then
432 if test "x$enable_video_drm2d" = "xyes" ; then
433 AC_ERROR([missing for drm2d video backend: $video_drm2d_missing])
437 video_drm2d_missing="enable-video-drm2d"
442 video_drm3d_missing=""
443 if test ! "x$enable_video_drm3d" = "xno" ; then
444 video_drm3d_avail=yes
445 if test "x$have_drm3d" = "xno" ; then
447 video_drm3d_missing="libdrm3d,$video_drm3d_missing"
449 if test "x$have_gbm" = "xno" ; then
451 video_drm3d_missing="libgbm,$video_drm3d_missing"
453 if test "x$have_egl" = "xno" ; then
455 video_drm3d_missing="libegl,$video_drm3d_missing"
457 if test "x$have_gles2" = "xno" ; then
459 video_drm3d_missing="libgles2,$video_drm3d_missing"
462 if test "x$video_drm3d_avail" = "xno" ; then
463 if test "x$enable_video_drm3d" = "xyes" ; then
464 AC_ERROR([missing for drm3d video backend: $video_drm3d_missing])
468 video_drm3d_missing="enable-video-drm3d"
473 multi_seat_missing=""
474 if test ! "x$enable_multi_seat" = "xno" ; then
476 if test "x$have_systemd" = "xno" ; then
478 multi_seat_missing="libsystemd"
481 if test "x$multi_seat_avail" = "xno" ; then
482 if test "x$enable_multi_seat" = "xyes" ; then
483 AC_ERROR([missing for multi-seat support: $multi_seat_missing])
487 multi_seat_missing="enable-multi-seat"
493 if test ! "x$enable_hotplug" = "xno" ; then
495 if test "x$have_udev" = "xno" ; then
497 hotplug_missing="libudev"
500 if test "x$hotplug_avail" = "xno" ; then
501 if test "x$enable_hotplug" = "xyes" ; then
502 AC_ERROR([missing for hotplug-support: $hotplug_missing])
506 hotplug_missing="enable-hotplug"
510 renderer_bbulk_avail=no
511 renderer_bbulk_missing=""
512 if test ! "x$enable_renderer_bbulk" = "xno" ; then
513 renderer_bbulk_avail=yes
515 renderer_bbulk_missing="enable-renderer-bbulk"
519 renderer_gltex_avail=no
520 renderer_gltex_missing=""
521 if test ! "x$enable_renderer_gltex" = "xno" ; then
522 renderer_gltex_avail=yes
523 if test "x$have_gles2" = "xno" ; then
524 renderer_gltex_avail=no
525 renderer_gltex_missing="libgles2"
528 if test "x$renderer_gltex_avail" = "xno" ; then
529 if test "x$enable_renderer_gltex" = "xyes" ; then
530 AC_ERROR([missing for renderer-gltex: $renderer_gltex_missing])
534 renderer_gltex_missing="enable-renderer-gltex"
538 renderer_pixman_avail=no
539 renderer_pixman_missing=""
540 if test ! "x$enable_renderer_pixman" = "xno" ; then
541 renderer_pixman_avail=yes
542 if test "x$have_pixman" = "xno" ; then
543 renderer_pixman_avail=no
544 renderer_pixman_missing="pixman"
547 if test "x$renderer_pixman_avail" = "xno" ; then
548 if test "x$enable_renderer_pixman" = "xyes" ; then
549 AC_ERROR([missing for renderer-pixman: $renderer_pixman_missing])
553 renderer_pixman_missing="enable-renderer-pixman"
557 font_unifont_avail=no
558 font_unifont_missing=""
559 if test ! "x$enable_font_unifont" = "xno" ; then
560 font_unifont_avail=yes
562 font_unifont_missing="enable-font-unifont"
567 font_pango_missing=""
568 if test ! "x$enable_font_pango" = "xno" ; then
570 if test "x$have_pango" = "xno" ; then
572 font_pango_missing="libpango"
575 if test "x$font_pango_avail" = "xno" ; then
576 if test "x$enable_font_pango" = "xyes" ; then
577 AC_ERROR([missing for font-pango: $font_pango_missing])
581 font_pango_missing="enable-font-pango"
585 session_dummy_avail=no
586 session_dummy_missing=""
587 if test ! "x$enable_session_dummy" = "xno" ; then
588 session_dummy_avail=yes
590 session_dummy_missing="enable-session-dummy"
594 session_terminal_avail=no
595 session_terminal_missing=""
596 if test ! "x$enable_session_terminal" = "xno" ; then
597 session_terminal_avail=yes
598 if test "x$have_tsm" = "xno" ; then
599 session_terminal_avail=no
600 session_terminal_missing="libtsm"
603 if test "x$session_terminal_avail" = "xno" ; then
604 if test "x$enable_session_terminal" = "xyes" ; then
605 AC_ERROR([missing for session-terminal: $session_terminal_missing])
609 session_terminal_missing="enable-session-terminal"
615 if test ! "x$enable_kmscon" = "xno" ; then
617 if test "x$eloop_avail" = "xno" ; then
619 kmscon_missing="$eloop_missing,$kmscon_missing"
622 if test "x$have_tsm" = "xno" ; then
624 kmscon_missing="libtsm,$kmscon_missing"
627 if test "x$kmscon_avail" = "xno" ; then
628 if test "x$enable_kmscon" = "xyes" ; then
629 AC_ERROR([missing for kmscon: $kmscon_missing])
633 kmscon_missing="enable-kmscon"
637 # Enable all required modules
638 # We now know which modules can be built by checking the *_avail variables set
639 # above. We now only have to disable all modules that are disabled by default
640 # and the user didn't force-enable them and no other module that is enabled
641 # needs them. This is done top-down of course.
646 if test "x$kmscon_avail" = "xyes" ; then
647 if test "x${enable_kmscon% *}" = "xyes" ; then
654 session_terminal_enabled=no
655 if test "x$session_terminal_avail" = "xyes" ; then
656 if test "x${enable_session_terminal% *}" = "xyes" ; then
657 session_terminal_enabled=yes
662 session_dummy_enabled=no
663 if test "x$session_dummy_avail" = "xyes" ; then
664 if test "x${enable_session_dummy% *}" = "xyes" ; then
665 session_dummy_enabled=yes
670 font_pango_enabled=no
671 if test "x$font_pango_avail" = "xyes" ; then
672 if test "x${enable_font_pango% *}" = "xyes" ; then
673 font_pango_enabled=yes
678 font_unifont_enabled=no
679 if test "x$font_unifont_avail" = "xyes" ; then
680 if test "x${enable_font_unifont% *}" = "xyes" ; then
681 font_unifont_enabled=yes
686 renderer_gltex_enabled=no
687 if test "x$renderer_gltex_avail" = "xyes" ; then
688 if test "x${enable_renderer_gltex% *}" = "xyes" ; then
689 renderer_gltex_enabled=yes
694 renderer_pixman_enabled=no
695 if test "x$renderer_pixman_avail" = "xyes" ; then
696 if test "x${enable_renderer_pixman% *}" = "xyes" ; then
697 renderer_pixman_enabled=yes
702 renderer_bbulk_enabled=no
703 if test "x$renderer_bbulk_avail" = "xyes" ; then
704 if test "x${enable_renderer_bbulk% *}" = "xyes" ; then
705 renderer_bbulk_enabled=yes
711 if test "x$hotplug_avail" = "xyes" ; then
712 if test "x${enable_hotplug% *}" = "xyes" ; then
718 multi_seat_enabled=no
719 if test "x$multi_seat_avail" = "xyes" ; then
720 if test "x${enable_multi_seat% *}" = "xyes" ; then
721 multi_seat_enabled=yes
726 video_drm3d_enabled=no
727 if test "x$video_drm3d_avail" = "xyes" ; then
728 if test "x${enable_video_drm3d% *}" = "xyes" ; then
729 video_drm3d_enabled=yes
734 video_drm2d_enabled=no
735 if test "x$video_drm2d_avail" = "xyes" ; then
736 if test "x${enable_video_drm2d% *}" = "xyes" ; then
737 video_drm2d_enabled=yes
742 video_fbdev_enabled=no
743 if test "x$video_fbdev_avail" = "xyes" ; then
744 if test "x${enable_video_fbdev% *}" = "xyes" ; then
745 video_fbdev_enabled=yes
751 if test "x$eloop_avail" = "xyes" ; then
752 if test "x${enable_eloop% *}" = "xyes" ; then
758 eloop_dbus_enabled=no
759 if test "x$eloop_dbus_avail" = "xyes" ; then
760 if test "x${enable_eloop_dbus% *}" = "xyes" ; then
761 eloop_dbus_enabled=yes
766 optimizations_enabled=no
767 if test "x$optimizations_avail" = "xyes" ; then
768 if test "x${enable_optimizations% *}" = "xyes" ; then
769 optimizations_enabled=yes
775 if test "x$debug_avail" = "xyes" ; then
776 if test "x${enable_debug% *}" = "xyes" ; then
782 # Module Configuration
783 # We have now done all dependency checking and default-value validation and we
784 # now know which modules are enabled via the *_enabled variables.
785 # Everything below is related to the configuration of each module and setting
786 # the correct flags for the build process.
790 if test "x$debug_enabled" = "xyes" ; then
791 AC_DEFINE([BUILD_ENABLE_DEBUG], [1], [Enable debug mode])
793 AC_DEFINE([NDEBUG], [1], [No Debug])
796 AM_CONDITIONAL([BUILD_ENABLE_DEBUG],
797 [test "x$debug_enabled" = "xyes"])
800 AM_CONDITIONAL([BUILD_ENABLE_OPTIMIZATIONS],
801 [test "x$optimizations_enabled" = "xyes"])
804 AM_CONDITIONAL([BUILD_ENABLE_ELOOP_DBUS],
805 [test "x$eloop_dbus_enabled" = "xyes"])
808 AM_CONDITIONAL([BUILD_ENABLE_ELOOP],
809 [test "x$eloop_enabled" = "xyes"])
812 if test "x$video_fbdev_enabled" = "xyes" ; then
813 AC_DEFINE([BUILD_ENABLE_VIDEO_FBDEV], [1],
814 [Build uterm fbdev video backend])
817 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_FBDEV],
818 [test "x$video_fbdev_enabled" = "xyes"])
821 if test "x$video_drm2d_enabled" = "xyes" ; then
822 AC_DEFINE([BUILD_ENABLE_VIDEO_DRM2D], [1],
823 [Build uterm drm2d drm3d video backend])
826 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM2D],
827 [test "x$video_drm2d_enabled" = "xyes"])
830 if test "x$video_drm3d_enabled" = "xyes" ; then
831 AC_DEFINE([BUILD_ENABLE_VIDEO_DRM3D], [1],
832 [Build uterm drm3d video backend])
835 AM_CONDITIONAL([BUILD_ENABLE_VIDEO_DRM3D],
836 [test "x$video_drm3d_enabled" = "xyes"])
839 if test "x$multi_seat_enabled" = "xyes" ; then
840 AC_DEFINE([BUILD_ENABLE_MULTI_SEAT], [1],
841 [Use systemd for multi-seat support])
844 AM_CONDITIONAL([BUILD_ENABLE_MULTI_SEAT],
845 [test "x$multi_seat_enabled" = "xyes"])
848 if test "x$hotplug_enabled" = "xyes" ; then
849 AC_DEFINE([BUILD_ENABLE_HOTPLUG], [1],
850 [Use udev for hotplug support])
853 AM_CONDITIONAL([BUILD_ENABLE_HOTPLUG],
854 [test "x$hotplug_enabled" = "xyes"])
857 if test "x$renderer_bbulk_enabled" = "xyes" ; then
858 AC_DEFINE([BUILD_ENABLE_RENDERER_BBULK], [1],
859 [Build bbulk rendering backend])
862 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_BBULK],
863 [test "x$renderer_bbulk_enabled" = "xyes"])
866 if test "x$renderer_gltex_enabled" = "xyes" ; then
867 AC_DEFINE([BUILD_ENABLE_RENDERER_GLTEX], [1],
868 [Build gltex rendering backend])
871 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_GLTEX],
872 [test "x$renderer_gltex_enabled" = "xyes"])
875 if test "x$renderer_pixman_enabled" = "xyes" ; then
876 AC_DEFINE([BUILD_ENABLE_RENDERER_PIXMAN], [1],
877 [Build pixman rendering backend])
880 AM_CONDITIONAL([BUILD_ENABLE_RENDERER_PIXMAN],
881 [test "x$renderer_pixman_enabled" = "xyes"])
884 if test "x$font_unifont_enabled" = "xyes" ; then
885 AC_DEFINE([BUILD_ENABLE_FONT_UNIFONT], [1],
886 [Build static unifont backend])
889 AM_CONDITIONAL([BUILD_ENABLE_FONT_UNIFONT],
890 [test "x$font_unifont_enabled" = "xyes"])
893 if test "x$font_pango_enabled" = "xyes" ; then
894 AC_DEFINE([BUILD_ENABLE_FONT_PANGO], [1],
895 [Build pango font backend])
898 AM_CONDITIONAL([BUILD_ENABLE_FONT_PANGO],
899 [test "x$font_pango_enabled" = "xyes"])
902 if test "x$session_dummy_enabled" = "xyes" ; then
903 AC_DEFINE([BUILD_ENABLE_SESSION_DUMMY], [1],
904 [Build dummy session])
907 AM_CONDITIONAL([BUILD_ENABLE_SESSION_DUMMY],
908 [test "x$session_dummy_enabled" = "xyes"])
911 if test "x$session_terminal_enabled" = "xyes" ; then
912 AC_DEFINE([BUILD_ENABLE_SESSION_TERMINAL], [1],
913 [Build terminal session])
916 AM_CONDITIONAL([BUILD_ENABLE_SESSION_TERMINAL],
917 [test "x$session_terminal_enabled" = "xyes"])
920 AM_CONDITIONAL([BUILD_ENABLE_KMSCON],
921 [test "x$kmscon_enabled" = "xyes"])
924 # Miscellaneous Checks
925 # All checks below are independent of module checking or depend on the results
926 # of it. They do not have any dependencies themselves so they are not part of the
927 # module infrastructure.
930 # check for _Static_assert
931 AC_MSG_CHECKING([whether _Static_assert() is supported])
933 have_static_assert=yes
934 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[_Static_assert(1, "What?");]])],
935 [AC_DEFINE([BUILD_HAVE_STATIC_ASSERT],
937 [Define to 1 if _Static_assert() is supported])],
938 [have_static_assert=no])
939 AC_MSG_RESULT([$have_static_assert])
941 # check for gbm_bo_get_pitch() function, otherwise gbm_bo_get_stride() is used
942 if test x$have_gbm = xyes ; then
943 save_CFLAGS="$CFLAGS"
945 save_LDFLAGS="$LDFLAGS"
946 CFLAGS="$DRM_CFLAGS $GBM_CFLAGS"
947 LIBS="$DRM_LIBS $GBM_LIBS"
951 [AC_DEFINE([BUILD_HAVE_GBM_BO_GET_PITCH],
953 [Define to 1 if your libgbm provides gbm_bo_get_pitch])])
954 CFLAGS="$save_CFLAGS"
956 LDFLAGS="$save_LDFLAGS"
960 AC_PATH_PROG(XSLTPROC, xsltproc)
961 AM_CONDITIONAL([BUILD_HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
963 # check for offline man-pages stylesheet
964 AC_MSG_CHECKING([for docbook manpages stylesheet])
965 BUILD_MANPAGES_STYLESHEET="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl"
966 AC_PATH_PROGS_FEATURE_CHECK([XSLTPROC_TMP], [xsltproc],
967 AS_IF([`"$ac_path_XSLTPROC_TMP" --nonet "$BUILD_MANPAGES_STYLESHEET" > /dev/null 2>&1`],
968 [BUILD_HAVE_MANPAGES_STYLESHEET=yes]))
969 if test "x$BUILD_HAVE_MANPAGES_STYLESHEET" = "xyes"; then
970 AM_CONDITIONAL([BUILD_HAVE_MANPAGES_STYLESHEET], true)
971 AC_SUBST(BUILD_MANPAGES_STYLESHEET)
974 AM_CONDITIONAL([BUILD_HAVE_MANPAGES_STYLESHEET], false)
980 # After everything is configured, we correctly substitute the values for the
984 AC_CONFIG_FILES([Makefile
985 docs/pc/libeloop.pc])
989 # Configuration output
990 # Show configuration to the user so they can check whether everything was
991 # configured as expected.
994 AC_MSG_NOTICE([Build configuration:
997 exec-prefix: $exec_prefix
999 includedir: $includedir
1001 Applications and Libraries:
1002 kmscon: $kmscon_enabled ($kmscon_avail: $kmscon_missing)
1003 eloop: $eloop_enabled ($eloop_avail: $eloop_missing)
1005 Miscellaneous Options:
1006 debug: $debug_enabled ($debug_avail: $debug_missing)
1007 optimizations: $optimizations_enabled ($optimizations_avail: $optimizations_missing)
1008 multi-seat: $multi_seat_enabled ($multi_seat_avail: $multi_seat_missing)
1009 hotplug: $hotplug_enabled ($hotplug_avail: $hotplug_missing)
1010 eloop-dbus: $eloop_dbus_enabled ($eloop_dbus_avail: $eloop_dbus_missing)
1013 fbdev: $video_fbdev_enabled ($video_fbdev_avail: $video_fbdev_missing)
1014 drm2d: $video_drm2d_enabled ($video_drm2d_avail: $video_drm2d_missing)
1015 drm3d: $video_drm3d_enabled ($video_drm3d_avail: $video_drm3d_missing)
1018 unifont: $font_unifont_enabled ($font_unifont_avail: $font_unifont_missing)
1019 pango: $font_pango_enabled ($font_pango_avail: $font_pango_missing)
1022 bbulk: $renderer_bbulk_enabled ($renderer_bbulk_avail: $renderer_bbulk_missing)
1023 gltex: $renderer_gltex_enabled ($renderer_gltex_avail: $renderer_gltex_missing)
1024 pixman: $renderer_pixman_enabled ($renderer_pixman_avail: $renderer_pixman_missing)
1027 dummy: $session_dummy_enabled ($session_dummy_avail: $session_dummy_missing)
1028 terminal: $session_terminal_enabled ($session_terminal_avail: $session_terminal_missing)
1030 Run "${MAKE-make}" to start compilation process])