[MPlayer-dev-eng] [PATCH] OpenBSD

Björn Sandell biorn at dce.chalmers.se
Mon May 20 11:09:45 CEST 2002


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.

Björn Sandell       DCE/DFS Sysadmin       IT department
Chalmers University of Technology    www.dce.chalmers.se
-------------- next part --------------
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	20 May 2002 08:57:44 -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"
 
@@ -1527,7 +1527,6 @@
 fi
 echores "yes (using $_ld_pthread)"
 
-
 echocheck "sys/soundcard.h"
 cat > $TMPC << EOF
 #include <sys/soundcard.h>
@@ -1543,7 +1542,7 @@
 fi
 echores "$_sys_soundcard"
 
-if test "$_sys_soundcard" != yes ; then
+if test "$_sys_soundcard" != yes -a "$_ossaudio" = yes ; then
 echocheck "soundcard.h"
 cat > $TMPC << EOF
 #include <soundcard.h>
@@ -1558,6 +1557,8 @@
   _def_soundcard='#undef HAVE_SOUNDCARD_H'
 fi
 echores "$_soundcard"
+else
+  _def_soundcard='#undef HAVE_SOUNDCARD_H'
 fi
 
 echocheck "sys/dvdio.h"
@@ -2605,6 +2606,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 +2981,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 +3122,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 +3132,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 +3638,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
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	20 May 2002 08:57:44 -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


More information about the MPlayer-dev-eng mailing list