Revision
15899
Author
mikej
Date
2009-12-10 21:20:06 -0600 (Thu, 10 Dec 2009)

Log Message

fix mod_portaudio linux build with alsa (MODAPP-377)

Modified Paths

Diff

Modified: freeswitch/trunk/configure.in (15898 => 15899)


--- freeswitch/trunk/configure.in	2009-12-11 02:50:51 UTC (rev 15898)
+++ freeswitch/trunk/configure.in	2009-12-11 03:20:06 UTC (rev 15899)
@@ -304,6 +304,13 @@
    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"])
 
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/Makefile.am (15898 => 15899)


--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/Makefile.am	2009-12-11 02:50:51 UTC (rev 15898)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/Makefile.am	2009-12-11 03:20:06 UTC (rev 15899)
@@ -9,7 +9,7 @@
 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

Modified: freeswitch/trunk/src/mod/formats/mod_portaudio_stream/Makefile.am (15898 => 15899)


--- freeswitch/trunk/src/mod/formats/mod_portaudio_stream/Makefile.am	2009-12-11 02:50:51 UTC (rev 15898)
+++ freeswitch/trunk/src/mod/formats/mod_portaudio_stream/Makefile.am	2009-12-11 03:20:06 UTC (rev 15899)
@@ -10,7 +10,7 @@
 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