summaryrefslogtreecommitdiff
path: root/tz-launcher/configure.ac
blob: 002bf690f05f7de7058c6795e5bb4d0c4d8e790f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
m4_define([tz-launcher_version], 0.1)

AC_PREREQ([2.64])
AC_INIT([tz-launcher],
        [tz-launcher_version],
        [https://bugs.tizen.org/],
        [tz-launcher],
        [http://www.tizen.org/])

AC_SUBST([TZLAUNCHER_VERSION], [tz-launcher_version])

AC_CONFIG_AUX_DIR([build-aux])

AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE

AM_INIT_AUTOMAKE([1.11 parallel-tests foreign no-dist-gzip dist-xz color-tests subdir-objects])

AM_SILENT_RULES([yes])

# Check for programs
AC_PROG_CC
AC_PROG_SED

# Initialize libtool
LT_PREREQ([2.2])
LT_INIT([disable-static])

PKG_PROG_PKG_CONFIG()

AC_CHECK_FUNC([dlopen], [],
              AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
AC_SUBST(DLOPEN_LIBS)

AC_CHECK_DECL(TFD_CLOEXEC,[],
	      [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile weston")],
	      [[#include <sys/timerfd.h>]])
AC_CHECK_DECL(CLOCK_MONOTONIC,[],
	      [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")],
	      [[#include <time.h>]])
AC_CHECK_HEADERS([execinfo.h])

AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])

AC_ARG_ENABLE(egl, [  --disable-egl],,
              enable_egl=yes)
AM_CONDITIONAL(ENABLE_EGL, test x$enable_egl = xyes)
if test x$enable_egl = xyes; then
	AC_DEFINE([ENABLE_EGL], [1], [Build with EGL support])
	PKG_CHECK_MODULES(EGL, [egl >= 7.10 glesv2])
fi

AC_ARG_WITH(cairo,
	    AS_HELP_STRING([--with-cairo=@<:@image|glesv2@:>@]
			   [Which Cairo renderer to use for the clients]),
			   [],[with_cairo="image"])

if test "x$with_cairo" = "ximage"; then
	cairo_modules="cairo"
else
if test "x$with_cairo" = "xglesv2"; then
	cairo_modules="cairo-glesv2"
else
	AC_ERROR([Unknown cairo renderer requested])
fi
fi

# Included for legacy compat
AC_ARG_WITH(cairo-glesv2,
            AS_HELP_STRING([--with-cairo-glesv2],
                           [Use GLESv2 cairo]))
if test "x$with_cairo_glesv2" = "xyes"; then
  cairo_modules="cairo-glesv2"
  with_cairo="glesv2"
fi

if test "x$cairo_modules" = "xcairo-glesv2"; then
AC_DEFINE([USE_CAIRO_GLESV2], [1], [Use the GLESv2 GL cairo backend])
fi

PKG_CHECK_MODULES(PIXMAN, [pixman-1])
PKG_CHECK_MODULES(PNG, [libpng])

AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes)
if test x$have_jpeglib = xyes; then
  JPEG_LIBS="-ljpeg"
else
  AC_ERROR([libjpeg not found])
fi
AC_SUBST(JPEG_LIBS)

PKG_CHECK_MODULES(GLIB, [glib-2.0 gio-2.0])

PKG_CHECK_MODULES(CLIENT, [wayland-client cairo >= 1.10.0 xkbcommon wayland-cursor])

  # Only check for cairo-egl if a GL or GLES renderer requested
  AS_IF([test "x$cairo_modules" = "xcairo-glesv2"], [
    PKG_CHECK_MODULES(CAIRO_EGL, [wayland-egl egl >= 7.10 cairo-egl >= 1.11.3 $cairo_modules],
                      [have_cairo_egl=yes], [have_cairo_egl=no])
    AS_IF([test "x$have_cairo_egl" = "xyes"],
	  [AC_DEFINE([HAVE_CAIRO_EGL], [1], [Have cairo-egl])],
	  [AC_ERROR([cairo-egl not used because $CAIRO_EGL_PKG_ERRORS])])],
  [have_cairo_egl=no])

AM_CONDITIONAL(HAVE_CAIRO_GLESV2,
	       [test "x$have_cairo_egl" = "xyes" -a "x$cairo_modules" = "xcairo-glesv2" -a "x$enable_egl" = "xyes"])

AC_CONFIG_FILES([Makefile])

AC_OUTPUT

AC_MSG_RESULT([
	libxkbcommon			${enable_xkbcommon}
])