summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2017-09-16 12:48:09 +0200
committerDavid Tardon <dtardon@redhat.com>2017-09-16 13:12:23 +0200
commit118208d2a248b7df576fb51c86848a61d05976e2 (patch)
tree3df97539c72df29289dce6911244cec495f235a9 /configure.ac
parentec97e9a9fe40887b800eccf4191e70771e0882bf (diff)
add unit test for the internal stream
Change-Id: Iedf880acedbad9d42f4926c71360f21f02e34e3c
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e1ff29e..a111f44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -287,6 +287,21 @@ AS_IF([test "x$enable_debug" = "xyes"], [
])
AC_SUBST(DEBUG_CXXFLAGS)
+# ==========
+# Unit tests
+# ==========
+AC_ARG_ENABLE([tests],
+ [AS_HELP_STRING([--enable-tests], [Build and run unit tests])],
+ [enable_tests="$enableval"],
+ [enable_tests=yes]
+)
+AS_IF([test "x$enable_tests" = "xyes"], [
+ PKG_CHECK_MODULES([CPPUNIT], [cppunit])
+], [])
+AC_SUBST([CPPUNIT_CFLAGS])
+AC_SUBST([CPPUNIT_LIBS])
+AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_tests" = "xyes"])
+
# =============
# Documentation
# =============
@@ -321,6 +336,7 @@ src/conv/text/fh2text.rc
src/fuzz/Makefile
src/lib/Makefile
src/lib/libfreehand.rc
+src/test/Makefile
inc/Makefile
inc/libfreehand/Makefile
build/Makefile
@@ -340,6 +356,7 @@ Build configuration:
debug: ${enable_debug}
docs: ${build_docs}
fuzzers: ${enable_fuzzers}
+ tests: ${enable_tests}
tools: ${enable_tools}
werror: ${enable_werror}
==============================================================================