AC_PREREQ(2.68)
AC_INIT([kmscon],
- [7],
+ [8],
[http://bugs.freedesktop.org/enter_bug.cgi?product=kmscon],
[kmscon],
[http://www.freedesktop.org/wiki/Software/kmscon])
LT_INIT
#
+# Required pkg-config dependencies
+#
+
+PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon])
+AC_SUBST(XKBCOMMON_CFLAGS)
+AC_SUBST(XKBCOMMON_LIBS)
+
+PKG_CHECK_MODULES([TSM], [libtsm])
+AC_SUBST(TSM_CFLAGS)
+AC_SUBST(TSM_LIBS)
+
+PKG_CHECK_MODULES([UDEV], [libudev >= 172])
+AC_SUBST(UDEV_CFLAGS)
+AC_SUBST(UDEV_LIBS)
+
+PKG_CHECK_MODULES([DRM], [libdrm])
+AC_SUBST(DRM_CFLAGS)
+AC_SUBST(DRM_LIBS)
+
+#
# pkg-config dependencies
# This unconditionally checks for all dependencies even if they are disabled. We
# later look whether all required depedencies are met and finish the
# ourself.
#
-PKG_CHECK_MODULES([XKBCOMMON], [xkbcommon],
- [have_xkbcommon=yes], [have_xkbcommon=no])
-AC_SUBST(XKBCOMMON_CFLAGS)
-AC_SUBST(XKBCOMMON_LIBS)
-
PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon libsystemd-login],
[have_systemd=yes], [have_systemd=no])
AC_SUBST(SYSTEMD_CFLAGS)
AC_SUBST(SYSTEMD_LIBS)
-PKG_CHECK_MODULES([UDEV], [libudev >= 172],
- [have_udev=yes], [have_udev=no])
-AC_SUBST(UDEV_CFLAGS)
-AC_SUBST(UDEV_LIBS)
-
-PKG_CHECK_MODULES([DBUS], [dbus-1],
- [have_dbus=yes], [have_dbus=no])
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-
-PKG_CHECK_MODULES([DRM], [libdrm],
- [have_drm=yes], [have_drm=no])
-AC_SUBST(DRM_CFLAGS)
-AC_SUBST(DRM_LIBS)
-
PKG_CHECK_MODULES([GBM], [gbm],
[have_gbm=yes], [have_gbm=no])
AC_SUBST(GBM_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
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_all" = "xyes" ; then
- enable_eloop="yes"
-elif test "x$enable_eloop" = "x" ; then
- enable_eloop="no (default)"
-fi
-AC_MSG_RESULT([$enable_eloop])
-
-# kmscon
-AC_MSG_CHECKING([whether user wants kmscon])
-AC_ARG_ENABLE([kmscon],
- [AS_HELP_STRING([--disable-kmscon],
- [do not build kmscon])])
-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])
-
# debug
AC_MSG_CHECKING([whether to build with debugging on])
AC_ARG_ENABLE([debug],
fi
AC_MSG_RESULT([$enable_multi_seat])
-# hotplug
-AC_MSG_CHECKING([whether user wants udev for device hotplug support])
-AC_ARG_ENABLE([hotplug],
- [AS_HELP_STRING([--enable-hotplug],
- [enable device hotplug support with udev])])
-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])
-
-# eloop-dbus
-AC_MSG_CHECKING([whether user wants eloop dbus support])
-AC_ARG_ENABLE([eloop-dbus],
- [AS_HELP_STRING([--enable-eloop-dbus],
- [enable eloop dbus support])])
-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])
-
# video backends
AC_MSG_CHECKING([which video backends the user wants])
AC_ARG_WITH([video],
optimizations_missing="enable-optimizations"
fi
-# eloop-dbus
-eloop_dbus_avail=no
-eloop_dbus_missing=""
-if test ! "x$enable_eloop_dbus" = "xno" ; then
- eloop_dbus_avail=yes
- if test "x$have_dbus" = "xno" ; then
- eloop_dbus_avail=no
- eloop_dbus_missing="libdbus"
- fi
-
- if test "x$eloop_dbus_avail" = "xno" ; then
- if test "x$enable_eloop_dbus" = "xyes" ; then
- AC_ERROR([missing for eloop-dbus: $eloop_dbus_missing])
- fi
- fi
-else
- eloop_dbus_missing="enable-eloop-dbus"
-fi
-
-# eloop
-eloop_avail=no
-eloop_missing=""
-if test ! "x$enable_eloop" = "xno" ; then
- eloop_avail=yes
-else
- eloop_missing="enable-eloop"
-fi
-
# video fbdev
video_fbdev_avail=no
video_fbdev_missing=""
video_drm2d_missing=""
if test ! "x$enable_video_drm2d" = "xno" ; then
video_drm2d_avail=yes
- if test "x$have_drm3d" = "xno" ; then
- video_drm2d_avail=no
- video_drm2d_missing="libdrm3d"
- fi
-
- if test "x$video_drm2d_avail" = "xno" ; then
- if test "x$enable_video_drm2d" = "xyes" ; then
- AC_ERROR([missing for drm2d video backend: $video_drm2d_missing])
- fi
- fi
else
video_drm2d_missing="enable-video-drm2d"
fi
video_drm3d_missing=""
if test ! "x$enable_video_drm3d" = "xno" ; then
video_drm3d_avail=yes
- if test "x$have_drm3d" = "xno" ; then
- video_drm3d_avail=no
- video_drm3d_missing="libdrm3d,$video_drm3d_missing"
- fi
if test "x$have_gbm" = "xno" ; then
video_drm3d_avail=no
video_drm3d_missing="libgbm,$video_drm3d_missing"
multi_seat_missing="enable-multi-seat"
fi
-# hotplug
-hotplug_avail=no
-hotplug_missing=""
-if test ! "x$enable_hotplug" = "xno" ; then
- hotplug_avail=yes
- if test "x$have_udev" = "xno" ; then
- hotplug_avail=no
- hotplug_missing="libudev"
- fi
-
- if test "x$hotplug_avail" = "xno" ; then
- if test "x$enable_hotplug" = "xyes" ; then
- AC_ERROR([missing for hotplug-support: $hotplug_missing])
- fi
- fi
-else
- hotplug_missing="enable-hotplug"
-fi
-
# renderer bbulk
renderer_bbulk_avail=no
renderer_bbulk_missing=""
session_terminal_missing=""
if test ! "x$enable_session_terminal" = "xno" ; then
session_terminal_avail=yes
- if test "x$have_tsm" = "xno" ; then
- session_terminal_avail=no
- session_terminal_missing="libtsm"
- fi
-
- if test "x$session_terminal_avail" = "xno" ; then
- if test "x$enable_session_terminal" = "xyes" ; then
- AC_ERROR([missing for session-terminal: $session_terminal_missing])
- fi
- fi
else
session_terminal_missing="enable-session-terminal"
fi
-# kmscon
-kmscon_avail=no
-kmscon_missing=""
-if test ! "x$enable_kmscon" = "xno" ; then
- kmscon_avail=yes
- if test "x$eloop_avail" = "xno" ; then
- kmscon_avail=no
- kmscon_missing="$eloop_missing,$kmscon_missing"
- fi
-
- if test "x$have_tsm" = "xno" ; then
- kmscon_avail=no
- kmscon_missing="libtsm,$kmscon_missing"
- fi
-
- if test "x$kmscon_avail" = "xno" ; then
- if test "x$enable_kmscon" = "xyes" ; then
- AC_ERROR([missing for kmscon: $kmscon_missing])
- fi
- fi
-else
- kmscon_missing="enable-kmscon"
-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.
#
-# kmscon
-kmscon_enabled=no
-if test "x$kmscon_avail" = "xyes" ; then
- if test "x${enable_kmscon% *}" = "xyes" ; then
- kmscon_enabled=yes
- enable_eloop=yes
- fi
-fi
-
# session terminal
session_terminal_enabled=no
if test "x$session_terminal_avail" = "xyes" ; then
fi
fi
-# hotplug
-hotplug_enabled=no
-if test "x$hotplug_avail" = "xyes" ; then
- if test "x${enable_hotplug% *}" = "xyes" ; then
- hotplug_enabled=yes
- fi
-fi
-
# multi-seat
multi_seat_enabled=no
if test "x$multi_seat_avail" = "xyes" ; then
fi
fi
-# eloop
-eloop_enabled=no
-if test "x$eloop_avail" = "xyes" ; then
- if test "x${enable_eloop% *}" = "xyes" ; then
- eloop_enabled=yes
- fi
-fi
-
-# eloop-dbus
-eloop_dbus_enabled=no
-if test "x$eloop_dbus_avail" = "xyes" ; then
- if test "x${enable_eloop_dbus% *}" = "xyes" ; then
- eloop_dbus_enabled=yes
- fi
-fi
-
# optimizations
optimizations_enabled=no
if test "x$optimizations_avail" = "xyes" ; then
AM_CONDITIONAL([BUILD_ENABLE_OPTIMIZATIONS],
[test "x$optimizations_enabled" = "xyes"])
-# eloop-dbus
-AM_CONDITIONAL([BUILD_ENABLE_ELOOP_DBUS],
- [test "x$eloop_dbus_enabled" = "xyes"])
-
-# eloop
-AM_CONDITIONAL([BUILD_ENABLE_ELOOP],
- [test "x$eloop_enabled" = "xyes"])
-
# video fbdev
if test "x$video_fbdev_enabled" = "xyes" ; then
AC_DEFINE([BUILD_ENABLE_VIDEO_FBDEV], [1],
AM_CONDITIONAL([BUILD_ENABLE_MULTI_SEAT],
[test "x$multi_seat_enabled" = "xyes"])
-# hotplug
-if test "x$hotplug_enabled" = "xyes" ; then
- AC_DEFINE([BUILD_ENABLE_HOTPLUG], [1],
- [Use udev for hotplug support])
-fi
-
-AM_CONDITIONAL([BUILD_ENABLE_HOTPLUG],
- [test "x$hotplug_enabled" = "xyes"])
-
# renderer bbulk
if test "x$renderer_bbulk_enabled" = "xyes" ; then
AC_DEFINE([BUILD_ENABLE_RENDERER_BBULK], [1],
AM_CONDITIONAL([BUILD_ENABLE_SESSION_TERMINAL],
[test "x$session_terminal_enabled" = "xyes"])
-# kmscon
-AM_CONDITIONAL([BUILD_ENABLE_KMSCON],
- [test "x$kmscon_enabled" = "xyes"])
-
#
# Miscellaneous Checks
# All checks below are independent of module checking or depend on the results
fi
# check for xsltproc
+AC_ARG_VAR([XSLTPROC], [xsltproc program])
AC_PATH_PROG(XSLTPROC, xsltproc)
AM_CONDITIONAL([BUILD_HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
AC_MSG_RESULT([no])
fi
+# gles2 helpers
+AM_CONDITIONAL([BUILD_HAVE_GLES2], [test "x$have_gles2" = "xyes"])
+
+# check for mandatory objcopy program
+AC_ARG_VAR([OBJCOPY], [objcopy program])
+AC_CHECK_TOOL([OBJCOPY], [objcopy], "")
+
+if test "x$OBJCOPY" = "x" ; then
+ AC_ERROR([Cannot find "objcopy" program])
+fi
+
#
# Makefile vars
# After everything is configured, we correctly substitute the values for the
# makefiles.
#
-AC_CONFIG_FILES([Makefile
- docs/pc/libeloop.pc])
+AC_CONFIG_FILES([Makefile])
AC_OUTPUT
#
libdir: $libdir
includedir: $includedir
- Applications and Libraries:
- kmscon: $kmscon_enabled ($kmscon_avail: $kmscon_missing)
- eloop: $eloop_enabled ($eloop_avail: $eloop_missing)
-
Miscellaneous Options:
debug: $debug_enabled ($debug_avail: $debug_missing)
optimizations: $optimizations_enabled ($optimizations_avail: $optimizations_missing)
multi-seat: $multi_seat_enabled ($multi_seat_avail: $multi_seat_missing)
- hotplug: $hotplug_enabled ($hotplug_avail: $hotplug_missing)
- eloop-dbus: $eloop_dbus_enabled ($eloop_dbus_avail: $eloop_dbus_missing)
Video Backends:
fbdev: $video_fbdev_enabled ($video_fbdev_avail: $video_fbdev_missing)