R M | 14 Jun 2012 19:20
Picon

pkg-config overrides prefix

Hi,

When I run configure, pkg-config gets called. The problem is that
pkg-config overrides the value of prefix variable in .pc file.

Due to this, there are errors while calling make.

I dont want pkg-config to override the value of prefix value given in
the .pc file.

How do I solve this problem?

Regards,
RM

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
(Continue reading)

Thomas Stover | 14 Jun 2012 19:32
Favicon
Gravatar

Re: pkg-config overrides prefix

On Thu, 14 Jun 2012 22:50:33 +0530
R M <rm.engineer84@...> wrote:

> Hi,
> 
> When I run configure, pkg-config gets called. The problem is that
> pkg-config overrides the value of prefix variable in .pc file.
> 
> Due to this, there are errors while calling make.
> 
> I dont want pkg-config to override the value of prefix value given in
> the .pc file.
> 
> How do I solve this problem?
> 
> Regards,
> RM
> 

Without knowing more, I would speculate that the problem is not that
the variable is overridden per say, but that it is overridden with the
wrong value. Is pkg-config being called from an autoconf script?
Another possibility is that you might really be needing another .pc in
another place to specify the details of a cross compile for instance.
Really more information is needed to say.

--

-- 
www.thomasstover.com

------------------------------------------------------------------------------
(Continue reading)

LRN | 14 Jun 2012 19:55
Picon
Gravatar

Re: pkg-config overrides prefix


On 14.06.2012 21:20, R M wrote:
> Hi,
> 
> When I run configure, pkg-config gets called. The problem is that 
> pkg-config overrides the value of prefix variable in .pc file.
> 
> Due to this, there are errors while calling make.
> 
> I dont want pkg-config to override the value of prefix value given
> in the .pc file.
> 
Call pkg-config with --dont-define-prefix

Note that overriding prefix is a pkg-config feature intended to handle
.pc files that were made by people who didn't know that mingw software
should be configured with --prefix=/mingw. They use something else,
and then you get .pc files with all kind of weird prefixes. Overriding
prefix with the ACTUAL prefix (inferred from the environment) is one
of the ways to solve this problem.

If the prefix you get is incorrect, it might be for a number of
reasons. Maybe your environment is weird. I can't tell without knowing
the details.
R M | 15 Jun 2012 19:06
Picon

Re: pkg-config overrides prefix

Hi,

I am running Windows 7.

I am using Mingw to compile rtl-sdr program. It uses libusb and
pthreads libraries.

pkg-config is being called from autoconf with the following macro
PKG_CHECK_MODULES.

The problem is that the prefix variable defined in the .pc files of
libusb and pthread libraries is getting overridden to the /mingw.

As a result the -I and -L compiler options that are getting passed
have the wrong path for finding the include header files of the above
said libraries.

This is cause make to fail.

Is there a way I can tell autoconf as to not to override the prefix
variable while calling pkg-config?

Regards,
RM

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
(Continue reading)

LRN | 15 Jun 2012 20:50
Picon
Gravatar

Re: pkg-config overrides prefix


On 15.06.2012 21:06, R M wrote:
> Hi,
> 
> I am running Windows 7.
> 
> I am using Mingw to compile rtl-sdr program. It uses libusb and 
> pthreads libraries.
> 
> pkg-config is being called from autoconf with the following macro 
> PKG_CHECK_MODULES.
> 
> The problem is that the prefix variable defined in the .pc files of
> libusb and pthread libraries is getting overridden to the /mingw.
> 
> As a result the -I and -L compiler options that are getting passed
>  have the wrong path for finding the include header files of the 
> above said libraries.
> 
> This is cause make to fail.
> 
> Is there a way I can tell autoconf as to not to override the prefix
> variable while calling pkg-config?
> 

I've told you already that --dont-define-prefix option will disable
that behaviour.

However, shouldn't normally use it.
pkg-config looks at the directory where .pc file is, and if it ends in
(Continue reading)


Gmane