1#! /bin/sh 2 3# only continue if `pkgconfig cunit` fails 4pkg-config cunit 2>/dev/null && exit 0 5 6# Check if the system has a cunit.pc. 7# If not, exit with success (the configure script will raise 8# a more descriptive error). 9CUNIT_PC=`dpkg -L libcunit1-dev 2>/dev/null|grep cunit.pc` 10if test "x$CUNIT_PC" != "x"; then 11 grep -q Version: $CUNIT_PC || (dpkg -l|sed -ne 's/^ii\s\+libcunit1-dev\s\+\([0-9]\+.[0-9]\+-[0-9]\+\).*$/Version: \1/p; T; q'|cat - $CUNIT_PC |sed -e 's/={exec_prefix/=${exec_prefix/' >`pwd`/cunit.pc) 12fi 13 14# output location of generated cunit.pc 15echo PKG_CONFIG_PATH=`pwd` 16