compositor: forbid sub-surface nesting loops
[profile/ivi/weston-ivi-shell.git] / configure.ac
index 1ba467b..fd85b2c 100644 (file)
@@ -1,13 +1,24 @@
+m4_define([weston_major_version], [1])
+m4_define([weston_minor_version], [1])
+m4_define([weston_micro_version], [90])
+m4_define([weston_version],
+          [weston_major_version.weston_minor_version.weston_micro_version])
+
 AC_PREREQ([2.64])
 AC_INIT([weston],
-        [1.0.90],
-        [https://bugs.freedesktop.org/enter_bug.cgi?product=weston],
+        [weston_version],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=weston_version],
         [weston],
         [http://wayland.freedesktop.org/])
 
+AC_SUBST([WESTON_VERSION_MAJOR], [weston_major_version])
+AC_SUBST([WESTON_VERSION_MINOR], [weston_minor_version])
+AC_SUBST([WESTON_VERSION_MICRO], [weston_micro_version])
+AC_SUBST([WESTON_VERSION], [weston_version])
+
 AC_CONFIG_HEADERS([config.h])
 
-AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
+AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests])
 
 AM_SILENT_RULES([yes])
 
@@ -32,7 +43,7 @@ AC_CHECK_HEADERS([execinfo.h])
 
 AC_CHECK_FUNCS([mkostemp strchrnul])
 
-COMPOSITOR_MODULES="wayland-server xkbcommon pixman-1"
+COMPOSITOR_MODULES="wayland-server >= 1.1.90 xkbcommon pixman-1"
 
 AC_ARG_ENABLE(egl, [  --disable-egl],,
               enable_egl=yes)
@@ -51,7 +62,10 @@ AM_CONDITIONAL(ENABLE_SETUID_INSTALL, test x$enable_setuid_install = xyes)
 
 AC_ARG_ENABLE(xwayland, [  --enable-xwayland],,
              enable_xwayland=yes)
+AC_ARG_ENABLE(xwayland-test, [  --enable-xwayland-test],,
+              enable_xwayland_test=yes)
 AM_CONDITIONAL(ENABLE_XWAYLAND, test x$enable_xwayland = xyes)
+AM_CONDITIONAL(ENABLE_XWAYLAND_TEST, test x$enable_xwayland = xyes -a x$enable_xwayland_test = xyes)
 if test x$enable_xwayland = xyes; then
   PKG_CHECK_MODULES([XWAYLAND], xcb xcb-xfixes xcursor cairo-xcb)
   AC_DEFINE([BUILD_XWAYLAND], [1], [Build the X server launcher])
@@ -60,6 +74,9 @@ if test x$enable_xwayland = xyes; then
               [Path to X server]), [XSERVER_PATH="$withval"],
               [XSERVER_PATH="$bindir/Xorg"])
   AC_SUBST([XSERVER_PATH])
+  if test x$enable_xwayland_test = xyes; then
+    PKG_CHECK_MODULES([XWAYLAND_TEST], xcb xcb-dri2 libdrm)
+  fi
 fi
 
 
@@ -76,7 +93,7 @@ if test x$enable_x11_compositor = xyes; then
   LIBS=$xcb_save_LIBS
   CFLAGS=$xcb_save_CFLAGS
 
-  X11_COMPOSITOR_MODULES="x11 x11-xcb"
+  X11_COMPOSITOR_MODULES="x11 x11-xcb xcb-shm"
 
   PKG_CHECK_MODULES(X11_COMPOSITOR_XKB, [xcb-xkb],
                    [have_xcb_xkb="yes"], [have_xcb_xkb="no"])
@@ -142,6 +159,23 @@ fi
 AM_CONDITIONAL(INSTALL_RPI_COMPOSITOR, test "x$have_bcm_host" = "xyes")
 
 
+AC_ARG_ENABLE([fbdev-compositor], [  --enable-fbdev-compositor],,
+              enable_fbdev_compositor=yes)
+AM_CONDITIONAL([ENABLE_FBDEV_COMPOSITOR],
+               [test x$enable_fbdev_compositor = xyes])
+AS_IF([test x$enable_fbdev_compositor = xyes], [
+  AC_DEFINE([BUILD_FBDEV_COMPOSITOR], [1], [Build the fbdev compositor])
+  PKG_CHECK_MODULES([FBDEV_COMPOSITOR], [libudev >= 136 mtdev >= 1.1.0])
+])
+
+AC_ARG_ENABLE([rdp-compositor], [  --enable-rdp-compositor],,
+              enable_rdp_compositor=no)
+AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
+               [test x$enable_rdp_compositor = xyes])
+if test x$enable_rdp_compositor = xyes; then
+  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
+fi
+
 AC_ARG_WITH(cairo-glesv2,
             AS_HELP_STRING([--with-cairo-glesv2],
                            [Use GLESv2 cairo instead of full GL]))
@@ -202,6 +236,7 @@ if test x$enable_clients = xyes; then
   AS_IF([test "x$have_cairo_egl" = "xyes"],
         [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
         [AC_MSG_WARN([clients will use cairo image, cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])
+  PKG_CHECK_MODULES(PANGO, [pangocairo], [have_pango=yes], [have_pango=no])
 fi
 
 AC_ARG_ENABLE(weston-launch, [  --enable-weston-launch],, enable_weston_launch=yes)
@@ -220,17 +255,22 @@ if test x$enable_weston_launch == xyes; then
   WESTON_LAUNCH_LIBS="$WESTON_LAUNCH_LIBS -lpam"
 fi
 
-AM_CONDITIONAL(HAVE_GLU, test "x$have_glu" = "xyes" -a "$xenable_egl" = "xyes")
 if test x$enable_egl = xyes; then
   PKG_CHECK_MODULES(GLU, [glu], [have_glu=yes], [have_glu=no])
 fi
+AM_CONDITIONAL(HAVE_GLU, test "x$have_glu" = "xyes")
 
 
 AM_CONDITIONAL(HAVE_POPPLER, test "x$have_poppler" = "xyes")
 
+AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
+
 AM_CONDITIONAL(BUILD_FULL_GL_CLIENTS,
               test x$cairo_modules = "xcairo-gl" -a "x$have_cairo_egl" = "xyes" -a "x$enable_egl" = "xyes")
 
+AM_CONDITIONAL(BUILD_SUBSURFACES_CLIENT,
+              [test '(' "x$have_cairo_egl" != "xyes" -o "x$cairo_modules" = "xcairo-glesv2" ')' -a "x$enable_simple_egl_clients" = "xyes"])
+
 AM_CONDITIONAL(ENABLE_DESKTOP_SHELL, true)
 
 AC_ARG_ENABLE(tablet-shell,
@@ -240,6 +280,16 @@ AC_ARG_ENABLE(tablet-shell,
 AM_CONDITIONAL(ENABLE_TABLET_SHELL,
               test "x$enable_tablet_shell" = "xyes")
 
+# CMS modules
+AC_ARG_ENABLE(colord,
+              AS_HELP_STRING([--disable-colord],
+                             [do not build colord CMS support]),,
+             enable_colord=yes)
+AM_CONDITIONAL(ENABLE_COLORD,
+              test "x$enable_colord" = "xyes")
+if test x$enable_colord = xyes; then
+  PKG_CHECK_MODULES(COLORD, colord >= 0.1.8)
+fi
 
 AC_ARG_ENABLE(wcap-tools, [  --disable-wcap-tools],, enable_wcap_tools=yes)
 AM_CONDITIONAL(BUILD_WCAP_TOOLS, test x$enable_wcap_tools = xyes)
@@ -262,6 +312,15 @@ if test "x$GCC" = "xyes"; then
 fi
 AC_SUBST(GCC_CFLAGS)
 
+AC_ARG_ENABLE(libunwind, AS_HELP_STRING([  --disable-libunwind],
+                                        [Disable libunwind usage for backtraces]),,
+              enable_libunwind=yes)
+if test "x$enable_libunwind" = xyes; then
+    PKG_CHECK_MODULES(LIBUNWIND, libunwind)
+    AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
+fi
+AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$enable_libunwind" = xyes])
+
 if test "x$WESTON_NATIVE_BACKEND" = "x"; then
        WESTON_NATIVE_BACKEND="drm-backend.so"
 fi
@@ -269,12 +328,21 @@ AC_MSG_NOTICE([Weston's native backend: $WESTON_NATIVE_BACKEND])
 AC_DEFINE_UNQUOTED([WESTON_NATIVE_BACKEND], ["$WESTON_NATIVE_BACKEND"],
                   [The default backend to load, if not wayland nor x11.])
 
+PKG_CHECK_MODULES(LCMS, lcms2,
+                  [have_lcms=yes], [have_lcms=no])
+if test "x$have_lcms" = xyes; then
+       AC_DEFINE(HAVE_LCMS, 1, [Have lcms support])
+fi
+AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
+
 WAYLAND_SCANNER_RULES(['$(top_srcdir)/protocol'])
 
 AC_CONFIG_FILES([Makefile
                 shared/Makefile
                 src/Makefile
                 src/xwayland/Makefile
+                src/version.h
+                src/weston.pc
                 clients/Makefile
                 wcap/Makefile
                 data/Makefile