pkg-config/check/check-cflags
Dan Nicholson 90ed8f193f Allow all combinations of --cflags and --libs variants
Use a bitmask to keep track of what Libs/Cflags to output. This makes it
simple to handle any combination of --cflags and --libs option variants.
A lot of excess code is removed in the process as all the flags options
can now be carried around in a single variable.

Freedesktop #54388 (https://bugs.freedesktop.org/show_bug.cgi?id=54388)
2012-11-03 11:07:59 -07:00

28 lines
601 B
Bash
Executable file

#! /bin/sh
set -e
. ${srcdir}/common
RESULT=""
run_test --cflags simple
RESULT=""
run_test --cflags fields-blank
RESULT="-DOTHER -I/other/include"
run_test --cflags other
RESULT="-I/other/include"
run_test --cflags-only-I other
RESULT="-DOTHER"
run_test --cflags-only-other other
# Try various mixed combinations
RESULT="-DOTHER -I/other/include"
run_test --cflags-only-I --cflags-only-other other
run_test --cflags-only-other --cflags-only-I other
run_test --cflags --cflags-only-I --cflags-only-other other
run_test --cflags --cflags-only-I other
run_test --cflags --cflags-only-other other