[PATCH] xaudio2: Fix the optional FAudio functions check.

Francois Gouget fgouget at codeweavers.com
Tue Jul 30 11:39:28 CDT 2019


WINE_CHECK_LIB_FUNCS() must be called in WINE_PACKAGE_FLAGS()'s checks
parameter so this happens before CAUDIO_{FLAGS,LIBS} have been mangled
for use by makefiles.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 configure.ac | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

This can cause Wine's compilation to fail if the system-wide library has 
FAudio_CommitOperationSet() but it is in fact linked against a local 
copy that does not have it.

diff --git a/configure.ac b/configure.ac
index a7c45ace738..2b67504e7b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1691,11 +1691,10 @@ if test "x$with_faudio" != "xno"
 then
     WINE_PACKAGE_FLAGS(FAUDIO,[faudio],[-lFAudio],,,
         [AC_CHECK_HEADERS([FAudio.h],
-            [WINE_CHECK_SONAME(FAudio,FAudioCreate,,,[$FAUDIO_LIBS],[[libFAudio*]])])])
-    WINE_CHECK_LIB_FUNCS(\
-        FAudio_CommitOperationSet \
-        F3DAudioInitialize8,
-        [$FAUDIO_LIBS])
+            [WINE_CHECK_SONAME(FAudio,FAudioCreate,,,[$FAUDIO_LIBS],[[libFAudio*]])])
+             WINE_CHECK_LIB_FUNCS([FAudio_CommitOperationSet \
+                                   F3DAudioInitialize8], [$FAUDIO_LIBS])
+            ])
 fi
 WINE_NOTICE_WITH(faudio,[test "x$ac_cv_lib_soname_FAudio" = "x"],
                  [libFAudio ${notice_platform}development files not found, XAudio2 won't be supported.])
-- 
2.20.1



More information about the wine-devel mailing list