[PATCH 1/5] configure: Require openal-soft at build-time for xaudio2

Andrew Eikum aeikum at codeweavers.com
Fri Aug 28 08:22:18 CDT 2015


We depend on various openal-soft symbols to build, and we require
openal-soft for basic functionality anyway, so just require it at
build-time.

We still avoid depending on it to load the module, and instead check for
the extension's presence at run-time.

Should fix bug 39165.
---
 configure.ac | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index b592615..aec53f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1738,9 +1738,22 @@ then
                       AC_DEFINE_UNQUOTED(HAVE_OPENAL,1,[Define to 1 if OpenAL is available])],,)
 fi
 WINE_NOTICE_WITH(openal,[test "x$ac_cv_lib_openal" != xyes],
-                 [libopenal ${notice_platform}development files not found (or too old), OpenAL and XAudio2 won't be supported])
+                 [libopenal ${notice_platform}development files not found (or too old), OpenAL won't be supported])
 test "x$ac_cv_lib_openal" = xyes || enable_openal32=${enable_openal32:-no}
-test "x$ac_cv_lib_openal" = xyes || enable_xaudio2_7=${enable_xaudio2_7:-no}
+
+dnl **** Check for openal-soft ****
+if test "x$ac_cv_lib_openal" = xyes
+then
+    AC_CACHE_CHECK([for openal-soft], ac_cv_have_openalsoft,
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+            [[#include <AL/alext.h>
+LPALCRENDERSAMPLESSOFT x;]])],[ac_cv_have_openalsoft=yes],[ac_cv_have_openalsoft=no]))
+fi
+if test "x$ac_cv_have_openalsoft" != xyes
+then
+    WINE_NOTICE([openal-soft ${notice_platform}development files not found (or too old), XAudio2 won't be supported])
+    enable_xaudio2_7=${enable_xaudio2_7:-no}
+fi
 
 dnl **** Check for libkstat ****
 if test "$ac_cv_header_kstat_h" = "yes"
-- 
2.5.0





More information about the wine-patches mailing list