Changeset 1535 for branches


Ignore:
Timestamp:
Apr 30, 2010 9:05:14 AM (10 years ago)
Author:
stefan
Message:

integrate fallback closer into AC_COIN_HAS_MODULE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/split/coin.m4

    r1512 r1535  
    36223622# module consists of. Optionally, required version numbers could be added.
    36233623# The optional third argument can be used to overwrite default values for flags like 'required'.
     3624# The optional fourth argument can be used to define a fallback for the case where pkg-config is not available.
     3625# It should contain the path under which a $2-uninstalled.pc file can be found.
     3626# If provided, then COIN_HAS_MODULE_FALLBACK($1, $2, $4, $3) is called.
    36243627#
    36253628# It is also possible to specify a preinstalled version of this module
     
    37293732    PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH"
    37303733  else
    3731     AC_MSG_RESULT([skipped check via pkg-config])
     3734    #if 4th argument is given, try fallback - whereby we take the first word from $2 as basename for the .pc file
     3735    m4_ifvaln([$4], AC_COIN_HAS_MODULE_FALLBACK([$1], [m4_bpatsubst($2, [ .*], [])], [$4], [$3 printmsgchecking=0]))
    37323736  fi
    37333737
     
    37853789[
    37863790if test x$m4_tolower(coin_has_$1) != "xyes" ; then
    3787 AC_MSG_CHECKING([for COIN-OR module $1 (fallback)])
     3791
     3792m4_bmatch($4, [printmsgchecking=0], [], AC_MSG_CHECKING([for COIN-OR module $1 (fallback)]))
    37883793
    37893794m4_tolower(coin_has_$1)=notGiven
     
    38333838
    38343839    m4_tolower(coin_has_$1)=yes
    3835   fi
     3840    AC_MSG_RESULT([$3])
     3841  else
     3842    AC_MSG_RESULT($m4_tolower(coin_has_$1))
     3843  fi
     3844else
     3845  AC_MSG_RESULT([skipping])
    38363846fi
    38373847
     
    38423852                test $m4_tolower(coin_has_$1) != skipping])
    38433853  ])
    3844 
    3845 AC_MSG_RESULT($m4_tolower(coin_has_$1))
    38463854fi
    38473855]) # AC_COIN_HAS_MODULE_FALLBACK
     
    39663974
    39673975if test "x$use_blas" = xBUILD ; then
    3968   AC_COIN_HAS_MODULE(Blas, [coinblas])
     3976  if test -d ../ThirdParty/Blas ; then
     3977    AC_COIN_HAS_MODULE(Blas, [coinblas], [], [../ThirdParty/Blas])
     3978  elif test -d ../Blas ; then
     3979    AC_COIN_HAS_MODULE(Blas, [coinblas], [], [../Blas])
     3980  fi
    39693981 
    39703982elif test "x$use_blas" != x && test "$use_blas" != no; then
     
    39833995  AM_CONDITIONAL([COIN_HAS_BLAS],[test 0 = 1])
    39843996fi
    3985 
    3986 #call fallback in case the previous failed, maybe because pkg-config was not available
    3987 AC_COIN_HAS_MODULE_FALLBACK([Blas], [coinblas], [../ThirdParty/Blas])
    39883997
    39893998]) # AC_COIN_HAS_MODULE_BLAS
     
    41024111
    41034112if test "x$use_lapack" = xBUILD ; then
    4104   AC_COIN_HAS_MODULE(Lapack, [coinlapack])
     4113  if test -d ../ThirdParty/Lapack ; then
     4114    AC_COIN_HAS_MODULE(Lapack, [coinlapack], [], [../ThirdParty/Lapack])
     4115  elif test -d ../Lapack ; then
     4116    AC_COIN_HAS_MODULE(Lapack, [coinlapack], [], [../Lapack])
     4117  fi
    41054118 
    41064119elif test "x$use_lapack" != x && test "$use_lapack" != no; then
     
    41204133fi
    41214134
    4122 #call fallback in case the previous failed, maybe because pkg-config was not available
    4123 AC_COIN_HAS_MODULE_FALLBACK([Lapack], [coinlapack], [../ThirdParty/Lapack])
    4124 
    41254135]) # AC_COIN_HAS_MODULE_LAPACK
Note: See TracChangeset for help on using the changeset viewer.