mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Make explicit flag for enabling/disabling libcheck usage.
Automagic detection is frowned upon: https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies
This commit is contained in:
parent
8be234121a
commit
5d41d228f0
2 changed files with 15 additions and 6 deletions
|
@ -227,7 +227,7 @@ check_PROGRAMS=\
|
||||||
box_test\
|
box_test\
|
||||||
scrollbar_test
|
scrollbar_test
|
||||||
|
|
||||||
if HAVE_CHECK
|
if USE_CHECK
|
||||||
check_PROGRAMS+=mode_test theme_parser_test
|
check_PROGRAMS+=mode_test theme_parser_test
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ textbox_test_SOURCES=\
|
||||||
include/helper-theme.h\
|
include/helper-theme.h\
|
||||||
test/textbox-test.c
|
test/textbox-test.c
|
||||||
|
|
||||||
if HAVE_CHECK
|
if USE_CHECK
|
||||||
theme_parser_test_CFLAGS=${helper_test_CFLAGS} $(check_CFLAGS)
|
theme_parser_test_CFLAGS=${helper_test_CFLAGS} $(check_CFLAGS)
|
||||||
theme_parser_test_LDADD=${helper_test_LDADD} $(check_LIBS)
|
theme_parser_test_LDADD=${helper_test_LDADD} $(check_LIBS)
|
||||||
theme_parser_test_SOURCES=\
|
theme_parser_test_SOURCES=\
|
||||||
|
@ -457,7 +457,7 @@ helper_config_cmdline_parser_SOURCES=\
|
||||||
test/helper-config-cmdline-parser.c
|
test/helper-config-cmdline-parser.c
|
||||||
|
|
||||||
|
|
||||||
if HAVE_CHECK
|
if USE_CHECK
|
||||||
mode_test_CFLAGS=$(textbox_test_CFLAGS) $(check_CFLAGS)
|
mode_test_CFLAGS=$(textbox_test_CFLAGS) $(check_CFLAGS)
|
||||||
mode_test_LDADD=$(textbox_test_LDADD) $(check_LIBS)
|
mode_test_LDADD=$(textbox_test_LDADD) $(check_LIBS)
|
||||||
mode_test_SOURCES=\
|
mode_test_SOURCES=\
|
||||||
|
@ -484,7 +484,7 @@ TESTS=\
|
||||||
box_test\
|
box_test\
|
||||||
scrollbar_test
|
scrollbar_test
|
||||||
|
|
||||||
if HAVE_CHECK
|
if USE_CHECK
|
||||||
TESTS+=theme_parser_test\
|
TESTS+=theme_parser_test\
|
||||||
mode_test
|
mode_test
|
||||||
endif
|
endif
|
||||||
|
|
13
configure.ac
13
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([pango], [pango pangocairo])
|
||||||
PKG_CHECK_MODULES([cairo], [cairo cairo-xcb])
|
PKG_CHECK_MODULES([cairo], [cairo cairo-xcb])
|
||||||
PKG_CHECK_MODULES([libsn], [libstartup-notification-1.0 ])
|
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 ---------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------
|
||||||
|
@ -158,6 +162,11 @@ echo "Code Coverage Enabled"
|
||||||
else
|
else
|
||||||
echo "Code Coverage Disabled"
|
echo "Code Coverage Disabled"
|
||||||
fi
|
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 "-------------------------------------"
|
||||||
echo "Now type 'make' to build"
|
echo "Now type 'make' to build"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
Loading…
Reference in a new issue