Changeset 199


Ignore:
Timestamp:
Dec 21, 2006 12:10:40 AM (13 years ago)
Author:
andreasw
Message:

corrected libtool fixes on Cygwin - was screwed up after re-use changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r198 r199  
    10131013      *-cygwin* | *-mingw*)
    10141014        case $F77 in
    1015           ifort* | */ifort*)
     1015          ifort* | */ifort* | IFORT* | */IFORT* )
    10161016            coin_opt_fflags='-O3'
    10171017            coin_add_fflags='-nologo -MT'
     
    11611161   *-cygwin* | *-mingw*)
    11621162     case "$F77" in
    1163        ifort* | */ifort*)
     1163       ifort* | */ifort* | IFORT* | */IFORT* )
    11641164           FLIBS="-link libifcorert.lib $LIBS /NODEFAULTLIB:libc.lib";;
    11651165     esac;;
     
    15951595[AC_REQUIRE([AC_COIN_DLFCN_H])
    15961596
    1597 # NEW: If libtool exists in the directory higher up, we use that one
    1598 #      instead of creating a new one
    1599 
    1600 if test "x$LIBTOOL" = x; then
    1601   # We check for this header here in a non-standard way to avoid warning
    1602   # messages
    1603   AC_PROG_LIBTOOL
     1597# We check for this header here in a non-standard way to avoid warning
     1598# messages
     1599AC_PROG_LIBTOOL
    16041600
    16051601# Fix bugs in libtool script for Windows native compilation:
     
    16071603# - paths generated for .lib files is not run through cygpath -w
    16081604
    1609 
    1610 # - lib includes subdirectory information; we want to replace
    1611 #
    1612 # old_archive_cmds="lib /OUT:\$oldlib\$oldobjs\$old_deplibs"
    1613 #
    1614 # by
    1615 #
    1616 # old_archive_cmds="echo \$oldlib | grep .libs >/dev/null; if test \$? = 0; then cd .libs; lib /OUT:\`echo \$oldlib\$oldobjs\$old_deplibs | sed -e s@\.libs/@@g\`; cd .. ; else lib /OUT:\$oldlib\$oldobjs\$old_deplibs ; fi"
    1617 #
    1618 #          -e 's%old_archive_cmds="lib /OUT:\\\$oldlib\\\$oldobjs\\\$old_deplibs"%old_archive_cmds="echo \\\$oldlib \| grep .libs >/dev/null; if test \\\$? = 0; then cd .libs; lib /OUT:\\\`echo \\\$oldlib\\\$oldobjs\\\$old_deplibs \| sed -e s@\\.libs/@@g\\\`; cd .. ; else lib /OUT:\\\$oldlib\\\$oldobjs\\\$old_deplibs; fi"%' \
    1619 
    1620 # The following was a hack for chaniing @BACKSLASH to \
    1621 #          -e 'sYcompile_command=`\$echo "X\$compile_command" | \$Xsed -e '"'"'s%@OUTPUT@%'"'"'"\$output"'"'"'%g'"'"'`Ycompile_command=`\$echo "X\$compile_command" | \$Xsed -e '"'"'s%@OUTPUT@%'"'"'"\$output"'"'"'%g'"'"' | \$Xsed -e '"'"'s%@BACKSLASH@%\\\\\\\\\\\\\\\\%g'"'"'`Y' \
    1622 
    1623   # Correct cygpath for minGW (ToDo!)
    1624   case $build in
    1625     *-mingw*)
    1626       CYGPATH_W=echo
     1605# Correct cygpath for minGW (ToDo!)
     1606case $build in
     1607  *-mingw*)
     1608    CYGPATH_W=echo
     1609    ;;
     1610esac
     1611
     1612case $build in
     1613  *-cygwin* | *-mingw*)
     1614  case "$CXX" in
     1615    cl* | */cl* | CL* | */CL*)
     1616      AC_MSG_NOTICE(Applying patches to libtool for cl compiler)
     1617      sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
     1618          -e 's|fix_srcfile_path=\"\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
     1619          -e 's%compile_deplibs=\"\$dir/\$old_library \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$old_library | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
     1620          -e 's%compile_deplibs=\"\$dir/\$linklib \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$linklib | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
     1621          -e 's%lib /OUT:%lib -OUT:%' \
     1622          -e "s%cygpath -w%$CYGPATH_W%" \
     1623          -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\`lib -nologo -list \\$f_ex_an_ar_oldlib | xargs echo\\`; echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$f_ex_an_ar_oldlib; done%' \
     1624          -e 's/$AR t/lib -nologo -list/' \
     1625          -e 's%f_ex_an_ar_oldlib="\($?*1*\)"%f_ex_an_ar_oldlib='\`"$CYGPATH_W"' \1`%' \
     1626          -e  's%^archive_cmds=.*%archive_cmds="\\$CC -o \\$lib \\$libobjs \\$compiler_flags \\\\\\`echo \\\\\\"\\$deplibs\\\\\\" | \\$SED -e '"\'"'s/ -lc\\$//'"\'"'\\\\\\` -link -dll~linknames="%' \
     1627      libtool > conftest.bla
     1628
     1629      mv conftest.bla libtool
     1630      chmod 755 libtool
     1631      ;;
     1632    *)
     1633      AC_MSG_NOTICE(Applying patches to libtool for GNU compiler)
     1634      sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
     1635          -e 's|"lib /OUT:\\$oldlib\\$oldobjs\\$old_deplibs"|"\\$AR \\$AR_FLAGS \\$oldlib\\$oldobjs\\$old_deplibs~\\$RANLIB \\$oldlib"|' \
     1636          -e 's|libext="lib"|libext="a"|' \
     1637      libtool > conftest.bla
     1638
     1639      mv conftest.bla libtool
     1640      chmod 755 libtool
    16271641      ;;
    16281642  esac
    1629 
    1630   case $build in
    1631     *-cygwin* | *-mingw*)
    1632     case "$CXX" in
    1633       cl* | */cl* | CL* | */CL*)
    1634         AC_MSG_NOTICE(Applying patches to libtool for cl compiler)
    1635         sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
    1636             -e 's|fix_srcfile_path=\"\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
    1637             -e 's%compile_deplibs=\"\$dir/\$old_library \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$old_library | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
    1638             -e 's%compile_deplibs=\"\$dir/\$linklib \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$linklib | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
    1639             -e 's%lib /OUT:%lib -OUT:%' \
    1640             -e "s%cygpath -w%$CYGPATH_W%" \
    1641             -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\`lib -nologo -list \\$f_ex_an_ar_oldlib | xargs echo\\`; echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$f_ex_an_ar_oldlib; done%' \
    1642             -e 's/$AR t/lib -nologo -list/' \
    1643             -e 's%f_ex_an_ar_oldlib="\($?*1*\)"%f_ex_an_ar_oldlib='\`"$CYGPATH_W"' \1`%' \
    1644             -e  's%^archive_cmds=.*%archive_cmds="\\$CC -o \\$lib \\$libobjs \\$compiler_flags \\\\\\`echo \\\\\\"\\$deplibs\\\\\\" | \\$SED -e '"\'"'s/ -lc\\$//'"\'"'\\\\\\` -link -dll~linknames="%' \
    1645         libtool > conftest.bla
    1646 
    1647         mv conftest.bla libtool
    1648         chmod 755 libtool
    1649         ;;
    1650       *)
    1651         AC_MSG_NOTICE(Applying patches to libtool for GNU compiler)
    1652         sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
    1653             -e 's|"lib /OUT:\\$oldlib\\$oldobjs\\$old_deplibs"|"\\$AR \\$AR_FLAGS \\$oldlib\\$oldobjs\\$old_deplibs~\\$RANLIB \\$oldlib"|' \
    1654             -e 's|libext="lib"|libext="a"|' \
    1655         libtool > conftest.bla
    1656 
    1657         mv conftest.bla libtool
    1658         chmod 755 libtool
    1659         ;;
    1660     esac
    1661   esac
    1662 fi
    1663 
     1643esac
    16641644]) # AC_COIN_PROG_LIBTOOL
    16651645
Note: See TracChangeset for help on using the changeset viewer.