Commit ee1d8e10 authored by Max Kellermann's avatar Max Kellermann

configure.ac: default to enable_openal=auto

parent 672fc8d7
...@@ -327,8 +327,8 @@ AC_ARG_ENABLE(mpg123, ...@@ -327,8 +327,8 @@ AC_ARG_ENABLE(mpg123,
AC_ARG_ENABLE(openal, AC_ARG_ENABLE(openal,
AS_HELP_STRING([--enable-openal], AS_HELP_STRING([--enable-openal],
[enable OpenAL support (default: disable)]),, [enable OpenAL support (default: auto)]),,
enable_openal=no) enable_openal=auto)
AC_ARG_ENABLE(opus, AC_ARG_ENABLE(opus,
AS_HELP_STRING([--enable-opus], AS_HELP_STRING([--enable-opus],
...@@ -1280,20 +1280,24 @@ dnl ---------------------------------- OpenAL --------------------------------- ...@@ -1280,20 +1280,24 @@ dnl ---------------------------------- OpenAL ---------------------------------
AC_SUBST(OPENAL_CFLAGS,"") AC_SUBST(OPENAL_CFLAGS,"")
AC_SUBST(OPENAL_LIBS,"") AC_SUBST(OPENAL_LIBS,"")
if test x$enable_openal = xyes; then if test x$host_is_darwin = xyes; then
if test x$host_is_darwin = xyes; then if test x$enable_openal != xno; then
AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h], [], [enable_openal=no]) AC_CHECK_HEADERS([OpenAL/al.h OpenAL/alc.h],
if test x$enable_openal = xyes; then [found_openal=yes], [found_openal=no])
OPENAL_LIBS="-framework OpenAL" fi
AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support])
else MPD_AUTO_RESULT(openal, [OpenAL output plugin], [OpenAL not found])
AC_MSG_WARN(OpenAL headers not found -- disabling OpenAL support)
fi if test x$enable_openal = xyes; then
else OPENAL_LIBS="-framework OpenAL"
PKG_CHECK_MODULES([OPENAL], [openal],
AC_DEFINE(HAVE_OPENAL, 1, [Define for OpenAL support]),
enable_openal=no)
fi 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 fi
AM_CONDITIONAL(HAVE_OPENAL, test x$enable_openal = xyes) AM_CONDITIONAL(HAVE_OPENAL, test x$enable_openal = xyes)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment