diff options
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | codecs/Makefile.am | 4 | ||||
-rw-r--r-- | codecs/Makefile.common | 3 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | ui/qt/Makefile.am | 4 | ||||
-rw-r--r-- | ui/qt/rtp_audio_stream.cpp | 4 |
6 files changed, 26 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 8d00df5042..a7387d6f8e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -411,7 +411,11 @@ wireshark_LDADD = \ $(wireshark_common_ldadd) \ $(GLIB_LIBS) \ $(Qt_LIBS) + +if HAVE_SPEEXDSP +wireshark_LDADD += $(SPEEXDSP_LIBS) endif +endif # HAVE_Qt if HAVE_GTK wireshark_gtk_SOURCES = $(WIRESHARK_COMMON_SRC) diff --git a/codecs/Makefile.am b/codecs/Makefile.am index fd93ba4eda..35d92d32a7 100644 --- a/codecs/Makefile.am +++ b/codecs/Makefile.am @@ -35,6 +35,10 @@ endif libwscodecs_la_SOURCES = \ $(LIBWSCODECS_SRC) +if !HAVE_SPEEXDSP +libwscodecs_la_SOURCES += speex/resample.c +endif + # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html libwscodecs_la_LDFLAGS = -version-info 0:0:0 @LDFLAGS_SHAREDLIB@ diff --git a/codecs/Makefile.common b/codecs/Makefile.common index b97e7f8dbc..1e8b158df2 100644 --- a/codecs/Makefile.common +++ b/codecs/Makefile.common @@ -26,5 +26,4 @@ LIBWSCODECS_SRC = \ G711a/G711adecode.c \ G711u/G711udecode.c \ G722/G722decode.c \ - G726/G726decode.c \ - speex/resample.c + G726/G726decode.c diff --git a/configure.ac b/configure.ac index a7dffab5dc..15379961e7 100644 --- a/configure.ac +++ b/configure.ac @@ -2403,6 +2403,15 @@ AC_CHECK_FUNCS(sysconf) AC_CHECK_FUNCS(getifaddrs) AC_CHECK_FUNC(getexecname) +# +# Check for SpeexDSP (http://www.speex.org) +# +AS_IF([test "x$have_qt_multimedia_lib" = xyes], + [PKG_CHECK_MODULES(SPEEXDSP, speexdsp, [have_speexdsp=yes], [have_speexdsp=no])]) +AS_IF([test "x$have_speexdsp" = xyes], + [AC_DEFINE(HAVE_SPEEXDSP, 1, [Define to 1 if you have SpeexDSP])]) +AM_CONDITIONAL(HAVE_SPEEXDSP, [test "x$have_speexdsp" = "xyes"]) + # Check Bluetooth SBC codec for RTP Player # git://git.kernel.org/pub/scm/bluetooth/sbc.git AC_ARG_WITH([sbc], diff --git a/ui/qt/Makefile.am b/ui/qt/Makefile.am index c34010c8c9..134b8b167c 100644 --- a/ui/qt/Makefile.am +++ b/ui/qt/Makefile.am @@ -24,6 +24,10 @@ include $(top_srcdir)/Makefile.am.inc AM_CPPFLAGS = $(INCLUDEDIRS) $(WS_CPPFLAGS) $(GLIB_CFLAGS) $(Qt_CFLAGS) +if HAVE_SPEEXDSP +AM_CPPFLAGS += $(SPEEXDSP_CFLAGS) +endif + noinst_LIBRARIES = libqtui.a CLEANFILES = \ diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp index 8c2ac2d538..6d0dfc72e1 100644 --- a/ui/qt/rtp_audio_stream.cpp +++ b/ui/qt/rtp_audio_stream.cpp @@ -23,7 +23,11 @@ #ifdef QT_MULTIMEDIA_LIB +#ifdef HAVE_SPEEXDSP +#include <speex/speex_resampler.h> +#else #include <codecs/speex/speex_resampler.h> +#endif /* HAVE_SPEEXDSP */ #include <epan/rtp_pt.h> |