[MPlayer-dev-eng] [PATCH] OpenBSD
Björn Sandell
biorn at dce.chalmers.se
Wed May 22 18:59:14 CEST 2002
On Wed, 22 May 2002, Bernd Ernesti wrote:
> On Mon, May 20, 2002 at 02:59:50PM +0200, Björn Sandell wrote:
> > On Mon, 20 May 2002, Bernd Ernesti wrote:
> >
> > > On Mon, May 20, 2002 at 11:09:45AM +0200, Björn Sandell wrote:
> > > >
> > > > libdha/Makefile: -li386 on x86 only
> > > > configure: use libs (ossaudio and i386) when needed instead of always.
> > > > fix check for iconv.
> > > > oss audio is emulated so we don't want it on by default, thus
> > > > we'll look for <soundcard.h> only when --enable-ossaudio is
> > > > used. This might be a tad contorversial, but according to cvs
> > > > logs and source code comments <soundcard.h> is used only on
> > > > OpenBSD.
> > >
> > > And also on NetBSD, thats where the OpenBSD <soundcard.h> come from.
> > >
> > > Your check for "$_ossaudio" = yes break the autodetect of ossaudio
> > > later.
> >
> > Yep, that's the intention. I see no reason to use an emulation layer when
> > native audio is available. Does it break NetBSD (or anything else)?
>
> It doesn't break, but you destroy the autocheck this way.
>
> So the ossaudio check is NO longer an autocheck.
>
> IMHO this is not a good idea and i would like to not this this happens on
> NetBSD.
Ok. Here's a new version of the patch.
Björn Sandell DCE/DFS Sysadmin IT department
Chalmers University of Technology www.dce.chalmers.se
-------------- next part --------------
Index: libdha/Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- libdha/Makefile 12 May 2002 02:18:50 -0000 1.9
+++ libdha/Makefile 22 May 2002 17:04:55 -0000
@@ -17,7 +17,9 @@
CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. -Wall -W
LIBS =
ifeq ($(TARGET_OS),OpenBSD)
+ifeq ($(TARGET_ARCH_X86),yes)
LIBS += -li386
+endif
endif
.SUFFIXES: .c .o
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.476
diff -u -r1.476 configure
--- configure 20 May 2002 03:25:21 -0000 1.476
+++ configure 22 May 2002 17:04:56 -0000
@@ -1411,7 +1411,7 @@
else
_def_malloc='#undef HAVE_MALLOC_H'
fi
-# malloc.h emits a warning in FreeBSD
+# malloc.h emits a warning in FreeBSD and OpenBSD
(freebsd || openbsd) && _def_malloc='#undef HAVE_MALLOC_H'
echores "$_malloc"
@@ -1557,7 +1557,14 @@
else
_def_soundcard='#undef HAVE_SOUNDCARD_H'
fi
+if test openbsd -a "$_ossaudio" != yes ; then
+ _def_soundcard='#undef HAVE_SOUNDCARD_H'
+ _inc_soundcard=''
+ _soundcard='no (--enable-ossaudio to use it)'
+fi
echores "$_soundcard"
+else
+ _def_soundcard='#undef HAVE_SOUNDCARD_H'
fi
echocheck "sys/dvdio.h"
@@ -2605,6 +2612,7 @@
else
if netbsd || openbsd ; then
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/sound"'
+ openbsd && _ld_arch="$_ld_arch -lossaudio"
else
_def_ossaudio_devdsp='#define PATH_DEV_DSP "/dev/dsp"'
fi
@@ -2979,6 +2987,9 @@
_dep_win32='loader/libloader.a'
_codecmodules="win32 $_codecmodules"
echores "yes (using $_win32libdir)"
+ if openbsd ; then
+ x86 && _ld_win32="$_ld_win32 -li386"
+ fi
else
_def_win32='#undef USE_WIN32DLL'
_nocodecmodules="win32 $_nocodecmodules"
@@ -3117,7 +3128,7 @@
_iconv=no
if freebsd ; then
cc_check -lm -lgiconv && _iconv=yes
- elif bsdos ; then
+ elif bsdos || openbsd ; then
cc_check -lm -liconv && _iconv=yes
else
cc_check -lm && _iconv=yes
@@ -3127,6 +3138,7 @@
_def_iconv='#define USE_ICONV 1'
freebsd && _ld_iconv='-lgiconv'
bsdos && _ld_iconv='-liconv'
+ openbsd && _ld_iconv='-liconv'
else
_def_iconv='#undef USE_ICONV'
fi
@@ -3632,7 +3644,7 @@
_ld_arch="$_ld_arch $_ld_pthread $_ld_dl $_ld_dl_dynamic"
bsdos && _ld_arch="$_ld_arch -ldvd"
-if netbsd || openbsd ; then
+if netbsd ; then
_ld_arch="$_ld_arch -lossaudio"
x86 && _ld_arch="$_ld_arch -li386"
fi
More information about the MPlayer-dev-eng
mailing list