20 lines
537 B
Bash
Executable File
20 lines
537 B
Bash
Executable File
#!/bin/bash
|
||
# lw-build-system/scripts/config-printflags.sh
|
||
#
|
||
# Copyright: ©2007–2010, Laurence Withers
|
||
# Author: Laurence Withers <l@lwithers.me.uk>
|
||
# License: GPLv3
|
||
#
|
||
# 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
|