[vorbis-dev] NetBSD patches

Monty xiphmont at xiph.org
Mon Jul 31 11:27:20 PDT 2000



------- Forwarded Message

The following patches should fix vorbis-tools to build on NetBSD.  I'm
not including the diff to the configure scripts, so you'll need to
rerun autoconf in the toplevel and libao directory after applying
these patches to the configure.in files.

It also appears that vorbis-tools/libao/ao_libs.inc is automatically
generated by a configure script but checked into CVS.  It almost
certainly should not be checked into CVS.
(vorbis-tools/libao/Makefile and vorbis-tools/libao/config.log and
vorbis-tools/libao/config.status seem to have had a `cvs remove' done
to it recently, I think, but if not, that should happen.)

These patches also assume that you've gotten a current copy of GNU
getopt.c and getopt1.c and getopt.h; figuring out where the hell the
canonical copy of it is stored these days is left as an excercise for
the reader.  Note that I put the getopt files in the vorbis-tools
directory; they probably really belong in a library directory.

Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/vorbis/configure.in,v
retrieving revision 1.19
diff -u -p -r1.19 configure.in
- --- configure.in	2000/07/22 02:03:45	1.19
+++ configure.in	2000/07/30 03:12:03
@@ -37,6 +37,7 @@ AC_CHECK_PROG(INSTALL,install,install)
 #AC_CHECK_LIB(m, cos, LIBS="-lm"; AC_DEFINE(HAVE_LIBM), LIBS="")
 # We no longer use config.h
 AC_CHECK_LIB(m, cos, LIBS="-lm", LIBS="")
+AC_CHECK_LIB(ossaudio, _oss_ioctl)
 
 dnl Set some target options
 if test -z "$GCC"; then
Index: vorbis-tools/Makefile.in
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vorbis-tools/Makefile.in,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile.in
- --- vorbis-tools/Makefile.in	2000/07/22 02:02:09	1.8
+++ vorbis-tools/Makefile.in	2000/07/30 03:12:04
@@ -40,11 +40,12 @@ profile:
 
 target: libao vorbize ogg123
 
- -ogg123: ogg123.o libao/libao.a 
- -	$(CC) $(CFLAGS) ogg123.o -o ogg123 $(LIBS) libao/libao.a
+ogg123: ogg123.o libao/libao.a getopt.o getopt1.o
+	$(CC) $(CFLAGS) ogg123.o -o ogg123 getopt.o getopt1.o \
+		$(LIBS) libao/libao.a
 
- -vorbize: vorbize.o
- -	$(CC) $(CFLAGS) vorbize.o -o \
+vorbize: vorbize.o getopt.o getopt1.o
+	$(CC) $(CFLAGS) vorbize.o getopt.o getopt1.o -o \
                         vorbize $(LIBS)
 
 libao:
Index: vorbis-tools/vorbize.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vorbis-tools/vorbize.c,v
retrieving revision 1.7
diff -u -p -r1.7 vorbize.c
- --- vorbis-tools/vorbize.c	2000/07/02 03:41:44	1.7
+++ vorbis-tools/vorbize.c	2000/07/30 03:12:05
@@ -48,7 +48,7 @@
 #include <string.h>
 #include <time.h>
 #include <math.h>
- -#include <getopt.h>
+#include "getopt.h"
 #include "vorbis/modes.h"
 #include "riff.h"
 
Index: vorbis-tools/libao/ao_oss.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vorbis-tools/libao/ao_oss.c,v
retrieving revision 1.1
diff -u -p -r1.1 ao_oss.c
- --- vorbis-tools/libao/ao_oss.c	2000/07/22 01:57:05	1.1
+++ vorbis-tools/libao/ao_oss.c	2000/07/30 03:12:05
@@ -32,6 +32,8 @@
 #include <math.h>
 #if defined(__OpenBSD__)
 #include <soundcard.h>
+#elif defined(__NetBSD__)
+#include <soundcard.h>
 #elif defined(__FreeBSD__)
 #include <machine/soundcard.h>
 #else
@@ -69,7 +71,11 @@ ao_oss_parse_options(ao_oss_internal_t *
         }
 
         if (state->dev == NULL)
+#ifdef __NetBSD__
+		state->dev = strdup("/dev/audio");
+#else
                 state->dev = strdup("/dev/dsp");
+#endif
 }
 
 /*
Index: vorbis-tools/libao/configure.in
===================================================================
RCS file: /usr/local/cvsroot/vorbis/vorbis-tools/libao/configure.in,v
retrieving revision 1.1
diff -u -p -r1.1 configure.in
- --- vorbis-tools/libao/configure.in	2000/07/22 01:57:05	1.1
+++ vorbis-tools/libao/configure.in	2000/07/30 03:12:07
@@ -95,7 +95,7 @@ dnl --- Figure out which ao_* files to c
 
 dnl Operating System Specific Files
 case $host in
- -        *-*-linux*|*-openbsd*|*-freebsd*) 
+        *-*-linux*|*-openbsd*|*-freebsd*|*-netbsd*) 
                     LIBAO_OBJS="$LIBAO_OBJS ao_oss.o"
                     LIBAO_FLAGS="$LIBAO_FLAGS -DAO_COMPILE_OSS 
-DAO_DEFAULT=AO_OSS";;
         *-irix*)

------- End of Forwarded Message

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list