configure: add header_check_broken, use for cdio

Make the sys/cdio.h header test work by explictly including
sys/types.h before.
Broken headers are a Solaris and BSD tradition, hoping
for them to get their act together is hopeless, so we
work around it (for now at least).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31855 b3059339-0415-0410-9bf9-f77b7e298cf2

Add a special header_check_broken to be used for broken
system headers taht do not include all dependencies
and use it for the Solaris uscsi header.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31856 b3059339-0415-0410-9bf9-f77b7e298cf2

Use header_check_broken to simplify cdio.h check.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31857 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-07-29 08:44:44 +00:00 committed by Uoti Urpala
parent b1502bd15c
commit 9e6b34e040
1 changed files with 18 additions and 2 deletions

20
configure vendored
View File

@ -106,6 +106,20 @@ EOF
compile_check $TMPC $@
}
# this is a special check only to be
# used for broken headers that do not
# include all dependencies
header_check_broken() {
cat > $TMPC << EOF
#include <$1>
#include <$2>
int main(void) { return 0; }
EOF
shift
shift
compile_check $TMPC $@
}
yasm_check() {
echo >> "$TMPLOG"
cat "$TMPS" >> "$TMPLOG"
@ -3492,7 +3506,8 @@ echores "$_dvdio"
echocheck "sys/cdio.h"
_cdio=no
header_check sys/cdio.h && _cdio=yes
# at least OpenSolaris has a broken cdio.h
header_check_broken sys/types.h sys/cdio.h && _cdio=yes
if test "$_cdio" = yes ; then
def_cdio='#define DVD_STRUCT_IN_SYS_CDIO_H 1'
else
@ -3553,7 +3568,8 @@ fi #if hpux
if sunos; then
echocheck "userspace SCSI headers (Solaris)"
_sol_scsi_h=no
header_check sys/scsi/scsi_types.h && header_check sys/scsi/impl/uscsi.h &&
header_check sys/scsi/scsi_types.h &&
header_check_broken sys/types.h sys/scsi/impl/uscsi.h &&
_sol_scsi_h=yes
if test "$_sol_scsi_h" = yes ; then
def_sol_scsi_h='#define SOLARIS_USCSI 1'