Changeset 1909


Ignore:
Timestamp:
Dec 4, 2010 2:30:32 PM (9 years ago)
Author:
stefan
Message:

adjust CFLAGS,LIBS,DATA_INSTALLED for (i)cl, so we could use them to build examples with cygwin/cl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r1900 r1909  
    37743774    if test "$CYGPATH_W" != "echo" ; then
    37753775      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
    3776           [cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
    3777         fi
     3776      [cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
     3777    fi
    37783778    m4_toupper($1)[]_CFLAGS="$cflags"
    37793779    m4_toupper($1)[]_LIBS=`$PKG_CONFIG --libs "$2" 2>/dev/null`
     
    42194219        [pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`]
    42204220        eval `sh -c "$pcifilemod"`
     4221        if test "${CYGPATH_W}" != "echo"; then
     4222          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
     4223        fi
    42214224        m4_toupper($1_DATA_INSTALLED)="$projdatadir"
    42224225      fi
     
    42624265
    42634266    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    4264     projcflags=[`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
     4267    if test "${CYGPATH_W}" != "echo"; then
     4268      projcflags=[`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
     4269    fi
    42654270    m4_toupper($1_CFLAGS)="$projcflags $m4_toupper($1_CFLAGS)"
    42664271
     
    43034308
    43044309    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    4305     projcflags=[`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
     4310    if test "${CYGPATH_W}" != "echo"; then
     4311      projcflags=[`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
     4312    fi
    43064313    m4_toupper($1_CFLAGS_INSTALLED)="$projcflags $m4_toupper($1_CFLAGS_INSTALLED)"
    43074314
    43084315    # set LIBS variable
    43094316    m4_toupper($1_LIBS_INSTALLED)="$projlibs $m4_toupper($1_LIBS_INSTALLED)"
    4310 
     4317   
    43114318    # remember that we have processed $pcfile
    43124319    pcfilesprocessed="$pcfilesprocessed:$pcfile"
     
    43204327  AC_MSG_RESULT([yes])
    43214328  AC_DEFINE(m4_toupper(COIN_HAS_$1),[1],[Define to 1 if the $1 package is available])
     4329
     4330  # adjust linker flags for (i)cl compiler
     4331  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
     4332  then
     4333    m4_toupper($1_LIBS_INSTALLED)=`echo " $m4_toupper($1_LIBS_INSTALLED)" | [sed -e 's/ -L\([^ ]*\)/ \/libpath:\`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g']`
     4334  fi
    43224335
    43234336  coin_foreach_w([myvar], [$3], [
Note: See TracChangeset for help on using the changeset viewer.