What's up with the list?

Bernd Petrovitsch bernd at firmix.at
Fri Oct 10 01:44:53 PDT 2008


On Fri, 2008-10-10 at 10:03 +0200, Matěj Týč wrote:

>         Is there any code in pkg-config that is C++?  Otherwise it would be a
>         waste of effort to include CXXFLAGS.
>         
>         James McKenzie
>  
> This seems to me as misundersting. There may be libraries that require
> appropriate CFLAGS and CXXFLAGS (maybe also CPPFLAGS) specified in

That's actually absolutely necessary IMNSHO:
- CPPFLAGS are intended for all preprocessor-related parameters (e.g.
  -I, -D, ...) and (should be) used on every invocation of the
  preprocessor.
  E.g. it's not uncommon to automatically generate dependency files
  via "gcc -M" and you really want to have the same -I and -D there and
  on the "regular" compile afterwards[0].
- There are software packages which have C and C++ files. And since sane
  tools do not silently ignore unknown parameters, it's better to
  separate the parameters of these two.

>  order for the program that uses them to compile succesfully. This
> fact has nothing to do with internals of pkg-config. 
> Or another point of view: Variables like CPPFLAGS, CFLAGS, CXXFLAGS
> are used in Makefiles so pkg-config should support them since

These Makefile variables are actually part of make's default rules (and
not only GNU-make but IMHO since ages).

>  pkg-config is supposed to be used in makefiles...

	Bernd

[0]: Please remember that there are people out there who are not just
     doing "configure; make; make install" for the local machine on a
     distribution's default installation. Especially when it comes to
     real cross-compiling for a completely different architecture ....
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




More information about the pkg-config mailing list