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

20 lines
537 B
Bash
Raw Normal View History

#!/bin/bash
2007-10-14 11:31:40 +01:00
# lw-build-system/scripts/config-printflags.sh
#
# Copyright: ©20072010, Laurence Withers
# Author: Laurence Withers <l@lwithers.me.uk>
# License: GPLv3
2007-10-14 11:31:40 +01:00
#
# Script to print the flag lines for `config', given a library name.
#
for pkg in $@
do
varname="$(echo "${pkg}" | tr 'a-z-+' 'A-Z__')"
echo '[ -z "${'${varname}'_CFLAGS}" ] && '${varname}'_CFLAGS="$('${pkg}'-config --cflags)"'
echo '[ -z "${'${varname}'_LIBS}" ] && '${varname}'_LIBS="$('${pkg}'-config --libs)"'
done
# vim: ts=4:sw=4:expandtab