[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] gr-audio-oss - OSS API emulation on NetBSD
From: |
Berndt Josef Wulf |
Subject: |
Re: [Discuss-gnuradio] gr-audio-oss - OSS API emulation on NetBSD |
Date: |
Thu, 4 Nov 2004 05:40:19 +1030 |
User-agent: |
KMail/1.7 |
On Thursday 04 November 2004 02:07, Eric Blossom wrote:
> On Wed, Nov 03, 2004 at 08:06:59PM +1030, Berndt Josef Wulf wrote:
> > G'day,
> >
> > From a quick read on the Internet I understand that the OSS API ioctl
> > calls are supported by the Linux kernel. This is not the case on NetBSD
> > which uses the libossaudio library requiring passing linker option
> > -lossaudio.
> >
> > Would it be possible to have autoconfig check for the libossaudio library
> > and if so, add the -lossaudio linker option in module gr-audio-oss?
> >
> > e.g.
> >
> > AC_CHECK_LIBRARY(ossaudio,....
>
> No problem. Please determine the name of a function in the ossaudio
> library. The autoconf macro AC_CHECK_LIB looks for a particular
> function in a library.
>
> You can get the list of symbols in a static library with nm. For
> symbols in a shared library use nm --dynamic. Pick a symbol with a
> "T" in the second column, preferably one that looks like it's not just
> an implementation detail subject to change.
>
> Once you've determined a function, add this to configure.ac
>
> dnl find this original code.
> PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 2)
> LIBS="$LIBS $GNURADIO_CORE_LIBS"
>
> dnl The add your new code right after it
> AC_CHECK_LIB(ossaudio,NAME_OF_FUNCTION_IN_LIBRARY)
>
>
> Then ./bootstrap && ./configure --enable-maintainer-mode && make
>
> If it works, send the the patch and I'll test on GNU/Linux to make
> sure we haven't broken anything.
Done, there are two ways this can be done, both resulting in -lossaudio passed
on by the $LIB variable:
----------------------------- using AC_CHECK_LIB ----------------------------
--- configure.ac.orig 2004-11-04 05:21:27.000000000 +1030
+++ configure.ac 2004-11-04 05:28:20.000000000 +1030
@@ -83,6 +83,8 @@
PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 2)
LIBS="$LIBS $GNURADIO_CORE_LIBS"
+AC_CHECK_LIB(ossaudio, _oss_ioctl)
+
dnl check for oss header...
AC_CHECK_HEADER(sys/soundcard.h,
[],
------------------------------------------------------------------------------------
---------------------------- using AC_HAVE_LIBRARY --------------------------
--- configure.ac.orig 2004-11-04 05:21:27.000000000 +1030
+++ configure.ac 2004-11-04 05:31:58.000000000 +1030
@@ -83,6 +83,8 @@
PKG_CHECK_MODULES(GNURADIO_CORE, gnuradio-core >= 2)
LIBS="$LIBS $GNURADIO_CORE_LIBS"
+AC_HAVE_LIBRARY(ossaudio)
+
dnl check for oss header...
AC_CHECK_HEADER(sys/soundcard.h,
[],
------------------------------------------------------------------------------------
both resulting into:
husky: {549} ldd src/.libs/_audio_oss.so
src/.libs/_audio_oss.so:
-lpthread.0 => /usr/lib/libpthread.so.0
-lgrswigrunpy.0 => /usr/pkg/lib/libgrswigrunpy.so.0
-lossaudio.0 => /usr/lib/libossaudio.so.0 <-----
-lstdc++.5 => /usr/lib/libstdc++.so.5
-lm.0 => /usr/lib/libm387.so.0
-lm.0 => /usr/lib/libm.so.0
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lcppunit-1.10.2 => /usr/pkg/lib/libcppunit-1.10.so.2
-lfftw3f.3 => /usr/pkg/lib/libfftw3f.so.3
-lgnuradio-core.0 => /usr/pkg/lib/libgnuradio-core.so.0
73, Berndt
VK5ABN
--
Name : Berndt Josef Wulf | +++ With BSD on Packet Radio +++
E-Mail : wulf at ping dot net dot au | tfkiss, tnt, dpbox, wampes
ICQ : 18196098 | VK5ABN, Nairne, South Australia
URL : http://www.ping.net.au/~wulf | MBOX : address@hidden
Sysinfo : DEC Miata 500AU, NetBSD-2.0D | BBS : vk5abn.#lmr.#sa.aus.oc
pgpNbtWQIA5RY.pgp
Description: PGP signature