diff options
author | Serge Ziryukin <ftrvxmtrx@gmail.com> | 2009-09-07 15:01:38 +0300 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-09-07 15:52:32 +0200 |
commit | 761771ad245ef6103862e4cc6bb5efdac8a17a84 (patch) | |
tree | bc433622a6ee8648815d876cbe2e5cd8bc084b6a | |
parent | f5f4a9da6b14fbb7d25bcff24d8778ce80157671 (diff) | |
download | mpd-761771ad245ef6103862e4cc6bb5efdac8a17a84.tar.gz mpd-761771ad245ef6103862e4cc6bb5efdac8a17a84.tar.xz mpd-761771ad245ef6103862e4cc6bb5efdac8a17a84.zip |
output/openal: support OpenAL plugin on Mac OS X
Diffstat (limited to '')
-rw-r--r-- | configure.ac | 16 | ||||
-rw-r--r-- | src/output/openal_plugin.c | 6 |
2 files changed, 19 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index d30e89229..e221855ca 100644 --- a/configure.ac +++ b/configure.ac @@ -791,9 +791,19 @@ fi AM_CONDITIONAL(HAVE_OSS, test x$enable_oss = xyes) if test x$enable_openal = xyes; then - PKG_CHECK_MODULES([OPENAL], [openal], - AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support]), - enable_openal=no) + if test x$enable_osx = xyes; then + AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h], [], [enable_openal=no]) + if test x$enable_openal = xyes; then + OPENAL_LIBS="-framework OpenAL" + AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support]) + else + AC_MSG_WARN(OpenAL headers not found -- disabling OpenAL support) + fi + else + PKG_CHECK_MODULES([OPENAL], [openal], + AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support]), + enable_openal=no) + fi fi if test x$enable_openal = xyes; then diff --git a/src/output/openal_plugin.c b/src/output/openal_plugin.c index e60e378d1..92ee82ef3 100644 --- a/src/output/openal_plugin.c +++ b/src/output/openal_plugin.c @@ -19,11 +19,17 @@ #include "../output_api.h" #include "../timer.h" +#include "config.h" #include <glib.h> +#ifndef HAVE_OSX #include <AL/al.h> #include <AL/alc.h> +#else +#include <OpenAL/al.h> +#include <OpenAL/alc.h> +#endif #undef G_LOG_DOMAIN #define G_LOG_DOMAIN "openal" |