diff options
Diffstat (limited to 'tools/check_header.sh')
-rwxr-xr-x | tools/check_header.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/check_header.sh b/tools/check_header.sh new file mode 100755 index 00000000..19d7064a --- /dev/null +++ b/tools/check_header.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +HEADER="$1" +CC="${2:-gcc}" + +echo "#include <$HEADER>" | "${CC}" -E - &>/dev/null +if [ $? -eq 0 ]; then + echo 1 +else + echo 0 +fi + |