public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
* GSL_CFLAGS, GSL_LIBS, gsl.m4
@ 2000-08-01 18:25 William Brower
  2000-08-02 13:26 ` Brian Gough
  0 siblings, 1 reply; 3+ messages in thread
From: William Brower @ 2000-08-01 18:25 UTC (permalink / raw)
  To: gsl-discuss

In gsl.m4, it appears that instead of just
making GSL_LIBS and GSL_CFLAGS, there is the
attempt to append these results to the more
general CFLAGS and LIBS variables.

Is this what you want to do? My package builds
multiple libraries and multiple binaries. Some
of these require the GSL, some do not. When the
more global CFLAGS and LIBS variables are messed
with, my non-GSL apps have all that extra baggage.

Also, my GSL_CFLAGS gets set to '-g -O2 -I/usr/local/include'
but the headers are in '/usr/local/include/gsl' so
my Makefile.am's have to look like '$(GSL_CFLAGS)/gsl'
Should the flags used to build the GSL be inherited
by *my* package? Should there also be defined a GSL_INCS
that shows only the (correct) path to the headers?

One more. My GSL_LIBS gets set to '-L/usr/local/lib -lgsl -lm'
Forget about the fact that -lgslblasnative is not present
(I suspect that is to allow someone to link against their
own BLAS lib but that's not my concern right now).
I notice that when X_LIBS (or somthing) is set, it usually
only contains the *path* to the library (the -L part),
not the libraries themselves. I supppose one could argue
that in light of there being only ONE library (-lgsl),
it is OK to add it (and its -lm dependency).
It appears inconsistent; then again, I don't have enough
experience to know the "right" way to do this.

--
William Brower  MIT Lincoln Laboratory
805.355.1310    KMR Field Site, Kwajalein

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GSL_CFLAGS, GSL_LIBS, gsl.m4
  2000-08-01 18:25 GSL_CFLAGS, GSL_LIBS, gsl.m4 William Brower
@ 2000-08-02 13:26 ` Brian Gough
  2000-08-02 13:44   ` Christopher R.Gabriel
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Gough @ 2000-08-02 13:26 UTC (permalink / raw)
  To: wbrower; +Cc: gsl-discuss

Your second problem can be fixed, I think, by using "#include
<gsl/gsl_foo.h>" (this is now the recommended way to do it, a change
from earlier versions of gsl).

Regarding the flags that come out of gsl.m4 and gsl-config, I believe
they follow GNOME's conventions. I'm not sure exactly how that
evolved, as I don't follow GNOME myself. I'd be glad of an
explanation/introduction to this type of package configuration scheme
from anyone on the list who knows about it.

William Brower writes:
 > In gsl.m4, it appears that instead of just
 > making GSL_LIBS and GSL_CFLAGS, there is the
 > attempt to append these results to the more
 > general CFLAGS and LIBS variables.
 > 
 > Is this what you want to do? My package builds
 > multiple libraries and multiple binaries. Some
 > of these require the GSL, some do not. When the
 > more global CFLAGS and LIBS variables are messed
 > with, my non-GSL apps have all that extra baggage.
 >
 > Also, my GSL_CFLAGS gets set to '-g -O2 -I/usr/local/include'
 > but the headers are in '/usr/local/include/gsl' so
 > my Makefile.am's have to look like '$(GSL_CFLAGS)/gsl'
 > Should the flags used to build the GSL be inherited
 > by *my* package? Should there also be defined a GSL_INCS
 > that shows only the (correct) path to the headers?
 >
 >
 > One more. My GSL_LIBS gets set to '-L/usr/local/lib -lgsl -lm'
 > Forget about the fact that -lgslblasnative is not present
 > (I suspect that is to allow someone to link against their
 > own BLAS lib but that's not my concern right now).
 > I notice that when X_LIBS (or somthing) is set, it usually
 > only contains the *path* to the library (the -L part),
 > not the libraries themselves. I supppose one could argue
 > that in light of there being only ONE library (-lgsl),
 > it is OK to add it (and its -lm dependency).
 > It appears inconsistent; then again, I don't have enough
 > experience to know the "right" way to do this.
 > 
 > --
 > William Brower  MIT Lincoln Laboratory
 > 805.355.1310    KMR Field Site, Kwajalein
 > 
 > 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GSL_CFLAGS, GSL_LIBS, gsl.m4
  2000-08-02 13:26 ` Brian Gough
@ 2000-08-02 13:44   ` Christopher R.Gabriel
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher R.Gabriel @ 2000-08-02 13:44 UTC (permalink / raw)
  To: gsl-discuss; +Cc: wbrower

On Wed, Aug 02, 2000 at 09:25:53PM +0100, Brian Gough wrote:
> Your second problem can be fixed, I think, by using "#include
> <gsl/gsl_foo.h>" (this is now the recommended way to do it, a change
> from earlier versions of gsl).
> 
> Regarding the flags that come out of gsl.m4 and gsl-config, I believe
> they follow GNOME's conventions. I'm not sure exactly how that
> evolved, as I don't follow GNOME myself. I'd be glad of an
> explanation/introduction to this type of package configuration scheme
> from anyone on the list who knows about it.
> 
> William Brower writes:
>  > In gsl.m4, it appears that instead of just
>  > making GSL_LIBS and GSL_CFLAGS, there is the
>  > attempt to append these results to the more
>  > general CFLAGS and LIBS variables.
>  > 
>  > Is this what you want to do? My package builds
>  > multiple libraries and multiple binaries. Some
>  > of these require the GSL, some do not. When the
>  > more global CFLAGS and LIBS variables are messed
>  > with, my non-GSL apps have all that extra baggage.

Mmm you're right here. The CFLAGS and LIBS (the "generic" ones) are saved in ac_save_LIBS before the script append them GSL_LIBS end _CFLAGS, but won't restore them. 

>  >
>  > Also, my GSL_CFLAGS gets set to '-g -O2 -I/usr/local/include'
>  > but the headers are in '/usr/local/include/gsl' so
>  > my Makefile.am's have to look like '$(GSL_CFLAGS)/gsl'
>  > Should the flags used to build the GSL be inherited
>  > by *my* package? Should there also be defined a GSL_INCS
>  > that shows only the (correct) path to the headers?

That's because, as Brian noticed, the recommended way to include GSL 
headers is #include <gsl/gsl_bar.h>, so that's why you have 
/usr/local/include instead of /usr/local/include/gsl.

>  >
>  >
>  > One more. My GSL_LIBS gets set to '-L/usr/local/lib -lgsl -lm'
>  > Forget about the fact that -lgslblasnative is not present
>  > (I suspect that is to allow someone to link against their
>  > own BLAS lib but that's not my concern right now).

You're right: this is the reason with blasnative is not there.

>  > I notice that when X_LIBS (or somthing) is set, it usually
>  > only contains the *path* to the library (the -L part),
>  > not the libraries themselves. I supppose one could argue
>  > that in light of there being only ONE library (-lgsl),
>  > it is OK to add it (and its -lm dependency).
>  > It appears inconsistent; then again, I don't have enough
>  > experience to know the "right" way to do this.

I'll check for this.

Christopher



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-08-02 13:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-01 18:25 GSL_CFLAGS, GSL_LIBS, gsl.m4 William Brower
2000-08-02 13:26 ` Brian Gough
2000-08-02 13:44   ` Christopher R.Gabriel

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).