AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS= -I m4
-SUBDIRS = dist doc include samples scripts src tests
+SUBDIRS = dist doc include samples scripts src
+if WITH_TESTS
+SUBDIRS += tests
+endif
EXTRA_DIST = README_daemon libcgroup.doxyfile README_systemd
fi
], [])
+AC_ARG_ENABLE([tests],
+ [AS_HELP_STRING([--enable-tests],[compile libcgroup tests [default=yes]])],
+ [
+ if test "x$enableval" == xno; then
+ with_tests=false
+ else
+ with_tests=true
+ fi
+ ],
+ [with_tests=true])
+AM_CONDITIONAL([WITH_TESTS], [test x$with_tests = xtrue])
+
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AX_CODE_COVERAGE
AC_CONFIG_FILES([Makefile
- tests/Makefile
- tests/ftests/Makefile
- tests/gunit/Makefile
- tests/tools/testenv.sh
- tests/tools/Makefile
- tests/tools/cgconfigparser/Makefile
- tests/tools/cgclassify/Makefile
- tests/tools/multimount/Makefile
- tests/runlibcgrouptest.sh
src/Makefile
src/daemon/Makefile
src/tools/Makefile
dist/Makefile
libcgroup.pc])
AC_CONFIG_FILES([dist/libcgroup.spec:dist/libcgroup.spec.in])
+AM_COND_IF([WITH_TESTS],
+ [AC_CONFIG_FILES([tests/Makefile
+ tests/ftests/Makefile
+ tests/gunit/Makefile
+ tests/tools/testenv.sh
+ tests/tools/Makefile
+ tests/tools/cgconfigparser/Makefile
+ tests/tools/cgclassify/Makefile
+ tests/tools/multimount/Makefile
+ tests/runlibcgrouptest.sh])])
CFLAGS="$CFLAGS -Wall"
AC_OUTPUT