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
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
AM_DISTCHECK_CONFIGURE_FLAGS = \
|
||||||
--without-systemdsystemunitdir \
|
--without-systemdsystemunitdir \
|
||||||
--enable-strict-locations
|
--enable-strict-locations \
|
||||||
|
--enable-tests
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
COPYING \
|
COPYING \
|
||||||
|
27
configure.ac
27
configure.ac
@ -65,6 +65,10 @@ if test "x$with_systemdsystemunitdir" != xno; then
|
|||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
|
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],
|
AC_ARG_ENABLE(pam, AS_HELP_STRING([--enable-pam],
|
||||||
[Build PAM support (default: yes)]),
|
[Build PAM support (default: yes)]),
|
||||||
[], [enable_pam=yes])
|
[], [enable_pam=yes])
|
||||||
@ -357,10 +361,23 @@ AC_CHECK_HEADER([X11/extensions/Xrandr.h], [],
|
|||||||
|
|
||||||
CFLAGS="$save_CFLAGS"
|
CFLAGS="$save_CFLAGS"
|
||||||
|
|
||||||
# checking for libcheck (used for unit testing)
|
# perform unit tests if libcheck found
|
||||||
PKG_CHECK_MODULES([CHECK], [check >= 0.10.0])
|
if test "x$ensure_tests_deps" == "xyes"; then
|
||||||
AC_CHECK_HEADER([check.h], [],
|
PKG_CHECK_MODULES([CHECK], [check >= 0.10.0],
|
||||||
[AC_MSG_ERROR([please install check])])
|
[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')
|
AC_SUBST([moduledir], '${libdir}/xrdp')
|
||||||
|
|
||||||
@ -444,6 +461,8 @@ echo " libdir $libdir"
|
|||||||
echo " bindir $bindir"
|
echo " bindir $bindir"
|
||||||
echo " sysconfdir $sysconfdir"
|
echo " sysconfdir $sysconfdir"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo " unit tests performable $perform_unit_tests"
|
||||||
|
echo ""
|
||||||
echo " CFLAGS = $CFLAGS"
|
echo " CFLAGS = $CFLAGS"
|
||||||
echo " LDFLAGS = $LDFLAGS"
|
echo " LDFLAGS = $LDFLAGS"
|
||||||
|
|
||||||
|
@ -18,6 +18,9 @@ test_common_SOURCES = \
|
|||||||
test_common_main.c \
|
test_common_main.c \
|
||||||
test_string_calls.c
|
test_string_calls.c
|
||||||
|
|
||||||
|
test_common_CFLAGS = \
|
||||||
|
@CHECK_CFLAGS@
|
||||||
|
|
||||||
test_common_LDADD = \
|
test_common_LDADD = \
|
||||||
$(top_builddir)/common/libcommon.la \
|
$(top_builddir)/common/libcommon.la \
|
||||||
@CHECK_LIBS@
|
@CHECK_LIBS@
|
||||||
|
@ -6,9 +6,6 @@ if XRDP_DEBUG
|
|||||||
AM_CPPFLAGS += -DXRDP_DEBUG
|
AM_CPPFLAGS += -DXRDP_DEBUG
|
||||||
endif
|
endif
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
|
||||||
memtest
|
|
||||||
|
|
||||||
check_PROGRAMS = \
|
check_PROGRAMS = \
|
||||||
memtest
|
memtest
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user