mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
0eae2cb8dc
Macros get from other projects keep their original names: gl_FSTYPENAME, AX_PATH_LIB_PCRE, etc. Macros initially writtem for MC have original names with prefix mc_: mc_VERSION, mc_CHECK_GLIB, etc Macros get from other projects and modified for MC keep their original names with prefix mc_: mc_cu_PREREQ_STAT_PROG, mc_AC_GET_FS_INFO. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
40 lines
1010 B
Plaintext
40 lines
1010 B
Plaintext
dnl @synopsis mc_UNIT_TESTS
|
|
dnl
|
|
dnl Check if unit tests enabled
|
|
dnl
|
|
dnl @author Slava Zanko <slavazanko@gmail.com>
|
|
dnl @version 2011-02-10
|
|
dnl @license GPL
|
|
dnl @copyright Free Software Foundation, Inc.
|
|
|
|
AC_DEFUN([mc_UNIT_TESTS],[
|
|
|
|
AC_ARG_ENABLE(
|
|
[tests],
|
|
AS_HELP_STRING([--enable-tests], [Enable unit tests (see http://check.sourceforge.net/)])
|
|
)
|
|
|
|
if test x$enable_tests != xno; then
|
|
PKG_CHECK_MODULES(
|
|
CHECK,
|
|
[check >= 0.9.8],
|
|
[have_check=yes],
|
|
[AC_MSG_WARN(['Check' utility not found. Check your environment])])
|
|
AC_SUBST(CHECK_CFLAGS)
|
|
AC_SUBST(CHECK_LIBS)
|
|
fi
|
|
AM_CONDITIONAL(HAVE_TESTS, test x"$have_check" = "xyes")
|
|
|
|
# on cygwin, the linker does not accept the "-z" option
|
|
case $host_os in
|
|
cygwin*)
|
|
TESTS_LDFLAGS="-Wl,--allow-multiple-definition"
|
|
;;
|
|
*)
|
|
TESTS_LDFLAGS="-Wl,-z,muldefs"
|
|
;;
|
|
esac
|
|
|
|
AC_SUBST(TESTS_LDFLAGS)
|
|
])
|