diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-07-29 08:44:44 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:14:46 +0200 |
commit | 9e6b34e040cd85ae0966a8a09dee2fde57eb9b6b (patch) | |
tree | d1256dc05b7454ff64422f4993f41148457821ca /configure | |
parent | b1502bd15c9b959a2413fa0fc2f67c608f35e17e (diff) | |
download | mpv-9e6b34e040cd85ae0966a8a09dee2fde57eb9b6b.tar.bz2 mpv-9e6b34e040cd85ae0966a8a09dee2fde57eb9b6b.tar.xz |
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
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -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' |