mirror of https://github.com/neutrinolabs/xrdp
Merge pull request #1860 from metalefty/check
Relax dependency checking on check and miscellaneous fixes for pkg-config usage
This commit is contained in:
commit
5bb9d982ea
|
@ -1,7 +1,8 @@
|
|||
ACLOCAL_AMFLAGS = -I m4
|
||||
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--without-systemdsystemunitdir \
|
||||
--enable-strict-locations
|
||||
--enable-strict-locations \
|
||||
--enable-tests
|
||||
|
||||
EXTRA_DIST = \
|
||||
COPYING \
|
||||
|
|
27
configure.ac
27
configure.ac
|
@ -65,6 +65,10 @@ if test "x$with_systemdsystemunitdir" != xno; then
|
|||
fi
|
||||
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
|
||||
|
||||
AC_ARG_ENABLE(tests,
|
||||
AC_HELP_STRING([--enable-tests],
|
||||
[Ensure dependencies for the tests are installed]),
|
||||
[ensure_tests_deps=yes], [])
|
||||
AC_ARG_ENABLE(pam, AS_HELP_STRING([--enable-pam],
|
||||
[Build PAM support (default: yes)]),
|
||||
[], [enable_pam=yes])
|
||||
|
@ -357,10 +361,23 @@ AC_CHECK_HEADER([X11/extensions/Xrandr.h], [],
|
|||
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
# checking for libcheck (used for unit testing)
|
||||
PKG_CHECK_MODULES([CHECK], [check >= 0.10.0])
|
||||
AC_CHECK_HEADER([check.h], [],
|
||||
[AC_MSG_ERROR([please install check])])
|
||||
# perform unit tests if libcheck found
|
||||
if test "x$ensure_tests_deps" == "xyes"; then
|
||||
PKG_CHECK_MODULES([CHECK], [check >= 0.10.0],
|
||||
[perform_unit_tests=yes],
|
||||
[AC_MSG_ERROR([please install check, the unit test framework])])
|
||||
else
|
||||
PKG_CHECK_MODULES([CHECK], [check >= 0.10.0],
|
||||
[perform_unit_tests=yes],
|
||||
[perform_unit_tests=no])
|
||||
fi
|
||||
|
||||
if test "x$perform_unit_tests" == "xyes"; then
|
||||
AC_MSG_NOTICE([libcheck found, unit tests will be performed])
|
||||
else
|
||||
AC_MSG_NOTICE([libcheck not found, unit tests will be skipped])
|
||||
fi
|
||||
# -- end perform unit tests
|
||||
|
||||
AC_SUBST([moduledir], '${libdir}/xrdp')
|
||||
|
||||
|
@ -444,6 +461,8 @@ echo " libdir $libdir"
|
|||
echo " bindir $bindir"
|
||||
echo " sysconfdir $sysconfdir"
|
||||
echo ""
|
||||
echo " unit tests performable $perform_unit_tests"
|
||||
echo ""
|
||||
echo " CFLAGS = $CFLAGS"
|
||||
echo " LDFLAGS = $LDFLAGS"
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@ test_common_SOURCES = \
|
|||
test_common_main.c \
|
||||
test_string_calls.c
|
||||
|
||||
test_common_CFLAGS = \
|
||||
@CHECK_CFLAGS@
|
||||
|
||||
test_common_LDADD = \
|
||||
$(top_builddir)/common/libcommon.la \
|
||||
@CHECK_LIBS@
|
||||
|
|
|
@ -6,9 +6,6 @@ if XRDP_DEBUG
|
|||
AM_CPPFLAGS += -DXRDP_DEBUG
|
||||
endif
|
||||
|
||||
noinst_PROGRAMS = \
|
||||
memtest
|
||||
|
||||
check_PROGRAMS = \
|
||||
memtest
|
||||
|
||||
|
|
Loading…
Reference in New Issue