Changeset 2036


Ignore:
Timestamp:
Dec 31, 2010 7:43:16 AM (9 years ago)
Author:
stefan
Message:

recognize veclib on MacOS as Blas/Lapack? implementation; filter out -framework flags when setting up DEPENDENCIES variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r2033 r2036  
    40724072  # construct dependencies variables from LIBS variables
    40734073  # we add an extra space in LIBS so we can substitute out everything starting with " -"
     4074  # before, substitute out everything of the form -framework xxx as used on Mac
    40744075  # also substitute out everything of the form `xxx`yyy (may have been added for cygwin/cl)
    4075   m4_toupper($1)_DEPENDENCIES=`echo " $m4_toupper($1)_LIBS" | [sed -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g']`
     4076  m4_toupper($1)_DEPENDENCIES=`echo " $m4_toupper($1)_LIBS" | [sed -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g']`
    40764077  coin_foreach_w([myvar], [$3], [
    4077     m4_toupper(myvar)_DEPENDENCIES=`echo " $m4_toupper(myvar)_LIBS " | [sed -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g']`
     4078    m4_toupper(myvar)_DEPENDENCIES=`echo " $m4_toupper(myvar)_LIBS " | [sed -e 's/ -framework  *[^ ]*//g' -e 's/ -[^ ]*//g' -e 's/\`[^\`]*\`[^ ]* //g']`
    40784079  ])
    40794080
     
    44624463      LIBS="$coin_save_LIBS"
    44634464      ;;
     4465     
    44644466    *-cygwin* | *-mingw*)
    44654467# On cygwin, consider -lblas only if doscompile is disabled. The prebuilt
     
    44814483          ;;
    44824484      esac
     4485      ;;
     4486     
     4487     *-darwin*)
     4488      AC_MSG_CHECKING([for BLAS in Veclib])
     4489      coin_need_flibs=no
     4490      coin_save_LIBS="$LIBS"
     4491      LIBS="-framework vecLib $LIBS"
     4492      AC_COIN_TRY_FLINK([daxpy],
     4493                        [use_blas='-framework vecLib'
     4494                         if test $coin_need_flibs = yes ; then
     4495                           use_blas="$use_blas $FLIBS"
     4496                         fi
     4497                         AC_MSG_RESULT([yes: $use_blas])
     4498                        ],
     4499                        [AC_MSG_RESULT([no])])
     4500      LIBS="$coin_save_LIBS"
    44834501      ;;
    44844502  esac
     
    46424660        # On cygwin, do this check only if doscompile is disabled. The prebuilt library
    46434661        # will want to link with cygwin, hence won't run standalone in DOS.
     4662       
    46444663      *-cygwin*)
    46454664        if test "$enable_doscompile" = mingw; then
     
    46474666        fi
    46484667        ;;
     4668       
     4669     *-darwin*)
     4670      AC_MSG_CHECKING([for LAPACK in Veclib])
     4671      coin_need_flibs=no
     4672      coin_save_LIBS="$LIBS"
     4673      LIBS="-framework vecLib $BLAS_LIBS $LIBS"
     4674      AC_COIN_TRY_FLINK([dsyev],
     4675                        [use_lapack="-framework vecLib $BLAS_LIBS"
     4676                         if test $coin_need_flibs = yes ; then
     4677                           use_lapack="$use_lapack $FLIBS"
     4678                         fi
     4679                         AC_MSG_RESULT([yes: $use_lapack])
     4680                        ],
     4681                        [AC_MSG_RESULT([no])])
     4682      LIBS="$coin_save_LIBS"
     4683      ;;
     4684       
    46494685    esac
    46504686  fi
Note: See TracChangeset for help on using the changeset viewer.