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

20 lines
537 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# lw-build-system/scripts/config-printflags.sh
#
# Copyright: ©20072010, 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