#! /bin/sh
# Copyright © 2008 Rémi Denis-Courmont

cd "$(dirname "$0")" || exit $?

# Look for configure #defines in public headers.
# There are incorrect, as external users don't have our <config.h>.
regexp="$(cat ../config.h.in | \
	sed -n -e 's/^#undef \([[:upper:][:digit:]_]*\)$/\1/p' | \
	grep -v 'WORDS_BIGENDIAN' | \
	grep -v 'UNICODE' | \
	grep -v '__LIBVLC__' | \
	xargs | \
    sed -e 's/ /\\\(\\s\\\|$\\\)\\\| /g')"
regexp=" $regexp\$"

echo Looking for private defines in public headers...
! grep -- "$regexp" "$@" || exit $?
echo "None found."
