summaryrefslogtreecommitdiff
path: root/debian/tests/link-to-library
blob: 2f09881503af4346f3d835375b931628ddb0a9ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

TMPDIR=`mktemp -d`


cd ${TMPDIR}
cat > source_file.cc << EOF
#include <iostream>

int main() {
  std::cout << "Hello world. Just tested that it is possible to\nlink with -lfyba, -lfygm and -lfyut without\nanything written to stderr." << std::endl;
}

EOF

RET=0

g++ -o source_file source_file.cc -lfyba -lfygm -lfyut
RETSTEP=$?
if [ "$RETSTEP" != "0" ] ; then
  RET=1
fi

./source_file
RETSTEP=$?
if [ "$RETSTEP" != "0" ] ; then
  RET=1
fi

readelf -d ./source_file

rm -rf ${TMPDIR}

exit $RET