Put OSS CFLAGS in their own variable rather than modifying CPPFLAGS

Originally committed to SVN as r6098.
This commit is contained in:
Thomas Goyne 2011-12-22 21:24:51 +00:00
parent 71109a87e1
commit f809fa4104
3 changed files with 5 additions and 3 deletions

View File

@ -96,6 +96,7 @@ CFLAGS_LIBCURL = @LIBCURL_CFLAGS@
CFLAGS_LIBPULSE = @LIBPULSE_CFLAGS@
CFLAGS_LUA = @LUA_CFLAGS@
CFLAGS_OPENAL = @OPENAL_CFLAGS@
CFLAGS_OSS = @OSS_CFLAGS@
CFLAGS_PORTAUDIO = @PORTAUDIO_CFLAGS@
CFLAGS_PTHREAD = @PTHREAD_CFLAGS@
CFLAGS_UCHARDET = -I../universalchardet

View File

@ -423,17 +423,17 @@ AC_SUBST(with_openal)
######
## OSS
######
AC_ARG_VAR([OSS_CFLAGS], [CFLAGS to use for OSS [auto]])
AC_ARG_WITH(oss,
AS_HELP_STRING([--without-oss],
[build without OSS audio provider [auto]]))
AS_IF([test x$with_oss = xno], [oss_disabled="(disabled)"], [
AS_IF([test -f "/etc/oss.conf"], [
AS_IF([test -z "$OSS_CFLAGS" && test -f "/etc/oss.conf"], [
. /etc/oss.conf
CPPFLAGS="$CPPFLAGS -I${OSSLIBDIR}/include/sys"
OSS_CFLAGS="-I${OSSLIBDIR}/include/sys"
])
AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [with_oss="yes"], [with_oss="no"])
# XXX: maybe check if OSS works
])
AS_IF([test x$with_oss = xyes], AC_DEFINE(WITH_OSS, 1, [Enable OSS support]))

View File

@ -51,6 +51,7 @@ endif
ifeq (yes, $(HAVE_OSS))
SRC_OPT += audio_player_oss.cpp
audio_player_oss.o: CXXFLAGS += $(CFLAGS_OSS)
endif
#######################