]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix mod_portaudio linux build with alsa (MODAPP-377)
authorMichael Jerris <mike@jerris.com>
Fri, 11 Dec 2009 03:20:06 +0000 (03:20 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 11 Dec 2009 03:20:06 +0000 (03:20 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15899 d0543943-73ff-0310-b7d9-9358b9ac24b2

configure.in
src/mod/endpoints/mod_portaudio/Makefile.am
src/mod/formats/mod_portaudio_stream/Makefile.am

index 990106396a04d8e46fa1aea28c31e6e3808c6299..6db16e7f2244237c0e38dc13098617865094e57d 100644 (file)
@@ -304,6 +304,13 @@ if test "x$enable_zrtp" = "xyes" ; then
    fi
    APR_ADDTO(SWITCH_AM_CFLAGS, -DENABLE_ZRTP)
 fi
+
+AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
+if [ $have_alsa = "yes" ] ; then
+ALSA_LIBS=-lasound
+fi
+AC_SUBST(ALSA_LIBS)
+
 AM_CONDITIONAL([ENABLE_ZRTP],[test "x$enable_zrtp" != "xno"])
 
 
index 7ef223bdb9a17e997ac9d7131d181af475932383..76c1f738a55d7a85d5a4dc938ca5e27d3c35973d 100644 (file)
@@ -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
+mod_portaudio_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(ALSA_LIBS)
 
 if ISMAC
 mod_portaudio_la_LDFLAGS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon
index a93248a727d4637d9c004272be2623d5db6b4f8a..abb9f2e4b65e3eff06719e1cbbceab99548404ba 100644 (file)
@@ -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
+mod_portaudio_stream_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(ALSA_LIBS)
 
 if ISMAC
 mod_portaudio_stream_la_LDFLAGS += -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon