2009-04-06 15:13:06 +01:00
|
|
|
|
#!/bin/bash
|
2007-10-14 11:31:40 +01:00
|
|
|
|
# lw-build-system/scripts/config-printflags.sh
|
|
|
|
|
#
|
2010-11-25 15:32:52 +00:00
|
|
|
|
# Copyright: ©2007–2010, 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.
|
|
|
|
|
#
|
|
|
|
|
|
2007-02-19 20:29:33 +00:00
|
|
|
|
|
|
|
|
|
for pkg in $@
|
|
|
|
|
do
|
2010-11-25 15:32:52 +00:00
|
|
|
|
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)"'
|
2007-02-19 20:29:33 +00:00
|
|
|
|
done
|
2010-11-25 15:32:52 +00:00
|
|
|
|
|
|
|
|
|
# vim: ts=4:sw=4:expandtab
|