Changeset 1645 for trunk/Clp


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

get examples working for cygwin/cl without pkg-config

Location:
trunk/Clp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/configure

    r1644 r1645  
    2082220822    if test "$CYGPATH_W" != "echo" ; then
    2082320823      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
    20824           cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
    20825         fi
     20824      cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     20825    fi
    2082620826    COINUTILS_CFLAGS="$cflags"
    2082720827    COINUTILS_LIBS=`$PKG_CONFIG --libs "coinutils" 2>/dev/null`
     
    2094120941        pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`
    2094220942        eval `sh -c "$pcifilemod"`
     20943        if test "${CYGPATH_W}" != "echo"; then
     20944          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
     20945        fi
    2094320946        COINUTILS_DATA_INSTALLED="$projdatadir"
    2094420947      fi
     
    2098420987
    2098520988    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    20986     projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     20989    if test "${CYGPATH_W}" != "echo"; then
     20990      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     20991    fi
    2098720992    COINUTILS_CFLAGS="$projcflags $COINUTILS_CFLAGS"
    2098820993
     
    2102521030
    2102621031    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    21027     projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21032    if test "${CYGPATH_W}" != "echo"; then
     21033      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21034    fi
    2102821035    COINUTILS_CFLAGS_INSTALLED="$projcflags $COINUTILS_CFLAGS_INSTALLED"
    2102921036
     
    2104721054_ACEOF
    2104821055
     21056
     21057  # adjust linker flags for (i)cl compiler
     21058  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
     21059  then
     21060    COINUTILS_LIBS_INSTALLED=`echo " $COINUTILS_LIBS_INSTALLED" | sed -e 's/ -L\([^ ]*\)/ \/libpath:\`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g'`
     21061  fi
    2104921062
    2105021063
     
    2123621249    if test "$CYGPATH_W" != "echo" ; then
    2123721250      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
    21238           cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
    21239         fi
     21251      cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21252    fi
    2124021253    OSI_CFLAGS="$cflags"
    2124121254    OSI_LIBS=`$PKG_CONFIG --libs "osi" 2>/dev/null`
     
    2135521368        pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`
    2135621369        eval `sh -c "$pcifilemod"`
     21370        if test "${CYGPATH_W}" != "echo"; then
     21371          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
     21372        fi
    2135721373        OSI_DATA_INSTALLED="$projdatadir"
    2135821374      fi
     
    2139821414
    2139921415    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    21400     projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21416    if test "${CYGPATH_W}" != "echo"; then
     21417      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21418    fi
    2140121419    OSI_CFLAGS="$projcflags $OSI_CFLAGS"
    2140221420
     
    2143921457
    2144021458    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    21441     projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21459    if test "${CYGPATH_W}" != "echo"; then
     21460      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21461    fi
    2144221462    OSI_CFLAGS_INSTALLED="$projcflags $OSI_CFLAGS_INSTALLED"
    2144321463
     
    2146121481_ACEOF
    2146221482
     21483
     21484  # adjust linker flags for (i)cl compiler
     21485  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
     21486  then
     21487    OSI_LIBS_INSTALLED=`echo " $OSI_LIBS_INSTALLED" | sed -e 's/ -L\([^ ]*\)/ \/libpath:\`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g'`
     21488  fi
    2146321489
    2146421490
     
    2163321659    if test "$CYGPATH_W" != "echo" ; then
    2163421660      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
    21635           cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
    21636         fi
     21661      cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21662    fi
    2163721663    OSITESTS_CFLAGS="$cflags"
    2163821664    OSITESTS_LIBS=`$PKG_CONFIG --libs "osi-unittests" 2>/dev/null`
     
    2174821774        pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`
    2174921775        eval `sh -c "$pcifilemod"`
     21776        if test "${CYGPATH_W}" != "echo"; then
     21777          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
     21778        fi
    2175021779        OSITESTS_DATA_INSTALLED="$projdatadir"
    2175121780      fi
     
    2179121820
    2179221821    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    21793     projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21822    if test "${CYGPATH_W}" != "echo"; then
     21823      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21824    fi
    2179421825    OSITESTS_CFLAGS="$projcflags $OSITESTS_CFLAGS"
    2179521826
     
    2183221863
    2183321864    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    21834     projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21865    if test "${CYGPATH_W}" != "echo"; then
     21866      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     21867    fi
    2183521868    OSITESTS_CFLAGS_INSTALLED="$projcflags $OSITESTS_CFLAGS_INSTALLED"
    2183621869
     
    2185421887_ACEOF
    2185521888
     21889
     21890  # adjust linker flags for (i)cl compiler
     21891  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
     21892  then
     21893    OSITESTS_LIBS_INSTALLED=`echo " $OSITESTS_LIBS_INSTALLED" | sed -e 's/ -L\([^ ]*\)/ \/libpath:\`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g'`
     21894  fi
    2185621895
    2185721896
     
    2201122050    if test "$CYGPATH_W" != "echo" ; then
    2201222051      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
    22013           cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
    22014         fi
     22052      cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     22053    fi
    2201522054    SAMPLE_CFLAGS="$cflags"
    2201622055    SAMPLE_LIBS=`$PKG_CONFIG --libs "coindatasample" 2>/dev/null`
     
    2212622165        pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`
    2212722166        eval `sh -c "$pcifilemod"`
     22167        if test "${CYGPATH_W}" != "echo"; then
     22168          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
     22169        fi
    2212822170        SAMPLE_DATA_INSTALLED="$projdatadir"
    2212922171      fi
     
    2216922211
    2217022212    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    22171     projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     22213    if test "${CYGPATH_W}" != "echo"; then
     22214      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     22215    fi
    2217222216    SAMPLE_CFLAGS="$projcflags $SAMPLE_CFLAGS"
    2217322217
     
    2221022254
    2221122255    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    22212     projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     22256    if test "${CYGPATH_W}" != "echo"; then
     22257      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     22258    fi
    2221322259    SAMPLE_CFLAGS_INSTALLED="$projcflags $SAMPLE_CFLAGS_INSTALLED"
    2221422260
     
    2223222278_ACEOF
    2223322279
     22280
     22281  # adjust linker flags for (i)cl compiler
     22282  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
     22283  then
     22284    SAMPLE_LIBS_INSTALLED=`echo " $SAMPLE_LIBS_INSTALLED" | sed -e 's/ -L\([^ ]*\)/ \/libpath:\`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g'`
     22285  fi
    2223422286
    2223522287
     
    2238922441    if test "$CYGPATH_W" != "echo" ; then
    2239022442      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
    22391           cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
    22392         fi
     22443      cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     22444    fi
    2239322445    NETLIB_CFLAGS="$cflags"
    2239422446    NETLIB_LIBS=`$PKG_CONFIG --libs "coindatanetlib" 2>/dev/null`
     
    2250422556        pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`
    2250522557        eval `sh -c "$pcifilemod"`
     22558        if test "${CYGPATH_W}" != "echo"; then
     22559          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
     22560        fi
    2250622561        NETLIB_DATA_INSTALLED="$projdatadir"
    2250722562      fi
     
    2254722602
    2254822603    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    22549     projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     22604    if test "${CYGPATH_W}" != "echo"; then
     22605      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     22606    fi
    2255022607    NETLIB_CFLAGS="$projcflags $NETLIB_CFLAGS"
    2255122608
     
    2258822645
    2258922646    # add CYGPATH_W cludge into include flags and set CFLAGS variable
    22590     projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     22647    if test "${CYGPATH_W}" != "echo"; then
     22648      projcflags=`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`
     22649    fi
    2259122650    NETLIB_CFLAGS_INSTALLED="$projcflags $NETLIB_CFLAGS_INSTALLED"
    2259222651
     
    2261022669_ACEOF
    2261122670
     22671
     22672  # adjust linker flags for (i)cl compiler
     22673  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
     22674  then
     22675    NETLIB_LIBS_INSTALLED=`echo " $NETLIB_LIBS_INSTALLED" | sed -e 's/ -L\([^ ]*\)/ \/libpath:\`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g'`
     22676  fi
    2261222677
    2261322678
  • trunk/Clp/examples/Makefile.in

    r1637 r1645  
    3838##########################################################################
    3939
     40COIN_HAS_PKGCONFIG = @COIN_HAS_PKGCONFIG_TRUE@TRUE
     41COIN_CXX_IS_CL = @COIN_CXX_IS_CL_TRUE@TRUE
     42COIN_HAS_SAMPLE = @COIN_HAS_SAMPLE_TRUE@TRUE
     43COIN_HAS_NETLIB = @COIN_HAS_NETLIB_TRUE@TRUE
     44
    4045# C++ Compiler command
    4146CXX = @CXX@
     
    4348# C++ Compiler options
    4449CXXFLAGS = @CXXFLAGS@
    45 @COIN_HAS_SAMPLE_TRUE@CXXFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA@\"
    46 @COIN_HAS_NETLIB_TRUE@CXXFLAGS += -DNETLIBDIR=\"@NETLIB_DATA@\"
    4750
    4851# additional C++ Compiler options for linking
     
    5457# C Compiler options
    5558CFLAGS = @CFLAGS@
    56 @COIN_HAS_SAMPLE_TRUE@CFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA@\"
    57 @COIN_HAS_NETLIB_TRUE@CFLAGS += -DNETLIBDIR=\"@NETLIB_DATA@\"
    5859
    59 # Compiler flags (we use the CYGPATH_W variables to allow compilation with Windows compilers)
    60 @COIN_HAS_PKGCONFIG_TRUE@INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags clp` $(ADDINCFLAGS)
    61 @COIN_HAS_PKGCONFIG_FALSE@INCL = @CLPLIB_CFLAGS_INSTALLED@ $(ADDINCFLAGS)
     60# Sample data directory
     61ifeq ($(COIN_HAS_SAMPLE), TRUE)
     62  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
     63    CXXFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
     64      CFLAGS += -DSAMPLEDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatasample`\"
     65  else
     66    CXXFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
     67      CFLAGS += -DSAMPLEDIR=\"@SAMPLE_DATA_INSTALLED@\"
     68  endif
     69endif
     70
     71ifeq ($(COIN_HAS_NETLIB), TRUE)
     72  ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
     73    CXXFLAGS += -DNETLIBDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatanetlib`\"
     74      CFLAGS += -DNETLIBDIR=\"`PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --variable=datadir coindatanetlib`\"
     75  else
     76    CXXFLAGS += -DNETLIBDIR=\"@NETLIB_DATA_INSTALLED@\"
     77      CFLAGS += -DNETLIBDIR=\"@NETLIB_DATA_INSTALLED@\"
     78  endif
     79endif
     80
     81# Include directories (we use the CYGPATH_W variables to allow compilation with Windows compilers)
     82ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
     83  INCL = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --cflags clp`
     84else
     85  INCL = @CLPLIB_CFLAGS_INSTALLED@
     86endif
     87INCL += $(ADDINCFLAGS)
    6288
    6389# Linker flags
    64 @COIN_HAS_PKGCONFIG_TRUE@@COIN_CXX_IS_CL_FALSE@LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs clp`
    65 @COIN_HAS_PKGCONFIG_TRUE@@COIN_CXX_IS_CL_TRUE@LIBS = /link: `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --msvc-syntax --libs clp`
    66 @COIN_HAS_PKGCONFIG_FALSE@LIBS = -L@abs_lib_dir@ -lClp @CLPLIB_LIBS_INSTALLED@
     90ifeq ($(COIN_HAS_PKGCONFIG), TRUE)
     91  LIBS = `PKG_CONFIG_PATH=@COIN_PKG_CONFIG_PATH@ @PKG_CONFIG@ --libs clp`
     92else
     93  ifeq ($(COIN_CXX_IS_CL), TRUE)
     94    LIBS = /link /libpath:`$(CYGPATH_W) @abs_lib_dir@` libClp.lib @CLPLIB_LIBS_INSTALLED@
     95  else
     96    LIBS = -L@abs_lib_dir@ -lClp @CLPLIB_LIBS_INSTALLED@
     97  endif
     98endif
    6799
    68100# The following is necessary under cygwin, if native compilers are used
Note: See TracChangeset for help on using the changeset viewer.