mirror of
https://github.com/mpv-player/mpv
synced 2024-12-30 19:22:11 +00:00
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:
parent
b1502bd15c
commit
9e6b34e040
20
configure
vendored
20
configure
vendored
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user