diff options
author | Thomas Graf <tgraf@suug.ch> | 2013-04-27 12:27:10 (GMT) |
---|---|---|
committer | Thomas Graf <tgraf@suug.ch> | 2013-04-27 12:27:10 (GMT) |
commit | ead4cdeb99029c6cf3bf85811c3ea32346b41b03 (patch) | |
tree | 308ddc21671ad480b62424d3d88c34959bb974ec /configure.ac | |
parent | d505165f2b958d35581d75113f78ad4131a16468 (diff) | |
download | libnl-ead4cdeb99029c6cf3bf85811c3ea32346b41b03.zip libnl-ead4cdeb99029c6cf3bf85811c3ea32346b41b03.tar.gz libnl-ead4cdeb99029c6cf3bf85811c3ea32346b41b03.tar.bz2 |
tests: Make unit test building optional
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 9a7fd65..8c5ff1c 100644 --- a/configure.ac +++ b/configure.ac @@ -75,7 +75,12 @@ AC_CHECK_PROGS(YACC, 'bison -y') AC_C_CONST AC_C_INLINE -PKG_CHECK_MODULES([CHECK], [check >= 0.9.0]) +PKG_CHECK_MODULES([CHECK], [check >= 0.9.0], + [AC_DEFINE([ENABLE_UNIT_TESTS], [1], [Do unit tests])], + [AC_MSG_WARN([*** Disabling building of unit tests]) + AC_DEFINE([ENABLE_UNIT_TESTS], [0], [Do not do unit tests])]) + +AM_CONDITIONAL([ENABLE_UNIT_TESTS], [test "x$ENABLE_UNIT_TESTS" = "xyes"]) AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH], [Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]), |