#!/bin/sh

set -e
set -u
set -x

CFLAGS=$(pkgconf --shared --cflags gmobile)
LIBS=$(pkgconf --libs gmobile gobject-2.0)

gcc ${CFLAGS} debian/tests/test.c ${LIBS}
./a.out
echo "Shared lib build test of $< succeeded"

LIBS=$(pkgconf --static --libs gmobile gobject-2.0)
gcc ${CFLAGS} debian/tests/test.c ${LIBS}
./a.out
echo "Static lib build test of $< succeeded"

rm -f a.out
