Changeset 3812


Ignore:
Timestamp:
Jul 8, 2019, 9:41:41 AM (4 months ago)
Author:
Peter
Message:

Ticket #922 describes a case where the linked in lib is not the same
as the one tested at configure time. The problem was that the linker's
search path (LDFLAGS) was different at make time and at the time of
the CBLAS tests at configure time. To solve that, move the CBLAS tests
to after the gsl and boost have added -L paths to LDFLAGS.

refs #922

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r3811 r3812  
    265265], [$LIBS], [$LIBM], [YAT_STATIC_LIBS])
    266266
    267 # find library implementing BLAS C API, or use gslcblas
    268 YAT_LIB_CBLAS([YAT_CBLAS_LIB=$CBLAS_LIB], [YAT_CBLAS_LIB=-lgslcblas])
    269 LIBS="$YAT_CBLAS_LIB $LIBS"
    270 
    271267# GNU Scientific Library, GSL http://www.gnu.org/software/gsl/, checks
    272 # Including AX_PATH_GSL macro from gsl.m4 distributed by GSL
    273268m4_define([YAT_REQUIRED_GSL_VERSION], [1.8])
    274 YAT_CHECK_GSL([YAT_REQUIRED_GSL_VERSION],[LIBS="-lgsl $LIBS"],
     269YAT_CHECK_GSL([YAT_REQUIRED_GSL_VERSION], [],
    275270   [AC_MSG_FAILURE([dnl
    276271GSL YAT_REQUIRED_GSL_VERSION (or newer) not found. The GNU Scientific Library
    277272(GSL) library cannot be found. Please make sure GSL is installed.])
    278273])
    279 
    280 YAT_CHECK_LA_LIBS([
    281   double gsl_cdf_hypergeometric_P(const unsigned int k, const unsigned int n1,
    282                                   const unsigned int n2, const unsigned int t);
    283   double yat_foo(void) { return gsl_cdf_hypergeometric_P(1,2,3,10); }
    284 ], [$LIBS], [-lgsl], [YAT_STATIC_LIBS])
    285274
    286275# Boost http://www.boost.org
     
    335324])
    336325
     326# find library implementing BLAS C API, or use gslcblas
     327# We wait doing this test until after -L flags have been added to
     328# LDFLAGS from gsl and boost, so the search path is the same in the
     329# test as at make time and to avoid using the library (see ticket
     330# #922)
     331YAT_LIB_CBLAS([YAT_CBLAS_LIB=$CBLAS_LIB], [YAT_CBLAS_LIB=-lgslcblas])
     332LIBS="-lgsl $YAT_CBLAS_LIB $LIBS"
     333
     334YAT_CHECK_LA_LIBS([
     335  double gsl_cdf_hypergeometric_P(const unsigned int k, const unsigned int n1,
     336                                  const unsigned int n2, const unsigned int t);
     337  double yat_foo(void) { return gsl_cdf_hypergeometric_P(1,2,3,10); }
     338], [$LIBS], [-lgsl], [YAT_STATIC_LIBS])
     339
    337340# see tickets #648 #687
    338341AC_MSG_CHECKING([whether constructor in boost concept is supported])
Note: See TracChangeset for help on using the changeset viewer.