[libnotify] build: Allow not to build tests
- From: Marc-Antoine Perennou <marcop src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libnotify] build: Allow not to build tests
- Date: Tue, 14 Jun 2016 14:08:46 +0000 (UTC)
commit da7a6a229b81501a15795d8766731b8523770959
Author: Quentin Glidic <sardemff7+git sardemff7 net>
Date: Thu Nov 19 10:09:52 2015 +0100
build: Allow not to build tests
https://bugzilla.gnome.org/show_bug.cgi?id=634790
Signed-off-by: Quentin Glidic <sardemff7+git sardemff7 net>
Makefile.am | 5 ++++-
configure.ac | 10 +++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 9e12a02..3a28de2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,9 @@
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-SUBDIRS = libnotify docs tools tests
+SUBDIRS = libnotify docs tools
+if TESTS_ENABLED
+SUBDIRS += tests
+endif
pcdata_DATA = libnotify.pc
pcdatadir = $(libdir)/pkgconfig
diff --git a/configure.ac b/configure.ac
index dcc1667..632e80d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,7 +94,14 @@ AC_SUBST([pkg_modules])
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
tests_modules="gtk+-3.0 >= $REQ_GTK_VERSION"
-PKG_CHECK_MODULES(TESTS, [$tests_modules])
+AC_ARG_ENABLE(tests,
+ [AS_HELP_STRING([--disable-tests],
+ [Do not build tests])],
+ ,enable_tests=yes)
+if test x$enable_tests = xyes ; then
+ PKG_CHECK_MODULES(TESTS, [$tests_modules])
+fi
+AM_CONDITIONAL(TESTS_ENABLED, test x$enable_tests = xyes)
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
@@ -210,6 +217,7 @@ echo "
source code location: ${srcdir}
cflags: ${CFLAGS}
+ Build tests: ${enable_tests}
Build docs: ${enable_docbook_docs}
"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]