lw-build-system/scripts/config-printflags.sh

18 lines
542 B
Bash
Raw Normal View History

#!/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.
#
for pkg in $@
do
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)"'
done