Changeset 1916


Ignore:
Timestamp:
Dec 19, 2010 10:16:32 AM (9 years ago)
Author:
stefan
Message:

sync stable/0.6 with trunk rev.1915

Location:
stable/0.6
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • stable/0.6

  • stable/0.6/coin-functions

    r1820 r1916  
    5151    */trunk* ) etfu_type=trunk ;;
    5252    */stable/* ) etfu_type=stable ;;
    53     */releases/* ) etfu_type=releases ;;
     53    */releases/* ) etfu_type=release ;;
    5454  esac
    5555  echo $etfu_type
  • stable/0.6/coin.m4

    r1842 r1916  
    587587AC_LANG_POP(C++)
    588588
    589 # It seems that we need to cleanup something here for the Windows
     589coin_cxx_is_cl=false
     590# It seems that we need to cleanup something here for the Windows
    590591case "$CXX" in
    591592  cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
    592593    sed -e 's/^void exit (int);//' confdefs.h >> confdefs.hh
    593594    mv confdefs.hh confdefs.h
     595    coin_cxx_is_cl=true
    594596    ;;
    595597esac
     598
     599# add automake conditional so we can recognize cl compiler in makefile
     600AM_CONDITIONAL(COIN_CXX_IS_CL, [test $coin_cxx_is_cl = true])
    596601
    597602# Autoconf incorrectly concludes that cl recognises -g. It doesn't.
     
    940945  esac
    941946fi
     947
     948# add automake conditional so we can recognize cl compiler in makefile
     949coin_cc_is_cl=false
     950if test x"$CXX" != x; then
     951  case "$CXX" in
     952    cl* | */cl* | CL* | */CL* | icl* | */icl* | ICL* | */ICL*)
     953      coin_cc_is_cl=true
     954      ;;
     955  esac
     956fi
     957AM_CONDITIONAL(COIN_CC_IS_CL, [test $coin_cc_is_cl = true])
    942958
    943959AC_ARG_VAR(CDEFS,[Additional -D flags to be used when compiling C code.])
     
    22972313      m4_toupper(myvar)_LIBS="-lm $m4_toupper(myvar)_LIBS"
    22982314      m4_toupper(myvar)_PCLIBS="-lm $m4_toupper(myvar)_PCLIBS"
     2315      m4_toupper(myvar)_LIBS_INSTALLED="-lm $m4_toupper(myvar)_LIBS_INSTALLED"
    22992316    ])
    23002317  ;;
     
    23292346                    m4_toupper(myvar)_LIBS="-lz $m4_toupper(myvar)_LIBS"
    23302347                    m4_toupper(myvar)_PCLIBS="-lz $m4_toupper(myvar)_PCLIBS"
     2348                    m4_toupper(myvar)_LIBS_INSTALLED="-lz $m4_toupper(myvar)_LIBS_INSTALLED"
    23312349                  ])
    23322350                 ],
     
    23682386                    m4_toupper(myvar)_LIBS="-lbz2 $m4_toupper(myvar)_LIBS"
    23692387                    m4_toupper(myvar)_PCLIBS="-lbz2 $m4_toupper(myvar)_PCLIBS"
     2388                    m4_toupper(myvar)_LIBS_INSTALLED="-lbz2 $m4_toupper(myvar)_LIBS_INSTALLED"
    23702389                  ])
    23712390                 ],
     
    24192438                    m4_toupper(myvar)_LIBS="-lreadline $LIBS $m4_toupper(myvar)_LIBS"
    24202439                    m4_toupper(myvar)_PCLIBS="-lreadline $LIBS $m4_toupper(myvar)_PCLIBS"
     2440                    m4_toupper(myvar)_LIBS_INSTALLED="-lreadline $LIBS $m4_toupper(myvar)_LIBS_INSTALLED"
    24212441                  ])
    24222442                 ],
     
    27792799      m4_toupper(myvar)_LIBS="$$2LIB $m4_toupper(myvar)_LIBS"
    27802800      m4_toupper(myvar)_PCLIBS="$$2LIB $m4_toupper(myvar)_PCLIBS"
     2801      m4_toupper(myvar)_LIBS_INSTALLED="$$2LIB $m4_toupper(myvar)_LIBS_INSTALLED"
    27812802    ])
    27822803   
     
    35573578          coin_doxy_tagfiles="$coin_doxy_tagfiles $doxydir/$doxytag=$doxydir/html"
    35583579          AC_MSG_RESULT([$doxydir (tag)])
    3559           coin_doxy_excludes="$coin_doxy_excludes */${proj}*"
     3580          coin_doxy_excludes="$coin_doxy_excludes */${proj}"
    35603581        else
    35613582          # will process the source -- nothing further to be done here
     
    37533774    if test "$CYGPATH_W" != "echo" ; then
    37543775      # need to put into brackets since otherwise autoconf replaces the brackets in the sed command
    3755           [cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
    3756         fi
     3776      [cflags=`echo $cflags | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
     3777    fi
    37573778    m4_toupper($1)[]_CFLAGS="$cflags"
    37583779    m4_toupper($1)[]_LIBS=`$PKG_CONFIG --libs "$2" 2>/dev/null`
     
    39033924# This macro checks for the existance of a COIN-OR package and provides compiler and linker flags to compile against this package.
    39043925# A package can consists of one or more COIN-OR or other projects.
    3905 # It defines the PACKAGE_CFLAGS, PACKAGE_LIBS, and PACKAGE_DATA variables, referring to the compiler and linker
    3906 # flags to use when linking against this module and the directories where the module data resists.
     3926# It defines the PACKAGE_CFLAGS, PACKAGE_LIBS, PACKAGE_DEPENDENCIES, and PACKAGE_DATA variables, referring to the compiler and linker
     3927# flags to use when linking against this module, the libraries the package depends on, and the directories where the module data resists.
     3928# The difference between PACKAGE_LIBS and PACKAGE_DEPENDENCIES is that PACKAGE_DEPENDENCIES does not contain arguments starting with '-',
     3929# so it can be used to setup the _DEPENDENCIES variable in a Makefile.am.
    39073930# It also defines a COIN_HAS_PACKAGE preprocessor macro and makefile conditional.
    39083931# Further, tolower(coin_has_$1) is set to "yes".
     
    39103933# then the compiler and linker variables and .pc file setup variable corresponding to this build target
    39113934# are extended with the values for this package.
    3912 # That is, for each build target X, the variables X_CFLAGS, X_LIBS, X_PCLIBS, X_PCREQUIRES are setup,
     3935# That is, for each build target X, the variables X_CFLAGS, X_LIBS, X_DEPENDENCIES, X_PCLIBS, X_PCREQUIRES are setup,
    39133936# whereas the last two specify the values to put into the "Libs:" and "Requires:" fields of the .pc file, resp.
    39143937#
     
    39473970AC_SUBST(m4_toupper($1_CFLAGS))
    39483971AC_SUBST(m4_toupper($1_DATA))
     3972AC_SUBST(m4_toupper($1_DEPENDENCIES))
     3973AC_SUBST(m4_toupper($1_LIBS_INSTALLED))
     3974AC_SUBST(m4_toupper($1_CFLAGS_INSTALLED))
     3975AC_SUBST(m4_toupper($1_DATA_INSTALLED))
    39493976coin_foreach_w([myvar], [$3], [
    39503977  AC_SUBST(m4_toupper(myvar)_CFLAGS)
     
    39523979  AC_SUBST(m4_toupper(myvar)_PCLIBS)
    39533980  AC_SUBST(m4_toupper(myvar)_PCREQUIRES)
     3981  AC_SUBST(m4_toupper(myvar)_DEPENDENCIES)
     3982  AC_SUBST(m4_toupper(myvar)_CFLAGS_INSTALLED)
     3983  AC_SUBST(m4_toupper(myvar)_LIBS_INSTALLED)
    39543984])
    39553985
     
    39994029      [ m4_tolower(coin_has_$1)=yes
    40004030        AC_MSG_RESULT([yes: $m4_toupper($1)_VERSIONS])
    4001         coin_foreach_w([myvar], [$3], [m4_toupper(myvar)_PCREQUIRES="$2 $m4_toupper(myvar)_PCREQUIRES"
     4031
     4032        # adjust linker flags for (i)cl compiler
     4033        # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl)
     4034        if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
     4035        then
     4036          m4_toupper($1_LIBS)=`echo " $m4_toupper($1_LIBS) " | [sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g']`
     4037        fi
     4038   
     4039        # augment X_PCREQUIRES, X_CFLAGS, and X_LIBS for each build target X in $3
     4040        coin_foreach_w([myvar], [$3], [
     4041          m4_toupper(myvar)_PCREQUIRES="$2 $m4_toupper(myvar)_PCREQUIRES"
     4042          m4_toupper(myvar)_CFLAGS="$m4_toupper($1)_CFLAGS $m4_toupper(myvar)_CFLAGS"
     4043          m4_toupper(myvar)_LIBS="$m4_toupper($1)_LIBS $m4_toupper(myvar)_LIBS"
    40024044        ])
    40034045      ],
     
    40094051    PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH"
    40104052    export PKG_CONFIG_PATH
    4011    
    4012     # augment X_CFLAGS and X_LIBS for each build target X in $3
    4013     coin_foreach_w([myvar], [$3], [
    4014       m4_toupper(myvar)_CFLAGS="$m4_toupper($1)_CFLAGS $m4_toupper(myvar)_CFLAGS"
    4015       m4_toupper(myvar)_LIBS="$m4_toupper($1)_LIBS $m4_toupper(myvar)_LIBS"
    4016     ])
     4053
    40174054  else
    40184055    AC_MSG_RESULT([skipped check via pkg-config, redirect to fallback])
     
    40274064   test $m4_tolower(coin_has_$1) != notGiven ; then
    40284065  AC_DEFINE(m4_toupper(COIN_HAS_$1),[1],[Define to 1 if the $1 package is available])
    4029    
     4066
     4067  # construct dependencies variables from LIBS variables
     4068  # we add an extra space in LIBS so we can substitute out everything starting with " -"
     4069  # also substitute out everything of the form `xxx`yyy (may have been added for cygwin/cl)
     4070  m4_toupper($1)_DEPENDENCIES=`echo " $m4_toupper($1)_LIBS" | [sed -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g']`
     4071  coin_foreach_w([myvar], [$3], [
     4072    m4_toupper(myvar)_DEPENDENCIES=`echo " $m4_toupper(myvar)_LIBS " | [sed -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g']`
     4073  ])
     4074
    40304075  if test 1 = 0 ; then  #change this test to enable a bit of debugging output
    40314076    if test -n "$m4_toupper($1)_CFLAGS" ; then
     
    40354080      AC_MSG_NOTICE([$1 LIBS   are $m4_toupper($1)_LIBS])
    40364081    fi
     4082    if test -n "$m4_toupper($1)_DEPENDENCIES" ; then
     4083      AC_MSG_NOTICE([$1 DEPENDENCIES are $m4_toupper($1)_DEPENDENCIES])
     4084    fi
    40374085    if test -n "$m4_toupper($1)_DATA" ; then
    40384086      AC_MSG_NOTICE([$1 DATA   is  $m4_toupper($1)_DATA])
     
    40444092      AC_MSG_NOTICE([myvar CFLAGS are $m4_toupper(myvar)_CFLAGS])
    40454093      AC_MSG_NOTICE([myvar LIBS   are $m4_toupper(myvar)_LIBS])
     4094      AC_MSG_NOTICE([myvar DEPENDENCIES are $m4_toupper(myvar)_DEPENDENCIES])
    40464095    ])
    40474096  fi
     
    40764125# checks also dependencies of $2.  Note that the PACKAGE_DATA variable is
    40774126# set to the content of datadir of the first .pc file that is parsed.
     4127# Finally, for each X in the third argument, also variables
     4128# X_CFLAGS_INSTALLED and X_LIBS_INSTALLED are setup. They contain the compiler
     4129# and linker flags for X when all projects have been installed. Their content
     4130# is assembled from the .pc files that correspond to installed projects. I.e.,
     4131# whenever a file proj-uninstalled.pc is parsed, then also a corresponding
     4132# proj.pc file is parsed for compiler and linker flags, if available in the
     4133# same directory.
     4134# Similar, a variable PACKAGE_DATA_INSTALLED is setup to the content of datadir
     4135# of the first .pc file that is parsed.
    40784136#
    40794137# If .pc files for all projects in $2 and their dependencies is found,
     
    40984156m4_tolower(coin_has_$1)=notGiven
    40994157m4_toupper($1_LIBS)=
     4158m4_toupper($1_LIBS_INSTALLED)=
    41004159m4_toupper($1_CFLAGS)=
     4160m4_toupper($1_CFLAGS_INSTALLED)=
    41014161m4_toupper($1_DATA)=
     4162m4_toupper($1_DATA_INSTALLED)=
    41024163
    41034164# initial list of dependencies is "$2", but we need to filter out version number specifications (= x, <= x, >= x)
     
    41064167# we first expand the list of projects to process by adding all dependencies just behind the project which depends on it
    41074168# further, we collect the list of corresponding .pc files, but do this in reverse order, because we need this order afterwards
     4169# the latter we also do with .pc files corresponding to the installed projects, which will be needed to setup Makefiles for examples
    41084170# also, we setup the DATA variable
    41094171allproj=""
    41104172allpcfiles=""
     4173allpcifiles=""
    41114174while test "x$projtoprocess" != x ; do
    41124175
     
    41184181    for dir in $COIN_PKG_CONFIG_PATH_UNINSTALLED ; do
    41194182      # the base directory configure should have setup coin_subdirs.txt in a way that it does not contain projects that should be skipped, so we do not need to test this here again
    4120       if test -r "$dir/$proj-uninstalled.pc" ; then
     4183      if test -r "$dir/${proj}-uninstalled.pc" ; then
    41214184        pcfile="$dir/$proj-uninstalled.pc"
     4185        if test -r "$dir/${proj}.pc" ; then
     4186          pcifile="$dir/${proj}.pc"
     4187        else
     4188          AC_MSG_WARN([Found $pcfile, but $dir/${proj}.pc is not available. This may break Makefile's of examples.])
     4189          pcifile=
     4190        fi
    41224191        break
    41234192      fi
     
    41334202      projtoprocess=${projtoprocess/$proj/$projrequires}
    41344203
    4135       # read DATA from $pcfile, if this is the first .pc file we are processing (so assume that its the main one)
    4136       if test "x$allproj" = x ; then
    4137         m4_toupper($1_DATA)=`sed -n -e 's/datadir=//gp' "$pcfile"`
     4204      # read DATA from $pcfile, if _DATA is still empty
     4205      if test "x$m4_toupper($1_DATA)" = x ; then
     4206        projdatadir=
     4207        [pcfilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcfile`]
     4208        eval `sh -c "$pcfilemod"`
     4209        m4_toupper($1_DATA)="$projdatadir"
    41384210      fi
    41394211
     
    41454217      allproj=fail
    41464218      break 2
     4219    fi
     4220   
     4221    if test "x$pcifile" != x ; then
     4222      allpcifiles="$pcifile:$allpcifiles"
     4223     
     4224      # read DATA_INSTALLED from $pcifile, if _DATA_INSTALLED is still empty
     4225      if test "x$m4_toupper($1_DATA_INSTALLED)" = x ; then
     4226        projdatadir=
     4227        [pcifilemod=`sed -e '/[a-zA-Z]:/d' -e 's/datadir=\(.*\)/echo projdatadir=\\\\"\1\\\\"/g' $pcifile`]
     4228        eval `sh -c "$pcifilemod"`
     4229        if test "${CYGPATH_W}" != "echo"; then
     4230          projdatadir="\`\$(CYGPATH_W) ${projdatadir} | sed -e 's/\\\\\\\\/\\\\\\\\\\\\\\\\/g'\`"
     4231        fi
     4232        m4_toupper($1_DATA_INSTALLED)="$projdatadir"
     4233      fi
     4234     
    41474235    fi
    41484236
     
    41754263    fi
    41764264
    4177     # reconstruct the directory where the .pc file is located
    4178     pcfiledir=[`echo $pcfile | sed -e 's/\/[^\/]*$//'`]
    4179 
    4180     # read CFLAGS from $pcfile and add CYGPATH_W cludge into include flags
    4181     projcflags=`sed -n -e 's/Cflags://p' "$pcfile"`
    4182     projcflags=[`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
     4265    # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags:
     4266    #   replace "Libs:" by "echo projlibs="
     4267    #   replace "Cflags:" by "echo projcflags="
     4268    #   remove every line starting with <some word>:
     4269    [pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/[a-zA-Z]:/d' $pcfile`]
     4270
     4271    # set projcflags and projlibs variables by running $pcfilemod
     4272    projcflags=
     4273    projlibs=
     4274    eval `sh -c "$pcfilemod"`
     4275
     4276    # add CYGPATH_W cludge into include flags and set CFLAGS variable
     4277    if test "${CYGPATH_W}" != "echo"; then
     4278      projcflags=[`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
     4279    fi
    41834280    m4_toupper($1_CFLAGS)="$projcflags $m4_toupper($1_CFLAGS)"
    41844281
    4185     # read LIBS from $pcfile and replace -L${libdir} by absolute path to build directory in linker flags
    4186     # we assume that the build directory is $pcfiledir/src if this directory exists, otherwise we assume that it is $pcfiledir
    4187     projlibs=`sed -n -e 's/Libs://' -e 's/-L\${libdir}//p' "$pcfile"`
    4188     if test "x$projlibs" != x ; then
    4189       if test -d "${pcfiledir}/src" ; then
    4190         projlibs="-L`cd "${pcfiledir}/src"; pwd` $projlibs"
    4191       else
    4192         projlibs="-L`cd "$pcfiledir"; pwd` $projlibs"
    4193       fi
    4194     else
    4195       projlibs=`sed -n -e 's/Libs://p' "$pcfile"`
    4196     fi
     4282    # set LIBS variable
    41974283    m4_toupper($1_LIBS)="$projlibs $m4_toupper($1_LIBS)"
    41984284
     
    42024288  done
    42034289  IFS="$save_IFS"
     4290
     4291
     4292  # now go through the list of .pc files for installed projects and assemble compiler and linker flags
     4293  # important is here again to obey the reverse order that has been setup before,
     4294  # since then libraries that are required by several others should be after these other libraries
     4295  pcfilesprocessed=""
     4296
     4297  save_IFS="$IFS"
     4298  IFS=":"
     4299  for pcfile in $allpcifiles ; do
     4300
     4301    # if $pcfile has been processed already, skip this round
     4302    if test "x$pcfilesprocessed" != x ; then
     4303      for pcfiledone in $pcfilesprocessed ; do
     4304        if test "$pcfiledone" = "$pcfile" ; then
     4305          continue 2
     4306        fi
     4307      done
     4308    fi
     4309
     4310    # modify .pc file to a shell script that prints shell commands for setting the compiler and library flags:
     4311    #   replace "Libs:" by "echo projlibs="
     4312    #   replace "Cflags:" by "echo projcflags="
     4313    #   remove every line starting with <some word>:
     4314    [pcfilemod=`sed -e 's/Libs:\(.*\)$/echo projlibs=\\\\"\1\\\\"/g' -e 's/Cflags:\(.*\)/echo projcflags=\\\\"\1\\\\"/g' -e '/[a-zA-Z]:/d' $pcfile`]
     4315
     4316    # set projcflags and projlibs variables by running $pcfilemod
     4317    projcflags=
     4318    projlibs=
     4319    eval `sh -c "$pcfilemod"`
     4320
     4321    # add CYGPATH_W cludge into include flags and set CFLAGS variable
     4322    if test "${CYGPATH_W}" != "echo"; then
     4323      projcflags=[`echo "$projcflags" | sed -e 's/-I\([^ ]*\)/-I\`${CYGPATH_W} \1\`/g'`]
     4324    fi
     4325    m4_toupper($1_CFLAGS_INSTALLED)="$projcflags $m4_toupper($1_CFLAGS_INSTALLED)"
     4326
     4327    # set LIBS variable
     4328    m4_toupper($1_LIBS_INSTALLED)="$projlibs $m4_toupper($1_LIBS_INSTALLED)"
     4329   
     4330    # remember that we have processed $pcfile
     4331    pcfilesprocessed="$pcfilesprocessed:$pcfile"
     4332
     4333  done
     4334  IFS="$save_IFS"
     4335
    42044336
    42054337  # finish up
     
    42084340  AC_DEFINE(m4_toupper(COIN_HAS_$1),[1],[Define to 1 if the $1 package is available])
    42094341
     4342  # adjust linker flags for (i)cl compiler
     4343  # for the LIBS, we replace everything of the form "/somepath/name.lib" by "`$(CYGPATH_W) /somepath/`name.lib | sed -e s|\|/|g" (where we have to use excessive many \ to get the \ into the command line for cl),
     4344  # for the LIBS_INSTALLED, we replace everything of the form "/somepath/" by "`$(CYGPATH_W) /somepath/`",
     4345  #    everything of the form "-Lpath" by "/libpath:`$(CYGPATH_W) path`, and
     4346  #    everything of the form "-lname" by "libname.lib"
     4347  if test x$coin_cxx_is_cl = xtrue || test x$coin_cc_is_cl = xtrue ;
     4348  then
     4349    m4_toupper($1_LIBS)=`echo " $m4_toupper($1_LIBS) " | [sed -e 's/ \(\/[^ ]*\/\)\([^ ]*\)\.lib / \`$(CYGPATH_W) \1 | sed -e "s|\\\\\\\\\\\\\\\\\\\\|\/|g"\`\2.lib /g']`
     4350    m4_toupper($1_LIBS_INSTALLED)=`echo " $m4_toupper($1_LIBS_INSTALLED)" | [sed -e 's/ \(\/[^ ]*\/\)/ \`$(CYGPATH_W) \1\`/g' -e 's/ -L\([^ ]*\)/ \/libpath:\`$(CYGPATH_W) \1\`/g' -e 's/ -l\([^ ]*\)/ lib\1.lib/g']`
     4351  fi
     4352
    42104353  coin_foreach_w([myvar], [$3], [
    42114354    m4_toupper(myvar)_PCREQUIRES="$2 $m4_toupper(myvar)_PCREQUIRES"
    42124355    m4_toupper(myvar)_CFLAGS="$m4_toupper($1)_CFLAGS $m4_toupper(myvar)_CFLAGS"
    42134356    m4_toupper(myvar)_LIBS="$m4_toupper($1)_LIBS $m4_toupper(myvar)_LIBS"
     4357    m4_toupper(myvar)_CFLAGS_INSTALLED="$m4_toupper($1)_CFLAGS_INSTALLED $m4_toupper(myvar)_CFLAGS_INSTALLED"
     4358    m4_toupper(myvar)_LIBS_INSTALLED="$m4_toupper($1)_LIBS_INSTALLED $m4_toupper(myvar)_LIBS_INSTALLED"
    42144359  ])
    4215 
    4216   if test 1 = 0 ; then  #change this test to enable a bit of debugging output
    4217     if test -n "$m4_toupper($1)_CFLAGS" ; then
    4218       AC_MSG_NOTICE([$1 CFLAGS are $m4_toupper($1)_CFLAGS])
    4219     fi
    4220     if test -n "$m4_toupper($1)_LIBS" ; then
    4221       AC_MSG_NOTICE([$1 LIBS   are $m4_toupper($1)_LIBS])
    4222     fi
    4223     if test -n "$m4_toupper($1)_DATA" ; then
    4224       AC_MSG_NOTICE([$1 DATA   is  $m4_toupper($1)_DATA])
    4225     fi
    4226     coin_foreach_w([myvar], [$3], [
    4227       AC_MSG_NOTICE([myvar CFLAGS are $m4_toupper(myvar)_CFLAGS])
    4228       AC_MSG_NOTICE([myvar LIBS   are $m4_toupper(myvar)_LIBS])
    4229     ])
    4230   fi
    42314360
    42324361fi
     
    43884517    m4_toupper(myvar)_PCLIBS="$BLAS_LIBS $m4_toupper(myvar)_PCLIBS"
    43894518    m4_toupper(myvar)_LIBS="$BLAS_LIBS $m4_toupper(myvar)_LIBS"
     4519    m4_toupper(myvar)_LIBS_INSTALLED="$BLAS_LIBS $m4_toupper(myvar)_LIBS_INSTALLED"
    43904520  ])
    43914521 
     
    43984528  AC_SUBST(m4_toupper(myvar)_PCLIBS)
    43994529  AC_SUBST(m4_toupper(myvar)_LIBS)
     4530  AC_SUBST(m4_toupper(myvar)_LIBS_INSTALLED)
    44004531])
    44014532
     
    45524683    m4_toupper(myvar)_PCLIBS="$LAPACK_LIBS $m4_toupper(myvar)_PCLIBS"
    45534684    m4_toupper(myvar)_LIBS="$LAPACK_LIBS $m4_toupper(myvar)_LIBS"
     4685    m4_toupper(myvar)_LIBS_INSTALLED="$LAPACK_LIBS $m4_toupper(myvar)_LIBS_INSTALLED"
    45544686  ])
    45554687 
     
    45624694  AC_SUBST(m4_toupper(myvar)_PCLIBS)
    45634695  AC_SUBST(m4_toupper(myvar)_LIBS)
     4696  AC_SUBST(m4_toupper(myvar)_LIBS_INSTALLED)
    45644697])
    45654698
  • stable/0.6/compile_f2c

  • stable/0.6/compile_f2c/compile_f2c

    r946 r1916  
    4040
    4141if test "$#" -eq 1 && test "$1" = "-FLIBS"; then
    42   echo $f2clib
     42  echo $f2clibdir/vcf2c.lib
    4343  exit 0
    4444fi
  • stable/0.6/prepare_new_release

    r1820 r1916  
    5353
    5454printHelp=0
    55 ignoreBuildToolsMismatch=0
     55ignoreBuildToolsMismatch=no
     56mismatchBTExternals=
    5657suppressCheckout=0
    5758
     
    9899    case "$1" in
    99100      -h* | --h*) printHelp=1 ;;
    100       -i* | --i*) ignoreBuildToolsMismatch=1 ;;
     101      -i* | --i*)
     102           if expr "$1" : '.*-i.*=.*' 2>&1 >/dev/null ; then
     103             mismatchBTExternals=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
     104           else
     105             shift
     106             mismatchBTExternals=$1
     107           fi
     108           if test "x$mismatchBTExternals" = "xall" ; then
     109             ignoreBuildToolsMismatch=all
     110           else
     111             ignoreBuildToolsMismatch=partial
     112           fi
     113           ;;
    101114      -p* | --p*) suppressCheckout=1 ;;
    102115      -s* | --s*)
     
    233246  -b <BuildToolsURL>    URL for BuildTools; required to generate a release
    234247                        for a ThirdParty or Data project.
    235   -i                    Ignore BuildTools version mismatches in externals.
     248  -i <projectlist>      Ignore BuildTools version mismatches for the listed
     249                        externals (comma-separated list of project names,
     250                        e.g., -i Osi,Cbc). '-i all' ignores all mismatches.
    236251  -p                    Suppress checkout (useful for testing)
    237252  -s <projectlist>      Suppress conversion from stable to release for the
    238253                        listed externals (comma-separated list of project
    239                         names, e.g., -s Osi,Cbc).
     254                        names).
    240255  -x <projectlist>      Remove the listed projects from the list of externals
    241256                        (comma-separated list of project names).
     
    553568          testResult=`compareURLVersions "$ourBTURL" "$extBTURL"`
    554569          if test $testResult = no ; then
    555             echo "    WARNING: BuildTools mismatch: $ext_rel_url_notail uses $extBTURL"
    556             if test $ignoreBuildToolsMismatch = 0 ; then
    557                buildtoolsMismatch=1
     570            if test $ignoreBuildToolsMismatch = all || \
     571               expr "$mismatchBTExternals" : '.*'$ext_proj'.*' 2>&1 >/dev/null ; then
     572              echo "    WARNING: BuildTools mismatch: $ext_url_notail uses $extBTURL"
     573            else
     574              buildtoolsMismatch=1
     575              echo "    ERROR: BuildTools mismatch: $ext_url_notail uses $extBTURL"
    558576            fi
    559577          fi
    560578        fi
    561579      fi
    562 
    563580      echo "$ext_name  $ext_rel_url" >>Dependencies
    564581      ext_name=
     
    567584  done
    568585
    569 # If we have a BuildTools mismatch, and mismatch is not permitted, exit.
    570 
    571   if test $buildtoolsMismatch -gt $ignoreBuildToolsMismatch ; then
     586# If we have a BuildTools mismatch, exit.
     587
     588  if test $buildtoolsMismatch = 1 ; then
    572589    echo "Exiting due to BuildTools mismatches; use -i to ignore."
    573590    exit 2
    574591  fi
    575592
     593# Try to check out the externals. Try three times before failing.
    576594  echo ''
    577595  echo '===> Updating svn:externals property and checking out externals ...'
     
    579597
    580598  svn propset svn:externals -F Dependencies .
    581   svn update
     599  svn update ||
     600  { echo "Retry 1 ... " ; svn update ; } ||
     601  { echo "Retry 2 ... " ; svn update ; } ||
     602  { echo "Checkout of externals failed. Aborting." ; exit 3 ; }
    582603
    583604  if test -d ThirdParty ; then
  • stable/0.6/prepare_new_stable

    r1814 r1916  
    4242
    4343printHelp=0
    44 ignoreBuildToolsMismatch=0
     44ignoreBuildToolsMismatch=no
     45mismatchBTExternals=
    4546bumpMajor=0
    4647suppressCheckout=0
     
    8283    case "$1" in
    8384      -h* | --h*) printHelp=1 ;;
    84       -i* | --i*) ignoreBuildToolsMismatch=1 ;;
     85      -i* | --i*)
     86           if expr "$1" : '.*-i.*=.*' 2>&1 >/dev/null ; then
     87             mismatchBTExternals=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
     88           else
     89             shift
     90             mismatchBTExternals=$1
     91           fi
     92           if test "x$mismatchBTExternals" = "xall" ; then
     93             ignoreBuildToolsMismatch=all
     94           else
     95             ignoreBuildToolsMismatch=partial
     96           fi
     97           ;;
    8598      -m* | --m*) bumpMajor=1 ;;
    8699      -p* | --p*) suppressCheckout=1 ;;
     
    215228  -b <BuildToolsURL>    URL for BuildTools; required to generate a release
    216229                        for a ThirdParty or Data project.
    217   -i                    Ignore BuildTools version mismatches in externals.
     230  -i <projectlist>      Ignore BuildTools version mismatches for the listed
     231                        externals (comma-separated list of project names,
     232                        e.g., -i Osi,Cbc). '-i all' ignores all mismatches.
    218233  -p                    Suppress checkout (useful for testing)
    219234  -m                    Bump the major version number.
    220235  -t <project-list>     Suppress conversion from trunk to stable for the
    221236                        listed externals (comma-separated list of project
    222                         names, e.g., -t Osi,Cbc).
     237                        names).
    223238  -x <project-list>     Remove the listed projects from the list of externals
    224239                        (comma-separated list of project names).
     
    503518          testResult=`compareURLVersions "$srcBTURL" "$extBTURL"`
    504519          if test $testResult = no ; then
    505             echo "    WARNING: BuildTools mismatch: $ext_url_notail uses $extBTURL"
    506             if test $ignoreBuildToolsMismatch = 0 ; then
    507                buildtoolsMismatch=1
     520            if test $ignoreBuildToolsMismatch = all || \
     521               expr "$mismatchBTExternals" : '.*'$ext_proj'.*' 2>&1 >/dev/null ; then
     522              echo "    WARNING: BuildTools mismatch: $ext_url_notail uses $extBTURL"
     523            else
     524              buildtoolsMismatch=1
     525              echo "    ERROR: BuildTools mismatch: $ext_url_notail uses $extBTURL"
    508526            fi
    509527          fi
     
    517535  done
    518536
    519 # If we have a BuildTools mismatch, and mismatch is not permitted, exit.
    520 
    521   if test $buildtoolsMismatch -gt $ignoreBuildToolsMismatch ; then
     537# If we have a BuildTools mismatch, exit.
     538
     539  if test $buildtoolsMismatch = 1 ; then
    522540    echo "Exiting due to BuildTools mismatches; use -i to ignore."
    523541    exit 2
     
    526544  $cmdDir/set_externals Dependencies
    527545
     546# Try three times to check out externals before conceding defeat.
     547
    528548  echo ''
    529549  echo '===> Checking out externals ...'
    530550  echo ''
    531551
    532   svn update
     552  svn update ||
     553  { echo "Retry 1 ... " ; svn update ; } ||
     554  { echo "Retry 2 ... " ; svn update ; } ||
     555  { echo "Checkout of externals failed. Aborting." ; exit 3 ; }
    533556
    534557# Run any scripts to acquire ThirdParty code.
  • stable/0.6/set_externals

    r1695 r1916  
    3636depFile=
    3737
     38# stableExternals specifies externals which we do not want to convert to
     39# releases, for whatever reason.
     40
     41stableExternals=
     42
    3843if test "$#" -eq 0; then
    3944  printHelp=1
     
    4651    case "$1" in
    4752      -h* | --h*) printHelp=1 ;;
    48            
     53      -s* | --s*)
     54           if expr "$1" : '.*-s.*=.*' 2>&1 >/dev/null ; then
     55             stableExternals=`echo $1 | sed -n -e 's/[^=]*=\(.*\)/\1/p'`
     56           else
     57             shift
     58             stableExternals=$1
     59           fi
     60           ;;
    4961       -*) echo "$0: unrecognised command line switch '"$1"'."
    5062           printHelp=1
     
    5971
    6072# Find the most recent release for each stable external. Allow for the
    61 # possibility that a stable branch has no associated release.
     73# possibility that a stable branch has no associated release, or that the
     74# user has asked to keep the stable external.
    6275
    6376if test $printHelp = 0 && test $exitValue = 0; then
     
    8295          continue
    8396        fi                                   
    84         extType=`extractTypeFromURL $ext_url`
    85         if test "$extType" = invalid ; then
    86           echo ''
    87           echo "The external URL $ext_url appears to be invalid. Exiting."
    88           echo ''
    89           exit 3
    90         fi
     97        if expr "$stableExternals" : '.*'"$ext_name"'.*' 2>&1 >/dev/null ; then
     98          echo "    $ext_name $ext_url unchanged"
     99        else
     100          extType=`extractTypeFromURL $ext_url`
     101          if test "$extType" = invalid ; then
     102            echo ''
     103            echo "The external URL $ext_url appears to be invalid. Exiting."
     104            echo ''
     105            exit 3
     106          fi
    91107
    92         if test "$extType" = stable ; then
    93           ext_majVer=`extractMajorFromURL $ext_url`
    94           ext_minVer=`extractMinorFromURL $ext_url`
    95           ext_rel_url=`bestRelease $ext_url $ext_majVer $ext_minVer`
    96           if test -z "$ext_rel_url" ; then
    97             echo "There is no release for $ext_url"
     108          if test "$extType" = stable ; then
     109            ext_majVer=`extractMajorFromURL $ext_url`
     110            ext_minVer=`extractMinorFromURL $ext_url`
     111            ext_rel_url=`bestRelease $ext_url $ext_majVer $ext_minVer`
     112            if test -z "$ext_rel_url" ; then
     113              echo "There is no release for $ext_url"
     114              echo "Keeping $ext_url"
     115            else
     116              # Normal (not BuildTools/ThirdParty/Data) need a directory name,
     117              # and it may differ from the project name. Carefully preserve it.
     118              # ThirdParty URLs include BuildTools ; both named for emphasis
     119              case $ext_rel_url in
     120                */BuildTools/* | */ThirdParty/* | */Data/* ) ;;
     121                *) ext_tail=`extractTailFromExt $ext_url`
     122                   ext_rel_url=${ext_rel_url}${ext_tail}
     123                   ;;
     124              esac
     125              echo "Replacing $ext_url with $ext_rel_url"
     126              ext_url=$ext_rel_url
     127            fi
     128          else
    98129            echo "Keeping $ext_url"
    99           else
    100             # Normal (not BuildTools/ThirdParty/Data) need a directory name,
    101             # and it may differ from the project name. Carefully preserve it.
    102             # ThirdParty URLs include BuildTools ; both named for emphasis
    103             case $ext_rel_url in
    104               */BuildTools/* | */ThirdParty/* | */Data/* ) ;;
    105               *) ext_tail=`extractTailFromExt $ext_url`
    106                  ext_rel_url=${ext_rel_url}${ext_tail}
    107                  ;;
    108             esac
    109             echo "Replacing $ext_url with $ext_rel_url"
    110             ext_url=$ext_rel_url
    111130          fi
    112         else
    113           echo "Keeping $ext_url"
    114131        fi
    115132
     
    141158Usage: set_externals <Dependency File>
    142159
     160Options:
     161  -s <projectlist>      Suppress conversion from stable to release for the
     162                        listed externals (comma-separated list of project
     163                        names, e.g., -s Osi,Cbc).
     164
    143165This script takes as input a dependency file containing a list of stable
    144166versions of COIN projects on separate lines in the form
     
    146168 <name> <URL of stable version>
    147169
    148 Recommended practice is to keep this list in a file called "Dependencies" in
    149 the project's root directory. A temporary file called "Externals.releases" in
    150 the same form, but with the URL of each stable version replaced by the URL of
    151 the latest associated release is produced. From this file, the script will
    152 set the svn:externals variable. It does not do an update or commit the
    153 change. After the script runs, do an update and test build, then commit the
    154 change if you are happy.
     170Recommended practice is to keep the set of stable externals in a file
     171called "Dependencies" in the project's root directory. A temporary file
     172called "Externals.releases" in the same form, but with the URL of each
     173stable version replaced by the URL of the latest associated release is
     174produced. From this file, the script will set the svn:externals variable. It
     175does not do an update or commit the change. After the script runs, do an
     176update and test build, then commit the change if you are happy.
    155177
    156178EOF
Note: See TracChangeset for help on using the changeset viewer.