mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 23:00:41 +00:00
Simplify soundcard.h check.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23764 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
61cf37a2d5
commit
acb5d82934
57
configure
vendored
57
configure
vendored
@ -3118,47 +3118,26 @@ fi
|
|||||||
echores "$_iconv"
|
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"
|
echocheck "soundcard.h"
|
||||||
cat > $TMPC << EOF
|
_soundcard_h=no
|
||||||
#include <soundcard.h>
|
_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; }
|
int main(void) { return 0; }
|
||||||
EOF
|
EOF
|
||||||
_soundcard=no
|
cc_check && _soundcard_h=yes && _res_comment="$header" && break
|
||||||
cc_check && _soundcard=yes
|
done
|
||||||
if linux || test "$_ossaudio" != no ; then
|
|
||||||
# use soundcard.h on Linux, or when OSS support is enabled
|
if test "$_soundcard_h" = yes ; then
|
||||||
echores "$_soundcard"
|
if test $_soundcard_header = "sys/soundcard.h"; then
|
||||||
else
|
_def_sys_soundcard='#define HAVE_SYS_SOUNDCARD_H 1'
|
||||||
# we don't want to use soundcard.h on non-Linux if OSS support not enabled!
|
else
|
||||||
_res_comment= "but ignored!"
|
_def_soundcard='#define HAVE_SOUNDCARD_H 1'
|
||||||
echores "$_soundcard"
|
fi
|
||||||
_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
|
fi
|
||||||
|
echores "$_soundcard_h"
|
||||||
|
|
||||||
|
|
||||||
echocheck "sys/dvdio.h"
|
echocheck "sys/dvdio.h"
|
||||||
@ -4767,7 +4746,7 @@ echocheck "OSS Audio"
|
|||||||
if test "$_ossaudio" = auto ; then
|
if test "$_ossaudio" = auto ; then
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
$_include_soundcard
|
#include <$_soundcard_header>
|
||||||
int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
|
int main(void) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }
|
||||||
EOF
|
EOF
|
||||||
_ossaudio=no
|
_ossaudio=no
|
||||||
@ -4783,7 +4762,7 @@ if test "$_ossaudio" = yes ; then
|
|||||||
else
|
else
|
||||||
cat > $TMPC << EOF
|
cat > $TMPC << EOF
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
$_include_soundcard
|
#include <$_soundcard_header>
|
||||||
#ifdef OPEN_SOUND_SYSTEM
|
#ifdef OPEN_SOUND_SYSTEM
|
||||||
int main(void) { return 0; }
|
int main(void) { return 0; }
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user