19 for inc in src/*.h; do
20 package=xcb-`basename $inc .h`
21 pcin="$AM_SRCDIR"/$package.pc.in
23 included=`grep '# *include' $inc |
24 sed -e 's/[^<"]*[<"]//' -e 's/[>"]//' |
25 grep -v 'xcb.h\|xproto.h'`
26 requires=`grep '^Requires:' $pcin`
28 for i in $included; do
29 ibase=`basename $i .h`
31 rpcin="$AM_SRCDIR"/$r.pc.in
32 if [ -f $rpcin ]; then
34 for has in $requires; do
35 if [ $has = $r ]; then
59 if [ "$fix" = "y" ]; then
60 echo $package adding dependency on $missing
61 sed -i '/^Requires:/s/$/ '"$missing"'/' $pcin
63 echo $package missing $missing