This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: searching for gsl library


Hi Juan Jose,

I think you can ommit the AC_CHECK_LIB(gsl,main) completely. AM_PATH_GSL
does that for you...

checking for gsl-config... (cached) /usr/bin/gsl-config
checking for GSL - version >= 0.2.5... yes
checking for inline... (cached) inline

came out from:

dnl Checks for programs.
dnl Checks for libraries.
AM_PATH_GLIB // another lib
AM_PATH_XML2 // another lib
AM_PATH_GSL  // sufficient check for gsl :)

in my configure.in

I also have this line:

AC_CHECK_LIB(atlas,ATL_ctrsv, [ATLAS_LIBS="-latlas
-lcblas"],[ATLAS_LIBS=""])
AC_SUBST(ATLAS_LIBS)

complemented with an $(ATLAS_LIBS) prior to $(GSL_LIBS) in Makefile.am to
automatically check for Atlas.

I think your check fails because there is no symbol named main:

aspuru at cornbread mb]$ nm /usr/lib/libgsl.a | grep main
00002ae0 T gsl_sf_gammainv
00001cc0 T gsl_sf_gammainv_e
         U gsl_sf_gammainv_e
         U gsl_sf_gammainv_e


If you want to use AC_CHECK_LIB, you might use something like:
AC_CHECK_LIB(gsl,gsl_block_alloc) or a function that comes out of 'nm'-ing
the library.

Salúd!

Alán



On Fri, 21 Feb 2003, Juan Jose Gomez Cadenas wrote:

> > On Fri, 21 Feb 2003, Juan Jose Gomez Cadenas wrote:
> >
> >> I have problems to find gsl library using the macro
> >
> > Does the recipe from the manual
> > (http://sources.redhat.com/gsl/ref/gsl-ref_2.html#SEC12) not work?
> >
> > - martin
> 
> No, it doesn't, at least for me. My configure.in:
> 
> AC_MSG_CHECKING([for math library])
> AC_CHECK_LIB(m,main)
> 
> AC_MSG_CHECKING([for g2c library])
> AC_CHECK_LIB(g2c,main)
> 
> AC_MSG_CHECKING([for gsl library])
> AC_CHECK_LIB(gsl,main)
> AM_PATH_GSL
> AC_CHECK_LIB(gslcblas,cblas_sdsdot)
> 
> ANd the result:
> checking for math library... checking for main in -lm... yes
> checking for g2c library... checking for main in -lg2c... yes
> checking for gsl library... checking for main in -lgsl... no
> 
> 
> 
> 

-- 

Alan Aspuru-Guzik                    Dios mueve al jugador, y éste, la pieza.
(510)642-2154 UC Berkeley           ¿Qué Dios detrás de Dios la trama empieza
(925)422-8739 LLNL                de polvo y tiempo y sueño y agonías? -Borges


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]