shithub: sox

Download patch

ref: 6676de057b1a4dda62ffb475a5762f90b0c55a25
parent: bf1bd21a9f0f88664350862b2339e59b5947b910
author: Chris Bagwell <chris@cnpbagwell.com>
date: Mon Jan 16 07:48:06 EST 2012

configure fix for libFLAC linking on mingw.

It needs wsock32 to get some byte swapping functions.

--- a/mingwbuild
+++ b/mingwbuild
@@ -79,6 +79,7 @@
   DOC_TARGETS=""
   DOCS=""
   TMP_SNDFILE_LIBS=""
+  TMP_FLAC_LIBS=""
   STRIP=strip
   ;;
   *)
@@ -87,6 +88,10 @@
   DOC_TARGETS="pdf"
   DOCS="sox.pdf soxformat.pdf soxi.pdf"
   TMP_SNDFILE_LIBS="-lsndfile -lFLAC -lwsock32 -lvorbisenc -lvorbisfile -lvorbis -logg"
+  # TODO: libFLAC is referencing ntohl() but not defining it in their
+  # flac.pc. Its not obvious how upstream is going to fix this issue
+  # so work around in script for now.
+  TMP_FLAC_LIBS="-lwsock32"
   STRIP=i686-pc-mingw32-strip
 esac
 
@@ -102,7 +107,7 @@
     --with-libltdl \
     --enable-dl-lame --enable-dl-mad --enable-dl-amrnb --enable-dl-amrwb \
     LDFLAGS="-static -L/usr/local/lib" CPPFLAGS=-I/usr/local/include \
-    SNDFILE_LIBS="${TMP_SNDFILE_LIBS}" \
+    SNDFILE_LIBS="${TMP_SNDFILE_LIBS}" FLAC_LIBS="${TMP_FLAC_LIBS}"\
     $*
 fi