Requires.private with optional dependencies?‏

Jef Driesen jefdriesen at hotmail.com
Sat Sep 24 05:10:08 PDT 2011


On 09/23/2011 04:56 PM, Tollef Fog Heen wrote:
> ]] Jef Driesen
>
> | Is the correct way to add this line inside the if statement above:
> |
> | AC_SUBST([DEPENDENCIES],[libusb-1.0])
> |
> | And then use this line in the *.pc.in file:
> |
> | Requires.private: @DEPENDENCIES@
>
> Yes, you have to generate the .pc file.

Seems to work fine too.

I was mainly worried that an empty "Requires.private" might cause problems, or 
that because AC_SUBST is called within an if..then construct, the DEPENDENCIES 
variable might be undefined and cause errors.


More information about the pkg-config mailing list