Skip to content
Snippets Groups Projects
build 544 B
#!/bin/sh
# Copyright © 2019 Collabora Ltd.
# SPDX-License-Identifier: MIT
# (see debian/copyright)

# Check that the library can be linked by using pkg-config in the most
# obvious way.

set -e
set -u
set -x

tempdir="$(mktemp -d)"
cd "$tempdir"

cat > trivial.c <<'EOF'
#include <steam-runtime-tools/steam-runtime-tools.h>

int main (void)
{
  /* ignore result */
  srt_architecture_can_run_i386 ();
  return 0;
}
EOF

gcc -o trivial trivial.c $(pkg-config --cflags --libs steam-runtime-tools-0)
test -x trivial
./trivial

rm -fr "$tempdir"