[asterisk-commits] trunk r23736 - in /trunk: channels/Makefile
channels/chan_oss.c configure.ac
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Apr 30 10:49:50 MST 2006
Author: kpfleming
Date: Sun Apr 30 12:49:50 2006
New Revision: 23736
URL: http://svn.digium.com/view/asterisk?rev=23736&view=rev
Log:
use proper method of detecting OSS support on Linux and FreeBSD
Modified:
trunk/channels/Makefile
trunk/channels/chan_oss.c
trunk/configure.ac
Modified: trunk/channels/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/channels/Makefile?rev=23736&r1=23735&r2=23736&view=diff
==============================================================================
--- trunk/channels/Makefile (original)
+++ trunk/channels/Makefile Sun Apr 30 12:49:50 2006
@@ -103,15 +103,10 @@
./gentone ringtone 440 480
chan_oss.o: chan_oss.c busy.h ringtone.h
+ $(CC) -c -o $@ $(CFLAGS) $(OSSAUDIO_INCLUDE) $<
-ifeq ($(OSARCH),OpenBSD)
chan_oss.so: chan_oss.o
- $(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio
-endif
-ifeq ($(OSARCH),NetBSD)
-chan_oss.so: chan_oss.o
- $(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio
-endif
+ $(CC) $(SOLINK) -o $@ chan_oss.o $(OSSAUDIO_LIB)
chan_iax2.so: chan_iax2.o iax2-parser.o iax2-provision.o
$(CC) $(SOLINK) -o $@ $< iax2-parser.o iax2-provision.o
Modified: trunk/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_oss.c?rev=23736&r1=23735&r2=23736&view=diff
==============================================================================
--- trunk/channels/chan_oss.c (original)
+++ trunk/channels/chan_oss.c Sun Apr 30 12:49:50 2006
@@ -33,7 +33,7 @@
*/
/*** MODULEINFO
- <depend>osssound</depend>
+ <depend>ossaudio</depend>
***/
#include <stdio.h>
Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?rev=23736&r1=23735&r2=23736&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sun Apr 30 12:49:50 2006
@@ -174,13 +174,24 @@
AST_EXT_LIB([vorbis], [vorbis_info_init], [vorbis/codec.h], [VORBIS], [Vorbis], [-lm -lvorbisenc])
AST_EXT_LIB([z], [compress], [zlib.h], [ZLIB], [zlib])
+PBX_LIBossaudio=0
if test "x${PBX_OSTYPE}" = "xLinux" ; then
- AST_EXT_LIB([ossaudio], [oss_ioctl_mixer], [linux/soundcard.h], [OSS], [Open Sound System])
+ AC_CHECK_HEADER([linux/soundcard.h],
+ [PBX_LIBossaudio=1
+ AC_DEFINE_UNQUOTED([HAVE_OSS], 1, [Define to indicate the Open Sound System library])
+ ])
elif test "x${PBX_OSTYPE}" = "xFreeBSD" ; then
- AST_EXT_LIB([ossaudio], [oss_ioctl_mixer], [sys/soundcard.h], [OSS], [Open Sound System])
-else
+ AC_CHECK_HEADER([sys/soundcard.h],
+ [PBX_LIBossaudio=1
+ AC_DEFINE_UNQUOTED([HAVE_OSS], 1, [Define to indicate the Open Sound System library])
+ ])
+elif test "x${PBX_OSTYPE}" = "xOpenBSD" ; then
AST_EXT_LIB([ossaudio], [oss_ioctl_mixer], [soundcard.h], [OSS], [Open Sound System])
-fi
+elif test "x${PBX_OSTYPE}" = "xNetBSD" ; then
+ AST_EXT_LIB([ossaudio], [oss_ioctl_mixer], [soundcard.h], [OSS], [Open Sound System])
+fi
+
+AC_SUBST([PBX_LIBossaudio])
if test "x${PBX_OSTYPE}" = "xLinux" ; then
AST_EXT_LIB([tonezone], [tone_zone_find], [linux/zaptel.h], [ZAPTEL], [Zaptel])
More information about the asterisk-commits
mailing list