1 m4_define([wlmessage_version], 0.1)
6 [https://bugs.tizen.org/],
8 [http://www.tizen.org/])
10 AC_SUBST([WLMESSAGE_VERSION], [wlmessage_version])
12 AC_CONFIG_AUX_DIR([build-aux])
14 AC_USE_SYSTEM_EXTENSIONS
17 AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests subdir-objects])
19 AM_SILENT_RULES([yes])
27 LT_INIT([disable-static])
31 AC_CHECK_FUNC([dlopen], [],
32 AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
35 AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
37 AC_ARG_ENABLE(x11, [ --enable-x11],,
39 AM_CONDITIONAL(ENABLE_X11, test x$enable_x11 = xyes)
40 if test x$enable_x11 = xyes; then
41 platform_libs="$platform_libs x11 xt xaw7"
44 AC_ARG_ENABLE(wayland, [ --enable-wayland],,
46 AM_CONDITIONAL(ENABLE_WAYLAND, test x$enable_wayland = xyes)
47 if test x$enable_wayland = xyes; then
48 platform_libs="$platform_libs wayland-client wayland-cursor xkbcommon"
51 AC_ARG_ENABLE(xdg-shell,
52 AS_HELP_STRING([--enable-xdg-shell],
53 [build with XDG-Shell support (Weston 1.5.0)]),
54 [],[enable_xdg_shell=no])
55 AM_CONDITIONAL(ENABLE_XDG_SHELL, test x$enable_xdg_shell = xyes)
56 if test x$enable_xdg_shell = xyes; then
57 AC_DEFINE([ENABLE_XDG_SHELL], [1], [Build with XDG-Shell support])
61 AS_HELP_STRING([--disable-egl],
62 [do not build with EGL support]),
64 AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes)
65 if test x$enable_egl = xyes; then
66 AC_DEFINE([ENABLE_EGL], [1], [Build with EGL support])
67 PKG_CHECK_MODULES(EGL, [egl >= 7.10 glesv2])
71 AS_HELP_STRING([--with-cairo=@<:@image|glesv2@:>@]
72 [which Cairo renderer to use for the clients]),
73 [],[with_cairo="image"])
75 if test "x$with_cairo" = "ximage"; then
78 if test "x$with_cairo" = "xglesv2"; then
79 cairo_modules="cairo-glesv2"
81 AC_ERROR([Unknown cairo renderer requested])
85 # Included for legacy compat
86 AC_ARG_WITH(cairo-glesv2,
87 AS_HELP_STRING([--with-cairo-glesv2],
89 if test "x$with_cairo_glesv2" = "xyes"; then
90 cairo_modules="cairo-glesv2"
94 if test "x$cairo_modules" = "xcairo-glesv2"; then
95 AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend])
98 if test x$enable_wayland = xyes && test x$enable_egl = xyes; then
99 cairo_modules="$cairo_modules wayland-egl"
102 PKG_CHECK_MODULES(PIXMAN, [pixman-1])
103 PKG_CHECK_MODULES(PNG, [libpng])
105 AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes)
106 if test x$have_jpeglib = xyes; then
109 AC_ERROR([libjpeg not found])
113 PKG_CHECK_MODULES(GLIB, [glib-2.0 gio-2.0])
115 PKG_CHECK_MODULES(CLIENT, [$platform_libs cairo >= 1.10.0])
117 # Only check for cairo-egl if a GL or GLES renderer requested
118 AS_IF([test "x$cairo_modules" = "xcairo-glesv2"], [
119 PKG_CHECK_MODULES(CAIRO_EGL, [egl >= 7.10 cairo-egl >= 1.11.3 $cairo_modules],
120 [have_cairo_egl=yes], [have_cairo_egl=no])
121 AS_IF([test "x$have_cairo_egl" = "xyes"],
122 [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
123 [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
126 AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
127 [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])
129 AC_CONFIG_FILES([Makefile libwlmessage.pc])
134 libxkbcommon ${enable_xkbcommon}