From 9e6b34e040cd85ae0966a8a09dee2fde57eb9b6b Mon Sep 17 00:00:00 2001 From: reimar Date: Thu, 29 Jul 2010 08:44:44 +0000 Subject: 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 --- configure | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 0dec63967a..5f9135fff1 100755 --- a/configure +++ b/configure @@ -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' -- cgit v1.2.3