1
mirror of https://github.com/mpv-player/mpv synced 2024-08-04 14:59:58 +02:00

build: only check 4Front OSS after passing its CFLAGS

This commit is contained in:
bugmen0t 2013-11-23 14:15:26 +00:00 committed by Stefano Pigozzi
parent 2aeeb28dd1
commit f26fb0098f

View File

@ -88,16 +88,16 @@ def __get_osslibdir__():
def __check_oss_headers__(ctx, dependency_identifier): def __check_oss_headers__(ctx, dependency_identifier):
import os import os
real_oss = ctx.check_cc(fragment=load_fragment('oss_audio_header.c'), osscflags = ''
use='soundcard') osslibdir = __get_osslibdir__()
if osslibdir:
ossincdir = os.path.join(osslibdir, 'include')
soundcard_h = os.path.join(ossincdir, 'sys', 'soundcard.h')
if os.path.exists(soundcard_h):
osscflags = '-I{0}'.format(ossincdir)
if real_oss: ctx.check_cc(fragment=load_fragment('oss_audio_header.c'), use='soundcard',
if os.path.exists('/etc/oss.conf'): cflags=osscflags)
osslibdir = __get_osslibdir__()
ossincdir = os.path.join(osslibdir, 'include')
soundcard_h = os.path.join(ossincdir, 'sys', 'soundcard.h')
if os.path.exists(soundcard_h):
ctx.env.CFLAGS.append('-I{0}'.format(ossincdir))
return True return True