AC_PREREQ(2.68)
-AC_INIT([kmscon], [6])
-AC_SUBST(PACKAGE_URL, [https://github.com/dvdhrm/kmscon])
+AC_INIT([kmscon],
+ [7],
+ [http://bugs.freedesktop.org/enter_bug.cgi?product=kmscon],
+ [kmscon],
+ [http://www.freedesktop.org/wiki/Software/kmscon])
AC_CONFIG_SRCDIR([src/kmscon_main.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_PREFIX_DEFAULT([/usr])
-AC_CANONICAL_HOST
+AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-bzip2 no-dist-gzip tar-pax -Wall -Werror -Wno-portability])
+AM_INIT_AUTOMAKE([foreign 1.11 subdir-objects dist-xz no-dist-gzip tar-pax -Wall -Werror -Wno-portability])
AM_SILENT_RULES([yes])
#
: ${CFLAGS=""}
AC_PROG_CC
+AX_PROG_CC_FOR_BUILD
AC_PROG_CC_C99
AM_PROG_CC_C_O
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_SUBST(XKBCOMMON_CFLAGS)
AC_SUBST(XKBCOMMON_LIBS)
-PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server wayland-cursor],
- [have_wayland=yes], [have_wayland=no])
-AC_SUBST(WAYLAND_CFLAGS)
-AC_SUBST(WAYLAND_LIBS)
-
PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon libsystemd-login],
[have_systemd=yes], [have_systemd=no])
AC_SUBST(SYSTEMD_CFLAGS)
AC_SUBST(GLES2_CFLAGS)
AC_SUBST(GLES2_LIBS)
-PKG_CHECK_MODULES([FREETYPE2], [freetype2 fontconfig],
- [have_freetype2=yes], [have_freetype2=no])
-AC_SUBST(FREETYPE2_CFLAGS)
-AC_SUBST(FREETYPE2_LIBS)
-
PKG_CHECK_MODULES([PANGO], [pango pangoft2],
[have_pango=yes], [have_pango=no])
AC_SUBST(PANGO_CFLAGS)
AC_SUBST(PANGO_LIBS)
-PKG_CHECK_MODULES([FUSE], [fuse >= 2.9.0],
- [have_fuse=yes], [have_fuse=no])
-AC_SUBST(FUSE_CFLAGS)
-AC_SUBST(FUSE_LIBS)
-
PKG_CHECK_MODULES([CAIRO], [cairo],
[have_cairo=yes], [have_cairo=no])
AC_SUBST(CAIRO_CFLAGS)
AC_SUBST(PIXMAN_CFLAGS)
AC_SUBST(PIXMAN_LIBS)
+PKG_CHECK_MODULES([TSM], [libtsm],
+ [have_tsm=yes], [have_tsm=no])
+AC_SUBST(TSM_CFLAGS)
+AC_SUBST(TSM_LIBS)
+
#
# Parse arguments
# This parses all arguments that are given via "--enable-XY" or "--with-XY" and
# similar but does only parse the arguments.
#
+# all
+AC_MSG_CHECKING([whether user wants all])
+AC_ARG_ENABLE([all],
+ [AS_HELP_STRING([--enable-all],
+ [enable all options (used for debugging)])])
+if test "x$enable_all" = "x" ; then
+ enable_all="no"
+fi
+AC_MSG_RESULT([$enable_all])
+
# eloop
AC_MSG_CHECKING([whether user wants eloop])
AC_ARG_ENABLE([eloop],
[AS_HELP_STRING([--enable-eloop],
[build eloop library])])
-if test "x$enable_eloop" = "x" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_eloop="yes"
+elif test "x$enable_eloop" = "x" ; then
enable_eloop="no (default)"
fi
AC_MSG_RESULT([$enable_eloop])
-# TSM
-AC_MSG_CHECKING([whether user wants TSM])
-AC_ARG_ENABLE([tsm],
- [AS_HELP_STRING([--enable-tsm],
- [build tsm library])])
-if test "x$enable_tsm" = "x" ; then
- enable_tsm="no (default)"
-fi
-AC_MSG_RESULT([$enable_tsm])
-
-# UVT
-AC_MSG_CHECKING([whether user wants UVT])
-AC_ARG_ENABLE([uvt],
- [AS_HELP_STRING([--enable-uvt],
- [build uvt library])])
-if test "x$enable_uvt" = "x" ; then
- enable_uvt="no (default)"
-fi
-AC_MSG_RESULT([$enable_uvt])
-
# uterm
AC_MSG_CHECKING([whether user wants uterm])
AC_ARG_ENABLE([uterm],
[AS_HELP_STRING([--enable-uterm],
[build uterm library])])
-if test "x$enable_uterm" = "x" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_uterm="yes"
+elif test "x$enable_uterm" = "x" ; then
enable_uterm="no (default)"
fi
AC_MSG_RESULT([$enable_uterm])
AC_ARG_ENABLE([kmscon],
[AS_HELP_STRING([--disable-kmscon],
[do not build kmscon])])
-if test "x$enable_kmscon" = "x" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_kmscon="yes"
+elif test "x$enable_kmscon" = "x" ; then
enable_kmscon="yes (default)"
fi
AC_MSG_RESULT([$enable_kmscon])
-# wlterm
-AC_MSG_CHECKING([whether user wants wlterm])
-AC_ARG_ENABLE([wlterm],
- [AS_HELP_STRING([--enable-wlterm],
- [build wlterm])])
-if test "x$enable_wlterm" = "x" ; then
- enable_wlterm="no (default)"
-fi
-AC_MSG_RESULT([$enable_wlterm])
-
# debug
AC_MSG_CHECKING([whether to build with debugging on])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[whether to build with debugging on])])
-if test "x$enable_debug" = "x" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_debug="yes"
+elif test "x$enable_debug" = "x" ; then
enable_debug="yes (default)"
fi
AC_MSG_RESULT([$enable_debug])
AC_ARG_ENABLE([optimizations],
[AS_HELP_STRING([--disable-optimizations],
[whether to disable code optimizations])])
-if test "x$enable_optimizations" = "x" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_optimizations="yes"
+elif test "x$enable_optimizations" = "x" ; then
enable_optimizations="yes (default)"
fi
AC_MSG_RESULT([$enable_optimizations])
AC_ARG_ENABLE([multi-seat],
[AS_HELP_STRING([--enable-multi-seat],
[enable multi-seat support with systemd])])
-if test "x$enable_multi_seat" = "x" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_multi_seat="yes"
+elif test "x$enable_multi_seat" = "x" ; then
enable_multi_seat="yes (default)"
fi
AC_MSG_RESULT([$enable_multi_seat])
AC_ARG_ENABLE([hotplug],
[AS_HELP_STRING([--enable-hotplug],
[enable device hotplug support with udev])])
-if test "x$enable_hotplug" = "x" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_hotplug="yes"
+elif test "x$enable_hotplug" = "x" ; then
enable_hotplug="yes (default)"
fi
AC_MSG_RESULT([$enable_hotplug])
AC_ARG_ENABLE([eloop-dbus],
[AS_HELP_STRING([--enable-eloop-dbus],
[enable eloop dbus support])])
-if test "x$enable_eloop_dbus" = "x" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_eloop_dbus="yes"
+elif test "x$enable_eloop_dbus" = "x" ; then
enable_eloop_dbus="no (default)"
fi
AC_MSG_RESULT([$enable_eloop_dbus])
enable_video_fbdev="no"
enable_video_drm2d="no"
enable_video_drm3d="no"
-if test "x$with_video" = "xdefault" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_video_fbdev="yes"
+ enable_video_drm2d="yes"
+ enable_video_drm3d="yes"
+ with_video="fbdev,drm2d,drm3d (all)"
+elif test "x$with_video" = "xdefault" ; then
enable_video_fbdev="yes (default)"
enable_video_drm2d="yes (default)"
enable_video_drm3d="yes (default)"
enable_renderer_gltex="no"
enable_renderer_cairo="no"
enable_renderer_pixman="no"
-if test "x$with_renderers" = "xdefault" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_renderer_bbulk="yes"
+ enable_renderer_gltex="yes"
+ enable_renderer_cairo="yes"
+ enable_renderer_pixman="yes"
+ with_renderers="bbulk,gltex,cairo,pixman (all)"
+elif test "x$with_renderers" = "xdefault" ; then
enable_renderer_bbulk="yes (default)"
enable_renderer_gltex="yes (default)"
enable_renderer_cairo="no (default)"
[],
[with_fonts="default"])
enable_font_unifont="no"
-enable_font_freetype2="no"
enable_font_pango="no"
-if test "x$with_fonts" = "xdefault" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_font_unifont="yes"
+ enable_font_pango="yes"
+ with_fonts="unifont,pango (all)"
+elif test "x$with_fonts" = "xdefault" ; then
enable_font_unifont="yes (default)"
- enable_font_freetype2="no (default)"
enable_font_pango="yes (default)"
with_fonts="unifont,pango (default)"
elif test ! "x$with_fonts" = "x" ; then
for i in $with_fonts ; do
if test "x$i" = "xunifont" ; then
enable_font_unifont="yes"
- elif test "x$i" = "xfreetype2" ; then
- enable_font_freetype2="yes"
elif test "x$i" = "xpango" ; then
enable_font_pango="yes"
else
[with_sessions="default"])
enable_session_dummy="no"
enable_session_terminal="no"
-enable_session_cdev="no"
-if test "x$with_sessions" = "xdefault" ; then
+if test "x$enable_all" = "xyes" ; then
+ enable_session_dummy="yes"
+ enable_session_terminal="yes"
+ with_sessions="dummy,terminal (all)"
+elif test "x$with_sessions" = "xdefault" ; then
enable_session_dummy="yes (default)"
enable_session_terminal="yes (default)"
- enable_session_cdev="yes (default)"
- with_sessions="dummy,terminal,cdev (default)"
+ with_sessions="dummy,terminal (default)"
elif test ! "x$with_sessions" = "x" ; then
SAVEIFS="$IFS"
IFS=","
enable_session_dummy="yes"
elif test "x$i" = "xterminal" ; then
enable_session_terminal="yes"
- elif test "x$i" = "xcdev" ; then
- enable_session_cdev="yes"
else
IFS="$SAVEIFS"
AC_ERROR([Unknown session type $i])
eloop_missing="enable-eloop"
fi
-# TSM
-tsm_avail=no
-tsm_missing=""
-if test ! "x$enable_tsm" = "xno" ; then
- tsm_avail=yes
- if test "x$have_xkbcommon" = "xno" ; then
- tsm_avail=no
- tsm_missing="libxkbcommon"
- fi
-
- if test "x$tsm_avail" = "xno" ; then
- if test "x$enable_tsm" = "xyes" ; then
- AC_ERROR([missing for TSM: $tsm_missing])
- fi
- fi
-else
- tsm_missing="enable-tsm"
-fi
-
-# UVT
-uvt_avail=no
-uvt_missing=""
-if test ! "x$enable_uvt" = "xno" ; then
- uvt_avail=yes
- if test "x$have_fuse" = "xno" ; then
- uvt_avail=no
- uvt_missing="fuse"
- fi
-
- if test "x$uvt_avail" = "xno" ; then
- if test "x$enable_uvt" = "xyes" ; then
- AC_ERROR([missing for UVT: $uvt_missing])
- fi
- fi
-else
- uvt_missing="enable-uvt"
-fi
-
# video fbdev
video_fbdev_avail=no
video_fbdev_missing=""
font_unifont_missing="enable-font-unifont"
fi
-# font freetype2
-font_freetype2_avail=no
-font_freetype2_missing=""
-if test ! "x$enable_font_freetype2" = "xno" ; then
- font_freetype2_avail=yes
- if test "x$have_freetype2" = "xno" ; then
- font_freetype2_avail=no
- font_freetype2_missing="libfontconfig,libfreetype2"
- fi
-
- if test "x$font_freetype2_avail" = "xno" ; then
- if test "x$enable_font_freetype2" = "xyes" ; then
- AC_ERROR([missing for font-freetype2: $font_freetype2_missing])
- fi
- fi
-else
- font_freetype2_missing="enable-font-freetype2"
-fi
-
# font pango
font_pango_avail=no
font_pango_missing=""
session_terminal_missing=""
if test ! "x$enable_session_terminal" = "xno" ; then
session_terminal_avail=yes
- if test "x$tsm_avail" = "xno" ; then
+ if test "x$have_tsm" = "xno" ; then
session_terminal_avail=no
- session_terminal_missing="$tsm_missing"
+ session_terminal_missing="libtsm"
fi
if test "x$session_terminal_avail" = "xno" ; then
session_terminal_missing="enable-session-terminal"
fi
-# session cdev
-session_cdev_avail=no
-session_cdev_missing=""
-if test ! "x$enable_session_cdev" = "xno" ; then
- session_cdev_avail=yes
- if test "x$have_fuse" = "xno" ; then
- session_cdev_avail=no
- session_cdev_missing="libfuse,$session_cdev_missing"
- fi
-
- if test "x$tsm_avail" = "xno" ; then
- session_cdev_avail=no
- session_cdev_missing="$tsm_missing,$session_cdev_missing"
- fi
-
- if test "x$session_cdev_avail" = "xno" ; then
- if test "x$enable_session_cdev" = "xyes" ; then
- AC_ERROR([missing for session-cdev: $session_cdev_missing])
- fi
- fi
-else
- session_cdev_missing="enable-session-cdev"
-fi
-
# kmscon
kmscon_avail=no
kmscon_missing=""
kmscon_missing="$eloop_missing,$kmscon_missing"
fi
- if test "x$tsm_avail" = "xno" ; then
+ if test "x$have_tsm" = "xno" ; then
kmscon_avail=no
- kmscon_missing="$tsm_missing,$kmscon_missing"
+ kmscon_missing="libtsm,$kmscon_missing"
fi
if test "x$uterm_avail" = "xno" ; then
kmscon_missing="enable-kmscon"
fi
-# wlterm
-wlterm_avail=no
-wlterm_missing=""
-if test ! "x$enable_wlterm" = "xno" ; then
- wlterm_avail=yes
- if test "x$tsm_avail" = "xno" ; then
- wlterm_avail=no
- wlterm_missing="$tsm_missing,$wlterm_missing"
- fi
-
- if test "x$eloop_avail" = "xno" ; then
- wlterm_avail=no
- wlterm_missing="$eloop_missing,$wlterm_missing"
- fi
-
- if test "x$font_pango_avail" = "xno" ; then
- wlterm_avail=no
- wlterm_missing="$font_pango_missing,$wlterm_missing"
- fi
-
- if test "x$have_wayland" = "xno" ; then
- wlterm_avail=no
- wlterm_missing="libwayland,$wlterm_missing"
- fi
-
- if test "x$wlterm_avail" = "xno" ; then
- if test "x$enable_wlterm" = "xyes" ; then
- AC_ERROR([missing for wlterm: $wlterm_missing])
- fi
- fi
-else
- wlterm_missing="enable-wlterm"
-fi
-
#
# Enable all required modules
# We now know which modules can be built by checking the *_avail variables set
# needs them. This is done top-down of course.
#
-# wlterm
-wlterm_enabled=no
-if test "x$wlterm_avail" = "xyes" ; then
- if test "x${enable_wlterm% *}" = "xyes" ; then
- wlterm_enabled=yes
- enable_eloop=yes
- enable_tsm=yes
- enable_font_pango=yes
- fi
-fi
-
# kmscon
kmscon_enabled=no
if test "x$kmscon_avail" = "xyes" ; then
fi
fi
-# session cdev
-session_cdev_enabled=no
-if test "x$session_cdev_avail" = "xyes" ; then
- if test "x${enable_session_cdev% *}" = "xyes" ; then
- session_cdev_enabled=yes
- fi
-fi
-
# session terminal
session_terminal_enabled=no
if test "x$session_terminal_avail" = "xyes" ; then
if test "x${enable_session_terminal% *}" = "xyes" ; then
session_terminal_enabled=yes
- enable_tsm=yes
fi
fi
fi
fi
-# font freetype2
-font_freetype2_enabled=no
-if test "x$font_freetype2_avail" = "xyes" ; then
- if test "x${enable_font_freetype2% *}" = "xyes" ; then
- font_freetype2_enabled=yes
- fi
-fi
-
# font unifont
font_unifont_enabled=no
if test "x$font_unifont_avail" = "xyes" ; then
fi
fi
-# UVT
-uvt_enabled=no
-if test "x$uvt_avail" = "xyes" ; then
- if test "x${enable_uvt% *}" = "xyes" ; then
- uvt_enabled=yes
- fi
-fi
-
-# tsm
-tsm_enabled=no
-if test "x$tsm_avail" = "xyes" ; then
- if test "x${enable_tsm% *}" = "xyes" ; then
- tsm_enabled=yes
- fi
-fi
-
# eloop
eloop_enabled=no
if test "x$eloop_avail" = "xyes" ; then
AM_CONDITIONAL([BUILD_ENABLE_ELOOP],
[test "x$eloop_enabled" = "xyes"])
-# TSM
-AM_CONDITIONAL([BUILD_ENABLE_TSM],
- [test "x$tsm_enabled" = "xyes"])
-
-# UVT
-AM_CONDITIONAL([BUILD_ENABLE_UVT],
- [test "x$uvt_enabled" = "xyes"])
-
# video fbdev
if test "x$video_fbdev_enabled" = "xyes" ; then
AC_DEFINE([BUILD_ENABLE_VIDEO_FBDEV], [1],
AM_CONDITIONAL([BUILD_ENABLE_FONT_UNIFONT],
[test "x$font_unifont_enabled" = "xyes"])
-# font freetype2
-if test "x$font_freetype2_enabled" = "xyes" ; then
- AC_DEFINE([BUILD_ENABLE_FONT_FREETYPE2], [1],
- [Build freetype2 font backend])
-fi
-
-AM_CONDITIONAL([BUILD_ENABLE_FONT_FREETYPE2],
- [test "x$font_freetype2_enabled" = "xyes"])
-
# font pango
if test "x$font_pango_enabled" = "xyes" ; then
AC_DEFINE([BUILD_ENABLE_FONT_PANGO], [1],
AM_CONDITIONAL([BUILD_ENABLE_SESSION_TERMINAL],
[test "x$session_terminal_enabled" = "xyes"])
-# session cdev
-if test "x$session_cdev_enabled" = "xyes" ; then
- AC_DEFINE([BUILD_ENABLE_SESSION_CDEV], [1],
- [Build cdev session])
-fi
-
-AM_CONDITIONAL([BUILD_ENABLE_SESSION_CDEV],
- [test "x$session_cdev_enabled" = "xyes"])
-
# kmscon
AM_CONDITIONAL([BUILD_ENABLE_KMSCON],
[test "x$kmscon_enabled" = "xyes"])
-# wlterm
-AM_CONDITIONAL([BUILD_ENABLE_WLTERM],
- [test "x$wlterm_enabled" = "xyes"])
-
#
# Miscellaneous Checks
# All checks below are independent of module checking or depend on the results
AC_CONFIG_FILES([Makefile
docs/pc/libeloop.pc
- docs/pc/libtsm.pc
- docs/pc/libuvt.pc
docs/pc/libuterm.pc])
AC_OUTPUT
Applications and Libraries:
kmscon: $kmscon_enabled ($kmscon_avail: $kmscon_missing)
- wlterm: $wlterm_enabled ($wlterm_avail: $wlterm_missing)
uterm: $uterm_enabled ($uterm_avail: $uterm_missing)
- tsm: $tsm_enabled ($tsm_avail: $tsm_missing)
- uvt: $uvt_enabled ($uvt_avail: $uvt_missing)
eloop: $eloop_enabled ($eloop_avail: $eloop_missing)
Miscellaneous Options:
Font Backends:
unifont: $font_unifont_enabled ($font_unifont_avail: $font_unifont_missing)
- freetype2: $font_freetype2_enabled ($font_freetype2_avail: $font_freetype2_missing)
pango: $font_pango_enabled ($font_pango_avail: $font_pango_missing)
Renderers:
Session Types:
dummy: $session_dummy_enabled ($session_dummy_avail: $session_dummy_missing)
terminal: $session_terminal_enabled ($session_terminal_avail: $session_terminal_missing)
- cdev: $session_cdev_enabled ($session_cdev_avail: $session_cdev_missing)
Run "${MAKE-make}" to start compilation process])