summaryrefslogtreecommitdiff
path: root/debian/tests/pkg-config-test
blob: cb8d1ffb0457432f3587a434cb5a48e355c3032a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

set -e

WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
cat <<EOF > pkgconfigtest.c
#include <apt-pkg/init.h>

int main()
{
    printf("Apt Version: %s \n", pkgVersion);
    return 0;
}
EOF

g++ -o pkgconfigtest pkgconfigtest.c `pkg-config --cflags --libs apt-pkg apt-inst`
echo "build: OK"
[ -x pkgconfigtest ]
./pkgconfigtest
echo "run: OK"