summaryrefslogtreecommitdiff
path: root/configure.ac
blob: cc5dc27c27adf40aedc8ad56d6677f85dc52c62b (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
AC_PREREQ([2.64])

m4_define([wayland_extension_major_version], [1])
m4_define([wayland_extension_minor_version], [0])
m4_define([wayland_extension_micro_version], [0])
m4_define([wayland_extension_version],
          [wayland_extension_major_version.wayland_extension_minor_version.wayland_extension_micro_version])

AC_INIT([wayland-extension],
        [wayland_extension_version],
        [https://bugs.tizen.org/jira],
        [wayland-extension])

AC_SUBST([WAYLAND_EXTENSION_VERSION_MAJOR], [wayland_extension_major_version])
AC_SUBST([WAYLAND_EXTENSION_VERSION_MINOR], [wayland_extension_minor_version])
AC_SUBST([WAYLAND_EXTENSION_VERSION_MICRO], [wayland_extension_micro_version])
AC_SUBST([WAYLAND_EXTENSION_VERSION], [wayland_extension_version])

AC_CONFIG_HEADERS([config.h])
#AC_CONFIG_MACRO_DIR([m4])

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

AM_SILENT_RULES([yes])

# Check for programs
AC_PROG_CC
AC_PROG_CXX
#AC_PROG_GREP
AC_PATH_PROG([wayland_scanner], [wayland-scanner])
if test x$wayland_scanner = x; then
   AC_MSG_ERROR([wayland-scanner is needed to compile])
fi
AC_PATH_PROG([cp], [cp])
if test x$cp = x; then
   AC_MSG_ERROR([cp is needed to compile])
fi
AC_PATH_PROG([perl], [perl])
if test x$perl = x; then
   AC_MSG_ERROR([perl is needed to compile])
fi

# Initialize libtool
LT_PREREQ([2.2])
LT_INIT

PKG_PROG_PKG_CONFIG()

PKG_CHECK_MODULES(WAYLAND_SERVER, wayland-server >= 1.7.0)
AC_SUBST(WAYLAND_SERVER_CFLAGS)
AC_SUBST(WAYLAND_SERVER_LIBS)

PKG_CHECK_MODULES(WAYLAND_CLIENT, wayland-client >= 1.7.0)
AC_SUBST(WAYLAND_CLIENT_CFLAGS)
AC_SUBST(WAYLAND_CLIENT_LIBS)

PKG_CHECK_MODULES(WAYLAND_SCANNER, wayland-scanner >= 1.7.0)

AC_CONFIG_FILES([
	Makefile
	src/wayland-extension-version.h
	src/template-server.pc
	src/template-client.pc
	src/tizen-remote-surface-server.pc
	src/tizen-remote-surface-client.pc
])
AC_OUTPUT