#!/bin/sh

set -e
exec 2>&1
set -u
set -x

cd "$AUTOPKGTEST_TMP"
cat > example.c <<'EOF'
/* A very much simplified version of examples/simple/simple.c */
#include <openhmd.h>

int main(void)
{
    ohmd_context *ctx = ohmd_ctx_create();
    ohmd_ctx_destroy(ctx);
    return 0;
}
EOF

gcc -o example example.c $(pkg-config --cflags --libs openhmd)
test -x ./example
./example
