bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUILE_CFLAGS contains warning options


From: Bruno Haible
Subject: Re: GUILE_CFLAGS contains warning options
Date: Sun, 20 Feb 2011 23:50:15 +0100
User-agent: KMail/1.9.9

Andy Wingo wrote:
> > $LIBDIR/pkgconfig/guile-2.0.pc contains a line such as
> >
> >   Cflags: -I${pkgincludedir}/2.0 -Wall -I$LIBUNISTRING_PREFIX/include 
> > -pthread -I$GC_PREFIX/include  
> 
> The template is:
> 
>   Cflags: -I${pkgincludedir}/@GUILE_EFFECTIVE_VERSION@ @GUILE_CFLAGS@ 
> @BDW_GC_CFLAGS@
> ...
> And in configure.ac I have:
> 
>   GUILE_CFLAGS="$CPPFLAGS $PTHREAD_CFLAGS"

Bingo. This is the problem: The CPPFLAGS variable contains options meant for the
compiler used to build guile, not for the compiler that will use the installed
libguile.

You can extract the -I options from $CPPFLAGS; this would be OK since all
compilers support -I.

For the PTHREAD_CFLAGS it is more tricky: On most platforms you can use
"-lpthread" instead of "-pthread", and all compilers support -l options.
But on OSF/1, the options for using threads are compiler dependent:
  * -pthread for cc,
  * -lpthread for gcc.

Bruno
-- 
In memoriam Juliusz Bursche <http://en.wikipedia.org/wiki/Juliusz_Bursche>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]