Changeset 55


Ignore:
Timestamp:
Nov 17, 2009 9:44:22 AM (10 years ago)
Author:
awalther
Message:

extended configure.ac with patch for cygwin libtool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r52 r55  
    44#
    55# Copyright (C) Andrea Walther, Andreas Kowarz
     6#               
     7# contains patches from the COIN OR libtool
    68#
    79##############################################################################
    810define([ADOLC_VER], [2])
    9 define([ADOLC_SUB], [0])
    10 define([ADOLC_LVL], [0])
     11define([ADOLC_SUB], [1])
     12define([ADOLC_LVL], [1])
    1113
    1214AC_PREREQ(2.57)
     
    227229             AC_SUBST(ac_adolc_cxxflags)
    228230             AC_MSG_RESULT($ac_adolc_cxxflags)])
     231
     232###########################################################################
     233#                      COIN_PATCH_LIBTOOL_CYGWIN                          #
     234###########################################################################
     235
     236# Patches to libtool for cygwin. Lots for cl, a few for GCC.
     237# For cl:
     238# - cygpath is not correctly quoted in fix_srcfile_path
     239# - paths generated for .lib files is not run through cygpath -w
     240
     241
     242AC_DEFUN([AC_COIN_PATCH_LIBTOOL_CYGWIN],
     243[ case "$CXX" in
     244    cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
     245      AC_MSG_NOTICE(Applying patches to libtool for cl compiler)
     246      sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
     247          -e 's|fix_srcfile_path=\"\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
     248          -e 's%compile_deplibs=\"\$dir/\$old_library \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$old_library | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
     249          -e 's%compile_deplibs=\"\$dir/\$linklib \$compile_deplibs\"%compile_deplibs="'\`"$CYGPATH_W"' \$dir/\$linklib | sed -e '"'"'sY\\\\\\\\Y/Yg'"'"\`' \$compile_deplibs\"'% \
     250          -e 's%lib /OUT:%lib -OUT:%' \
     251          -e "s%cygpath -w%$CYGPATH_W%" \
     252          -e 's%$AR x \\$f_ex_an_ar_oldlib%bla=\\`lib -nologo -list \\$f_ex_an_ar_oldlib | xargs echo '"$mydos2unix"'\\`; echo \\$bla; for i in \\$bla; do lib -nologo -extract:\\$i \\$f_ex_an_ar_oldlib; done%' \
     253          -e 's/$AR t/lib -nologo -list/' \
     254          -e 's%f_ex_an_ar_oldlib="\($?*1*\)"%f_ex_an_ar_oldlib='\`"$CYGPATH_W"' \1`%' \
     255          -e 's%^archive_cmds=.*%archive_cmds="\\$CC -o \\$lib \\$libobjs \\$compiler_flags \\\\\\`echo \\\\\\"\\$deplibs\\\\\\" | \\$SED -e '"\'"'s/ -lc\\$//'"\'"'\\\\\\` -link -dll~linknames="%' \
     256          -e 's%old_archive_cmds="lib -OUT:\\$oldlib\\$oldobjs\\$old_deplibs"%old_archive_cmds="if test -r \\$oldlib; then bla=\\"\\$oldlib\\"; else bla=; fi; lib -OUT:\\$oldlib \\\\\\$bla\\$oldobjs\\$old_deplibs"%' \
     257      libtool > conftest.bla
     258
     259      mv conftest.bla libtool
     260      chmod 755 libtool
     261      ;;
     262    *)
     263      AC_MSG_NOTICE(Applying patches to libtool for GNU compiler)
     264      sed -e 's|fix_srcfile_path=\"`cygpath -w \"\$srcfile\"`\"|fix_srcfile_path=\"\\\`'"$CYGPATH_W"' \\\"\\$srcfile\\\"\\\`\"|' \
     265          -e 's|"lib /OUT:\\$oldlib\\$oldobjs\\$old_deplibs"|"\\$AR \\$AR_FLAGS \\$oldlib\\$oldobjs\\$old_deplibs~\\$RANLIB \\$oldlib"|' \
     266          -e 's|libext="lib"|libext="a"|' \
     267      libtool > conftest.bla
     268
     269      mv conftest.bla libtool
     270      chmod 755 libtool
     271      ;;
     272  esac ]) # COIN_PATCH_LIBTOOL_CYGWIN
     273
    229274
    230275# output
     
    258303AC_OUTPUT
    259304
     305
    260306# echo configuration
    261307echo \
Note: See TracChangeset for help on using the changeset viewer.