0001-configure.ac-add-enable-tests.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From 1b6eaf5589a14763452cbe53382cc699cdeca141 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Fri, 15 Nov 2019 11:36:14 +0100
  4. Subject: [PATCH] configure.ac: add --enable-tests
  5. Allow the user to disable tests through --disable-tests, this is
  6. especially useful for example to disable gdk-pixbuf dependency
  7. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  8. [Upstream status:
  9. https://gitlab.freedesktop.org/spice/spice-common/merge_requests/6]
  10. ---
  11. Makefile.am | 6 +++++-
  12. configure.ac | 7 +++++++
  13. 2 files changed, 12 insertions(+), 1 deletion(-)
  14. diff --git a/subprojects/spice-common/Makefile.am b/subprojects/spice-common/Makefile.am
  15. index 5402499..00623a1 100644
  16. --- a/subprojects/spice-common/Makefile.am
  17. +++ b/subprojects/spice-common/Makefile.am
  18. @@ -1,7 +1,11 @@
  19. NULL =
  20. ACLOCAL_AMFLAGS = -I m4
  21. -SUBDIRS = python_modules common tests docs
  22. +SUBDIRS = python_modules common docs
  23. +
  24. +if ENABLE_TESTS
  25. +SUBDIRS += tests
  26. +endif
  27. EXTRA_DIST = \
  28. meson.build \
  29. diff --git a/subprojects/spice-common/configure.ac b/subprojects/spice-common/configure.ac
  30. index 9d10287..2dba7c8 100644
  31. --- a/subprojects/spice-common/configure.ac
  32. +++ b/subprojects/spice-common/configure.ac
  33. @@ -33,6 +33,13 @@ AC_SEARCH_LIBS(regcomp, [regex rx])
  34. SPICE_CHECK_SYSDEPS
  35. SPICE_EXTRA_CHECKS
  36. +AC_ARG_ENABLE([tests],
  37. + AS_HELP_STRING([--enable-tests],
  38. + [Enable tests @<:@default=yes@:>@]),
  39. + [],
  40. + enable_tests="yes")
  41. +AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes")
  42. +
  43. AC_ARG_ENABLE([alignment-checks],
  44. AS_HELP_STRING([--enable-alignment-checks],
  45. [Enable runtime checks for cast alignment @<:@default=no@:>@]),
  46. --
  47. 2.23.0