public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Robert G. Brown" <rgb@phy.duke.edu>
To: GSL Discussion list <gsl-discuss@sources.redhat.com>
Subject: Re: Stupid question...
Date: Sun, 11 Oct 2009 14:06:00 -0000	[thread overview]
Message-ID: <alpine.LFD.2.00.0910111000390.7810@lilith> (raw)
In-Reply-To: <alpine.LFD.2.00.0910110947130.7810@lilith>

On Sun, 11 Oct 2009, Robert G. Brown wrote:

> I'm trying to get gsl to be correctly detected in a configure.ac
> (something that has never quite worked, for reasons I don't understand).

Sorry to answer my own question, but GIYF and I found a hint, made a
guess, and here it is.  (Apparently) library check order matters, and
one has to put the rightmost library dependencies first.  -lgsl will not
compile unless -lgslcblas is present, but -lgslcblas will compile
without -lgsl, so inverting the order of the two lines to:

#==================================================================
# Checks for libraries, and headers.  Test for cblas FIRST.
#==================================================================
AC_CHECK_HEADER([gsl/gsl_sf_gamma.h],,[AC_MSG_ERROR([Couldn't find GSL headers! Please install gsl-devel.])])
AC_CHECK_LIB([gslcblas], [main])
AC_CHECK_LIB([gsl],[gsl_sf_gamma])

checking gsl/gsl_sf_gamma.h usability... yes
checking gsl/gsl_sf_gamma.h presence... yes
checking for gsl/gsl_sf_gamma.h... yes
checking for main in -lgslcblas... yes
checking for gsl_sf_gamma in -lgsl... yes

works charm-like.  Makes sense, I suppose, but pretty hard to find in
the documentation for autoconf; I could as easily have thought each
library check was independent, but the output in config.log left me
nothing else to try and it worked.

     rgb

Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb@phy.duke.edu


  reply	other threads:[~2009-10-11 14:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-11 13:52 Robert G. Brown
2009-10-11 14:06 ` Robert G. Brown [this message]
2009-10-11 16:49 ` John D Lamb
2009-10-11 17:42 ` Andrew W. Steiner
  -- strict thread matches above, loose matches on Subject: below --
2001-12-19 13:20 stupid question Matthew J. Doller
2001-11-19 10:26 ` Matthew J. Doller
2001-12-19 13:20 ` Achim Gaedke
2001-11-20  2:00   ` Achim Gaedke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.0910111000390.7810@lilith \
    --to=rgb@phy.duke.edu \
    --cc=gsl-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).