summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsamr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109>2008-10-18 04:33:58 +0000
committersamr7 <samr7@126591fb-c623-4b62-a76d-97a8e4f34109>2008-10-18 04:33:58 +0000
commitbb87694120aee4dbca8d62719e9a10b67da86da7 (patch)
treefd1389120748f9b96e5eef3931725aecae556df1
parentd1e8d22047bb5bb6b162977fb4f96cd623fa2734 (diff)
downloadnohands-bb87694120aee4dbca8d62719e9a10b67da86da7.tar.gz
Shake down various build configurations.
git-svn-id: http://nohands.svn.sourceforge.net/svnroot/nohands/trunk@4 126591fb-c623-4b62-a76d-97a8e4f34109
-rw-r--r--Makefile.am8
-rw-r--r--configure.in8
-rw-r--r--libhfp/bt.cpp8
-rw-r--r--libhfp/soundio-alsa.cpp9
4 files changed, 20 insertions, 13 deletions
diff --git a/Makefile.am b/Makefile.am
index fcab0ea..1e7b3f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,5 +10,11 @@ else !BUILD_QT
QT=
endif !BUILD_QT
-SUBDIRS = libhfp hfpd $(NHANDSFREE) $(QT) data
+if BUILD_DBUS
+DBUS=hfpd
+else !BUILD_DBUS
+DBUS=
+endif !BUILD_DBUS
+
+SUBDIRS = libhfp $(DBUS) $(NHANDSFREE) $(QT) data
include m4/doxy.am
diff --git a/configure.in b/configure.in
index 41c19dd..86bc501 100644
--- a/configure.in
+++ b/configure.in
@@ -109,9 +109,9 @@ AC_ARG_ENABLE(speexdsp,
AC_HELP_STRING([--enable-speexdsp], [build the speexdsp AEC filter]),
want_speexdsp=$enableval, want_speexdsp=maybe)
-AC_ARG_ENABLE(hfpd,
- AC_HELP_STRING([--enable-speexdsp], [build the D-BUS based hfpd]),
- want_hfpd=$enableval, want_hfpd=maybe)
+AC_ARG_ENABLE(dbus,
+ AC_HELP_STRING([--enable-dbus], [build D-Bus components -- hfpd]),
+ want_dbus=$enableval, want_dbus=maybe)
AC_ARG_ENABLE(nghost,
AC_HELP_STRING([--enable-nghost], [build the nhandsfree nGhost plugin]),
@@ -172,7 +172,7 @@ fi
dnl dbus is optional
use_dbus=no
-if test $want_hfpd != "no"; then
+if test $want_dbus != "no"; then
PKG_CHECK_MODULES([DBUS], [dbus-1],
[use_dbus="yes"], [use_dbus="no"])
diff --git a/libhfp/bt.cpp b/libhfp/bt.cpp
index e3ada03..32179a9 100644
--- a/libhfp/bt.cpp
+++ b/libhfp/bt.cpp
@@ -225,7 +225,7 @@ void SdpAsyncTaskHandler::
SdpNextQueue(void)
{
SdpTask *taskp;
- sigset_t sigs;
+ sighandler_t sigsave;
ssize_t res;
assert(m_rqpipe >= 0);
@@ -238,11 +238,9 @@ SdpNextQueue(void)
* We never put more than sizeof(SdpTaskParams) through the pipe
* before reading a reply, so it should never block.
*/
- sigemptyset(&sigs);
- sigaddset(&sigs, SIGPIPE);
- pthread_sigmask(SIG_BLOCK, &sigs, &sigs);
+ sigsave = signal(SIGPIPE, SIG_IGN);
res = write(m_rqpipe, &taskp->m_params, sizeof(taskp->m_params));
- pthread_sigmask(SIG_SETMASK, &sigs, NULL);
+ (void) signal(SIGPIPE, sigsave);
if (res != sizeof(taskp->m_params)) {
/* TODO: async involuntary stop */
diff --git a/libhfp/soundio-alsa.cpp b/libhfp/soundio-alsa.cpp
index a41a937..36e9899 100644
--- a/libhfp/soundio-alsa.cpp
+++ b/libhfp/soundio-alsa.cpp
@@ -29,16 +29,19 @@
#include <libhfp/soundio.h>
#include <libhfp/soundio-buf.h>
+#if defined(USE_ALSA_SOUNDIO)
+#include <alsa/asoundlib.h>
+#endif
+
/*
* ALSA backend SoundIo implementation, including support for procedural
* and mmap access.
*/
-#if defined(USE_ALSA_SOUNDIO)
-#include <alsa/asoundlib.h>
-
namespace libhfp {
+#if defined(USE_ALSA_SOUNDIO)
+
/*
* Linux ALSA sound I/O base class.
* There are more specific ALSA classes for low-level procedural