Commit 525421c9 by Stéphane Graber

Make building the API tests/examples optional

Add a new --enable-tests option to configure which is used to optionally build the tests/examples. Default is off. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 5ea6163a
...@@ -83,6 +83,12 @@ AM_COND_IF([ENABLE_PYTHON], ...@@ -83,6 +83,12 @@ AM_COND_IF([ENABLE_PYTHON],
AC_CHECK_HEADER([python$PYTHON_VERSION/Python.h],[],[AC_MSG_ERROR([You must install python3-dev])]) AC_CHECK_HEADER([python$PYTHON_VERSION/Python.h],[],[AC_MSG_ERROR([You must install python3-dev])])
AC_DEFINE_UNQUOTED([ENABLE_PYTHON], 1, [Python3 is available])]) AC_DEFINE_UNQUOTED([ENABLE_PYTHON], 1, [Python3 is available])])
AC_ARG_ENABLE([tests],
[AC_HELP_STRING([--enable-tests], [build test/example binaries])],
[enable_tests=yes], [enable_tests=no])
AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = "xyes"])
AS_AC_EXPAND(PREFIX, $prefix) AS_AC_EXPAND(PREFIX, $prefix)
AS_AC_EXPAND(LIBDIR, $libdir) AS_AC_EXPAND(LIBDIR, $libdir)
AS_AC_EXPAND(BINDIR, $bindir) AS_AC_EXPAND(BINDIR, $bindir)
......
if ENABLE_TESTS
LDADD = ../lxc/liblxc.so -lrt LDADD = ../lxc/liblxc.so -lrt
containertests_SOURCES = containertests.c containertests_SOURCES = containertests.c
locktests_SOURCES = locktests.c locktests_SOURCES = locktests.c
...@@ -15,3 +17,5 @@ AM_CFLAGS=-I$(top_srcdir)/src \ ...@@ -15,3 +17,5 @@ AM_CFLAGS=-I$(top_srcdir)/src \
-DLXCINITDIR=\"$(LXCINITDIR)\" -DLXCINITDIR=\"$(LXCINITDIR)\"
bin_PROGRAMS = containertests locktests startone destroytest saveconfig createtest shutdowntest get_item getkeys bin_PROGRAMS = containertests locktests startone destroytest saveconfig createtest shutdowntest get_item getkeys
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment