shithub: sox

Download patch

ref: 54fb906c132921d6220a32530a216e09db1dcf51
parent: 2c4651293b18eceac8cbb39ed4d3e48667941d52
author: cbagwell <cbagwell>
date: Tue Mar 9 14:14:54 EST 1999

Enhancing unistd.h detection

--- a/Makefile.unx
+++ b/Makefile.unx
@@ -182,6 +182,10 @@
 #  MISC DEFINES remember to include them on one line so it isn't just
 #  redefined.
 #
+# If your sysetem has unistd.h then you'll most like need to add 
+# HAVE_UNISTD_H to your misd defines.
+# MISC_DEFINES = - DHAVE_UNISTD_H
+#
 # Testing new improved rate code.  You can use the older version if ther
 # are problems.
 # MISC_DEFINES	= -DUSE_OLD_RATE
--- a/configure.in
+++ b/configure.in
@@ -102,7 +102,7 @@
 
 dnl Checks for header files.
 
-AC_CHECK_HEADERS(getopt.h)
+AC_CHECK_HEADERS(getopt.h unistd.h)
 
 dnl Checks for library functions.
 
@@ -172,7 +172,11 @@
 		)
 	if test "$ac_cv_dev_oss_dsp" = yes
 	then
-		oss_dsp=yes
+		AC_CHECK_HEADER(sys/soundcard.h, oss_dsp=yes)
+		if test "$oss_dsp" = auto
+		then
+			AC_WARN([No soundcard.h to compile with OSS /dev/dsp])
+		fi
 	fi
 fi
 if test "$oss_dsp" = yes
--- a/src/8svx.c
+++ b/src/8svx.c
@@ -12,7 +12,7 @@
 #include <perror.h>
 #endif
 
-#ifdef unix
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>	/* For SEEK_* defines if not found in stdio */
 #endif
 
--- a/src/aiff.c
+++ b/src/aiff.c
@@ -40,7 +40,7 @@
 #include <string.h>
 #include <stdio.h>
 
-#ifdef unix
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>	/* For SEEK_* defines if not found in stdio */
 #endif
 
--- a/src/cvsd.c
+++ b/src/cvsd.c
@@ -41,7 +41,7 @@
 #include <time.h>
 #include <stdio.h>
 
-#ifdef unix
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>	/* For SEEK_* defines if not found in stdio */
 #endif
 
--- a/src/maud.c
+++ b/src/maud.c
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#ifdef unix
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>	/* For SEEK_* defines if not found in stdio */
 #endif
 
--- a/src/oss.c
+++ b/src/oss.c
@@ -27,7 +27,6 @@
 #include <fcntl.h>
 #include <sys/soundcard.h>
 #include <sys/ioctl.h>
-#include <signal.h>
 #include "st.h"
 #include "libst.h"
 
--- a/src/reverse.c
+++ b/src/reverse.c
@@ -15,7 +15,7 @@
 #include <math.h>
 #include <stdio.h>
 
-#ifdef unix
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>	/* For SEEK_* defines if not found in stdio */
 #endif
 
--- a/src/sndrtool.c
+++ b/src/sndrtool.c
@@ -11,7 +11,7 @@
 #include <string.h>
 #include <stdio.h>
 
-#ifdef unix
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>	/* For SEEK_* defines if not found in stdio */
 #endif
 
--- a/src/sox.c
+++ b/src/sox.c
@@ -36,7 +36,7 @@
 #include <sys/types.h>		/* for fstat() */
 #include <sys/stat.h>		/* for fstat() */
 
-#ifdef unix
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>		/* for unlink() */
 #endif
 
--- a/src/sunaudio.c
+++ b/src/sunaudio.c
@@ -27,7 +27,6 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <fcntl.h>
-#include <signal.h>
 #include "st.h"
 #include "libst.h"