conditionalizing variables
Stefan Seefeld
seefeld at sympatico.ca
Fri Feb 18 07:44:04 PST 2011
Hello,
I'm using pkg-config with a project that provides both, dynamic as well
as static libraries. I'm looking for ways to allow users to decide
whether to link statically or dynamically. What is the best way to
achieve that ?
I'm pondering to define two variables:
libs_dynamic = -lfoo -lbar
libs_static = -Wl,-Bstatic -lfoo -lbar -Wl,-Bdynamic
Is there a way to conditionalize sections of a .pc file, for example to
define the 'Libs:' keyword either via ${libs_dynamic} or ${libs_static},
depending on some command-line option ?
For example, could the .pc file itself contain conditionals, such as
ifeq (a, b)
variable = some value
else
variable = other value
fi
Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the pkg-config
mailing list