[Speex-dev] [PATCH] autotools: fix linking for building speexdec with mingw

Tristan Matthews tmatth at videolan.org
Sat Jul 9 21:07:08 UTC 2016


This patch should address the current linking failure for speexdec with mingw.

---
 configure.ac    | 3 +++
 src/Makefile.am | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index c4b357e..1659062 100644
--- a/configure.ac
+++ b/configure.ac
@@ -194,9 +194,12 @@ AC_ARG_ENABLE(blackfin-asm, [  --enable-blackfin-asm   Make use of Blackfin asse
 [if test "$enableval" = yes; then
   AC_DEFINE([BFIN_ASM], , [Make use of Blackfin assembly optimizations])
 fi])
+WINMM_LIBS=""
 case $host_os in
   uclinux) LDFLAGS="-Wl,-elf2flt=-s100000 $LDFLAGS";;
+  *mingw*) WINMM_LIBS="-lwinmm";;
 esac
+AC_SUBST(WINMM_LIBS)
 
 AC_ARG_ENABLE(fixed-point-debug, [  --enable-fixed-point-debug  Debug fixed-point implementation],
 [if test "$enableval" = yes; then
diff --git a/src/Makefile.am b/src/Makefile.am
index 2cac269..ce870ac 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,5 +24,5 @@ speexenc_LDADD = $(top_builddir)/libspeex/libspeex.la \
 
 speexdec_SOURCES = speexdec.c wav_io.c
 speexdec_LDADD = $(top_builddir)/libspeex/libspeex.la \
-	$(OGG_LIBS)  @FFT_LIBS@
+	$(OGG_LIBS) @WINMM_LIBS@ @FFT_LIBS@
 
-- 
2.8.1



More information about the Speex-dev mailing list