Changeset 451


Ignore:
Timestamp:
Aug 8, 2007 10:24:07 PM (13 years ago)
Author:
andreasw
Message:

synchronized stable/0.5 with trunk rev 450

Location:
stable/0.5
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable/0.5/coin.m4

    r420 r451  
    208208
    209209###########################################################################
     210#                            COIN_CHECK_FILE                              #
     211###########################################################################
     212
     213# A simple replacement for AC_CHECK_FILE that works for cross compilation
     214
     215AC_DEFUN([AC_COIN_CHECK_FILE],
     216[if test -r $1; then
     217  $2
     218  :
     219else
     220  $3
     221  :
     222fi
     223])
     224
     225###########################################################################
    210226#                        COIN_THIRDPARTY_SUBDIRS                          #
    211227###########################################################################
     
    319335[case "${enableval}" in
    320336   yes) coin_debug_compile=true
    321         enable_shared=no
     337        if test "${enable_shared+set}" = set; then :; else
     338          enable_shared=no
     339        fi
    322340        ;;
    323341   no)  coin_debug_compile=false
     
    14991517    correct_version='1.5.22'
    15001518    grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
    1501     AC_CHECK_FILE([$want_dir/libtool/ltmain.sh],
    1502                   [have_ltmain=yes],
    1503                   [have_ltmain=no])
     1519    AC_COIN_CHECK_FILE([$want_dir/libtool/ltmain.sh],
     1520                       [have_ltmain=yes],
     1521                       [have_ltmain=no])
    15041522    AC_MSG_CHECKING([whether we are using the correct version ($correct_version) of libtool.])
    15051523    if test $have_ltmain = yes; then
     
    15221540    want_dir=$AUTOTOOLS_DIR/share
    15231541  fi
    1524   AC_CHECK_FILE([$want_dir/aclocal/libtool.m4],
    1525                 [LIBTOOLM4="$want_dir/aclocal/libtool.m4"],
    1526                 [AC_MSG_ERROR([I cannot find the libtool.m4 file.])])
     1542  AC_COIN_CHECK_FILE([$want_dir/aclocal/libtool.m4],
     1543                     [LIBTOOLM4="$want_dir/aclocal/libtool.m4"],
     1544                     [AC_MSG_ERROR([I cannot find the libtool.m4 file.])])
    15271545
    15281546  # Check if we have an Externals file
     
    19311949
    19321950###########################################################################
     1951#                        COIN_LINK_INPUT_CMD                              #
     1952###########################################################################
     1953
     1954# This macro determines which command should be used to "link" files
     1955# that are input to the generated executables.  On Windows, the codes
     1956# using the native Windows system libraries, cannot understand symbolic
     1957# links, and a copy should be used instead of 'ln -s'.
     1958# The result is stored in coin_link_input_cmd
     1959
     1960AC_DEFUN([AC_COIN_LINK_INPUT_CMD],
     1961[AC_REQUIRE([AC_PROG_LN_S])
     1962AC_BEFORE([AC_COIN_PROG_CC], [$0])
     1963AC_BEFORE([AC_COIN_ENABLE_DOSCOMPILE], [$0])
     1964
     1965AC_MSG_CHECKING([which command should be used to link input files])
     1966coin_link_input_cmd="$LN_S"
     1967if test "$enable_doscompile" = mingw; then
     1968  coin_link_input_cmd=cp
     1969fi
     1970case "$CC" in
     1971  cl* | */cl* | CL* | */CL*)
     1972    coin_link_input_cmd=cp ;;
     1973esac
     1974AC_MSG_RESULT($coin_link_input_cmd)
     1975])
     1976
     1977###########################################################################
    19331978#                              COIN_FINALIZE                              #
    19341979###########################################################################
     
    19431988AC_DEFUN([AC_COIN_FINALIZE],
    19441989[
     1990AC_REQUIRE([AC_COIN_LINK_INPUT_CMD])
    19451991if test x$coin_skip_ac_output != xyes; then
    19461992
     
    19842030
    19852031  if test x"$coin_vpath_link_files" = x; then : ; else
    1986     lnkcmd=
    1987     if test "$enable_doscompile" = mingw; then
    1988       lnkcmd=cp
    1989     fi
    1990     case "$CC" in
    1991       cl* | */cl* | CL* | */CL*)
    1992         lnkcmd=cp ;;
    1993     esac
     2032    lnkcmd="$coin_link_input_cmd"
    19942033    if test "$lnkcmd" = cp; then
    19952034      AC_MSG_NOTICE(Copying data files for VPATH configuration)
    19962035    else
    1997       AC_PROG_LN_S
    19982036      AC_MSG_NOTICE(Creating VPATH links for data files)
    1999       lnkcmd="$LN_S"
    20002037    fi
    20012038    for file in $coin_vpath_link_files; do
     
    23302367# matching automake conditional COIN_HAS_LBRY. LBRYINCDIR should specify the
    23312368# directory containing include files for the library. LBRYLIB should specify
    2332 # the flags necessary to link to the library.
     2369# the flags necessary to link to the library. A variable coin_has_lbry will
     2370# be set to true or false, as appropriate. A variable lbry_libcheck will be
     2371# be set to yes or no; no indicates link checks should not be attempted.
    23332372#
    23342373# The macro defines three configure arguments, --with-libraryname-incdir,
     
    24042443
    24052444    m4_ifval([$3],
    2406         [AC_CHECK_FILE([$$2INCDIR/$3],[],
     2445        [AC_COIN_CHECK_FILE([$$2INCDIR/$3],[],
    24072446             [AC_MSG_ERROR([Cannot find file $3 in $$2INCDIR])])])
    24082447
     
    24412480
    24422481    ADDLIBS="$$2LIB $ADDLIBS"
    2443     AC_DEFINE(COIN_HAS_$2,[1],[Define to 1 if the $1 package is used])
     2482    AC_DEFINE(COIN_HAS_$2,[1],[Define to 1 if the $1 package is available])
    24442483  fi
    24452484
     
    24982537  fi
    24992538elif test "$use_asldir" != "no"; then
    2500   AC_CHECK_FILE([$use_asldir/$ampllib],[],
    2501                 [AC_MSG_ERROR([ASL directory \"$use_asldir\" specified, but library missing])])
    2502   AC_CHECK_FILE([$use_asldir/asl.h],[],
    2503                 [AC_MSG_ERROR([ASL directory \"$use_asldir\" specified, but header files are missing])])
     2539  AC_COIN_CHECK_FILE([$use_asldir/$ampllib],[],
     2540                     [AC_MSG_ERROR([ASL directory \"$use_asldir\" specified, but library missing])])
     2541  AC_COIN_CHECK_FILE([$use_asldir/asl.h],[],
     2542                     [AC_MSG_ERROR([ASL directory \"$use_asldir\" specified, but header files are missing])])
    25042543  use_asldir=`cd $use_asldir; pwd`
    25052544  case $build in
     
    28942933
    28952934  # Check if hearders are there
    2896   AC_CHECK_FILE([$mumps_dir/include/dmumps_c.h],
    2897                 [],
    2898                 [AC_MSG_ERROR([I cannot find headers for MUMPS])])
     2935  AC_COIN_CHECK_FILE([$mumps_dir/include/dmumps_c.h],
     2936                     [],
     2937                     [AC_MSG_ERROR([I cannot find headers for MUMPS])])
    28992938  LIBS="$mumps_dir/lib/libdmumps.$libe $mumps_dir/lib/libpord.$libe $mumps_dir/libseq/libmpiseq.$libe $LIBS"
    29002939  ADDLIBS="$mumps_dir/lib/libdmumps.$libe $mumps_dir/lib/libpord.$libe $mumps_dir/libseq/libmpiseq.$libe $ADDLIBS"
     
    29072946  LIBS="$save_LIBS"
    29082947  AC_LANG_POP(C)
     2948  coin_mumpssrcdir="$mumps_dir"
    29092949
    29102950else
     
    29512991]) # AC_COIN_HAS_MUMPS
    29522992
     2993###########################################################################
     2994#                             COIN_HAS_GLPK                               #
     2995###########################################################################
     2996#
     2997# This macro checks for the GLPK package. GLPK provides two capabilities,
     2998# an LP and MIP solver (GLPK) and the GNU Mathprog modelling language (GMPL).
     2999# The macro checks for either Glpk or Gmpl, according to the value specified as
     3000# the parameter. Use one of Glpk or Gmpl. Use *exactly* these strings, eh?
     3001#
     3002#
     3003# The macro first uses COIN_HAS_USER_LIBRARY to see if the user has specified
     3004# a preexisting library (this allows the use of any glpk version, if the user
     3005# is fussy). The macro then checks for ThirdParty/Glpk.
     3006#
     3007# This macro will define the following variables for Glpk:
     3008#   coin_has_glpk       true or false
     3009#   GLPKLIB             link flags for GLPK (if user supplied)
     3010#   GLPKINCDIR          location of glpk include files
     3011#   COIN_HAS_GLPK       Preprocessor symbol, defined to 1
     3012#   COIN_HAS_GLPK       Automake conditional
     3013#   COIN_BUILD_GLPK     Automake conditional, defined only if Glpk is to be
     3014#                       built in ThirdParty/Glpk
     3015#
     3016# With the exception of COIN_BUILD_GLPK, an identical set of variables is
     3017# defined for Gmpl.
     3018
     3019AC_DEFUN([AC_COIN_HAS_GLPK],
     3020[
     3021if test "$PACKAGE_NAME" = ThirdPartyGlpk; then
     3022  coin_glpkobjdir=../Glpk
     3023else
     3024  coin_glpkobjdir=../ThirdParty/Glpk
     3025fi
     3026coin_glpksrcdir=$abs_source_dir/$coin_glpkobjdir
     3027
     3028use_thirdpartyglpk=no
     3029
     3030# Check for the requested component. If the user specified an external glpk
     3031# library don't force a ThirdParty build, let the error propagate.
     3032
     3033m4_if([$1],[Glpk],
     3034[AC_COIN_HAS_USER_LIBRARY([Glpk],[GLPK],[glpk.h],
     3035    [_glp_lpx_simplex glp_lpx_simplex])
     3036 if test x"$coin_has_glpk" = xfalse && test x"$GLPKLIB" = x ; then
     3037   use_thirdpartyglpk=try
     3038 fi])
     3039m4_if([$1],[Gmpl],
     3040[AC_COIN_HAS_USER_LIBRARY([Gmpl],[GMPL],[glpmpl.h],
     3041    [_glp_mpl_initialize glp_mpl_initialize])
     3042 if test x"$coin_has_gmpl" = xfalse && test x"$GMPLLIB" = x ; then
     3043   use_thirdpartyglpk=try
     3044 fi])
     3045
     3046# If the user has supplied an external library, use it. Otherwise, consider
     3047# a build in ThirdParty/Glpk. If we build, assume we get both glpk and gmpl.
     3048
     3049if test x"$use_thirdpartyglpk" = xtry ; then
     3050  MAKEOKFILE=.MakeOk
     3051  # Check if the Glpk's ThirdParty project has been configured
     3052  if test "$PACKAGE_NAME" != ThirdPartyGlpk; then
     3053    if test -r $coin_glpkobjdir/.MakeOk; then
     3054      use_thirdpartyglpk=build
     3055    else
     3056      use_thirdpartyglpk=no
     3057    fi
     3058  else
     3059    use_thirdpartyglpk=build
     3060  fi
     3061
     3062# If we're building, set the library and include directory variables, create a
     3063# preprocessor symbol, define a variable that says we're using glpk/gmpl, and
     3064# another to indicate a link check is a bad idea (hard to do before the library
     3065# exists).
     3066
     3067  if test x"$use_thirdpartyglpk" = xbuild ; then
     3068    m4_toupper($1INCDIR)="$coin_glpksrcdir/glpk/include"
     3069    AC_SUBST(m4_toupper($1INCDIR))
     3070    AC_DEFINE(m4_toupper(COIN_HAS_$1),[1],
     3071              [Define to 1 if $1 package is available])
     3072    m4_tolower(coin_has_$1)=true
     3073    m4_tolower($1_libcheck)=no
     3074    AC_MSG_NOTICE([Using $1 in ThirdParty/Glpk])
     3075  fi
     3076fi
     3077
     3078# Define the necessary automake conditionals.
     3079
     3080AM_CONDITIONAL(m4_toupper(COIN_HAS_$1),
     3081               [test x"$m4_tolower(coin_has_$1)" = xtrue])
     3082AM_CONDITIONAL([COIN_BUILD_GLPK],[test x"$use_thirdpartyglpk" = xbuild])
     3083
     3084]) # AC_COIN_HAS_GLPK
  • stable/0.5/commit_new_release

    r415 r451  
    7272echo '===> Running the autotools'
    7373echo ''
     74curdir=`pwd`
    7475cd $tmpbas
    7576BuildTools/run_autotools
    76 cd - >/dev/null
     77cd "$curdir"
    7778
    7879echo ''
  • stable/0.5/prepare_new_release

    r423 r451  
    282282          getfile=get.$pkg
    283283          if test -r $ext_name/$getfile; then
     284            curdir=`pwd`
    284285            cd $ext_name
    285286            echo "Running $getfile in `pwd`"
    286287            eval ./$getfile
    287             cd - > /dev/null
     288            cd "$curdir"
    288289          fi
    289290          ;;
     
    309310
    310311if test $is_thirdparty = yes; then
     312  curdir=`pwd`
    311313  cd ../..
    312314  BuildTools/run_autotools
    313   cd - > /dev/null
     315  cd "$curdir"
    314316elif test $is_data = yes; then
     317  curdir=`pwd`
    315318  cd ..
    316319  BuildTools/run_autotools
    317   cd - > /dev/null
     320  cd "$curdir"
    318321else
    319322  BuildTools/run_autotools
Note: See TracChangeset for help on using the changeset viewer.