Ticket #2918: 2918_cygwin_muldefs.diff

File 2918_cygwin_muldefs.diff, 2.0 KB (added by andrew_b, 12 years ago)
  • configure.ac

    diff --git a/configure.ac b/configure.ac
    index 7cd7d18..cdeca77 100644
    a b fi 
    472472CFLAGS="$mc_configured_cflags $CFLAGS_OPTS $CFLAGS" 
    473473 
    474474MC_UNIT_TESTS 
     475AC_SUBST(TESTS_LDFLAGS) 
    475476 
    476477AC_SUBST(CFLAGS) 
    477478AC_SUBST(CPPFLAGS) 
  • m4.include/mc-tests.m4

    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],[ 
    2222            [AC_MSG_WARN(['Check' utility not found. Check your environment])]) 
    2323    fi 
    2424    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 
    2535]) 
  • tests/lib/mcconfig/Makefile.am

    diff --git a/tests/lib/mcconfig/Makefile.am b/tests/lib/mcconfig/Makefile.am
    index c706003..ea86a53 100644
    a b  
    11AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ \ 
    22        -DWORKDIR=\"$(abs_builddir)\" 
    33 
    4 AM_LDFLAGS = -Wl,-z,muldefs 
     4AM_LDFLAGS = @TESTS_LDFLAGS@ 
    55 
    66LIBS=@CHECK_LIBS@  $(top_builddir)/lib/libmc.la 
    77 
  • tests/lib/vfs/Makefile.am

    diff --git a/tests/lib/vfs/Makefile.am b/tests/lib/vfs/Makefile.am
    index 4114e70..cf9dc6a 100644
    a b  
    11AM_CFLAGS = -I$(top_srcdir)/lib/vfs $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ \ 
    22        -DTEST_SHARE_DIR=\"$(abs_srcdir)\" 
    33 
    4 AM_LDFLAGS = -Wl,-z,muldefs 
     4AM_LDFLAGS = @TESTS_LDFLAGS@ 
    55 
    66EXTRA_DIST = mc.charsets 
    77 
  • tests/src/filemanager/Makefile.am

    diff --git a/tests/src/filemanager/Makefile.am b/tests/src/filemanager/Makefile.am
    index eda2934..4601933 100644
    a b  
    11AM_CFLAGS = -I$(top_srcdir)/lib/vfs $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ 
    22 
    3 AM_LDFLAGS = -Wl,-z,muldefs 
     3AM_LDFLAGS = @TESTS_LDFLAGS@ 
    44 
    55LIBS=@CHECK_LIBS@  \ 
    66    $(top_builddir)/lib/libmc.la