Only check for libossaudio if compiling wineoss.drv and the headers are recent enough. Also only wineoss.drv needs to be linked with libossudio so put the link options in OSS4_LIBS. But do not disable building wineoss.drv if the library is missing since it's not needed for wineoss.drv on Linux.
From: Naveen Narayanan zerous@nocebo.space Signed-off-by: Francois Gouget fgouget@codeweavers.com ---
v2: Fixed linking on Linux. v3: Fixed zerous' name.
configure.ac | 8 ++++---- dlls/wineoss.drv/Makefile.in | 1 + 2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac index e58a9242397..c202c9a2f75 100644 --- a/configure.ac +++ b/configure.ac @@ -407,8 +407,6 @@ dnl **** Check for some libraries ****
dnl Check for -li386 for NetBSD and OpenBSD AC_CHECK_LIB(i386,i386_set_ldt) -dnl Check for -lossaudio for NetBSD -AC_CHECK_LIB(ossaudio,_oss_ioctl)
AC_SUBST(OPENGL_LIBS,"")
@@ -1655,8 +1653,10 @@ then CPPFLAGS="$CPPFLAGS $ac_oss_incl" AC_CHECK_HEADER([sys/soundcard.h], [AC_CHECK_MEMBERS([oss_sysinfo.numaudioengines], - [AC_SUBST(OSS4_CFLAGS,"$ac_oss_incl")],, - [#include <sys/soundcard.h>])]) + [AC_SUBST(OSS4_CFLAGS,"$ac_oss_incl") + AC_CHECK_LIB(ossaudio,_oss_ioctl, + [AC_SUBST(OSS4_LIBS,"-lossaudio")])],, + [#include <sys/soundcard.h>])]) CPPFLAGS="$ac_save_CPPFLAGS" fi WINE_NOTICE_WITH(oss,[test "x$ac_cv_member_oss_sysinfo_numaudioengines" != xyes], diff --git a/dlls/wineoss.drv/Makefile.in b/dlls/wineoss.drv/Makefile.in index d129f13fa19..a2ae5f53a5c 100644 --- a/dlls/wineoss.drv/Makefile.in +++ b/dlls/wineoss.drv/Makefile.in @@ -1,6 +1,7 @@ MODULE = wineoss.drv IMPORTS = uuid ole32 user32 advapi32 DELAYIMPORTS = winmm +EXTRALIBS = $(OSS4_LIBS) EXTRAINCL = $(OSS4_CFLAGS)
C_SRCS = \