Make xanalyser build on Linux.

- Include endian.h instead of machine/endian.h.
  - Include byteswap.h instead of sys/bswap.h.
  - Replace -lossaudio with LIBOSSAUDIO.
This commit is contained in:
minskim 2004-05-03 17:00:42 +00:00
parent c2c1ef6441
commit 44392c7ea0
4 changed files with 25 additions and 29 deletions

View file

@ -1,11 +1,11 @@
$NetBSD: distinfo,v 1.5 2004/05/03 16:25:07 minskim Exp $
$NetBSD: distinfo,v 1.6 2004/05/03 17:00:42 minskim Exp $
SHA1 (xanalyser-1.21.tar.bz2) = abdc1ddaffcb7dd4074672a54798b4b1ec4b0061
Size (xanalyser-1.21.tar.bz2) = 58542 bytes
SHA1 (patch-aa) = 29651c643550679f647b54726fb8d25579cdaaf7
SHA1 (patch-ab) = bcfb8aa9ec253017d93c2f5e7981338b62ee6999
SHA1 (patch-ad) = 7cfcc00ad3bc221264e0480020cfab613b01c359
SHA1 (patch-ae) = 3af76320b46f0945b687f78be6d67a7924f8301c
SHA1 (patch-ab) = 838c49ff3e15cbcd798aea0b3caec59b09f5c482
SHA1 (patch-ad) = 835948759070cfab385e52e78a92494fe96ea140
SHA1 (patch-ae) = 26fd8129f6283672d43e68163c372459e8cb93dc
SHA1 (patch-af) = bf6af0c140a802fb98e82e82ecbfb7240696db09
SHA1 (patch-ag) = 0ae5680df966e534d76d04cddf6a78259d87cbfe
SHA1 (patch-ah) = a8bae5da6db1098ce1520cc49e167fc5999b0dda

View file

@ -1,24 +1,19 @@
$NetBSD: patch-ab,v 1.3 2004/05/03 16:25:07 minskim Exp $
$NetBSD: patch-ab,v 1.4 2004/05/03 17:00:42 minskim Exp $
--- src/DSP.cc.orig 2001-12-01 19:05:15.000000000 -0600
+++ src/DSP.cc
@@ -14,8 +14,8 @@
@@ -14,8 +14,13 @@
#include <math.h>
#include <errno.h>
#include <string.h>
-#include <values.h>
-#include <byteswap.h>
+#include <limits.h>
+#ifdef __linux__
#include <byteswap.h>
+#else
+#include <sys/bswap.h>
+#define bswap_16 bswap16
+#endif
#include "DSP.h"
@@ -168,7 +168,7 @@ DSP::swapbuffer (void* buffer, int count
int n = count / 2;
for (int i = n; i != 0; i--) {
- *tmp_buffer = bswap_16 (*tmp_buffer);
+ *tmp_buffer = bswap16 (*tmp_buffer);
tmp_buffer++;
}
}

View file

@ -1,17 +1,17 @@
$NetBSD: patch-ad,v 1.2 2002/05/12 14:47:12 schmonz Exp $
$NetBSD: patch-ad,v 1.3 2004/05/03 17:00:42 minskim Exp $
--- src/Makefile.in.orig Thu Jan 24 03:49:25 2002
--- src/Makefile.in.orig 2002-01-23 13:49:25.000000000 -0600
+++ src/Makefile.in
@@ -73,7 +73,7 @@
@@ -73,7 +73,7 @@ bin_PROGRAMS = xanalyser
xanalyser_SOURCES = Analyser.cc Analyser.h DSP.cc DSP.h Sample.cc Sample.h Scope.cc Scope.h XAnalyser.ad.h control.cc control.h fft.cc fft.h help.cc help.h help.txt.h main.cc main.h utils.cc utils.h Trans.h
-xanalyser_LDADD = -lXext -lXm -lXt -lSM -lICE -lXmu -lXpm -lX11 # -ldfftw -ldrfftw
+xanalyser_LDADD = -lXext -lXm -lXt -lSM -lICE -lXmu -lXpm -lX11 -lossaudio# -ldfftw -ldrfftw
+xanalyser_LDADD = -lXext -lXm -lXt -lSM -lICE -lXmu -lXpm -lX11 ${LIBOSSAUDIO}# -ldfftw -ldrfftw
EXTRA_DIST = XAnalyser.ad help.txt *.xpm
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -302,8 +302,8 @@
@@ -302,8 +302,8 @@ mostlyclean distclean maintainer-clean
main.cc: XAnalyser.ad.h
@ -22,7 +22,7 @@ $NetBSD: patch-ad,v 1.2 2002/05/12 14:47:12 schmonz Exp $
help.cc: help.txt.h
@@ -311,8 +311,8 @@
@@ -311,8 +311,8 @@ help.txt.h: help.txt
txt2c help.txt > help.txt.h
install-data-hook:
@ -33,5 +33,3 @@ $NetBSD: patch-ad,v 1.2 2002/05/12 14:47:12 schmonz Exp $
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View file

@ -1,19 +1,22 @@
$NetBSD: patch-ae,v 1.2 2002/08/09 01:58:04 dmcmahill Exp $
$NetBSD: patch-ae,v 1.3 2004/05/03 17:00:42 minskim Exp $
--- src/Sample.cc.orig Wed Dec 12 16:36:27 2001
--- src/Sample.cc.orig 2001-12-12 15:36:27.000000000 -0600
+++ src/Sample.cc
@@ -10,8 +10,8 @@
@@ -10,8 +10,12 @@
#include <math.h>
#include <string.h>
#include <errno.h>
-#include <values.h>
-#include <endian.h>
+#include <limits.h>
+#ifdef __linux__
#include <endian.h>
+#else
+#include <machine/endian.h>
+#endif
#include <X11/Xlib.h>
#include <Xm/Xm.h>
@@ -116,7 +116,7 @@ Sample::shot ()
@@ -116,7 +120,7 @@ Sample::shot ()
if (j == 0 || j != length) // EOF
return false;