Mercurial > mplayer.hg
changeset 23744:3ef547b3774a
Simplify soundcard.h check.
author | diego |
---|---|
date | Wed, 11 Jul 2007 10:43:25 +0000 |
parents | eb8cc193b661 |
children | 8367932d118e |
files | configure |
diffstat | 1 files changed, 19 insertions(+), 40 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Wed Jul 11 10:38:21 2007 +0000 +++ b/configure Wed Jul 11 10:43:25 2007 +0000 @@ -3118,47 +3118,26 @@ echores "$_iconv" -echocheck "sys/soundcard.h" -cat > $TMPC << EOF -#include <sys/soundcard.h> -int main(void) { return 0; } -EOF -_sys_soundcard=no -cc_check && _sys_soundcard=yes -if test "$_sys_soundcard" = yes ; then - _def_sys_soundcard='#define HAVE_SYS_SOUNDCARD_H 1' - _include_soundcard='#include <sys/soundcard.h>' -else - _def_sys_soundcard='#undef HAVE_SYS_SOUNDCARD_H' -fi -echores "$_sys_soundcard" - -if test "$_sys_soundcard" != yes ; then echocheck "soundcard.h" -cat > $TMPC << EOF -#include <soundcard.h> +_soundcard_h=no +_def_soundcard='#undef HAVE_SOUNDCARD_H' +_def_sys_soundcard='#undef HAVE_SYS_SOUNDCARD_H' +for _soundcard_header in "sys/soundcard.h" "soundcard.h"; do + cat > $TMPC << EOF +#include <$_soundcard_header> int main(void) { return 0; } EOF -_soundcard=no -cc_check && _soundcard=yes -if linux || test "$_ossaudio" != no ; then - # use soundcard.h on Linux, or when OSS support is enabled - echores "$_soundcard" -else - # we don't want to use soundcard.h on non-Linux if OSS support not enabled! - _res_comment= "but ignored!" - echores "$_soundcard" - _soundcard=no -fi -if test "$_soundcard" = yes ; then - _def_soundcard='#define HAVE_SOUNDCARD_H 1' - _include_soundcard='#include <soundcard.h>' -else - _def_soundcard='#undef HAVE_SOUNDCARD_H' -fi -else - _def_soundcard='#undef HAVE_SOUNDCARD_H' -fi + cc_check && _soundcard_h=yes && _res_comment="$header" && break +done + +if test "$_soundcard_h" = yes ; then + if test $_soundcard_header = "sys/soundcard.h"; then + _def_sys_soundcard='#define HAVE_SYS_SOUNDCARD_H 1' + else + _def_soundcard='#define HAVE_SOUNDCARD_H 1' + fi +fi +echores "$_soundcard_h" echocheck "sys/dvdio.h" @@ -4767,7 +4746,7 @@ if test "$_ossaudio" = auto ; then cat > $TMPC << EOF #include <sys/ioctl.h> -$_include_soundcard +#include <$_soundcard_header> int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; } EOF _ossaudio=no @@ -4783,7 +4762,7 @@ else cat > $TMPC << EOF #include <sys/ioctl.h> -$_include_soundcard +#include <$_soundcard_header> #ifdef OPEN_SOUND_SYSTEM int main(void) { return 0; } #else