Changeset 1823


Ignore:
Timestamp:
Nov 10, 2010 2:09:17 AM (9 years ago)
Author:
stefan
Message:

give preference to source in base directory over installed packages when checking for existance of packages; add BLAS_LIBS to linker flags when checking if linking against lapack libraries works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r1728 r1823  
    38433843fi
    38443844
    3845 if test $m4_tolower(coin_has_$1) = notGiven; then
    3846   #check for project by using pkg-config, if pkg-config is available
    3847   #we are only interested in installed packages here, so we do not search in $COIN_PKG_CONFIG_PATH_UNINSTALLED
    3848   if test -n "$PKG_CONFIG" ; then
    3849     coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
    3850     PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" ; export PKG_CONFIG_PATH
    3851       m4_ifval([$4],
    3852         [AC_COIN_PKG_CHECK_PROJECT_EXISTS([$4],
    3853                 [m4_tolower(coin_has_$1)="$m4_toupper([$4])_VERSION"])],
    3854               [AC_COIN_PKG_CHECK_PROJECT_EXISTS([$1],
    3855                 [m4_tolower(coin_has_$1)="$m4_toupper([$1])_VERSION"])])
    3856     PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH"
    3857     export PKG_CONFIG_PATH
    3858   fi
    3859 fi
    3860 
    3861 # if not found yet, check if project is available in present directory
     3845# check if project is available in present directory
    38623846if test "$m4_tolower(coin_has_$1)" = notGiven; then
    38633847  if test -d $srcdir/$2/$1; then
     
    38783862fi
    38793863
     3864# check for project by using pkg-config, if pkg-config is available
     3865if test $m4_tolower(coin_has_$1) = notGiven; then
     3866  #we are only interested in installed packages here, so we do not search in $COIN_PKG_CONFIG_PATH_UNINSTALLED
     3867  if test -n "$PKG_CONFIG" ; then
     3868    coin_save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
     3869    PKG_CONFIG_PATH="$COIN_PKG_CONFIG_PATH" ; export PKG_CONFIG_PATH
     3870      m4_ifval([$4],
     3871        [AC_COIN_PKG_CHECK_PROJECT_EXISTS([$4],
     3872                [m4_tolower(coin_has_$1)="$m4_toupper([$4])_VERSION"])],
     3873              [AC_COIN_PKG_CHECK_PROJECT_EXISTS([$1],
     3874                [m4_tolower(coin_has_$1)="$m4_toupper([$1])_VERSION"])])
     3875    PKG_CONFIG_PATH="$coin_save_PKG_CONFIG_PATH"
     3876    export PKG_CONFIG_PATH
     3877  fi
     3878fi
     3879
    38803880AC_MSG_RESULT([$m4_tolower(coin_has_$1)])
    38813881
    3882 AC_MSG_CHECKING(whether project $1 need to be configured)
     3882AC_MSG_CHECKING(whether project $1 needs to be configured)
    38833883if test "$coin_have_project_dir" = yes ; then
    38843884
     
    42334233            [use_blas="$withval"], [use_blas=])
    42344234
    4235 # if user specified --with-blas-lib, then we should give COIN_HAS_PACKAGE
     4235# if user specified --with-blas-lib, then we should give COIN_CHECK_PACKAGE
    42364236# preference
    42374237AC_ARG_WITH([blas-lib],,[use_blas=BUILD])
     
    43894389    AC_MSG_CHECKING([whether user supplied LAPACKLIB=\"$use_lapack\" works])
    43904390    coin_save_LIBS="$LIBS"
    4391     LIBS="$use_lapack $LIBS"
     4391    LIBS="$use_lapack $BLAS_LIBS $LIBS"
    43924392    AC_COIN_TRY_FLINK([dsyev],
    43934393                      [AC_MSG_RESULT([yes])],
     
    44144414        AC_MSG_CHECKING([whether -lcomplib.sgimath has LAPACK])
    44154415        coin_save_LIBS="$LIBS"
    4416         LIBS="-lcomplib.sgimath $LIBS"
     4416        LIBS="-lcomplib.sgimath $BLAS_LIBS $LIBS"
    44174417        AC_COIN_TRY_FLINK([dsyev],
    44184418                          [AC_MSG_RESULT([yes])
     
    44224422        ;;
    44234423
    4424       # See comments in COIN_HAS_BLAS.
     4424      # See comments in COIN_CHECK_PACKAGE_BLAS.
    44254425      *-*-solaris*)
    44264426        AC_MSG_CHECKING([for LAPACK in libsunperf])
    44274427        coin_save_LIBS="$LIBS"
    4428         LIBS="-lsunperf $FLIBS $LIBS"
     4428        LIBS="-lsunperf $BLAS_LIBS $FLIBS $LIBS"
    44294429        AC_COIN_TRY_FLINK([dsyev],
    44304430                          [AC_MSG_RESULT([yes])
     
    44474447    AC_MSG_CHECKING([whether -llapack has LAPACK])
    44484448    coin_save_LIBS="$LIBS"
    4449     LIBS="-llapack $LIBS"
     4449    LIBS="-llapack $BLAS_LIBS $LIBS"
    44504450    AC_COIN_TRY_FLINK([dsyev],
    44514451                      [AC_MSG_RESULT([yes])
Note: See TracChangeset for help on using the changeset viewer.