#!/bin/sh
# Build a small FreeImagePlus program against the installed library and
# check fipImage loading and getHistogram() against a direct pixel count.

set -e

cp -a TestAPI/sample.png "$AUTOPKGTEST_TMP"
cp debian/tests/freeimageplus.cpp "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"

g++ freeimageplus.cpp -lfreeimageplus -lfreeimage -o test-freeimageplus
./test-freeimageplus sample.png
