From 96f72fd795180846831d22ef261ccacfbfbcf25b Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Mon, 2 Mar 2009 15:56:27 +0100 Subject: Make tests configurable --- server/Makefile.in | 7 +++++-- server/conf_macros.m4 | 17 +++++++++++++++++ server/configure.ac | 4 +++- 3 files changed, 25 insertions(+), 3 deletions(-) (limited to 'server') diff --git a/server/Makefile.in b/server/Makefile.in index dd64b7eeb..7a576e4a1 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -83,6 +83,7 @@ MDLD_FLAGS = @MDLD_FLAGS@ HAVE_INFOPIPE = @HAVE_INFOPIPE@ HAVE_POLICYKIT = @HAVE_POLICYKIT@ +HAVE_TESTS = @HAVE_TESTS@ MEMBEROF_SOBASE=memberof.$(SHLIBEXT) MEMBEROF_SONAME=$(MEMBEROF_SOBASE).0 @@ -118,8 +119,10 @@ ifneq (x$(HAVE_POLICYKIT), x) endif BINS = sbin/sssd $(LIBEXECBINS) -TESTS = tests/sysdb-tests tests/infopipe-tests -TESTS_DATA = tests/tests.ldb tests/tests_conf.ldb tests/introspect.ref +ifneq (x$(HAVE_TESTS), x) + TESTS = tests/sysdb-tests tests/infopipe-tests + TESTS_DATA = tests/tests.ldb tests/tests_conf.ldb tests/introspect.ref +endif SOLIBS = lib/$(PROXY_BE_SOLIB) lib/$(LDAP_BE_SOLIB) LDBLIBS = lib/$(MEMBEROF_SOLIB) diff --git a/server/conf_macros.m4 b/server/conf_macros.m4 index 2c182cc11..a65b5130c 100644 --- a/server/conf_macros.m4 +++ b/server/conf_macros.m4 @@ -90,3 +90,20 @@ AC_DEFUN(WITH_INFOPIPE, fi ]) +AC_DEFUN(WITH_TESTS, + [ AC_ARG_WITH([tests], + [AC_HELP_STRING([--with-tests], + [Whether to build tests [no]] + ) + ], + [], + with_tests=no + ) + + if test x"$with_tests" == xyes; then + AC_DEFINE(HAVE_TESTS, 1, [Build tests]) + HAVE_TESTS=1 + AC_SUBST(HAVE_TESTS) + fi + ]) + diff --git a/server/configure.ac b/server/configure.ac index d59d6fe24..1a40e2be7 100644 --- a/server/configure.ac +++ b/server/configure.ac @@ -55,7 +55,9 @@ m4_include(ldap.m4) m4_include(util/signal.m4) PKG_CHECK_MODULES([DBUS],[dbus-1]) -PKG_CHECK_MODULES([CHECK],[check]) +if test xHAVE_TESTS != x; then + PKG_CHECK_MODULES([CHECK],[check]) +fi PKG_CHECK_MODULES([NSS],[nss]) AC_SUBST(TESTS) -- cgit