harfbuzz: bump version to 1.4.5
[buildroot-gz.git] / package / wayland / 0002-configure-add-option-to-disable-tests.patch
blob8c67d9a3bcaa6a1cf75b969d55927fb4c1de1425
1 From 33b025e04bf3fa94b74ea3325b3fd7c3f546bcb1 Mon Sep 17 00:00:00 2001
2 From: "Yann E. MORIN" <yann.morin.1998@free.fr>
3 Date: Sun, 5 Mar 2017 10:06:02 +0100
4 Subject: [PATCH] configure: add option to disable tests
6 When building for a product, tests are not needed.
8 Besides, one test requires a C++ compiler, which is not always
9 available.
11 So, add an option to configure to disable building tests altogether.
13 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
14 ---
15 Patch submitted upstream:
16 https://lists.freedesktop.org/archives/wayland-devel/2017-March/033359.html
17 ---
18 Makefile.am | 3 ++-
19 configure.ac | 8 ++++++++
20 2 files changed, 10 insertions(+), 1 deletion(-)
22 diff --git a/Makefile.am b/Makefile.am
23 index d0c8bd3..9c2541d 100644
24 --- a/Makefile.am
25 +++ b/Makefile.am
26 @@ -143,7 +143,7 @@ libwayland_cursor_la_CFLAGS = \
27 -I$(top_srcdir)/src \
28 -DICONDIR=\"$(ICONDIR)\"
31 +if ENABLE_TESTS
32 built_test_programs = \
33 array-test \
34 client-test \
35 @@ -258,6 +258,7 @@ os_wrappers_test_LDADD = libtest-runner.la
37 exec_fd_leak_checker_SOURCES = tests/exec-fd-leak-checker.c
38 exec_fd_leak_checker_LDADD = libtest-runner.la
39 +endif
41 EXTRA_DIST += tests/scanner-test.sh \
42 tests/data/example.xml \
43 diff --git a/configure.ac b/configure.ac
44 index b583bef..96a5575 100644
45 --- a/configure.ac
46 +++ b/configure.ac
47 @@ -87,10 +87,18 @@ AC_ARG_ENABLE([dtd-validation],
48 [],
49 [enable_dtd_validation=yes])
51 +AC_ARG_ENABLE([tests],
52 + [AC_HELP_STRING([--disable-tests],
53 + [Disable compilation of test programs])],
54 + [],
55 + [enable_tests=yes])
57 AM_CONDITIONAL(USE_HOST_SCANNER, test "x$with_host_scanner" = xyes)
59 AM_CONDITIONAL(ENABLE_LIBRARIES, test "x$enable_libraries" = xyes)
61 +AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "yes")
63 AC_ARG_WITH(icondir, [ --with-icondir=<dir> Look for cursor icons here],
64 [ ICONDIR=$withval],
65 [ ICONDIR=${datadir}/icons])
66 --
67 2.7.4