Commit 557c4334 authored by Naveen Narayanan's avatar Naveen Narayanan Committed by Alexandre Julliard

wineoss: Fix the -lossaudio check.

Only check for libossaudio if compiling wineoss.drv and the headers are recent enough. Also only wineoss.drv needs to be linked with libossaudio so put the link options in OSS4_LIBS. Signed-off-by: 's avatarFrancois Gouget <fgouget@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent d263ba97
......@@ -666,6 +666,7 @@ UNWIND_LIBS
UNWIND_CFLAGS
UDEV_LIBS
UDEV_CFLAGS
OSS4_LIBS
OSS4_CFLAGS
ALSA_LIBS
GSTREAMER_LIBS
......@@ -6863,51 +6864,6 @@ _ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
if ${ac_cv_lib_ossaudio__oss_ioctl+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lossaudio $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char _oss_ioctl ();
int
main ()
{
return _oss_ioctl ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_ossaudio__oss_ioctl=yes
else
ac_cv_lib_ossaudio__oss_ioctl=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBOSSAUDIO 1
_ACEOF
LIBS="-lossaudio $LIBS"
fi
OPENGL_LIBS=""
......@@ -14721,6 +14677,47 @@ _ACEOF
OSS4_CFLAGS="$ac_oss_incl"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
if ${ac_cv_lib_ossaudio__oss_ioctl+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lossaudio $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char _oss_ioctl ();
int
main ()
{
return _oss_ioctl ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_ossaudio__oss_ioctl=yes
else
ac_cv_lib_ossaudio__oss_ioctl=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes; then :
OSS4_LIBS="-lossaudio"
fi
fi
fi
......@@ -19825,6 +19822,7 @@ GSTREAMER_CFLAGS = $GSTREAMER_CFLAGS
GSTREAMER_LIBS = $GSTREAMER_LIBS
ALSA_LIBS = $ALSA_LIBS
OSS4_CFLAGS = $OSS4_CFLAGS
OSS4_LIBS = $OSS4_LIBS
UDEV_CFLAGS = $UDEV_CFLAGS
UDEV_LIBS = $UDEV_LIBS
UNWIND_CFLAGS = $UNWIND_CFLAGS
......
......@@ -410,8 +410,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,"")
......@@ -1657,8 +1655,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],
......
MODULE = wineoss.drv
IMPORTS = uuid ole32 user32 advapi32
DELAYIMPORTS = winmm
EXTRALIBS = $(OSS4_LIBS)
EXTRAINCL = $(OSS4_CFLAGS)
C_SRCS = \
......
......@@ -404,9 +404,6 @@
/* Define to 1 if you have the `kstat' library (-lkstat). */
#undef HAVE_LIBKSTAT
/* Define to 1 if you have the `ossaudio' library (-lossaudio). */
#undef HAVE_LIBOSSAUDIO
/* Define to 1 if you have the `procstat' library (-lprocstat). */
#undef HAVE_LIBPROCSTAT
......
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