diff --git a/configure.ac b/configure.ac
index 7cd7d18..cdeca77 100644
a
|
b
|
fi |
472 | 472 | CFLAGS="$mc_configured_cflags $CFLAGS_OPTS $CFLAGS" |
473 | 473 | |
474 | 474 | MC_UNIT_TESTS |
| 475 | AC_SUBST(TESTS_LDFLAGS) |
475 | 476 | |
476 | 477 | AC_SUBST(CFLAGS) |
477 | 478 | AC_SUBST(CPPFLAGS) |
diff --git a/m4.include/mc-tests.m4 b/m4.include/mc-tests.m4
index 6aedd4b..5dceeef 100644
a
|
b
|
AC_DEFUN([MC_UNIT_TESTS],[ |
22 | 22 | [AC_MSG_WARN(['Check' utility not found. Check your environment])]) |
23 | 23 | fi |
24 | 24 | AM_CONDITIONAL(HAVE_TESTS, test x"$have_check" = "xyes") |
| 25 | |
| 26 | # on cygwin, the linker does not accept the "-z" option |
| 27 | case $host_os in |
| 28 | cygwin*) |
| 29 | TESTS_LDFLAGS="-Wl,--allow-multiple-definition" |
| 30 | ;; |
| 31 | *) |
| 32 | TESTS_LDFLAGS="-Wl,-z,muldefs" |
| 33 | ;; |
| 34 | esac |
25 | 35 | ]) |
diff --git a/tests/lib/mcconfig/Makefile.am b/tests/lib/mcconfig/Makefile.am
index c706003..ea86a53 100644
a
|
b
|
|
1 | 1 | AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ \ |
2 | 2 | -DWORKDIR=\"$(abs_builddir)\" |
3 | 3 | |
4 | | AM_LDFLAGS = -Wl,-z,muldefs |
| 4 | AM_LDFLAGS = @TESTS_LDFLAGS@ |
5 | 5 | |
6 | 6 | LIBS=@CHECK_LIBS@ $(top_builddir)/lib/libmc.la |
7 | 7 | |
diff --git a/tests/lib/vfs/Makefile.am b/tests/lib/vfs/Makefile.am
index 4114e70..cf9dc6a 100644
a
|
b
|
|
1 | 1 | AM_CFLAGS = -I$(top_srcdir)/lib/vfs $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ \ |
2 | 2 | -DTEST_SHARE_DIR=\"$(abs_srcdir)\" |
3 | 3 | |
4 | | AM_LDFLAGS = -Wl,-z,muldefs |
| 4 | AM_LDFLAGS = @TESTS_LDFLAGS@ |
5 | 5 | |
6 | 6 | EXTRA_DIST = mc.charsets |
7 | 7 | |
diff --git a/tests/src/filemanager/Makefile.am b/tests/src/filemanager/Makefile.am
index eda2934..4601933 100644
a
|
b
|
|
1 | 1 | AM_CFLAGS = -I$(top_srcdir)/lib/vfs $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ |
2 | 2 | |
3 | | AM_LDFLAGS = -Wl,-z,muldefs |
| 3 | AM_LDFLAGS = @TESTS_LDFLAGS@ |
4 | 4 | |
5 | 5 | LIBS=@CHECK_LIBS@ \ |
6 | 6 | $(top_builddir)/lib/libmc.la |