Debian Codegraph @

debian/tests/libsmartcols-dev

raw
1 #!/bin/sh
2 # Copyright 2020 Collabora Ltd.
3 # SPDX-License-Identifier: MIT
4
5 set -eux
6
7 if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
8 CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
9 else
10 CROSS_COMPILE=
11 fi
12
13 cd "$AUTOPKGTEST_TMP"
14
15 cat > trivial.c <<EOF
16 #include <libsmartcols.h>
17
18 #include <assert.h>
19 #include <stddef.h>
20
21 int main(void)
22 {
23 assert(scols_get_library_version(NULL) >= 2350);
24 return 0;
25 }
26 EOF
27
28 # Deliberately word-splitting pkg-config's output:
29 # shellcheck disable=SC2046
30 "${CROSS_COMPILE}gcc" -otrivial trivial.c $("${CROSS_COMPILE}pkg-config" --cflags --libs smartcols)
31 ./trivial
32