+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
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 ***
#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"
#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>
#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"
#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 */
#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>
-#include <sys/soundcard.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#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
{