summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am8
-rw-r--r--configure.ac13
2 files changed, 15 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index 3fd8bb98..38b6b80f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -227,7 +227,7 @@ check_PROGRAMS=\
box_test\
scrollbar_test
-if HAVE_CHECK
+if USE_CHECK
check_PROGRAMS+=mode_test theme_parser_test
endif
@@ -366,7 +366,7 @@ textbox_test_SOURCES=\
include/helper-theme.h\
test/textbox-test.c
-if HAVE_CHECK
+if USE_CHECK
theme_parser_test_CFLAGS=${helper_test_CFLAGS} $(check_CFLAGS)
theme_parser_test_LDADD=${helper_test_LDADD} $(check_LIBS)
theme_parser_test_SOURCES=\
@@ -457,7 +457,7 @@ helper_config_cmdline_parser_SOURCES=\
test/helper-config-cmdline-parser.c
-if HAVE_CHECK
+if USE_CHECK
mode_test_CFLAGS=$(textbox_test_CFLAGS) $(check_CFLAGS)
mode_test_LDADD=$(textbox_test_LDADD) $(check_LIBS)
mode_test_SOURCES=\
@@ -484,7 +484,7 @@ TESTS=\
box_test\
scrollbar_test
-if HAVE_CHECK
+if USE_CHECK
TESTS+=theme_parser_test\
mode_test
endif
diff --git a/configure.ac b/configure.ac
index ca473401..2798bb06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,8 +119,12 @@ GW_CHECK_XCB([xcb-aux xcb-xkb xkbcommon >= 0.5.0 xkbcommon-x11 xcb-ewmh xcb-iccc
PKG_CHECK_MODULES([pango], [pango pangocairo])
PKG_CHECK_MODULES([cairo], [cairo cairo-xcb])
PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0 ])
-PKG_CHECK_MODULES([check], [check >= 0.11.0], [HAVE_CHECK=1], [HAVE_CHECK=0])
-AM_CONDITIONAL([HAVE_CHECK], [test "$HAVE_CHECK" -eq 1])
+
+AC_ARG_ENABLE([check], AS_HELP_STRING([--disable-check], [Build with checks using check library (default: enabled)]))
+
+AS_IF([test "x${enable_check}" != "xno"], [ PKG_CHECK_MODULES([check],[check >= 0.11.0], [HAVE_CHECK=1]) ])
+AM_CONDITIONAL([USE_CHECK], [test "x${enable_check}" != "xno" && test "$HAVE_CHECK" -eq 1])
+
dnl ---------------------------------------------------------------------
@@ -158,6 +162,11 @@ echo "Code Coverage Enabled"
else
echo "Code Coverage Disabled"
fi
+if test "x${enable_check}" != "xno" && test "$HAVE_CHECK" -eq 1; then
+echo "Check based tests Enabled"
+else
+echo "Check based tests Disabled"
+fi
echo "-------------------------------------"
echo "Now type 'make' to build"
echo ""