configure.ac: OSS portability
authorStéphane Loeuillet <gstreamer@leroutier.net>
Mon, 7 Jun 2004 13:40:08 +0000 (13:40 +0000)
committerStéphane Loeuillet <gstreamer@leroutier.net>
Mon, 7 Jun 2004 13:40:08 +0000 (13:40 +0000)
Original commit message from CVS:
* configure.ac: OSS portability
* ext/arts/gst_arts.c: idem
* sys/oss/gstosselement.c: idem
* sys/oss/gstossmixer.c: idem
* sys/oss/gstosssink.c: idem
* sys/oss/gstosssrc.c: idem
* sys/oss/oss_probe.c: idem
- check for soundcard.h in different places for some BSD

ChangeLog
configure.ac
sys/oss/gstosselement.c
sys/oss/gstossmixer.c
sys/oss/gstosssink.c
sys/oss/gstosssrc.c
sys/oss/oss_probe.c

index e1f125e..d5192f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-06-07  Stephane Loeuillet  <stephane.loeuillet@tiscali.fr>
+
+       * configure.ac: OSS portability
+       * ext/arts/gst_arts.c: idem
+       * sys/oss/gstosselement.c: idem
+       * sys/oss/gstossmixer.c: idem
+       * sys/oss/gstosssink.c: idem
+       * sys/oss/gstosssrc.c: idem
+       * sys/oss/oss_probe.c: idem
+         - check for soundcard.h in different places for some BSD
+
 2004-06-07  Jan Schmidt <thaytan@mad.scientist.com>
        * AUTHORS:
        Add me to the authors file
index f33696f..9503b9f 100644 (file)
@@ -446,10 +446,26 @@ GST_CHECK_FEATURE(DXR3, [DXR3 hardware MPEG DVD decoder],
                     HAVE_DXR3=no ] )
 ])
 
-dnl *** OSS audio ***
+dnl *** OSS audio *** (Linux, *BSD)
 translit(dnm, m, l) AM_CONDITIONAL(USE_OSS, true)
 GST_CHECK_FEATURE(OSS, [OSS audio], osssrc osssink, [
-  AC_CHECK_HEADER(sys/soundcard.h, HAVE_OSS="yes", HAVE_OSS="no")
+  HAVE_OSS="yes"
+  dnl Linux and newer BSD versions :
+  AC_CHECK_HEADER(sys/soundcard.h, [
+    AC_DEFINE(HAVE_OSS_INCLUDE_IN_SYS,, [Define if OSS includes are in /sys/])
+    ] , [
+    dnl Some old BSD versions :
+    AC_CHECK_HEADER(soundcard.h, [
+      AC_DEFINE(HAVE_OSS_INCLUDE_IN_ROOT,, [Define if OSS includes are in /])
+      ], [
+      dnl Some old BSD versions :
+      AC_CHECK_HEADER(machine/soundcard.h, [
+        AC_DEFINE(HAVE_OSS_INCLUDE_IN_MACHINE,, [Define if OSS includes are in /machine/])
+        ], [
+        HAVE_OSS="no"
+      ])
+    ])
+  ])
 ])
 
 dnl *** OS X audio ***
index 4c3512f..0e57d47 100644 (file)
 #include <sys/stat.h>
 #include <sys/ioctl.h>
 #include <fcntl.h>
-#include <sys/soundcard.h>
 #include <unistd.h>
 #include <errno.h>
 #include <string.h>
 
+#ifdef HAVE_OSS_INCLUDE_IN_SYS
+#include <sys/soundcard.h>
+#else
+
+#ifdef HAVE_OSS_INCLUDE_IN_ROOT
+#include <soundcard.h>
+#else
+
+#include <machine/soundcard.h>
+
+#endif /* HAVE_OSS_INCLUDE_IN_ROOT */
+
+#endif /* HAVE_OSS_INCLUDE_IN_SYS */
+
 #include <gst/propertyprobe/propertyprobe.h>
 
 #include "gstosselement.h"
@@ -987,7 +1000,21 @@ gst_osselement_change_state (GstElement * element)
 
 
 #if 0
+
+#ifdef HAVE_OSS_INCLUDE_IN_SYS
 #include <sys/soundcard.h>
+#else
+
+#ifdef HAVE_OSS_INCLUDE_IN_ROOT
+#include <soundcard.h>
+#else
+
+#include <machine/soundcard.h>
+
+#endif /* HAVE_OSS_INCLUDE_IN_ROOT */
+
+#endif /* HAVE_OSS_INCLUDE_IN_SYS */
+
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdio.h>
index 39b0d7c..274d120 100644 (file)
 #include <string.h>
 #include <errno.h>
 #include <sys/ioctl.h>
+
+#ifdef HAVE_OSS_INCLUDE_IN_SYS
 #include <sys/soundcard.h>
+#else
+
+#ifdef HAVE_OSS_INCLUDE_IN_ROOT
+#include <soundcard.h>
+#else
+
+#include <machine/soundcard.h>
+
+#endif /* HAVE_OSS_INCLUDE_IN_ROOT */
+
+#endif /* HAVE_OSS_INCLUDE_IN_SYS */
 
 #include "gstossmixer.h"
 
index befb57f..1f9e6ff 100644 (file)
 #include "config.h"
 #endif
 #include <sys/ioctl.h>
-#include <sys/soundcard.h>
 #include <errno.h>
 #include <unistd.h>
 #include <string.h>
 
+#ifdef HAVE_OSS_INCLUDE_IN_SYS
+#include <sys/soundcard.h>
+#else
+
+#ifdef HAVE_OSS_INCLUDE_IN_ROOT
+#include <soundcard.h>
+#else
+
+#include <machine/soundcard.h>
+
+#endif /* HAVE_OSS_INCLUDE_IN_ROOT */
+
+#endif /* HAVE_OSS_INCLUDE_IN_SYS */
+
 #include "gstosssink.h"
 
 /* elementfactory information */
index 5b44823..31d9fc1 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <sys/soundcard.h>
 #include <sys/ioctl.h>
 #include <errno.h>
 #include <unistd.h>
 #include <string.h>
 
+#ifdef HAVE_OSS_INCLUDE_IN_SYS
+#include <sys/soundcard.h>
+#else
+
+#ifdef HAVE_OSS_INCLUDE_IN_ROOT
+#include <soundcard.h>
+#else
+
+#include <machine/soundcard.h>
+
+#endif /* HAVE_OSS_INCLUDE_IN_ROOT */
+
+#endif /* HAVE_OSS_INCLUDE_IN_SYS */
+
 #include <gstosssrc.h>
 #include <gstosselement.h>
 #include <gst/audio/audioclock.h>
index 741bb4c..5b0d128 100644 (file)
@@ -1,5 +1,8 @@
 
-#include <sys/soundcard.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -7,6 +10,20 @@
 #include <sys/ioctl.h>
 #include <glib.h>
 
+#ifdef HAVE_OSS_INCLUDE_IN_SYS
+#include <sys/soundcard.h>
+#else
+
+#ifdef HAVE_OSS_INCLUDE_IN_ROOT
+#include <soundcard.h>
+#else
+
+#include <machine/soundcard.h>
+
+#endif /* HAVE_OSS_INCLUDE_IN_ROOT */
+
+#endif /* HAVE_OSS_INCLUDE_IN_SYS */
+
 typedef struct _Probe Probe;
 struct _Probe
 {