]> mj.ucw.cz Git - leo.git/blob - build/lib-flags
Adapted to changes in development version of libucw-xml
[leo.git] / build / lib-flags
1 #!/bin/bash
2 #
3 # A preprocessor for linker arguments, which replaces references to .pc
4 # files by results of the proper calls to pkg-config.
5 #
6 # (c) 2007 Martin Mares <mj@ucw.cz>, placed under GNU LGPL
7 #
8
9 set -e
10
11 PC=
12 while [ -n "$1" ] ; do
13         case "$1" in
14                 *.pc)   PC="$PC `basename $1 .pc`"
15                         ;;
16                 *)      echo -n " $1"
17                         ;;
18         esac
19         shift
20 done
21 if [ -n "$PC" ] ; then
22         echo -n " "
23         PKG_CONFIG_PATH="$PKG_CONFIG_PATH:obj/pkgconfig" pkg-config $PKG_CONFIG_OPTS --libs $PC
24 fi