2007-02-19 20:29:33 +00:00
|
|
|
#!/bin/sh
|
2007-10-14 11:31:40 +01:00
|
|
|
# lw-build-system/scripts/config-printflags.sh
|
|
|
|
#
|
|
|
|
# (c)2007, Laurence Withers <l@lwithers.me.uk>.
|
|
|
|
# Released under the GNU GPLv3. See file COPYING or
|
|
|
|
# http://www.gnu.org/copyleft/gpl.html for details.
|
|
|
|
#
|
|
|
|
# Script to print the flag lines for `config', given a library name.
|
|
|
|
#
|
|
|
|
|
2007-02-19 20:29:33 +00:00
|
|
|
|
|
|
|
for pkg in $@
|
|
|
|
do
|
2007-08-13 19:58:20 +01:00
|
|
|
varname="$(echo "${pkg}" | tr 'a-z-+' 'A-Z__')"
|
2007-02-19 20:34:06 +00:00
|
|
|
echo '[ -z "${'${varname}'_CFLAGS}" ] && '${varname}'_CFLAGS="$('${pkg}'-config --cflags)"'
|
2007-02-19 22:09:23 +00:00
|
|
|
echo '[ -z "${'${varname}'_LIBS}" ] && '${varname}'_LIBS="$('${pkg}'-config --libs)"'
|
2007-02-19 20:29:33 +00:00
|
|
|
done
|