This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathconfigure.ac
195 lines (167 loc) · 4.76 KB
/
configure.ac
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
AC_PREREQ([2.64])
AC_INIT([wayland-fits],
[0.2.0],
[https://github.com/01org/wayland-fits/issues],
[wayland-fits],
[https://github.com/01org/wayland-fits])
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
# check for compilers
AC_PROG_CXX
AC_PROG_CC
# Initialize libtool
LT_PREREQ([2.2])
LT_INIT
LDFLAGS="-Wl,--no-as-needed $LDFLAGS"
# Required minimum versions for dependencies
m4_define([check_req_version], [0.9.8])
m4_define([wayland_req_version], [1.3.0])
m4_define([weston_req_version], [1.3.0])
m4_define([efl_req_version], [1.7.6])
m4_define([gtk_req_version], [3.8.0])
m4_define([boost_req_version], [1.49.0])
AX_BOOST_BASE([boost_req_version],
[
AX_BOOST_FILESYSTEM
AX_BOOST_REGEX
AX_BOOST_SYSTEM
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_THREAD
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_FILESYSTEM_LIB $BOOST_REGEX_LIB $BOOST_SYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB"
AC_SUBST(BOOST_LIBS)
],
[
AC_MSG_ERROR([
Boost libraries are required:
boost_filesystem >= boost_req_version
boost_regex >= boost_req_version
boost_system >= boost_req_version
boost_program_options >= boost_req_version
boost_thread >= boost_req_version
])
]
)
PKG_CHECK_MODULES([CHECK], [check >= check_req_version])
PKG_CHECK_MODULES([WAYLAND],
[
wayland-client >= wayland_req_version
wayland-egl >= wayland_req_version
wayland-cursor >= wayland_req_version
]
)
PKG_CHECK_MODULES(WAYLAND_SERVER, [wayland-server >= wayland_req_version])
PKG_CHECK_MODULES([XKBCOMMON], xkbcommon)
AC_PATH_PROG([wayland_scanner], [wayland-scanner], [AC_MSG_ERROR("wayland-scanner is needed to compile extensions")])
have_weston="no"
want_weston_extensions="auto"
AC_ARG_ENABLE([weston-extensions],
[AC_HELP_STRING([--disable-weston-extensions], [disable Weston extension support. @<:@default=detect@:>@])],
[want_weston_extensions=$enableval], [])
if test "x$want_weston_extensions" != "xno"; then
PKG_CHECK_MODULES([WESTON],
[
weston >= weston_req_version
pixman-1
],
[
AC_DEFINE(HAVE_WESTON, 1, [Support for Weston extensions])
have_weston="yes"
],
[have_weston="no"]
)
PKG_CHECK_MODULES([X11],
[xcb x11],
[
WESTON_LIBS="$WESTON_LIBS $X11_LIBS"
WESTON_CFLAGS="$WESTON_CFLAGS $X11_CFLAGS"
AC_DEFINE(HAVE_X11_SUPPORT, 1, [Support for Weston x11-backend])
],
[]
)
else
have_weston="no"
fi
if test "x$want_weston_extensions" = "xyes" -a "x$have_weston" = "xno"; then
AC_MSG_ERROR([
weston extension support requested, but one of the following dependency requirements were not met:
weston >= weston_req_version
pixman
])
fi
AM_CONDITIONAL([BUILD_WESTON_EXTENSIONS], [test x${have_weston} = xyes])
have_efl="no"
want_efl_tests="auto"
AC_ARG_ENABLE([efl-tests],
[AC_HELP_STRING([--disable-efl-tests], [disable EFL/ELM Tests. @<:@default=detect@:>@])],
[want_efl_tests=$enableval], [])
if test "x$want_efl_tests" != "xno"; then
PKG_CHECK_MODULES([EFL],
[
elementary >= efl_req_version
ecore-wayland >= efl_req_version
evas-wayland-egl >= efl_req_version
evas-wayland-shm >= efl_req_version
],
[
AC_DEFINE(HAVE_EFL, 1, [Support for EFL/ELM Testing])
AC_DEFINE_UNQUOTED(
[EFL_VERSION_MICRO],
[$(pkg-config --modversion eina | cut -d. -f3)],
[EFL does not define this; so we will]
)
have_efl="yes"
],
[have_efl="no"]
)
else
have_efl="no"
fi
if test "x$want_efl_tests" = "xyes" -a "x$have_efl" = "xno"; then
AC_MSG_ERROR([
EFL/ELM tests requested, but one of the following dependency requirements were not met:
elementary >= efl_req_version
ecore-wayland >= efl_req_version
evas-wayland-egl >= efl_req_version
evas-wayland-shm >= efl_req_version
])
fi
AM_CONDITIONAL([BUILD_EFL_TESTS], [test x$have_efl = xyes])
have_gtk="no"
want_gtk_tests="auto"
AC_ARG_ENABLE([gtk-tests],
[AC_HELP_STRING([--disable-gtk-tests], [disable GTK+ Tests. @<:@default=detect@:>@])],
[want_gtk_tests=$enableval], [])
if test "x$want_gtk_tests" != "xno"; then
PKG_CHECK_MODULES([GTK],
[
gtk+-wayland-3.0 >= gtk_req_version
gdk-wayland-3.0 >= gtk_req_version
],
[
AC_DEFINE(HAVE_GTK, 1, [Support for GTK+ Tests])
have_gtk="yes"
],
[have_gtk="no"]
)
else
have_gtk="no"
fi
if test "x$want_gtk_tests" = "xyes" -a "x$have_gtk" = "xno"; then
AC_MSG_ERROR([
GTK+ tests requested, but one of the following dependency requirements were not met:
gtk+-wayland-3.0 >= gtk_req_version
gdk-wayland-3.0 >= gtk_req_version
])
fi
AM_CONDITIONAL([BUILD_GTK_TESTS], [test x$have_gtk = xyes])
AC_CONFIG_FILES([Makefile
src/Makefile
src/test/Makefile
src/test/core/Makefile
src/test/efl/Makefile
src/test/gtk+/Makefile
src/extensions/Makefile
src/extensions/weston/Makefile
src/extensions/protocol/Makefile])
AC_OUTPUT