summaryrefslogtreecommitdiffstats
path: root/debian/tests/pkg-config-test
blob: 1e4ec141e8d45ce627a4bdf72b7f8df3cad33add (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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>
#include <stdio.h>

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

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