From c4d13331859f05a8fab18c95a4cb60d4abf1feb4 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 11 Dec 2009 18:12:55 +0000 Subject: [PATCH] fix portaudio build with jack git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15911 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- configure.in | 12 ++++++++++-- src/mod/endpoints/mod_portaudio/Makefile.am | 2 +- src/mod/formats/mod_portaudio_stream/Makefile.am | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index ae778edb66..4e10533359 100644 --- a/configure.in +++ b/configure.in @@ -305,11 +305,19 @@ if test "x$enable_zrtp" = "xyes" ; then APR_ADDTO(SWITCH_AM_CFLAGS, -DENABLE_ZRTP) fi +PA_LIBS= + +PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no) +if test "x$have_jack" = "xyes" ; then +PA_LIBS+=$JACK_LIBS +fi + AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no) if test "x$have_alsa" = "xyes" ; then -ALSA_LIBS=-lasound +PA_LIBS+=-lasound fi -AC_SUBST(ALSA_LIBS) + +AC_SUBST(PA_LIBS) AM_CONDITIONAL([ENABLE_ZRTP],[test "x$enable_zrtp" != "xno"]) diff --git a/src/mod/endpoints/mod_portaudio/Makefile.am b/src/mod/endpoints/mod_portaudio/Makefile.am index 76c1f738a5..56f82daf79 100644 --- a/src/mod/endpoints/mod_portaudio/Makefile.am +++ b/src/mod/endpoints/mod_portaudio/Makefile.am @@ -9,7 +9,7 @@ mod_portaudio_la_SOURCES = mod_portaudio.c pablio.c pa_ringbuffer.c mod_portaudio_la_CFLAGS = $(AM_CFLAGS) mod_portaudio_la_CFLAGS += -I. -I$(PA_DIR)/include -D__EXTENSION__=1 mod_portaudio_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(PALA) -mod_portaudio_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(ALSA_LIBS) +mod_portaudio_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(PA_LIBS) if ISMAC mod_portaudio_la_LDFLAGS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon diff --git a/src/mod/formats/mod_portaudio_stream/Makefile.am b/src/mod/formats/mod_portaudio_stream/Makefile.am index abb9f2e4b6..9b9900c03a 100644 --- a/src/mod/formats/mod_portaudio_stream/Makefile.am +++ b/src/mod/formats/mod_portaudio_stream/Makefile.am @@ -10,7 +10,7 @@ mod_portaudio_stream_la_SOURCES = mod_portaudio_stream.c $(MODPA_DIR)/pablio.c $ mod_portaudio_stream_la_CFLAGS = $(AM_CFLAGS) mod_portaudio_stream_la_CFLAGS += -I. -I$(PA_DIR)/include -D__EXTENSION__=1 -I$(MODPA_DIR) mod_portaudio_stream_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(PALA) -mod_portaudio_stream_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(ALSA_LIBS) +mod_portaudio_stream_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(PA_LIBS) if ISMAC mod_portaudio_stream_la_LDFLAGS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon