diff options
-rw-r--r-- | server/Makefile.in | 7 | ||||
-rw-r--r-- | server/conf_macros.m4 | 17 | ||||
-rw-r--r-- | server/configure.ac | 4 | ||||
-rw-r--r-- | sssd.spec | 3 |
4 files changed, 26 insertions, 5 deletions
diff --git a/server/Makefile.in b/server/Makefile.in index dd64b7ee..7a576e4a 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 2c182cc1..a65b5130 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 d59d6fe2..1a40e2be 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) @@ -24,8 +24,6 @@ BuildRequires: libtdb-devel BuildRequires: libldb-devel BuildRequires: dbus-devel BuildRequires: dbus-libs -BuildRequires: check -BuildRequires: check-devel %description Provides a set of daemons to manage access to remote directories and @@ -44,6 +42,7 @@ cd server ./autogen.sh %configure --prefix=%{_usr} \ --sysconfdir=%{_sysconfdir} \ + --without-tests \ --without-policykit \ --with-infopipe |