summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>2016-02-07 21:30:44 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2016-02-07 21:30:44 +0100
commit13431c9e425d93f61a7fc16f99f8d8c6e71ed82b (patch)
tree83e24a763115e0cee07a1c7205e182068e88ba78
parentc933df45a873e566c6ce4e5de5f829e64eb892f5 (diff)
Enable building of unit tests without building tools
Change-Id: I43fe1ace56c61f36d4dd0dedcf3f5438ee8c0b91
-rw-r--r--configure.ac48
1 files changed, 27 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index 3b6edc7..a11115b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,19 +111,40 @@ AC_ARG_ENABLE([tools],
[enable_tools="$enableval"],
[enable_tools=yes]
)
+
+# ==========
+# 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_tools" = "xyes" -o "x$enable_tests" = "xyes"], [
+ PKG_CHECK_MODULES([REVENGE_STREAM],[
+ librevenge-stream-0.0
+ ])
+])
+AC_SUBST([REVENGE_STREAM_CFLAGS])
+AC_SUBST([REVENGE_STREAM_LIBS])
+
+AS_IF([test "x$enable_tests" = "xyes"], [
+ PKG_CHECK_MODULES([CPPUNIT], [cppunit])
+], [])
+AC_SUBST([CPPUNIT_CFLAGS])
+AC_SUBST([CPPUNIT_LIBS])
+
AS_IF([test "x$enable_tools" = "xyes"], [
PKG_CHECK_MODULES([REVENGE_GENERATORS],[
librevenge-generators-0.0
])
- PKG_CHECK_MODULES([REVENGE_STREAM],[
- librevenge-stream-0.0
- ])
])
AC_SUBST([REVENGE_GENERATORS_CFLAGS])
AC_SUBST([REVENGE_GENERATORS_LIBS])
-AC_SUBST([REVENGE_STREAM_CFLAGS])
-AC_SUBST([REVENGE_STREAM_LIBS])
-AM_CONDITIONAL(BUILD_TOOLS, [test "x$enable_tools" = "xyes"])
+
+AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
+AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = "xyes"])
# =================================
# Libtool/Version Makefile settings
@@ -295,21 +316,6 @@ 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([ENABLE_TESTS], [test "x$enable_tests" = "xyes"])
-
# =============
# Documentation
# =============