1#!/bin/sh 2# 3# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4# 5# This Source Code Form is subject to the terms of the Mozilla Public 6# License, v. 2.0. If a copy of the MPL was not distributed with this 7# file, you can obtain one at https://mozilla.org/MPL/2.0/. 8# 9# See the COPYRIGHT file distributed with this work for additional 10# information regarding copyright ownership. 11 12# 13# Check the installed bind9 headers to make sure that no header 14# depends on another header having been included first. 15# 16 17prefix=@prefix@ 18tmp=/tmp/thdr$$.tmp 19 20status=0 21 22echo "Checking for header interdependencies..." 23 24# Make a list of header files. 25(cd $prefix/include; find . -name '*.h' -print | sed 's!^./!!') > $tmp 26 27# Check each header. 28while read h 29do 30 echo " - <$h>" 31 32 # Build a test program. 33 cat <<EOF >test.c 34#include <$h> 35EOF 36 37 # Compile the test program. 38 if 39 gcc @STD_CWARNINGS@ @STD_CINCLUDES@ -I$prefix/include -c test.c 2>&1 40 then 41 : 42 else 43 status=1 44 fi 45done <$tmp 46 47rm -f test.c test.o $tmp 48 49exit $status 50