diff options
author | Max Kellermann <max@duempel.org> | 2013-10-30 19:02:59 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-30 19:02:59 +0100 |
commit | ee1d8e10918d6fc05efee80fa2c94bad4cea848e (patch) | |
tree | 1f0a0417739c08ddaa3232101c980d2b86109ed6 /configure.ac | |
parent | 672fc8d79b454ccc10f0bee2c6bec9098a41e91d (diff) | |
download | mpd-ee1d8e10918d6fc05efee80fa2c94bad4cea848e.tar.gz mpd-ee1d8e10918d6fc05efee80fa2c94bad4cea848e.tar.xz mpd-ee1d8e10918d6fc05efee80fa2c94bad4cea848e.zip |
configure.ac: default to enable_openal=auto
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index b38f2436b..cf8dce7ac 100644 --- a/configure.ac +++ b/configure.ac @@ -327,8 +327,8 @@ AC_ARG_ENABLE(mpg123, AC_ARG_ENABLE(openal, AS_HELP_STRING([--enable-openal], - [enable OpenAL support (default: disable)]),, - enable_openal=no) + [enable OpenAL support (default: auto)]),, + enable_openal=auto) AC_ARG_ENABLE(opus, AS_HELP_STRING([--enable-opus], @@ -1280,20 +1280,24 @@ dnl ---------------------------------- OpenAL --------------------------------- AC_SUBST(OPENAL_CFLAGS,"") AC_SUBST(OPENAL_LIBS,"") -if test x$enable_openal = xyes; then - if test x$host_is_darwin = 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) +if test x$host_is_darwin = xyes; then + if test x$enable_openal != xno; then + AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h], + [found_openal=yes], [found_openal=no]) + fi + + MPD_AUTO_RESULT(openal, [OpenAL output plugin], [OpenAL not found]) + + if test x$enable_openal = xyes; then + OPENAL_LIBS="-framework OpenAL" fi +else + MPD_AUTO_PKG(openal, [OPENAL], [openal], + [OpenAL output plugin], [OpenAL not found]) +fi + +if test x$enable_openal = xyes; then + AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support]) fi AM_CONDITIONAL(HAVE_OPENAL, test x$enable_openal = xyes) |